Commit 9e238323 authored by Marcelo Ricardo Leitner's avatar Marcelo Ricardo Leitner Committed by David S. Miller

sctp: allow others to use sctp_input_cb

We process input path in other files too and having access to it is
nice, so move it to a header where it's shared.
Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ce3a380d
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
#include <linux/workqueue.h> /* We need tq_struct. */ #include <linux/workqueue.h> /* We need tq_struct. */
#include <linux/sctp.h> /* We need sctp* header structs. */ #include <linux/sctp.h> /* We need sctp* header structs. */
#include <net/sctp/auth.h> /* We need auth specific structs */ #include <net/sctp/auth.h> /* We need auth specific structs */
#include <net/ip.h> /* For inet_skb_parm */
/* A convenience structure for handling sockaddr structures. /* A convenience structure for handling sockaddr structures.
* We should wean ourselves off this. * We should wean ourselves off this.
...@@ -1092,6 +1093,20 @@ static inline void sctp_outq_cork(struct sctp_outq *q) ...@@ -1092,6 +1093,20 @@ static inline void sctp_outq_cork(struct sctp_outq *q)
q->cork = 1; q->cork = 1;
} }
/* SCTP skb control block.
* sctp_input_cb is currently used on rx and sock rx queue
*/
struct sctp_input_cb {
union {
struct inet_skb_parm h4;
#if IS_ENABLED(CONFIG_IPV6)
struct inet6_skb_parm h6;
#endif
} header;
struct sctp_chunk *chunk;
};
#define SCTP_INPUT_CB(__skb) ((struct sctp_input_cb *)&((__skb)->cb[0]))
/* These bind address data fields common between endpoints and associations */ /* These bind address data fields common between endpoints and associations */
struct sctp_bind_addr { struct sctp_bind_addr {
......
...@@ -90,17 +90,6 @@ static inline int sctp_rcv_checksum(struct net *net, struct sk_buff *skb) ...@@ -90,17 +90,6 @@ static inline int sctp_rcv_checksum(struct net *net, struct sk_buff *skb)
return 0; return 0;
} }
struct sctp_input_cb {
union {
struct inet_skb_parm h4;
#if IS_ENABLED(CONFIG_IPV6)
struct inet6_skb_parm h6;
#endif
} header;
struct sctp_chunk *chunk;
};
#define SCTP_INPUT_CB(__skb) ((struct sctp_input_cb *)&((__skb)->cb[0]))
/* /*
* This is the routine which IP calls when receiving an SCTP packet. * This is the routine which IP calls when receiving an SCTP packet.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment