summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2002-09-26 05:20:35 -0700
committerDavid S. Miller <davem@nuts.ninka.net>2002-09-26 05:20:35 -0700
commit229e08408636210690cf91022e195d364ad80a17 (patch)
treee6250f595bad58154dea0b1b5379e02170997ba3 /include
parent02debc0ea4a9a27c84d9a23375deb337e9645ccf (diff)
parent1088010625309b3fd33aad7a21737b11f8ce9d2d (diff)
Merge nuts.ninka.net:/home/davem/src/BK/network-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
Diffstat (limited to 'include')
-rw-r--r--include/linux/x25.h16
-rw-r--r--include/net/llc_c_ev.h38
-rw-r--r--include/net/llc_conn.h11
-rw-r--r--include/net/llc_evnt.h24
-rw-r--r--include/net/llc_frame.h98
-rw-r--r--include/net/llc_if.h80
-rw-r--r--include/net/llc_main.h3
-rw-r--r--include/net/llc_name.h7
-rw-r--r--include/net/llc_s_ev.h37
-rw-r--r--include/net/llc_sap.h31
-rw-r--r--include/net/llc_state.h4
-rw-r--r--include/net/ndisc.h19
-rw-r--r--include/net/p8022.h9
-rw-r--r--include/net/sctp/constants.h1
-rw-r--r--include/net/sctp/sctp.h3
-rw-r--r--include/net/sctp/sm.h8
-rw-r--r--include/net/sctp/structs.h15
-rw-r--r--include/net/x25.h14
18 files changed, 120 insertions, 298 deletions
diff --git a/include/linux/x25.h b/include/linux/x25.h
index 49bb2a4b39ec..7531cfed5885 100644
--- a/include/linux/x25.h
+++ b/include/linux/x25.h
@@ -39,16 +39,16 @@
* An X.121 address, it is held as ASCII text, null terminated, up to 15
* digits and a null terminator.
*/
-typedef struct {
- char x25_addr[16];
-} x25_address;
+struct x25_address {
+ char x25_addr[16];
+};
/*
* Linux X.25 Address structure, used for bind, and connect mostly.
*/
struct sockaddr_x25 {
- sa_family_t sx25_family; /* Must be AF_X25 */
- x25_address sx25_addr; /* X.121 Address */
+ sa_family_t sx25_family; /* Must be AF_X25 */
+ struct x25_address sx25_addr; /* X.121 Address */
};
/*
@@ -78,9 +78,9 @@ struct x25_subscrip_struct {
* Routing table control structure.
*/
struct x25_route_struct {
- x25_address address;
- unsigned int sigdigits;
- char device[200];
+ struct x25_address address;
+ unsigned int sigdigits;
+ char device[200];
};
/*
diff --git a/include/net/llc_c_ev.h b/include/net/llc_c_ev.h
index 2a8a0be9040b..20fbfeec34c4 100644
--- a/include/net/llc_c_ev.h
+++ b/include/net/llc_c_ev.h
@@ -110,38 +110,14 @@
#define LLC_CONN_EV_QFY_S_FLAG_EQ_0 11
#define LLC_CONN_EV_QFY_INIT_P_F_CYCLE 12
-/* Event data interface; what is sent in an event package */
-/* Event LLC_CONN_EV_TYPE_SIMPLE interface */
-struct llc_conn_ev_simple_if {
- u8 ev;
-};
-
-/* Event LLC_CONN_EV_TYPE_PRIM interface */
-struct llc_conn_ev_prim_if {
- u8 prim; /* connect, disconnect, reset, ... */
- u8 type; /* request, indicate, response, conf */
- struct llc_prim_if_block *data;
-};
-
-/* Event LLC_CONN_EV_TYPE_PDU interface */
-struct llc_conn_ev_pdu_if {
- u8 ev;
-};
-
-union llc_conn_ev_if {
- struct llc_conn_ev_simple_if a; /* 'a' for simple, easy ... */
- struct llc_conn_ev_prim_if prim;
- struct llc_conn_ev_pdu_if pdu;
-};
-
struct llc_conn_state_ev {
- u8 type;
- u8 reason;
- u8 status;
- u8 flag;
- struct llc_prim_if_block *ind_prim;
- struct llc_prim_if_block *cfm_prim;
- union llc_conn_ev_if data;
+ u8 type;
+ u8 prim;
+ u8 prim_type;
+ u8 reason;
+ u8 status;
+ u8 ind_prim;
+ u8 cfm_prim;
};
static __inline__ struct llc_conn_state_ev *llc_conn_ev(struct sk_buff *skb)
diff --git a/include/net/llc_conn.h b/include/net/llc_conn.h
index ac0a2bb7aa22..140684e7d882 100644
--- a/include/net/llc_conn.h
+++ b/include/net/llc_conn.h
@@ -66,18 +66,10 @@ struct llc_opt {
u32 rx_pdu_hdr; /* used for saving header of last pdu
received and caused sending FRMR.
Used for resending FRMR */
-#ifdef DEBUG_LLC_CONN_ALLOC
- char *f_alloc, /* function that allocated this connection */
- *f_free; /* function that freed this connection */
- int l_alloc, /* line that allocated this connection */
- l_free; /* line that freed this connection */
-#endif
};
#define llc_sk(__sk) ((struct llc_opt *)(__sk)->protinfo)
-struct llc_conn_state_ev;
-
extern struct sock *llc_sk_alloc(int family, int priority);
extern void llc_sk_free(struct sock *sk);
@@ -100,6 +92,9 @@ extern struct sock *llc_lookup_established(struct llc_sap *sap,
struct llc_addr *laddr);
extern struct sock *llc_lookup_listener(struct llc_sap *sap,
struct llc_addr *laddr);
+extern struct sock *llc_lookup_dgram(struct llc_sap *sap,
+ struct llc_addr *laddr);
+extern void llc_save_primitive(struct sk_buff* skb, u8 prim);
extern u8 llc_data_accept_state(u8 state);
extern void llc_build_offset_table(void);
#endif /* LLC_CONN_H */
diff --git a/include/net/llc_evnt.h b/include/net/llc_evnt.h
index 82bca6d937d6..429adcb480e3 100644
--- a/include/net/llc_evnt.h
+++ b/include/net/llc_evnt.h
@@ -31,26 +31,12 @@
#define LLC_STATION_EV_RX_NULL_DSAP_TEST_C 8
#define LLC_STATION_EV_DISABLE_REQ 9
-/* Interfaces for various types of supported events */
-struct llc_stat_ev_simple_if {
- u8 ev;
-};
-
-struct llc_stat_ev_prim_if {
- u8 prim; /* connect, disconnect, reset, ... */
- u8 type; /* request, indicate, response, confirm */
-};
-
-union llc_stat_ev_if {
- struct llc_stat_ev_simple_if a; /* 'a' for simple, easy ... */
- struct llc_stat_ev_prim_if prim;
-};
-
struct llc_station_state_ev {
- u8 type;
- u8 reason;
- union llc_stat_ev_if data;
- struct list_head node; /* node in station->ev_q.list */
+ u8 type;
+ u8 prim;
+ u8 prim_type;
+ u8 reason;
+ struct list_head node; /* node in station->ev_q.list */
};
static __inline__ struct llc_station_state_ev *
diff --git a/include/net/llc_frame.h b/include/net/llc_frame.h
deleted file mode 100644
index e8fb198d19a8..000000000000
--- a/include/net/llc_frame.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* if_ether.h needed for definition of ETH_DATA_LEN and ETH_ALEN
- */
-#include "linux/if_ether.h"
-
-/* frame layout based on par3.2 "LLC PDU format"
- */
-typedef union { /* pdu layout from pages 40 & 44 */
- struct { /* general header, all pdu types */
- unsigned dsap : 8; /* dest service access point */
- unsigned ssap : 8; /* source service access point */
- unsigned f1 : 1; /* I- U- or S- format id bits */
- unsigned f2 : 1;
- unsigned : 6;
- unsigned : 8;
- } pdu_hdr;
- struct {
- char dummy1[2]; /* dsap + ssap */
- char byte1;
- char byte2;
- } pdu_cntl; /* unformatted control bytes */
- struct { /* header of an Information pdu */
- unsigned char dummy2[2];
- unsigned : 1;
- unsigned ns : 7;
- unsigned i_pflag : 1; /* poll/final bit */
- unsigned nr : 7; /* N(R) */
- unsigned char is_info[ ETH_DATA_LEN ];
- } i_hdr;
- struct { /* header of a Supervisory pdu */
- unsigned char dummy3[2];
- unsigned : 2;
- unsigned ss : 2; /* supervisory function bits */
- unsigned : 4;
- unsigned s_pflag : 1; /* poll/final bit */
- unsigned nr : 7; /* N(R) */
- } s_hdr;
-
-/* when accessing the P/F bit or the N(R) field there's no need to distinguish
- I pdus from S pdus i_pflag and s_pflag / i_nr and s_nr map to the same
- physical location.
- */
- struct { /* header of an Unnumbered pdu */
- unsigned char dummy4[2];
- unsigned : 2;
- unsigned mm1 : 2; /* modifier function part1 */
- unsigned u_pflag : 1; /* P/F for U- pdus */
- unsigned mm2 : 3; /* modifier function part2 */
- unsigned char u_info[ ETH_DATA_LEN-1];
- } u_hdr;
- struct { /* mm field in an Unnumbered pdu */
- unsigned char dummy5[2];
- unsigned : 2;
- unsigned mm : 6; /* must be masked to get ridd of P/F ! */
- } u_mm;
-
-} frame_type, *frameptr;
-
-/* frame format test macros: */
-
-#define IS_UFRAME( fr ) ( ( (fr)->pdu_hdr.f1) & ( (fr)->pdu_hdr.f2) )
-
-#define IS_IFRAME( fr ) ( !( (fr)->pdu_hdr.f1) )
-
-#define IS_SFRAME( fr ) ( ( (fr)->pdu_hdr.f1) & !( (fr)->pdu_hdr.f2) )
-
-#define IS_RSP( fr ) ( fr->pdu_hdr.ssap & 0x01 )
-
-
-/* The transition table, the _encode tables and some tests in the
- source code depend on the numeric order of these values.
- Think twice before changing.
- */
-
-/* frame names for TYPE 2 operation: */
-#define I_CMD 0
-#define RR_CMD 1
-#define RNR_CMD 2
-#define REJ_CMD 3
-#define DISC_CMD 4
-#define SABME_CMD 5
-#define I_RSP 6
-#define RR_RSP 7
-#define RNR_RSP 8
-#define REJ_RSP 9
-#define UA_RSP 10
-#define DM_RSP 11
-#define FRMR_RSP 12
-
-/* junk frame name: */
-#define BAD_FRAME 13
-#define NO_FRAME 13
-
-/* frame names for TYPE 1 operation: */
-#define UI_CMD 14
-#define XID_CMD 15
-#define TEST_CMD 16
-#define XID_RSP 17
-#define TEST_RSP 18
diff --git a/include/net/llc_if.h b/include/net/llc_if.h
index 5ae7edc13649..a72591707e20 100644
--- a/include/net/llc_if.h
+++ b/include/net/llc_if.h
@@ -17,17 +17,17 @@
#include <linux/if_arp.h>
#include <linux/llc.h>
-#define LLC_DATAUNIT_PRIM 0
-#define LLC_CONN_PRIM 1
-#define LLC_DATA_PRIM 2
-#define LLC_DISC_PRIM 3
-#define LLC_RESET_PRIM 4
-#define LLC_FLOWCONTROL_PRIM 5 /* Not supported at this time */
-#define LLC_DISABLE_PRIM 6
-#define LLC_XID_PRIM 7
-#define LLC_TEST_PRIM 8
-#define LLC_SAP_ACTIVATION 9
-#define LLC_SAP_DEACTIVATION 10
+#define LLC_DATAUNIT_PRIM 1
+#define LLC_CONN_PRIM 2
+#define LLC_DATA_PRIM 3
+#define LLC_DISC_PRIM 4
+#define LLC_RESET_PRIM 5
+#define LLC_FLOWCONTROL_PRIM 6 /* Not supported at this time */
+#define LLC_DISABLE_PRIM 7
+#define LLC_XID_PRIM 8
+#define LLC_TEST_PRIM 9
+#define LLC_SAP_ACTIVATION 10
+#define LLC_SAP_DEACTIVATION 11
#define LLC_NBR_PRIMITIVES 11
@@ -67,66 +67,22 @@ struct llc_addr {
u8 mac[IFHWADDRLEN];
};
-struct llc_prim_reset {
- struct sock *sk;
- u16 link;
-};
-
- /* Sending data in conection-less mode */
-struct llc_prim_unit_data {
- struct llc_addr saddr;
- struct llc_addr daddr;
- u8 pri;
- struct sk_buff *skb; /* pointer to frame */
- u8 lfb; /* largest frame bit (TR) */
-};
-
-struct llc_prim_xid {
- struct llc_addr saddr;
- struct llc_addr daddr;
- u8 pri;
- struct sk_buff *skb;
-};
-
-struct llc_prim_test {
- struct llc_addr saddr;
- struct llc_addr daddr;
- u8 pri;
- struct sk_buff *skb; /* pointer to frame */
-};
-
-union llc_u_prim_data {
- struct llc_prim_reset res;
- struct llc_prim_unit_data udata; /* unit data */
- struct llc_prim_xid xid;
- struct llc_prim_test test;
-};
-
struct llc_sap;
-/* Information block passed with all called primitives */
-struct llc_prim_if_block {
- struct llc_sap *sap;
- u8 prim;
- union llc_u_prim_data *data;
-};
-typedef int (*llc_prim_call_t)(struct llc_prim_if_block *prim_if);
-
-extern struct llc_sap *llc_sap_open(llc_prim_call_t network_indicate,
- llc_prim_call_t network_confirm, u8 lsap);
+extern struct llc_sap *llc_sap_open(u8 lsap,
+ int (*func)(struct sk_buff *skb,
+ struct net_device *dev,
+ struct packet_type *pt));
extern void llc_sap_close(struct llc_sap *sap);
extern int llc_establish_connection(struct sock *sk, u8 *lmac,
u8 *dmac, u8 dsap);
extern int llc_build_and_send_pkt(struct sock *sk, struct sk_buff *skb);
-extern void llc_build_and_send_ui_pkt(struct llc_sap *sap,
- struct sk_buff *skb,
+extern void llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb,
u8 *dmac, u8 dsap);
-extern void llc_build_and_send_xid_pkt(struct llc_sap *sap,
- struct sk_buff *skb,
+extern void llc_build_and_send_xid_pkt(struct llc_sap *sap, struct sk_buff *skb,
u8 *dmac, u8 dsap);
-extern void llc_build_and_send_test_pkt(struct llc_sap *sap,
- struct sk_buff *skb,
+extern void llc_build_and_send_test_pkt(struct llc_sap *sap, struct sk_buff *skb,
u8 *dmac, u8 dsap);
extern int llc_send_disc(struct sock *sk);
#endif /* LLC_IF_H */
diff --git a/include/net/llc_main.h b/include/net/llc_main.h
index 25d486278da4..434e86044dec 100644
--- a/include/net/llc_main.h
+++ b/include/net/llc_main.h
@@ -43,7 +43,7 @@ struct llc_station {
u8 maximum_retry;
u8 mac_sa[6];
struct {
- spinlock_t lock;
+ rwlock_t lock;
struct list_head list;
} sap_list;
struct {
@@ -52,7 +52,6 @@ struct llc_station {
} ev_q;
struct sk_buff_head mac_pdu_q;
};
-struct llc_station_state_ev;
extern struct llc_sap *llc_sap_alloc(void);
extern void llc_sap_save(struct llc_sap *sap);
diff --git a/include/net/llc_name.h b/include/net/llc_name.h
deleted file mode 100644
index 72128719f7cc..000000000000
--- a/include/net/llc_name.h
+++ /dev/null
@@ -1,7 +0,0 @@
-char *frame_names[] =
- {"I_CMD","RR_CMD","RNR_CMD","REJ_CMD","DISC_CMD",
- "SABME_CMD","I_RSP","RR_RSP","RNR_RSP","REJ_RSP",
- "UA_RSP","DM_RSP","FRMR_RSP","BAD_FRAME","UI_CMD",
- "XID_CMD","TEST_CMD","XID_RSP","TEST_RSP"
-};
-
diff --git a/include/net/llc_s_ev.h b/include/net/llc_s_ev.h
index 530042ae2be4..e3acb9329e4a 100644
--- a/include/net/llc_s_ev.h
+++ b/include/net/llc_s_ev.h
@@ -34,37 +34,14 @@
#define LLC_SAP_EV_RX_TEST_R 9
#define LLC_SAP_EV_DEACTIVATION_REQ 10
-/* Interfaces for various types of supported events */
-struct llc_sap_ev_simple_if {
- u8 ev;
-};
-
-struct llc_prim_if_block;
-
-struct llc_sap_ev_prim_if {
- u8 prim; /* connect, disconnect, reset, ... */
- u8 type; /* request, indicate, response, conf */
- struct llc_prim_if_block *data;
-};
-
-struct llc_sap_ev_pdu_if {
- u8 ev;
-};
-
-union llc_sap_ev_if {
- struct llc_sap_ev_simple_if a; /* 'a' for simple, easy ... */
- struct llc_sap_ev_prim_if prim;
- struct llc_sap_ev_pdu_if pdu;
-};
-
-struct llc_prim_if_block;
-
struct llc_sap_state_ev {
- u8 type;
- u8 reason;
- u8 ind_cfm_flag;
- struct llc_prim_if_block *prim;
- union llc_sap_ev_if data;
+ u8 prim;
+ u8 prim_type;
+ u8 type;
+ u8 reason;
+ u8 ind_cfm_flag;
+ struct llc_addr saddr;
+ struct llc_addr daddr;
};
static __inline__ struct llc_sap_state_ev *llc_sap_ev(struct sk_buff *skb)
diff --git a/include/net/llc_sap.h b/include/net/llc_sap.h
index 412798ab6c0e..645e52759b36 100644
--- a/include/net/llc_sap.h
+++ b/include/net/llc_sap.h
@@ -12,36 +12,33 @@
* See the GNU General Public License for more details.
*/
#include <linux/skbuff.h>
+#include <net/llc_if.h>
/**
* struct llc_sap - Defines the SAP component
*
+ * @station - station this sap belongs to
+ * @state - sap state
* @p_bit - only lowest-order bit used
* @f_bit - only lowest-order bit used
- * @ind - provided by network layer
- * @conf - provided by network layer
* @laddr - SAP value in this 'lsap'
* @node - entry in station sap_list
* @sk_list - LLC sockets this one manages
- * @mac_pdu_q - PDUs ready to send to MAC
*/
struct llc_sap {
- struct llc_station *parent_station;
- u8 state;
- u8 p_bit;
- u8 f_bit;
- llc_prim_call_t ind;
- llc_prim_call_t conf;
- struct llc_prim_if_block llc_ind_prim, llc_cfm_prim;
- union llc_u_prim_data llc_ind_data_prim, llc_cfm_data_prim;
- struct llc_addr laddr;
- struct list_head node;
+ struct llc_station *station;
+ u8 state;
+ u8 p_bit;
+ u8 f_bit;
+ int (*rcv_func)(struct sk_buff *skb,
+ struct net_device *dev,
+ struct packet_type *pt);
+ struct llc_addr laddr;
+ struct list_head node;
struct {
- spinlock_t lock;
- struct list_head list;
+ rwlock_t lock;
+ struct sock *list;
} sk_list;
- struct sk_buff_head mac_pdu_q;
};
-struct llc_sap_state_ev;
extern void llc_sap_assign_sock(struct llc_sap *sap, struct sock *sk);
extern void llc_sap_unassign_sock(struct llc_sap *sap, struct sock *sk);
diff --git a/include/net/llc_state.h b/include/net/llc_state.h
deleted file mode 100644
index bb18e9bd1ac8..000000000000
--- a/include/net/llc_state.h
+++ /dev/null
@@ -1,4 +0,0 @@
-char *state_names[] = {
- "ADM","CONN","RESET_WAIT","RESET_CHECK","SETUP",
- "RESET","D_CONN","ERROR","NORMAL"
-};
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 407268c78def..8748b657ee13 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -51,6 +51,25 @@ struct ra_msg {
__u32 retrans_timer;
};
+struct nd_opt_hdr {
+ __u8 nd_opt_type;
+ __u8 nd_opt_len;
+} __attribute__((__packed__));
+
+struct ndisc_options {
+ struct nd_opt_hdr *nd_opt_array[7];
+ struct nd_opt_hdr *nd_opt_piend;
+};
+
+#define nd_opts_src_lladdr nd_opt_array[ND_OPT_SOURCE_LL_ADDR]
+#define nd_opts_tgt_lladdr nd_opt_array[ND_OPT_TARGET_LL_ADDR]
+#define nd_opts_pi nd_opt_array[ND_OPT_PREFIX_INFO]
+#define nd_opts_pi_end nd_opt_piend
+#define nd_opts_rh nd_opt_array[ND_OPT_REDIRECT_HDR]
+#define nd_opts_mtu nd_opt_array[ND_OPT_MTU]
+
+extern struct nd_opt_hdr *ndisc_next_option(struct nd_opt_hdr *cur, struct nd_opt_hdr *end);
+extern struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len, struct ndisc_options *ndopts);
extern int ndisc_init(struct net_proto_family *ops);
diff --git a/include/net/p8022.h b/include/net/p8022.h
index 443932810d46..3c99a86c3581 100644
--- a/include/net/p8022.h
+++ b/include/net/p8022.h
@@ -1,9 +1,10 @@
#ifndef _NET_P8022_H
#define _NET_P8022_H
-#include <net/llc_if.h>
-
-extern struct datalink_proto *register_8022_client(unsigned char type,
- int (*indicate)(struct llc_prim_if_block *prim));
+extern struct datalink_proto *
+ register_8022_client(unsigned char type,
+ int (*func)(struct sk_buff *skb,
+ struct net_device *dev,
+ struct packet_type *pt));
extern void unregister_8022_client(struct datalink_proto *proto);
#endif
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index f187be387f1c..90a7ba3cb29f 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -112,6 +112,7 @@ typedef enum {
SCTP_EVENT_TIMEOUT_T2_SHUTDOWN,
SCTP_EVENT_TIMEOUT_T3_RTX,
SCTP_EVENT_TIMEOUT_T4_RTO,
+ SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD,
SCTP_EVENT_TIMEOUT_HEARTBEAT,
SCTP_EVENT_TIMEOUT_SACK,
SCTP_EVENT_TIMEOUT_AUTOCLOSE,
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 2c7b3c0b6534..d45cdd15f939 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -114,7 +114,8 @@ extern sctp_protocol_t sctp_proto;
extern struct sock *sctp_get_ctl_sock(void);
extern int sctp_copy_local_addr_list(sctp_protocol_t *, sctp_bind_addr_t *,
sctp_scope_t, int priority, int flags);
-
+extern sctp_pf_t *sctp_get_pf_specific(int family);
+extern void sctp_set_pf_specific(int family, sctp_pf_t *);
/*
* sctp_socket.c
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 27c055ecc5c4..5cb4858fac34 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -107,6 +107,9 @@ sctp_state_fn_t sctp_sf_timer_ignore;
sctp_state_fn_t sctp_sf_do_9_1_abort;
sctp_state_fn_t sctp_sf_cookie_wait_abort;
sctp_state_fn_t sctp_sf_cookie_echoed_abort;
+sctp_state_fn_t sctp_sf_shutdown_pending_abort;
+sctp_state_fn_t sctp_sf_shutdown_sent_abort;
+sctp_state_fn_t sctp_sf_shutdown_ack_sent_abort;
sctp_state_fn_t sctp_sf_do_5_1B_init;
sctp_state_fn_t sctp_sf_do_5_1C_ack;
sctp_state_fn_t sctp_sf_do_5_1D_ce;
@@ -119,6 +122,7 @@ sctp_state_fn_t sctp_sf_tabort_8_4_8;
sctp_state_fn_t sctp_sf_operr_notify;
sctp_state_fn_t sctp_sf_t1_timer_expire;
sctp_state_fn_t sctp_sf_t2_timer_expire;
+sctp_state_fn_t sctp_sf_t5_timer_expire;
sctp_state_fn_t sctp_sf_sendbeat_8_3;
sctp_state_fn_t sctp_sf_beat_8_3;
sctp_state_fn_t sctp_sf_backbeat_8_3;
@@ -134,6 +138,7 @@ sctp_state_fn_t sctp_sf_discard_chunk;
sctp_state_fn_t sctp_sf_do_5_2_1_siminit;
sctp_state_fn_t sctp_sf_do_5_2_2_dupinit;
sctp_state_fn_t sctp_sf_do_5_2_4_dupcook;
+sctp_state_fn_t sctp_sf_unk_chunk;
/* Prototypes for primitive event state functions. */
sctp_state_fn_t sctp_sf_do_prm_asoc;
@@ -144,6 +149,9 @@ sctp_state_fn_t sctp_sf_cookie_echoed_prm_shutdown;
sctp_state_fn_t sctp_sf_do_9_1_prm_abort;
sctp_state_fn_t sctp_sf_cookie_wait_prm_abort;
sctp_state_fn_t sctp_sf_cookie_echoed_prm_abort;
+sctp_state_fn_t sctp_sf_shutdown_pending_prm_abort;
+sctp_state_fn_t sctp_sf_shutdown_sent_prm_abort;
+sctp_state_fn_t sctp_sf_shutdown_ack_sent_prm_abort;
sctp_state_fn_t sctp_sf_error_closed;
sctp_state_fn_t sctp_sf_error_shutdown;
sctp_state_fn_t sctp_sf_ignore_primitive;
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 4f600a419d08..69f99bba1d9b 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -255,6 +255,12 @@ typedef struct sctp_func {
sctp_func_t *sctp_get_af_specific(const sockaddr_storage_t *address);
+/* Protocol family functions. */
+typedef struct sctp_pf {
+ void (*event_msgname)(sctp_ulpevent_t *, char *, int *);
+ void (*skb_msgname)(struct sk_buff *, char *, int *);
+} sctp_pf_t;
+
/* SCTP Socket type: UDP or TCP style. */
typedef enum {
SCTP_SOCKET_UDP = 0,
@@ -280,6 +286,7 @@ struct sctp_opt {
__u32 autoclose;
__u8 nodelay;
__u8 disable_fragments;
+ sctp_pf_t *pf;
};
@@ -845,6 +852,7 @@ int sctp_outqueue_set_output_handlers(sctp_outqueue_t *,
sctp_outqueue_ohandler_force_t force);
void sctp_outqueue_restart(sctp_outqueue_t *);
void sctp_retransmit(sctp_outqueue_t *, sctp_transport_t *, __u8);
+void sctp_retransmit_mark(sctp_outqueue_t *, sctp_transport_t *, __u8);
/* These bind address data fields common between endpoints and associations */
@@ -1128,6 +1136,11 @@ struct SCTP_association {
*/
sctp_transport_t *primary_path;
+ /* Cache the primary path address here, when we
+ * need a an address for msg_name.
+ */
+ sockaddr_storage_t primary_addr;
+
/* active_path
* The path that we are currently using to
* transmit new data and most control chunks.
@@ -1183,7 +1196,7 @@ struct SCTP_association {
int next_dup_tsn;
/* Do we need to sack the peer? */
- int sack_needed;
+ uint8_t sack_needed;
/* These are capabilities which our peer advertised. */
__u8 ecn_capable; /* Can peer do ECN? */
diff --git a/include/net/x25.h b/include/net/x25.h
index 4d5c3a84e9dc..82fbb74f1765 100644
--- a/include/net/x25.h
+++ b/include/net/x25.h
@@ -103,9 +103,9 @@ enum {
struct x25_route {
struct x25_route *next;
- x25_address address; /* Start of address range */
+ struct x25_address address; /* Start of address range */
unsigned int sigdigits; /* Number of sig digits */
- struct net_device *dev; /* More than one for MLP */
+ struct net_device *dev; /* More than one for MLP */
};
struct x25_neigh {
@@ -120,7 +120,7 @@ struct x25_neigh {
};
typedef struct {
- x25_address source_addr, dest_addr;
+ struct x25_address source_addr, dest_addr;
struct x25_neigh *neighbour;
unsigned int lci;
unsigned char state, condition, qbitincl, intflag;
@@ -148,8 +148,10 @@ extern int sysctl_x25_reset_request_timeout;
extern int sysctl_x25_clear_request_timeout;
extern int sysctl_x25_ack_holdback_timeout;
-extern int x25_addr_ntoa(unsigned char *, x25_address *, x25_address *);
-extern int x25_addr_aton(unsigned char *, x25_address *, x25_address *);
+extern int x25_addr_ntoa(unsigned char *, struct x25_address *,
+ struct x25_address *);
+extern int x25_addr_aton(unsigned char *, struct x25_address *,
+ struct x25_address *);
extern unsigned int x25_new_lci(struct x25_neigh *);
extern struct sock *x25_find_socket(unsigned int, struct x25_neigh *);
extern void x25_destroy_socket(struct sock *);
@@ -194,7 +196,7 @@ extern void x25_kick(struct sock *);
extern void x25_enquiry_response(struct sock *);
/* x25_route.c */
-extern struct net_device *x25_get_route(x25_address *);
+extern struct net_device *x25_get_route(struct x25_address *);
extern struct net_device *x25_dev_get(char *);
extern void x25_route_device_down(struct net_device *);
extern int x25_route_ioctl(unsigned int, void *);