mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
1999-08-25 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/if_index.c (if_nameindex): Move old_siocfifconf definition to toplevel. (__protocol_available): Remove old_siocfifconf definition.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
1999-08-25 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/if_index.c (if_nameindex): Move
|
||||||
|
old_siocfifconf definition to toplevel.
|
||||||
|
(__protocol_available): Remove old_siocfifconf definition.
|
||||||
|
|
||||||
1999-08-25 Mark Kettenis <kettenis@gnu.org>
|
1999-08-25 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/ptsname.c: Add checks to make sure we're
|
* sysdeps/unix/sysv/linux/ptsname.c: Add checks to make sure we're
|
||||||
|
@ -55,7 +55,7 @@ stub_warning (if_nameindex)
|
|||||||
|
|
||||||
void
|
void
|
||||||
internal_function
|
internal_function
|
||||||
__protocol_avaliable (int *have_inet, have_inet6)
|
__protocol_available (int *have_inet, have_inet6)
|
||||||
{
|
{
|
||||||
/* By default we assume that IPv4 is avaialble, IPv6 not. */
|
/* By default we assume that IPv4 is avaialble, IPv6 not. */
|
||||||
*have_inet = 1;
|
*have_inet = 1;
|
||||||
|
@ -28,6 +28,13 @@
|
|||||||
|
|
||||||
#include "kernel-features.h"
|
#include "kernel-features.h"
|
||||||
|
|
||||||
|
/* Variable to signal whether SIOCGIFCONF is not available. */
|
||||||
|
#if __ASSUME_SIOCGIFNAME == 0
|
||||||
|
static int old_siocgifconf;
|
||||||
|
#else
|
||||||
|
# define old_siocgifconf 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Try to get a socket to talk to the kernel. */
|
/* Try to get a socket to talk to the kernel. */
|
||||||
#if defined SIOCGIFINDEX || defined SIOCGIFNAME
|
#if defined SIOCGIFINDEX || defined SIOCGIFNAME
|
||||||
static int
|
static int
|
||||||
@ -122,11 +129,6 @@ if_nameindex (void)
|
|||||||
unsigned int nifs, i;
|
unsigned int nifs, i;
|
||||||
int rq_len;
|
int rq_len;
|
||||||
struct if_nameindex *idx = NULL;
|
struct if_nameindex *idx = NULL;
|
||||||
# if __ASSUME_SIOCGIFNAME == 0
|
|
||||||
static int old_siocgifconf;
|
|
||||||
# else
|
|
||||||
# define old_siocgifconf 0
|
|
||||||
# endif
|
|
||||||
# define RQ_IFS 4
|
# define RQ_IFS 4
|
||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
@ -281,24 +283,19 @@ if_indextoname (unsigned int ifindex, char *ifname)
|
|||||||
|
|
||||||
void
|
void
|
||||||
internal_function
|
internal_function
|
||||||
__protocol_avaliable (int *have_inet, int *have_inet6)
|
__protocol_available (int *have_inet, int *have_inet6)
|
||||||
{
|
{
|
||||||
int fd = opensock ();
|
int fd = opensock ();
|
||||||
unsigned int nifs;
|
unsigned int nifs;
|
||||||
int rq_len;
|
int rq_len;
|
||||||
struct ifconf ifc;
|
struct ifconf ifc;
|
||||||
# if __ASSUME_SIOCGIFNAME == 0
|
|
||||||
static int old_siocgifconf;
|
|
||||||
# else
|
|
||||||
# define old_siocgifconf 0
|
|
||||||
# endif
|
|
||||||
# define RQ_IFS 4
|
# define RQ_IFS 4
|
||||||
|
|
||||||
/* Wirst case assumption. */
|
/* Wirst case assumption. */
|
||||||
*have_inet = 0;
|
*have_inet = 0;
|
||||||
*have_inet6 = 0;
|
*have_inet6 = 0;
|
||||||
|
|
||||||
if (fd == NULL)
|
if (fd < 0)
|
||||||
/* We cannot open the socket. No networking at all? */
|
/* We cannot open the socket. No networking at all? */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user