1833770 Members
2465 Online
110063 Solutions
New Discussion

ifconfig

 
SOLVED
Go to solution
siaemic
Advisor

ifconfig

Does anyone know how ifconfig work ?
Does it call ioctl command ? Which parameters does it use ?

6 REPLIES 6
rariasn
Honored Contributor
Solution

Re: ifconfig

man "ifconfig"

strings /usr/sbin/ifconfig|grep ioctl

rgs,
Fabio Ettore
Honored Contributor

Re: ifconfig

Ciao,

please check 'man ifconfig' in Description section. There is a good explaination about ifconfig.

About ioctl: I remember something about ifconfig sometimes fails with ioctl messages, something like

ifconfig
icotl ... bad value

This just demonstrates that ifconfig calls ioctl and 'strings' command as already suggested should show further. Which parameters it uses I think depends on ifconfig code and how it has been ran.

Hope this helps, otherwise please formule the question with more info.

Regards,
Fabio
WISH? IMPROVEMENT!
Doru Iulian Barit
Occasional Advisor

Re: ifconfig

Hello,
You also could use set_parms to setup the network.
Ex: set_parms network


Doru Barit
rick jones
Honored Contributor

Re: ifconfig

You may be able to partially unwrap the enigma that is the itnernal workings of the ifconfig command by using tusc to trace the system calls it makes.

However, it does beg the question - why do you wish to know? Idle curiousity, or something more?
there is no rest for the wicked yet the virtuous have no pillows
siaemic
Advisor

Re: ifconfig

Just because it hangs while configure an interface and I don't know where it hangs.
Now I propably found that it locks on
close operation on device file associated
Ralph Grothe
Honored Contributor

Re: ifconfig

If it hangs then could it be that you don't have a layer 2 link present?
You could check by (where ppa is the digit folowing: lan?)

# lanadmin -x

or better use the linkloop command.
But for it to work you need to have a MAC address of a connected device in the same LAN segment.
Madness, thy name is system administration