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.2 (2.11BSD GTE) 1995/10/09
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_pad ui_i.ih_pad
25: #define ui_x1 ui_i.ih_x1
26: #define ui_pr ui_i.ih_pr
27: #define ui_len ui_i.ih_len
28: #define ui_src ui_i.ih_src
29: #define ui_dst ui_i.ih_dst
30: #define ui_sport ui_u.uh_sport
31: #define ui_dport ui_u.uh_dport
32: #define ui_ulen ui_u.uh_ulen
33: #define ui_sum ui_u.uh_sum
34:
35: struct udpstat {
36: /* input statistics: */
37: long udps_ipackets; /* total input packets */
38: long udps_hdrops; /* packet shorter than header */
39: long udps_badsum; /* checksum error */
40: long udps_badlen; /* data length larger than packet */
41: long udps_noport; /* no socket on port */
42: long udps_noportbcast; /* of above, arrived as broadcast */
43: long udps_fullsock; /* not delivered, input socket full */
44: long udpps_pcbcachemiss; /* input packets missing pcb cache */
45: /* output statistics: */
46: long udps_opackets; /* total output packets */
47: };
48:
49: /*
50: * Names for UDP sysctl objects
51: */
52: #define UDPCTL_CHECKSUM 1 /* checksum UDP packets */
53: #define UDPCTL_MAXID 2
54:
55: #ifndef KERNEL
56: #define UDPCTL_NAMES { \
57: { 0, 0 }, \
58: { "checksum", CTLTYPE_INT }, \
59: }
60: #endif
61:
62: #ifdef SUPERVISOR
63: struct inpcb udb;
64: struct udpstat udpstat;
65: #endif
Defined variables
udb
defined in line
63; used 9 times
Defined struct's
Defined macros
ui_pr
defined in line
26; used 1 times
ui_x1
defined in line
25; used 2 times
Usage of this include