On Sat, Sep 11, 2004 at 15:31:00 -0000, bunty wrote: > hello, > I want to know is there any way to know that whether a Pc is acting as a Router that is /proc/net/ipv4/ip_forward is set to 0 or 1? Are you aware of the fact, that /proc/net/ipv4/ip_forward is readable? Just cat it. No need for entering the kernel. > which structre should i use and is it possible via kernel module? > that mean i want to write a kernel module to check whether my PC is IP > packet forwarder or not? You have the source ;-). Just look where /proc/net/ipv4/ip_forward is registered and look which function provides it's contents (it's the read one). ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb@xxxxxx>
Attachment:
signature.asc
Description: Digital signature