aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2006-11-10 14:43:06 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:22:09 -0500
commit6f4e5fff1e4d46714ea554fd83e44eab534e8b11 (patch)
tree4b14344fd825bbcefb6e8514e98e3e796b2dc1bd /include
parenta11d206d0f88e092419877c7f706cafb5e1c2e57 (diff)
[DCCP]: Support for partial checksums (RFC 4340, sec. 9.2)
This patch does the following: a) introduces variable-length checksums as specified in [RFC 4340, sec. 9.2] b) provides necessary socket options and documentation as to how to use them c) basic support and infrastructure for the Minimum Checksum Coverage feature [RFC 4340, sec. 9.2.1]: acceptability tests, user notification and user interface In addition, it (1) fixes two bugs in the DCCPv4 checksum computation: * pseudo-header used checksum_len instead of skb->len * incorrect checksum coverage calculation based on dccph_x (2) removes dccp_v4_verify_checksum() since it reduplicates code of the checksum computation; code calling this function is updated accordingly. (3) now uses skb_checksum(), which is safer than checksum_partial() if the sk_buff has is a non-linear buffer (has pages attached to it). (4) fixes an outstanding TODO item: * If P.CsCov is too large for the packet size, drop packet and return. The code has been tested with applications, the latest version of tcpdump now comes with support for partial DCCP checksums. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dccp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index 90d04ffddae8..0502dfa7f32c 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -183,6 +183,7 @@ enum {
183 DCCPF_ACK_RATIO = 5, 183 DCCPF_ACK_RATIO = 5,
184 DCCPF_SEND_ACK_VECTOR = 6, 184 DCCPF_SEND_ACK_VECTOR = 6,
185 DCCPF_SEND_NDP_COUNT = 7, 185 DCCPF_SEND_NDP_COUNT = 7,
186 DCCPF_MIN_CSUM_COVER = 8,
186 /* 10-127 reserved */ 187 /* 10-127 reserved */
187 DCCPF_MIN_CCID_SPECIFIC = 128, 188 DCCPF_MIN_CCID_SPECIFIC = 128,
188 DCCPF_MAX_CCID_SPECIFIC = 255, 189 DCCPF_MAX_CCID_SPECIFIC = 255,
@@ -200,6 +201,8 @@ struct dccp_so_feat {
200#define DCCP_SOCKOPT_SERVICE 2 201#define DCCP_SOCKOPT_SERVICE 2
201#define DCCP_SOCKOPT_CHANGE_L 3 202#define DCCP_SOCKOPT_CHANGE_L 3
202#define DCCP_SOCKOPT_CHANGE_R 4 203#define DCCP_SOCKOPT_CHANGE_R 4
204#define DCCP_SOCKOPT_SEND_CSCOV 10
205#define DCCP_SOCKOPT_RECV_CSCOV 11
203#define DCCP_SOCKOPT_CCID_RX_INFO 128 206#define DCCP_SOCKOPT_CCID_RX_INFO 128
204#define DCCP_SOCKOPT_CCID_TX_INFO 192 207#define DCCP_SOCKOPT_CCID_TX_INFO 192
205 208
@@ -450,6 +453,8 @@ struct dccp_ackvec;
450 * @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option 453 * @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option
451 * @dccps_packet_size - Set thru setsockopt 454 * @dccps_packet_size - Set thru setsockopt
452 * @dccps_role - Role of this sock, one of %dccp_role 455 * @dccps_role - Role of this sock, one of %dccp_role
456 * @dccps_pcslen - sender partial checksum coverage (via sockopt)
457 * @dccps_pcrlen - receiver partial checksum coverage (via sockopt)
453 * @dccps_ndp_count - number of Non Data Packets since last data packet 458 * @dccps_ndp_count - number of Non Data Packets since last data packet
454 * @dccps_hc_rx_ackvec - rx half connection ack vector 459 * @dccps_hc_rx_ackvec - rx half connection ack vector
455 * @dccps_xmit_timer - timer for when CCID is not ready to send 460 * @dccps_xmit_timer - timer for when CCID is not ready to send
@@ -474,6 +479,8 @@ struct dccp_sock {
474 __u32 dccps_packet_size; 479 __u32 dccps_packet_size;
475 __u16 dccps_l_ack_ratio; 480 __u16 dccps_l_ack_ratio;
476 __u16 dccps_r_ack_ratio; 481 __u16 dccps_r_ack_ratio;
482 __u16 dccps_pcslen;
483 __u16 dccps_pcrlen;
477 unsigned long dccps_ndp_count; 484 unsigned long dccps_ndp_count;
478 __u32 dccps_mss_cache; 485 __u32 dccps_mss_cache;
479 struct dccp_minisock dccps_minisock; 486 struct dccp_minisock dccps_minisock;