aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dccp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dccp.h')
-rw-r--r--include/linux/dccp.h46
1 files changed, 26 insertions, 20 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index 1cb054bd93f2..fda2148d8c85 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -260,19 +260,20 @@ enum {
260 260
261static inline struct dccp_hdr *dccp_hdr(const struct sk_buff *skb) 261static inline struct dccp_hdr *dccp_hdr(const struct sk_buff *skb)
262{ 262{
263 return (struct dccp_hdr *)skb->h.raw; 263 return (struct dccp_hdr *)skb_transport_header(skb);
264} 264}
265 265
266static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen) 266static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen)
267{ 267{
268 skb->h.raw = skb_push(skb, headlen); 268 skb_push(skb, headlen);
269 memset(skb->h.raw, 0, headlen); 269 skb_reset_transport_header(skb);
270 return dccp_hdr(skb); 270 return memset(skb_transport_header(skb), 0, headlen);
271} 271}
272 272
273static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb) 273static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb)
274{ 274{
275 return (struct dccp_hdr_ext *)(skb->h.raw + sizeof(struct dccp_hdr)); 275 return (struct dccp_hdr_ext *)(skb_transport_header(skb) +
276 sizeof(struct dccp_hdr));
276} 277}
277 278
278static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh) 279static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh)
@@ -301,12 +302,14 @@ static inline __u64 dccp_hdr_seq(const struct sk_buff *skb)
301 302
302static inline struct dccp_hdr_request *dccp_hdr_request(struct sk_buff *skb) 303static inline struct dccp_hdr_request *dccp_hdr_request(struct sk_buff *skb)
303{ 304{
304 return (struct dccp_hdr_request *)(skb->h.raw + dccp_basic_hdr_len(skb)); 305 return (struct dccp_hdr_request *)(skb_transport_header(skb) +
306 dccp_basic_hdr_len(skb));
305} 307}
306 308
307static inline struct dccp_hdr_ack_bits *dccp_hdr_ack_bits(const struct sk_buff *skb) 309static inline struct dccp_hdr_ack_bits *dccp_hdr_ack_bits(const struct sk_buff *skb)
308{ 310{
309 return (struct dccp_hdr_ack_bits *)(skb->h.raw + dccp_basic_hdr_len(skb)); 311 return (struct dccp_hdr_ack_bits *)(skb_transport_header(skb) +
312 dccp_basic_hdr_len(skb));
310} 313}
311 314
312static inline u64 dccp_hdr_ack_seq(const struct sk_buff *skb) 315static inline u64 dccp_hdr_ack_seq(const struct sk_buff *skb)
@@ -317,12 +320,14 @@ static inline u64 dccp_hdr_ack_seq(const struct sk_buff *skb)
317 320
318static inline struct dccp_hdr_response *dccp_hdr_response(struct sk_buff *skb) 321static inline struct dccp_hdr_response *dccp_hdr_response(struct sk_buff *skb)
319{ 322{
320 return (struct dccp_hdr_response *)(skb->h.raw + dccp_basic_hdr_len(skb)); 323 return (struct dccp_hdr_response *)(skb_transport_header(skb) +
324 dccp_basic_hdr_len(skb));
321} 325}
322 326
323static inline struct dccp_hdr_reset *dccp_hdr_reset(struct sk_buff *skb) 327static inline struct dccp_hdr_reset *dccp_hdr_reset(struct sk_buff *skb)
324{ 328{
325 return (struct dccp_hdr_reset *)(skb->h.raw + dccp_basic_hdr_len(skb)); 329 return (struct dccp_hdr_reset *)(skb_transport_header(skb) +
330 dccp_basic_hdr_len(skb));
326} 331}
327 332
328static inline unsigned int __dccp_hdr_len(const struct dccp_hdr *dh) 333static inline unsigned int __dccp_hdr_len(const struct dccp_hdr *dh)
@@ -460,26 +465,27 @@ struct dccp_ackvec;
460 * @dccps_service_list - second .. last service code on passive socket 465 * @dccps_service_list - second .. last service code on passive socket
461 * @dccps_timestamp_time - time of latest TIMESTAMP option 466 * @dccps_timestamp_time - time of latest TIMESTAMP option
462 * @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option 467 * @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option
463 * @dccps_l_ack_ratio - 468 * @dccps_l_ack_ratio - feature-local Ack Ratio
464 * @dccps_r_ack_ratio - 469 * @dccps_r_ack_ratio - feature-remote Ack Ratio
465 * @dccps_pcslen - sender partial checksum coverage (via sockopt) 470 * @dccps_pcslen - sender partial checksum coverage (via sockopt)
466 * @dccps_pcrlen - receiver partial checksum coverage (via sockopt) 471 * @dccps_pcrlen - receiver partial checksum coverage (via sockopt)
467 * @dccps_ndp_count - number of Non Data Packets since last data packet 472 * @dccps_ndp_count - number of Non Data Packets since last data packet
468 * @dccps_mss_cache - 473 * @dccps_mss_cache - current value of MSS (path MTU minus header sizes)
469 * @dccps_minisock - 474 * @dccps_minisock - associated minisock (accessed via dccp_msk)
470 * @dccps_hc_rx_ackvec - rx half connection ack vector 475 * @dccps_hc_rx_ackvec - rx half connection ack vector
471 * @dccps_hc_rx_ccid - 476 * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection)
472 * @dccps_hc_tx_ccid - 477 * @dccps_hc_tx_ccid - CCID used for the sender (or sending half-connection)
473 * @dccps_options_received - 478 * @dccps_options_received - parsed set of retrieved options
474 * @dccps_epoch - 479 * @dccps_role - role of this sock, one of %dccp_role
475 * @dccps_role - Role of this sock, one of %dccp_role 480 * @dccps_hc_rx_insert_options - receiver wants to add options when acking
476 * @dccps_hc_rx_insert_options - 481 * @dccps_hc_tx_insert_options - sender wants to add options when sending
477 * @dccps_hc_tx_insert_options -
478 * @dccps_xmit_timer - timer for when CCID is not ready to send 482 * @dccps_xmit_timer - timer for when CCID is not ready to send
483 * @dccps_syn_rtt - RTT sample from Request/Response exchange (in usecs)
479 */ 484 */
480struct dccp_sock { 485struct dccp_sock {
481 /* inet_connection_sock has to be the first member of dccp_sock */ 486 /* inet_connection_sock has to be the first member of dccp_sock */
482 struct inet_connection_sock dccps_inet_connection; 487 struct inet_connection_sock dccps_inet_connection;
488#define dccps_syn_rtt dccps_inet_connection.icsk_ack.lrcvtime
483 __u64 dccps_swl; 489 __u64 dccps_swl;
484 __u64 dccps_swh; 490 __u64 dccps_swh;
485 __u64 dccps_awl; 491 __u64 dccps_awl;