sctp_sys/linux/
consts.rs

1// Copyright 2019 sctp-sys Developers
2//
3// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
4// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
5// http://opensource.org/licenses/MIT>, at your option. This file may not be
6// copied, modified, or distributed except according to those terms.
7
8use libc::c_int;
9
10pub const SCTP_BINDX_ADD_ADDR: c_int = 0x01;
11pub const SCTP_BINDX_REM_ADDR: c_int = 0x02;
12
13/* The following symbols come from the Sockets API Extensions for
14 * SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>.
15 */
16pub const SCTP_RTOINFO: c_int = 0;
17pub const SCTP_ASSOCINFO: c_int = 1;
18pub const SCTP_INITMSG: c_int = 2;
19pub const SCTP_NODELAY: c_int = 3; /* Get/set nodelay option. */
20pub const SCTP_AUTOCLOSE: c_int = 4;
21pub const SCTP_SET_PEER_PRIMARY_ADDR: c_int = 5;
22pub const SCTP_PRIMARY_ADDR: c_int = 6;
23pub const SCTP_ADAPTATION_LAYER: c_int = 7;
24pub const SCTP_DISABLE_FRAGMENTS: c_int = 8;
25pub const SCTP_PEER_ADDR_PARAMS: c_int = 9;
26pub const SCTP_DEFAULT_SEND_PARAM: c_int = 10;
27pub const SCTP_EVENTS: c_int = 11;
28pub const SCTP_I_WANT_MAPPED_V4_ADDR: c_int = 12; /* Turn on/off mapped v4 addresses  */
29pub const SCTP_MAXSEG: c_int = 13; /* Get/set maximum fragment. */
30pub const SCTP_STATUS: c_int = 14;
31pub const SCTP_GET_PEER_ADDR_INFO: c_int = 15;
32pub const SCTP_DELAYED_ACK_TIME: c_int = 16;
33pub const SCTP_DELAYED_ACK: c_int = SCTP_DELAYED_ACK_TIME;
34pub const SCTP_DELAYED_SACK: c_int = SCTP_DELAYED_ACK_TIME;
35pub const SCTP_CONTEXT: c_int = 17;
36pub const SCTP_FRAGMENT_INTERLEAVE: c_int = 18;
37pub const SCTP_PARTIAL_DELIVERY_POINT: c_int = 19; /* Set/Get partial delivery point */
38pub const SCTP_MAX_BURST: c_int = 20; /* Set/Get max burst */
39pub const SCTP_AUTH_CHUNK: c_int = 21; /* Set only: add a chunk type to authenticate */
40pub const SCTP_HMAC_IDENT: c_int = 22;
41pub const SCTP_AUTH_KEY: c_int = 23;
42pub const SCTP_AUTH_ACTIVE_KEY: c_int = 24;
43pub const SCTP_AUTH_DELETE_KEY: c_int = 25;
44pub const SCTP_PEER_AUTH_CHUNKS: c_int = 26; /* Read only */
45pub const SCTP_LOCAL_AUTH_CHUNKS: c_int = 27; /* Read only */
46pub const SCTP_GET_ASSOC_NUMBER: c_int = 28; /* Read only */
47
48pub const SCTP_GET_ASSOC_ID_LIST: c_int = 29; /* Read only */
49pub const SCTP_AUTO_ASCONF: c_int = 30;
50pub const SCTP_PEER_ADDR_THLDS: c_int = 31;
51pub const SCTP_RECVRCVINFO: c_int = 32;
52pub const SCTP_RECVNXTINFO: c_int = 33;
53pub const SCTP_DEFAULT_SNDINFO: c_int = 34;
54
55/* Internal Socket Options. Some of the sctp library functions are
56 * implemented using these socket options.
57 */
58pub const SCTP_SOCKOPT_BINDX_ADD: c_int = 100; /* BINDX requests for adding addrs */
59pub const SCTP_SOCKOPT_BINDX_REM: c_int = 101; /* BINDX requests for removing addrs. */
60pub const SCTP_SOCKOPT_PEELOFF: c_int = 102; /* peel off association. */
61/* Options 104-106 are deprecated and removed. Do not use this space */
62pub const SCTP_SOCKOPT_CONNECTX_OLD: c_int = 107; /* CONNECTX old requests. */
63pub const SCTP_GET_PEER_ADDRS: c_int = 108; /* Get all peer address. */
64pub const SCTP_GET_LOCAL_ADDRS: c_int = 109; /* Get all local address. */
65pub const SCTP_SOCKOPT_CONNECTX: c_int = 110; /* CONNECTX requests. */
66pub const SCTP_SOCKOPT_CONNECTX3: c_int = 111; /* CONNECTX requests (updated) */
67pub const SCTP_GET_ASSOC_STATS: c_int = 112; /* Read only */
68
69// Flags
70pub const SCTP_UNORDERED: c_int = 1; /* Send/receive message unordered. */
71pub const SCTP_ADDR_OVER: c_int = 2; /* Override the primary destination. */
72pub const SCTP_ABORT: c_int = 4; /* Send an ABORT message to the peer. */
73pub const SCTP_SACK_IMMEDIATELY: c_int = 8; /* SACK should be sent without delay */
74//pub const SCTP_EOF=MSG_FIN;    /* Initiate graceful shutdown process. */