[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>
This commit is contained in:
Arnaldo Carvalho de Melo 2007-03-13 13:59:32 -03:00 committed by David S. Miller
parent 967b05f64e
commit 2c0fd387b0
4 changed files with 20 additions and 17 deletions

View file

@ -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;