Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* probing network interfaces with C (SIOCGIFCONF problems)
@ 1995-04-13  4:00 Bruce Barnett
  0 siblings, 0 replies; only message in thread
From: Bruce Barnett @ 1995-04-13  4:00 UTC (permalink / raw)



I need to scan the different network interfaces in a C program, and I
need to eliminate the non-TCP/IP interfaces.

Let me elaborate - when I do a netstat -i, I get three different
values for ln0. In one case the etwork is "DLI", a second one is
"<Link>", and the third one is the TCP/IP interface. 

In my C program, I get the address, network, broadcast values using ioctl's of 
SIOCGIFCONF, SIOCGIFNETMASK, SIOCGIFBRDADDR respectively.

How do I, in a C program, eliminate the DLI and <LINK> interfaces?
It seems that the address is 6.3.6.0 for these interfaces.
Should I compare the address with this number?
Is that how I eliminate the non-TCP/IP interfaces? Seems strange.
There must be a better way. How does OSF's netstat do it?
Is it another one of those SIOCGIF* controls?
--
Bruce Barnett <barnett@crd.ge.com> uunet!crdras!barnett



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-04-13  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-04-13  4:00 probing network interfaces with C (SIOCGIFCONF problems) Bruce Barnett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox