summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorSridhar Samudrala <sridhar@dyn9-47-18-140.beaverton.ibm.com>2002-10-30 18:50:22 -0800
committerSridhar Samudrala <sridhar@dyn9-47-18-140.beaverton.ibm.com>2002-10-30 18:50:22 -0800
commitc02bf8efdde1fe5c5aa5fa5a57144954bd81fd10 (patch)
tree732c7f7b7bd72566582225fc22c5c1743d9ec222 /include/net
parentb1b782f7b7fced03a6dc51d3e52595fcfc9ac106 (diff)
parent39a990fea21586b031bedb29396b67eeaccd59f5 (diff)
[SCTP]: merge with 2.5.45
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sctp/sctp.h6
-rw-r--r--include/net/sctp/sm.h4
-rw-r--r--include/net/sctp/structs.h13
-rw-r--r--include/net/snmp.h29
4 files changed, 50 insertions, 2 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 9760c23a7af4..9997455f9a74 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -83,6 +83,7 @@
#include <asm/uaccess.h>
#include <asm/page.h>
#include <net/sock.h>
+#include <net/snmp.h>
#include <net/sctp/structs.h>
#include <net/sctp/constants.h>
#include <net/sctp/sm.h>
@@ -201,6 +202,11 @@ extern void sctp_hash_digest(const char *secret, const int secret_len,
#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 */
+extern struct sctp_mib sctp_statistics[NR_CPUS * 2];
+#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)
/* Determine if this is a valid kernel address. */
static inline int sctp_is_valid_kaddr(unsigned long addr)
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 36ed5af39824..80cc12e4ac5c 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -44,6 +44,7 @@
* Dajiang Zhang <dajiang.zhang@nokia.com>
* Sridhar Samudrala <sri@us.ibm.com>
* Daisy Chang <daisyc@us.ibm.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.
@@ -253,6 +254,9 @@ sctp_chunk_t *sctp_make_abort(const sctp_association_t *,
sctp_chunk_t *sctp_make_abort_no_data(const sctp_association_t *,
const sctp_chunk_t *,
__u32 tsn);
+sctp_chunk_t *sctp_make_abort_user(const sctp_association_t *,
+ const sctp_chunk_t *,
+ const struct msghdr *);
sctp_chunk_t *sctp_make_heartbeat(const sctp_association_t *,
const sctp_transport_t *,
const void *payload,
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 5a8b75d2da26..9c3979f31d1f 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -246,7 +246,10 @@ typedef struct sctp_func {
int optname,
char *optval,
int *optlen);
- int (*get_dst_mtu) (const sockaddr_storage_t *address);
+ 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;
int sockaddr_len;
sa_family_t sa_family;
@@ -476,6 +479,8 @@ struct SCTP_chunk {
/* What is the origin IP address for this chunk? */
sockaddr_storage_t source;
+ /* Destination address for this chunk. */
+ sockaddr_storage_t 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
@@ -492,7 +497,7 @@ 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_source(sctp_chunk_t *chunk);
+void sctp_init_addrs(sctp_chunk_t *chunk);
const sockaddr_storage_t *sctp_source(const sctp_chunk_t *chunk);
/* This is a structure for holding either an IPv6 or an IPv4 address. */
@@ -655,6 +660,9 @@ struct SCTP_transport {
/* PMTU : The current known path MTU. */
__u32 pmtu;
+ /* Destination */
+ struct dst_entry *dst;
+
/* When was the last time(in jiffies) that a data packet was sent on
* this transport? This is used to adjust the cwnd when the transport
* becomes inactive.
@@ -735,6 +743,7 @@ extern sctp_transport_t *sctp_transport_new(const sockaddr_storage_t *, int);
extern sctp_transport_t *sctp_transport_init(sctp_transport_t *,
const sockaddr_storage_t *, 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_free(sctp_transport_t *);
extern void sctp_transport_destroy(sctp_transport_t *);
extern void sctp_transport_reset_timers(sctp_transport_t *);
diff --git a/include/net/snmp.h b/include/net/snmp.h
index 0d80a7ef155e..553e8c0eedce 100644
--- a/include/net/snmp.h
+++ b/include/net/snmp.h
@@ -189,6 +189,35 @@ struct udp_mib
unsigned long __pad[0];
} ____cacheline_aligned;
+/* draft-ietf-sigtran-sctp-mib-07.txt */
+struct sctp_mib
+{
+ unsigned long SctpCurrEstab;
+ unsigned long SctpActiveEstabs;
+ unsigned long SctpPassiveEstabs;
+ unsigned long SctpAborteds;
+ unsigned long SctpShutdowns;
+ unsigned long SctpOutOfBlues;
+ unsigned long SctpChecksumErrors;
+ unsigned long SctpOutCtrlChunks;
+ unsigned long SctpOutOrderChunks;
+ unsigned long SctpOutUnorderChunks;
+ unsigned long SctpInCtrlChunks;
+ unsigned long SctpInOrderChunks;
+ unsigned long SctpInUnorderChunks;
+ unsigned long SctpFragUsrMsgs;
+ unsigned long SctpReasmUsrMsgs;
+ unsigned long SctpOutSCTPPacks;
+ unsigned long SctpInSCTPPacks;
+ unsigned long SctpRtoAlgorithm;
+ unsigned long SctpRtoMin;
+ unsigned long SctpRtoMax;
+ unsigned long SctpRtoInitial;
+ unsigned long SctpValCookieLife;
+ unsigned long SctpMaxInitRetr;
+ unsigned long __pad[0];
+} ____cacheline_aligned;
+
struct linux_mib
{
unsigned long SyncookiesSent;