xref: /csrg-svn/sys/netinet/udp_var.h (revision 32789)
123200Smckusick /*
229159Smckusick  * Copyright (c) 1982, 1986 Regents of the University of California.
3*32789Sbostic  * All rights reserved.
423200Smckusick  *
5*32789Sbostic  * Redistribution and use in source and binary forms are permitted
6*32789Sbostic  * provided that this notice is preserved and that due credit is given
7*32789Sbostic  * to the University of California at Berkeley. The name of the University
8*32789Sbostic  * may not be used to endorse or promote products derived from this
9*32789Sbostic  * software without specific prior written permission. This software
10*32789Sbostic  * is provided ``as is'' without express or implied warranty.
11*32789Sbostic  *
12*32789Sbostic  *	@(#)udp_var.h	7.3 (Berkeley) 12/07/87
1323200Smckusick  */
144895Swnj 
154926Swnj /*
164926Swnj  * UDP kernel structures and variables.
174926Swnj  */
184901Swnj struct	udpiphdr {
194901Swnj 	struct 	ipovly ui_i;		/* overlaid ip structure */
204901Swnj 	struct	udphdr ui_u;		/* udp header */
214901Swnj };
224901Swnj #define	ui_next		ui_i.ih_next
234901Swnj #define	ui_prev		ui_i.ih_prev
244901Swnj #define	ui_x1		ui_i.ih_x1
254901Swnj #define	ui_pr		ui_i.ih_pr
264901Swnj #define	ui_len		ui_i.ih_len
274901Swnj #define	ui_src		ui_i.ih_src
284901Swnj #define	ui_dst		ui_i.ih_dst
294901Swnj #define	ui_sport	ui_u.uh_sport
304901Swnj #define	ui_dport	ui_u.uh_dport
314901Swnj #define	ui_ulen		ui_u.uh_ulen
324901Swnj #define	ui_sum		ui_u.uh_sum
334901Swnj 
344926Swnj struct	udpstat {
354926Swnj 	int	udps_hdrops;
364926Swnj 	int	udps_badsum;
374926Swnj 	int	udps_badlen;
384926Swnj };
394926Swnj 
4031398Skarels #define	UDP_TTL		30		/* deflt time to live for UDP packets */
4126086Skarels 
424901Swnj #ifdef KERNEL
434895Swnj struct	inpcb udb;
444926Swnj struct	udpstat udpstat;
454901Swnj #endif
46