Hi All,
If someone can point me out as to where to exactly look for change in value of icmp counters in /proc/net/, I am specifically looking for OutEchos for snmp. But, I couldn't locate anything specific to what is the general mechanism.
I looked in net/ipv4/proc.c, where the value gets printed in string:
static int snmp_seq_show(struct seq_file *seq, void *v) {
..................................
seq_puts(seq, "\nIcmp:");
for (i = 0; snmp4_icmp_list[i].name != NULL; i++)
seq_printf(seq, " %s", snmp4_icmp_list[i].name);
seq_puts(seq, "\nIcmp:");
for (i = 0; snmp4_icmp_list[i].name != NULL; i++)
seq_printf(seq, " %lu",
fold_field((void **) icmp_statistics,
snmp4_icmp_list[i].entry));
...............................................
}
but this only prints value in seq buffer, I wanted to know how this entire mechanism work, I mean how does counter increment/decrement happens. Any pointer in this regard?
Thank you
-Anuz