patch-2.0.34 linux/net/ipv4/proc.c
Next file: linux/net/ipv4/rarp.c
Previous file: linux/net/ipv4/ip_output.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Wed Jun 3 15:17:50 1998
- Orig file:
v2.0.33/linux/net/ipv4/proc.c
- Orig date:
Tue Apr 8 08:47:47 1997
diff -u --recursive --new-file v2.0.33/linux/net/ipv4/proc.c linux/net/ipv4/proc.c
@@ -29,6 +29,7 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
+#include <linux/config.h>
#include <asm/system.h>
#include <linux/sched.h>
#include <linux/socket.h>
@@ -166,6 +167,10 @@
*/
int afinet_get_info(char *buffer, char **start, off_t offset, int length, int dummy)
{
+#ifdef CONFIG_SYN_COOKIES
+ extern unsigned int ui_c_send_cookies;
+ static unsigned int ui_c_last_send_cookies = 0;
+#endif
/* From net/socket.c */
extern int socket_get_info(char *, char **, off_t, int);
extern struct proto packet_prot;
@@ -180,6 +185,13 @@
raw_prot.inuse, raw_prot.highestinuse);
len += sprintf(buffer+len,"PAC: inuse %d highest %d\n",
packet_prot.inuse, packet_prot.highestinuse);
+
+#if defined(CONFIG_SYN_COOKIES)
+ len += sprintf(buffer+len,"SYN_COOKIES: count %u since_last_check %u\n",
+ ui_c_send_cookies, (ui_c_send_cookies - ui_c_last_send_cookies));
+
+ ui_c_last_send_cookies = ui_c_send_cookies;
+#endif
*start = buffer + offset;
len -= offset;
if (len > length)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov