icmp_opt_data.c revision db5b637c3ad5d30e8f1abbe1c8ecdc74bc454bc0
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#define _SUN_TPI_VERSION 2
#include <sys/xti_xtiopt.h>
#include <sys/xti_inet.h>
/*
* MK_XXX Following 2 includes temporary to import ip6_rthdr_t
* definition. May not be needed if we fix ip6_dg_snd_attrs_t
* to do all extension headers in identical manner.
*/
#include <netinet/ip_mroute.h>
/*
* Table of all known options handled on a ICMP protocol stack.
*
* Note: This table contains options processed by both ICMP and IP levels
* and is the superset of options that can be performed on a ICMP over IP
* stack.
*/
opdes_t icmp_opt_arr[] = {
},
#ifdef SO_PROTOTYPE
/*
* icmp will only allow IPPROTO_ICMP for non-privileged streams
* that check is made on an adhoc basis.
*/
#endif
0 },
40, -1 /* not initialized */ },
40, -1 /* not initialized */ },
sizeof (int), 0 },
sizeof (struct in_addr), 0 /* INADDR_ANY */ },
sizeof (struct ip_mreq), 0 },
sizeof (struct ip_mreq_source), -1 },
sizeof (struct ip_mreq_source), -1 },
sizeof (int), 0 /* no ifindex */ },
sizeof (int), 0 /* no ifindex */ },
sizeof (struct in_addr), 0 /* not initialized */ },
sizeof (int), 0 },
(OP_PASSNEXT|OP_NODEFAULT), sizeof (int),
-1 /* not initialized */ },
sizeof (int), -1 /* not initialized */ },
sizeof (int), -1 /* not initialized */ },
-1 /* not initialized */ },
-1 /* not initialized */ },
-1 /* not initialized */ },
-1 /* not initialized */ },
-1 /* not initialized */ },
-1 /* not initialized */ },
sizeof (int), 0 },
sizeof (int), -1 /* not initialized */ },
sizeof (int), 0 /* no ifindex */ },
sizeof (int), 0 /* no ifindex */ },
sizeof (int), 0 /* no ifindex */ },
sizeof (int), 0 },
-1 },
sizeof (icmp6_filter_t), 0 },
sizeof (int), -1 /* not initialized */ },
sizeof (int), -1 /* not initialized */ },
sizeof (struct ip6_mtuinfo), -1 },
sizeof (int), 0 },
sizeof (int), 0 },
sizeof (int), 0 },
sizeof (int), 0 },
sizeof (int), 0 },
sizeof (int), 0 },
sizeof (int), 0 },
sizeof (int), 0 },
sizeof (int), 0 },
sizeof (int), 0 },
sizeof (int), 0 },
sizeof (int), 0 },
sizeof (uint32_t), IPV6_PREFER_SRC_DEFAULT },
-1 /* not initialized */ },
-1 /* not initialized */ },
-1 /* not initialized */ },
-1 /* not initialized */ },
-1 /* not initialized */ },
-1 /* not initialized */ },
};
/*
* Table of all supported levels
* Note: Some levels (e.g. XTI_GENERIC) may be valid but may not have
* any supported options so we need this info separately.
*
* This is needed only for topmost tpi providers and is used only by
* XTI interfaces.
*/
};
/*
* Initialize option database object for ICMP
*
* This object represents database of options to search passed to
* {sock,tpi}optcom_req() interface routine to take care of option
* management and associated methods.
*/
icmp_opt_default, /* ICMP default value function pointer */
icmp_opt_get, /* ICMP get function pointer */
icmp_opt_set, /* ICMP set function pointer */
B_TRUE, /* ICMP is tpi provider */
ICMP_OPT_ARR_CNT, /* ICMP option database count of entries */
icmp_opt_arr, /* ICMP option database */
ICMP_VALID_LEVELS_CNT, /* ICMP valid level count of entries */
icmp_valid_levels_arr /* ICMP valid level array */
};