xref: /original-bsd/sys/netinet/udp_var.h (revision f72a343a)
1 /*
2  * Copyright (c) 1982 Regents of the University of California.
3  * All rights reserved.  The Berkeley software License Agreement
4  * specifies the terms and conditions for redistribution.
5  *
6  *	@(#)udp_var.h	6.4 (Berkeley) 04/05/86
7  */
8 
9 /*
10  * UDP kernel structures and variables.
11  */
12 struct	udpiphdr {
13 	struct 	ipovly ui_i;		/* overlaid ip structure */
14 	struct	udphdr ui_u;		/* udp header */
15 };
16 #define	ui_next		ui_i.ih_next
17 #define	ui_prev		ui_i.ih_prev
18 #define	ui_x1		ui_i.ih_x1
19 #define	ui_pr		ui_i.ih_pr
20 #define	ui_len		ui_i.ih_len
21 #define	ui_src		ui_i.ih_src
22 #define	ui_dst		ui_i.ih_dst
23 #define	ui_sport	ui_u.uh_sport
24 #define	ui_dport	ui_u.uh_dport
25 #define	ui_ulen		ui_u.uh_ulen
26 #define	ui_sum		ui_u.uh_sum
27 
28 struct	udpstat {
29 	int	udps_hdrops;
30 	int	udps_badsum;
31 	int	udps_badlen;
32 };
33 
34 #define	UDP_TTL		30		/* time to live for UDP packets */
35 
36 #ifdef KERNEL
37 struct	inpcb udb;
38 struct	udpstat udpstat;
39 #endif
40