BSD 4_3_Tahoe release
[unix-history] / usr / src / sys / netinet / udp_var.h
CommitLineData
8ae0e4b4 1/*
0880b18e 2 * Copyright (c) 1982, 1986 Regents of the University of California.
2b6b6284 3 * All rights reserved.
8ae0e4b4 4 *
2b6b6284 5 * Redistribution and use in source and binary forms are permitted
616d42db
KB
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2b6b6284 16 *
ca67e7b4 17 * @(#)udp_var.h 7.4 (Berkeley) 6/29/88
8ae0e4b4 18 */
dcfc0daf 19
2b4b57cd
BJ
20/*
21 * UDP kernel structures and variables.
22 */
eb44bfb2
BJ
23struct udpiphdr {
24 struct ipovly ui_i; /* overlaid ip structure */
25 struct udphdr ui_u; /* udp header */
26};
27#define ui_next ui_i.ih_next
28#define ui_prev ui_i.ih_prev
29#define ui_x1 ui_i.ih_x1
30#define ui_pr ui_i.ih_pr
31#define ui_len ui_i.ih_len
32#define ui_src ui_i.ih_src
33#define ui_dst ui_i.ih_dst
34#define ui_sport ui_u.uh_sport
35#define ui_dport ui_u.uh_dport
36#define ui_ulen ui_u.uh_ulen
37#define ui_sum ui_u.uh_sum
38
2b4b57cd
BJ
39struct udpstat {
40 int udps_hdrops;
41 int udps_badsum;
42 int udps_badlen;
43};
44
0eda4f11 45#define UDP_TTL 30 /* deflt time to live for UDP packets */
1820d4e3 46
eb44bfb2 47#ifdef KERNEL
dcfc0daf 48struct inpcb udb;
2b4b57cd 49struct udpstat udpstat;
eb44bfb2 50#endif