summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.davemloft.net>2004-09-07 00:50:36 -0700
committerDavid S. Miller <davem@nuts.davemloft.net>2004-09-07 00:50:36 -0700
commit8d34d4fde2dfa67d29298f4bb4c636c3ee1914aa (patch)
tree5ff55676d4e3bad5bc21046ae0114e78ce04de6e /include/linux
parent2cd242672eca6ba741dda2a13adf7e9ccd7d7451 (diff)
parentef31c0c83addad073e6fda9885f0196b9308b6e3 (diff)
Merge
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/net.h21
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_protocol.h4
-rw-r--r--include/linux/tcp.h16
3 files changed, 35 insertions, 6 deletions
diff --git a/include/linux/net.h b/include/linux/net.h
index 80e7fec727e3..0f710b7e4121 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -61,6 +61,27 @@ typedef enum {
#define SOCK_ASYNC_WAITDATA 1
#define SOCK_NOSPACE 2
+/** sock_type - Socket types
+ *
+ * @SOCK_STREAM - stream (connection) socket
+ * @SOCK_DGRAM - datagram (conn.less) socket
+ * @SOCK_RAW - raw socket
+ * @SOCK_RDM - reliably-delivered message
+ * @SOCK_SEQPACKET - sequential packet socket
+ * @SOCK_PACKET - linux specific way of getting packets at the dev level.
+ * For writing rarp and other similar things on the user level.
+ */
+enum sock_type {
+ SOCK_STREAM = 1,
+ SOCK_DGRAM = 2,
+ SOCK_RAW = 3,
+ SOCK_RDM = 4,
+ SOCK_SEQPACKET = 5,
+ SOCK_PACKET = 10,
+};
+
+#define SOCK_MAX (SOCK_PACKET + 1)
+
/**
* struct socket - general BSD socket
* @state - socket state (%SS_CONNECTED, etc)
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_protocol.h b/include/linux/netfilter_ipv4/ip_conntrack_protocol.h
index 55d57404acb8..6edb801fa51f 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack_protocol.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack_protocol.h
@@ -75,6 +75,7 @@ extern int ip_conntrack_protocol_tcp_init(void);
/* Log invalid packets */
extern unsigned int ip_ct_log_invalid;
+#ifdef CONFIG_SYSCTL
#ifdef DEBUG_INVALID_PACKETS
#define LOG_INVALID(proto) \
(ip_ct_log_invalid == (proto) || ip_ct_log_invalid == IPPROTO_RAW)
@@ -83,5 +84,8 @@ extern unsigned int ip_ct_log_invalid;
((ip_ct_log_invalid == (proto) || ip_ct_log_invalid == IPPROTO_RAW) \
&& net_ratelimit())
#endif
+#else
+#define LOG_INVALID(proto) 0
+#endif /* CONFIG_SYSCTL */
#endif /*_IP_CONNTRACK_PROTOCOL_H*/
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 9c42ac0b0322..86ca98c5ef8f 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -201,6 +201,10 @@ struct tcp_sack_block {
__u32 end_seq;
};
+typedef struct tcp_pcount {
+ __u32 val;
+} tcp_pcount_t;
+
struct tcp_opt {
int tcp_header_len; /* Bytes of tcp header to send */
@@ -274,9 +278,9 @@ struct tcp_opt {
__u32 rtt_seq; /* sequence number to update rttvar */
__u32 rto; /* retransmit timeout */
- __u32 packets_out; /* Packets which are "in flight" */
- __u32 left_out; /* Packets which leaved network */
- __u32 retrans_out; /* Retransmitted packets out */
+ tcp_pcount_t packets_out; /* Packets which are "in flight" */
+ tcp_pcount_t left_out; /* Packets which leaved network */
+ tcp_pcount_t retrans_out; /* Retransmitted packets out */
/*
@@ -337,9 +341,9 @@ struct tcp_opt {
__u8 syn_retries; /* num of allowed syn retries */
__u8 ecn_flags; /* ECN status bits. */
__u16 prior_ssthresh; /* ssthresh saved at recovery start */
- __u32 lost_out; /* Lost packets */
- __u32 sacked_out; /* SACK'd packets */
- __u32 fackets_out; /* FACK'd packets */
+ tcp_pcount_t lost_out; /* Lost packets */
+ tcp_pcount_t sacked_out;/* SACK'd packets */
+ tcp_pcount_t fackets_out;/* FACK'd packets */
__u32 high_seq; /* snd_nxt at onset of congestion */
__u32 retrans_stamp; /* Timestamp of the last retransmit,