summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorJon Grimm <jgrimm@touki.austin.ibm.com>2002-11-21 02:43:28 -0600
committerJon Grimm <jgrimm@touki.austin.ibm.com>2002-11-21 02:43:28 -0600
commitd8367696c51189c05d28c279da3aa769e077c105 (patch)
tree1e9e3597f5f5f8d5b607f2a78677e87e1813d035 /include/net
parentd09fc925532bbb9e1d2956c4d6542dca0ae77e0d (diff)
[SCTP] Last of the v4/v6 partioning (for now)
Mostly code on the bind path, splitting out to pf and af family specific functions. Minor code cleanups/fixes mixed in.
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sctp/sctp.h4
-rw-r--r--include/net/sctp/structs.h21
2 files changed, 16 insertions, 9 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/structs.h b/include/net/sctp/structs.h
index d7b5674bdbdc..4b7f0e451449 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -234,7 +234,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 +259,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 +630,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;