netdev
[Top] [All Lists]

Re: SIOCGLIFCONF?

To: jk@xxxxxxxxxxxx
Subject: Re: SIOCGLIFCONF?
From: Hideaki YOSHIFUJI (吉藤英明) <yoshfuji@xxxxxxxxxxxxxxxxx>
Date: Mon, 01 May 2000 09:38:26 +0900
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20000430151430.A26860@north.csuchico.edu>
References: <20000429212459.A18071@north.csuchico.edu> <20000430235055F.yoshfuji@cerberus.nemoto.ecei.tohoku.ac.jp> <20000430151430.A26860@north.csuchico.edu>
Sender: owner-netdev@xxxxxxxxxxx
In article <20000430151430.A26860@xxxxxxxxxxxxxxxxxx> (at Sun, 30 Apr 2000 
15:14:30 -0700), John Kennedy <jk@xxxxxxxxxxxx> says:

> > <http://apps.v6.linux.or.jp/pub/Linux/glibc/getifaddrs-20000309.tgz>

>   Right now that host is refusing connections.  I'm specifically
> looking for that API, since both BIND & sendmail prefer it when
> trying to pick up IPv6 interfaces.

Hmm, I've restarted the httpd.  Also, you can get a copy from 
<ftp://ftp.nemoto.ecei.tohoku.ac.jp/pub/Net/IPv6/Patches/getifaddrs-20000309.tgz>


Here's a simple code that shows how to use getifaddrs(3):

#include <ifaddrs.h>
:
    struct ifaddrs *ifa0, *ifa;
    if (getifaddrs(&ifa0)){
       perror("ifaddrs");
       exit(1);
    }
    for (ifa=ifa0; ifa; ifa=ifa->ifa_next){
       /* Use ifa->ifa_addr, ifa->ifa_broadaddr etc. which points 
          struct sockaddr and ifa->ifa_flags */
       if (ifa->ifa_addr && ifa->ifa_addr == AF_INET6){
          :
       }
    }
    freeifaddrs(ifa0);

-- 
Hideaki YOSHIFUJI <yoshfuji@xxxxxxxxxxxxxxxxx>
Web Page: http://www.ecei.tohoku.ac.jp/%7Eyoshfuji/
PGP5i FP: F731 6599 5EB2 BBA7 1515  1323 1806 A96F 5700 6B25 

<Prev in Thread] Current Thread [Next in Thread>