xref: /original-bsd/sys/netinet/udp_var.h (revision 241757c4)
1 /*
2  * Copyright (c) 1982, 1986 Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that this notice is preserved and that due credit is given
7  * to the University of California at Berkeley. The name of the University
8  * may not be used to endorse or promote products derived from this
9  * software without specific prior written permission. This software
10  * is provided ``as is'' without express or implied warranty.
11  *
12  *	@(#)udp_var.h	7.3 (Berkeley) 12/07/87
13  */
14 
15 /*
16  * UDP kernel structures and variables.
17  */
18 struct	udpiphdr {
19 	struct 	ipovly ui_i;		/* overlaid ip structure */
20 	struct	udphdr ui_u;		/* udp header */
21 };
22 #define	ui_next		ui_i.ih_next
23 #define	ui_prev		ui_i.ih_prev
24 #define	ui_x1		ui_i.ih_x1
25 #define	ui_pr		ui_i.ih_pr
26 #define	ui_len		ui_i.ih_len
27 #define	ui_src		ui_i.ih_src
28 #define	ui_dst		ui_i.ih_dst
29 #define	ui_sport	ui_u.uh_sport
30 #define	ui_dport	ui_u.uh_dport
31 #define	ui_ulen		ui_u.uh_ulen
32 #define	ui_sum		ui_u.uh_sum
33 
34 struct	udpstat {
35 	int	udps_hdrops;
36 	int	udps_badsum;
37 	int	udps_badlen;
38 };
39 
40 #define	UDP_TTL		30		/* deflt time to live for UDP packets */
41 
42 #ifdef KERNEL
43 struct	inpcb udb;
44 struct	udpstat udpstat;
45 #endif
46