summaryrefslogtreecommitdiffstats
path: root/include/linux/sctp.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2007-03-13 17:59:32 +0100
committerDavid S. Miller2007-04-26 07:25:19 +0200
commit2c0fd387b00a6758550b5ca1aae4408374483fe7 (patch)
treee6bd255fb77d476424345c7864f6ee14cb0d1ddc /include/linux/sctp.h
parent[SK_BUFF]: Introduce skb_set_transport_header (diff)
downloadkernel-qcow2-linux-2c0fd387b00a6758550b5ca1aae4408374483fe7.tar.gz
kernel-qcow2-linux-2c0fd387b00a6758550b5ca1aae4408374483fe7.tar.xz
kernel-qcow2-linux-2c0fd387b00a6758550b5ca1aae4408374483fe7.zip
[SCTP]: Introduce sctp_hdr()
For consistency with all the other skb->h.raw accessors. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/sctp.h')
-rw-r--r--include/linux/sctp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sctp.h b/include/linux/sctp.h
index d4f86560bfff..d76767dfe59e 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 <linux/skbuff.h>
+
+static inline struct sctphdr *sctp_hdr(const struct sk_buff *skb)
+{
+ return (struct sctphdr *)skb->h.raw;
+}
+#endif
+
/* Section 3.2. Chunk Field Descriptions. */
typedef struct sctp_chunkhdr {
__u8 type;