[28449] | 1 | /* $Id: icmp_var.h 98103 2023-01-17 14:15:46Z vboxsync $ */
|
---|
| 2 | /** @file
|
---|
| 3 | * NAT - ICMP handling (declarations/defines).
|
---|
| 4 | */
|
---|
| 5 |
|
---|
[1] | 6 | /*
|
---|
[98103] | 7 | * Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
[28449] | 8 | *
|
---|
[96407] | 9 | * This file is part of VirtualBox base platform packages, as
|
---|
| 10 | * available from https://www.virtualbox.org.
|
---|
| 11 | *
|
---|
| 12 | * This program is free software; you can redistribute it and/or
|
---|
| 13 | * modify it under the terms of the GNU General Public License
|
---|
| 14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
| 15 | * License.
|
---|
| 16 | *
|
---|
| 17 | * This program is distributed in the hope that it will be useful, but
|
---|
| 18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 20 | * General Public License for more details.
|
---|
| 21 | *
|
---|
| 22 | * You should have received a copy of the GNU General Public License
|
---|
| 23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 24 | *
|
---|
| 25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
[28449] | 26 | */
|
---|
| 27 |
|
---|
| 28 | /*
|
---|
| 29 | * This code is based on:
|
---|
| 30 | *
|
---|
[1] | 31 | * Copyright (c) 1982, 1986, 1993
|
---|
[15054] | 32 | * The Regents of the University of California. All rights reserved.
|
---|
[1] | 33 | *
|
---|
| 34 | * Redistribution and use in source and binary forms, with or without
|
---|
| 35 | * modification, are permitted provided that the following conditions
|
---|
| 36 | * are met:
|
---|
| 37 | * 1. Redistributions of source code must retain the above copyright
|
---|
| 38 | * notice, this list of conditions and the following disclaimer.
|
---|
| 39 | * 2. Redistributions in binary form must reproduce the above copyright
|
---|
| 40 | * notice, this list of conditions and the following disclaimer in the
|
---|
| 41 | * documentation and/or other materials provided with the distribution.
|
---|
[95573] | 42 | * 3. Neither the name of the University nor the names of its contributors
|
---|
[1] | 43 | * may be used to endorse or promote products derived from this software
|
---|
| 44 | * without specific prior written permission.
|
---|
| 45 | *
|
---|
| 46 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
---|
| 47 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
---|
| 48 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
---|
| 49 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
---|
| 50 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
---|
| 51 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
---|
| 52 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
---|
| 53 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
| 54 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
---|
| 55 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
---|
| 56 | * SUCH DAMAGE.
|
---|
| 57 | *
|
---|
[15054] | 58 | * @(#)icmp_var.h 8.1 (Berkeley) 6/10/93
|
---|
[1] | 59 | * icmp_var.h,v 1.4 1995/02/16 00:27:40 wollman Exp
|
---|
| 60 | */
|
---|
| 61 |
|
---|
| 62 | #ifndef _NETINET_ICMP_VAR_H_
|
---|
| 63 | #define _NETINET_ICMP_VAR_H_
|
---|
| 64 |
|
---|
| 65 | /*
|
---|
| 66 | * Variables related to this implementation
|
---|
| 67 | * of the internet control message protocol.
|
---|
| 68 | */
|
---|
[14964] | 69 | struct icmpstat_t
|
---|
| 70 | {
|
---|
[1] | 71 | /* statistics related to input messages processed */
|
---|
[15054] | 72 | u_long icps_received; /* #ICMP packets received */
|
---|
| 73 | u_long icps_tooshort; /* packet < ICMP_MINLEN */
|
---|
| 74 | u_long icps_checksum; /* bad checksum */
|
---|
| 75 | u_long icps_notsupp; /* #ICMP packets not supported */
|
---|
| 76 | u_long icps_badtype; /* #with bad type feild */
|
---|
| 77 | u_long icps_reflect; /* number of responses */
|
---|
[1] | 78 | };
|
---|
| 79 |
|
---|
| 80 | /*
|
---|
| 81 | * Names for ICMP sysctl objects
|
---|
| 82 | */
|
---|
[15054] | 83 | #define ICMPCTL_MASKREPL 1 /* allow replies to netmask requests */
|
---|
| 84 | #define ICMPCTL_STATS 2 /* statistics (read-only) */
|
---|
| 85 | #define ICMPCTL_MAXID 3
|
---|
[1] | 86 |
|
---|
| 87 | #define ICMPCTL_NAMES { \
|
---|
[15054] | 88 | { 0, 0 }, \
|
---|
| 89 | { "maskrepl", CTLTYPE_INT }, \
|
---|
| 90 | { "stats", CTLTYPE_STRUCT }, \
|
---|
[1] | 91 | }
|
---|
| 92 |
|
---|
| 93 | #endif
|
---|