source: branches/libc-0.6/src/emx/include/netinet/udp_var.h@ 2518

Last change on this file since 2518 was 183, checked in by bird, 23 years ago

#434: Initial tcpip header merges.

  • Property cvs2svn:cvs-rev set to 1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 4.3 KB
Line 
1/* Modified for emx by hv 1996
2 * Modified for gcc/os2 by bird 2003
3 *
4 * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by the University of
18 * California, Berkeley and its contributors.
19 * 4. Neither the name of the University nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * from: @(#)udp_var.h 7.7 (Berkeley) 6/28/90
36 * $Id: udp_var.h,v 1.5 1994/01/10 23:27:48 mycroft Exp $
37 */
38
39#ifndef _NETINET_UDP_VAR_H_
40#define _NETINET_UDP_VAR_H_
41
42#ifdef TCPV40HDRS
43struct udpstat {
44 u_long udps_hdrops;
45 u_long udps_badsum;
46 u_long udps_badlen;
47 u_long udps_udpInDatagrams;
48 u_long udps_udpNoPorts;
49 u_long udps_udpOutDatagrams;
50};
51
52#else
53
54/*
55 * UDP kernel structures and variables.
56 */
57#pragma pack(1)
58struct udpiphdr {
59 struct ipovly ui_i; /* overlaid ip structure */
60 struct udphdr ui_u; /* udp header */
61};
62#pragma pack()
63#define ui_next ui_i.ih_next
64#define ui_prev ui_i.ih_prev
65#define ui_x1 ui_i.ih_x1
66#define ui_pr ui_i.ih_pr
67#define ui_len ui_i.ih_len
68#define ui_src ui_i.ih_src
69#define ui_dst ui_i.ih_dst
70#define ui_sport ui_u.uh_sport
71#define ui_dport ui_u.uh_dport
72#define ui_ulen ui_u.uh_ulen
73#define ui_sum ui_u.uh_sum
74
75struct udpstat {
76 /* input statistics: */
77 u_long udps_ipackets; /* total input packets */
78 u_long udps_hdrops; /* packet shorter than header */
79 u_long udps_badsum; /* checksum error */
80 u_long udps_badlen; /* data length larger than packet */
81 u_long udps_noport; /* no socket on port */
82 u_long udps_noportbcast; /* of above, arrived as broadcast */
83 u_long udps_fullsock; /* not delivered, input socket full */
84 u_long udpps_pcbcachemiss; /* input packets missing pcb cache */
85 /* output statistics: */
86 u_long udps_opackets; /* total output packets */
87};
88
89/*
90 * Names for UDP sysctl objects
91 */
92#define UDPCTL_CHECKSUM 1 /* checksum UDP packets */
93#define UDPCTL_STATS 2 /* statistics (read-only) */
94#define UDPCTL_INETCFG 31 /* sysctl code-Generic UDP Inetcfg switching */
95#define UDPCTL_TTL 32 /* sysctl code-TTL for UDP packets */
96#define UDPCTL_UDPSWIN 33 /* sysctl code-UDP really MAX datagram Size */
97#define UDPCTL_UDPRWIN 34 /* sysctl code-UDP recieve window size */
98
99#define UDPCTL_NAMES { \
100 { 0, 0 }, \
101 { "stats", CTLTYPE_STRUCT }, \
102 { "inetcfg",CTLTYPE_INETCFG},\
103}
104
105#endif /* TCPV40HDRS */
106
107#endif /* !_NETINET_UDP_VAR_H_ */
Note: See TracBrowser for help on using the repository browser.