summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-04-08 21:23:58 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-04-08 21:23:58 -0700
commitfaedca65dfd1abf0097d1dabf45030560828a8ae (patch)
tree7cb4544e35a32f3ab39af24d0dcde9caaf877362 /include
parentda220b091670cdc32f59d24575cf23d4dce397bb (diff)
parent75552d6863c17d8d138ae2ff21868f0d5bc96390 (diff)
Merge bk://kernel.bkbits.net/davem/net-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
-rw-r--r--include/linux/irda.h2
-rw-r--r--include/linux/net.h5
-rw-r--r--include/linux/netlink.h2
-rw-r--r--include/net/tcp.h15
-rw-r--r--include/net/xfrm.h1
5 files changed, 24 insertions, 1 deletions
diff --git a/include/linux/irda.h b/include/linux/irda.h
index bdf23baa5483..948488ece2a8 100644
--- a/include/linux/irda.h
+++ b/include/linux/irda.h
@@ -25,6 +25,8 @@
#ifndef KERNEL_IRDA_H
#define KERNEL_IRDA_H
+#include <linux/socket.h> /* only for sa_family_t */
+
/* Hint bit positions for first hint byte */
#define HINT_PNP 0x01
#define HINT_PDA 0x02
diff --git a/include/linux/net.h b/include/linux/net.h
index 55083c938298..6ba6e1038521 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -19,7 +19,6 @@
#define _LINUX_NET_H
#include <linux/config.h>
-#include <linux/socket.h>
#include <linux/wait.h>
struct poll_table_struct;
@@ -88,6 +87,8 @@ struct socket {
struct vm_area_struct;
struct page;
struct kiocb;
+struct sockaddr;
+struct msghdr;
struct proto_ops {
int family;
@@ -136,6 +137,8 @@ struct net_proto_family {
short encrypt_net;
};
+struct iovec;
+
extern int sock_wake_async(struct socket *sk, int how, int band);
extern int sock_register(struct net_proto_family *fam);
extern int sock_unregister(int family);
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 69346c394563..30de192de7a9 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -1,6 +1,8 @@
#ifndef __LINUX_NETLINK_H
#define __LINUX_NETLINK_H
+#include <linux/socket.h> /* for sa_family_t */
+
#define NETLINK_ROUTE 0 /* Routing/device hook */
#define NETLINK_SKIP 1 /* Reserved for ENskip */
#define NETLINK_USERSOCK 2 /* Reserved for user mode socket protocols */
diff --git a/include/net/tcp.h b/include/net/tcp.h
index b652650286fe..8844d3f3d8f9 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -31,6 +31,7 @@
#include <linux/percpu.h>
#include <net/checksum.h>
#include <net/sock.h>
+#include <net/snmp.h>
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
#include <linux/ipv6.h>
#endif
@@ -639,6 +640,8 @@ DECLARE_SNMP_STAT(struct tcp_mib, tcp_statistics);
#define TCP_INC_STATS_BH(field) SNMP_INC_STATS_BH(tcp_statistics, field)
#define TCP_INC_STATS_USER(field) SNMP_INC_STATS_USER(tcp_statistics, field)
#define TCP_DEC_STATS(field) SNMP_DEC_STATS(tcp_statistics, field)
+#define TCP_ADD_STATS_BH(field, val) SNMP_ADD_STATS_BH(tcp_statistics, field, val)
+#define TCP_ADD_STATS_USER(field, val) SNMP_ADD_STATS_USER(tcp_statistics, field, val)
extern __inline__ void tcp_put_port(struct sock *sk);
extern void tcp_inherit_port(struct sock *sk, struct sock *child);
@@ -1398,6 +1401,9 @@ static __inline__ void tcp_set_state(struct sock *sk, int state)
break;
case TCP_CLOSE:
+ if (oldstate == TCP_CLOSE_WAIT || oldstate == TCP_ESTABLISHED)
+ TCP_INC_STATS(TcpEstabResets);
+
sk->prot->unhash(sk);
if (sk->prev && !(sk->userlocks&SOCK_BINDPORT_LOCK))
tcp_put_port(sk);
@@ -1878,4 +1884,13 @@ static inline int tcp_use_frto(const struct sock *sk)
tp->snd_una + tp->snd_wnd));
}
+static inline void tcp_mib_init(void)
+{
+ /* See RFC 2012 */
+ TCP_ADD_STATS_USER(TcpRtoAlgorithm, 1);
+ TCP_ADD_STATS_USER(TcpRtoMin, TCP_RTO_MIN*1000/HZ);
+ TCP_ADD_STATS_USER(TcpRtoMax, TCP_RTO_MAX*1000/HZ);
+ TCP_ADD_STATS_USER(TcpMaxConn, -1);
+}
+
#endif /* _TCP_H */
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index fe32e5c32354..b75d2651adf0 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -84,6 +84,7 @@ extern struct semaphore xfrm_cfg_sem;
/* Full description of state of transformer. */
struct xfrm_state
{
+ /* Note: bydst is re-used during gc */
struct list_head bydst;
struct list_head byspi;