summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2002-11-17 23:06:20 -0800
committerDavid S. Miller <davem@nuts.ninka.net>2002-11-17 23:06:20 -0800
commitf7f9e054603fe09a19f724c70cda67ff152f7e4e (patch)
tree452e732d3a23f029285a957b01c8a805688ca0e9 /include/net
parent175ceea9af88cc3a051e97cddeb77e8df792bb91 (diff)
parentd7dceb58007dadca1b38c5d8a6431708d138a16c (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/net')
-rw-r--r--include/net/sctp/command.h3
-rw-r--r--include/net/sctp/sctp.h81
-rw-r--r--include/net/sctp/sm.h10
-rw-r--r--include/net/sctp/structs.h218
4 files changed, 178 insertions, 134 deletions
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h
index d299eee377c1..b1fba0151675 100644
--- a/include/net/sctp/command.h
+++ b/include/net/sctp/command.h
@@ -27,6 +27,7 @@
*
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
+ * 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.
@@ -72,6 +73,7 @@ typedef enum {
SCTP_CMD_STRIKE, /* Mark a strike against a transport. */
SCTP_CMD_TRANSMIT, /* Transmit the outqueue. */
SCTP_CMD_HB_TIMERS_START, /* Start the heartbeat timers. */
+ SCTP_CMD_HB_TIMERS_UPDATE, /* Update the heartbeat timers. */
SCTP_CMD_TRANSPORT_RESET, /* Reset the status of a transport. */
SCTP_CMD_TRANSPORT_ON, /* Mark the transport as active. */
SCTP_CMD_REPORT_ERROR, /* Pass this error back out of the sm. */
@@ -83,6 +85,7 @@ typedef enum {
SCTP_CMD_UPDATE_ASSOC, /* Update association information. */
SCTP_CMD_PURGE_OUTQUEUE, /* Purge all data waiting to be sent. */
SCTP_CMD_SETUP_T2, /* Hi-level, setup T2-shutdown parms. */
+ SCTP_CMD_RTO_PENDING, /* Set transport's rto_pending. */
SCTP_CMD_LAST
} sctp_verb_t;
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 9997455f9a74..73c948813e72 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -1,43 +1,43 @@
/* SCTP kernel reference Implementation
* Copyright (c) 1999-2000 Cisco, Inc.
* Copyright (c) 1999-2001 Motorola, Inc.
- * Copyright (c) 2001 International Business Machines, Corp.
+ * Copyright (c) 2001-2002 International Business Machines, Corp.
* Copyright (c) 2001 Intel Corp.
- *
+ *
* This file is part of the SCTP kernel reference Implementation
- *
- * The base lksctp header.
- *
- * The SCTP reference implementation is free software;
- * you can redistribute it and/or modify it under the terms of
+ *
+ * The base lksctp header.
+ *
+ * The SCTP reference implementation is free software;
+ * you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
- * The SCTP reference implementation is distributed in the hope that it
+ *
+ * The SCTP reference implementation is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* ************************
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU CC; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
+ * Boston, MA 02111-1307, USA.
+ *
* Please send any bug reports or fixes you make to the
* email address(es):
* lksctp developers <lksctp-developers@lists.sourceforge.net>
- *
+ *
* Or submit a bug report through the following website:
* http://www.sf.net/projects/lksctp
*
- * Written or modified by:
+ * Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org>
* Xingang Guo <xingang.guo@intel.com>
* Jon Grimm <jgrimm@us.ibm.com>
* Daisy Chang <daisyc@us.ibm.com>
- *
+ *
* Any bugs reported given to us we will try to fix... any fixes shared will
* be incorporated into the next SCTP release.
*/
@@ -52,10 +52,10 @@
* structs
* prototypes
* macros, externs, and inlines
- *
- * Move test_frame specific items out of the kernel headers
+ *
+ * Move test_frame specific items out of the kernel headers
* and into the test frame headers. This is not perfect in any sense
- * and will continue to evolve.
+ * and will continue to evolve.
*/
@@ -78,7 +78,7 @@
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
#include <net/ipv6.h>
#include <net/ip6_route.h>
-#endif
+#endif
#include <asm/uaccess.h>
#include <asm/page.h>
@@ -105,19 +105,19 @@
#endif
-/* Certain internal static functions need to be exported when
+/* Certain internal static functions need to be exported when
* compiled into the test frame.
*/
#ifndef SCTP_STATIC
#define SCTP_STATIC static
#endif
-/*
- * Function declarations.
+/*
+ * Function declarations.
*/
/*
- * sctp_protocol.c
+ * sctp_protocol.c
*/
extern sctp_protocol_t sctp_proto;
extern struct sock *sctp_get_ctl_sock(void);
@@ -142,7 +142,7 @@ extern int sctp_primitive_ASSOCIATE(sctp_association_t *, void *arg);
extern int sctp_primitive_SHUTDOWN(sctp_association_t *, void *arg);
extern int sctp_primitive_ABORT(sctp_association_t *, void *arg);
extern int sctp_primitive_SEND(sctp_association_t *, void *arg);
-
+extern int sctp_primitive_REQUESTHEARTBEAT(sctp_association_t *, void *arg);
/*
* sctp_crc32c.c
@@ -418,6 +418,19 @@ static inline size_t get_user_iov_size(struct iovec *iov, int iovlen)
return retval;
}
+/* Walk through a list of TLV parameters. Don't trust the
+ * individual parameter lengths and instead depend on
+ * the chunk length to indicate when to stop. Make sure
+ * there is room for a param header too.
+ */
+#define sctp_walk_params(pos, chunk, member)\
+_sctp_walk_params((pos), (chunk), ntohs((chunk)->chunk_hdr.length), member)
+
+#define _sctp_walk_params(pos, chunk, end, member)\
+for (pos.v = chunk->member;\
+ pos.v <= (void *)chunk + end - sizeof(sctp_paramhdr_t) &&\
+ pos.v <= (void *)chunk + end - WORD_ROUND(ntohs(pos.p->length)); \
+ pos.v += WORD_ROUND(ntohs(pos.p->length)))
/* Round an int up to the next multiple of 4. */
#define WORD_ROUND(s) (((s)+3)&~3)
@@ -460,6 +473,26 @@ static inline sctp_protocol_t *sctp_get_protocol(void)
return &sctp_proto;
}
+/* Convert from an IP version number to an Address Family symbol. */
+static inline int ipver2af(__u8 ipver)
+{
+ int family;
+
+ switch (ipver) {
+ case 4:
+ family = AF_INET;
+ break;
+ case 6:
+ family = AF_INET6;
+ break;
+ default:
+ family = 0;
+ break;
+ };
+
+ return family;
+}
+
/* Warning: The following hash functions assume a power of two 'size'. */
/* This is the hash function for the SCTP port hash table. */
static inline int sctp_phashfn(__u16 lport)
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index cc0763c831d3..e811bf37e4ca 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -156,6 +156,7 @@ 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;
+sctp_state_fn_t sctp_sf_do_prm_requestheartbeat;
/* Prototypes for other event state functions. */
sctp_state_fn_t sctp_sf_do_9_2_start_shutdown;
@@ -205,9 +206,6 @@ sctp_association_t *sctp_make_temp_asoc(const sctp_endpoint_t *,
sctp_chunk_t *,
const int priority);
__u32 sctp_generate_verification_tag(void);
-sctpParam_t sctp_get_my_addrs_raw(const sctp_association_t *,
- const int priority, int *addrs_len);
-
void sctp_populate_tie_tags(__u8 *cookie, __u32 curTag, __u32 hisTag);
/* Prototypes for chunk-building functions. */
@@ -333,10 +331,10 @@ __u32 sctp_generate_tag(const sctp_endpoint_t *);
__u32 sctp_generate_tsn(const sctp_endpoint_t *);
/* 4th level prototypes */
-void sctp_param2sockaddr(sockaddr_storage_t *addr, sctp_addr_param_t *,
+void sctp_param2sockaddr(union sctp_addr *addr, sctp_addr_param_t *,
__u16 port);
-int sctp_addr2sockaddr(const sctpParam_t, sockaddr_storage_t *);
-int sockaddr2sctp_addr(const sockaddr_storage_t *, sctp_addr_param_t *);
+int sctp_addr2sockaddr(const union sctp_params, union sctp_addr *);
+int sockaddr2sctp_addr(const union sctp_addr *, sctp_addr_param_t *);
/* Extern declarations for major data structures. */
sctp_sm_table_entry_t *sctp_chunk_event_lookup(sctp_cid_t, sctp_state_t);
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 9c3979f31d1f..d7b5674bdbdc 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -2,35 +2,35 @@
* Copyright (c) 1999-2000 Cisco, Inc.
* Copyright (c) 1999-2001 Motorola, Inc.
* Copyright (c) 2001 Intel Corp.
- * Copyright (c) 2001 International Business Machines Corp.
- *
+ * Copyright (c) 2001-2002 International Business Machines Corp.
+ *
* This file is part of the SCTP kernel reference Implementation
- *
- * The SCTP reference implementation is free software;
- * you can redistribute it and/or modify it under the terms of
+ *
+ * The SCTP reference implementation is free software;
+ * you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
- * The SCTP reference implementation is distributed in the hope that it
+ *
+ * The SCTP reference implementation is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* ************************
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU CC; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
+ * Boston, MA 02111-1307, USA.
+ *
* Please send any bug reports or fixes you make to the
* email addresses:
* lksctp developers <lksctp-developers@lists.sourceforge.net>
- *
+ *
* Or submit a bug report through the following website:
* http://www.sf.net/projects/lksctp
*
- * Written or modified by:
+ * Written or modified by:
* Randall Stewart <randall@sctp.chicago.il.us>
* Ken Morneau <kmorneau@cisco.com>
* Qiaobing Xie <qxie1@email.mot.com>
@@ -41,8 +41,8 @@
* Hui Huang <hui.huang@nokia.com>
* Sridhar Samudrala <sri@us.ibm.com>
* Daisy Chang <daisyc@us.ibm.com>
- * Dajiang Zhang <dajiang.zhang@nokia.com>
- *
+ * Dajiang Zhang <dajiang.zhang@nokia.com>
+ *
* Any bugs reported given to us we will try to fix... any fixes shared will
* be incorporated into the next SCTP release.
*/
@@ -95,11 +95,11 @@ struct sockaddr_storage {
/* A convenience structure for handling sockaddr structures.
* We should wean ourselves off this.
*/
-typedef union {
+union sctp_addr {
struct sockaddr_in v4;
struct sockaddr_in6 v6;
struct sockaddr sa;
-} sockaddr_storage_t;
+};
/* Forward declarations for data structures. */
@@ -246,29 +246,47 @@ typedef struct sctp_func {
int optname,
char *optval,
int *optlen);
- struct dst_entry *(*get_dst) (sockaddr_storage_t *daddr,
- sockaddr_storage_t *saddr);
- int (*cmp_saddr) (struct dst_entry *dst,
- sockaddr_storage_t *saddr);
- __u16 net_header_len;
+ struct dst_entry *(*get_dst) (union sctp_addr *daddr,
+ union sctp_addr *saddr);
+ void (*copy_addrlist) (struct list_head *,
+ struct net_device *);
+ void (*dst_saddr) (union sctp_addr *saddr,
+ struct dst_entry *dst);
+ int (*cmp_addr) (const union sctp_addr *addr1,
+ const union sctp_addr *addr2);
+ void (*addr_copy) (union sctp_addr *dst,
+ union sctp_addr *src);
+ void (*from_skb) (union sctp_addr *,
+ struct sk_buff *skb,
+ int saddr);
+ 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 *);
+ __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(const sockaddr_storage_t *address);
+sctp_func_t *sctp_get_af_specific(sa_family_t);
/* 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);
+ int (*cmp_addr) (const union sctp_addr *,
+ const union sctp_addr *,
+ struct sctp_opt *);
+ struct sctp_func *af;
} sctp_pf_t;
/* SCTP Socket type: UDP or TCP style. */
typedef enum {
SCTP_SOCKET_UDP = 0,
- SCTP_SOCKET_UDP_HIGH_BANDWIDTH,
- SCTP_SOCKET_TCP
+ SCTP_SOCKET_UDP_HIGH_BANDWIDTH,
+ SCTP_SOCKET_TCP
} sctp_socket_type_t;
/* Per socket SCTP information. */
@@ -339,7 +357,7 @@ typedef struct sctp_cookie {
__u32 initial_tsn;
/* This holds the originating address of the INIT packet. */
- sockaddr_storage_t peer_addr;
+ union sctp_addr peer_addr;
/* This is a shim for my peer's INIT packet, followed by
* a copy of the raw address list of the association.
@@ -359,20 +377,6 @@ typedef struct sctp_signed_cookie {
} sctp_signed_cookie_t;
-/* This convenience type allows us to avoid casting when walking
- * through a parameter list.
- */
-typedef union {
- __u8 *v;
- sctp_paramhdr_t *p;
-
- sctp_cookie_preserve_param_t *bht;
- sctp_hostname_param_t *dns;
- sctp_cookie_param_t *cookie;
- sctp_supported_addrs_param_t *sat;
- sctp_ipv4addr_param_t *v4;
- sctp_ipv6addr_param_t *v6;
-} sctpParam_t;
/* This is another convenience type to allocate memory for address
* params for the maximum size and pass such structures around
@@ -383,6 +387,21 @@ typedef union {
sctp_ipv6addr_param_t v6;
} sctp_addr_param_t;
+/* A convenience type to allow walking through the various
+ * parameters and avoid casting all over the place.
+ */
+union sctp_params {
+ void *v;
+ sctp_paramhdr_t *p;
+ sctp_cookie_preserve_param_t *life;
+ sctp_hostname_param_t *dns;
+ sctp_cookie_param_t *cookie;
+ sctp_supported_addrs_param_t *sat;
+ sctp_ipv4addr_param_t *v4;
+ sctp_ipv6addr_param_t *v6;
+ sctp_addr_param_t *addr;
+};
+
/* RFC 2960. Section 3.3.5 Heartbeat.
* Heartbeat Information: variable length
* The Sender-specific Heartbeat Info field should normally include
@@ -392,7 +411,7 @@ typedef union {
*/
typedef struct sctp_sender_hb_info {
sctp_paramhdr_t param_hdr;
- sockaddr_storage_t daddr;
+ union sctp_addr daddr;
unsigned long sent_at;
} sctp_sender_hb_info_t __attribute__((packed));
@@ -433,7 +452,7 @@ struct SCTP_chunk {
*/
/* We point this at the FIRST TLV parameter to chunk_hdr. */
- sctpParam_t param_hdr;
+ union sctp_params param_hdr;
union {
__u8 *v;
sctp_datahdr_t *data_hdr;
@@ -474,13 +493,13 @@ struct SCTP_chunk {
__u8 ecn_ce_done; /* Have we processed the ECN CE bit? */
__u8 pdiscard; /* Discard the whole packet now? */
__u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */
- __u8 fast_retransmit; /* Is this chunk fast retransmitted? */
+ __u8 fast_retransmit; /* Is this chunk fast retransmitted? */
__u8 tsn_missing_report; /* Data chunk missing counter. */
/* What is the origin IP address for this chunk? */
- sockaddr_storage_t source;
+ union sctp_addr source;
/* Destination address for this chunk. */
- sockaddr_storage_t dest;
+ union sctp_addr dest;
/* For an inbound chunk, this tells us where it came from.
* For an outbound chunk, it tells us where we'd like it to
@@ -497,8 +516,8 @@ void *sctp_addto_chunk(sctp_chunk_t *chunk, int len, const void *data);
int sctp_user_addto_chunk(sctp_chunk_t *chunk, int len, struct iovec *data);
sctp_chunk_t *sctp_chunkify(struct sk_buff *, const sctp_association_t *,
struct sock *);
-void sctp_init_addrs(sctp_chunk_t *chunk);
-const sockaddr_storage_t *sctp_source(const sctp_chunk_t *chunk);
+void sctp_init_addrs(sctp_chunk_t *, union sctp_addr *, union sctp_addr *);
+const union sctp_addr *sctp_source(const sctp_chunk_t *chunk);
/* This is a structure for holding either an IPv6 or an IPv4 address. */
/* sin_family -- AF_INET or AF_INET6
@@ -507,7 +526,7 @@ const sockaddr_storage_t *sctp_source(const sctp_chunk_t *chunk);
*/
struct sockaddr_storage_list {
struct list_head list;
- sockaddr_storage_t a;
+ union sctp_addr a;
};
typedef sctp_chunk_t *(sctp_packet_phandler_t)(sctp_association_t *);
@@ -573,7 +592,7 @@ void sctp_packet_free(sctp_packet_t *);
/* This represents a remote transport address.
- * For local transport addresses, we just use sockaddr_storage_t.
+ * For local transport addresses, we just use union sctp_addr.
*
* RFC2960 Section 1.4 Key Terms
*
@@ -601,7 +620,7 @@ struct SCTP_transport {
int dead;
/* This is the peer's IP address and port. */
- sockaddr_storage_t ipaddr;
+ union sctp_addr ipaddr;
/* These are the functions we call to handle LLP stuff. */
sctp_func_t *af_specific;
@@ -684,13 +703,15 @@ struct SCTP_transport {
*/
unsigned long last_time_ecne_reduced;
- /* state : The current state of this destination,
- * : i.e. DOWN, UP, ALLOW-HB, NO-HEARTBEAT, etc.
+ /* active : The current active state of this destination,
+ * : i.e. DOWN, UP, etc.
*/
- struct {
- int active;
- int hb_allowed;
- } state;
+ int active;
+
+ /* hb_allowed : The current heartbeat state of this destination,
+ * : i.e. ALLOW-HB, NO-HEARTBEAT, etc.
+ */
+ int hb_allowed;
/* These are the error stats for this destination. */
@@ -739,11 +760,12 @@ struct SCTP_transport {
int malloced; /* Is this structure kfree()able? */
};
-extern sctp_transport_t *sctp_transport_new(const sockaddr_storage_t *, int);
+extern sctp_transport_t *sctp_transport_new(const union sctp_addr *, int);
extern sctp_transport_t *sctp_transport_init(sctp_transport_t *,
- const sockaddr_storage_t *, int);
+ const union sctp_addr *, int);
extern void sctp_transport_set_owner(sctp_transport_t *, sctp_association_t *);
-extern void sctp_transport_route(sctp_transport_t *, sockaddr_storage_t *);
+extern void sctp_transport_route(sctp_transport_t *, union sctp_addr *,
+ struct sctp_opt *);
extern void sctp_transport_free(sctp_transport_t *);
extern void sctp_transport_destroy(sctp_transport_t *);
extern void sctp_transport_reset_timers(sctp_transport_t *);
@@ -890,30 +912,31 @@ void sctp_bind_addr_init(sctp_bind_addr_t *, __u16 port);
void sctp_bind_addr_free(sctp_bind_addr_t *);
int sctp_bind_addr_copy(sctp_bind_addr_t *dest, const sctp_bind_addr_t *src,
sctp_scope_t scope, int priority,int flags);
-int sctp_add_bind_addr(sctp_bind_addr_t *, sockaddr_storage_t *,
+int sctp_add_bind_addr(sctp_bind_addr_t *, union sctp_addr *,
int priority);
-int sctp_del_bind_addr(sctp_bind_addr_t *, sockaddr_storage_t *);
-int sctp_bind_addr_has_addr(sctp_bind_addr_t *, const sockaddr_storage_t *);
-sctpParam_t sctp_bind_addrs_to_raw(const sctp_bind_addr_t *bp,
- int *addrs_len,
- int priority);
+int sctp_del_bind_addr(sctp_bind_addr_t *, union sctp_addr *);
+int sctp_bind_addr_match(sctp_bind_addr_t *, const union sctp_addr *,
+ struct sctp_opt *);
+union sctp_params sctp_bind_addrs_to_raw(const sctp_bind_addr_t *bp,
+ int *addrs_len,
+ int priority);
int sctp_raw_to_bind_addrs(sctp_bind_addr_t *bp,
__u8 *raw_addr_list,
int addrs_len,
unsigned short port,
int priority);
-sctp_scope_t sctp_scope(const sockaddr_storage_t *);
-int sctp_in_scope(const sockaddr_storage_t *addr, const sctp_scope_t scope);
-int sctp_is_any(const sockaddr_storage_t *addr);
-int sctp_addr_is_valid(const sockaddr_storage_t *addr);
+sctp_scope_t sctp_scope(const union sctp_addr *);
+int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope);
+int sctp_is_any(const union sctp_addr *addr);
+int sctp_addr_is_valid(const union sctp_addr *addr);
/* What type of sctp_endpoint_common? */
typedef enum {
SCTP_EP_TYPE_SOCKET,
SCTP_EP_TYPE_ASSOCIATION,
-} sctp_endpoint_type_t;
+} sctp_endpoint_type_t;
/*
* A common base class to bridge the implmentation view of a
@@ -1048,35 +1071,25 @@ void sctp_endpoint_put(sctp_endpoint_t *);
void sctp_endpoint_hold(sctp_endpoint_t *);
void sctp_endpoint_add_asoc(sctp_endpoint_t *, sctp_association_t *asoc);
sctp_association_t *sctp_endpoint_lookup_assoc(const sctp_endpoint_t *ep,
- const sockaddr_storage_t *paddr,
+ const union sctp_addr *paddr,
sctp_transport_t **);
+int sctp_endpoint_is_peeled_off(sctp_endpoint_t *, const union sctp_addr *);
sctp_endpoint_t *sctp_endpoint_is_match(sctp_endpoint_t *,
- const sockaddr_storage_t *);
+ const union sctp_addr *);
-int sctp_has_association(const sockaddr_storage_t *laddr,
- const sockaddr_storage_t *paddr);
+int sctp_has_association(const union sctp_addr *laddr,
+ const union sctp_addr *paddr);
int sctp_verify_init(const sctp_association_t *asoc,
sctp_cid_t cid,
sctp_init_chunk_t *peer_init,
sctp_chunk_t *chunk,
sctp_chunk_t **err_chunk);
-int sctp_verify_param(const sctp_association_t *asoc,
- sctpParam_t param,
- sctp_cid_t cid,
- sctp_chunk_t *chunk,
- sctp_chunk_t **err_chunk);
-int sctp_process_unk_param(const sctp_association_t *asoc,
- sctpParam_t param,
- sctp_chunk_t *chunk,
- sctp_chunk_t **err_chunk);
-void sctp_process_init(sctp_association_t *asoc, sctp_cid_t cid,
- const sockaddr_storage_t *peer_addr,
- sctp_init_chunk_t *peer_init, int priority);
-int sctp_process_param(sctp_association_t *asoc,
- sctpParam_t param,
- const sockaddr_storage_t *peer_addr,
- sctp_cid_t cid, int priority);
+int sctp_process_init(sctp_association_t *asoc, sctp_cid_t cid,
+ const union sctp_addr *peer_addr,
+ sctp_init_chunk_t *peer_init, int priority);
+int sctp_process_param(sctp_association_t *asoc, union sctp_params param,
+ const union sctp_addr *peer_addr, int priority);
__u32 sctp_generate_tag(const sctp_endpoint_t *ep);
__u32 sctp_generate_tsn(const sctp_endpoint_t *ep);
@@ -1163,10 +1176,10 @@ struct SCTP_association {
sctp_transport_t *primary_path;
/* Cache the primary path address here, when we
- * need a an address for msg_name.
+ * need a an address for msg_name.
*/
- sockaddr_storage_t primary_addr;
-
+ union sctp_addr primary_addr;
+
/* active_path
* The path that we are currently using to
* transmit new data and most control chunks.
@@ -1267,7 +1280,7 @@ struct SCTP_association {
/* Overall : The threshold for this association that if
* Error : the Overall Error Count reaches will cause
- * Threshold : this association to be torn down.
+ * Threshold : this association to be torn down.
*/
int overall_error_threshold;
@@ -1313,13 +1326,13 @@ struct SCTP_association {
*/
__u32 next_tsn;
- /*
+ /*
* Last Rcvd : This is the last TSN received in sequence. This value
* TSN : is set initially by taking the peer's Initial TSN,
* : received in the INIT or INIT ACK chunk, and
* : subtracting one from it.
*
- * Most of RFC 2960 refers to this as the Cumulative TSN Ack Point.
+ * Most of RFC 2960 refers to this as the Cumulative TSN Ack Point.
*/
__u32 ctsn_ack_point;
@@ -1543,16 +1556,16 @@ void sctp_association_hold(sctp_association_t *);
sctp_transport_t *sctp_assoc_choose_shutdown_transport(sctp_association_t *);
sctp_transport_t *sctp_assoc_lookup_paddr(const sctp_association_t *,
- const sockaddr_storage_t *);
+ const union sctp_addr *);
sctp_transport_t *sctp_assoc_add_peer(sctp_association_t *,
- const sockaddr_storage_t *address,
+ const union sctp_addr *address,
const int priority);
void sctp_assoc_control_transport(sctp_association_t *, sctp_transport_t *,
sctp_transport_cmd_t, sctp_sn_error_t);
sctp_transport_t *sctp_assoc_lookup_tsn(sctp_association_t *, __u32);
sctp_transport_t *sctp_assoc_is_match(sctp_association_t *,
- const sockaddr_storage_t *,
- const sockaddr_storage_t *);
+ const union sctp_addr *,
+ const union sctp_addr *);
void sctp_assoc_migrate(sctp_association_t *, struct sock *);
void sctp_assoc_update(sctp_association_t *dst, sctp_association_t *src);
@@ -1560,14 +1573,11 @@ __u32 __sctp_association_get_next_tsn(sctp_association_t *);
__u32 __sctp_association_get_tsn_block(sctp_association_t *, int);
__u16 __sctp_association_get_next_ssn(sctp_association_t *, __u16 sid);
-int sctp_cmp_addr(const sockaddr_storage_t *ss1,
- const sockaddr_storage_t *ss2);
-int sctp_cmp_addr_exact(const sockaddr_storage_t *ss1,
- const sockaddr_storage_t *ss2);
+int sctp_cmp_addr_exact(const union sctp_addr *ss1,
+ const union sctp_addr *ss2);
sctp_chunk_t *sctp_get_ecne_prepend(sctp_association_t *asoc);
sctp_chunk_t *sctp_get_no_prepend(sctp_association_t *asoc);
-
/* A convenience structure to parse out SCTP specific CMSGs. */
typedef struct sctp_cmsgs {
struct sctp_initmsg *init;