xref: /original-bsd/sys/netinet/udp_var.h (revision da818fbb)
1 /*
2  * Copyright (c) 1982, 1986, 1989 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 the above copyright notice and this paragraph are
7  * duplicated in all such forms and that any documentation,
8  * advertising materials, and other materials related to such
9  * distribution and use acknowledge that the software was developed
10  * by the University of California, Berkeley.  The name of the
11  * University may not be used to endorse or promote products derived
12  * from this software without specific prior written permission.
13  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  *	@(#)udp_var.h	7.5 (Berkeley) 09/20/89
18  */
19 
20 /*
21  * UDP kernel structures and variables.
22  */
23 struct	udpiphdr {
24 	struct 	ipovly ui_i;		/* overlaid ip structure */
25 	struct	udphdr ui_u;		/* udp header */
26 };
27 #define	ui_next		ui_i.ih_next
28 #define	ui_prev		ui_i.ih_prev
29 #define	ui_x1		ui_i.ih_x1
30 #define	ui_pr		ui_i.ih_pr
31 #define	ui_len		ui_i.ih_len
32 #define	ui_src		ui_i.ih_src
33 #define	ui_dst		ui_i.ih_dst
34 #define	ui_sport	ui_u.uh_sport
35 #define	ui_dport	ui_u.uh_dport
36 #define	ui_ulen		ui_u.uh_ulen
37 #define	ui_sum		ui_u.uh_sum
38 
39 struct	udpstat {
40 	int	udps_hdrops;
41 	int	udps_badsum;
42 	int	udps_badlen;
43 	int	udps_noport;
44 	int	udps_ipackets;
45 	int	udps_opackets;
46 };
47 
48 #define	UDP_TTL		30		/* deflt time to live for UDP packets */
49 
50 #ifdef KERNEL
51 struct	inpcb udb;
52 struct	udpstat udpstat;
53 #endif
54