/*
* 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 (c) 1990 Mentat Inc.
* Copyright (c) 2013 by Delphix. All rights reserved.
*/
#ifndef _INET_TUNABLES_H
#define _INET_TUNABLES_H
#ifdef _KERNEL
#include <sys/netstack.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* The `mod_ioc_prop_s' datastructure is used as an IOCTL argument for
* SIOCSETPROP and SIOCGETPROP ioctls. This datastructure identifies the
* protocol (`mpr_proto') property (`mpr_name'), which needs to be modified
* or retrieved (`mpr_valsize' and `mpr_val'). If the property applies to an
* interface then `mpr_ifname' contains the name of the interface.
*/
typedef struct mod_ioc_prop_s {
/* name of the interface (ill) for which property will be applied */
/* permission flags for properties */
/* mpr_flags values */
/* mpr_proto values */
/* property is applicable to both IPV[4|6] */
#ifdef _KERNEL
const char *, const void *, uint_t);
typedef struct mod_propval_uint32_s {
/*
* protocol property information
*/
struct mod_prop_info_s {
/*
* Holds the current value of the property. Whenever applicable
*/
union {
} u;
/*
* Holds the default value of the property, that is value of
* the property at boot time.
*/
union {
} u_def;
};
/* extra privilege ports for upper layer protocols, tcp, sctp and udp */
extern int mod_uint32_value(const void *, mod_prop_info_t *,
uint_t, unsigned long *);
uint_t);
#endif /* _KERNEL */
/*
* definitions in RFC 1122, Section 3.3.4.5. IP_WEAK_ES and IP_STRONG_ES
* conform to the corresponding RFC 1122 definitions. The IP_SRC_PRI_ES
* hostmodel is similar to IP_WEAK_ES with one additional enhancement: for
* a packet with source S2, destination D2, the route selection algorithm
* will first attempt to find a route for the destination that goes out
* through an interface where S2 is configured and marked UP. If such
* a route cannot be found, then the best-matching route for D2 will be
* selected, ignoring any mismatches between S2 and the interface addresses
* on the outgoing interface implied by the route.
*/
typedef enum {
IP_WEAK_ES = 0,
#ifdef __cplusplus
}
#endif
#endif /* _INET_TUNABLES_H */