diff options
| author | Sridhar Samudrala <sridhar@dyn9-47-18-140.beaverton.ibm.com> | 2002-12-09 23:38:17 -0800 |
|---|---|---|
| committer | Sridhar Samudrala <sridhar@dyn9-47-18-140.beaverton.ibm.com> | 2002-12-09 23:38:17 -0800 |
| commit | d12add250df948e7e24068a62ba729daf4073ace (patch) | |
| tree | 68dc47fbc0e5e8181216ecd0c46d3711dfc38b0f /include/net | |
| parent | 8b4ad80b8236a20584f7956ff42c7a3bdf1d018e (diff) | |
| parent | 8051ff93f063e1fc5808c72d5f49087f8c2eefe5 (diff) | |
Merge dyn9-47-18-140.beaverton.ibm.com:/home/sridhar/BK/linux-2.5.51
into dyn9-47-18-140.beaverton.ibm.com:/home/sridhar/BK/lksctp-2.5.51
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/sctp/sctp.h | 4 | ||||
| -rw-r--r-- | include/net/sctp/sm.h | 13 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 26 |
3 files changed, 30 insertions, 13 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 73c948813e72..f12e54cd4919 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -123,8 +123,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 *); +extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family); +extern int sctp_register_pf(struct sctp_pf *, sa_family_t); /* * sctp_socket.c diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index e811bf37e4ca..68af144ef56c 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h @@ -140,6 +140,8 @@ 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; sctp_state_fn_t sctp_sf_do_8_5_1_E_sa; +sctp_state_fn_t sctp_sf_cookie_echoed_err; +sctp_state_fn_t sctp_sf_do_5_2_6_stale; /* Prototypes for primitive event state functions. */ sctp_state_fn_t sctp_sf_do_prm_asoc; @@ -175,7 +177,6 @@ sctp_state_fn_t sctp_sf_autoclose_timer_expire; */ /* Prototypes for chunk state functions. Not in use. */ -sctp_state_fn_t sctp_sf_do_5_2_6_stale; sctp_state_fn_t sctp_sf_do_9_2_reshutack; sctp_state_fn_t sctp_sf_do_9_2_reshut; sctp_state_fn_t sctp_sf_do_9_2_shutack; @@ -211,7 +212,7 @@ void sctp_populate_tie_tags(__u8 *cookie, __u32 curTag, __u32 hisTag); /* Prototypes for chunk-building functions. */ sctp_chunk_t *sctp_make_init(const sctp_association_t *, const sctp_bind_addr_t *, - int priority); + int priority, int vparam_len); sctp_chunk_t *sctp_make_init_ack(const sctp_association_t *, const sctp_chunk_t *, const int priority, @@ -322,9 +323,15 @@ sctp_pack_cookie(const sctp_endpoint_t *, const sctp_association_t *, const __u8 *, int addrs_len); sctp_association_t *sctp_unpack_cookie(const sctp_endpoint_t *, const sctp_association_t *, - sctp_chunk_t *, int priority, int *err); + sctp_chunk_t *, int priority, int *err, + sctp_chunk_t **err_chk_p); int sctp_addip_addr_config(sctp_association_t *, sctp_param_t, struct sockaddr_storage*, int); +void sctp_send_stale_cookie_err(const sctp_endpoint_t *ep, + const sctp_association_t *asoc, + const sctp_chunk_t *chunk, + sctp_cmd_seq_t *commands, + sctp_chunk_t *err_chunk); /* 3rd level prototypes */ __u32 sctp_generate_tag(const sctp_endpoint_t *); diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index d7b5674bdbdc..fc4a3f1a3b4c 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -42,6 +42,7 @@ * Sridhar Samudrala <sri@us.ibm.com> * Daisy Chang <daisyc@us.ibm.com> * Dajiang Zhang <dajiang.zhang@nokia.com> + * Ardelle Fan <ardelle.fan@intel.com> * * Any bugs reported given to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. @@ -182,6 +183,9 @@ struct SCTP_protocol { /* Valid.Cookie.Life - 60 seconds */ int valid_cookie_life; + + /* Whether Cookie Preservative is enabled(1) or not(0) */ + int cookie_preserve_enable; /* Association.Max.Retrans - 10 attempts * Path.Max.Retrans - 5 attempts (per destination address) @@ -234,7 +238,7 @@ struct SCTP_protocol { * Pointers to address related SCTP functions. * (i.e. things that depend on the address family.) */ -typedef struct sctp_func { +struct sctp_af { int (*queue_xmit) (struct sk_buff *skb); int (*setsockopt) (struct sock *sk, int level, @@ -259,27 +263,34 @@ typedef struct sctp_func { void (*from_skb) (union sctp_addr *, struct sk_buff *skb, int saddr); + void (*from_sk) (union sctp_addr *, + struct sock *sk); + void (*to_sk) (union sctp_addr *, + struct sock *sk); int (*addr_valid) (union sctp_addr *); sctp_scope_t (*scope) (union sctp_addr *); void (*inaddr_any) (union sctp_addr *, unsigned short); int (*is_any) (const union sctp_addr *); + int (*available) (const union sctp_addr *); __u16 net_header_len; int sockaddr_len; sa_family_t sa_family; struct list_head list; -} sctp_func_t; +}; -sctp_func_t *sctp_get_af_specific(sa_family_t); +struct sctp_af *sctp_get_af_specific(sa_family_t); +int sctp_register_af(struct sctp_af *); /* Protocol family functions. */ typedef struct sctp_pf { void (*event_msgname)(sctp_ulpevent_t *, char *, int *); - void (*skb_msgname)(struct sk_buff *, char *, int *); - int (*af_supported)(sa_family_t); + void (*skb_msgname) (struct sk_buff *, char *, int *); + int (*af_supported) (sa_family_t); int (*cmp_addr) (const union sctp_addr *, const union sctp_addr *, struct sctp_opt *); - struct sctp_func *af; + int (*bind_verify) (struct sctp_opt *, union sctp_addr *); + struct sctp_af *af; } sctp_pf_t; /* SCTP Socket type: UDP or TCP style. */ @@ -623,7 +634,7 @@ struct SCTP_transport { union sctp_addr ipaddr; /* These are the functions we call to handle LLP stuff. */ - sctp_func_t *af_specific; + struct sctp_af *af_specific; /* Which association do we belong to? */ sctp_association_t *asoc; @@ -1271,7 +1282,6 @@ struct SCTP_association { /* The cookie life I award for any cookie. */ struct timeval cookie_life; - __u32 cookie_preserve; /* Overall : The overall association error count. * Error Count : [Clear this any time I get something.] |
