Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
options.c File Reference
#include <linux/dccp.h>
#include <linux/module.h>
#include <linux/types.h>
#include <asm/unaligned.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include "ackvec.h"
#include "ccid.h"
#include "dccp.h"
#include "feat.h"

Go to the source code of this file.

Functions

u64 dccp_decode_value_var (const u8 *bf, const u8 len)
 
int dccp_parse_options (struct sock *sk, struct dccp_request_sock *dreq, struct sk_buff *skb)
 
 EXPORT_SYMBOL_GPL (dccp_parse_options)
 
void dccp_encode_value_var (const u64 value, u8 *to, const u8 len)
 
int dccp_insert_option (struct sk_buff *skb, const unsigned char option, const void *value, const unsigned char len)
 
 EXPORT_SYMBOL_GPL (dccp_insert_option)
 
int dccp_insert_option_elapsed_time (struct sk_buff *skb, u32 elapsed_time)
 
 EXPORT_SYMBOL_GPL (dccp_insert_option_elapsed_time)
 
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)
 
int dccp_insert_options (struct sock *sk, struct sk_buff *skb)
 
int dccp_insert_options_rsk (struct dccp_request_sock *dreq, struct sk_buff *skb)
 

Function Documentation

u64 dccp_decode_value_var ( const u8 bf,
const u8  len 
)

Definition at line 26 of file options.c.

void dccp_encode_value_var ( const u64  value,
u8 to,
const u8  len 
)

Definition at line 269 of file options.c.

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.

Definition at line 536 of file options.c.

int dccp_insert_option ( struct sk_buff skb,
const unsigned char  option,
const void value,
const unsigned char  len 
)

Definition at line 292 of file options.c.

int dccp_insert_option_elapsed_time ( struct sk_buff skb,
u32  elapsed_time 
)

Definition at line 347 of file options.c.

int dccp_insert_option_mandatory ( struct sk_buff skb)

dccp_insert_option_mandatory - Mandatory option (5.8.2) Note that since we are using skb_push, this function needs to be called after inserting the option it is supposed to influence (stack order).

Definition at line 513 of file options.c.

int dccp_insert_options ( struct sock sk,
struct sk_buff skb 
)

Definition at line 581 of file options.c.

int dccp_insert_options_rsk ( struct dccp_request_sock dreq,
struct sk_buff skb 
)

Definition at line 624 of file options.c.

int dccp_parse_options ( struct sock sk,
struct dccp_request_sock dreq,
struct sk_buff skb 
)

dccp_parse_options - Parse DCCP options present in : client|server|listening dccp socket (when != NULL) : request socket to use during connection setup, or NULL

Definition at line 51 of file options.c.

EXPORT_SYMBOL_GPL ( dccp_parse_options  )
EXPORT_SYMBOL_GPL ( dccp_insert_option  )
EXPORT_SYMBOL_GPL ( dccp_insert_option_elapsed_time  )