summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2003-07-25 01:54:38 -0700
committerDavid S. Miller <davem@nuts.ninka.net>2003-07-25 01:54:38 -0700
commit43ee2e567efa5add6bf2242028927207d0c64004 (patch)
tree1d01dc628e9943c7e9da02ef1c24a425a0648884 /include
parentd7bcbcdc0ffbaed1f57a7e960934c6736d1f92ad (diff)
parent314635e1132bddd57d293550f34dca8f3c19d20a (diff)
Merge nuts.ninka.net:/home/davem/src/BK/sparcwork-2.5
into nuts.ninka.net:/home/davem/src/BK/sparc-2.5
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/atomic.h85
-rw-r--r--include/asm-alpha/local.h40
-rw-r--r--include/asm-alpha/sections.h7
-rw-r--r--include/linux/arcdevice.h6
-rw-r--r--include/linux/bio.h2
-rw-r--r--include/linux/blkdev.h31
-rw-r--r--include/linux/ethtool.h2
-rw-r--r--include/linux/hdlc.h151
-rw-r--r--include/linux/netfilter_bridge/ebt_stp.h46
-rw-r--r--include/linux/pfkeyv2.h4
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/xfrm.h4
-rw-r--r--include/net/ip6_route.h10
-rw-r--r--include/net/ipv6.h3
-rw-r--r--include/net/sctp/sctp.h20
-rw-r--r--include/net/sctp/sm.h3
-rw-r--r--include/net/sctp/structs.h9
-rw-r--r--include/net/sctp/ulpevent.h5
-rw-r--r--include/net/sctp/user.h300
-rw-r--r--include/net/xfrm.h8
20 files changed, 405 insertions, 332 deletions
diff --git a/include/asm-alpha/atomic.h b/include/asm-alpha/atomic.h
index 349cd5613f56..cd253c8c6c7b 100644
--- a/include/asm-alpha/atomic.h
+++ b/include/asm-alpha/atomic.h
@@ -16,11 +16,16 @@
* the user gave us, not some alias that contains the same information.
*/
typedef struct { volatile int counter; } atomic_t;
+typedef struct { volatile long counter; } atomic64_t;
-#define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
+#define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
+#define ATOMIC64_INIT(i) ( (atomic64_t) { (i) } )
+
+#define atomic_read(v) ((v)->counter + 0)
+#define atomic64_read(v) ((v)->counter + 0)
-#define atomic_read(v) ((v)->counter)
#define atomic_set(v,i) ((v)->counter = (i))
+#define atomic64_set(v,i) ((v)->counter = (i))
/*
* To get proper branch prediction for the main line, we must branch
@@ -43,6 +48,21 @@ static __inline__ void atomic_add(int i, atomic_t * v)
:"Ir" (i), "m" (v->counter));
}
+static __inline__ void atomic64_add(long i, atomic64_t * v)
+{
+ unsigned long temp;
+ __asm__ __volatile__(
+ "1: ldq_l %0,%1\n"
+ " addq %0,%2,%0\n"
+ " stq_c %0,%1\n"
+ " beq %0,2f\n"
+ ".subsection 2\n"
+ "2: br 1b\n"
+ ".previous"
+ :"=&r" (temp), "=m" (v->counter)
+ :"Ir" (i), "m" (v->counter));
+}
+
static __inline__ void atomic_sub(int i, atomic_t * v)
{
unsigned long temp;
@@ -58,6 +78,22 @@ static __inline__ void atomic_sub(int i, atomic_t * v)
:"Ir" (i), "m" (v->counter));
}
+static __inline__ void atomic64_sub(long i, atomic64_t * v)
+{
+ unsigned long temp;
+ __asm__ __volatile__(
+ "1: ldq_l %0,%1\n"
+ " subq %0,%2,%0\n"
+ " stq_c %0,%1\n"
+ " beq %0,2f\n"
+ ".subsection 2\n"
+ "2: br 1b\n"
+ ".previous"
+ :"=&r" (temp), "=m" (v->counter)
+ :"Ir" (i), "m" (v->counter));
+}
+
+
/*
* Same as above, but return the result value
*/
@@ -79,6 +115,24 @@ static __inline__ long atomic_add_return(int i, atomic_t * v)
return result;
}
+static __inline__ long atomic64_add_return(long i, atomic64_t * v)
+{
+ long temp, result;
+ __asm__ __volatile__(
+ "1: ldq_l %0,%1\n"
+ " addq %0,%3,%2\n"
+ " addq %0,%3,%0\n"
+ " stq_c %0,%1\n"
+ " beq %0,2f\n"
+ " mb\n"
+ ".subsection 2\n"
+ "2: br 1b\n"
+ ".previous"
+ :"=&r" (temp), "=m" (v->counter), "=&r" (result)
+ :"Ir" (i), "m" (v->counter) : "memory");
+ return result;
+}
+
static __inline__ long atomic_sub_return(int i, atomic_t * v)
{
long temp, result;
@@ -97,14 +151,41 @@ static __inline__ long atomic_sub_return(int i, atomic_t * v)
return result;
}
+static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
+{
+ long temp, result;
+ __asm__ __volatile__(
+ "1: ldq_l %0,%1\n"
+ " subq %0,%3,%2\n"
+ " subq %0,%3,%0\n"
+ " stq_c %0,%1\n"
+ " beq %0,2f\n"
+ " mb\n"
+ ".subsection 2\n"
+ "2: br 1b\n"
+ ".previous"
+ :"=&r" (temp), "=m" (v->counter), "=&r" (result)
+ :"Ir" (i), "m" (v->counter) : "memory");
+ return result;
+}
+
#define atomic_dec_return(v) atomic_sub_return(1,(v))
+#define atomic64_dec_return(v) atomic64_sub_return(1,(v))
+
#define atomic_inc_return(v) atomic_add_return(1,(v))
+#define atomic64_inc_return(v) atomic64_add_return(1,(v))
#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
+#define atomic64_sub_and_test(i,v) (atomic64_sub_return((i), (v)) == 0)
+
#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
+#define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0)
#define atomic_inc(v) atomic_add(1,(v))
+#define atomic64_inc(v) atomic64_add(1,(v))
+
#define atomic_dec(v) atomic_sub(1,(v))
+#define atomic64_dec(v) atomic64_sub(1,(v))
#define smp_mb__before_atomic_dec() smp_mb()
#define smp_mb__after_atomic_dec() smp_mb()
diff --git a/include/asm-alpha/local.h b/include/asm-alpha/local.h
new file mode 100644
index 000000000000..7babc457b921
--- /dev/null
+++ b/include/asm-alpha/local.h
@@ -0,0 +1,40 @@
+#ifndef _ALPHA_LOCAL_H
+#define _ALPHA_LOCAL_H
+
+#include <linux/percpu.h>
+#include <asm/atomic.h>
+
+typedef atomic64_t local_t;
+
+#define LOCAL_INIT(i) ATOMIC64_INIT(i)
+#define local_read(v) atomic64_read(v)
+#define local_set(v,i) atomic64_set(v,i)
+
+#define local_inc(v) atomic64_inc(v)
+#define local_dec(v) atomic64_inc(v)
+#define local_add(i, v) atomic64_add(i, v)
+#define local_sub(i, v) atomic64_sub(i, v)
+
+#define __local_inc(v) ((v)->counter++)
+#define __local_dec(v) ((v)->counter++)
+#define __local_add(i,v) ((v)->counter+=(i))
+#define __local_sub(i,v) ((v)->counter-=(i))
+
+/* Use these for per-cpu local_t variables: on some archs they are
+ * much more efficient than these naive implementations. Note they take
+ * a variable, not an address.
+ */
+#define cpu_local_read(v) local_read(&__get_cpu_var(v))
+#define cpu_local_set(v, i) local_set(&__get_cpu_var(v), (i))
+
+#define cpu_local_inc(v) local_inc(&__get_cpu_var(v))
+#define cpu_local_dec(v) local_dec(&__get_cpu_var(v))
+#define cpu_local_add(i, v) local_add((i), &__get_cpu_var(v))
+#define cpu_local_sub(i, v) local_sub((i), &__get_cpu_var(v))
+
+#define __cpu_local_inc(v) __local_inc(&__get_cpu_var(v))
+#define __cpu_local_dec(v) __local_dec(&__get_cpu_var(v))
+#define __cpu_local_add(i, v) __local_add((i), &__get_cpu_var(v))
+#define __cpu_local_sub(i, v) __local_sub((i), &__get_cpu_var(v))
+
+#endif /* _ALPHA_LOCAL_H */
diff --git a/include/asm-alpha/sections.h b/include/asm-alpha/sections.h
new file mode 100644
index 000000000000..43b40edd6e44
--- /dev/null
+++ b/include/asm-alpha/sections.h
@@ -0,0 +1,7 @@
+#ifndef _ALPHA_SECTIONS_H
+#define _ALPHA_SECTIONS_H
+
+/* nothing to see, move along */
+#include <asm-generic/sections.h>
+
+#endif
diff --git a/include/linux/arcdevice.h b/include/linux/arcdevice.h
index a8672f0ddeb6..66c7495e1834 100644
--- a/include/linux/arcdevice.h
+++ b/include/linux/arcdevice.h
@@ -291,12 +291,13 @@ struct arcnet_local {
/* hardware-specific functions */
struct {
+ struct module *owner;
void (*command) (struct net_device * dev, int cmd);
int (*status) (struct net_device * dev);
void (*intmask) (struct net_device * dev, int mask);
bool (*reset) (struct net_device * dev, bool really_reset);
- void (*open_close) (struct net_device * dev, bool open);
- void (*open_close_ll) (struct net_device * dev, bool open);
+ void (*open) (struct net_device * dev);
+ void (*close) (struct net_device * dev);
void (*copy_to_card) (struct net_device * dev, int bufnum, int offset,
void *buf, int count);
@@ -312,7 +313,6 @@ struct arcnet_local {
#define ACOMMAND(x) (lp->hw.command(dev, (x)))
#define ASTATUS() (lp->hw.status(dev))
#define AINTMASK(x) (lp->hw.intmask(dev, (x)))
-#define ARCOPEN(x) (lp->hw.open_close(dev, (x)))
diff --git a/include/linux/bio.h b/include/linux/bio.h
index d3f47b1b0f6a..6ad6d20d3778 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -119,10 +119,12 @@ struct bio {
* bit 0 -- read (not set) or write (set)
* bit 1 -- rw-ahead when set
* bit 2 -- barrier
+ * bit 3 -- fail fast, don't want low level driver retries
*/
#define BIO_RW 0
#define BIO_RW_AHEAD 1
#define BIO_RW_BARRIER 2
+#define BIO_RW_FAILFAST 3
/*
* various member access, note that bio_data should of course not be used
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index d951995038e5..fa14b066b2bb 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -165,25 +165,25 @@ struct request {
* first three bits match BIO_RW* bits, important
*/
enum rq_flag_bits {
- __REQ_RW, /* not set, read. set, write */
- __REQ_RW_AHEAD, /* READA */
+ __REQ_RW, /* not set, read. set, write */
+ __REQ_FAILFAST, /* no low level driver retries */
__REQ_SOFTBARRIER, /* may not be passed by ioscheduler */
__REQ_HARDBARRIER, /* may not be passed by drive either */
- __REQ_CMD, /* is a regular fs rw request */
- __REQ_NOMERGE, /* don't touch this for merging */
- __REQ_STARTED, /* drive already may have started this one */
- __REQ_DONTPREP, /* don't call prep for this one */
- __REQ_QUEUED, /* uses queueing */
+ __REQ_CMD, /* is a regular fs rw request */
+ __REQ_NOMERGE, /* don't touch this for merging */
+ __REQ_STARTED, /* drive already may have started this one */
+ __REQ_DONTPREP, /* don't call prep for this one */
+ __REQ_QUEUED, /* uses queueing */
/*
* for ATA/ATAPI devices
*/
- __REQ_PC, /* packet command (special) */
- __REQ_BLOCK_PC, /* queued down pc from block layer */
- __REQ_SENSE, /* sense retrival */
+ __REQ_PC, /* packet command (special) */
+ __REQ_BLOCK_PC, /* queued down pc from block layer */
+ __REQ_SENSE, /* sense retrival */
- __REQ_FAILED, /* set if the request failed */
- __REQ_QUIET, /* don't worry about errors */
- __REQ_SPECIAL, /* driver suplied command */
+ __REQ_FAILED, /* set if the request failed */
+ __REQ_QUIET, /* don't worry about errors */
+ __REQ_SPECIAL, /* driver suplied command */
__REQ_DRIVE_CMD,
__REQ_DRIVE_TASK,
__REQ_DRIVE_TASKFILE,
@@ -191,11 +191,11 @@ enum rq_flag_bits {
__REQ_PM_SUSPEND, /* suspend request */
__REQ_PM_RESUME, /* resume request */
__REQ_PM_SHUTDOWN, /* shutdown request */
- __REQ_NR_BITS, /* stops here */
+ __REQ_NR_BITS, /* stops here */
};
#define REQ_RW (1 << __REQ_RW)
-#define REQ_RW_AHEAD (1 << __REQ_RW_AHEAD)
+#define REQ_FAILFAST (1 << __REQ_FAILFAST)
#define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER)
#define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER)
#define REQ_CMD (1 << __REQ_CMD)
@@ -364,6 +364,7 @@ struct request_queue
#define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags)
#define blk_fs_request(rq) ((rq)->flags & REQ_CMD)
#define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC)
+#define blk_noretry_request(rq) ((rq)->flags & REQ_FAILFAST)
#define blk_pm_suspend_request(rq) ((rq)->flags & REQ_PM_SUSPEND)
#define blk_pm_resume_request(rq) ((rq)->flags & REQ_PM_RESUME)
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 55a3278ae951..f82118e5a618 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -281,6 +281,8 @@ struct ethtool_stats {
#define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */
#define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */
#define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */
+#define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */
+#define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */
/* compatibility with older code */
#define SPARC_ETH_GSET ETHTOOL_GSET
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h
index 6b89e9c85f9b..94c967d945e7 100644
--- a/include/linux/hdlc.h
+++ b/include/linux/hdlc.h
@@ -42,6 +42,9 @@
#define LMI_ANSI 2 /* ANSI Annex D */
#define LMI_CCITT 3 /* ITU-T Annex A */
+#define HDLC_MAX_MTU 1500 /* Ethernet 1500 bytes */
+#define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4) /* for ETH+VLAN over FR */
+
#ifdef __KERNEL__
@@ -50,78 +53,6 @@
#include <net/syncppp.h>
#include <linux/hdlc/ioctl.h>
-#define HDLC_MAX_MTU 1500 /* Ethernet 1500 bytes */
-#define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4) /* for ETH+VLAN over FR */
-
-#define MAXLEN_LMISTAT 20 /* max size of status enquiry frame */
-
-#define PVC_STATE_NEW 0x01
-#define PVC_STATE_ACTIVE 0x02
-#define PVC_STATE_FECN 0x08 /* FECN condition */
-#define PVC_STATE_BECN 0x10 /* BECN condition */
-
-
-#define FR_UI 0x03
-#define FR_PAD 0x00
-
-#define NLPID_IP 0xCC
-#define NLPID_IPV6 0x8E
-#define NLPID_SNAP 0x80
-#define NLPID_PAD 0x00
-#define NLPID_Q933 0x08
-
-
-#define LMI_DLCI 0 /* LMI DLCI */
-#define LMI_PROTO 0x08
-#define LMI_CALLREF 0x00 /* Call Reference */
-#define LMI_ANSI_LOCKSHIFT 0x95 /* ANSI lockshift */
-#define LMI_REPTYPE 1 /* report type */
-#define LMI_CCITT_REPTYPE 0x51
-#define LMI_ALIVE 3 /* keep alive */
-#define LMI_CCITT_ALIVE 0x53
-#define LMI_PVCSTAT 7 /* pvc status */
-#define LMI_CCITT_PVCSTAT 0x57
-#define LMI_FULLREP 0 /* full report */
-#define LMI_INTEGRITY 1 /* link integrity report */
-#define LMI_SINGLE 2 /* single pvc report */
-#define LMI_STATUS_ENQUIRY 0x75
-#define LMI_STATUS 0x7D /* reply */
-
-#define LMI_REPT_LEN 1 /* report type element length */
-#define LMI_INTEG_LEN 2 /* link integrity element length */
-
-#define LMI_LENGTH 13 /* standard LMI frame length */
-#define LMI_ANSI_LENGTH 14
-
-
-
-typedef struct {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
- unsigned ea1 : 1;
- unsigned cr : 1;
- unsigned dlcih: 6;
-
- unsigned ea2 : 1;
- unsigned de : 1;
- unsigned becn : 1;
- unsigned fecn : 1;
- unsigned dlcil: 4;
-#elif defined (__BIG_ENDIAN_BITFIELD)
- unsigned dlcih: 6;
- unsigned cr : 1;
- unsigned ea1 : 1;
-
- unsigned dlcil: 4;
- unsigned fecn : 1;
- unsigned becn : 1;
- unsigned de : 1;
- unsigned ea2 : 1;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-}__attribute__ ((packed)) fr_hdr;
-
-
typedef struct { /* Used in Cisco and PPP mode */
u8 address;
@@ -177,14 +108,25 @@ typedef struct hdlc_device_struct {
/* Things below are for HDLC layer internal use only */
- int (*ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
- int (*open)(struct hdlc_device_struct *hdlc);
- void (*stop)(struct hdlc_device_struct *hdlc);
- void (*proto_detach)(struct hdlc_device_struct *hdlc);
- void (*netif_rx)(struct sk_buff *skb);
- unsigned short (*type_trans)(struct sk_buff *skb,
- struct net_device *dev);
- int proto; /* IF_PROTO_HDLC/CISCO/FR/etc. */
+ struct {
+ int (*open)(struct hdlc_device_struct *hdlc);
+ void (*close)(struct hdlc_device_struct *hdlc);
+
+ /* if open & DCD */
+ void (*start)(struct hdlc_device_struct *hdlc);
+ /* if open & !DCD */
+ void (*stop)(struct hdlc_device_struct *hdlc);
+
+ void (*detach)(struct hdlc_device_struct *hdlc);
+ void (*netif_rx)(struct sk_buff *skb);
+ unsigned short (*type_trans)(struct sk_buff *skb,
+ struct net_device *dev);
+ int id; /* IF_PROTO_HDLC/CISCO/FR/etc. */
+ }proto;
+
+ int carrier;
+ int open;
+ spinlock_t state_lock;
union {
struct {
@@ -271,26 +213,11 @@ static __inline__ const char *hdlc_to_name(hdlc_device *hdlc)
}
-static __inline__ u16 q922_to_dlci(u8 *hdr)
-{
- return ((hdr[0] & 0xFC) << 2) | ((hdr[1] & 0xF0) >> 4);
-}
-
-
-
-static __inline__ void dlci_to_q922(u8 *hdr, u16 dlci)
-{
- hdr[0] = (dlci >> 2) & 0xFC;
- hdr[1] = ((dlci << 4) & 0xF0) | 0x01;
-}
-
-
-
static __inline__ void debug_frame(const struct sk_buff *skb)
{
int i;
- for (i=0; i<skb->len; i++) {
+ for (i=0; i < skb->len; i++) {
if (i == 100) {
printk("...\n");
return;
@@ -301,33 +228,19 @@ static __inline__ void debug_frame(const struct sk_buff *skb)
}
-
/* Must be called by hardware driver when HDLC device is being opened */
-static __inline__ int hdlc_open(hdlc_device *hdlc)
-{
- if (hdlc->proto == -1)
- return -ENOSYS; /* no protocol attached */
-
- if (hdlc->open)
- return hdlc->open(hdlc);
- return 0;
-}
-
-
+int hdlc_open(hdlc_device *hdlc);
/* Must be called by hardware driver when HDLC device is being closed */
-static __inline__ void hdlc_close(hdlc_device *hdlc)
-{
- if (hdlc->stop)
- hdlc->stop(hdlc);
-}
-
+void hdlc_close(hdlc_device *hdlc);
+/* Called by hardware driver when DCD line level changes */
+void hdlc_set_carrier(int on, hdlc_device *hdlc);
/* May be used by hardware driver to gain control over HDLC device */
static __inline__ void hdlc_proto_detach(hdlc_device *hdlc)
{
- if (hdlc->proto_detach)
- hdlc->proto_detach(hdlc);
- hdlc->proto_detach = NULL;
+ if (hdlc->proto.detach)
+ hdlc->proto.detach(hdlc);
+ hdlc->proto.detach = NULL;
}
@@ -335,8 +248,8 @@ static __inline__ unsigned short hdlc_type_trans(struct sk_buff *skb,
struct net_device *dev)
{
hdlc_device *hdlc = dev_to_hdlc(skb->dev);
- if (hdlc->type_trans)
- return hdlc->type_trans(skb, dev);
+ if (hdlc->proto.type_trans)
+ return hdlc->proto.type_trans(skb, dev);
else
return __constant_htons(ETH_P_HDLC);
}
diff --git a/include/linux/netfilter_bridge/ebt_stp.h b/include/linux/netfilter_bridge/ebt_stp.h
new file mode 100644
index 000000000000..e5fd67850f4d
--- /dev/null
+++ b/include/linux/netfilter_bridge/ebt_stp.h
@@ -0,0 +1,46 @@
+#ifndef __LINUX_BRIDGE_EBT_STP_H
+#define __LINUX_BRIDGE_EBT_STP_H
+
+#define EBT_STP_TYPE 0x0001
+
+#define EBT_STP_FLAGS 0x0002
+#define EBT_STP_ROOTPRIO 0x0004
+#define EBT_STP_ROOTADDR 0x0008
+#define EBT_STP_ROOTCOST 0x0010
+#define EBT_STP_SENDERPRIO 0x0020
+#define EBT_STP_SENDERADDR 0x0040
+#define EBT_STP_PORT 0x0080
+#define EBT_STP_MSGAGE 0x0100
+#define EBT_STP_MAXAGE 0x0200
+#define EBT_STP_HELLOTIME 0x0400
+#define EBT_STP_FWDD 0x0800
+
+#define EBT_STP_MASK 0x0fff
+#define EBT_STP_CONFIG_MASK 0x0ffe
+
+#define EBT_STP_MATCH "stp"
+
+struct ebt_stp_config_info
+{
+ uint8_t flags;
+ uint16_t root_priol, root_priou;
+ char root_addr[6], root_addrmsk[6];
+ uint32_t root_costl, root_costu;
+ uint16_t sender_priol, sender_priou;
+ char sender_addr[6], sender_addrmsk[6];
+ uint16_t portl, portu;
+ uint16_t msg_agel, msg_ageu;
+ uint16_t max_agel, max_ageu;
+ uint16_t hello_timel, hello_timeu;
+ uint16_t forward_delayl, forward_delayu;
+};
+
+struct ebt_stp_info
+{
+ uint8_t type;
+ struct ebt_stp_config_info config;
+ uint16_t bitmask;
+ uint16_t invflags;
+};
+
+#endif
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h
index cf3a2f162239..fbfa0f52fdc9 100644
--- a/include/linux/pfkeyv2.h
+++ b/include/linux/pfkeyv2.h
@@ -190,7 +190,9 @@ struct sadb_x_ipsecrequest {
uint16_t sadb_x_ipsecrequest_proto;
uint8_t sadb_x_ipsecrequest_mode;
uint8_t sadb_x_ipsecrequest_level;
- uint16_t sadb_x_ipsecrequest_reqid;
+ uint16_t sadb_x_ipsecrequest_reserved1;
+ uint32_t sadb_x_ipsecrequest_reqid;
+ uint32_t sadb_x_ipsecrequest_reserved2;
} __attribute__((packed));
/* sizeof(struct sadb_x_ipsecrequest) == 16 */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index bf740af246c0..b20db4e5fbfa 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -487,6 +487,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#define PF_SWAPOFF 0x00080000 /* I am in swapoff */
#define PF_LESS_THROTTLE 0x01000000 /* Throttle me less: I clena memory */
#define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */
+#define PF_READAHEAD 0x00400000 /* I am doing read-ahead */
#ifdef CONFIG_SMP
extern int set_cpus_allowed(task_t *p, unsigned long new_mask);
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index d660c5f97c58..64ea125f3562 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -126,7 +126,7 @@ enum
struct xfrm_user_tmpl {
struct xfrm_id id;
xfrm_address_t saddr;
- __u16 reqid;
+ __u32 reqid;
__u8 mode;
__u8 share;
__u8 optional;
@@ -162,8 +162,8 @@ struct xfrm_usersa_info {
struct xfrm_lifetime_cur curlft;
struct xfrm_stats stats;
__u32 seq;
+ __u32 reqid;
__u16 family;
- __u16 reqid;
__u8 mode; /* 0=transport,1=tunnel */
__u8 replay_window;
};
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index c421186227f7..8654632ff46f 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -45,7 +45,8 @@ extern int ip6_del_rt(struct rt6_info *,
void *rtattr);
extern int ip6_rt_addr_add(struct in6_addr *addr,
- struct net_device *dev);
+ struct net_device *dev,
+ int anycast);
extern int ip6_rt_addr_del(struct in6_addr *addr,
struct net_device *dev);
@@ -118,5 +119,12 @@ static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst,
write_unlock(&sk->sk_dst_lock);
}
+static inline int ipv6_unicast_destination(struct sk_buff *skb)
+{
+ struct rt6_info *rt = (struct rt6_info *) skb->dst;
+
+ return rt->rt6i_flags & RTF_LOCAL;
+}
+
#endif
#endif
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 5c6546accda9..8aeb974d8592 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -51,7 +51,7 @@
/*
* Addr type
*
- * type - unicast | multicast | anycast
+ * type - unicast | multicast
* scope - local | site | global
* v4 - compat
* v4mapped
@@ -63,7 +63,6 @@
#define IPV6_ADDR_UNICAST 0x0001U
#define IPV6_ADDR_MULTICAST 0x0002U
-#define IPV6_ADDR_ANYCAST 0x0004U
#define IPV6_ADDR_LOOPBACK 0x0010U
#define IPV6_ADDR_LINKLOCAL 0x0020U
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 3793352764c0..506fd2cb1305 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -588,6 +588,7 @@ struct sctp6_sock {
#endif /* CONFIG_IPV6 */
#define sctp_sk(__sk) (&((struct sctp_sock *)__sk)->sctp)
+#define sctp_opt2sk(__sp) &container_of(__sp, struct sctp_sock, sctp)->sk
/* Is a socket of this style? */
#define sctp_style(sk, style) __sctp_style((sk), (SCTP_SOCKET_##style))
@@ -611,4 +612,23 @@ int static inline __sctp_sstate(const struct sock *sk, sctp_sock_state_t state)
return sk->sk_state == state;
}
+/* Map v4-mapped v6 address back to v4 address */
+static inline void sctp_v6_map_v4(union sctp_addr *addr)
+{
+ addr->v4.sin_family = AF_INET;
+ addr->v4.sin_port = addr->v6.sin6_port;
+ addr->v4.sin_addr.s_addr = addr->v6.sin6_addr.s6_addr32[3];
+}
+
+/* Map v4 address to v4-mapped v6 address */
+static inline void sctp_v4_map_v6(union sctp_addr *addr)
+{
+ addr->v6.sin6_family = AF_INET6;
+ addr->v6.sin6_port = addr->v4.sin_port;
+ addr->v6.sin6_addr.s6_addr32[3] = addr->v4.sin_addr.s_addr;
+ addr->v6.sin6_addr.s6_addr32[0] = 0;
+ addr->v6.sin6_addr.s6_addr32[1] = 0;
+ addr->v6.sin6_addr.s6_addr32[2] = htonl(0x0000ffff);
+}
+
#endif /* __net_sctp_h__ */
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index e9814d30bd46..a779754deaf6 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -231,7 +231,8 @@ struct sctp_chunk *sctp_make_data_empty(struct sctp_association *,
struct sctp_chunk *sctp_make_ecne(const struct sctp_association *,
const __u32);
struct sctp_chunk *sctp_make_sack(const struct sctp_association *);
-struct sctp_chunk *sctp_make_shutdown(const struct sctp_association *asoc);
+struct sctp_chunk *sctp_make_shutdown(const struct sctp_association *asoc,
+ const struct sctp_chunk *chunk);
struct sctp_chunk *sctp_make_shutdown_ack(const struct sctp_association *asoc,
const struct sctp_chunk *);
struct sctp_chunk *sctp_make_shutdown_complete(const struct sctp_association *,
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 94bebc0b7ce0..aae255de586b 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -260,11 +260,13 @@ struct sctp_af {
struct sock *sk);
void (*to_sk_daddr) (union sctp_addr *,
struct sock *sk);
- int (*addr_valid) (union sctp_addr *);
+ int (*addr_valid) (union sctp_addr *,
+ struct sctp_opt *);
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 *);
+ int (*available) (union sctp_addr *,
+ struct sctp_opt *);
int (*skb_iif) (const struct sk_buff *sk);
int (*is_ce) (const struct sk_buff *sk);
void (*seq_dump_addr)(struct seq_file *seq,
@@ -282,7 +284,7 @@ int sctp_register_af(struct sctp_af *);
struct sctp_pf {
void (*event_msgname)(struct sctp_ulpevent *, char *, int *);
void (*skb_msgname) (struct sk_buff *, char *, int *);
- int (*af_supported) (sa_family_t);
+ int (*af_supported) (sa_family_t, struct sctp_opt *);
int (*cmp_addr) (const union sctp_addr *,
const union sctp_addr *,
struct sctp_opt *);
@@ -291,6 +293,7 @@ struct sctp_pf {
int (*supported_addrs)(const struct sctp_opt *, __u16 *);
struct sock *(*create_accept_sk) (struct sock *sk,
struct sctp_association *asoc);
+ void (*addr_v4map) (struct sctp_opt *, union sctp_addr *);
struct sctp_af *af;
};
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h
index d3ad0c86583d..949a23835584 100644
--- a/include/net/sctp/ulpevent.h
+++ b/include/net/sctp/ulpevent.h
@@ -40,6 +40,7 @@
* Jon Grimm <jgrimm@us.ibm.com>
* La Monte H.P. Yarroll <piggy@acm.org>
* Karl Knutson <karl@athena.chicago.il.us>
+ * Sridhar Samudrala <sri@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.
@@ -53,7 +54,6 @@
* growing this structure as it is at the maximum limit now.
*/
struct sctp_ulpevent {
- struct sctp_association *asoc;
struct sctp_sndrcvinfo sndrcvinfo;
int msg_flags;
int iif;
@@ -72,9 +72,10 @@ static inline struct sctp_ulpevent *sctp_skb2event(struct sk_buff *skb)
}
struct sctp_ulpevent *sctp_ulpevent_new(int size, int flags, int gfp);
-struct sctp_ulpevent *sctp_ulpevent_init(struct sctp_ulpevent *, int flags);
+void sctp_ulpevent_init(struct sctp_ulpevent *, int flags);
void sctp_ulpevent_free(struct sctp_ulpevent *);
int sctp_ulpevent_is_notification(const struct sctp_ulpevent *);
+void sctp_queue_purge_ulpevents(struct sk_buff_head *list);
struct sctp_ulpevent *sctp_ulpevent_make_assoc_change(
const struct sctp_association *asoc,
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index 284ef27894ca..da96859dba92 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -1,38 +1,39 @@
/* 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-2003 International Business Machines, Corp.
+ * Copyright (c) 2002 Intel Corp.
+ *
* This file is part of the SCTP kernel reference Implementation
- *
+ *
* This header represents the structures and constants needed to support
- * the SCTP Extension to the Sockets API.
- *
- * The SCTP reference implementation is free software;
- * you can redistribute it and/or modify it under the terms of
+ * the SCTP Extension to the Sockets API.
+ *
+ * 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>
* R. Stewart <randall@sctp.chicago.il.us>
* K. Morneau <kmorneau@cisco.com>
@@ -41,61 +42,62 @@
* Jon Grimm <jgrimm@us.ibm.com>
* Daisy Chang <daisyc@us.ibm.com>
* Ryan Layer <rmlayer@us.ibm.com>
- *
- *
+ * Ardelle Fan <ardelle.fan@intel.com>
+ * Sridhar Samudrala <sri@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.
*/
-#include <linux/types.h>
-#include <linux/socket.h>
#ifndef __net_sctp_user_h__
#define __net_sctp_user_h__
+#include <linux/types.h>
+#include <linux/socket.h>
typedef void * sctp_assoc_t;
/* The following symbols come from the Sockets API Extensions for
- * SCTP <draft-ietf-tsvwg-sctpsocket-04.txt>.
+ * SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>.
*/
enum sctp_optname {
SCTP_RTOINFO,
#define SCTP_RTOINFO SCTP_RTOINFO
- SCTP_ASSOCRTXINFO,
-#define SCTP_ASSOCRTXINFO SCTP_ASSOCRTXINFO
+ SCTP_ASSOCINFO,
+#define SCTP_ASSOCINFO SCTP_ASSOCINFO
SCTP_INITMSG,
#define SCTP_INITMSG SCTP_INITMSG
- SCTP_AUTO_CLOSE,
-#define SCTP_AUTO_CLOSE SCTP_AUTO_CLOSE
- SCTP_SET_PRIMARY_ADDR,
-#define SCTP_SET_PRIMARY_ADDR SCTP_SET_PRIMARY_ADDR
+ SCTP_NODELAY, /* Get/set nodelay option. */
+#define SCTP_NODELAY SCTP_NODELAY
+ SCTP_AUTOCLOSE,
+#define SCTP_AUTOCLOSE SCTP_AUTOCLOSE
SCTP_SET_PEER_PRIMARY_ADDR,
#define SCTP_SET_PEER_PRIMARY_ADDR SCTP_SET_PEER_PRIMARY_ADDR
- SCTP_SET_ADAPTATION_LAYER,
-#define SCTP_SET_ADAPTATION_LAYER SCTP_SET_ADAPTATION_LAYER
- SCTP_SET_STREAM_TIMEOUTS,
-#define SCTP_SET_STREAM_TIMEOUTS SCTP_SET_STREAM_TIMEOUTS
+ SCTP_PRIMARY_ADDR,
+#define SCTP_PRIMARY_ADDR SCTP_PRIMARY_ADDR
+ SCTP_ADAPTION_LAYER,
+#define SCTP_ADAPTION_LAYER SCTP_ADAPTION_LAYER
SCTP_DISABLE_FRAGMENTS,
#define SCTP_DISABLE_FRAGMENTS SCTP_DISABLE_FRAGMENTS
- SCTP_SET_PEER_ADDR_PARAMS,
-#define SCTP_SET_PEER_ADDR_PARAMS SCTP_SET_PEER_ADDR_PARAMS
- SCTP_GET_PEER_ADDR_PARAMS,
-#define SCTP_GET_PEER_ADDR_PARAMS SCTP_GET_PEER_ADDR_PARAMS
+ SCTP_PEER_ADDR_PARAMS,
+#define SCTP_PEER_ADDR_PARAMS SCTP_PEER_ADDR_PARAMS
+ SCTP_DEFAULT_SEND_PARAM,
+#define SCTP_DEFAULT_SEND_PARAM SCTP_DEFAULT_SEND_PARAM
+ SCTP_EVENTS,
+#define SCTP_EVENTS SCTP_EVENTS
+ SCTP_I_WANT_MAPPED_V4_ADDR, /* Turn on/off mapped v4 addresses */
+#define SCTP_I_WANT_MAPPED_V4_ADDR SCTP_I_WANT_MAPPED_V4_ADDR
+ SCTP_MAXSEG, /* Get/set maximum fragment. */
+#define SCTP_MAXSEG SCTP_MAXSEG
SCTP_STATUS,
#define SCTP_STATUS SCTP_STATUS
SCTP_GET_PEER_ADDR_INFO,
#define SCTP_GET_PEER_ADDR_INFO SCTP_GET_PEER_ADDR_INFO
- SCTP_SET_EVENTS,
-#define SCTP_SET_EVENTS SCTP_SET_EVENTS
- SCTP_AUTOCLOSE,
-#define SCTP_AUTOCLOSE SCTP_AUTOCLOSE
- SCTP_SET_DEFAULT_SEND_PARAM,
-#define SCTP_SET_DEFAULT_SEND_PARAM SCTP_SET_DEFAULT_SEND_PARAM
-
- SCTP_SOCKOPT_DEBUG_NAME = 42, /* FIXME */
-#define SCTP_SOCKOPT_DEBUG_NAME SCTP_SOCKOPT_DEBUG_NAME
- SCTP_SOCKOPT_BINDX_ADD, /* BINDX requests for adding addresses. */
+ /* Internal Socket Options. Some of the sctp library functions are
+ * implemented using these socket options.
+ */
+ SCTP_SOCKOPT_BINDX_ADD = 100,/* BINDX requests for adding addresses. */
#define SCTP_SOCKOPT_BINDX_ADD SCTP_SOCKOPT_BINDX_ADD
SCTP_SOCKOPT_BINDX_REM, /* BINDX requests for removing addresses. */
#define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM
@@ -109,29 +111,8 @@ enum sctp_optname {
#define SCTP_GET_LOCAL_ADDRS_NUM SCTP_GET_LOCAL_ADDRS_NUM
SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */
#define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS
- SCTP_NODELAY, /* Get/set nodelay option. */
-#define SCTP_NODELAY SCTP_NODELAY
- SCTP_I_WANT_MAPPED_V4_ADDR, /* Turn on/off mapped v4 addresses */
-#define SCTP_I_WANT_MAPPED_V4_ADDR SCTP_I_WANT_MAPPED_V4_ADDR
- SCTP_MAXSEG, /* Get/set maximum fragment. */
-#define SCTP_MAXSEG SCTP_MAXSEG
};
-
-/*
- * 5.2 SCTP msg_control Structures
- *
- * A key element of all SCTP-specific socket extensions is the use of
- * ancillary data to specify and access SCTP-specific data via the
- * struct msghdr's msg_control member used in sendmsg() and recvmsg().
- * Fine-grained control over initialization and sending parameters are
- * handled with ancillary data.
- *
- * Each ancillary data item is preceeded by a struct cmsghdr (see
- * Section 5.1), which defines the function and purpose of the data
- * contained in in the cmsg_data[] member.
- */
-
/*
* 5.2.1 SCTP Initiation Structure (SCTP_INIT)
*
@@ -152,7 +133,6 @@ struct sctp_initmsg {
__u16 sinit_max_init_timeo;
};
-
/*
* 5.2.2 SCTP Header Information Structure (SCTP_SNDRCV)
*
@@ -214,7 +194,6 @@ typedef enum sctp_cmsg_type {
* following format:
*
*/
-
struct sctp_assoc_change {
__u16 sac_type;
__u16 sac_flags;
@@ -267,11 +246,11 @@ struct sctp_paddr_change {
* event that happened to the address. They include:
*/
enum sctp_spc_state {
- ADDRESS_AVAILABLE,
- ADDRESS_UNREACHABLE,
- ADDRESS_REMOVED,
- ADDRESS_ADDED,
- ADDRESS_MADE_PRIM,
+ SCTP_ADDR_REACHABLE,
+ SCTP_ADDR_UNREACHABLE,
+ SCTP_ADDR_REMOVED,
+ SCTP_ADDR_ADDED,
+ SCTP_ADDR_MADE_PRIM,
};
@@ -290,7 +269,6 @@ struct sctp_remote_error {
__u16 sre_flags;
__u32 sre_length;
__u16 sre_error;
- __u16 sre_len;
sctp_assoc_t sre_assoc_id;
__u8 sre_data[0];
};
@@ -324,7 +302,6 @@ struct sctp_send_failed {
* Note that this does not necessarily mean that the
* data was (or was not) successfully delivered.
*/
-
enum sctp_ssf_flags {
SCTP_DATA_UNSENT,
SCTP_DATA_SENT,
@@ -336,7 +313,6 @@ enum sctp_ssf_flags {
* When a peer sends a SHUTDOWN, SCTP delivers this notification to
* inform the application that it should cease sending data.
*/
-
struct sctp_shutdown_event {
__u16 sse_type;
__u16 sse_flags;
@@ -355,8 +331,8 @@ struct sctp_adaption_event {
__u16 sai_type;
__u16 sai_flags;
__u32 sai_length;
- __u32 sai_adaptation_bits;
- sctp_assoc_t sse_assoc_id;
+ __u32 sai_adaption_ind;
+ sctp_assoc_t sai_assoc_id;
};
/*
@@ -366,8 +342,7 @@ struct sctp_adaption_event {
* message this notification will be used to inidicate
* various events.
*/
-
-struct sctp_rcv_pdapi_event {
+struct sctp_pdapi_event {
__u16 pdapi_type;
__u16 pdapi_flags;
__u32 pdapi_length;
@@ -404,14 +379,14 @@ union sctp_notification {
__u16 sn_type; /* Notification type. */
__u16 sn_flags;
__u32 sn_length;
- } h;
+ } sn_header;
struct sctp_assoc_change sn_assoc_change;
- struct sctp_paddr_change sn_padr_change;
+ struct sctp_paddr_change sn_paddr_change;
struct sctp_remote_error sn_remote_error;
struct sctp_send_failed sn_send_failed;
struct sctp_shutdown_event sn_shutdown_event;
struct sctp_adaption_event sn_adaption_event;
- struct sctp_rcv_pdapi_event sn_rcv_pdapi_event;
+ struct sctp_pdapi_event sn_pdapi_event;
};
/* Section 5.3.1
@@ -448,75 +423,25 @@ typedef enum sctp_sn_error {
} sctp_sn_error_t;
/*
- *
- * 7.1.14 Peer Address Parameters
- *
- * Applications can enable or disable heartbeats for any peer address
- * of an association, modify an address's heartbeat interval, force a
- * heartbeat to be sent immediately, and adjust the address's maximum
- * number of retransmissions sent before an address is considered
- * unreachable. The following structure is used to access and modify an
- * address's parameters:
- */
-
-struct sctp_paddrparams {
- struct sockaddr_storage spp_address;
- __u32 spp_hbinterval;
- __u16 spp_pathmaxrxt;
- sctp_assoc_t spp_assoc_id;
-};
-
-/*
- * 7.2.2 Peer Address Information
- *
- * Applications can retrieve information about a specific peer address
- * of an association, including its reachability state, congestion
- * window, and retransmission timer values. This information is
- * read-only. The following structure is used to access this
- * information:
- */
-
-struct sctp_paddrinfo {
- sctp_assoc_t spinfo_assoc_id;
- struct sockaddr_storage spinfo_address;
- __s32 spinfo_state;
- __u32 spinfo_cwnd;
- __u32 spinfo_srtt;
- __u32 spinfo_rto;
- __u32 spinfo_mtu;
-};
-
-/* Peer addresses's state. */
-enum sctp_spinfo_state {
- SCTP_INACTIVE,
- SCTP_ACTIVE,
-};
-
-/*
* 7.1.1 Retransmission Timeout Parameters (SCTP_RTOINFO)
*
* The protocol parameters used to initialize and bound retransmission
* timeout (RTO) are tunable. See [SCTP] for more information on how
- * these parameters are used in RTO calculation. The peer address
- * parameter is ignored for TCP style socket.
+ * these parameters are used in RTO calculation.
*/
-
struct sctp_rtoinfo {
+ sctp_assoc_t srto_assoc_id;
__u32 srto_initial;
__u32 srto_max;
__u32 srto_min;
- sctp_assoc_t srto_assoc_id;
};
/*
- * 7.1.2 Association Retransmission Parameter (SCTP_ASSOCRTXINFO)
+ * 7.1.2 Association Parameters (SCTP_ASSOCINFO)
*
- * The protocol parameter used to set the number of retransmissions
- * sent before an association is considered unreachable.
- * See [SCTP] for more information on how this parameter is used. The
- * peer address parameter is ignored for TCP style socket.
+ * This option is used to both examine and set various association and
+ * endpoint parameters.
*/
-
struct sctp_assocparams {
sctp_assoc_t sasoc_assoc_id;
__u16 sasoc_asocmaxrxt;
@@ -527,31 +452,81 @@ struct sctp_assocparams {
};
/*
- * 7.1.9 Set Primary Address (SCTP_SET_PRIMARY_ADDR)
+ * 7.1.9 Set Peer Primary Address (SCTP_SET_PEER_PRIMARY_ADDR)
*
* Requests that the peer mark the enclosed address as the association
* primary. The enclosed address must be one of the association's
* locally bound addresses. The following structure is used to make a
* set primary request:
*/
-
-struct sctp_setprim {
- struct sockaddr_storage ssp_addr;
- sctp_assoc_t ssp_assoc_id;
+struct sctp_setpeerprim {
+ sctp_assoc_t sspp_assoc_id;
+ struct sockaddr_storage sspp_addr;
};
/*
- * 7.1.10 Set Peer Primary Address (SCTP_SET_PEER_PRIMARY_ADDR)
+ * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR)
*
* Requests that the local SCTP stack use the enclosed peer address as
* the association primary. The enclosed address must be one of the
* association peer's addresses. The following structure is used to
* make a set peer primary request:
*/
+struct sctp_prim {
+ sctp_assoc_t ssp_assoc_id;
+ struct sockaddr_storage ssp_addr;
+};
-struct sctp_setpeerprim {
- struct sockaddr_storage sspp_addr;
- sctp_assoc_t sspp_assoc_id;
+/*
+ * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER)
+ *
+ * Requests that the local endpoint set the specified Adaption Layer
+ * Indication parameter for all future INIT and INIT-ACK exchanges.
+ */
+struct sctp_setadaption {
+ __u32 ssb_adaption_ind;
+};
+
+/*
+ * 7.1.13 Peer Address Parameters (SCTP_PEER_ADDR_PARAMS)
+ *
+ * Applications can enable or disable heartbeats for any peer address
+ * of an association, modify an address's heartbeat interval, force a
+ * heartbeat to be sent immediately, and adjust the address's maximum
+ * number of retransmissions sent before an address is considered
+ * unreachable. The following structure is used to access and modify an
+ * address's parameters:
+ */
+struct sctp_paddrparams {
+ sctp_assoc_t spp_assoc_id;
+ struct sockaddr_storage spp_address;
+ __u32 spp_hbinterval;
+ __u16 spp_pathmaxrxt;
+};
+
+/*
+ * 7.2.2 Peer Address Information
+ *
+ * Applications can retrieve information about a specific peer address
+ * of an association, including its reachability state, congestion
+ * window, and retransmission timer values. This information is
+ * read-only. The following structure is used to access this
+ * information:
+ */
+struct sctp_paddrinfo {
+ sctp_assoc_t spinfo_assoc_id;
+ struct sockaddr_storage spinfo_address;
+ __s32 spinfo_state;
+ __u32 spinfo_cwnd;
+ __u32 spinfo_srtt;
+ __u32 spinfo_rto;
+ __u32 spinfo_mtu;
+};
+
+/* Peer addresses's state. */
+enum sctp_spinfo_state {
+ SCTP_INACTIVE,
+ SCTP_ACTIVE,
};
/*
@@ -575,34 +550,8 @@ struct sctp_status {
struct sctp_paddrinfo sstat_primary;
};
-
-/*
- * 7.1.12 Set Adaption Layer Indicator
- *
- * Requests that the local endpoint set the specified Adaption Layer
- * Indication parameter for all future
- * INIT and INIT-ACK exchanges.
- */
-
-struct sctp_setadaption {
- __u32 ssb_adaption_ind;
-};
-
-/*
- * 7.1.12 Set default message time outs (SCTP_SET_STREAM_TIMEOUTS)
- *
- * This option requests that the requested stream apply a
- * default time-out for messages in queue.
- */
-struct sctp_setstrm_timeout {
- sctp_assoc_t ssto_assoc_id;
- __u32 ssto_timeout;
- __u16 ssto_streamid_start;
- __u16 ssto_streamid_end;
-};
-
/*
- * 8.3 8.5 get all peer/local addresses on a socket
+ * 8.3, 8.5 get all peer/local addresses on a socket
* This parameter struct is for getsockopt
*/
struct sctp_getaddrs {
@@ -624,8 +573,8 @@ enum sctp_msg_flags {
* The flags parameter is formed from the bitwise OR of zero or more of the
* following currently defined flags:
*/
-#define BINDX_ADD_ADDR 0x01
-#define BINDX_REM_ADDR 0x02
+#define SCTP_BINDX_ADD_ADDR 0x01
+#define SCTP_BINDX_REM_ADDR 0x02
/* This is the structure that is passed as an argument(optval) to
* getsockopt(SCTP_SOCKOPT_PEELOFF).
@@ -636,6 +585,3 @@ typedef struct {
} sctp_peeloff_arg_t;
#endif /* __net_sctp_user_h__ */
-
-
-
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 4cb71a1e0313..e4618023716d 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -104,10 +104,10 @@ struct xfrm_state
/* Parameters of this state. */
struct {
+ u32 reqid;
u8 mode;
u8 replay_window;
u8 aalgo, ealgo, calgo;
- u16 reqid;
u16 family;
xfrm_address_t saddr;
int header_len;
@@ -193,7 +193,7 @@ struct xfrm_state_afinfo {
struct xfrm_tmpl *tmpl,
xfrm_address_t *daddr, xfrm_address_t *saddr);
struct xfrm_state *(*state_lookup)(xfrm_address_t *daddr, u32 spi, u8 proto);
- struct xfrm_state *(*find_acq)(u8 mode, u16 reqid, u8 proto,
+ struct xfrm_state *(*find_acq)(u8 mode, u32 reqid, u8 proto,
xfrm_address_t *daddr, xfrm_address_t *saddr,
int create);
};
@@ -244,7 +244,7 @@ struct xfrm_tmpl
/* Source address of tunnel. Ignored, if it is not a tunnel. */
xfrm_address_t saddr;
- __u16 reqid;
+ __u32 reqid;
/* Mode: transport/tunnel */
__u8 mode;
@@ -801,7 +801,7 @@ struct xfrm_policy *xfrm_policy_byid(int dir, u32 id, int delete);
void xfrm_policy_flush(void);
u32 xfrm_get_acqseq(void);
void xfrm_alloc_spi(struct xfrm_state *x, u32 minspi, u32 maxspi);
-struct xfrm_state * xfrm_find_acq(u8 mode, u16 reqid, u8 proto,
+struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto,
xfrm_address_t *daddr, xfrm_address_t *saddr,
int create, unsigned short family);
extern void xfrm_policy_flush(void);