1 /* 2 * Copyright (c) 1982, 1986 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 7 /* 8 * UDP kernel structures and variables. 9 */ 10 11 #ifndef _NETINET_UDP_VAR_H 12 #define _NETINET_UDP_VAR_H 13 14 /* udp_var.h 1.8 88/08/19 SMI; from UCB 7.1 6/5/86 */ 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 struct udpiphdr { 21 struct ipovly ui_i; /* overlaid ip structure */ 22 struct udphdr ui_u; /* udp header */ 23 }; 24 #define ui_next ui_i.ih_next 25 #define ui_prev ui_i.ih_prev 26 #define ui_x1 ui_i.ih_x1 27 #define ui_pr ui_i.ih_pr 28 #define ui_len ui_i.ih_len 29 #define ui_src ui_i.ih_src 30 #define ui_dst ui_i.ih_dst 31 #define ui_sport ui_u.uh_sport 32 #define ui_dport ui_u.uh_dport 33 #define ui_ulen ui_u.uh_ulen 34 #define ui_sum ui_u.uh_sum 35 36 struct udpstat { 37 int udps_hdrops; 38 int udps_badsum; 39 int udps_badlen; 40 int udps_fullsock; 41 }; 42 43 #define UDP_TTL 30 /* time to live for UDP packets */ 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #endif /* _NETINET_UDP_VAR_H */ 50