diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2007-11-13 23:30:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:53:33 -0500 |
commit | 33c732c36169d7022ad7d6eb474b0c9be43a2dc1 (patch) | |
tree | a9ac2b8a488cc288bfd2f407d8ad9dd592b29055 /include | |
parent | 6ff7751d06f63131830102ffa0c9a38b313f100e (diff) |
[IPV4]: Add raw drops counter.
Add raw drops counter for IPv4 in /proc/net/raw .
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/sock.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 6e1542da33a1..f5b643714131 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -145,7 +145,8 @@ struct sock_common { | |||
145 | * @sk_forward_alloc: space allocated forward | 145 | * @sk_forward_alloc: space allocated forward |
146 | * @sk_allocation: allocation mode | 146 | * @sk_allocation: allocation mode |
147 | * @sk_sndbuf: size of send buffer in bytes | 147 | * @sk_sndbuf: size of send buffer in bytes |
148 | * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings | 148 | * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, |
149 | * %SO_OOBINLINE settings | ||
149 | * @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets | 150 | * @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets |
150 | * @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO) | 151 | * @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO) |
151 | * @sk_gso_type: GSO type (e.g. %SKB_GSO_TCPV4) | 152 | * @sk_gso_type: GSO type (e.g. %SKB_GSO_TCPV4) |
@@ -153,9 +154,12 @@ struct sock_common { | |||
153 | * @sk_backlog: always used with the per-socket spinlock held | 154 | * @sk_backlog: always used with the per-socket spinlock held |
154 | * @sk_callback_lock: used with the callbacks in the end of this struct | 155 | * @sk_callback_lock: used with the callbacks in the end of this struct |
155 | * @sk_error_queue: rarely used | 156 | * @sk_error_queue: rarely used |
156 | * @sk_prot_creator: sk_prot of original sock creator (see ipv6_setsockopt, IPV6_ADDRFORM for instance) | 157 | * @sk_prot_creator: sk_prot of original sock creator (see ipv6_setsockopt, |
158 | * IPV6_ADDRFORM for instance) | ||
157 | * @sk_err: last error | 159 | * @sk_err: last error |
158 | * @sk_err_soft: errors that don't cause failure but are the cause of a persistent failure not just 'timed out' | 160 | * @sk_err_soft: errors that don't cause failure but are the cause of a |
161 | * persistent failure not just 'timed out' | ||
162 | * @sk_drops: raw drops counter | ||
159 | * @sk_ack_backlog: current listen backlog | 163 | * @sk_ack_backlog: current listen backlog |
160 | * @sk_max_ack_backlog: listen backlog set in listen() | 164 | * @sk_max_ack_backlog: listen backlog set in listen() |
161 | * @sk_priority: %SO_PRIORITY setting | 165 | * @sk_priority: %SO_PRIORITY setting |
@@ -239,6 +243,7 @@ struct sock { | |||
239 | rwlock_t sk_callback_lock; | 243 | rwlock_t sk_callback_lock; |
240 | int sk_err, | 244 | int sk_err, |
241 | sk_err_soft; | 245 | sk_err_soft; |
246 | atomic_t sk_drops; | ||
242 | unsigned short sk_ack_backlog; | 247 | unsigned short sk_ack_backlog; |
243 | unsigned short sk_max_ack_backlog; | 248 | unsigned short sk_max_ack_backlog; |
244 | __u32 sk_priority; | 249 | __u32 sk_priority; |