source: trunk/src/emx/include/netinet/icmp_var.h@ 1739

Last change on this file since 1739 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 *
  • Property svn:keywords set to Author Date Id Revision
File size: 5.7 KB
Line 
1/* Modified for gcc/os2 by bird 2003
2 *
3 * Copyright (c) 1982, 1986, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by the University of
17 * California, Berkeley and its contributors.
18 * 4. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)icmp_var.h 8.1 (Berkeley) 6/10/93
35 * $FreeBSD: src/sys/netinet/icmp_var.h,v 1.15.2.2 2001/12/07 09:23:11 ru Exp $
36 */
37
38#ifndef _NETINET_ICMP_VAR_H_
39#define _NETINET_ICMP_VAR_H_
40
41#ifndef TCPV40HDRS
42
43#ifdef _KERNEL
44#include "opt_icmp_bandlim.h" /* for ICMP_BANDLIM */
45#endif
46
47/*
48 * Variables related to this implementation
49 * of the internet control message protocol.
50 */
51struct icmpstat {
52#if 0 /* OS2 is slightly different */
53/* statistics related to icmp packets generated */
54 u_long icps_error; /* # of calls to icmp_error */
55 u_long icps_oldshort; /* no error 'cuz old ip too short */
56 u_long icps_oldicmp; /* no error 'cuz old was icmp */
57 u_long icps_outhist[ICMP_MAXTYPE + 1];
58/* statistics related to input messages processed */
59 u_long icps_badcode; /* icmp_code out of range */
60 u_long icps_tooshort; /* packet < ICMP_MINLEN */
61 u_long icps_checksum; /* bad checksum */
62 u_long icps_badlen; /* calculated bound mismatch */
63 u_long icps_reflect; /* number of responses */
64 u_long icps_inhist[ICMP_MAXTYPE + 1];
65#else /* OS2: short not longs */
66 u_short icps_error; /* # of calls to icmp_error */
67 u_short icps_oldshort; /* no error 'cuz old ip too short */
68 u_short icps_oldicmp; /* no error 'cuz old was icmp */
69 u_short icps_outhist[ICMP_MAXTYPE + 1];
70/* statistics related to input messages processed */
71 u_short icps_badcode; /* icmp_code out of range */
72 u_short icps_tooshort; /* packet < ICMP_MINLEN */
73 u_short icps_checksum; /* bad checksum */
74 u_short icps_badlen; /* calculated bound mismatch */
75 u_short icps_reflect; /* number of responses */
76 u_short icps_inhist[ICMP_MAXTYPE + 1];
77#endif
78#if 0 /* not on OS/2 */
79 u_long icps_bmcastecho; /* b/mcast echo requests dropped */
80 u_long icps_bmcasttstamp; /* b/mcast tstamp requests dropped */
81 u_long icps_badaddr; /* bad return address */
82 u_long icps_noroute; /* no route back */
83#endif
84#ifdef MIB
85 u_long icps_OutMsgs;
86 u_long icps_OutErrors;
87 u_long icps_InMsgs;
88 u_long icps_InDestUnreachs;
89 u_long icps_InTimeExcds;
90 u_long icps_InParmProbs;
91 u_long icps_InSrcQuenchs;
92 u_long icps_InRedirects;
93 u_long icps_InEchos;
94 u_long icps_InEchoReps;
95 u_long icps_InTimestamps;
96 u_long icps_InTimestampReps;
97 u_long icps_InAddrMasks;
98 u_long icps_InAddrMaskReps;
99 u_long icps_OutDestUnreachs;
100 u_long icps_OutTimeExcds;
101 u_long icps_OutParmProbs;
102 u_long icps_OutSrcQuenchs;
103 u_long icps_OutRedirects;
104 u_long icps_OutEchos;
105 u_long icps_OutEchoReps;
106 u_long icps_OutTimestamps;
107 u_long icps_OutTimestampReps;
108 u_long icps_OutAddrMasks;
109 u_long icps_OutAddrMaskReps;
110#endif
111/* OS/2 stuff */
112};
113
114/*
115 * Names for ICMP sysctl objects
116 */
117#define ICMPCTL_MASKREPL 1 /* allow replies to netmask requests */
118#define ICMPCTL_STATS 2 /* statistics (read-only) */
119#if 0 /* Diffent on OS2 */
120#define ICMPCTL_ICMPLIM 3
121#define ICMPCTL_MAXID 4
122
123#define ICMPCTL_NAMES { \
124 { 0, 0 }, \
125 { "maskrepl", CTLTYPE_INT }, \
126 { "stats", CTLTYPE_STRUCT }, \
127 { "icmplim", CTLTYPE_INT }, \
128}
129#else /* OS2: */
130#define ICMPCTL_ECHOREPL 3 /* allow replies to ping requests */
131#define ICMPCTL_TTL 50 /* sysctl code - TTL for ICMP packets */
132#define ICMPCTL_NAMES { \
133 { 0, 0 }, \
134 { "maskrepl", CTLTYPE_INT }, \
135 { "stats", CTLTYPE_STRUCT }, \
136 { "echorepl", CTLTYPE_STRUCT }, \
137 { "icmpttl",CTLYPE_INT }, \
138}
139#endif
140
141#if 0 /* not on OS2 */
142#ifdef _KERNEL
143SYSCTL_DECL(_net_inet_icmp);
144#ifdef ICMP_BANDLIM
145extern int badport_bandlim __P((int));
146#endif
147#define BANDLIM_UNLIMITED -1
148#define BANDLIM_ICMP_UNREACH 0
149#define BANDLIM_ICMP_ECHO 1
150#define BANDLIM_ICMP_TSTAMP 2
151#define BANDLIM_RST_CLOSEDPORT 3 /* No connection, and no listeners */
152#define BANDLIM_RST_OPENPORT 4 /* No connection, listener */
153#define BANDLIM_MAX 4
154#endif
155#endif /* 0 */
156
157#endif /* !TCPV40HDRS */
158#endif
Note: See TracBrowser for help on using the repository browser.