On Fri, 2007-02-09 at 10:02 -0500, Gentoo-Wally wrote:
> The capture information in /proc/net/pf_ring/ for a particular capture
> application is very useful, but when using multiple capture
> applications it is sometimes difficult to identify what statistics
> belong to which application.  I was wondering if it would be possible
> to instead of using 0, 1, 2...etc to use the PID instead?

Maybe something like this?

--- ring_packet.c.orig  2007-02-12 12:43:38.000000000 +0100
+++ ring_packet.c       2007-02-12 12:47:59.000000000 +0100
@@ -265,7 +265,7 @@

     pfr->ring_id = ring_count++;

-    snprintf(name, sizeof(name), "%d", pfr->ring_id);
+    snprintf(name, sizeof(name), "%d", (int) current->pid);
     create_proc_read_entry(name, 0, ring_proc_dir,
                           ring_proc_get_info, pfr);
     /* printk("PF_RING: added /proc/net/pf_ring/%s\n", name); */



_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to