Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
union | dccp_feat_val |
struct | dccp_feat_entry |
struct | ccid_dependency |
Macros | |
#define | DCCPF_ACK_RATIO_MAX 0xFFFF |
#define | DCCPF_SEQ_WMIN 32 |
#define | DCCPF_SEQ_WMAX 0x3FFFFFFFFFFFull |
#define | DCCP_FEAT_MAX_SP_VALS (DCCP_SINGLE_OPT_MAXLEN - 2) |
#define | DCCP_OPTVAL_MAXLEN 6 |
Enumerations | |
enum | dccp_feat_type { FEAT_AT_RX = 1, FEAT_AT_TX = 2, FEAT_SP = 4, FEAT_NN = 8, FEAT_UNKNOWN = 0xFF } |
enum | dccp_feat_state { FEAT_DEFAULT = 0, FEAT_INITIALISING, FEAT_CHANGING, FEAT_UNSTABLE, FEAT_STABLE } |
Functions | |
int | dccp_feat_init (struct sock *sk) |
void | dccp_feat_initialise_sysctls (void) |
int | dccp_feat_register_sp (struct sock *sk, u8 feat, u8 is_local, u8 const *list, u8 len) |
int | dccp_feat_parse_options (struct sock *, struct dccp_request_sock *, u8 mand, u8 opt, u8 feat, u8 *val, u8 len) |
int | dccp_feat_clone_list (struct list_head const *, struct list_head *) |
void | dccp_encode_value_var (const u64 value, u8 *to, const u8 len) |
u64 | dccp_decode_value_var (const u8 *bf, const u8 len) |
u64 | dccp_feat_nn_get (struct sock *sk, u8 feat) |
int | dccp_insert_option_mandatory (struct sk_buff *skb) |
int | dccp_insert_fn_opt (struct sk_buff *skb, u8 type, u8 feat, u8 *val, u8 len, bool repeat_first) |
Variables | |
unsigned long | sysctl_dccp_sequence_window |
int | sysctl_dccp_rx_ccid |
int | sysctl_dccp_tx_ccid |
#define DCCP_FEAT_MAX_SP_VALS (DCCP_SINGLE_OPT_MAXLEN - 2) |
enum dccp_feat_state |
enum dccp_feat_type |
dccp_feat_init - Seed feature negotiation with host-specific defaults This initialises global defaults, depending on the value of the sysctls. These can later be overridden by registering changes via setsockopt calls. The last link in the chain is finalise_settings, to make sure that between here and the start of actual feature negotiation no inconsistencies enter.
All features not appearing below use either defaults or are otherwise later adjusted through dccp_feat_finalise_settings().
dccp_feat_nn_get - Query current/pending value of NN feature : DCCP socket of an established connection : NN feature number from dccp_feature_numbers
For a known NN feature, returns value currently being negotiated, or current (confirmed) value if no negotiation is going on.
int dccp_feat_parse_options | ( | struct sock * | sk, |
struct dccp_request_sock * | dreq, | ||
u8 | mandatory, | ||
u8 | opt, | ||
u8 | feat, | ||
u8 * | val, | ||
u8 | len | ||
) |
dccp_feat_parse_options - Process Feature-Negotiation Options : for general use and used by the client during connection setup : used by the server during connection setup : whether was preceded by a Mandatory option : DCCPO_CHANGE_L | DCCPO_CHANGE_R | DCCPO_CONFIRM_L | DCCPO_CONFIRM_R : one of dccp_feature_numbers : value contents of : length of in bytes
Returns 0 on success, a Reset code for ending the connection otherwise.
int dccp_insert_fn_opt | ( | struct sk_buff * | skb, |
u8 | type, | ||
u8 | feat, | ||
u8 * | val, | ||
u8 | len, | ||
bool | repeat_first | ||
) |
dccp_insert_fn_opt - Insert single Feature-Negotiation option into : DCCPO_CHANGE_L, DCCPO_CHANGE_R, DCCPO_CONFIRM_L, DCCPO_CONFIRM_R : one out of dccp_feature_numbers : NN value or SP array (preferred element first) to copy : true length of in bytes (excluding first element repetition) : whether to copy the first element of twice
The last argument is used to construct Confirm options, where the preferred value and the preference list appear separately (RFC 4340, 6.3.1). Preference lists are kept such that the preferred entry is always first, so we only need to copy twice, and avoid the overhead of cloning into a bigger array.
int sysctl_dccp_rx_ccid |
unsigned long sysctl_dccp_sequence_window |
int sysctl_dccp_tx_ccid |