1/* 2 * Compatability glue for systems lacking the if_nametoindex and 3 * if_indextoname functions. 4 * 5 * The file 'if_index.c' was taken verbatimly from the GNU C Library 6 * version 2.1 (990920) and is Copyright (C) 1997, 1998, 1999 Free 7 * Software Foundation, Inc. 8 */ 9 10#define _BITS_LIBC_LOCK_H 1 11#define __libc_lock_define_initialized(a,b) 12#define __libc_lock_lock(a) 13#define __libc_lock_unlock(a) 14#define __ioctl ioctl 15#define __set_errno(a) {errno = (a);} 16#define __socket socket 17#define internal_function 18 19#include <features.h> 20#if __GLIBC_MINOR__ < 1 21/* Return a list of all interfaces and their indices. */ 22 23struct if_nameindex 24 { 25 unsigned int if_index; /* 1, 2, ... */ 26 char *if_name; /* null terminated name: "eth0", ... */ 27 }; 28#endif 29 30#include "if_index.c" 31