options.c (7483d45f0aee3afc0646d185cabd4af9f6cab58c) options.c (2c53040f018b6c36a46eec75b9b937aaa5f78e6d)
1/*
2 * net/dccp/options.c
3 *
4 * An implementation of the DCCP protocol
5 * Copyright (c) 2005 Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
6 * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
7 * Copyright (c) 2005 Ian McDonald <ian.mcdonald@jandi.co.nz>
8 *

--- 513 unchanged lines hidden (view full) ---

522
523/**
524 * dccp_insert_fn_opt - Insert single Feature-Negotiation option into @skb
525 * @type: %DCCPO_CHANGE_L, %DCCPO_CHANGE_R, %DCCPO_CONFIRM_L, %DCCPO_CONFIRM_R
526 * @feat: one out of %dccp_feature_numbers
527 * @val: NN value or SP array (preferred element first) to copy
528 * @len: true length of @val in bytes (excluding first element repetition)
529 * @repeat_first: whether to copy the first element of @val twice
1/*
2 * net/dccp/options.c
3 *
4 * An implementation of the DCCP protocol
5 * Copyright (c) 2005 Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
6 * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
7 * Copyright (c) 2005 Ian McDonald <ian.mcdonald@jandi.co.nz>
8 *

--- 513 unchanged lines hidden (view full) ---

522
523/**
524 * dccp_insert_fn_opt - Insert single Feature-Negotiation option into @skb
525 * @type: %DCCPO_CHANGE_L, %DCCPO_CHANGE_R, %DCCPO_CONFIRM_L, %DCCPO_CONFIRM_R
526 * @feat: one out of %dccp_feature_numbers
527 * @val: NN value or SP array (preferred element first) to copy
528 * @len: true length of @val in bytes (excluding first element repetition)
529 * @repeat_first: whether to copy the first element of @val twice
530 *
530 * The last argument is used to construct Confirm options, where the preferred
531 * value and the preference list appear separately (RFC 4340, 6.3.1). Preference
532 * lists are kept such that the preferred entry is always first, so we only need
533 * to copy twice, and avoid the overhead of cloning into a bigger array.
534 */
535int dccp_insert_fn_opt(struct sk_buff *skb, u8 type, u8 feat,
536 u8 *val, u8 len, bool repeat_first)
537{

--- 103 unchanged lines hidden ---
531 * The last argument is used to construct Confirm options, where the preferred
532 * value and the preference list appear separately (RFC 4340, 6.3.1). Preference
533 * lists are kept such that the preferred entry is always first, so we only need
534 * to copy twice, and avoid the overhead of cloning into a bigger array.
535 */
536int dccp_insert_fn_opt(struct sk_buff *skb, u8 type, u8 feat,
537 u8 *val, u8 len, bool repeat_first)
538{

--- 103 unchanged lines hidden ---