X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fsctp.h;h=d70df61a029f78a8c2234bde6f6625b4c0f71cf2;hb=a3e4da548328bd2bbd6265819aa19397926e5b05;hp=35108fe7a6860f350d4732626061815630ea69de;hpb=4c1ac1b49122b805adfa4efc620592f68dccf5db;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 35108fe7a68..d70df61a029 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h @@ -63,6 +63,15 @@ typedef struct sctphdr { __be32 checksum; } __attribute__((packed)) sctp_sctphdr_t; +#ifdef __KERNEL__ +#include + +static inline struct sctphdr *sctp_hdr(const struct sk_buff *skb) +{ + return (struct sctphdr *)skb_transport_header(skb); +} +#endif + /* Section 3.2. Chunk Field Descriptions. */ typedef struct sctp_chunkhdr { __u8 type; @@ -180,7 +189,7 @@ typedef enum { SCTP_PARAM_ERR_CAUSE = __constant_htons(0xc003), SCTP_PARAM_SET_PRIMARY = __constant_htons(0xc004), SCTP_PARAM_SUCCESS_REPORT = __constant_htons(0xc005), - SCTP_PARAM_ADAPTION_LAYER_IND = __constant_htons(0xc006), + SCTP_PARAM_ADAPTATION_LAYER_IND = __constant_htons(0xc006), } sctp_param_t; /* enum */ @@ -281,11 +290,11 @@ typedef struct sctp_ecn_capable_param { sctp_paramhdr_t param_hdr; } __attribute__((packed)) sctp_ecn_capable_param_t; -/* ADDIP Section 3.2.6 Adaption Layer Indication */ -typedef struct sctp_adaption_ind_param { +/* ADDIP Section 3.2.6 Adaptation Layer Indication */ +typedef struct sctp_adaptation_ind_param { struct sctp_paramhdr param_hdr; - __be32 adaption_ind; -} __attribute__((packed)) sctp_adaption_ind_param_t; + __be32 adaptation_ind; +} __attribute__((packed)) sctp_adaptation_ind_param_t; /* RFC 2960. Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2): * The INIT ACK chunk is used to acknowledge the initiation of an SCTP