Re: How to obtain process ID that created connection or owns one packet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mikado wrote:
> Thanks all! Finally I found the answer in 'struct sk_buff':
> 
> struct sk_buff ( #include <linux/skbuff.h> )
> |_struct sock ( #include <net/sock.h> )
>   |_struct socket ( #include <linux/net.h> )
>     |_struct file ( #include <linux/fs.h> )
>       |_struct fown_struct ( #include <linux/fs.h> )
>         |_int pid

Yes, but AFAIK you can only use that in the OUTPUT hook, not in the
INPUT path. If my mind serves well, I remember that Patrick McHardy
posted some patches to add support for socket filtering some time ago. I
don't know what is the status of such work.

-- 
Pablo


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux