Watt-32 tcp/ip  2.2 dev-rel.10
icmp_var.h
Go to the documentation of this file.
1 
5 /*
6  * Copyright (c) 1982, 1986, 1993
7  * The Regents of the University of California. All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  * notice, this list of conditions and the following disclaimer in the
16  * documentation and/or other materials provided with the distribution.
17  * 3. All advertising materials mentioning features or use of this software
18  * must display the following acknowledgement:
19  * This product includes software developed by the University of
20  * California, Berkeley and its contributors.
21  * 4. Neither the name of the University nor the names of its contributors
22  * may be used to endorse or promote products derived from this software
23  * without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28  * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35  * SUCH DAMAGE.
36  *
37  * @(#)icmp_var.h 8.1 (Berkeley) 6/10/93
38  * $Id: icmp_var.h,v 1.4 1995/02/16 00:27:40 wollman Exp $
39  */
40 
41 #ifndef __NETINET_ICMP_VAR_H
42 #define __NETINET_ICMP_VAR_H
43 
44 #ifndef ICMP_MAXTYPE
45 #define ICMP_MAXTYPE 18
46 #endif
47 
48 /*
49  * Variables related to this implementation
50  * of the internet control message protocol.
51  */
52 struct icmpstat {
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  u_long icps_bmcastecho; /* b/mcast echo requests dropped */
66  u_long icps_bmcasttstamp; /* b/mcast tstamp requests dropped */
67  u_long icps_badaddr; /* bad return address */
68  u_long icps_noroute; /* no route back */
69 };
70 
71 /*
72  * Names for ICMP sysctl objects
73  */
74 #define ICMPCTL_MASKREPL 1 /* allow replies to netmask requests */
75 #define ICMPCTL_STATS 2 /* statistics (read-only) */
76 #define ICMPCTL_ICMPLIM 3
77 #define ICMPCTL_MAXID 4
78 
79 #define ICMPCTL_NAMES { \
80  { 0, 0 }, \
81  { "maskrepl", CTLTYPE_INT }, \
82  { "stats", CTLTYPE_STRUCT }, \
83  { "icmplim", CTLTYPE_INT }, \
84 }
85 
86 #endif