(checked in by karels) add i386 tags
[unix-history] / usr / src / sys / netinet / udp_var.h
CommitLineData
8ae0e4b4 1/*
f6147693 2 * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
2b6b6284 3 * All rights reserved.
8ae0e4b4 4 *
1326eec7 5 * %sccs.include.redist.c%
2b6b6284 6 *
1326eec7 7 * @(#)udp_var.h 7.7 (Berkeley) %G%
8ae0e4b4 8 */
dcfc0daf 9
2b4b57cd
BJ
10/*
11 * UDP kernel structures and variables.
12 */
eb44bfb2
BJ
13struct udpiphdr {
14 struct ipovly ui_i; /* overlaid ip structure */
15 struct udphdr ui_u; /* udp header */
16};
17#define ui_next ui_i.ih_next
18#define ui_prev ui_i.ih_prev
19#define ui_x1 ui_i.ih_x1
20#define ui_pr ui_i.ih_pr
21#define ui_len ui_i.ih_len
22#define ui_src ui_i.ih_src
23#define ui_dst ui_i.ih_dst
24#define ui_sport ui_u.uh_sport
25#define ui_dport ui_u.uh_dport
26#define ui_ulen ui_u.uh_ulen
27#define ui_sum ui_u.uh_sum
28
2b4b57cd 29struct udpstat {
43f80dd3
MK
30 /* input statistics: */
31 int udps_ipackets; /* total input packets */
32 int udps_hdrops; /* packet shorter than header */
33 int udps_badsum; /* checksum error */
34 int udps_badlen; /* data length larger than packet */
35 int udps_noport; /* no socket on port */
36 int udps_noportbcast; /* of above, arrived as broadcast */
37 int udps_fullsock; /* not delivered, input socket full */
38 int udpps_pcbcachemiss; /* input packets missing pcb cache */
39 /* output statistics: */
40 int udps_opackets; /* total output packets */
2b4b57cd
BJ
41};
42
43f80dd3 43#define UDP_TTL 30 /* default time to live for UDP packets */
1820d4e3 44
eb44bfb2 45#ifdef KERNEL
dcfc0daf 46struct inpcb udb;
2b4b57cd 47struct udpstat udpstat;
eb44bfb2 48#endif