[Goodies-dev] [Bug 10822] Use of ifconfig

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Thu Apr 17 22:14:24 CEST 2014


--- Comment #6 from E. Batalha <edbatalha at yahoo.com> ---
How about like this? It seems to work well in linux.
Can you test in bsd?

static GList*
wavelan_query_interfaces (void)
  GList *interfaces = NULL;

  struct ifaddrs *ifaddr, *ifa;

  TRACE ("Entered wavelan_query_interface");

  if (getifaddrs(&ifaddr) == -1) {
    return interfaces;

  for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
    if (ifa->ifa_addr == NULL)
    if (ifa->ifa_addr->sa_family == AF_PACKET)
      interfaces = g_list_append (interfaces, g_strdup (ifa->ifa_name));


  return interfaces;

You are receiving this mail because:
You are the QA Contact for the bug.

More information about the Goodies-dev mailing list