dccp: Make feature negotiation legible
PATCH 4/6 dccp: Make feature negotiation legible
[DCCP]: Make feature negotiation legible
This patch replaces cryptic feature negotiation messages of type
Oct 31 15:42:20 kernel: dccp_feat_change: feat change type2 feat=1 Oct 31 15:42:21 kernel: dccp_feat_change: feat change type4 feat=1 Oct 31 15:42:21 kernel: dccp_feat_change: feat change type2 feat=5
into ones of type:
Nov 2 13:54:45 kernel: dccp_feat_change: ChangeL(CCID (1), 3) Nov 2 13:54:45 kernel: dccp_feat_change: ChangeR(CCID (1), 3) Nov 2 13:54:45 kernel: dccp_feat_change: ChangeL(Ack Ratio (5), 2)
Also,
* completed the feature number list wrt RFC 4340 sec. 6.4
* annotating which ones have been implemented so far
* implemented rudimentary sanity checking in feat.c (FIXMEs)
* some minor fixes
Signed-off-by Gerrit Renker <[email protected]>
--- include/linux/dccp.h | 6 +++- net/dccp/feat.c | 74 ++++++++++++++++++++++++++++++++------------------- net/dccp/feat.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++- net/dccp/options.c | 4 ++ 4 files changed, 122 insertions(+), 31 deletions(-)
include/linux/dccp.h +5 -1
@@ -175,14 +175,18 @@ enum { DCCPC_CCID3 = 3, }; -/* DCCP features */ +/* DCCP features (RFC 4340 section 6.4) */ enum {DCCPF_RESERVED =0 ,DCCPF_CCID =1 , +DCCPF_SHORT_SEQNOS =2 ,/* XXX: not yet implemented */ DCCPF_SEQUENCE_WINDOW =3 , +DCCPF_ECN_INCAPABLE =4 ,/* XXX: not yet implemented */ DCCPF_ACK_RATIO =5 ,DCCPF_SEND_ACK_VECTOR =6 ,DCCPF_SEND_NDP_COUNT =7 , +DCCPF_MIN_CSUM_COVER =8 ,/* XXX: not yet implemented */ +DCCPF_DATA_CHECKSUM =9 ,/* XXX: not yet implemented */ /* 10-127 reserved */ DCCPF_MIN_CCID_SPECIFIC =128 ,DCCPF_MAX_CCID_SPECIFIC =255 ,
net/dccp/feat.h +67 -2
76 lines not on this page · raw message
net/dccp/feat.c +47 -27
159 lines not on this page · raw message
net/dccp/options.c +3 -1
@@ -466,7 +466,9 @@ static int dccp_insert_feat_opt(struct sif (len)memcpy (to, val, len); -dccp_pr_debug ("option %d feat %d len %d\n" , type, feat, len); + +dccp_pr_debug ("%s(%s (%d), ...), length %d\n" ,dccp_feat_typename (type), +dccp_feat_name (feat), feat, len);return 0 ; }