netdev
[Top] [All Lists]

ifconfig, ip and ethernet driver module

To: netdev@xxxxxxxxxxx
Subject: ifconfig, ip and ethernet driver module
From: Joachim.Franek@xxxxxxxxxxx (Joachim Franek)
Date: Fri, 15 Feb 2002 16:30:03 +0100
Organization: IBJF
Reply-to: joachim.franek@xxxxxxxxxxx
Sender: owner-netdev@xxxxxxxxxxx
Hello,

I have a question about the  location, the ip number is stored.
Kernel 2.4.x.

Assume there is a ethernet driver module eth.o. With
insmod eth.o there is eth1 available and with
ifconfig eth1 192.168.10.12 up 
the interface is operational.

ifconfig calls the code of the function:
int eth_open(struct net_device *dev)

And at this time I want to know  the parameter of ifconfig.

my_network= ???   (Result: 192*256*256 + 168*256 + 10)
my_ip= ??? (Result: 12)
(assuming a netmask of 24 bits)

Thanks.

Joachim Franek
Ernst-Reuter-Str. 8, D-63486 Bruchkoebel
www.de-franek.de
rs485.de-franek.de

<Prev in Thread] Current Thread [Next in Thread>
  • ifconfig, ip and ethernet driver module, Joachim Franek <=