Back to index

glibc  2.9
if_index.c
Go to the documentation of this file.
00001 /* Copyright (C) 1997,98,99,2000,02 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #include <net/if.h>
00020 #include <errno.h>
00021 #include <stddef.h>
00022 
00023 unsigned int
00024 if_nametoindex (const char *ifname)
00025 {
00026   __set_errno (ENOSYS);
00027   return 0;
00028 }
00029 libc_hidden_def (if_nametoindex)
00030 stub_warning (if_nametoindex)
00031 
00032 char *
00033 if_indextoname (unsigned int ifindex, char *ifname)
00034 {
00035   __set_errno (ENOSYS);
00036   return NULL;
00037 }
00038 libc_hidden_def (if_indextoname)
00039 stub_warning (if_indextoname)
00040 
00041 void
00042 if_freenameindex (struct if_nameindex *ifn)
00043 {
00044 }
00045 stub_warning (if_freenameindex)
00046 
00047 struct if_nameindex *
00048 if_nameindex (void)
00049 {
00050   __set_errno (ENOSYS);
00051   return NULL;
00052 }
00053 stub_warning (if_nameindex)
00054 #include <stub-tag.h>
00055 
00056 #if 0
00057 void
00058 internal_function
00059 __protocol_available (int *have_inet, int *have_inet6)
00060 {
00061   /* By default we assume that IPv4 is available, IPv6 not.  */
00062   *have_inet = 1;
00063   *have_inet6 = 0;
00064 }
00065 #endif