Example #1
0
/* Fetch interface information via ioctl(). */
static void interface_info_ioctl()
{
	struct listnode *node, *nnode;
	struct interface *ifp;

	for (ALL_LIST_ELEMENTS(iflist, node, nnode, ifp)) {
		if_get_index(ifp);
#ifdef SIOCGIFHWADDR
		if_get_hwaddr(ifp);
#endif /* SIOCGIFHWADDR */
		if_get_flags(ifp);
#ifndef HAVE_GETIFADDRS
		if_get_addr(ifp);
#endif /* ! HAVE_GETIFADDRS */
		if_get_mtu(ifp);
		if_get_metric(ifp);
	}
}
Example #2
0
/* Fetch interface information via ioctl(). */
static void
interface_info_ioctl ()
{
  struct listnode *node;
  struct interface_FOO *ifp;
  
  LIST_LOOP (iflist, ifp, node)
    {
      ifp = getdata (node);

      if_get_index (ifp);
#ifdef SIOCGIFHWADDR
      if_get_hwaddr (ifp);
#endif /* SIOCGIFHWADDR */
      if_get_flags (ifp);
#ifndef HAVE_GETIFADDRS
      if_get_addr (ifp);
#endif /* ! HAVE_GETIFADDRS */
      if_get_mtu (ifp);
      if_get_metric (ifp);
    }
Example #3
0
/* Fetch interface information via ioctl(). */
static void
interface_info_ioctl ()
{
  listnode node;
  struct interface *ifp;
  
  for (node = listhead (iflist); node; node = nextnode (node))
    {
      ifp = getdata (node);

      if_get_index (ifp);
#ifdef SIOCGIFHWADDR
      if_get_hwaddr (ifp);
#endif /* SIOCGIFHWADDR */
      if_get_flags (ifp);
#ifndef HAVE_GETIFADDRS
      if_get_addr (ifp);
#endif /* ! HAVE_GETIFADDRS */
      if_get_mtu (ifp);
      if_get_metric (ifp);
    }
}