Operating System - HP-UX
1832595 Members
3097 Online
110043 Solutions
New Discussion

Getting interface indexes in HPUX 11.0

 
Adrian Cowham
New Member

Getting interface indexes in HPUX 11.0

I'm using ioctl() calls to grab interface information on a HPUX 11.0 system. I can get the ip address, netmask, and gateway but it doesn't recognize SIOCGIFINDEX parameter for getting the index of the interface. Is there any other way to go about getting the ifindex rather than using ioctl()?

Thanks.
6 REPLIES 6
harry d brown jr
Honored Contributor

Re: Getting interface indexes in HPUX 11.0

Yes, use lanscan.
Live Free or Die
Sridhar Bhaskarla
Honored Contributor

Re: Getting interface indexes in HPUX 11.0

The card instance number should be your ifindex in 'lanscan' command.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
rick jones
Honored Contributor

Re: Getting interface indexes in HPUX 11.0

which "index" do you seek? the index for the MIBs, or the PPA of the interface?
there is no rest for the wicked yet the virtuous have no pillows
Adrian Cowham
New Member

Re: Getting interface indexes in HPUX 11.0

looing for the PPA of the interface.
MANOJ SRIVASTAVA
Honored Contributor

Re: Getting interface indexes in HPUX 11.0

Hi Adrian

Please use lanscan .


Manoj Srivastava
rick jones
Honored Contributor

Re: Getting interface indexes in HPUX 11.0

if you want to map from "ifconfig name" to PPA, i'm pretty sure that the libpcap code at www.tcpdump.org has that smarts. there are some DLPI calls one can make to retrieve all the PPA's known to that DLPI provider. between the libpcap code, and the DLPI manuals online at docs.hp.com you should be all set.
there is no rest for the wicked yet the virtuous have no pillows