update copyright for distribution
[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
KB
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 (Berkeley) %G%
8ae0e4b4 13 */
dcfc0daf 14
2b4b57cd
BJ
15/*
16 * UDP kernel structures and variables.
17 */
eb44bfb2
BJ
18struct 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_x1 ui_i.ih_x1
25#define ui_pr ui_i.ih_pr
26#define ui_len ui_i.ih_len
27#define ui_src ui_i.ih_src
28#define ui_dst ui_i.ih_dst
29#define ui_sport ui_u.uh_sport
30#define ui_dport ui_u.uh_dport
31#define ui_ulen ui_u.uh_ulen
32#define ui_sum ui_u.uh_sum
33
2b4b57cd
BJ
34struct udpstat {
35 int udps_hdrops;
36 int udps_badsum;
37 int udps_badlen;
38};
39
0eda4f11 40#define UDP_TTL 30 /* deflt time to live for UDP packets */
1820d4e3 41
eb44bfb2 42#ifdef KERNEL
dcfc0daf 43struct inpcb udb;
2b4b57cd 44struct udpstat udpstat;
eb44bfb2 45#endif