summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/ipv6ifname/ipv6ifname.cpp
blob: 619a783b8260a04f8eeac7cb7205a78ccaa51644 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Sample program for configure to test for if_nametoindex support
on target platforms. */

#if defined(__hpux)
#define _HPUX_SOURCE
#endif

#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>

int main()
{
    char buf[IFNAMSIZ];
    if_nametoindex("eth0");
    if_indextoname(1, buf);
    return 0;
}