ioctl / network

ioctl / network

Post by nilesh pate » Thu, 30 Dec 1999 04:00:00



hi ,

I want to know some advance info about ioctl.

ioctl     has command     SIOCGIFADDR
this returns interface structure as a third argument.

What i dont know is which  descriptor to pass as  its first argument.

I mean what type of file/socket  i have to open and then pass its
descriptor to ioctl to make this work.

You may assume that i  want to make  ifconfig command of my own.

Thanks in Advance
nilesh

 
 
 

ioctl / network

Post by Jens-Uwe Mag » Thu, 30 Dec 1999 04:00:00



>ioctl     has command     SIOCGIFADDR
>this returns interface structure as a third argument.

>What i dont know is which  descriptor to pass as  its first argument.

>I mean what type of file/socket  i have to open and then pass its
>descriptor to ioctl to make this work.

Any inet socket will do, I use a SOCK_DGRAM one for this purpose.

--
Jens-Uwe Mager  <pgp-mailto:62CFDB25>