Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/include/inet/tunables.h
Real path: /usr/include/inet/tunables.h
Zurück
/* * Copyright (c) 1991, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1990 Mentat Inc. */ #ifndef _INET_TUNABLES_H #define _INET_TUNABLES_H #include <sys/types.h> #include <net/if.h> #include <netinet/in.h> #ifdef _KERNEL #include <sys/netstack.h> #endif #ifdef __cplusplus extern "C" { #endif #define MAXPROPNAMELEN 64 /* * 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 { uint_t mpr_version; uint_t mpr_flags; /* see below */ /* name of the interface (ill) for which property will be applied */ char mpr_ifname[LIFNAMSIZ]; uint_t mpr_proto; /* see below */ char mpr_name[MAXPROPNAMELEN]; /* property name */ uint_t mpr_valsize; /* size of mpr_val */ char mpr_val[1]; } mod_ioc_prop_t; #define MOD_PROP_VERSION 1 /* permission flags for properties */ #define MOD_PROP_PERM_READ 0x1 #define MOD_PROP_PERM_WRITE 0x2 #define MOD_PROP_PERM_RW (MOD_PROP_PERM_READ|MOD_PROP_PERM_WRITE) /* mpr_flags values */ #define MOD_PROP_ACTIVE 0x01 /* current value of the property */ #define MOD_PROP_DEFAULT 0x02 /* default value of the property */ #define MOD_PROP_POSSIBLE 0x04 /* possible values for the property */ #define MOD_PROP_PERM 0x08 /* read/write permission for property */ #define MOD_PROP_APPEND 0x10 /* append to multi-valued property */ #define MOD_PROP_REMOVE 0x20 /* remove from multi-valued property */ /* mpr_proto values */ #define MOD_PROTO_NONE 0x00 #define MOD_PROTO_IPV4 0x01 /* property is applicable to IPV4 */ #define MOD_PROTO_IPV6 0x02 /* property is applicable to IPV6 */ #define MOD_PROTO_RAWIP 0x04 /* property is applicable to ICMP */ #define MOD_PROTO_TCP 0x08 /* property is applicable to TCP */ #define MOD_PROTO_UDP 0x10 /* property is applicable to UDP */ #define MOD_PROTO_SCTP 0x20 /* property is applicable to SCTP */ #define MOD_PROTO_DHCPV4 0x40 /* property is applicable to DHCPv4 */ #define MOD_PROTO_DHCPV6 0x80 /* property is applicable to DHCPv6 */ /* property is applicable to both IPV[4|6] */ #define MOD_PROTO_IP (MOD_PROTO_IPV4|MOD_PROTO_IPV6) /* property is applicable to both DHCPv[4|6] */ #define MOD_PROTO_DHCP (MOD_PROTO_DHCPV4|MOD_PROTO_DHCPV6) #ifdef _KERNEL typedef struct mod_prop_info_s mod_prop_info_t; /* set/get property callback functions */ typedef int mod_prop_setf_t(void *, cred_t *, mod_prop_info_t *, const char *, const void *, uint_t); typedef int mod_prop_getf_t(void *, mod_prop_info_t *, const char *, void *val, uint_t *, uint_t); typedef struct mod_propval_uint32_s { uint32_t mod_propval_umin; uint32_t mod_propval_umax; uint32_t mod_propval_ucur; } mod_propval_uint32_t; /* * protocol property information */ struct mod_prop_info_s { char *mpi_name; /* property name */ uint_t mpi_proto; /* property protocol */ mod_prop_setf_t *mpi_setf; /* sets the property value */ mod_prop_getf_t *mpi_getf; /* gets the property value */ /* * Holds the current value of the property. Whenever applicable * holds the min/max value too. */ union { mod_propval_uint32_t mpi_uval; boolean_t mpi_bval; char *mpi_sval; uint64_t _pad[2]; } u; /* * Holds the default value of the property, that is value of * the property at boot time. */ union { uint32_t mpi_def_uval; boolean_t mpi_def_bval; char *mpi_def_sval; } u_def; }; /* shortcuts to access current/default values */ #define prop_min_uval u.mpi_uval.mod_propval_umin #define prop_max_uval u.mpi_uval.mod_propval_umax #define prop_cur_uval u.mpi_uval.mod_propval_ucur #define prop_cur_bval u.mpi_bval #define prop_cur_sval u.mpi_sval #define prop_def_uval u_def.mpi_def_uval #define prop_def_bval u_def.mpi_def_bval #define prop_def_sval u_def.mpi_def_sval #define MS 1L #define SECONDS (1000 * MS) #define MINUTES (60 * SECONDS) #define HOURS (60 * MINUTES) #define DAYS (24 * HOURS) #define MB (1024 * 1024) /* Largest TCP/UDP/SCTP port number */ #define ULP_MAX_PORT (64 * 1024 - 1) /* extra privilege ports for upper layer protocols, tcp, sctp and udp */ #define ULP_DEF_EPRIV_PORT1 2049 #define ULP_DEF_EPRIV_PORT2 4045 #define ULP_DEF_EPRIV_PORT3 20048 /* VXLAN port for UDP */ #define ULP_DEF_EPRIV_PORT4 IPPORT_VXLAN /* special bind behavior ports for upper layer protocol tcp */ #define ULP_DEF_SBIND_PORT1 20048 /* default small and large annon port values */ #define ULP_DEF_SMALL_ANONPORT (32 * 1024) #define ULP_DEF_LARGE_ANONPORT ULP_MAX_PORT #define MOD_PROPNAME_SMALL_ANONPORT "smallest-anon-port" #define MOD_PROPNAME_LARGE_ANONPORT "largest-anon-port" #define MOD_PROPNAME_SEND_BUF "send-buf" #define MOD_PROPNAME_RECV_BUF "recv-buf" #define MOD_PROPNAME_MAX_BUF "max-buf" /* generic function to set/get global module properties */ extern mod_prop_setf_t mod_set_boolean, mod_set_uint32, mod_set_anon, mod_set_aligned, mod_set_extra_privports, mod_set_cong_enabled, mod_set_cong_default, mod_set_buf, mod_set_max_buf; extern mod_prop_getf_t mod_get_boolean, mod_get_uint32, mod_get_string, mod_get_allprop, mod_get_extra_privports, mod_get_cong_enabled, mod_get_anon, mod_get_buf, mod_get_max_buf; extern int mod_uint32_value(const void *, mod_prop_info_t *, uint_t, unsigned long *); #endif /* _KERNEL */ /* * End-system model definitions that include the weak/strong end-system * 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, IP_SRC_PRI_ES, IP_STRONG_ES, IP_MAXVAL_ES } ip_hostmodel_t; #ifdef __cplusplus } #endif #endif /* _INET_TUNABLES_H */