patch-2.3.39 linux/include/net/snmp.h
Next file: linux/include/net/sock.h
Previous file: linux/include/net/pkt_sched.h
Back to the patch index
Back to the overall index
- Lines: 69
- Date:
Sat Jan 8 21:36:20 2000
- Orig file:
v2.3.38/linux/include/net/snmp.h
- Orig date:
Sun Oct 4 10:19:39 1998
diff -u --recursive --new-file v2.3.38/linux/include/net/snmp.h linux/include/net/snmp.h
@@ -27,8 +27,6 @@
struct ip_mib
{
- unsigned long IpForwarding;
- unsigned long IpDefaultTTL;
unsigned long IpInReceives;
unsigned long IpInHdrErrors;
unsigned long IpInAddrErrors;
@@ -46,6 +44,7 @@
unsigned long IpFragOKs;
unsigned long IpFragFails;
unsigned long IpFragCreates;
+ unsigned long __pad[32-19];
};
struct ipv6_mib
@@ -72,6 +71,7 @@
unsigned long Ip6FragCreates;
unsigned long Ip6InMcastPkts;
unsigned long Ip6OutMcastPkts;
+ unsigned long __pad[32-22];
};
struct icmp_mib
@@ -102,6 +102,7 @@
unsigned long IcmpOutTimestampReps;
unsigned long IcmpOutAddrMasks;
unsigned long IcmpOutAddrMaskReps;
+ unsigned long __pad[32-26];
};
struct icmpv6_mib
@@ -139,6 +140,7 @@
unsigned long Icmp6OutRedirects;
unsigned long Icmp6OutGroupMembResponses;
unsigned long Icmp6OutGroupMembReductions;
+ unsigned long __pad[32-28];
};
struct tcp_mib
@@ -157,6 +159,7 @@
unsigned long TcpRetransSegs;
unsigned long TcpInErrs;
unsigned long TcpOutRsts;
+ unsigned long __pad[16-14];
};
struct udp_mib
@@ -165,6 +168,7 @@
unsigned long UdpNoPorts;
unsigned long UdpInErrors;
unsigned long UdpOutDatagrams;
+ unsigned long __pad[0];
};
struct linux_mib
@@ -178,6 +182,11 @@
unsigned long OfoPruned;
unsigned long OutOfWindowIcmps;
unsigned long LockDroppedIcmps;
+ unsigned long __pad[32-9];
};
+
+#define SNMP_INC_STATS(mib, field) ((mib)[2*smp_processor_id()+!in_interrupt()].field++)
+#define SNMP_INC_STATS_BH(mib, field) ((mib)[2*smp_processor_id()].field++)
+#define SNMP_INC_STATS_USER(mib, field) ((mib)[2*smp_processor_id()+1].field++)
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)