summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-04-04 04:13:14 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-04-04 04:13:14 -0800
commite35a3e9a6138c5eb67200d5f28d33cb66f0faf87 (patch)
treed59b94da6338651349aa62a5bf0c506c3f9e8534 /include
parente315468fb49141d2737f4323f9a3d4301882ddc5 (diff)
parentda334d91ff7001d234863fc7692de1ff90bed57a (diff)
Merge bk://linux-pnp.bkbits.net/pnp-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
-rw-r--r--include/linux/oprofile.h5
-rw-r--r--include/linux/sched.h6
-rw-r--r--include/net/sctp/constants.h8
-rw-r--r--include/net/sctp/sctp.h104
-rw-r--r--include/net/sctp/sm.h13
-rw-r--r--include/net/sctp/structs.h137
-rw-r--r--include/net/sctp/ulpevent.h6
7 files changed, 152 insertions, 127 deletions
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h
index 5d906c21103f..6dba9058bca0 100644
--- a/include/linux/oprofile.h
+++ b/include/linux/oprofile.h
@@ -46,6 +46,11 @@ struct oprofile_operations {
int oprofile_arch_init(struct oprofile_operations ** ops);
/**
+ * One-time exit/cleanup for the arch.
+ */
+void oprofile_arch_exit(void);
+
+/**
* Add a sample. This may be called from any context. Pass
* smp_processor_id() as cpu.
*/
diff --git a/include/linux/sched.h b/include/linux/sched.h
index d001088e58b3..f3b4c5891898 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -541,6 +541,7 @@ extern void block_all_signals(int (*notifier)(void *priv), void *priv,
extern void unblock_all_signals(void);
extern void release_task(struct task_struct * p);
extern int send_sig_info(int, struct siginfo *, struct task_struct *);
+extern int send_group_sig_info(int, struct siginfo *, struct task_struct *);
extern int force_sig_info(int, struct siginfo *, struct task_struct *);
extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
extern int kill_pg_info(int, struct siginfo *, pid_t);
@@ -558,6 +559,11 @@ extern int kill_proc(pid_t, int, int);
extern int do_sigaction(int, const struct k_sigaction *, struct k_sigaction *);
extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long);
+/* These can be the second arg to send_sig_info/send_group_sig_info. */
+#define SEND_SIG_NOINFO ((struct siginfo *) 0)
+#define SEND_SIG_PRIV ((struct siginfo *) 1)
+#define SEND_SIG_FORCED ((struct siginfo *) 2)
+
/* True if we are on the alternate signal stack. */
static inline int on_sig_stack(unsigned long sp)
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index 8ddc88ed69fd..0d6a20a7390e 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -138,12 +138,10 @@ typedef enum {
*/
typedef union {
-
sctp_cid_t chunk;
sctp_event_timeout_t timeout;
sctp_event_other_t other;
sctp_event_primitive_t primitive;
-
} sctp_subtype_t;
#define SCTP_SUBTYPE_CONSTRUCTOR(_name, _type, _elt) \
@@ -421,9 +419,9 @@ typedef enum {
/* Reasons to retransmit. */
typedef enum {
- SCTP_RETRANSMIT_T3_RTX,
- SCTP_RETRANSMIT_FAST_RTX,
- SCTP_RETRANSMIT_PMTU_DISCOVERY,
+ SCTP_RTXR_T3_RTX,
+ SCTP_RTXR_FAST_RTX,
+ SCTP_RTXR_PMTUD,
} sctp_retransmit_reason_t;
/* Reasons to lower cwnd. */
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 607703c0585b..f964badf7062 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -123,14 +123,14 @@
*/
extern struct sctp_protocol sctp_proto;
extern struct sock *sctp_get_ctl_sock(void);
-extern int sctp_copy_local_addr_list(struct sctp_protocol *,
+extern int sctp_copy_local_addr_list(struct sctp_protocol *,
struct sctp_bind_addr *,
sctp_scope_t, int priority, int flags);
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
+ * sctp/socket.c
*/
extern int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb);
extern int sctp_inet_listen(struct socket *sock, int backlog);
@@ -139,7 +139,7 @@ extern unsigned int sctp_poll(struct file *file, struct socket *sock,
poll_table *wait);
/*
- * sctp_primitive.c
+ * sctp/primitive.c
*/
extern int sctp_primitive_ASSOCIATE(sctp_association_t *, void *arg);
extern int sctp_primitive_SHUTDOWN(sctp_association_t *, void *arg);
@@ -148,14 +148,14 @@ extern int sctp_primitive_SEND(sctp_association_t *, void *arg);
extern int sctp_primitive_REQUESTHEARTBEAT(sctp_association_t *, void *arg);
/*
- * sctp_crc32c.c
+ * sctp/crc32c.c
*/
extern __u32 sctp_start_cksum(__u8 *ptr, __u16 count);
extern __u32 sctp_update_cksum(__u8 *ptr, __u16 count, __u32 cksum);
extern __u32 sctp_end_cksum(__u32 cksum);
/*
- * sctp_input.c
+ * sctp/input.c
*/
extern int sctp_rcv(struct sk_buff *skb);
extern void sctp_v4_err(struct sk_buff *skb, u32 info);
@@ -170,9 +170,16 @@ extern void __sctp_unhash_endpoint(sctp_endpoint_t *);
extern sctp_association_t *__sctp_lookup_association(const union sctp_addr *,
const union sctp_addr *,
struct sctp_transport **);
-
+extern struct sock *sctp_err_lookup(int family, struct sk_buff *,
+ struct sctphdr *, struct sctp_endpoint **,
+ struct sctp_association **,
+ struct sctp_transport **);
+extern void sctp_err_finish(struct sock *, struct sctp_endpoint *,
+ struct sctp_association *);
+extern void sctp_icmp_frag_needed(struct sock *, struct sctp_association *,
+ struct sctp_transport *t, __u32 pmtu);
/*
- * sctp_hashdriver.c
+ * sctp/hashdriver.c
*/
extern void sctp_hash_digest(const char *secret, const int secret_len,
const char *text, const int text_len,
@@ -184,9 +191,7 @@ extern void sctp_hash_digest(const char *secret, const int secret_len,
#ifdef TEST_FRAME
-
#include <test_frame.h>
-
#else
/* spin lock wrappers. */
@@ -194,28 +199,28 @@ extern void sctp_hash_digest(const char *secret, const int secret_len,
#define sctp_spin_unlock_irqrestore(lock, flags) \
spin_unlock_irqrestore(lock, flags)
#define sctp_local_bh_disable() local_bh_disable()
-#define sctp_local_bh_enable() local_bh_enable()
-#define sctp_spin_lock(lock) spin_lock(lock)
-#define sctp_spin_unlock(lock) spin_unlock(lock)
-#define sctp_write_lock(lock) write_lock(lock)
+#define sctp_local_bh_enable() local_bh_enable()
+#define sctp_spin_lock(lock) spin_lock(lock)
+#define sctp_spin_unlock(lock) spin_unlock(lock)
+#define sctp_write_lock(lock) write_lock(lock)
#define sctp_write_unlock(lock) write_unlock(lock)
-#define sctp_read_lock(lock) read_lock(lock)
-#define sctp_read_unlock(lock) read_unlock(lock)
+#define sctp_read_lock(lock) read_lock(lock)
+#define sctp_read_unlock(lock) read_unlock(lock)
/* sock lock wrappers. */
-#define sctp_lock_sock(sk) lock_sock(sk)
-#define sctp_release_sock(sk) release_sock(sk)
-#define sctp_bh_lock_sock(sk) bh_lock_sock(sk)
-#define sctp_bh_unlock_sock(sk) bh_unlock_sock(sk)
-#define SCTP_SOCK_SLEEP_PRE(sk) SOCK_SLEEP_PRE(sk)
+#define sctp_lock_sock(sk) lock_sock(sk)
+#define sctp_release_sock(sk) release_sock(sk)
+#define sctp_bh_lock_sock(sk) bh_lock_sock(sk)
+#define sctp_bh_unlock_sock(sk) bh_unlock_sock(sk)
+#define SCTP_SOCK_SLEEP_PRE(sk) SOCK_SLEEP_PRE(sk)
#define SCTP_SOCK_SLEEP_POST(sk) SOCK_SLEEP_POST(sk)
/* SCTP SNMP MIB stats handlers */
DECLARE_SNMP_STAT(struct sctp_mib, sctp_statistics);
-#define SCTP_INC_STATS(field) SNMP_INC_STATS(sctp_statistics, field)
-#define SCTP_INC_STATS_BH(field) SNMP_INC_STATS_BH(sctp_statistics, field)
-#define SCTP_INC_STATS_USER(field) SNMP_INC_STATS_USER(sctp_statistics, field)
-#define SCTP_DEC_STATS(field) SNMP_DEC_STATS(sctp_statistics, field)
+#define SCTP_INC_STATS(field) SNMP_INC_STATS(sctp_statistics, field)
+#define SCTP_INC_STATS_BH(field) SNMP_INC_STATS_BH(sctp_statistics, field)
+#define SCTP_INC_STATS_USER(field) SNMP_INC_STATS_USER(sctp_statistics, field)
+#define SCTP_DEC_STATS(field) SNMP_DEC_STATS(sctp_statistics, field)
/* Determine if this is a valid kernel address. */
static inline int sctp_is_valid_kaddr(unsigned long addr)
@@ -312,7 +317,6 @@ static inline void sctp_sysctl_register(void) { return; }
static inline void sctp_sysctl_unregister(void) { return; }
#endif
-
/* Size of Supported Address Parameter for 'x' address types. */
#define SCTP_SAT_LEN(x) (sizeof(struct sctp_paramhdr) + (x) * sizeof(__u16))
@@ -320,19 +324,15 @@ static inline void sctp_sysctl_unregister(void) { return; }
extern int sctp_v6_init(void);
extern void sctp_v6_exit(void);
-static inline int sctp_ipv6_addr_type(const struct in6_addr *addr)
-{
- return ipv6_addr_type((struct in6_addr*) addr);
-}
+extern void sctp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
+ int type, int code, int offset, __u32 info);
-#else /* #ifdef defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */
+#else /* #ifdef defined(CONFIG_IPV6) */
-#define sctp_ipv6_addr_type(a) 0
static inline int sctp_v6_init(void) { return 0; }
static inline void sctp_v6_exit(void) { return; }
-#endif /* #ifdef defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */
-
+#endif /* #if defined(CONFIG_IPV6) */
/* Map an association to an assoc_id. */
static inline sctp_assoc_t sctp_assoc2id(const sctp_association_t *asoc)
@@ -414,13 +414,22 @@ static inline __s32 sctp_jitter(__u32 rto)
sctp_rand ^= (sctp_rand << 12);
sctp_rand ^= (sctp_rand >> 20);
- /* Choose random number from 0 to rto, then move to -50% ~ +50%
- * of rto.
+ /* Choose random number from 0 to rto, then move to -50% ~ +50%
+ * of rto.
*/
ret = sctp_rand % rto - (rto >> 1);
return ret;
}
+/* Break down data chunks at this point. */
+static inline int sctp_frag_point(int pmtu)
+{
+ pmtu -= SCTP_IP_OVERHEAD + sizeof(struct sctp_data_chunk);
+ pmtu -= sizeof(struct sctp_sack_chunk);
+
+ return pmtu;
+}
+
/* 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
@@ -479,21 +488,24 @@ static inline struct sctp_protocol *sctp_get_protocol(void)
/* 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;
+ return AF_INET;
case 6:
- family = AF_INET6;
- break;
+ return AF_INET6;
default:
- family = 0;
- break;
+ return 0;
};
+}
- return family;
+/* Perform some sanity checks. */
+static inline int sctp_sanity_check(void)
+{
+ SCTP_ASSERT(sizeof(struct sctp_ulpevent) <=
+ sizeof(((struct sk_buff *)0)->cb),
+ "SCTP: ulpevent does not fit in skb!\n", return 0);
+
+ return 1;
}
/* Warning: The following hash functions assume a power of two 'size'. */
@@ -537,7 +549,7 @@ struct sctp_sock {
struct sock sk;
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
struct ipv6_pinfo *pinet6;
-#endif /* CONFIG_IPV6 || CONFIG_IPV6_MODULE */
+#endif /* CONFIG_IPV6 */
struct inet_opt inet;
struct sctp_opt sctp;
};
@@ -550,7 +562,7 @@ struct sctp6_sock {
struct sctp_opt sctp;
struct ipv6_pinfo inet6;
};
-#endif /* CONFIG_IPV6 || CONFIG_IPV6_MODULE */
+#endif /* CONFIG_IPV6 */
#define sctp_sk(__sk) (&((struct sctp_sock *)__sk)->sctp)
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 16737eda8d8c..6b9a30330630 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -197,15 +197,14 @@ sctp_state_fn_t sctp_addip_do_asconf;
sctp_state_fn_t sctp_addip_do_asconf_ack;
/* Prototypes for utility support functions. */
-__u8 sctp_get_chunk_type(sctp_chunk_t *chunk);
+__u8 sctp_get_chunk_type(struct sctp_chunk *chunk);
sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
sctp_state_t state,
sctp_subtype_t event_subtype);
-
-time_t timeval_sub(struct timeval *, struct timeval *);
-sctp_association_t *sctp_make_temp_asoc(const sctp_endpoint_t *,
- sctp_chunk_t *,
- const int priority);
+int sctp_chunk_iif(const struct sctp_chunk *);
+struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *,
+ struct sctp_chunk *,
+ int gfp);
__u32 sctp_generate_verification_tag(void);
void sctp_populate_tie_tags(__u8 *cookie, __u32 curTag, __u32 hisTag);
@@ -344,7 +343,7 @@ __u32 sctp_generate_tsn(const sctp_endpoint_t *);
/* 4th level prototypes */
void sctp_param2sockaddr(union sctp_addr *addr, sctp_addr_param_t *,
- __u16 port);
+ __u16 port, int iif);
int sctp_addr2sockaddr(const union sctp_params, union sctp_addr *);
int sockaddr2sctp_addr(const union sctp_addr *, sctp_addr_param_t *);
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 913c4769b343..5cf74d3c2882 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -242,6 +242,7 @@ struct sctp_af {
void (*inaddr_any) (union sctp_addr *, unsigned short);
int (*is_any) (const union sctp_addr *);
int (*available) (const union sctp_addr *);
+ int (*skb_iif) (const struct sk_buff *sk);
__u16 net_header_len;
int sockaddr_len;
sa_family_t sa_family;
@@ -260,6 +261,7 @@ struct sctp_pf {
const union sctp_addr *,
struct sctp_opt *);
int (*bind_verify) (struct sctp_opt *, union sctp_addr *);
+ int (*send_verify) (struct sctp_opt *, union sctp_addr *);
int (*supported_addrs)(const struct sctp_opt *, __u16 *);
struct sock *(*create_accept_sk) (struct sock *sk,
struct sctp_association *asoc);
@@ -430,7 +432,7 @@ struct sctp_ssnmap {
};
struct sctp_ssnmap *sctp_ssnmap_init(struct sctp_ssnmap *, __u16, __u16);
-struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out, int priority);
+struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out, int gfp);
void sctp_ssnmap_free(struct sctp_ssnmap *map);
void sctp_ssnmap_clear(struct sctp_ssnmap *map);
@@ -509,7 +511,7 @@ struct sctp_chunk {
struct sctp_sndrcvinfo sinfo;
/* Which association does this belong to? */
- sctp_association_t *asoc;
+ struct sctp_association *asoc;
/* What endpoint received this chunk? */
sctp_endpoint_common_t *rcvr;
@@ -541,11 +543,11 @@ struct sctp_chunk {
struct sctp_transport *transport;
};
-sctp_chunk_t *sctp_make_chunk(const sctp_association_t *, __u8 type,
+sctp_chunk_t *sctp_make_chunk(const struct sctp_association *, __u8 type,
__u8 flags, int size);
void sctp_free_chunk(sctp_chunk_t *);
void *sctp_addto_chunk(sctp_chunk_t *chunk, int len, const void *data);
-sctp_chunk_t *sctp_chunkify(struct sk_buff *, const sctp_association_t *,
+sctp_chunk_t *sctp_chunkify(struct sk_buff *, const struct sctp_association *,
struct sock *);
void sctp_init_addrs(sctp_chunk_t *, union sctp_addr *, union sctp_addr *);
const union sctp_addr *sctp_source(const sctp_chunk_t *chunk);
@@ -560,7 +562,7 @@ struct sockaddr_storage_list {
union sctp_addr a;
};
-typedef sctp_chunk_t *(sctp_packet_phandler_t)(sctp_association_t *);
+typedef sctp_chunk_t *(sctp_packet_phandler_t)(struct sctp_association *);
/* This structure holds lists of chunks as we are assembling for
* transmission.
@@ -590,13 +592,16 @@ struct sctp_packet {
/* This packet should advertise ECN capability to the network
* via the ECT bit.
*/
- int ecn_capable;
+ char ecn_capable;
/* This packet contains a COOKIE-ECHO chunk. */
- int has_cookie_echo;
+ char has_cookie_echo;
+
+ /* This packet containsa SACK chunk. */
+ char has_sack;
/* SCTP cannot fragment this packet. So let ip fragment it. */
- int ipfragok;
+ char ipfragok;
int malloced;
};
@@ -660,7 +665,7 @@ struct sctp_transport {
struct sctp_af *af_specific;
/* Which association do we belong to? */
- sctp_association_t *asoc;
+ struct sctp_association *asoc;
/* RFC2960
*
@@ -799,7 +804,8 @@ struct sctp_transport {
struct sctp_transport *sctp_transport_new(const union sctp_addr *, int);
struct sctp_transport *sctp_transport_init(struct sctp_transport *,
const union sctp_addr *, int);
-void sctp_transport_set_owner(struct sctp_transport *, sctp_association_t *);
+void sctp_transport_set_owner(struct sctp_transport *,
+ struct sctp_association *);
void sctp_transport_route(struct sctp_transport *, union sctp_addr *,
struct sctp_opt *);
void sctp_transport_pmtu(struct sctp_transport *);
@@ -862,13 +868,16 @@ void sctp_inq_set_th_handler(struct sctp_inq *, void (*)(void *), void *);
* When free()'d, it empties itself out via output_handler().
*/
struct sctp_outq {
- sctp_association_t *asoc;
+ struct sctp_association *asoc;
/* Data pending that has never been transmitted. */
struct sk_buff_head out;
unsigned out_qlen; /* Total length of queued data chunks. */
+ /* Error of send failed, may used in SCTP_SEND_FAILED event. */
+ unsigned error;
+
/* These are control chunks we want to send. */
struct sk_buff_head control;
@@ -902,8 +911,8 @@ struct sctp_outq {
int malloced;
};
-struct sctp_outq *sctp_outq_new(sctp_association_t *);
-void sctp_outq_init(sctp_association_t *, struct sctp_outq *);
+struct sctp_outq *sctp_outq_new(struct sctp_association *);
+void sctp_outq_init(struct sctp_association *, struct sctp_outq *);
void sctp_outq_teardown(struct sctp_outq *);
void sctp_outq_free(struct sctp_outq*);
int sctp_outq_tail(struct sctp_outq *, sctp_chunk_t *chunk);
@@ -947,20 +956,16 @@ sctp_bind_addr_t *sctp_bind_addr_new(int gfp_mask);
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);
+ sctp_scope_t scope, int gfp,int flags);
int sctp_add_bind_addr(sctp_bind_addr_t *, union sctp_addr *,
- int priority);
+ int gfp);
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);
+union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp,
+ int *addrs_len, int gfp);
+int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len,
+ __u16 port, int gfp);
sctp_scope_t sctp_scope(const union sctp_addr *);
int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope);
@@ -1063,7 +1068,7 @@ struct sctp_endpoint {
* pointer, or table pointers dependent on how SCTP
* is implemented.
*/
- /* This is really a list of sctp_association_t entries. */
+ /* This is really a list of struct sctp_association entries. */
struct list_head asocs;
/* Secret Key: A secret key used by this endpoint to compute
@@ -1099,12 +1104,12 @@ static inline sctp_endpoint_t *sctp_ep(sctp_endpoint_common_t *base)
sctp_endpoint_t *sctp_endpoint_new(struct sctp_protocol *, struct sock *, int);
sctp_endpoint_t *sctp_endpoint_init(struct sctp_endpoint *,
struct sctp_protocol *,
- struct sock *, int priority);
+ struct sock *, int gfp);
void sctp_endpoint_free(sctp_endpoint_t *);
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,
+void sctp_endpoint_add_asoc(sctp_endpoint_t *, struct sctp_association *asoc);
+struct sctp_association *sctp_endpoint_lookup_assoc(const sctp_endpoint_t *ep,
const union sctp_addr *paddr,
struct sctp_transport **);
int sctp_endpoint_is_peeled_off(sctp_endpoint_t *, const union sctp_addr *);
@@ -1113,18 +1118,16 @@ sctp_endpoint_t *sctp_endpoint_is_match(sctp_endpoint_t *,
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_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);
+int sctp_verify_init(const struct sctp_association *asoc, sctp_cid_t,
+ sctp_init_chunk_t *peer_init, struct sctp_chunk *chunk,
+ struct sctp_chunk **err_chunk);
+int sctp_process_init(struct sctp_association *, sctp_cid_t cid,
+ const union sctp_addr *peer,
+ sctp_init_chunk_t *init, int gfp);
+int sctp_process_param(struct sctp_association *, union sctp_params param,
+ const union sctp_addr *from, int gfp);
+__u32 sctp_generate_tag(const sctp_endpoint_t *);
+__u32 sctp_generate_tsn(const sctp_endpoint_t *);
/* RFC2960
@@ -1153,7 +1156,7 @@ struct sctp_association {
struct list_head asocs;
/* This is a signature that lets us know that this is a
- * sctp_association_t data structure. Used for mapping an
+ * struct sctp_association data structure. Used for mapping an
* association id to an association.
*/
__u32 eyecatcher;
@@ -1556,44 +1559,46 @@ enum {
};
/* Recover the outter association structure. */
-static inline sctp_association_t *sctp_assoc(sctp_endpoint_common_t *base)
+static inline struct sctp_association *sctp_assoc(sctp_endpoint_common_t *base)
{
- sctp_association_t *asoc;
+ struct sctp_association *asoc;
- asoc = container_of(base, sctp_association_t, base);
+ asoc = container_of(base, struct sctp_association, base);
return asoc;
}
/* These are function signatures for manipulating associations. */
-sctp_association_t *
+struct sctp_association *
sctp_association_new(const sctp_endpoint_t *, const struct sock *,
- sctp_scope_t scope, int priority);
-sctp_association_t *
-sctp_association_init(sctp_association_t *, const sctp_endpoint_t *,
+ sctp_scope_t scope, int gfp);
+struct sctp_association *
+sctp_association_init(struct sctp_association *, const sctp_endpoint_t *,
const struct sock *, sctp_scope_t scope,
- int priority);
-void sctp_association_free(sctp_association_t *);
-void sctp_association_put(sctp_association_t *);
-void sctp_association_hold(sctp_association_t *);
-
-struct sctp_transport *sctp_assoc_choose_shutdown_transport(sctp_association_t *);
-void sctp_assoc_update_retran_path(sctp_association_t *);
-struct sctp_transport *sctp_assoc_lookup_paddr(const sctp_association_t *,
+ int gfp);
+void sctp_association_free(struct sctp_association *);
+void sctp_association_put(struct sctp_association *);
+void sctp_association_hold(struct sctp_association *);
+
+struct sctp_transport *sctp_assoc_choose_shutdown_transport(
+ struct sctp_association *);
+void sctp_assoc_update_retran_path(struct sctp_association *);
+struct sctp_transport *sctp_assoc_lookup_paddr(const struct sctp_association *,
const union sctp_addr *);
-struct sctp_transport *sctp_assoc_add_peer(sctp_association_t *,
+struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *,
const union sctp_addr *address,
- const int priority);
+ const int gfp);
void sctp_assoc_control_transport(struct sctp_association *,
struct sctp_transport *,
sctp_transport_cmd_t, sctp_sn_error_t);
-struct sctp_transport *sctp_assoc_lookup_tsn(sctp_association_t *, __u32);
-struct sctp_transport *sctp_assoc_is_match(sctp_association_t *,
+struct sctp_transport *sctp_assoc_lookup_tsn(struct sctp_association *, __u32);
+struct sctp_transport *sctp_assoc_is_match(struct sctp_association *,
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);
+void sctp_assoc_migrate(struct sctp_association *, struct sock *);
+void sctp_assoc_update(struct sctp_association *old,
+ struct sctp_association *new);
__u32 sctp_association_get_next_tsn(struct sctp_association *);
__u32 sctp_association_get_tsn_block(struct sctp_association *, int);
@@ -1603,14 +1608,14 @@ void sctp_assoc_rwnd_increase(struct sctp_association *, int);
void sctp_assoc_rwnd_decrease(struct sctp_association *, int);
void sctp_assoc_set_primary(struct sctp_association *,
struct sctp_transport *);
-int sctp_assoc_set_bind_addr_from_ep(sctp_association_t *, int);
-int sctp_assoc_set_bind_addr_from_cookie(sctp_association_t *,
- sctp_cookie_t *, int);
+int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *, int);
+int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *,
+ sctp_cookie_t *, int gfp);
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);
+sctp_chunk_t *sctp_get_ecne_prepend(struct sctp_association *asoc);
+sctp_chunk_t *sctp_get_no_prepend(struct sctp_association *asoc);
/* A convenience structure to parse out SCTP specific CMSGs. */
typedef struct sctp_cmsgs {
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h
index 8d0edaf22025..d508ca47ea4d 100644
--- a/include/net/sctp/ulpevent.h
+++ b/include/net/sctp/ulpevent.h
@@ -38,7 +38,6 @@
* be incorporated into the next SCTP release.
*/
-
#ifndef __sctp_ulpevent_h__
#define __sctp_ulpevent_h__
@@ -50,6 +49,7 @@ struct sctp_ulpevent {
struct sctp_association *asoc;
struct sctp_sndrcvinfo sndrcvinfo;
int msg_flags;
+ int iif;
};
/* Retrieve the skb this event sits inside of. */
@@ -61,9 +61,9 @@ static inline struct sk_buff *sctp_event2skb(struct sctp_ulpevent *ev)
/* Retrieve & cast the event sitting inside the skb. */
static inline struct sctp_ulpevent *sctp_skb2event(struct sk_buff *skb)
{
- return (struct sctp_ulpevent *)skb->cb;
+ return (struct sctp_ulpevent *)skb->cb;
}
-
+
struct sctp_ulpevent *sctp_ulpevent_new(int size, int flags, int priority);
struct sctp_ulpevent *sctp_ulpevent_init(struct sctp_ulpevent *, int flags);
void sctp_ulpevent_free(struct sctp_ulpevent *);