aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ieee80211.h4
-rw-r--r--include/net/netfilter/nf_conntrack_l3proto.h15
-rw-r--r--include/net/route.h5
-rw-r--r--include/net/sctp/sctp.h2
-rw-r--r--include/net/sctp/structs.h91
-rw-r--r--include/net/sock.h8
6 files changed, 72 insertions, 53 deletions
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index df05f468fa5c..9a92aef8b0b2 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -803,9 +803,9 @@ enum ieee80211_state {
803#define IEEE80211_24GHZ_MAX_CHANNEL 14 803#define IEEE80211_24GHZ_MAX_CHANNEL 14
804#define IEEE80211_24GHZ_CHANNELS 14 804#define IEEE80211_24GHZ_CHANNELS 14
805 805
806#define IEEE80211_52GHZ_MIN_CHANNEL 36 806#define IEEE80211_52GHZ_MIN_CHANNEL 34
807#define IEEE80211_52GHZ_MAX_CHANNEL 165 807#define IEEE80211_52GHZ_MAX_CHANNEL 165
808#define IEEE80211_52GHZ_CHANNELS 32 808#define IEEE80211_52GHZ_CHANNELS 131
809 809
810enum { 810enum {
811 IEEE80211_CH_PASSIVE_ONLY = (1 << 0), 811 IEEE80211_CH_PASSIVE_ONLY = (1 << 0),
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
index 67856eb93b43..dac43b15a5b0 100644
--- a/include/net/netfilter/nf_conntrack_l3proto.h
+++ b/include/net/netfilter/nf_conntrack_l3proto.h
@@ -88,12 +88,6 @@ extern struct nf_conntrack_l3proto *nf_ct_l3protos[AF_MAX];
88extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); 88extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto);
89extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); 89extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto);
90 90
91static inline struct nf_conntrack_l3proto *
92__nf_ct_l3proto_find(u_int16_t l3proto)
93{
94 return nf_ct_l3protos[l3proto];
95}
96
97extern struct nf_conntrack_l3proto * 91extern struct nf_conntrack_l3proto *
98nf_ct_l3proto_find_get(u_int16_t l3proto); 92nf_ct_l3proto_find_get(u_int16_t l3proto);
99 93
@@ -103,4 +97,13 @@ extern void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p);
103extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; 97extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4;
104extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6; 98extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6;
105extern struct nf_conntrack_l3proto nf_conntrack_generic_l3proto; 99extern struct nf_conntrack_l3proto nf_conntrack_generic_l3proto;
100
101static inline struct nf_conntrack_l3proto *
102__nf_ct_l3proto_find(u_int16_t l3proto)
103{
104 if (unlikely(l3proto >= AF_MAX))
105 return &nf_conntrack_generic_l3proto;
106 return nf_ct_l3protos[l3proto];
107}
108
106#endif /*_NF_CONNTRACK_L3PROTO_H*/ 109#endif /*_NF_CONNTRACK_L3PROTO_H*/
diff --git a/include/net/route.h b/include/net/route.h
index e3e5436f8017..9c04f15090d2 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -170,8 +170,8 @@ static inline int ip_route_connect(struct rtable **rp, u32 dst,
170 return ip_route_output_flow(rp, &fl, sk, 0); 170 return ip_route_output_flow(rp, &fl, sk, 0);
171} 171}
172 172
173static inline int ip_route_newports(struct rtable **rp, u16 sport, u16 dport, 173static inline int ip_route_newports(struct rtable **rp, u8 protocol,
174 struct sock *sk) 174 u16 sport, u16 dport, struct sock *sk)
175{ 175{
176 if (sport != (*rp)->fl.fl_ip_sport || 176 if (sport != (*rp)->fl.fl_ip_sport ||
177 dport != (*rp)->fl.fl_ip_dport) { 177 dport != (*rp)->fl.fl_ip_dport) {
@@ -180,6 +180,7 @@ static inline int ip_route_newports(struct rtable **rp, u16 sport, u16 dport,
180 memcpy(&fl, &(*rp)->fl, sizeof(fl)); 180 memcpy(&fl, &(*rp)->fl, sizeof(fl));
181 fl.fl_ip_sport = sport; 181 fl.fl_ip_sport = sport;
182 fl.fl_ip_dport = dport; 182 fl.fl_ip_dport = dport;
183 fl.proto = protocol;
183 ip_rt_put(*rp); 184 ip_rt_put(*rp);
184 *rp = NULL; 185 *rp = NULL;
185 return ip_route_output_flow(rp, &fl, sk, 0); 186 return ip_route_output_flow(rp, &fl, sk, 0);
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index a553f39f6aee..e673b2c984e9 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -175,6 +175,8 @@ void sctp_icmp_frag_needed(struct sock *, struct sctp_association *,
175void sctp_icmp_proto_unreachable(struct sock *sk, 175void sctp_icmp_proto_unreachable(struct sock *sk,
176 struct sctp_association *asoc, 176 struct sctp_association *asoc,
177 struct sctp_transport *t); 177 struct sctp_transport *t);
178void sctp_backlog_migrate(struct sctp_association *assoc,
179 struct sock *oldsk, struct sock *newsk);
178 180
179/* 181/*
180 * Section: Macros, externs, and inlines 182 * Section: Macros, externs, and inlines
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index f5c22d77feab..072f407848a6 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -127,9 +127,9 @@ extern struct sctp_globals {
127 * RTO.Alpha - 1/8 (3 when converted to right shifts.) 127 * RTO.Alpha - 1/8 (3 when converted to right shifts.)
128 * RTO.Beta - 1/4 (2 when converted to right shifts.) 128 * RTO.Beta - 1/4 (2 when converted to right shifts.)
129 */ 129 */
130 __u32 rto_initial; 130 unsigned long rto_initial;
131 __u32 rto_min; 131 unsigned long rto_min;
132 __u32 rto_max; 132 unsigned long rto_max;
133 133
134 /* Note: rto_alpha and rto_beta are really defined as inverse 134 /* Note: rto_alpha and rto_beta are really defined as inverse
135 * powers of two to facilitate integer operations. 135 * powers of two to facilitate integer operations.
@@ -140,12 +140,18 @@ extern struct sctp_globals {
140 /* Max.Burst - 4 */ 140 /* Max.Burst - 4 */
141 int max_burst; 141 int max_burst;
142 142
143 /* Valid.Cookie.Life - 60 seconds */
144 int valid_cookie_life;
145
146 /* Whether Cookie Preservative is enabled(1) or not(0) */ 143 /* Whether Cookie Preservative is enabled(1) or not(0) */
147 int cookie_preserve_enable; 144 int cookie_preserve_enable;
148 145
146 /* Valid.Cookie.Life - 60 seconds */
147 unsigned long valid_cookie_life;
148
149 /* Delayed SACK timeout 200ms default*/
150 unsigned long sack_timeout;
151
152 /* HB.interval - 30 seconds */
153 unsigned long hb_interval;
154
149 /* Association.Max.Retrans - 10 attempts 155 /* Association.Max.Retrans - 10 attempts
150 * Path.Max.Retrans - 5 attempts (per destination address) 156 * Path.Max.Retrans - 5 attempts (per destination address)
151 * Max.Init.Retransmits - 8 attempts 157 * Max.Init.Retransmits - 8 attempts
@@ -168,12 +174,6 @@ extern struct sctp_globals {
168 */ 174 */
169 int rcvbuf_policy; 175 int rcvbuf_policy;
170 176
171 /* Delayed SACK timeout 200ms default*/
172 int sack_timeout;
173
174 /* HB.interval - 30 seconds */
175 int hb_interval;
176
177 /* The following variables are implementation specific. */ 177 /* The following variables are implementation specific. */
178 178
179 /* Default initialization values to be applied to new associations. */ 179 /* Default initialization values to be applied to new associations. */
@@ -405,8 +405,9 @@ struct sctp_cookie {
405/* The format of our cookie that we send to our peer. */ 405/* The format of our cookie that we send to our peer. */
406struct sctp_signed_cookie { 406struct sctp_signed_cookie {
407 __u8 signature[SCTP_SECRET_SIZE]; 407 __u8 signature[SCTP_SECRET_SIZE];
408 __u32 __pad; /* force sctp_cookie alignment to 64 bits */
408 struct sctp_cookie c; 409 struct sctp_cookie c;
409}; 410} __attribute__((packed));
410 411
411/* This is another convenience type to allocate memory for address 412/* This is another convenience type to allocate memory for address
412 * params for the maximum size and pass such structures around 413 * params for the maximum size and pass such structures around
@@ -699,7 +700,7 @@ struct sctp_chunk {
699 __u8 ecn_ce_done; /* Have we processed the ECN CE bit? */ 700 __u8 ecn_ce_done; /* Have we processed the ECN CE bit? */
700 __u8 pdiscard; /* Discard the whole packet now? */ 701 __u8 pdiscard; /* Discard the whole packet now? */
701 __u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */ 702 __u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */
702 __u8 fast_retransmit; /* Is this chunk fast retransmitted? */ 703 __s8 fast_retransmit; /* Is this chunk fast retransmitted? */
703 __u8 tsn_missing_report; /* Data chunk missing counter. */ 704 __u8 tsn_missing_report; /* Data chunk missing counter. */
704}; 705};
705 706
@@ -827,7 +828,7 @@ struct sctp_transport {
827 __u32 rtt; /* This is the most recent RTT. */ 828 __u32 rtt; /* This is the most recent RTT. */
828 829
829 /* RTO : The current retransmission timeout value. */ 830 /* RTO : The current retransmission timeout value. */
830 __u32 rto; 831 unsigned long rto;
831 832
832 /* RTTVAR : The current RTT variation. */ 833 /* RTTVAR : The current RTT variation. */
833 __u32 rttvar; 834 __u32 rttvar;
@@ -877,22 +878,10 @@ struct sctp_transport {
877 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 878 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to
878 * the destination address every heartbeat interval. 879 * the destination address every heartbeat interval.
879 */ 880 */
880 __u32 hbinterval; 881 unsigned long hbinterval;
881
882 /* This is the max_retrans value for the transport and will
883 * be initialized from the assocs value. This can be changed
884 * using SCTP_SET_PEER_ADDR_PARAMS socket option.
885 */
886 __u16 pathmaxrxt;
887
888 /* PMTU : The current known path MTU. */
889 __u32 pathmtu;
890 882
891 /* SACK delay timeout */ 883 /* SACK delay timeout */
892 __u32 sackdelay; 884 unsigned long sackdelay;
893
894 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */
895 __u32 param_flags;
896 885
897 /* When was the last time (in jiffies) that we heard from this 886 /* When was the last time (in jiffies) that we heard from this
898 * transport? We use this to pick new active and retran paths. 887 * transport? We use this to pick new active and retran paths.
@@ -904,6 +893,18 @@ struct sctp_transport {
904 */ 893 */
905 unsigned long last_time_ecne_reduced; 894 unsigned long last_time_ecne_reduced;
906 895
896 /* This is the max_retrans value for the transport and will
897 * be initialized from the assocs value. This can be changed
898 * using SCTP_SET_PEER_ADDR_PARAMS socket option.
899 */
900 __u16 pathmaxrxt;
901
902 /* PMTU : The current known path MTU. */
903 __u32 pathmtu;
904
905 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */
906 __u32 param_flags;
907
907 /* The number of times INIT has been sent on this transport. */ 908 /* The number of times INIT has been sent on this transport. */
908 int init_sent_count; 909 int init_sent_count;
909 910
@@ -1249,6 +1250,14 @@ struct sctp_endpoint {
1249 int last_key; 1250 int last_key;
1250 int key_changed_at; 1251 int key_changed_at;
1251 1252
1253 /* digest: This is a digest of the sctp cookie. This field is
1254 * only used on the receive path when we try to validate
1255 * that the cookie has not been tampered with. We put
1256 * this here so we pre-allocate this once and can re-use
1257 * on every receive.
1258 */
1259 __u8 digest[SCTP_SIGNATURE_SIZE];
1260
1252 /* sendbuf acct. policy. */ 1261 /* sendbuf acct. policy. */
1253 __u32 sndbuf_policy; 1262 __u32 sndbuf_policy;
1254 1263
@@ -1499,9 +1508,9 @@ struct sctp_association {
1499 * These values will be initialized by system defaults, but can 1508 * These values will be initialized by system defaults, but can
1500 * be modified via the SCTP_RTOINFO socket option. 1509 * be modified via the SCTP_RTOINFO socket option.
1501 */ 1510 */
1502 __u32 rto_initial; 1511 unsigned long rto_initial;
1503 __u32 rto_max; 1512 unsigned long rto_max;
1504 __u32 rto_min; 1513 unsigned long rto_min;
1505 1514
1506 /* Maximum number of new data packets that can be sent in a burst. */ 1515 /* Maximum number of new data packets that can be sent in a burst. */
1507 int max_burst; 1516 int max_burst;
@@ -1519,13 +1528,13 @@ struct sctp_association {
1519 __u16 init_retries; 1528 __u16 init_retries;
1520 1529
1521 /* The largest timeout or RTO value to use in attempting an INIT */ 1530 /* The largest timeout or RTO value to use in attempting an INIT */
1522 __u16 max_init_timeo; 1531 unsigned long max_init_timeo;
1523 1532
1524 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 1533 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to
1525 * the destination address every heartbeat interval. This value 1534 * the destination address every heartbeat interval. This value
1526 * will be inherited by all new transports. 1535 * will be inherited by all new transports.
1527 */ 1536 */
1528 __u32 hbinterval; 1537 unsigned long hbinterval;
1529 1538
1530 /* This is the max_retrans value for new transports in the 1539 /* This is the max_retrans value for new transports in the
1531 * association. 1540 * association.
@@ -1537,13 +1546,14 @@ struct sctp_association {
1537 */ 1546 */
1538 __u32 pathmtu; 1547 __u32 pathmtu;
1539 1548
1540 /* SACK delay timeout */
1541 __u32 sackdelay;
1542
1543 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ 1549 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */
1544 __u32 param_flags; 1550 __u32 param_flags;
1545 1551
1546 int timeouts[SCTP_NUM_TIMEOUT_TYPES]; 1552 /* SACK delay timeout */
1553 unsigned long sackdelay;
1554
1555
1556 unsigned long timeouts[SCTP_NUM_TIMEOUT_TYPES];
1547 struct timer_list timers[SCTP_NUM_TIMEOUT_TYPES]; 1557 struct timer_list timers[SCTP_NUM_TIMEOUT_TYPES];
1548 1558
1549 /* Transport to which SHUTDOWN chunk was last sent. */ 1559 /* Transport to which SHUTDOWN chunk was last sent. */
@@ -1648,7 +1658,10 @@ struct sctp_association {
1648 /* How many duplicated TSNs have we seen? */ 1658 /* How many duplicated TSNs have we seen? */
1649 int numduptsns; 1659 int numduptsns;
1650 1660
1651 /* Number of seconds of idle time before an association is closed. */ 1661 /* Number of seconds of idle time before an association is closed.
1662 * In the association context, this is really used as a boolean
1663 * since the real timeout is stored in the timeouts array
1664 */
1652 __u32 autoclose; 1665 __u32 autoclose;
1653 1666
1654 /* These are to support 1667 /* These are to support
diff --git a/include/net/sock.h b/include/net/sock.h
index 1806e5b61419..30758035d616 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1354,12 +1354,12 @@ extern int sock_get_timestamp(struct sock *, struct timeval __user *);
1354 * Enable debug/info messages 1354 * Enable debug/info messages
1355 */ 1355 */
1356 1356
1357#if 0 1357#ifdef CONFIG_NETDEBUG
1358#define NETDEBUG(fmt, args...) do { } while (0)
1359#define LIMIT_NETDEBUG(fmt, args...) do { } while(0)
1360#else
1361#define NETDEBUG(fmt, args...) printk(fmt,##args) 1358#define NETDEBUG(fmt, args...) printk(fmt,##args)
1362#define LIMIT_NETDEBUG(fmt, args...) do { if (net_ratelimit()) printk(fmt,##args); } while(0) 1359#define LIMIT_NETDEBUG(fmt, args...) do { if (net_ratelimit()) printk(fmt,##args); } while(0)
1360#else
1361#define NETDEBUG(fmt, args...) do { } while (0)
1362#define LIMIT_NETDEBUG(fmt, args...) do { } while(0)
1363#endif 1363#endif
1364 1364
1365/* 1365/*