Scott Aitchison writes:
> How can I get the IP address of an interface when I have the name of it?
> 
> I'm using Pfil in a module that is being configured by a userland process.  
> It sends down the name of the interface (ie. e1000g0), and I want to get the 
> IP address of that interface.

The SIOCGIFADDR and SIOCGLIFADDR ioctls do this.

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to