#include <linux/sctp.h> #include <linux/ipv6.h> /* For ipv6hdr. */ #include <net/tcp_states.h> /* For TCP states used in enum sctp_sock_state */
/* Value used for stream negotiation. */ enum { SCTP_MAX_STREAM = 0xffff }; enum { SCTP_DEFAULT_OUTSTREAMS = 10 }; enum { SCTP_DEFAULT_INSTREAMS = SCTP_MAX_STREAM };
/* Since CIDs are sparse, we need all four of the following *symbols.CIDsaredensethroughSCTP_CID_BASE_MAX.
*/ #define SCTP_CID_BASE_MAX SCTP_CID_SHUTDOWN_COMPLETE
/* These are the different flavours of event. */ enum sctp_event_type {
SCTP_EVENT_T_CHUNK = 1,
SCTP_EVENT_T_TIMEOUT,
SCTP_EVENT_T_OTHER,
SCTP_EVENT_T_PRIMITIVE
};
/* As a convenience for the state machine, we append SCTP_EVENT_* and *SCTP_ULP_*tothelistofpossiblechunks.
*/
/* We define here a utility type for manipulating subtypes. *Thesubtypeconstructorsallworklikethis: * *unionsctp_subtypefoo=SCTP_ST_CHUNK(SCTP_CID_INIT);
*/
/* These functions map various type to printable names. */ constchar *sctp_cname(constunion sctp_subtype id); /* chunk types */ constchar *sctp_oname(constunion sctp_subtype id); /* other events */ constchar *sctp_tname(constunion sctp_subtype id); /* timeouts */ constchar *sctp_pname(constunion sctp_subtype id); /* primitives */
/* This is a table of printable names of sctp_state_t's. */ externconstchar *const sctp_state_tbl[]; externconstchar *const sctp_evttype_tbl[]; externconstchar *const sctp_status_tbl[];
/* Encourage Cookie-Echo bundling by pre-fragmenting chunks a little *harder(untilreachingESTABLISHEDstate).
*/ enum { SCTP_ARBITRARY_COOKIE_ECHO_LEN = 200 };
/* Guess at how big to make the TSN mapping array. *Weguaranteethatwecanhandleatleastthisbigagapbetweenthe *cumulativeACKandthehighestTSN.Inpractice,wecanoften *handleuptotwicethisvalue. * *NEVERmakethismorethan32767(2^15-1).TheGapAckBlocksina *SACK(seesection3.3.4)areonly16bits,so2*SCTP_TSN_MAP_SIZE *mustbelessthan65535(2^16-1),orwewillhaveoverflow *problemscreatingSACK's.
*/ #define SCTP_TSN_MAP_INITIAL BITS_PER_LONG #define SCTP_TSN_MAP_INCREMENT SCTP_TSN_MAP_INITIAL #define SCTP_TSN_MAP_SIZE 4096
/* We will not record more than this many duplicate TSNs between two *SACKs.TheminimumPMTUis512.Removealltheheadersandthere *isenoughroomfor117duplicatereports.Rounddowntothe *nearestpowerof2.
*/ enum { SCTP_MAX_DUP_TSNS = 16 }; enum { SCTP_MAX_GABS = 16 };
#define SCTP_DEFAULT_MINWINDOW 1500/* default minimum rwnd size */ #define SCTP_DEFAULT_MAXWINDOW 65535/* default rwnd size */ #define SCTP_DEFAULT_RWND_SHIFT 4/* by default, update on 1/16 of *rcvbuf,whichis1/8ofinitial *window
*/ #define SCTP_DEFAULT_MAXSEGMENT 1500/* MTU size, this is the limit *towhichwewillraisetheP-MTU.
*/ #define SCTP_DEFAULT_MINSEGMENT 512/* MTU size ... if no mtu disc */
#define SCTP_SECRET_SIZE 32/* Number of octets in a 256 bits. */
#define SCTP_SIGNATURE_SIZE 20/* size of a SLA-1 signature */
#define SCTP_COOKIE_MULTIPLE 32/* Pad out our cookie to make our hash *functionssimplertowrite.
*/
#define SCTP_DEFAULT_UDP_PORT 9899/* default UDP tunneling port */
/* These are the values for pf exposure, UNUSED is to keep compatible with old *applicationsbydefault.
*/ enum {
SCTP_PF_EXPOSE_UNSET,
SCTP_PF_EXPOSE_DISABLE,
SCTP_PF_EXPOSE_ENABLE,
}; #define SCTP_PF_EXPOSE_MAX SCTP_PF_EXPOSE_ENABLE
#define SCTP_PS_RETRANS_MAX 0xffff
/* These return values describe the success or failure of a number of *routineswhichformthelowerinterfacetoSCTP_outqueue.
*/ enum sctp_xmit {
SCTP_XMIT_OK,
SCTP_XMIT_PMTU_FULL,
SCTP_XMIT_RWND_FULL,
SCTP_XMIT_DELAY,
};
/* These are the commands for manipulating transports. */ enum sctp_transport_cmd {
SCTP_TRANSPORT_UP,
SCTP_TRANSPORT_DOWN,
SCTP_TRANSPORT_PF,
};
/* These are the address scopes defined mainly for IPv4 addresses *basedondraftofSCTPIPv4scoping<draft-stewart-tsvwg-sctp-ipv4-00.txt>. *Thesescopesarehopefullygenericenoughtobeusedonscopingboth *IPv4andIPv6addressesinSCTP. *Atthispoint,theIPv6scopeswillbemappedtotheseinternalscopes *asmuchaspossible.
*/ enum sctp_scope {
SCTP_SCOPE_GLOBAL, /* IPv4 global addresses */
SCTP_SCOPE_PRIVATE, /* IPv4 private addresses */
SCTP_SCOPE_LINK, /* IPv4 link local address */
SCTP_SCOPE_LOOPBACK, /* IPv4 loopback address */
SCTP_SCOPE_UNUSABLE, /* IPv4 unusable addresses */
};
enum {
SCTP_SCOPE_POLICY_DISABLE, /* Disable IPv4 address scoping */
SCTP_SCOPE_POLICY_ENABLE, /* Enable IPv4 address scoping */
SCTP_SCOPE_POLICY_PRIVATE, /* Follow draft but allow IPv4 private addresses */
SCTP_SCOPE_POLICY_LINK, /* Follow draft but allow IPv4 link local addresses */
};
/* Based on IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>, *SCTPIPv4unusableaddresses:0.0.0.0/8,224.0.0.0/4,192.88.99.0/24. *Also,RFC8.4,non-unicastaddressesarenotconsideredvalidSCTP *addresses.
*/ #define IS_IPV4_UNUSABLE_ADDRESS(a) \
((htonl(INADDR_BROADCAST) == a) || \
ipv4_is_multicast(a) || \
ipv4_is_zeronet(a) || \
ipv4_is_anycast_6to4(a))
/* Flags used for the bind address copy functions. */ #define SCTP_ADDR4_ALLOWED 0x00000001 /* IPv4 address is allowed by
local sock family */ #define SCTP_ADDR6_ALLOWED 0x00000002 /* IPv6 address is allowed by
local sock family */ #define SCTP_ADDR4_PEERSUPP 0x00000004 /* IPv4 address is supported by
peer */ #define SCTP_ADDR6_PEERSUPP 0x00000008 /* IPv6 address is supported by
peer */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.