diff --git a/ap/libc/glibc/glibc-2.23/inet/Makefile b/ap/libc/glibc/glibc-2.23/inet/Makefile
new file mode 100644
index 0000000..0e7a3c3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/Makefile
@@ -0,0 +1,91 @@
+# Copyright (C) 1991-2016 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+#
+#	Sub-makefile for inet portion of the library.
+#
+subdir	:= inet
+
+include ../Makeconfig
+
+headers	:= netinet/ether.h netinet/in.h netinet/in_systm.h \
+	   netinet/if_ether.h netinet/igmp.h \
+	   netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \
+	   aliases.h ifaddrs.h netinet/ip6.h netinet/icmp6.h bits/in.h
+
+routines := htonl htons		\
+	    inet_lnaof inet_mkadr	\
+	    inet_netof inet_ntoa inet_net herrno herrno-loc \
+	    gethstbyad gethstbyad_r gethstbynm gethstbynm2 gethstbynm2_r \
+	    gethstbynm_r gethstent gethstent_r \
+	    getnetbyad getnetbyad_r getnetbynm getnetent getnetent_r \
+	    getnetbynm_r \
+	    getproto getproto_r getprtent getprtent_r getprtname getprtname_r \
+	    getsrvbynm getsrvbynm_r getsrvbypt getsrvbypt_r getservent \
+	    getservent_r	\
+	    ether_aton ether_aton_r ether_hton ether_line \
+	    ether_ntoa ether_ntoa_r ether_ntoh \
+	    rcmd rexec ruserpass \
+	    getnetgrent_r getnetgrent \
+	    getaliasent_r getaliasent getaliasname getaliasname_r \
+	    in6_addr getnameinfo if_index ifaddrs inet6_option \
+	    getipv4sourcefilter setipv4sourcefilter \
+	    getsourcefilter setsourcefilter inet6_opt inet6_rth
+
+aux := check_pf check_native ifreq
+
+tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
+	 tst-gethnm test-ifaddrs bug-if1 test-inet6_opt tst-ether_line \
+	 tst-getni1 tst-getni2 tst-inet6_rth tst-checks
+
+include ../Rules
+
+ifeq ($(have-thread-library),yes)
+
+CFLAGS-gethstbyad_r.c = -fexceptions
+CFLAGS-gethstbyad.c = -fexceptions
+CFLAGS-gethstbynm_r.c = -fexceptions
+CFLAGS-gethstbynm.c = -fexceptions
+CFLAGS-gethstbynm2_r.c = -fexceptions
+CFLAGS-gethstbynm2.c = -fexceptions
+CFLAGS-gethstent_r.c = -fexceptions
+CFLAGS-gethstent.c = -fexceptions
+CFLAGS-rcmd.c = -fexceptions
+CFLAGS-getnetbynm_r.c = -fexceptions
+CFLAGS-getnetbynm.c = -fexceptions
+CFLAGS-getnetbyad_r.c = -fexceptions
+CFLAGS-getnetbyad.c = -fexceptions
+CFLAGS-getnetent_r.c = -fexceptions
+CFLAGS-getnetent.c = -fexceptions
+CFLAGS-getaliasent_r.c = -fexceptions
+CFLAGS-getaliasent.c = -fexceptions
+CFLAGS-getrpcent_r.c = -fexceptions
+CFLAGS-getrpcent.c = -fexceptions
+CFLAGS-getservent_r.c = -fexceptions
+CFLAGS-getservent.c = -fexceptions
+CFLAGS-getprtent_r.c = -fexceptions
+CFLAGS-getprtent.c = -fexceptions
+CFLAGS-either_ntoh.c = -fexceptions
+CFLAGS-either_hton.c = -fexceptions
+CFLAGS-getnetgrent.c = -fexceptions
+CFLAGS-getnetgrent_r.c = -fexceptions
+
+endif
+
+ifeq ($(build-static-nss),yes)
+CFLAGS += -DSTATIC_NSS
+endif
diff --git a/ap/libc/glibc/glibc-2.23/inet/Versions b/ap/libc/glibc/glibc-2.23/inet/Versions
new file mode 100644
index 0000000..56eb274
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/Versions
@@ -0,0 +1,89 @@
+libc {
+  GLIBC_2.0 {
+    # functions with required interface outside normal name space
+    __ivaliduser; __check_rhosts_file; __rcmd_errstr;
+
+    # variables in normal name space
+    rexecoptions;
+
+    # e*
+    endaliasent; endhostent; endnetent; endnetgrent; endprotoent; endservent;
+
+    # e*
+    ether_aton; ether_aton_r; ether_hostton; ether_line; ether_ntoa;
+    ether_ntoa_r; ether_ntohost;
+
+    # g*
+    getaliasbyname; getaliasbyname_r; getaliasent; getaliasent_r;
+    getdomainname; gethostbyaddr; gethostbyaddr_r; gethostbyname;
+    gethostbyname2; gethostbyname2_r; gethostbyname_r; gethostent;
+    gethostent_r; getnetbyaddr; getnetbyaddr_r; getnetbyname;
+    getnetbyname_r; getnetent; getnetent_r; getnetgrent; getnetgrent_r;
+    getprotobyname; getprotobyname_r; getprotobynumber;
+    getprotobynumber_r; getprotoent; getprotoent_r;
+    getservbyname; getservbyname_r; getservbyport;
+    getservbyport_r; getservent; getservent_r;
+
+    # h*
+    htonl; htons;
+
+    # i*
+    inet_addr; inet_aton; inet_lnaof; inet_makeaddr; inet_netof; inet_network;
+    inet_nsap_addr; inet_nsap_ntoa; inet_ntoa; inet_ntop; inet_pton; innetgr;
+    iruserok;
+
+    # n*
+    ntohl; ntohs;
+
+    # r*
+    rcmd; rexec; rresvport; ruserok; ruserpass;
+
+    # s*
+    setaliasent; setnetent; setnetgrent; setprotoent; setservent;
+  }
+  GLIBC_2.1 {
+    # variables in normal name space
+    in6addr_any; in6addr_loopback;
+
+    # i*
+    if_freenameindex; if_indextoname; if_nameindex; if_nametoindex;
+  }
+  GLIBC_2.1.2 {
+    # g*
+    getaliasbyname_r; getaliasent_r; gethostbyaddr_r; gethostbyname2_r;
+    gethostbyname_r; gethostent_r; getnetbyaddr_r; getnetbyname_r;
+    getnetent_r; getnetgrent_r; getprotobyname_r; getprotobynumber_r;
+    getprotoent_r; getservbyname_r;
+  }
+  GLIBC_2.2 {
+    # i*
+    iruserok_af;
+    # r*
+    rcmd_af; rexec_af; rresvport_af; ruserok_af;
+  }
+  GLIBC_2.3 {
+    # f*
+    freeifaddrs;
+    # g*
+    getifaddrs;
+  }
+  GLIBC_2.3.3 {
+    inet6_option_space; inet6_option_init; inet6_option_append;
+    inet6_option_alloc; inet6_option_next; inet6_option_find;
+  }
+  GLIBC_2.3.4 {
+    getipv4sourcefilter; setipv4sourcefilter;
+    getsourcefilter; setsourcefilter;
+  }
+  GLIBC_2.5 {
+    inet6_opt_init; inet6_opt_append; inet6_opt_finish; inet6_opt_set_val;
+    inet6_opt_next; inet6_opt_find; inet6_opt_get_val;
+    inet6_rth_space; inet6_rth_init; inet6_rth_add; inet6_rth_reverse;
+    inet6_rth_segments; inet6_rth_getaddr;
+  }
+  GLIBC_PRIVATE {
+    # functions used in other libraries
+    __internal_endnetgrent; __internal_getnetgrent_r;
+    __internal_setnetgrent;
+  }
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/aliases.h b/ap/libc/glibc/glibc-2.23/inet/aliases.h
new file mode 100644
index 0000000..44760d3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/aliases.h
@@ -0,0 +1,63 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _ALIASES_H
+#define _ALIASES_H	1
+
+#include <features.h>
+
+#include <sys/types.h>
+
+
+__BEGIN_DECLS
+
+/* Structure to represent one entry of the alias data base.  */
+struct aliasent
+  {
+    char *alias_name;
+    size_t alias_members_len;
+    char **alias_members;
+    int alias_local;
+  };
+
+
+/* Open alias data base files.  */
+extern void setaliasent (void) __THROW;
+
+/* Close alias data base files.  */
+extern void endaliasent (void) __THROW;
+
+/* Get the next entry from the alias data base.  */
+extern struct aliasent *getaliasent (void) __THROW;
+
+/* Get the next entry from the alias data base and put it in RESULT_BUF.  */
+extern int getaliasent_r (struct aliasent *__restrict __result_buf,
+			  char *__restrict __buffer, size_t __buflen,
+			  struct aliasent **__restrict __result) __THROW;
+
+/* Get alias entry corresponding to NAME.  */
+extern struct aliasent *getaliasbyname (const char *__name) __THROW;
+
+/* Get alias entry corresponding to NAME and put it in RESULT_BUF.  */
+extern int getaliasbyname_r (const char *__restrict __name,
+			     struct aliasent *__restrict __result_buf,
+			     char *__restrict __buffer, size_t __buflen,
+			     struct aliasent **__restrict __result) __THROW;
+
+__END_DECLS
+
+#endif /* aliases.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/arpa/ftp.h b/ap/libc/glibc/glibc-2.23/inet/arpa/ftp.h
new file mode 100644
index 0000000..e5b340d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/arpa/ftp.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 1983, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ftp.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _ARPA_FTP_H
+#define	_ARPA_FTP_H 1
+
+/* Definitions for FTP; see RFC-765. */
+
+/*
+ * Reply codes.
+ */
+#define PRELIM		1	/* positive preliminary */
+#define COMPLETE	2	/* positive completion */
+#define CONTINUE	3	/* positive intermediate */
+#define TRANSIENT	4	/* transient negative completion */
+#define ERROR		5	/* permanent negative completion */
+
+/*
+ * Type codes
+ */
+#define	TYPE_A		1	/* ASCII */
+#define	TYPE_E		2	/* EBCDIC */
+#define	TYPE_I		3	/* image */
+#define	TYPE_L		4	/* local byte size */
+
+#ifdef FTP_NAMES
+char *typenames[] =  {"0", "ASCII", "EBCDIC", "Image", "Local" };
+#endif
+
+/*
+ * Form codes
+ */
+#define	FORM_N		1	/* non-print */
+#define	FORM_T		2	/* telnet format effectors */
+#define	FORM_C		3	/* carriage control (ASA) */
+#ifdef FTP_NAMES
+char *formnames[] =  {"0", "Nonprint", "Telnet", "Carriage-control" };
+#endif
+
+/*
+ * Structure codes
+ */
+#define	STRU_F		1	/* file (no record structure) */
+#define	STRU_R		2	/* record structure */
+#define	STRU_P		3	/* page structure */
+#ifdef FTP_NAMES
+char *strunames[] =  {"0", "File", "Record", "Page" };
+#endif
+
+/*
+ * Mode types
+ */
+#define	MODE_S		1	/* stream */
+#define	MODE_B		2	/* block */
+#define	MODE_C		3	/* compressed */
+#ifdef FTP_NAMES
+char *modenames[] =  {"0", "Stream", "Block", "Compressed" };
+#endif
+
+/*
+ * Record Tokens
+ */
+#define	REC_ESC		'\377'	/* Record-mode Escape */
+#define	REC_EOR		'\001'	/* Record-mode End-of-Record */
+#define REC_EOF		'\002'	/* Record-mode End-of-File */
+
+/*
+ * Block Header
+ */
+#define	BLK_EOR		0x80	/* Block is End-of-Record */
+#define	BLK_EOF		0x40	/* Block is End-of-File */
+#define BLK_ERRORS	0x20	/* Block is suspected of containing errors */
+#define	BLK_RESTART	0x10	/* Block is Restart Marker */
+
+#define	BLK_BYTECOUNT	2	/* Bytes in this block */
+
+#endif /* arpa/ftp.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/arpa/inet.h b/ap/libc/glibc/glibc-2.23/inet/arpa/inet.h
new file mode 100644
index 0000000..94d3330
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/arpa/inet.h
@@ -0,0 +1,105 @@
+/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _ARPA_INET_H
+#define	_ARPA_INET_H	1
+
+#include <features.h>
+#include <netinet/in.h>		/* To define `struct in_addr'.  */
+
+/* Type for length arguments in socket calls.  */
+#ifndef __socklen_t_defined
+typedef __socklen_t socklen_t;
+# define __socklen_t_defined
+#endif
+
+__BEGIN_DECLS
+
+/* Convert Internet host address from numbers-and-dots notation in CP
+   into binary data in network byte order.  */
+extern in_addr_t inet_addr (const char *__cp) __THROW;
+
+/* Return the local host address part of the Internet address in IN.  */
+extern in_addr_t inet_lnaof (struct in_addr __in) __THROW;
+
+/* Make Internet host address in network byte order by combining the
+   network number NET with the local address HOST.  */
+extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host)
+     __THROW;
+
+/* Return network number part of the Internet address IN.  */
+extern in_addr_t inet_netof (struct in_addr __in) __THROW;
+
+/* Extract the network number in network byte order from the address
+   in numbers-and-dots natation starting at CP.  */
+extern in_addr_t inet_network (const char *__cp) __THROW;
+
+/* Convert Internet number in IN to ASCII representation.  The return value
+   is a pointer to an internal array containing the string.  */
+extern char *inet_ntoa (struct in_addr __in) __THROW;
+
+/* Convert from presentation format of an Internet number in buffer
+   starting at CP to the binary network format and store result for
+   interface type AF in buffer starting at BUF.  */
+extern int inet_pton (int __af, const char *__restrict __cp,
+		      void *__restrict __buf) __THROW;
+
+/* Convert a Internet address in binary network format for interface
+   type AF in buffer starting at CP to presentation form and place
+   result in buffer of length LEN astarting at BUF.  */
+extern const char *inet_ntop (int __af, const void *__restrict __cp,
+			      char *__restrict __buf, socklen_t __len)
+     __THROW;
+
+
+/* The following functions are not part of XNS 5.2.  */
+#ifdef __USE_MISC
+/* Convert Internet host address from numbers-and-dots notation in CP
+   into binary data and store the result in the structure INP.  */
+extern int inet_aton (const char *__cp, struct in_addr *__inp) __THROW;
+
+/* Format a network number NET into presentation format and place result
+   in buffer starting at BUF with length of LEN bytes.  */
+extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW;
+
+/* Convert network number for interface type AF in buffer starting at
+   CP to presentation format.  The result will specifiy BITS bits of
+   the number.  */
+extern char *inet_net_ntop (int __af, const void *__cp, int __bits,
+			    char *__buf, size_t __len) __THROW;
+
+/* Convert network number for interface type AF from presentation in
+   buffer starting at CP to network format and store result int
+   buffer starting at BUF of size LEN.  */
+extern int inet_net_pton (int __af, const char *__cp,
+			  void *__buf, size_t __len) __THROW;
+
+/* Convert ASCII representation in hexadecimal form of the Internet
+   address to binary form and place result in buffer of length LEN
+   starting at BUF.  */
+extern unsigned int inet_nsap_addr (const char *__cp,
+				    unsigned char *__buf, int __len) __THROW;
+
+/* Convert internet address in binary form in LEN bytes starting at CP
+   a presentation form and place result in BUF.  */
+extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp,
+			     char *__buf) __THROW;
+#endif
+
+__END_DECLS
+
+#endif /* arpa/inet.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/arpa/telnet.h b/ap/libc/glibc/glibc-2.23/inet/arpa/telnet.h
new file mode 100644
index 0000000..3774c89
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/arpa/telnet.h
@@ -0,0 +1,316 @@
+/*
+ * Copyright (c) 1983, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)telnet.h	8.2 (Berkeley) 12/15/93
+ */
+
+#ifndef _ARPA_TELNET_H
+#define	_ARPA_TELNET_H 1
+
+/*
+ * Definitions for the TELNET protocol.
+ */
+#define	IAC	255		/* interpret as command: */
+#define	DONT	254		/* you are not to use option */
+#define	DO	253		/* please, you use option */
+#define	WONT	252		/* I won't use option */
+#define	WILL	251		/* I will use option */
+#define	SB	250		/* interpret as subnegotiation */
+#define	GA	249		/* you may reverse the line */
+#define	EL	248		/* erase the current line */
+#define	EC	247		/* erase the current character */
+#define	AYT	246		/* are you there */
+#define	AO	245		/* abort output--but let prog finish */
+#define	IP	244		/* interrupt process--permanently */
+#define	BREAK	243		/* break */
+#define	DM	242		/* data mark--for connect. cleaning */
+#define	NOP	241		/* nop */
+#define	SE	240		/* end sub negotiation */
+#define EOR     239             /* end of record (transparent mode) */
+#define	ABORT	238		/* Abort process */
+#define	SUSP	237		/* Suspend process */
+#define	xEOF	236		/* End of file: EOF is already used... */
+
+#define SYNCH	242		/* for telfunc calls */
+
+#ifdef TELCMDS
+char *telcmds[] = {
+	"EOF", "SUSP", "ABORT", "EOR",
+	"SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
+	"EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0,
+};
+#else
+extern char *telcmds[];
+#endif
+
+#define	TELCMD_FIRST	xEOF
+#define	TELCMD_LAST	IAC
+#define	TELCMD_OK(x)	((unsigned int)(x) <= TELCMD_LAST && \
+			 (unsigned int)(x) >= TELCMD_FIRST)
+#define	TELCMD(x)	telcmds[(x)-TELCMD_FIRST]
+
+/* telnet options */
+#define TELOPT_BINARY	0	/* 8-bit data path */
+#define TELOPT_ECHO	1	/* echo */
+#define	TELOPT_RCP	2	/* prepare to reconnect */
+#define	TELOPT_SGA	3	/* suppress go ahead */
+#define	TELOPT_NAMS	4	/* approximate message size */
+#define	TELOPT_STATUS	5	/* give status */
+#define	TELOPT_TM	6	/* timing mark */
+#define	TELOPT_RCTE	7	/* remote controlled transmission and echo */
+#define TELOPT_NAOL 	8	/* negotiate about output line width */
+#define TELOPT_NAOP 	9	/* negotiate about output page size */
+#define TELOPT_NAOCRD	10	/* negotiate about CR disposition */
+#define TELOPT_NAOHTS	11	/* negotiate about horizontal tabstops */
+#define TELOPT_NAOHTD	12	/* negotiate about horizontal tab disposition */
+#define TELOPT_NAOFFD	13	/* negotiate about formfeed disposition */
+#define TELOPT_NAOVTS	14	/* negotiate about vertical tab stops */
+#define TELOPT_NAOVTD	15	/* negotiate about vertical tab disposition */
+#define TELOPT_NAOLFD	16	/* negotiate about output LF disposition */
+#define TELOPT_XASCII	17	/* extended ascii character set */
+#define	TELOPT_LOGOUT	18	/* force logout */
+#define	TELOPT_BM	19	/* byte macro */
+#define	TELOPT_DET	20	/* data entry terminal */
+#define	TELOPT_SUPDUP	21	/* supdup protocol */
+#define	TELOPT_SUPDUPOUTPUT 22	/* supdup output */
+#define	TELOPT_SNDLOC	23	/* send location */
+#define	TELOPT_TTYPE	24	/* terminal type */
+#define	TELOPT_EOR	25	/* end or record */
+#define	TELOPT_TUID	26	/* TACACS user identification */
+#define	TELOPT_OUTMRK	27	/* output marking */
+#define	TELOPT_TTYLOC	28	/* terminal location number */
+#define	TELOPT_3270REGIME 29	/* 3270 regime */
+#define	TELOPT_X3PAD	30	/* X.3 PAD */
+#define	TELOPT_NAWS	31	/* window size */
+#define	TELOPT_TSPEED	32	/* terminal speed */
+#define	TELOPT_LFLOW	33	/* remote flow control */
+#define TELOPT_LINEMODE	34	/* Linemode option */
+#define TELOPT_XDISPLOC	35	/* X Display Location */
+#define TELOPT_OLD_ENVIRON 36	/* Old - Environment variables */
+#define	TELOPT_AUTHENTICATION 37/* Authenticate */
+#define	TELOPT_ENCRYPT	38	/* Encryption option */
+#define TELOPT_NEW_ENVIRON 39	/* New - Environment variables */
+#define	TELOPT_EXOPL	255	/* extended-options-list */
+
+
+#define	NTELOPTS	(1+TELOPT_NEW_ENVIRON)
+#ifdef TELOPTS
+char *telopts[NTELOPTS+1] = {
+	"BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
+	"STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
+	"NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
+	"NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
+	"DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
+	"SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
+	"TACACS UID", "OUTPUT MARKING", "TTYLOC",
+	"3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
+	"LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
+	"ENCRYPT", "NEW-ENVIRON",
+	0,
+};
+#define	TELOPT_FIRST	TELOPT_BINARY
+#define	TELOPT_LAST	TELOPT_NEW_ENVIRON
+#define	TELOPT_OK(x)	((unsigned int)(x) <= TELOPT_LAST)
+#define	TELOPT(x)	telopts[(x)-TELOPT_FIRST]
+#endif
+
+/* sub-option qualifiers */
+#define	TELQUAL_IS	0	/* option is... */
+#define	TELQUAL_SEND	1	/* send option */
+#define	TELQUAL_INFO	2	/* ENVIRON: informational version of IS */
+#define	TELQUAL_REPLY	2	/* AUTHENTICATION: client version of IS */
+#define	TELQUAL_NAME	3	/* AUTHENTICATION: client version of IS */
+
+#define	LFLOW_OFF		0	/* Disable remote flow control */
+#define	LFLOW_ON		1	/* Enable remote flow control */
+#define	LFLOW_RESTART_ANY	2	/* Restart output on any char */
+#define	LFLOW_RESTART_XON	3	/* Restart output only on XON */
+
+/*
+ * LINEMODE suboptions
+ */
+
+#define	LM_MODE		1
+#define	LM_FORWARDMASK	2
+#define	LM_SLC		3
+
+#define	MODE_EDIT	0x01
+#define	MODE_TRAPSIG	0x02
+#define	MODE_ACK	0x04
+#define MODE_SOFT_TAB	0x08
+#define MODE_LIT_ECHO	0x10
+
+#define	MODE_MASK	0x1f
+
+/* Not part of protocol, but needed to simplify things... */
+#define MODE_FLOW		0x0100
+#define MODE_ECHO		0x0200
+#define MODE_INBIN		0x0400
+#define MODE_OUTBIN		0x0800
+#define MODE_FORCE		0x1000
+
+#define	SLC_SYNCH	1
+#define	SLC_BRK		2
+#define	SLC_IP		3
+#define	SLC_AO		4
+#define	SLC_AYT		5
+#define	SLC_EOR		6
+#define	SLC_ABORT	7
+#define	SLC_EOF		8
+#define	SLC_SUSP	9
+#define	SLC_EC		10
+#define	SLC_EL		11
+#define	SLC_EW		12
+#define	SLC_RP		13
+#define	SLC_LNEXT	14
+#define	SLC_XON		15
+#define	SLC_XOFF	16
+#define	SLC_FORW1	17
+#define	SLC_FORW2	18
+
+#define	NSLC		18
+
+/*
+ * For backwards compatibility, we define SLC_NAMES to be the
+ * list of names if SLC_NAMES is not defined.
+ */
+#define	SLC_NAMELIST	"0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
+			"ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
+			"LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0,
+#ifdef	SLC_NAMES
+char *slc_names[] = {
+	SLC_NAMELIST
+};
+#else
+extern char *slc_names[];
+#define	SLC_NAMES SLC_NAMELIST
+#endif
+
+#define	SLC_NAME_OK(x)	((unsigned int)(x) <= NSLC)
+#define SLC_NAME(x)	slc_names[x]
+
+#define	SLC_NOSUPPORT	0
+#define	SLC_CANTCHANGE	1
+#define	SLC_VARIABLE	2
+#define	SLC_DEFAULT	3
+#define	SLC_LEVELBITS	0x03
+
+#define	SLC_FUNC	0
+#define	SLC_FLAGS	1
+#define	SLC_VALUE	2
+
+#define	SLC_ACK		0x80
+#define	SLC_FLUSHIN	0x40
+#define	SLC_FLUSHOUT	0x20
+
+#define	OLD_ENV_VAR	1
+#define	OLD_ENV_VALUE	0
+#define	NEW_ENV_VAR	0
+#define	NEW_ENV_VALUE	1
+#define	ENV_ESC		2
+#define ENV_USERVAR	3
+
+/*
+ * AUTHENTICATION suboptions
+ */
+
+/*
+ * Who is authenticating who ...
+ */
+#define	AUTH_WHO_CLIENT		0	/* Client authenticating server */
+#define	AUTH_WHO_SERVER		1	/* Server authenticating client */
+#define	AUTH_WHO_MASK		1
+
+/*
+ * amount of authentication done
+ */
+#define	AUTH_HOW_ONE_WAY	0
+#define	AUTH_HOW_MUTUAL		2
+#define	AUTH_HOW_MASK		2
+
+#define	AUTHTYPE_NULL		0
+#define	AUTHTYPE_KERBEROS_V4	1
+#define	AUTHTYPE_KERBEROS_V5	2
+#define	AUTHTYPE_SPX		3
+#define	AUTHTYPE_MINK		4
+#define	AUTHTYPE_CNT		5
+
+#define	AUTHTYPE_TEST		99
+
+#ifdef	AUTH_NAMES
+char *authtype_names[] = {
+	"NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0,
+};
+#else
+extern char *authtype_names[];
+#endif
+
+#define	AUTHTYPE_NAME_OK(x)	((unsigned int)(x) < AUTHTYPE_CNT)
+#define	AUTHTYPE_NAME(x)	authtype_names[x]
+
+/*
+ * ENCRYPTion suboptions
+ */
+#define	ENCRYPT_IS		0	/* I pick encryption type ... */
+#define	ENCRYPT_SUPPORT		1	/* I support encryption types ... */
+#define	ENCRYPT_REPLY		2	/* Initial setup response */
+#define	ENCRYPT_START		3	/* Am starting to send encrypted */
+#define	ENCRYPT_END		4	/* Am ending encrypted */
+#define	ENCRYPT_REQSTART	5	/* Request you start encrypting */
+#define	ENCRYPT_REQEND		6	/* Request you send encrypting */
+#define	ENCRYPT_ENC_KEYID	7
+#define	ENCRYPT_DEC_KEYID	8
+#define	ENCRYPT_CNT		9
+
+#define	ENCTYPE_ANY		0
+#define	ENCTYPE_DES_CFB64	1
+#define	ENCTYPE_DES_OFB64	2
+#define	ENCTYPE_CNT		3
+
+#ifdef	ENCRYPT_NAMES
+char *encrypt_names[] = {
+	"IS", "SUPPORT", "REPLY", "START", "END",
+	"REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
+	0,
+};
+char *enctype_names[] = {
+	"ANY", "DES_CFB64",  "DES_OFB64",  0,
+};
+#else
+extern char *encrypt_names[];
+extern char *enctype_names[];
+#endif
+
+
+#define	ENCRYPT_NAME_OK(x)	((unsigned int)(x) < ENCRYPT_CNT)
+#define	ENCRYPT_NAME(x)		encrypt_names[x]
+
+#define	ENCTYPE_NAME_OK(x)	((unsigned int)(x) < ENCTYPE_CNT)
+#define	ENCTYPE_NAME(x)		enctype_names[x]
+
+#endif /* arpa/telnet.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/arpa/tftp.h b/ap/libc/glibc/glibc-2.23/inet/arpa/tftp.h
new file mode 100644
index 0000000..86e0b6e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/arpa/tftp.h
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 1983, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)tftp.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _ARPA_TFTP_H
+#define	_ARPA_TFTP_H 1
+
+/*
+ * Trivial File Transfer Protocol (IEN-133)
+ */
+#define	SEGSIZE		512		/* data segment size */
+
+/*
+ * Packet types.
+ */
+#define	RRQ	01				/* read request */
+#define	WRQ	02				/* write request */
+#define	DATA	03				/* data packet */
+#define	ACK	04				/* acknowledgement */
+#define	ERROR	05				/* error code */
+
+struct	tftphdr {
+	short	th_opcode;			/* packet type */
+	union {
+		char	tu_padding[3];		/* sizeof() compat */
+		struct {
+			union {
+				unsigned short	tu_block;	/* block # */
+				short	tu_code;		/* error code */
+			} __attribute__ ((__packed__)) th_u3;
+			char tu_data[0];	/* data or error string */
+		} __attribute__ ((__packed__)) th_u2;
+		char	tu_stuff[0];		/* request packet stuff */
+	} __attribute__ ((__packed__)) th_u1;
+} __attribute__ ((__packed__));
+
+#define	th_block	th_u1.th_u2.th_u3.tu_block
+#define	th_code		th_u1.th_u2.th_u3.tu_code
+#define	th_stuff	th_u1.tu_stuff
+#define	th_data		th_u1.th_u2.tu_data
+#define	th_msg		th_u1.th_u2.tu_data
+
+/*
+ * Error codes.
+ */
+#define	EUNDEF		0		/* not defined */
+#define	ENOTFOUND	1		/* file not found */
+#define	EACCESS		2		/* access violation */
+#define	ENOSPACE	3		/* disk full or allocation exceeded */
+#define	EBADOP		4		/* illegal TFTP operation */
+#define	EBADID		5		/* unknown transfer ID */
+#define	EEXISTS		6		/* file already exists */
+#define	ENOUSER		7		/* no such user */
+
+#endif /* arpa/tftp.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/bug-if1.c b/ap/libc/glibc/glibc-2.23/inet/bug-if1.c
new file mode 100644
index 0000000..cbe9638
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/bug-if1.c
@@ -0,0 +1,53 @@
+/* Copyright (C) 2004-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
+#include <net/if.h>
+
+
+static int
+do_test (void)
+{
+  char buf[IF_NAMESIZE];
+  /* Index 0 is always invalid (see RFC 3493).  */
+  char *cp = if_indextoname (0, buf);
+  if (cp != NULL)
+    {
+      printf ("invalid index returned result \"%s\"\n", cp);
+      return 1;
+    }
+  else if (errno != ENXIO)
+    {
+      int err = errno;
+      char errbuf1[256];
+      char errbuf2[256];
+
+      printf ("errno = %d (%s), expected %d (%s)\n",
+	      err, strerror_r (err, errbuf1, sizeof (errbuf1)),
+	      ENXIO, strerror_r (ENXIO, errbuf2, sizeof (errbuf2)));
+      return 1;
+    }
+
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/check_native.c b/ap/libc/glibc/glibc-2.23/inet/check_native.c
new file mode 100644
index 0000000..f59458d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/check_native.c
@@ -0,0 +1,27 @@
+/* Determine whether interfaces use native transport.  Generic version.
+   Copyright (C) 2012-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <ifaddrs.h>
+#include <stdint.h>
+
+void
+attribute_hidden
+__check_native (uint32_t a1_index, int *a1_native,
+		uint32_t a2_index, int *a2_native)
+{
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/check_pf.c b/ap/libc/glibc/glibc-2.23/inet/check_pf.c
new file mode 100644
index 0000000..e7e7f9f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/check_pf.c
@@ -0,0 +1,71 @@
+/* Determine protocol families for which interfaces exist.  Generic version.
+   Copyright (C) 2003-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <ifaddrs.h>
+#include <netdb.h>
+#include <stdint.h>
+
+void
+attribute_hidden
+__check_pf (bool *seen_ipv4, bool *seen_ipv6,
+	    struct in6addrinfo **in6ai, size_t *in6ailen)
+{
+  /* By default we have no way to determine information about
+     deprecated and temporary addresses.  */
+  *in6ai = NULL;
+  *in6ailen = 0;
+
+  /* Get the interface list via getifaddrs.  */
+  struct ifaddrs *ifa = NULL;
+  if (getifaddrs (&ifa) != 0)
+    {
+      /* We cannot determine what interfaces are available.  Be
+	 pessimistic.  */
+      *seen_ipv4 = true;
+      *seen_ipv6 = true;
+      return;
+    }
+
+  *seen_ipv4 = false;
+  *seen_ipv6 = false;
+
+  struct ifaddrs *runp;
+  for (runp = ifa; runp != NULL; runp = runp->ifa_next)
+    if (runp->ifa_addr->sa_family == PF_INET)
+      *seen_ipv4 = true;
+    else if (runp->ifa_addr->sa_family == PF_INET6)
+      *seen_ipv6 = true;
+
+  (void) freeifaddrs (ifa);
+}
+
+
+void
+__free_in6ai (struct in6addrinfo *in6ai)
+{
+  /* Nothing to do.  */
+}
+
+
+#if IS_IN (nscd)
+uint32_t
+__bump_nl_timestamp (void)
+{
+  return 0;
+}
+#endif
diff --git a/ap/libc/glibc/glibc-2.23/inet/ether_aton.c b/ap/libc/glibc/glibc-2.23/inet/ether_aton.c
new file mode 100644
index 0000000..9c2c26e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/ether_aton.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netinet/ether.h>
+
+
+struct ether_addr *
+ether_aton (const char *asc)
+{
+  static struct ether_addr result;
+
+  return ether_aton_r (asc, &result);
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/ether_aton_r.c b/ap/libc/glibc/glibc-2.23/inet/ether_aton_r.c
new file mode 100644
index 0000000..07b82c1
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/ether_aton_r.c
@@ -0,0 +1,63 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <netinet/ether.h>
+#include <netinet/if_ether.h>
+
+
+struct ether_addr *
+ether_aton_r (const char *asc, struct ether_addr *addr)
+{
+  size_t cnt;
+
+  for (cnt = 0; cnt < 6; ++cnt)
+    {
+      unsigned int number;
+      char ch;
+
+      ch = _tolower (*asc++);
+      if ((ch < '0' || ch > '9') && (ch < 'a' || ch > 'f'))
+	return NULL;
+      number = isdigit (ch) ? (ch - '0') : (ch - 'a' + 10);
+
+      ch = _tolower (*asc);
+      if ((cnt < 5 && ch != ':') || (cnt == 5 && ch != '\0' && !isspace (ch)))
+	{
+	  ++asc;
+	  if ((ch < '0' || ch > '9') && (ch < 'a' || ch > 'f'))
+	    return NULL;
+	  number <<= 4;
+	  number += isdigit (ch) ? (ch - '0') : (ch - 'a' + 10);
+
+	  ch = *asc;
+	  if (cnt < 5 && ch != ':')
+	    return NULL;
+	}
+
+      /* Store result.  */
+      addr->ether_addr_octet[cnt] = (unsigned char) number;
+
+      /* Skip ':'.  */
+      ++asc;
+    }
+
+  return addr;
+}
+libc_hidden_def (ether_aton_r)
diff --git a/ap/libc/glibc/glibc-2.23/inet/ether_hton.c b/ap/libc/glibc/glibc-2.23/inet/ether_hton.c
new file mode 100644
index 0000000..225604e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/ether_hton.c
@@ -0,0 +1,81 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <netinet/ether.h>
+#include <netinet/if_ether.h>
+#include <string.h>
+
+#include "../nss/nsswitch.h"
+
+/* Type of the lookup function we need here.  */
+typedef int (*lookup_function) (const char *, struct etherent *, char *, int,
+				int *);
+
+/* The lookup function for the first entry of this service.  */
+extern int __nss_ethers_lookup (service_user **nip, const char *name,
+				void **fctp) internal_function;
+
+
+int
+ether_hostton (const char *hostname, struct ether_addr *addr)
+{
+  static service_user *startp;
+  static lookup_function start_fct;
+  service_user *nip;
+  union
+  {
+    lookup_function f;
+    void *ptr;
+  } fct;
+  int no_more;
+  enum nss_status status = NSS_STATUS_UNAVAIL;
+  struct etherent etherent;
+
+  if (startp == NULL)
+    {
+      no_more = __nss_ethers_lookup (&nip, "gethostton_r", &fct.ptr);
+      if (no_more)
+	startp = (service_user *) -1;
+      else
+	{
+	  startp = nip;
+	  start_fct = fct.f;
+	}
+    }
+  else
+    {
+      fct.f = start_fct;
+      no_more = (nip = startp) == (service_user *) -1;
+    }
+
+  while (no_more == 0)
+    {
+      char buffer[1024];
+
+      status = (*fct.f) (hostname, &etherent, buffer, sizeof buffer, &errno);
+
+      no_more = __nss_next2 (&nip, "gethostton_r", NULL, &fct.ptr, status, 0);
+    }
+
+  if (status == NSS_STATUS_SUCCESS)
+    memcpy (addr, etherent.e_addr.ether_addr_octet,
+	    sizeof (struct ether_addr));
+
+  return status == NSS_STATUS_SUCCESS ? 0 : -1;
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/ether_line.c b/ap/libc/glibc/glibc-2.23/inet/ether_line.c
new file mode 100644
index 0000000..fc71072
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/ether_line.c
@@ -0,0 +1,76 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <netinet/ether.h>
+#include <netinet/if_ether.h>
+
+
+int
+ether_line (const char *line, struct ether_addr *addr, char *hostname)
+{
+  for (size_t cnt = 0; cnt < 6; ++cnt)
+    {
+      unsigned int number;
+      char ch;
+
+      ch = _tolower (*line++);
+      if ((ch < '0' || ch > '9') && (ch < 'a' || ch > 'f'))
+	return -1;
+      number = isdigit (ch) ? (ch - '0') : (ch - 'a' + 10);
+
+      ch = _tolower (*line);
+      if ((cnt < 5 && ch != ':') || (cnt == 5 && ch != '\0' && !isspace (ch)))
+	{
+	  ++line;
+	  if ((ch < '0' || ch > '9') && (ch < 'a' || ch > 'f'))
+	    return -1;
+	  number <<= 4;
+	  number += isdigit (ch) ? (ch - '0') : (ch - 'a' + 10);
+
+	  ch = *line;
+	  if (cnt < 5 && ch != ':')
+	    return -1;
+	}
+
+      /* Store result.  */
+      addr->ether_addr_octet[cnt] = (unsigned char) number;
+
+      /* Skip ':'.  */
+      if (ch != '\0')
+	++line;
+    }
+
+  /* Skip initial whitespace.  */
+  while (isspace (*line))
+    ++line;
+
+  if (*line == '#' || *line == '\0')
+    /* No hostname.  */
+    return -1;
+
+  /* The hostname is up to the next non-space character.  */
+  /* XXX This can cause trouble because the hostname might be too long
+     but we have no possibility to check it here.  */
+  while (*line != '\0' && *line != '#' && !isspace (*line))
+    *hostname++ = *line++;
+  *hostname = '\0';
+
+  return 0;
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/ether_ntoa.c b/ap/libc/glibc/glibc-2.23/inet/ether_ntoa.c
new file mode 100644
index 0000000..2dab761
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/ether_ntoa.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netinet/ether.h>
+#include <netinet/if_ether.h>
+
+
+char *
+ether_ntoa (const struct ether_addr *addr)
+{
+  static char asc[18];
+
+  return ether_ntoa_r (addr, asc);
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/ether_ntoa_r.c b/ap/libc/glibc/glibc-2.23/inet/ether_ntoa_r.c
new file mode 100644
index 0000000..e2b956a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/ether_ntoa_r.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stdio.h>
+#include <netinet/ether.h>
+#include <netinet/if_ether.h>
+
+
+char *
+ether_ntoa_r (const struct ether_addr *addr, char *buf)
+{
+  sprintf (buf, "%x:%x:%x:%x:%x:%x",
+	   addr->ether_addr_octet[0], addr->ether_addr_octet[1],
+	   addr->ether_addr_octet[2], addr->ether_addr_octet[3],
+	   addr->ether_addr_octet[4], addr->ether_addr_octet[5]);
+  return buf;
+}
+libc_hidden_def (ether_ntoa_r)
diff --git a/ap/libc/glibc/glibc-2.23/inet/ether_ntoh.c b/ap/libc/glibc/glibc-2.23/inet/ether_ntoh.c
new file mode 100644
index 0000000..8063a44
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/ether_ntoh.c
@@ -0,0 +1,84 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <netinet/ether.h>
+#include <netinet/if_ether.h>
+#include <string.h>
+
+#include <nss/nsswitch.h>
+
+
+/* Type of the lookup function we need here.  */
+typedef int (*lookup_function) (const struct ether_addr *, struct etherent *,
+				char *, size_t, int *);
+
+/* The lookup function for the first entry of this service.  */
+extern int __nss_ethers_lookup (service_user **nip, const char *name,
+				void **fctp) internal_function;
+
+
+int
+ether_ntohost (char *hostname, const struct ether_addr *addr)
+{
+  static service_user *startp;
+  static lookup_function start_fct;
+  service_user *nip;
+  union
+  {
+    lookup_function f;
+    void *ptr;
+  } fct;
+  int no_more;
+  enum nss_status status = NSS_STATUS_UNAVAIL;
+  struct etherent etherent;
+
+  if (startp == NULL)
+    {
+      no_more = __nss_ethers_lookup (&nip, "getntohost_r", &fct.ptr);
+      if (no_more)
+	startp = (service_user *) -1;
+      else
+	{
+	  startp = nip;
+	  start_fct = fct.f;
+	}
+    }
+  else
+    {
+      fct.f = start_fct;
+      no_more = (nip = startp) == (service_user *) -1;
+    }
+
+  while (no_more == 0)
+    {
+      char buffer[1024];
+
+      status = (*fct.f) (addr, &etherent, buffer, sizeof buffer, &errno);
+
+      no_more = __nss_next2 (&nip, "getntohost_r", NULL, &fct.ptr, status, 0);
+    }
+
+  if (status == NSS_STATUS_SUCCESS)
+    /* XXX This is a potential cause of trouble because the size of
+       the HOSTNAME buffer is not known but the interface does not
+       provide this information.  */
+    strcpy (hostname, etherent.e_name);
+
+  return status == NSS_STATUS_SUCCESS ? 0 : -1;
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/getaliasent.c b/ap/libc/glibc/glibc-2.23/inet/getaliasent.c
new file mode 100644
index 0000000..0df80ec
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getaliasent.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <aliases.h>
+
+
+#define LOOKUP_TYPE	struct aliasent
+#define	GETFUNC_NAME	getaliasent
+#define BUFLEN		1024
+
+/* There is no nscd support for the aliases file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXent.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getaliasent_r.c b/ap/libc/glibc/glibc-2.23/inet/getaliasent_r.c
new file mode 100644
index 0000000..d6c32e9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getaliasent_r.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <aliases.h>
+
+
+#define LOOKUP_TYPE		struct aliasent
+#define SETFUNC_NAME		setaliasent
+#define	GETFUNC_NAME		getaliasent
+#define	ENDFUNC_NAME		endaliasent
+#define DATABASE_NAME		aliases
+
+/* There is no nscd support for the aliases file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXent_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getaliasname.c b/ap/libc/glibc/glibc-2.23/inet/getaliasname.c
new file mode 100644
index 0000000..1a01126
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getaliasname.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <aliases.h>
+
+
+#define LOOKUP_TYPE	struct aliasent
+#define FUNCTION_NAME	getaliasbyname
+#define DATABASE_NAME	aliases
+#define ADD_PARAMS	const char *name
+#define ADD_VARIABLES	name
+#define BUFLEN		1024
+
+/* There is no nscd support for the aliases file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXbyYY.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getaliasname_r.c b/ap/libc/glibc/glibc-2.23/inet/getaliasname_r.c
new file mode 100644
index 0000000..2133947
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getaliasname_r.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <aliases.h>
+
+
+#define LOOKUP_TYPE		struct aliasent
+#define FUNCTION_NAME		getaliasbyname
+#define DATABASE_NAME		aliases
+#define ADD_PARAMS		const char *name
+#define ADD_VARIABLES		name
+
+/* There is no nscd support for the aliases file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXbyYY_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/gethstbyad.c b/ap/libc/glibc/glibc-2.23/inet/gethstbyad.c
new file mode 100644
index 0000000..31e91d0
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/gethstbyad.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE	struct hostent
+#define FUNCTION_NAME	gethostbyaddr
+#define DATABASE_NAME	hosts
+#define ADD_PARAMS	const void *addr, socklen_t len, int type
+#define ADD_VARIABLES	addr, len, type
+#define BUFLEN		1024
+#define NEED_H_ERRNO	1
+
+#include "../nss/getXXbyYY.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/gethstbyad_r.c b/ap/libc/glibc/glibc-2.23/inet/gethstbyad_r.c
new file mode 100644
index 0000000..3683ce3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/gethstbyad_r.c
@@ -0,0 +1,52 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+#include <string.h>
+
+
+#define LOOKUP_TYPE	struct hostent
+#define FUNCTION_NAME	gethostbyaddr
+#define DATABASE_NAME	hosts
+#define ADD_PARAMS	const void *addr, socklen_t len, int type
+#define ADD_VARIABLES	addr, len, type
+#define NEED_H_ERRNO	1
+#define NEED__RES	1
+#define NEED__RES_HCONF	1
+/* If the addr parameter is the IPv6 unspecified address no query must
+   be performed.  */
+#define PREPROCESS \
+  if (len == sizeof (struct in6_addr)					      \
+      && __builtin_expect (memcmp (&__in6addr_any, addr,		      \
+				   sizeof (struct in6_addr)), 1) == 0)	      \
+    {									      \
+      *h_errnop = HOST_NOT_FOUND;					      \
+      *result = NULL;							      \
+      return ENOENT;							      \
+    }
+#define POSTPROCESS \
+  if (status == NSS_STATUS_SUCCESS)					      \
+    {									      \
+      _res_hconf_reorder_addrs (resbuf);				      \
+      _res_hconf_trim_domains (resbuf);					      \
+    }
+
+/* Special name for the lookup function.  */
+#define DB_LOOKUP_FCT __nss_hosts_lookup2
+
+#include "../nss/getXXbyYY_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/gethstbynm.c b/ap/libc/glibc/glibc-2.23/inet/gethstbynm.c
new file mode 100644
index 0000000..7597cc3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/gethstbynm.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <string.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+
+
+#define LOOKUP_TYPE	struct hostent
+#define FUNCTION_NAME	gethostbyname
+#define DATABASE_NAME	hosts
+#define ADD_PARAMS	const char *name
+#define ADD_VARIABLES	name
+#define BUFLEN		1024
+#define NEED_H_ERRNO	1
+
+#define HANDLE_DIGITS_DOTS	1
+
+#include <nss/getXXbyYY.c>
diff --git a/ap/libc/glibc/glibc-2.23/inet/gethstbynm2.c b/ap/libc/glibc/glibc-2.23/inet/gethstbynm2.c
new file mode 100644
index 0000000..798455f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/gethstbynm2.c
@@ -0,0 +1,38 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <string.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+
+
+#define LOOKUP_TYPE	struct hostent
+#define FUNCTION_NAME	gethostbyname2
+#define DATABASE_NAME	hosts
+#define ADD_PARAMS	const char *name, int af
+#define ADD_VARIABLES	name, af
+#define BUFLEN		1024
+#define NEED_H_ERRNO	1
+
+#define HANDLE_DIGITS_DOTS	1
+#define HAVE_AF			1
+
+#include "../nss/getXXbyYY.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/gethstbynm2_r.c b/ap/libc/glibc/glibc-2.23/inet/gethstbynm2_r.c
new file mode 100644
index 0000000..c06c7aa
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/gethstbynm2_r.c
@@ -0,0 +1,45 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <string.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+
+
+#define LOOKUP_TYPE	struct hostent
+#define FUNCTION_NAME	gethostbyname2
+#define DATABASE_NAME	hosts
+#define ADD_PARAMS	const char *name, int af
+#define ADD_VARIABLES	name, af
+#define NEED_H_ERRNO	1
+#define NEED__RES_HCONF	1
+#define POSTPROCESS \
+  if (status == NSS_STATUS_SUCCESS)					      \
+    _res_hconf_reorder_addrs (resbuf);
+
+#define HANDLE_DIGITS_DOTS	1
+#define HAVE_LOOKUP_BUFFER	1
+#define HAVE_AF			1
+
+/* Special name for the lookup function.  */
+#define DB_LOOKUP_FCT __nss_hosts_lookup2
+
+#include "../nss/getXXbyYY_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/gethstbynm_r.c b/ap/libc/glibc/glibc-2.23/inet/gethstbynm_r.c
new file mode 100644
index 0000000..3cfe50b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/gethstbynm_r.c
@@ -0,0 +1,44 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <string.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+
+
+#define LOOKUP_TYPE	struct hostent
+#define FUNCTION_NAME	gethostbyname
+#define DATABASE_NAME	hosts
+#define ADD_PARAMS	const char *name
+#define ADD_VARIABLES	name
+#define NEED_H_ERRNO	1
+#define NEED__RES_HCONF	1
+#define POSTPROCESS \
+  if (status == NSS_STATUS_SUCCESS)					      \
+    _res_hconf_reorder_addrs (resbuf);
+
+#define HANDLE_DIGITS_DOTS	1
+#define HAVE_LOOKUP_BUFFER	1
+
+/* Special name for the lookup function.  */
+#define DB_LOOKUP_FCT __nss_hosts_lookup2
+
+#include "../nss/getXXbyYY_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/gethstent.c b/ap/libc/glibc/glibc-2.23/inet/gethstent.c
new file mode 100644
index 0000000..c1523cf
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/gethstent.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE	struct hostent
+#define	GETFUNC_NAME	gethostent
+#define BUFLEN		1024
+#define NEED_H_ERRNO	1
+
+#include "../nss/getXXent.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/gethstent_r.c b/ap/libc/glibc/glibc-2.23/inet/gethstent_r.c
new file mode 100644
index 0000000..140e848
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/gethstent_r.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE	struct hostent
+#define SETFUNC_NAME	sethostent
+#define	GETFUNC_NAME	gethostent
+#define	ENDFUNC_NAME	endhostent
+#define DATABASE_NAME	hosts
+#define STAYOPEN	int stayopen
+#define STAYOPEN_VAR	stayopen
+#define NEED_H_ERRNO	1
+#define NEED__RES	1
+
+/* Special name for the lookup function.  */
+#define DB_LOOKUP_FCT __nss_hosts_lookup2
+
+#include "../nss/getXXent_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getipv4sourcefilter.c b/ap/libc/glibc/glibc-2.23/inet/getipv4sourcefilter.c
new file mode 100644
index 0000000..f387fd1
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getipv4sourcefilter.c
@@ -0,0 +1,32 @@
+/* Get source filter.  Stub version.
+   Copyright (C) 2004-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stdint.h>
+#include <netinet/in.h>
+
+
+int
+getipv4sourcefilter (int s, struct in_addr interface, struct in_addr group,
+		     uint32_t *fmode, uint32_t *numsrc, struct in_addr *slist)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (getipv4sourcefilter)
diff --git a/ap/libc/glibc/glibc-2.23/inet/getnameinfo.c b/ap/libc/glibc/glibc-2.23/inet/getnameinfo.c
new file mode 100644
index 0000000..40f67f0
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getnameinfo.c
@@ -0,0 +1,469 @@
+/* The Inner Net License, Version 2.00
+
+  The author(s) grant permission for redistribution and use in source and
+binary forms, with or without modification, of the software and documentation
+provided that the following conditions are met:
+
+0. If you receive a version of the software that is specifically labelled
+   as not being for redistribution (check the version message and/or README),
+   you are not permitted to redistribute that version of the software in any
+   way or form.
+1. All terms of the all other applicable copyrights and licenses must be
+   followed.
+2. Redistributions of source code must retain the authors' copyright
+   notice(s), this list of conditions, and the following disclaimer.
+3. Redistributions in binary form must reproduce the authors' copyright
+   notice(s), this list of conditions, and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+4. [The copyright holder has authorized the removal of this clause.]
+5. Neither the name(s) of the author(s) nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY ITS AUTHORS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+  If these license terms cause you a real problem, contact the author.  */
+
+/* This software is Copyright 1996 by Craig Metz, All Rights Reserved.  */
+
+#include <errno.h>
+#include <netdb.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdint.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/un.h>
+#include <sys/utsname.h>
+#include <libc-lock.h>
+#include <scratch_buffer.h>
+
+#ifdef HAVE_LIBIDN
+# include <libidn/idna.h>
+extern int __idna_to_unicode_lzlz (const char *input, char **output,
+				   int flags);
+#endif
+
+#ifndef min
+# define min(x,y) (((x) > (y)) ? (y) : (x))
+#endif /* min */
+
+libc_freeres_ptr (static char *domain);
+
+
+static char *
+internal_function
+nrl_domainname (void)
+{
+  static int not_first;
+
+  if (! not_first)
+    {
+      __libc_lock_define_initialized (static, lock);
+      __libc_lock_lock (lock);
+
+      if (! not_first)
+	{
+	  char *c;
+	  struct hostent *h, th;
+	  int herror;
+	  struct scratch_buffer tmpbuf;
+
+	  scratch_buffer_init (&tmpbuf);
+	  not_first = 1;
+
+	  while (__gethostbyname_r ("localhost", &th,
+				    tmpbuf.data, tmpbuf.length,
+				    &h, &herror))
+	    {
+	      if (herror == NETDB_INTERNAL && errno == ERANGE)
+		{
+		  if (!scratch_buffer_grow (&tmpbuf))
+		    goto done;
+		}
+	      else
+		break;
+	    }
+
+	  if (h && (c = strchr (h->h_name, '.')))
+	    domain = __strdup (++c);
+	  else
+	    {
+	      /* The name contains no domain information.  Use the name
+		 now to get more information.  */
+	      while (__gethostname (tmpbuf.data, tmpbuf.length))
+		if (!scratch_buffer_grow (&tmpbuf))
+		  goto done;
+
+	      if ((c = strchr (tmpbuf.data, '.')))
+		domain = __strdup (++c);
+	      else
+		{
+		  /* We need to preserve the hostname.  */
+		  const char *hstname = strdupa (tmpbuf.data);
+
+		  while (__gethostbyname_r (hstname, &th,
+					    tmpbuf.data, tmpbuf.length,
+					    &h, &herror))
+		    {
+		      if (herror == NETDB_INTERNAL && errno == ERANGE)
+			{
+			  if (!scratch_buffer_grow (&tmpbuf))
+			    goto done;
+			}
+		      else
+			break;
+		    }
+
+		  if (h && (c = strchr(h->h_name, '.')))
+		    domain = __strdup (++c);
+		  else
+		    {
+		      struct in_addr in_addr;
+
+		      in_addr.s_addr = htonl (INADDR_LOOPBACK);
+
+		      while (__gethostbyaddr_r ((const char *) &in_addr,
+						sizeof (struct in_addr),
+						AF_INET, &th,
+						tmpbuf.data, tmpbuf.length,
+						&h, &herror))
+			{
+			  if (herror == NETDB_INTERNAL && errno == ERANGE)
+			    {
+			      if (!scratch_buffer_grow (&tmpbuf))
+				goto done;
+			    }
+			  else
+			    break;
+			}
+
+		      if (h && (c = strchr (h->h_name, '.')))
+			domain = __strdup (++c);
+		    }
+		}
+	    }
+	done:
+	  scratch_buffer_free (&tmpbuf);
+	}
+
+      __libc_lock_unlock (lock);
+    }
+
+  return domain;
+};
+
+
+int
+getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host,
+	     socklen_t hostlen, char *serv, socklen_t servlen,
+	     int flags)
+{
+  int serrno = errno;
+  int herrno;
+  struct hostent th;
+  int ok = 0;
+  struct scratch_buffer tmpbuf;
+
+  scratch_buffer_init (&tmpbuf);
+
+  if (flags & ~(NI_NUMERICHOST|NI_NUMERICSERV|NI_NOFQDN|NI_NAMEREQD|NI_DGRAM
+#ifdef HAVE_LIBIDN
+		|NI_IDN|NI_IDN_ALLOW_UNASSIGNED|NI_IDN_USE_STD3_ASCII_RULES
+#endif
+		))
+    return EAI_BADFLAGS;
+
+  if (sa == NULL || addrlen < sizeof (sa_family_t))
+    return EAI_FAMILY;
+
+  if ((flags & NI_NAMEREQD) && host == NULL && serv == NULL)
+    return EAI_NONAME;
+
+  switch (sa->sa_family)
+    {
+    case AF_LOCAL:
+      if (addrlen < (socklen_t) offsetof (struct sockaddr_un, sun_path))
+	return EAI_FAMILY;
+      break;
+    case AF_INET:
+      if (addrlen < sizeof (struct sockaddr_in))
+	return EAI_FAMILY;
+      break;
+    case AF_INET6:
+      if (addrlen < sizeof (struct sockaddr_in6))
+	return EAI_FAMILY;
+      break;
+    default:
+      return EAI_FAMILY;
+    }
+
+  if (host != NULL && hostlen > 0)
+    switch (sa->sa_family)
+      {
+      case AF_INET:
+      case AF_INET6:
+	if (!(flags & NI_NUMERICHOST))
+	  {
+	    struct hostent *h = NULL;
+	    if (sa->sa_family == AF_INET6)
+	      {
+		while (__gethostbyaddr_r ((const void *) &(((const struct sockaddr_in6 *) sa)->sin6_addr),
+					  sizeof(struct in6_addr),
+					  AF_INET6, &th,
+					  tmpbuf.data, tmpbuf.length,
+					  &h, &herrno))
+		  if (herrno == NETDB_INTERNAL && errno == ERANGE)
+		    {
+		      if (!scratch_buffer_grow (&tmpbuf))
+			{
+			  __set_h_errno (herrno);
+			  return EAI_MEMORY;
+			}
+		    }
+		  else
+		    break;
+	      }
+	    else
+	      {
+		while (__gethostbyaddr_r ((const void *) &(((const struct sockaddr_in *)sa)->sin_addr),
+					  sizeof(struct in_addr),
+					  AF_INET, &th,
+					  tmpbuf.data, tmpbuf.length,
+					  &h, &herrno))
+		  if (herrno == NETDB_INTERNAL && errno == ERANGE)
+		    {
+		      if (!scratch_buffer_grow (&tmpbuf))
+			{
+			  __set_h_errno (herrno);
+			  return EAI_MEMORY;
+			}
+		    }
+		  else
+		    break;
+	      }
+
+	    if (h == NULL)
+	      {
+		if (herrno == NETDB_INTERNAL)
+		  {
+		    __set_h_errno (herrno);
+		    return EAI_SYSTEM;
+		  }
+		if (herrno == TRY_AGAIN)
+		  {
+		    __set_h_errno (herrno);
+		    return EAI_AGAIN;
+		  }
+	      }
+
+	    if (h)
+	      {
+		char *c;
+		if ((flags & NI_NOFQDN)
+		    && (c = nrl_domainname ())
+		    && (c = strstr (h->h_name, c))
+		    && (c != h->h_name) && (*(--c) == '.'))
+		  /* Terminate the string after the prefix.  */
+		  *c = '\0';
+
+#ifdef HAVE_LIBIDN
+		/* If requested, convert from the IDN format.  */
+		if (flags & NI_IDN)
+		  {
+		    int idn_flags = 0;
+		    if  (flags & NI_IDN_ALLOW_UNASSIGNED)
+		      idn_flags |= IDNA_ALLOW_UNASSIGNED;
+		    if (flags & NI_IDN_USE_STD3_ASCII_RULES)
+		      idn_flags |= IDNA_USE_STD3_ASCII_RULES;
+
+		    char *out;
+		    int rc = __idna_to_unicode_lzlz (h->h_name, &out,
+						     idn_flags);
+		    if (rc != IDNA_SUCCESS)
+		      {
+			if (rc == IDNA_MALLOC_ERROR)
+			  return EAI_MEMORY;
+			if (rc == IDNA_DLOPEN_ERROR)
+			  return EAI_SYSTEM;
+			return EAI_IDN_ENCODE;
+		      }
+
+		    if (out != h->h_name)
+		      {
+			h->h_name = strdupa (out);
+			free (out);
+		      }
+		  }
+#endif
+
+		size_t len = strlen (h->h_name) + 1;
+		if (len > hostlen)
+		  return EAI_OVERFLOW;
+
+		memcpy (host, h->h_name, len);
+
+		ok = 1;
+	      }
+	  }
+
+	if (!ok)
+	  {
+	    if (flags & NI_NAMEREQD)
+	      {
+		__set_errno (serrno);
+		return EAI_NONAME;
+	      }
+	    else
+	      {
+		const char *c;
+		if (sa->sa_family == AF_INET6)
+		  {
+		    const struct sockaddr_in6 *sin6p;
+		    uint32_t scopeid;
+
+		    sin6p = (const struct sockaddr_in6 *) sa;
+
+		    c = inet_ntop (AF_INET6,
+				   (const void *) &sin6p->sin6_addr, host, hostlen);
+		    scopeid = sin6p->sin6_scope_id;
+		    if (scopeid != 0)
+		      {
+			/* Buffer is >= IFNAMSIZ+1.  */
+			char scopebuf[IFNAMSIZ + 1];
+			char *scopeptr;
+			int ni_numericscope = 0;
+			size_t real_hostlen = __strnlen (host, hostlen);
+			size_t scopelen = 0;
+
+			scopebuf[0] = SCOPE_DELIMITER;
+			scopebuf[1] = '\0';
+			scopeptr = &scopebuf[1];
+
+			if (IN6_IS_ADDR_LINKLOCAL (&sin6p->sin6_addr)
+			    || IN6_IS_ADDR_MC_LINKLOCAL (&sin6p->sin6_addr))
+			  {
+			    if (if_indextoname (scopeid, scopeptr) == NULL)
+			      ++ni_numericscope;
+			    else
+			      scopelen = strlen (scopebuf);
+			  }
+			else
+			  ++ni_numericscope;
+
+			if (ni_numericscope)
+			  scopelen = 1 + __snprintf (scopeptr,
+						     (scopebuf
+						      + sizeof scopebuf
+						      - scopeptr),
+						     "%u", scopeid);
+
+			if (real_hostlen + scopelen + 1 > hostlen)
+			  /* Signal the buffer is too small.  This is
+			     what inet_ntop does.  */
+			  c = NULL;
+			else
+			  memcpy (host + real_hostlen, scopebuf, scopelen + 1);
+		      }
+		  }
+		else
+		  c = inet_ntop (AF_INET,
+				 (const void *) &(((const struct sockaddr_in *) sa)->sin_addr),
+				 host, hostlen);
+		if (c == NULL)
+		  return EAI_OVERFLOW;
+	      }
+	    ok = 1;
+	  }
+	break;
+
+      case AF_LOCAL:
+	if (!(flags & NI_NUMERICHOST))
+	  {
+	    struct utsname utsname;
+
+	    if (!uname (&utsname))
+	      {
+		strncpy (host, utsname.nodename, hostlen);
+		break;
+	      };
+	  };
+
+	if (flags & NI_NAMEREQD)
+	   {
+	    __set_errno (serrno);
+	    return EAI_NONAME;
+	  }
+
+	strncpy (host, "localhost", hostlen);
+	break;
+
+      default:
+	return EAI_FAMILY;
+    }
+
+  if (serv && (servlen > 0))
+    switch (sa->sa_family)
+      {
+      case AF_INET:
+      case AF_INET6:
+	if (!(flags & NI_NUMERICSERV))
+	  {
+	    struct servent *s, ts;
+	    int e;
+	    while ((e = __getservbyport_r (((const struct sockaddr_in *) sa)->sin_port,
+					   ((flags & NI_DGRAM)
+					    ? "udp" : "tcp"), &ts,
+					   tmpbuf.data, tmpbuf.length, &s)))
+	      {
+		if (e == ERANGE)
+		  {
+		    if (!scratch_buffer_grow (&tmpbuf))
+		      return EAI_MEMORY;
+		  }
+		else
+		  break;
+	      }
+	    if (s)
+	      {
+		strncpy (serv, s->s_name, servlen);
+		break;
+	      }
+	  }
+
+	if (__snprintf (serv, servlen, "%d",
+			ntohs (((const struct sockaddr_in *) sa)->sin_port))
+	    + 1 > servlen)
+	  return EAI_OVERFLOW;
+
+	break;
+
+      case AF_LOCAL:
+	strncpy (serv, ((const struct sockaddr_un *) sa)->sun_path, servlen);
+	break;
+    }
+
+  if (host && (hostlen > 0))
+    host[hostlen-1] = 0;
+  if (serv && (servlen > 0))
+    serv[servlen-1] = 0;
+  errno = serrno;
+  return 0;
+}
+libc_hidden_def (getnameinfo)
diff --git a/ap/libc/glibc/glibc-2.23/inet/getnetbyad.c b/ap/libc/glibc/glibc-2.23/inet/getnetbyad.c
new file mode 100644
index 0000000..827ff9a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getnetbyad.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+#include <stdint.h>
+
+
+#define LOOKUP_TYPE	struct netent
+#define FUNCTION_NAME	getnetbyaddr
+#define DATABASE_NAME	networks
+#define ADD_PARAMS	uint32_t net, int type
+#define ADD_VARIABLES	net, type
+#define BUFLEN		1024
+#define NEED_H_ERRNO	1
+
+/* There is no nscd support for the networks file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXbyYY.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getnetbyad_r.c b/ap/libc/glibc/glibc-2.23/inet/getnetbyad_r.c
new file mode 100644
index 0000000..155a3c3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getnetbyad_r.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+#include <stdint.h>
+
+
+#define LOOKUP_TYPE		struct netent
+#define FUNCTION_NAME		getnetbyaddr
+#define DATABASE_NAME		networks
+#define ADD_PARAMS		uint32_t net, int type
+#define ADD_VARIABLES		net, type
+#define NEED__RES		1
+#define NEED_H_ERRNO		1
+
+/* There is no nscd support for the networks file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXbyYY_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getnetbynm.c b/ap/libc/glibc/glibc-2.23/inet/getnetbynm.c
new file mode 100644
index 0000000..5cf806b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getnetbynm.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE	struct netent
+#define FUNCTION_NAME	getnetbyname
+#define DATABASE_NAME	networks
+#define ADD_PARAMS	const char *name
+#define ADD_VARIABLES	name
+#define BUFLEN		1024
+#define NEED_H_ERRNO	1
+
+/* There is no nscd support for the networks file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXbyYY.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getnetbynm_r.c b/ap/libc/glibc/glibc-2.23/inet/getnetbynm_r.c
new file mode 100644
index 0000000..a74599f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getnetbynm_r.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE		struct netent
+#define FUNCTION_NAME		getnetbyname
+#define DATABASE_NAME		networks
+#define ADD_PARAMS		const char *name
+#define ADD_VARIABLES		name
+#define NEED__RES		1
+#define NEED_H_ERRNO		1
+
+/* There is no nscd support for the networks file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXbyYY_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getnetent.c b/ap/libc/glibc/glibc-2.23/inet/getnetent.c
new file mode 100644
index 0000000..273e35f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getnetent.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE	struct netent
+#define	GETFUNC_NAME	getnetent
+#define BUFLEN		1024
+#define NEED_H_ERRNO	1
+
+/* There is no nscd support for the networks file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXent.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getnetent_r.c b/ap/libc/glibc/glibc-2.23/inet/getnetent_r.c
new file mode 100644
index 0000000..0f009c9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getnetent_r.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE		struct netent
+#define SETFUNC_NAME		setnetent
+#define	GETFUNC_NAME		getnetent
+#define	ENDFUNC_NAME		endnetent
+#define DATABASE_NAME		networks
+#define STAYOPEN		int stayopen
+#define STAYOPEN_VAR		stayopen
+#define NEED__RES		1
+#define NEED_H_ERRNO		1
+
+/* There is no nscd support for the networks file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXent_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getnetgrent.c b/ap/libc/glibc/glibc-2.23/inet/getnetgrent.c
new file mode 100644
index 0000000..3443235
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getnetgrent.c
@@ -0,0 +1,49 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <netdb.h>
+#include <stdlib.h>
+#include <libc-lock.h>
+
+/* Static buffer for return value.  We allocate it when needed.  */
+libc_freeres_ptr (static char *buffer);
+/* All three strings should fit in a block of 1kB size.  */
+#define BUFSIZE 1024
+
+
+
+static void
+allocate (void)
+{
+  buffer = (char *) malloc (BUFSIZE);
+}
+
+int
+getnetgrent (char **hostp, char **userp, char **domainp)
+{
+  __libc_once_define (static, once);
+  __libc_once (once, allocate);
+
+  if (buffer == NULL)
+    {
+      __set_errno (ENOMEM);
+      return -1;
+    }
+
+  return __getnetgrent_r (hostp, userp, domainp, buffer, BUFSIZE);
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/getnetgrent_r.c b/ap/libc/glibc/glibc-2.23/inet/getnetgrent_r.c
new file mode 100644
index 0000000..1af97c0
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getnetgrent_r.c
@@ -0,0 +1,535 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <assert.h>
+#include <atomic.h>
+#include <libc-lock.h>
+#include <errno.h>
+#include <netdb.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include "netgroup.h"
+#include "nsswitch.h"
+#include <sysdep.h>
+#include <nscd/nscd_proto.h>
+
+
+/* Protect above variable against multiple uses at the same time.  */
+__libc_lock_define_initialized (static, lock)
+
+/* The whole information for the set/get/endnetgrent functions are
+   kept in this structure.  */
+static struct __netgrent dataset;
+
+/* The lookup function for the first entry of this service.  */
+extern int __nss_netgroup_lookup (service_user **nipp, const char *name,
+				  void **fctp) internal_function;
+
+/* Set up NIP to run through the services.  Return nonzero if there are no
+   services (left).  */
+static int
+setup (void **fctp, service_user **nipp)
+{
+  /* Remember the first service_entry, it's always the same.  */
+  static bool startp_initialized;
+  static service_user *startp;
+  int no_more;
+
+  if (!startp_initialized)
+    {
+      /* Executing this more than once at the same time must yield the
+	 same result every time.  So we need no locking.  */
+      no_more = __nss_netgroup_lookup (nipp, "setnetgrent", fctp);
+      startp = no_more ? (service_user *) -1 : *nipp;
+#ifdef PTR_MANGLE
+      PTR_MANGLE (startp);
+#endif
+      atomic_write_barrier ();
+      startp_initialized = true;
+    }
+  else
+    {
+      service_user *nip = startp;
+#ifdef PTR_DEMANGLE
+      PTR_DEMANGLE (nip);
+#endif
+      if (nip == (service_user *) -1)
+	/* No services at all.  */
+	return 1;
+
+      /* Reset to the beginning of the service list.  */
+      *nipp = nip;
+      /* Look up the first function.  */
+      no_more = __nss_lookup (nipp, "setnetgrent", NULL, fctp);
+    }
+  return no_more;
+}
+
+/* Free used memory.  */
+static void
+free_memory (struct __netgrent *data)
+{
+  while (data->known_groups != NULL)
+    {
+      struct name_list *tmp = data->known_groups;
+      data->known_groups = data->known_groups->next;
+      free (tmp);
+    }
+
+  while (data->needed_groups != NULL)
+    {
+      struct name_list *tmp = data->needed_groups;
+      data->needed_groups = data->needed_groups->next;
+      free (tmp);
+    }
+}
+
+static void
+endnetgrent_hook (struct __netgrent *datap)
+{
+  enum nss_status (*endfct) (struct __netgrent *);
+
+  if (datap->nip == NULL || datap->nip == (service_user *) -1l)
+    return;
+
+  endfct = __nss_lookup_function (datap->nip, "endnetgrent");
+  if (endfct != NULL)
+    (void) (*endfct) (datap);
+  datap->nip = NULL;
+}
+
+static int
+internal_function
+__internal_setnetgrent_reuse (const char *group, struct __netgrent *datap,
+			      int *errnop)
+{
+  union
+  {
+    enum nss_status (*f) (const char *, struct __netgrent *);
+    void *ptr;
+  } fct;
+  enum nss_status status = NSS_STATUS_UNAVAIL;
+  struct name_list *new_elem;
+
+  /* Free data from previous service.  */
+  endnetgrent_hook (datap);
+
+  /* Cycle through all the services and run their setnetgrent functions.  */
+  int no_more = setup (&fct.ptr, &datap->nip);
+  while (! no_more)
+    {
+      assert (datap->data == NULL);
+
+      /* Ignore status, we force check in `__nss_next2'.  */
+      status = DL_CALL_FCT (*fct.f, (group, datap));
+
+      service_user *old_nip = datap->nip;
+      no_more = __nss_next2 (&datap->nip, "setnetgrent", NULL, &fct.ptr,
+			     status, 0);
+
+      if (status == NSS_STATUS_SUCCESS && ! no_more)
+	{
+	  enum nss_status (*endfct) (struct __netgrent *);
+
+	  endfct = __nss_lookup_function (old_nip, "endnetgrent");
+	  if (endfct != NULL)
+	    (void) DL_CALL_FCT (*endfct, (datap));
+	}
+    }
+
+  /* Add the current group to the list of known groups.  */
+  size_t group_len = strlen (group) + 1;
+  new_elem = (struct name_list *) malloc (sizeof (struct name_list)
+					  + group_len);
+  if (new_elem == NULL)
+    {
+      *errnop = errno;
+      status = NSS_STATUS_TRYAGAIN;
+    }
+  else
+    {
+      new_elem->next = datap->known_groups;
+      memcpy (new_elem->name, group, group_len);
+      datap->known_groups = new_elem;
+    }
+
+  return status == NSS_STATUS_SUCCESS;
+}
+
+int
+internal_function
+__internal_setnetgrent (const char *group, struct __netgrent *datap)
+{
+  /* Free list of all netgroup names from last run.  */
+  free_memory (datap);
+
+  return __internal_setnetgrent_reuse (group, datap, &errno);
+}
+libc_hidden_def (__internal_setnetgrent)
+
+static int
+nscd_setnetgrent (const char *group)
+{
+#ifdef USE_NSCD
+  if (__nss_not_use_nscd_netgroup > 0
+      && ++__nss_not_use_nscd_netgroup > NSS_NSCD_RETRY)
+    __nss_not_use_nscd_netgroup = 0;
+
+  if (!__nss_not_use_nscd_netgroup
+      && !__nss_database_custom[NSS_DBSIDX_netgroup])
+    return __nscd_setnetgrent (group, &dataset);
+#endif
+  return -1;
+}
+
+int
+setnetgrent (const char *group)
+{
+  int result;
+
+  __libc_lock_lock (lock);
+
+  result = nscd_setnetgrent (group);
+  if (result < 0)
+    result = __internal_setnetgrent (group, &dataset);
+
+  __libc_lock_unlock (lock);
+
+  return result;
+}
+
+void
+internal_function
+__internal_endnetgrent (struct __netgrent *datap)
+{
+  endnetgrent_hook (datap);
+  /* Now free list of all netgroup names from last run.  */
+  free_memory (datap);
+}
+libc_hidden_def (__internal_endnetgrent)
+
+
+void
+endnetgrent (void)
+{
+  __libc_lock_lock (lock);
+
+  __internal_endnetgrent (&dataset);
+
+  __libc_lock_unlock (lock);
+}
+
+#ifdef USE_NSCD
+static const char *
+get_nonempty_val (const char *in)
+{
+  if (*in == '\0')
+    return NULL;
+  return in;
+}
+
+static enum nss_status
+nscd_getnetgrent (struct __netgrent *datap, char *buffer, size_t buflen,
+		  int *errnop)
+{
+  if (datap->cursor >= datap->data + datap->data_size)
+    return NSS_STATUS_UNAVAIL;
+
+  datap->type = triple_val;
+  datap->val.triple.host = get_nonempty_val (datap->cursor);
+  datap->cursor = (char *) __rawmemchr (datap->cursor, '\0') + 1;
+  datap->val.triple.user = get_nonempty_val (datap->cursor);
+  datap->cursor = (char *) __rawmemchr (datap->cursor, '\0') + 1;
+  datap->val.triple.domain = get_nonempty_val (datap->cursor);
+  datap->cursor = (char *) __rawmemchr (datap->cursor, '\0') + 1;
+
+  return NSS_STATUS_SUCCESS;
+}
+#endif
+
+int
+internal_function
+__internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
+			  struct __netgrent *datap,
+			  char *buffer, size_t buflen, int *errnop)
+{
+  enum nss_status (*fct) (struct __netgrent *, char *, size_t, int *);
+
+  /* Initialize status to return if no more functions are found.  */
+  enum nss_status status = NSS_STATUS_NOTFOUND;
+
+  /* Run through available functions, starting with the same function last
+     run.  We will repeat each function as long as it succeeds, and then go
+     on to the next service action.  */
+  int no_more = datap->nip == NULL;
+  if (! no_more)
+    {
+#ifdef USE_NSCD
+      /* This bogus function pointer is a special marker left by
+	 __nscd_setnetgrent to tell us to use the data it left
+	 before considering any modules.  */
+      if (datap->nip == (service_user *) -1l)
+	fct = nscd_getnetgrent;
+      else
+#endif
+	{
+	  fct = __nss_lookup_function (datap->nip, "getnetgrent_r");
+	  no_more = fct == NULL;
+	}
+
+      while (! no_more)
+	{
+	  status = DL_CALL_FCT (*fct, (datap, buffer, buflen, &errno));
+
+	  if (status == NSS_STATUS_RETURN
+	      /* The service returned a NOTFOUND, but there are more groups that
+		 we need to resolve before we give up.  */
+	      || (status == NSS_STATUS_NOTFOUND && datap->needed_groups != NULL))
+	    {
+	      /* This was the last one for this group.  Look at next group
+		 if available.  */
+	      int found = 0;
+	      while (datap->needed_groups != NULL && ! found)
+		{
+		  struct name_list *tmp = datap->needed_groups;
+		  datap->needed_groups = datap->needed_groups->next;
+		  tmp->next = datap->known_groups;
+		  datap->known_groups = tmp;
+
+		  found = __internal_setnetgrent_reuse (datap->known_groups->name,
+							datap, errnop);
+		}
+
+	      if (found && datap->nip != NULL)
+		{
+		  fct = __nss_lookup_function (datap->nip, "getnetgrent_r");
+		  if (fct != NULL)
+		    continue;
+		}
+	    }
+	  else if (status == NSS_STATUS_SUCCESS && datap->type == group_val)
+	    {
+	      /* The last entry was a name of another netgroup.  */
+	      struct name_list *namep;
+
+	      /* Ignore if we've seen the name before.  */
+	      for (namep = datap->known_groups; namep != NULL;
+		   namep = namep->next)
+		if (strcmp (datap->val.group, namep->name) == 0)
+		  break;
+	      if (namep == NULL)
+		for (namep = datap->needed_groups; namep != NULL;
+		     namep = namep->next)
+		  if (strcmp (datap->val.group, namep->name) == 0)
+		    break;
+	      if (namep != NULL)
+		/* Really ignore.  */
+		continue;
+
+	      size_t group_len = strlen (datap->val.group) + 1;
+	      namep = (struct name_list *) malloc (sizeof (struct name_list)
+						  + group_len);
+	      if (namep == NULL)
+		/* We are out of memory.  */
+		status = NSS_STATUS_RETURN;
+	      else
+		{
+		  namep->next = datap->needed_groups;
+		  memcpy (namep->name, datap->val.group, group_len);
+		  datap->needed_groups = namep;
+		  /* And get the next entry.  */
+		  continue;
+		}
+	    }
+	  break;
+	}
+    }
+
+  if (status == NSS_STATUS_SUCCESS)
+    {
+      *hostp = (char *) datap->val.triple.host;
+      *userp = (char *) datap->val.triple.user;
+      *domainp = (char *) datap->val.triple.domain;
+    }
+
+  return status == NSS_STATUS_SUCCESS ? 1 : 0;
+}
+libc_hidden_def (__internal_getnetgrent_r)
+
+/* The real entry point.  */
+int
+__getnetgrent_r (char **hostp, char **userp, char **domainp,
+		 char *buffer, size_t buflen)
+{
+  enum nss_status status;
+
+  __libc_lock_lock (lock);
+
+  status = __internal_getnetgrent_r (hostp, userp, domainp, &dataset,
+				     buffer, buflen, &errno);
+
+  __libc_lock_unlock (lock);
+
+  return status;
+}
+weak_alias (__getnetgrent_r, getnetgrent_r)
+
+/* Test whether given (host,user,domain) triple is in NETGROUP.  */
+int
+innetgr (const char *netgroup, const char *host, const char *user,
+	 const char *domain)
+{
+#ifdef USE_NSCD
+  if (__nss_not_use_nscd_netgroup > 0
+      && ++__nss_not_use_nscd_netgroup > NSS_NSCD_RETRY)
+    __nss_not_use_nscd_netgroup = 0;
+
+  if (!__nss_not_use_nscd_netgroup
+      && !__nss_database_custom[NSS_DBSIDX_netgroup])
+    {
+      int result = __nscd_innetgr (netgroup, host, user, domain);
+      if (result >= 0)
+	return result;
+    }
+#endif
+
+  union
+  {
+    enum nss_status (*f) (const char *, struct __netgrent *);
+    void *ptr;
+  } setfct;
+  void (*endfct) (struct __netgrent *);
+  int (*getfct) (struct __netgrent *, char *, size_t, int *);
+  struct __netgrent entry;
+  int result = 0;
+  const char *current_group = netgroup;
+
+  memset (&entry, '\0', sizeof (entry));
+
+  /* Walk through the services until we found an answer or we shall
+     not work further.  We can do some optimization here.  Since all
+     services must provide the `setnetgrent' function we can do all
+     the work during one walk through the service list.  */
+  while (1)
+    {
+      int no_more = setup (&setfct.ptr, &entry.nip);
+      while (! no_more)
+	{
+	  assert (entry.data == NULL);
+
+	  /* Open netgroup.  */
+	  enum nss_status status = DL_CALL_FCT (*setfct.f,
+						(current_group, &entry));
+
+	  if (status == NSS_STATUS_SUCCESS
+	      && (getfct = __nss_lookup_function (entry.nip, "getnetgrent_r"))
+		 != NULL)
+	    {
+	      char buffer[1024];
+
+	      while (DL_CALL_FCT (*getfct,
+				  (&entry, buffer, sizeof buffer, &errno))
+		     == NSS_STATUS_SUCCESS)
+		{
+		  if (entry.type == group_val)
+		    {
+		      /* Make sure we haven't seen the name before.  */
+		      struct name_list *namep;
+
+		      for (namep = entry.known_groups; namep != NULL;
+			   namep = namep->next)
+			if (strcmp (entry.val.group, namep->name) == 0)
+			  break;
+		      if (namep == NULL)
+			for (namep = entry.needed_groups; namep != NULL;
+			     namep = namep->next)
+			  if (strcmp (entry.val.group, namep->name) == 0)
+			    break;
+		      if (namep == NULL
+			  && strcmp (netgroup, entry.val.group) != 0)
+			{
+			  size_t group_len = strlen (entry.val.group) + 1;
+			  namep =
+			    (struct name_list *) malloc (sizeof (*namep)
+							 + group_len);
+			  if (namep == NULL)
+			    {
+			      /* Out of memory, simply return.  */
+			      result = -1;
+			      break;
+			    }
+
+			  namep->next = entry.needed_groups;
+			  memcpy (namep->name, entry.val.group, group_len);
+			  entry.needed_groups = namep;
+			}
+		    }
+		  else
+		    {
+		      if ((entry.val.triple.host == NULL || host == NULL
+			   || __strcasecmp (entry.val.triple.host, host) == 0)
+			  && (entry.val.triple.user == NULL || user == NULL
+			      || strcmp (entry.val.triple.user, user) == 0)
+			  && (entry.val.triple.domain == NULL || domain == NULL
+			      || __strcasecmp (entry.val.triple.domain,
+					       domain) == 0))
+			{
+			  result = 1;
+			  break;
+			}
+		    }
+		}
+
+	      /* If we found one service which does know the given
+		 netgroup we don't try further.  */
+	      status = NSS_STATUS_RETURN;
+	    }
+
+	  /* Free all resources of the service.  */
+	  endfct = __nss_lookup_function (entry.nip, "endnetgrent");
+	  if (endfct != NULL)
+	    DL_CALL_FCT (*endfct, (&entry));
+
+	  if (result != 0)
+	    break;
+
+	  /* Look for the next service.  */
+	  no_more = __nss_next2 (&entry.nip, "setnetgrent", NULL,
+				 &setfct.ptr, status, 0);
+	}
+
+      if (result == 0 && entry.needed_groups != NULL)
+	{
+	  struct name_list *tmp = entry.needed_groups;
+	  entry.needed_groups = tmp->next;
+	  tmp->next = entry.known_groups;
+	  entry.known_groups = tmp;
+	  current_group = tmp->name;
+	  continue;
+	}
+
+      /* No way out.  */
+      break;
+    }
+
+  /* Free the memory.  */
+  free_memory (&entry);
+
+  return result == 1;
+}
+libc_hidden_def (innetgr)
diff --git a/ap/libc/glibc/glibc-2.23/inet/getproto.c b/ap/libc/glibc/glibc-2.23/inet/getproto.c
new file mode 100644
index 0000000..bf9d7e0
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getproto.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE	struct protoent
+#define FUNCTION_NAME	getprotobynumber
+#define DATABASE_NAME	protocols
+#define ADD_PARAMS	int proto
+#define ADD_VARIABLES	proto
+#define BUFLEN		1024
+
+/* There is no nscd support for the protocols file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXbyYY.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getproto_r.c b/ap/libc/glibc/glibc-2.23/inet/getproto_r.c
new file mode 100644
index 0000000..df5ccda
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getproto_r.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE		struct protoent
+#define FUNCTION_NAME		getprotobynumber
+#define DATABASE_NAME		protocols
+#define ADD_PARAMS		int proto
+#define ADD_VARIABLES		proto
+
+/* There is no nscd support for the protocols file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXbyYY_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getprtent.c b/ap/libc/glibc/glibc-2.23/inet/getprtent.c
new file mode 100644
index 0000000..714bbf3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getprtent.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE	struct protoent
+#define	GETFUNC_NAME	getprotoent
+#define BUFLEN		1024
+
+/* There is no nscd support for the protocols file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXent.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getprtent_r.c b/ap/libc/glibc/glibc-2.23/inet/getprtent_r.c
new file mode 100644
index 0000000..2fb4158
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getprtent_r.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE		struct protoent
+#define SETFUNC_NAME		setprotoent
+#define	GETFUNC_NAME		getprotoent
+#define	ENDFUNC_NAME		endprotoent
+#define DATABASE_NAME		protocols
+#define STAYOPEN		int stayopen
+#define STAYOPEN_VAR		stayopen
+
+/* There is no nscd support for the protocols file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXent_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getprtname.c b/ap/libc/glibc/glibc-2.23/inet/getprtname.c
new file mode 100644
index 0000000..b3b0067
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getprtname.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE	struct protoent
+#define FUNCTION_NAME	getprotobyname
+#define DATABASE_NAME	protocols
+#define ADD_PARAMS	const char *name
+#define ADD_VARIABLES	name
+#define BUFLEN		1024
+
+/* There is no nscd support for the protocols file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXbyYY.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getprtname_r.c b/ap/libc/glibc/glibc-2.23/inet/getprtname_r.c
new file mode 100644
index 0000000..fbc7476
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getprtname_r.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE		struct protoent
+#define FUNCTION_NAME		getprotobyname
+#define DATABASE_NAME		protocols
+#define ADD_PARAMS		const char *name
+#define ADD_VARIABLES		name
+
+/* There is no nscd support for the protocols file.  */
+#undef	USE_NSCD
+
+#include "../nss/getXXbyYY_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getservent.c b/ap/libc/glibc/glibc-2.23/inet/getservent.c
new file mode 100644
index 0000000..b478e9f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getservent.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE	struct servent
+#define	GETFUNC_NAME	getservent
+#define BUFLEN		1024
+
+#include "../nss/getXXent.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getservent_r.c b/ap/libc/glibc/glibc-2.23/inet/getservent_r.c
new file mode 100644
index 0000000..52dcc79
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getservent_r.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE		struct servent
+#define SETFUNC_NAME		setservent
+#define	GETFUNC_NAME		getservent
+#define	ENDFUNC_NAME		endservent
+#define DATABASE_NAME		services
+#define STAYOPEN		int stayopen
+#define STAYOPEN_VAR		stayopen
+
+#include "../nss/getXXent_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getsourcefilter.c b/ap/libc/glibc/glibc-2.23/inet/getsourcefilter.c
new file mode 100644
index 0000000..3e69a04
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getsourcefilter.c
@@ -0,0 +1,32 @@
+/* Get source filter.  Stub version.
+   Copyright (C) 2004-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <netinet/in.h>
+#include <stdint.h>
+
+int
+getsourcefilter (int s, uint32_t interface, const struct sockaddr *group,
+		 socklen_t grouplen, uint32_t *fmode, uint32_t *numsrc,
+		 struct sockaddr_storage *slist)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (getsourcefilter)
diff --git a/ap/libc/glibc/glibc-2.23/inet/getsrvbynm.c b/ap/libc/glibc/glibc-2.23/inet/getsrvbynm.c
new file mode 100644
index 0000000..1a33aab
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getsrvbynm.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE	struct servent
+#define FUNCTION_NAME	getservbyname
+#define DATABASE_NAME	services
+#define ADD_PARAMS	const char *name, const char *proto
+#define ADD_VARIABLES	name, proto
+#define BUFLEN		1024
+
+#include "../nss/getXXbyYY.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getsrvbynm_r.c b/ap/libc/glibc/glibc-2.23/inet/getsrvbynm_r.c
new file mode 100644
index 0000000..e8e5c53
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getsrvbynm_r.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE		struct servent
+#define FUNCTION_NAME		getservbyname
+#define DATABASE_NAME		services
+#define ADD_PARAMS		const char *name, const char *proto
+#define ADD_VARIABLES		name, proto
+
+#include "../nss/getXXbyYY_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getsrvbypt.c b/ap/libc/glibc/glibc-2.23/inet/getsrvbypt.c
new file mode 100644
index 0000000..cd1d3ee
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getsrvbypt.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE	struct servent
+#define FUNCTION_NAME	getservbyport
+#define DATABASE_NAME	services
+#define ADD_PARAMS	int port, const char *proto
+#define ADD_VARIABLES	port, proto
+#define BUFLEN		1024
+
+#include "../nss/getXXbyYY.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/getsrvbypt_r.c b/ap/libc/glibc/glibc-2.23/inet/getsrvbypt_r.c
new file mode 100644
index 0000000..d4a47ab
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/getsrvbypt_r.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+
+
+#define LOOKUP_TYPE		struct servent
+#define FUNCTION_NAME		getservbyport
+#define DATABASE_NAME		services
+#define ADD_PARAMS		int port, const char *proto
+#define ADD_VARIABLES		port, proto
+
+#include "../nss/getXXbyYY_r.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/herrno-loc.c b/ap/libc/glibc/glibc-2.23/inet/herrno-loc.c
new file mode 100644
index 0000000..cd8e009
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/herrno-loc.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netdb.h>
+#include <tls.h>
+
+
+/* When threaded, h_errno may be a per-thread variable.  */
+int *
+weak_const_function
+__h_errno_location (void)
+{
+  return &h_errno;
+}
+libc_hidden_def (__h_errno_location)
diff --git a/ap/libc/glibc/glibc-2.23/inet/herrno.c b/ap/libc/glibc/glibc-2.23/inet/herrno.c
new file mode 100644
index 0000000..17582dd
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/herrno.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <features.h>
+#include <netdb.h>
+#undef h_errno
+
+#include <tls.h>
+
+/* We need to have the error status variable of the resolver
+   accessible in the libc.  */
+
+__thread int __h_errno;
+extern __thread int __libc_h_errno __attribute__ ((alias ("__h_errno")))
+  attribute_hidden;
+#define h_errno __libc_h_errno
diff --git a/ap/libc/glibc/glibc-2.23/inet/htonl.c b/ap/libc/glibc/glibc-2.23/inet/htonl.c
new file mode 100644
index 0000000..c7c0e0d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/htonl.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stdint.h>
+#include <netinet/in.h>
+
+#undef	htonl
+#undef	ntohl
+
+uint32_t
+htonl (uint32_t x)
+{
+#if BYTE_ORDER == BIG_ENDIAN
+  return x;
+#elif BYTE_ORDER == LITTLE_ENDIAN
+  return __bswap_32 (x);
+#else
+# error "What kind of system is this?"
+#endif
+}
+weak_alias (htonl, ntohl)
diff --git a/ap/libc/glibc/glibc-2.23/inet/htons.c b/ap/libc/glibc/glibc-2.23/inet/htons.c
new file mode 100644
index 0000000..c8381ae
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/htons.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netinet/in.h>
+
+#undef	htons
+#undef	ntohs
+
+uint16_t
+htons (uint16_t x)
+{
+#if BYTE_ORDER == BIG_ENDIAN
+  return x;
+#elif BYTE_ORDER == LITTLE_ENDIAN
+  return __bswap_16 (x);
+#else
+# error "What kind of system is this?"
+#endif
+}
+weak_alias (htons, ntohs)
diff --git a/ap/libc/glibc/glibc-2.23/inet/htontest.c b/ap/libc/glibc/glibc-2.23/inet/htontest.c
new file mode 100644
index 0000000..93b33b9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/htontest.c
@@ -0,0 +1,70 @@
+/* Test hton/ntoh functions.
+   Copyright (C) 1997-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <endian.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+
+#if BYTE_ORDER == BIG_ENDIAN
+# define TEST(orig, swapped, fct) \
+  if ((fct (orig)) != (orig)) {						      \
+    printf ("Failed for %s -> %#x\n", #fct "(" #orig ")", fct (orig));	      \
+    result = 1;								      \
+  }
+#elif BYTE_ORDER == LITTLE_ENDIAN
+# define TEST(orig, swapped, fct) \
+  if ((fct (orig)) != (swapped)) {					      \
+    printf ("Failed for %s -> %#x\n", #fct "(" #orig ")", fct (orig));	      \
+    result = 1;								      \
+  }
+#else
+# error "Bah, what kind of system do you use?"
+#endif
+
+u_int32_t lo = 0x67452301;
+u_int16_t foo = 0x1234;
+
+int
+main (void)
+{
+  int result = 0;
+
+  TEST (0x67452301, 0x01234567, htonl);
+  TEST (0x67452301, 0x01234567, (htonl));
+  TEST (0x67452301, 0x01234567, ntohl);
+  TEST (0x67452301, 0x01234567, (ntohl));
+
+  TEST (lo, 0x01234567, htonl);
+  TEST (lo, 0x01234567, (htonl));
+  TEST (lo, 0x01234567, ntohl);
+  TEST (lo, 0x01234567, (ntohl));
+
+  TEST (0x1234, 0x3412, htons);
+  TEST (0x1234, 0x3412, (htons));
+  TEST (0x1234, 0x3412, ntohs);
+  TEST (0x1234, 0x3412, (ntohs));
+
+  TEST (foo, 0x3412, htons);
+  TEST (foo, 0x3412, (htons));
+  TEST (foo, 0x3412, ntohs);
+  TEST (foo, 0x3412, (ntohs));
+
+  return result;
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/if_index.c b/ap/libc/glibc/glibc-2.23/inet/if_index.c
new file mode 100644
index 0000000..b55e427
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/if_index.c
@@ -0,0 +1,71 @@
+/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <net/if.h>
+#include <errno.h>
+#include <stddef.h>
+
+unsigned int
+__if_nametoindex (const char *ifname)
+{
+  __set_errno (ENOSYS);
+  return 0;
+}
+libc_hidden_def (__if_nametoindex)
+weak_alias (__if_nametoindex, if_nametoindex)
+libc_hidden_weak (if_nametoindex)
+stub_warning (if_nametoindex)
+
+char *
+__if_indextoname (unsigned int ifindex, char *ifname)
+{
+  __set_errno (ENOSYS);
+  return NULL;
+}
+weak_alias (__if_indextoname, if_indextoname)
+libc_hidden_weak (if_indextoname)
+stub_warning (if_indextoname)
+
+void
+__if_freenameindex (struct if_nameindex *ifn)
+{
+}
+libc_hidden_def (__if_freenameindex)
+weak_alias (__if_freenameindex, if_freenameindex)
+libc_hidden_weak (if_freenameindex)
+stub_warning (if_freenameindex)
+
+struct if_nameindex *
+__if_nameindex (void)
+{
+  __set_errno (ENOSYS);
+  return NULL;
+}
+weak_alias (__if_nameindex, if_nameindex)
+libc_hidden_weak (if_nameindex)
+stub_warning (if_nameindex)
+
+#if 0
+void
+internal_function
+__protocol_available (int *have_inet, int *have_inet6)
+{
+  /* By default we assume that IPv4 is available, IPv6 not.  */
+  *have_inet = 1;
+  *have_inet6 = 0;
+}
+#endif
diff --git a/ap/libc/glibc/glibc-2.23/inet/ifaddrs.c b/ap/libc/glibc/glibc-2.23/inet/ifaddrs.c
new file mode 100644
index 0000000..c6ddf0d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/ifaddrs.c
@@ -0,0 +1,47 @@
+/* getifaddrs -- get names and addresses of all network interfaces
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <ifaddrs.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* Create a linked list of `struct ifaddrs' structures, one for each
+   network interface on the host machine.  If successful, store the
+   list in *IFAP and return 0.  On errors, return -1 and set `errno'.  */
+int
+__getifaddrs (struct ifaddrs **ifap)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__getifaddrs, getifaddrs)
+libc_hidden_weak (getifaddrs)
+stub_warning (getifaddrs)
+
+void
+__freeifaddrs (struct ifaddrs *ifa)
+{
+  if (ifa == NULL)
+    return;			/* a la free, why not? */
+
+  /* Can't be called properly if getifaddrs never succeeded.  */
+  abort ();
+}
+weak_alias (__freeifaddrs, freeifaddrs)
+libc_hidden_weak (freeifaddrs)
+stub_warning (freeifaddrs)
diff --git a/ap/libc/glibc/glibc-2.23/inet/ifaddrs.h b/ap/libc/glibc/glibc-2.23/inet/ifaddrs.h
new file mode 100644
index 0000000..cd8d209
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/ifaddrs.h
@@ -0,0 +1,73 @@
+/* ifaddrs.h -- declarations for getting network interface addresses
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _IFADDRS_H
+#define _IFADDRS_H	1
+
+#include <features.h>
+#include <sys/socket.h>
+
+__BEGIN_DECLS
+
+/* The `getifaddrs' function generates a linked list of these structures.
+   Each element of the list describes one network interface.  */
+struct ifaddrs
+{
+  struct ifaddrs *ifa_next;	/* Pointer to the next structure.  */
+
+  char *ifa_name;		/* Name of this network interface.  */
+  unsigned int ifa_flags;	/* Flags as from SIOCGIFFLAGS ioctl.  */
+
+  struct sockaddr *ifa_addr;	/* Network address of this interface.  */
+  struct sockaddr *ifa_netmask; /* Netmask of this interface.  */
+  union
+  {
+    /* At most one of the following two is valid.  If the IFF_BROADCAST
+       bit is set in `ifa_flags', then `ifa_broadaddr' is valid.  If the
+       IFF_POINTOPOINT bit is set, then `ifa_dstaddr' is valid.
+       It is never the case that both these bits are set at once.  */
+    struct sockaddr *ifu_broadaddr; /* Broadcast address of this interface. */
+    struct sockaddr *ifu_dstaddr; /* Point-to-point destination address.  */
+  } ifa_ifu;
+  /* These very same macros are defined by <net/if.h> for `struct ifaddr'.
+     So if they are defined already, the existing definitions will be fine.  */
+# ifndef ifa_broadaddr
+#  define ifa_broadaddr	ifa_ifu.ifu_broadaddr
+# endif
+# ifndef ifa_dstaddr
+#  define ifa_dstaddr	ifa_ifu.ifu_dstaddr
+# endif
+
+  void *ifa_data;		/* Address-specific data (may be unused).  */
+};
+
+
+/* Create a linked list of `struct ifaddrs' structures, one for each
+   network interface on the host machine.  If successful, store the
+   list in *IFAP and return 0.  On errors, return -1 and set `errno'.
+
+   The storage returned in *IFAP is allocated dynamically and can
+   only be properly freed by passing it to `freeifaddrs'.  */
+extern int getifaddrs (struct ifaddrs **__ifap) __THROW;
+
+/* Reclaim the storage allocated by a previous `getifaddrs' call.  */
+extern void freeifaddrs (struct ifaddrs *__ifa)  __THROW;
+
+__END_DECLS
+
+#endif /* ifaddrs.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/ifreq.c b/ap/libc/glibc/glibc-2.23/inet/ifreq.c
new file mode 100644
index 0000000..3f0b6ea
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/ifreq.c
@@ -0,0 +1,26 @@
+/* Collect network interface list.  Stub version.
+   Copyright (C) 2013-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "ifreq.h"
+
+void
+__ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
+{
+  *num_ifs = 0;
+  *ifreqs = NULL;
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/in6_addr.c b/ap/libc/glibc/glibc-2.23/inet/in6_addr.c
new file mode 100644
index 0000000..4486a88
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/in6_addr.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <netinet/in.h>
+
+const struct in6_addr __in6addr_any =
+{ { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
+libc_hidden_data_def (__in6addr_any)
+weak_alias (__in6addr_any, in6addr_any)
+libc_hidden_data_weak (in6addr_any)
+const struct in6_addr __in6addr_loopback =
+{ { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } };
+libc_hidden_data_def (__in6addr_loopback)
+weak_alias (__in6addr_loopback, in6addr_loopback)
+libc_hidden_data_weak (in6addr_loopback)
diff --git a/ap/libc/glibc/glibc-2.23/inet/inet6_opt.c b/ap/libc/glibc/glibc-2.23/inet/inet6_opt.c
new file mode 100644
index 0000000..74115ac
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/inet6_opt.c
@@ -0,0 +1,281 @@
+/* Copyright (C) 2006-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@redhat.com>, 2006.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <string.h>
+#include <netinet/in.h>
+#include <netinet/ip6.h>
+
+
+/* RFC 3542, 10.1
+
+   This function returns the number of bytes needed for the empty
+   extension header i.e., without any options.  If EXTBUF is not NULL it
+   also initializes the extension header to have the correct length
+   field.  In that case if the EXTLEN value is not a positive (i.e.,
+   non-zero) multiple of 8 the function fails and returns -1.  */
+int
+inet6_opt_init (void *extbuf, socklen_t extlen)
+{
+  if (extbuf != NULL)
+    {
+      if (extlen <= 0 || (extlen % 8) != 0 || extlen > 256 * 8)
+	return -1;
+
+      /* Fill in the length in units of 8 octets.  */
+      struct ip6_hbh *extp = (struct ip6_hbh *) extbuf;
+
+      /* RFC 2460 requires that the header extension length is the
+	 length of the option header in 8-byte units, not including
+	 the first 8 bytes.  Hence we have to subtract one.  */
+      extp->ip6h_len = extlen / 8 - 1;
+    }
+
+  return sizeof (struct ip6_hbh);
+}
+
+
+static void
+add_padding (uint8_t *extbuf, int offset, int npad)
+{
+  if (npad == 1)
+    extbuf[offset] = IP6OPT_PAD1;
+  else if (npad > 0)
+    {
+      struct ip6_opt *pad_opt = (struct ip6_opt *) (extbuf + offset);
+
+      pad_opt->ip6o_type = IP6OPT_PADN;
+      pad_opt->ip6o_len = npad - sizeof (struct ip6_opt);
+      /* Clear the memory used by the padding.  */
+      memset (pad_opt + 1, '\0', pad_opt->ip6o_len);
+    }
+}
+
+
+
+/* RFC 3542, 10.2
+
+   This function returns the updated total length taking into account
+   adding an option with length 'len' and alignment 'align'.  If
+   EXTBUF is not NULL then, in addition to returning the length, the
+   function inserts any needed pad option, initializes the option
+   (setting the type and length fields) and returns a pointer to the
+   location for the option content in databufp.  If the option does
+   not fit in the extension header buffer the function returns -1.  */
+int
+inet6_opt_append (void *extbuf, socklen_t extlen, int offset, uint8_t type,
+		  socklen_t len, uint8_t align, void **databufp)
+{
+  /* Check minimum offset.  */
+  if (offset < sizeof (struct ip6_hbh))
+    return -1;
+
+  /* One cannot add padding options.  */
+  if (type == IP6OPT_PAD1 || type == IP6OPT_PADN)
+    return -1;
+
+  /* The option length must fit in one octet.  */
+  if (len > 255)
+    return -1;
+
+  /* The alignment can only by 1, 2, 4, or 8 and must not exceed the
+     option length.  */
+  if (align == 0 || align > 8 || (align & (align - 1)) != 0 || align > len)
+    return -1;
+
+  /* Determine the needed padding for alignment.  Following the
+     current content of the buffer we have the is the IPv6 option type
+     and length, followed immediately by the data.  The data has the
+     alignment constraints.  Therefore padding must be inserted in the
+     form of padding options before the new option. */
+  int data_offset = offset + sizeof (struct ip6_opt);
+  int npad = (align - data_offset % align) & (align - 1);
+
+  if (extbuf != NULL)
+    {
+      /* Now we can check whether the buffer is large enough.  */
+      if (data_offset + npad + len > extlen)
+	return -1;
+
+      add_padding (extbuf, offset, npad);
+
+      offset += npad;
+
+      /* Now prepare the option itself.  */
+      struct ip6_opt *opt = (struct ip6_opt *) ((uint8_t *) extbuf + offset);
+
+      opt->ip6o_type = type;
+      opt->ip6o_len = len;
+
+      *databufp = opt + 1;
+    }
+  else
+    offset += npad;
+
+  return offset + sizeof (struct ip6_opt) + len;
+}
+
+
+/* RFC 3542, 10.3
+
+   This function returns the updated total length taking into account
+   the final padding of the extension header to make it a multiple of
+   8 bytes.  If EXTBUF is not NULL the function also initializes the
+   option by inserting a Pad1 or PadN option of the proper length.  */
+int
+inet6_opt_finish (void *extbuf, socklen_t extlen, int offset)
+{
+  /* Check minimum offset.  */
+  if (offset < sizeof (struct ip6_hbh))
+    return -1;
+
+  /* Required padding at the end.  */
+  int npad = (8 - (offset & 7)) & 7;
+
+  if (extbuf != NULL)
+    {
+      /* Make sure the buffer is large enough.  */
+      if (offset + npad > extlen)
+	return -1;
+
+      add_padding (extbuf, offset, npad);
+    }
+
+  return offset + npad;
+}
+
+
+/* RFC 3542, 10.4
+
+   This function inserts data items of various sizes in the data
+   portion of the option.  VAL should point to the data to be
+   inserted.  OFFSET specifies where in the data portion of the option
+   the value should be inserted; the first byte after the option type
+   and length is accessed by specifying an offset of zero.  */
+int
+inet6_opt_set_val (void *databuf, int offset, void *val, socklen_t vallen)
+{
+  memcpy ((uint8_t *) databuf + offset, val, vallen);
+
+  return offset + vallen;
+}
+
+
+/* RFC 3542, 10.5
+
+   This function parses received option extension headers returning
+   the next option.  EXTBUF and EXTLEN specifies the extension header.
+   OFFSET should either be zero (for the first option) or the length
+   returned by a previous call to 'inet6_opt_next' or
+   'inet6_opt_find'.  It specifies the position where to continue
+   scanning the extension buffer.  */
+int
+inet6_opt_next (void *extbuf, socklen_t extlen, int offset, uint8_t *typep,
+		socklen_t *lenp, void **databufp)
+{
+  if (offset == 0)
+    offset = sizeof (struct ip6_hbh);
+  else if (offset < sizeof (struct ip6_hbh))
+    return -1;
+
+  while (offset < extlen)
+    {
+      struct ip6_opt *opt = (struct ip6_opt *) ((uint8_t *) extbuf + offset);
+
+      if (opt->ip6o_type == IP6OPT_PAD1)
+	/* Single byte padding.  */
+	++offset;
+      else if (opt->ip6o_type == IP6OPT_PADN)
+	offset += sizeof (struct ip6_opt) + opt->ip6o_len;
+      else
+	{
+	  /* Check whether the option is valid.  */
+	  offset += sizeof (struct ip6_opt) + opt->ip6o_len;
+	  if (offset > extlen)
+	    return -1;
+
+	  *typep = opt->ip6o_type;
+	  *lenp = opt->ip6o_len;
+	  *databufp = opt + 1;
+	  return offset;
+	}
+    }
+
+  return -1;
+}
+
+
+/* RFC 3542, 10.6
+
+   This function is similar to the previously described
+   'inet6_opt_next' function, except this function lets the caller
+   specify the option type to be searched for, instead of always
+   returning the next option in the extension header.  */
+int
+inet6_opt_find (void *extbuf, socklen_t extlen, int offset, uint8_t type,
+		socklen_t *lenp, void **databufp)
+{
+  if (offset == 0)
+    offset = sizeof (struct ip6_hbh);
+  else if (offset < sizeof (struct ip6_hbh))
+    return -1;
+
+  while (offset < extlen)
+    {
+      struct ip6_opt *opt = (struct ip6_opt *) ((uint8_t *) extbuf + offset);
+
+      if (opt->ip6o_type == IP6OPT_PAD1)
+	{
+	  /* Single byte padding.  */
+	  ++offset;
+	  if (type == IP6OPT_PAD1)
+	    {
+	      *lenp = 0;
+	      *databufp = (uint8_t *) extbuf + offset;
+	      return offset;
+	    }
+	}
+      else if (opt->ip6o_type != type)
+	offset += sizeof (struct ip6_opt) + opt->ip6o_len;
+      else
+	{
+	  /* Check whether the option is valid.  */
+	  offset += sizeof (struct ip6_opt) + opt->ip6o_len;
+	  if (offset > extlen)
+	    return -1;
+
+	  *lenp = opt->ip6o_len;
+	  *databufp = opt + 1;
+	  return offset;
+	}
+    }
+
+  return -1;
+}
+
+
+/* RFC 3542, 10.7
+
+   This function extracts data items of various sizes in the data
+   portion of the option.  */
+int
+inet6_opt_get_val (void *databuf, int offset, void *val, socklen_t vallen)
+{
+  memcpy (val, (uint8_t *) databuf + offset, vallen);
+
+  return offset + vallen;
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/inet6_option.c b/ap/libc/glibc/glibc-2.23/inet/inet6_option.c
new file mode 100644
index 0000000..91ae982
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/inet6_option.c
@@ -0,0 +1,349 @@
+/* Copyright (C) 2003-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <assert.h>
+#include <string.h>
+#include <netinet/in.h>
+#include <netinet/ip6.h>
+#include <sys/param.h>
+
+
+static void
+internal_function
+add_pad (struct cmsghdr *cmsg, int len)
+{
+  unsigned char *p = CMSG_DATA (cmsg) + cmsg->cmsg_len - CMSG_LEN (0);
+
+  if (len == 1)
+    /* Special handling for 1, a one-byte solution.  */
+    *p++ = IP6OPT_PAD1;
+  else if (len != 0)
+    {
+      /* Multibyte padding.  */
+      *p++ = IP6OPT_PADN;
+      *p++ = len - 2;	/* Discount the two header bytes.  */
+      /* The rest is filled with zero.  */
+      memset (p, '\0', len - 2);
+      p += len - 2;
+    }
+
+  /* Account for the bytes.  */
+  cmsg->cmsg_len += len;
+}
+
+
+static int
+get_opt_end (const uint8_t **result, const uint8_t *startp,
+	     const uint8_t *endp)
+{
+  if (startp >= endp)
+    /* Out of bounds.  */
+    return -1;
+
+  if (*startp == IP6OPT_PAD1)
+    {
+      /* Just this one byte.  */
+      *result = startp + 1;
+      return 0;
+    }
+
+  /* Now we know there must be at least two bytes.  */
+  if (startp + 2 > endp
+      /* Now we can get the length byte.  */
+      || startp + startp[1] + 2 > endp)
+    return -1;
+
+  *result = startp + startp[1] + 2;
+
+  return 0;
+}
+
+
+static uint8_t *option_alloc (struct cmsghdr *cmsg, int datalen, int multx,
+			      int plusy);
+
+
+/* RFC 2292, 6.3.1
+
+   This function returns the number of bytes required to hold an option
+   when it is stored as ancillary data, including the cmsghdr structure
+   at the beginning, and any padding at the end (to make its size a
+   multiple of 8 bytes).  The argument is the size of the structure
+   defining the option, which must include any pad bytes at the
+   beginning (the value y in the alignment term "xn + y"), the type
+   byte, the length byte, and the option data.  */
+int
+inet6_option_space (int nbytes)
+{
+  /* Add room for the extension header.  */
+  nbytes += sizeof (struct ip6_ext);
+
+  return CMSG_SPACE (roundup (nbytes, 8));
+}
+link_warning (inet6_option_space,
+	      "inet6_option_space is obsolete, use the RFC 3542 interfaces")
+
+
+/* RFC 2292, 6.3.2
+
+   This function is called once per ancillary data object that will
+   contain either Hop-by-Hop or Destination options.  It returns 0 on
+   success or -1 on an error.  */
+int
+inet6_option_init (void *bp, struct cmsghdr **cmsgp, int type)
+{
+  /* Only Hop-by-Hop or Destination options allowed.  */
+  if (type != IPV6_HOPOPTS && type != IPV6_DSTOPTS)
+    return -1;
+
+  /* BP is a pointer to the previously allocated space.  */
+  struct cmsghdr *newp = (struct cmsghdr *) bp;
+
+  /* Initialize the message header.
+
+     Length: No data yet, only the cmsghdr struct.  */
+  newp->cmsg_len = CMSG_LEN (0);
+  /* Originating protocol: obviously IPv6.  */
+  newp->cmsg_level = IPPROTO_IPV6;
+  /* Message type.  */
+  newp->cmsg_type = type;
+
+  /* Pass up the result.  */
+  *cmsgp = newp;
+
+  return 0;
+}
+link_warning (inet6_option_init,
+	      "inet6_option_init is obsolete, use the RFC 3542 interfaces")
+
+
+/* RFC 2292, 6.3.3
+
+   This function appends a Hop-by-Hop option or a Destination option
+   into an ancillary data object that has been initialized by
+   inet6_option_init().  This function returns 0 if it succeeds or -1 on
+   an error.  */
+int
+inet6_option_append (struct cmsghdr *cmsg, const uint8_t *typep, int multx,
+		     int plusy)
+{
+  /* typep is a pointer to the 8-bit option type.  It is assumed that this
+     field is immediately followed by the 8-bit option data length field,
+     which is then followed immediately by the option data.
+
+     The option types IP6OPT_PAD1 and IP6OPT_PADN also must be handled.  */
+  int len = typep[0] == IP6OPT_PAD1 ? 1 : typep[1] + 2;
+
+  /* Get the pointer to the space in the message.  */
+  uint8_t *ptr = option_alloc (cmsg, len, multx, plusy);
+  if (ptr == NULL)
+    /* Some problem with the parameters.  */
+    return -1;
+
+  /* Copy the content.  */
+  memcpy (ptr, typep, len);
+
+  return 0;
+}
+link_warning (inet6_option_append,
+	      "inet6_option_append is obsolete, use the RFC 3542 interfaces")
+
+
+/* RFC 2292, 6.3.4
+
+   This function appends a Hop-by-Hop option or a Destination option
+   into an ancillary data object that has been initialized by
+   inet6_option_init().  This function returns a pointer to the 8-bit
+   option type field that starts the option on success, or NULL on an
+   error.  */
+static uint8_t *
+option_alloc (struct cmsghdr *cmsg, int datalen, int multx, int plusy)
+{
+  /* The RFC limits the value of the alignment values.  */
+  if ((multx != 1 && multx != 2 && multx != 4 && multx != 8)
+      || ! (plusy >= 0 && plusy <= 7))
+    return NULL;
+
+  /* Current data size.  */
+  int dsize = cmsg->cmsg_len - CMSG_LEN (0);
+
+  /* The first two bytes of the option are for the extended header.  */
+  if (__glibc_unlikely (dsize == 0))
+    {
+      cmsg->cmsg_len += sizeof (struct ip6_ext);
+      dsize = sizeof (struct ip6_ext);
+    }
+
+  /* First add padding.  */
+  add_pad (cmsg, ((multx - (dsize & (multx - 1))) & (multx - 1)) + plusy);
+
+  /* Return the pointer to the start of the option space.  */
+  uint8_t *result = CMSG_DATA (cmsg) + cmsg->cmsg_len - CMSG_LEN (0);
+  cmsg->cmsg_len += datalen;
+
+  /* The extended option header length is measured in 8-byte groups.
+     To represent the current length we might have to add padding.  */
+  dsize = cmsg->cmsg_len - CMSG_LEN (0);
+  add_pad (cmsg, (8 - (dsize & (8 - 1))) & (8 - 1));
+
+  /* Record the new length of the option.  */
+  assert (((cmsg->cmsg_len - CMSG_LEN (0)) % 8) == 0);
+  int len8b = (cmsg->cmsg_len - CMSG_LEN (0)) / 8 - 1;
+  if (len8b >= 256)
+    /* Too long.  */
+    return NULL;
+
+  struct ip6_ext *ie = (void *) CMSG_DATA (cmsg);
+  ie->ip6e_len = len8b;
+
+  return result;
+}
+
+
+uint8_t *
+inet6_option_alloc (struct cmsghdr *cmsg, int datalen, int multx, int plusy)
+{
+  return option_alloc (cmsg, datalen, multx, plusy);
+}
+link_warning (inet6_option_alloc,
+	      "inet6_option_alloc is obsolete, use the RFC 3542 interfaces")
+
+
+/* RFC 2292, 6.3.5
+
+   This function processes the next Hop-by-Hop option or Destination
+   option in an ancillary data object.  If another option remains to be
+   processed, the return value of the function is 0 and *tptrp points to
+   the 8-bit option type field (which is followed by the 8-bit option
+   data length, followed by the option data).  If no more options remain
+   to be processed, the return value is -1 and *tptrp is NULL.  If an
+   error occurs, the return value is -1 and *tptrp is not NULL.  */
+int
+inet6_option_next (const struct cmsghdr *cmsg, uint8_t **tptrp)
+{
+  /* Make sure it is an option of the right type.  */
+  if (cmsg->cmsg_level != IPPROTO_IPV6
+      || (cmsg->cmsg_type != IPV6_HOPOPTS && cmsg->cmsg_type != IPV6_DSTOPTS))
+    return -1;
+
+  /* Pointer to the extension header.  We only compute the address, we
+     don't access anything yet.  */
+  const struct ip6_ext *ip6e = (const struct ip6_ext *) CMSG_DATA (cmsg);
+
+  /* Make sure the message is long enough.  */
+  if (cmsg->cmsg_len < CMSG_LEN (sizeof (struct ip6_ext))
+      /* Now we can access the extension header.  */
+      || cmsg->cmsg_len < CMSG_LEN ((ip6e->ip6e_len + 1) * 8))
+    /* Too small.  */
+    return -1;
+
+  /* Determine the address of the byte past the message.  */
+  const uint8_t *endp = CMSG_DATA (cmsg) + (ip6e->ip6e_len + 1) * 8;
+
+  const uint8_t *result;
+  if (*tptrp == NULL)
+    /* This is the first call, return the first option if there is one.  */
+    result = (const uint8_t *) (ip6e + 1);
+  else
+    {
+      /* Make sure *TPTRP points to a beginning of a new option in
+	 the message.  The upper limit is checked in get_opt_end.  */
+      if (*tptrp < (const uint8_t *) (ip6e + 1))
+	return -1;
+
+      /* Get the beginning of the next option.  */
+      if (get_opt_end (&result, *tptrp, endp) != 0)
+	return -1;
+    }
+
+  /* We know where the next option starts.  */
+  *tptrp = (uint8_t *) result;
+
+  /* Check the option is fully represented in the message.  */
+  return get_opt_end (&result, result, endp);
+}
+link_warning (inet6_option_next,
+	      "inet6_option_next is obsolete, use the RFC 3542 interfaces")
+
+
+/* RFC 2292, 6.3.6
+
+   This function is similar to the previously described
+   inet6_option_next() function, except this function lets the caller
+   specify the option type to be searched for, instead of always
+   returning the next option in the ancillary data object.  cmsg is a
+   pointer to cmsghdr structure of which cmsg_level equals IPPROTO_IPV6
+   and cmsg_type equals either IPV6_HOPOPTS or IPV6_DSTOPTS.  */
+int
+inet6_option_find (const struct cmsghdr *cmsg, uint8_t **tptrp, int type)
+{
+  /* Make sure it is an option of the right type.  */
+  if (cmsg->cmsg_level != IPPROTO_IPV6
+      || (cmsg->cmsg_type != IPV6_HOPOPTS && cmsg->cmsg_type != IPV6_DSTOPTS))
+    return -1;
+
+  /* Pointer to the extension header.  We only compute the address, we
+     don't access anything yet.  */
+  const struct ip6_ext *ip6e = (const struct ip6_ext *) CMSG_DATA (cmsg);
+
+  /* Make sure the message is long enough.  */
+  if (cmsg->cmsg_len < CMSG_LEN (sizeof (struct ip6_ext))
+      /* Now we can access the extension header.  */
+      || cmsg->cmsg_len < CMSG_LEN ((ip6e->ip6e_len + 1) * 8))
+    /* Too small.  */
+    return -1;
+
+  /* Determine the address of the byte past the message.  */
+  const uint8_t *endp = CMSG_DATA (cmsg) + (ip6e->ip6e_len + 1) * 8;
+
+  const uint8_t *next;
+  if (*tptrp == NULL)
+    /* This is the first call, return the first option if there is one.  */
+    next = (const uint8_t *) (ip6e + 1);
+  else
+    {
+      /* Make sure *TPTRP points to a beginning of a new option in
+	 the message.  The upper limit is checked in get_opt_end.  */
+      if (*tptrp < (const uint8_t *) (ip6e + 1))
+	return -1;
+
+      /* Get the beginning of the next option.  */
+      if (get_opt_end (&next, *tptrp, endp) != 0)
+	return -1;
+    }
+
+  /* Now search for the appropriate typed entry.  */
+  const uint8_t *result;
+  do
+    {
+      result = next;
+
+      /* Get the end of this entry.  */
+      if (get_opt_end (&next, result, endp) != 0)
+	return -1;
+    }
+  while (*result != type);
+
+  /* We know where the next option starts.  */
+  *tptrp = (uint8_t *) result;
+
+  /* Success.  */
+  return 0;
+}
+link_warning (inet6_option_find,
+	      "inet6_option_find is obsolete, use the RFC 3542 interfaces")
diff --git a/ap/libc/glibc/glibc-2.23/inet/inet6_rth.c b/ap/libc/glibc/glibc-2.23/inet/inet6_rth.c
new file mode 100644
index 0000000..42d673c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/inet6_rth.c
@@ -0,0 +1,196 @@
+/* Copyright (C) 2006-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@redhat.com>, 2006.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <string.h>
+#include <netinet/in.h>
+#include <netinet/ip6.h>
+
+
+/* RFC 3542, 7.1
+
+   This function returns the number of bytes required to hold a
+   Routing header of the specified type containing the specified
+   number of segments (addresses).  For an IPv6 Type 0 Routing header,
+   the number of segments must be between 0 and 127, inclusive.  */
+socklen_t
+inet6_rth_space (int type, int segments)
+{
+  switch (type)
+    {
+    case IPV6_RTHDR_TYPE_0:
+      if (segments < 0 || segments > 127)
+	return 0;
+
+      return sizeof (struct ip6_rthdr0) + segments * sizeof (struct in6_addr);
+    }
+
+  return 0;
+}
+
+
+/* RFC 3542, 7.2
+
+   This function initializes the buffer pointed to by BP to contain a
+   Routing header of the specified type and sets ip6r_len based on the
+   segments parameter.  */
+void *
+inet6_rth_init (void *bp, socklen_t bp_len, int type, int segments)
+{
+  struct ip6_rthdr *rthdr = (struct ip6_rthdr *) bp;
+
+  switch (type)
+    {
+    case IPV6_RTHDR_TYPE_0:
+      /* Make sure the parameters are valid and the buffer is large enough.  */
+      if (segments < 0 || segments > 127)
+	break;
+
+      socklen_t len = (sizeof (struct ip6_rthdr0)
+		       + segments * sizeof (struct in6_addr));
+      if (len > bp_len)
+	break;
+
+      /* Some implementations seem to initialize the whole memory area.  */
+      memset (bp, '\0', len);
+
+      /* Length in units of 8 octets.  */
+      rthdr->ip6r_len = segments * sizeof (struct in6_addr) / 8;
+      rthdr->ip6r_type = IPV6_RTHDR_TYPE_0;
+      return bp;
+    }
+
+  return NULL;
+}
+
+
+/* RFC 3542, 7.3
+
+   This function adds the IPv6 address pointed to by addr to the end of
+   the Routing header being constructed.  */
+int
+inet6_rth_add (void *bp, const struct in6_addr *addr)
+{
+  struct ip6_rthdr *rthdr = (struct ip6_rthdr *) bp;
+
+  switch (rthdr->ip6r_type)
+    {
+      struct ip6_rthdr0 *rthdr0;
+    case IPV6_RTHDR_TYPE_0:
+      rthdr0 = (struct ip6_rthdr0 *) rthdr;
+      if (rthdr0->ip6r0_len * 8 / sizeof (struct in6_addr)
+	  - rthdr0->ip6r0_segleft < 1)
+        return -1;
+
+      memcpy (&rthdr0->ip6r0_addr[rthdr0->ip6r0_segleft++],
+	      addr, sizeof (struct in6_addr));
+
+      return 0;
+    }
+
+  return -1;
+}
+
+
+/* RFC 3542, 7.4
+
+   This function takes a Routing header extension header (pointed to by
+   the first argument) and writes a new Routing header that sends
+   datagrams along the reverse of that route.  The function reverses the
+   order of the addresses and sets the segleft member in the new Routing
+   header to the number of segments.  */
+int
+inet6_rth_reverse (const void *in, void *out)
+{
+  struct ip6_rthdr *in_rthdr = (struct ip6_rthdr *) in;
+
+  switch (in_rthdr->ip6r_type)
+    {
+      struct ip6_rthdr0 *in_rthdr0;
+      struct ip6_rthdr0 *out_rthdr0;
+    case IPV6_RTHDR_TYPE_0:
+      in_rthdr0 = (struct ip6_rthdr0 *) in;
+      out_rthdr0 = (struct ip6_rthdr0 *) out;
+
+      /* Copy header, not the addresses.  The memory regions can overlap.  */
+      memmove (out_rthdr0, in_rthdr0, sizeof (struct ip6_rthdr0));
+
+      int total = in_rthdr0->ip6r0_len * 8 / sizeof (struct in6_addr);
+      for (int i = 0; i < total / 2; ++i)
+	{
+	  /* Remember, IN_RTHDR0 and OUT_RTHDR0 might overlap.  */
+	  struct in6_addr temp = in_rthdr0->ip6r0_addr[i];
+	  out_rthdr0->ip6r0_addr[i] = in_rthdr0->ip6r0_addr[total - 1 - i];
+	  out_rthdr0->ip6r0_addr[total - 1 - i] = temp;
+	}
+      if (total % 2 != 0 && in != out)
+	out_rthdr0->ip6r0_addr[total / 2] = in_rthdr0->ip6r0_addr[total / 2];
+
+      out_rthdr0->ip6r0_segleft = total;
+
+      return 0;
+    }
+
+  return -1;
+}
+
+
+/* RFC 3542, 7.5
+
+   This function returns the number of segments (addresses) contained in
+   the Routing header described by BP.  */
+int
+inet6_rth_segments (const void *bp)
+{
+  struct ip6_rthdr *rthdr = (struct ip6_rthdr *) bp;
+
+  switch (rthdr->ip6r_type)
+    {
+    case IPV6_RTHDR_TYPE_0:
+
+      return rthdr->ip6r_len * 8 / sizeof (struct in6_addr);
+    }
+
+  return -1;
+}
+
+
+/* RFC 3542, 7.6
+
+   This function returns a pointer to the IPv6 address specified by
+   index (which must have a value between 0 and one less than the
+   value returned by 'inet6_rth_segments') in the Routing header
+   described by BP.  */
+struct in6_addr *
+inet6_rth_getaddr (const void *bp, int index)
+{
+  struct ip6_rthdr *rthdr = (struct ip6_rthdr *) bp;
+
+  switch (rthdr->ip6r_type)
+    {
+       struct ip6_rthdr0 *rthdr0;
+    case IPV6_RTHDR_TYPE_0:
+      rthdr0 = (struct ip6_rthdr0 *) rthdr;
+
+      if (index >= rthdr0->ip6r0_len * 8 / sizeof (struct in6_addr))
+	break;
+
+      return &rthdr0->ip6r0_addr[index];
+    }
+
+  return NULL;
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/inet_lnaof.c b/ap/libc/glibc/glibc-2.23/inet/inet_lnaof.c
new file mode 100644
index 0000000..8fd759c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/inet_lnaof.c
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 1983, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)inet_lnaof.c	8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/param.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+/*
+ * Return the local network address portion of an
+ * internet address; handles class a/b/c network
+ * number formats.
+ */
+in_addr_t
+inet_lnaof (struct in_addr in)
+{
+	u_int32_t i = ntohl(in.s_addr);
+
+	if (IN_CLASSA(i))
+		return ((i)&IN_CLASSA_HOST);
+	else if (IN_CLASSB(i))
+		return ((i)&IN_CLASSB_HOST);
+	else
+		return ((i)&IN_CLASSC_HOST);
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/inet_mkadr.c b/ap/libc/glibc/glibc-2.23/inet/inet_mkadr.c
new file mode 100644
index 0000000..75d8daa
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/inet_mkadr.c
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 1983, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)inet_makeaddr.c	8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/param.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+/*
+ * Formulate an Internet address from network + host.  Used in
+ * building addresses stored in the ifnet structure.
+ */
+struct in_addr
+__inet_makeaddr (in_addr_t net, in_addr_t host)
+{
+	struct in_addr in;
+
+	if (net < 128)
+		in.s_addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
+	else if (net < 65536)
+		in.s_addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
+	else if (net < 16777216L)
+		in.s_addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
+	else
+		in.s_addr = net | host;
+	in.s_addr = htonl(in.s_addr);
+	return in;
+}
+libc_hidden_def (__inet_makeaddr)
+weak_alias (__inet_makeaddr, inet_makeaddr)
diff --git a/ap/libc/glibc/glibc-2.23/inet/inet_net.c b/ap/libc/glibc/glibc-2.23/inet/inet_net.c
new file mode 100644
index 0000000..2e8752d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/inet_net.c
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 1983, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* Copyright (C) 2013-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)inet_network.c	8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <ctype.h>
+
+/*
+ * Internet network address interpretation routine.
+ * The library routines call this routine to interpret
+ * network numbers.
+ */
+u_int32_t
+inet_network (const char *cp)
+{
+	u_int32_t val, base, n, i;
+	char c;
+	u_int32_t parts[4], *pp = parts;
+	int digit;
+
+again:
+	val = 0; base = 10; digit = 0;
+	if (*cp == '0')
+		digit = 1, base = 8, cp++;
+	if (*cp == 'x' || *cp == 'X')
+		digit = 0, base = 16, cp++;
+	while ((c = *cp) != 0) {
+		if (isdigit(c)) {
+			if (base == 8 && (c == '8' || c == '9'))
+				return (INADDR_NONE);
+			val = (val * base) + (c - '0');
+			cp++;
+			digit = 1;
+			continue;
+		}
+		if (base == 16 && isxdigit(c)) {
+			val = (val << 4) + (tolower (c) + 10 - 'a');
+			cp++;
+			digit = 1;
+			continue;
+		}
+		break;
+	}
+	if (!digit)
+		return (INADDR_NONE);
+	if (pp >= parts + 4 || val > 0xff)
+		return (INADDR_NONE);
+	if (*cp == '.') {
+		*pp++ = val, cp++;
+		goto again;
+	}
+	while (isspace(*cp))
+		cp++;
+	if (*cp)
+		return (INADDR_NONE);
+	if (pp >= parts + 4 || val > 0xff)
+		return (INADDR_NONE);
+	*pp++ = val;
+	n = pp - parts;
+	for (val = 0, i = 0; i < n; i++) {
+		val <<= 8;
+		val |= parts[i] & 0xff;
+	}
+	return (val);
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/inet_netof.c b/ap/libc/glibc/glibc-2.23/inet/inet_netof.c
new file mode 100644
index 0000000..0f048e6
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/inet_netof.c
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 1983, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)inet_netof.c	8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/param.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+/*
+ * Return the network number from an internet
+ * address; handles class a/b/c network #'s.
+ */
+in_addr_t
+inet_netof (struct in_addr in)
+{
+	u_int32_t i = ntohl(in.s_addr);
+
+	if (IN_CLASSA(i))
+		return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT);
+	else if (IN_CLASSB(i))
+		return (((i)&IN_CLASSB_NET) >> IN_CLASSB_NSHIFT);
+	else
+		return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT);
+}
+libc_hidden_def (inet_netof)
diff --git a/ap/libc/glibc/glibc-2.23/inet/inet_ntoa.c b/ap/libc/glibc/glibc-2.23/inet/inet_ntoa.c
new file mode 100644
index 0000000..e4f25ae
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/inet_ntoa.c
@@ -0,0 +1,38 @@
+/* Convert Inet number to ASCII representation.
+   Copyright (C) 1997-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <arpa/inet.h>
+
+/* The interface of this function is completely stupid, it requires a
+   static buffer.  We relax this a bit in that we allow one buffer for
+   each thread.  */
+static __thread char buffer[18];
+
+
+char *
+inet_ntoa (struct in_addr in)
+{
+  unsigned char *bytes = (unsigned char *) &in;
+  __snprintf (buffer, sizeof (buffer), "%d.%d.%d.%d",
+	      bytes[0], bytes[1], bytes[2], bytes[3]);
+
+  return buffer;
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/netgroup.h b/ap/libc/glibc/glibc-2.23/inet/netgroup.h
new file mode 100644
index 0000000..365970f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/netgroup.h
@@ -0,0 +1,85 @@
+/* Internal header for netgroup related functions.
+   Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _NETGROUP_H
+#define _NETGROUP_H	1
+
+#include <nsswitch.h>
+
+/* A netgroup can consist of names of other netgroups.  We have to
+   track which netgroups were read and which still have to be read.  */
+struct name_list
+{
+  struct name_list *next;
+  char name[];
+};
+
+
+/* Dataset for iterating netgroups.  */
+struct __netgrent
+{
+  enum { triple_val, group_val } type;
+
+  union
+  {
+    struct
+    {
+      const char *host;
+      const char *user;
+      const char *domain;
+    }
+    triple;
+
+    const char *group;
+  } val;
+
+  /* Room for the data kept between the calls to the netgroup
+     functions.  We must avoid global variables.  */
+  char *data;
+  size_t data_size;
+  union
+  {
+    char *cursor;
+    unsigned long int position;
+  };
+  int first;
+
+  struct name_list *known_groups;
+  struct name_list *needed_groups;
+
+  /* This handle for the NSS data base is shared between all
+     set/get/endXXXent functions.  */
+  service_user *nip;
+};
+
+
+/* The internal netgroup handling functions might be called from outside.  */
+extern int __internal_setnetgrent (const char *group,
+				   struct __netgrent *datap)
+  internal_function;
+libc_hidden_proto (__internal_setnetgrent)
+extern void __internal_endnetgrent (struct __netgrent *datap)
+  internal_function;
+libc_hidden_proto (__internal_endnetgrent)
+extern int __internal_getnetgrent_r (char **hostp, char **userp,
+				     char **domainp, struct __netgrent *datap,
+				     char *buffer, size_t buflen, int *errnop)
+  internal_function;
+libc_hidden_proto (__internal_getnetgrent_r)
+
+#endif /* netgroup.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/netinet/ether.h b/ap/libc/glibc/glibc-2.23/inet/netinet/ether.h
new file mode 100644
index 0000000..3dff523
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/netinet/ether.h
@@ -0,0 +1,53 @@
+/* Functions for storing Ethernet addresses in ASCII and mapping to hostnames.
+   Copyright (C) 1996-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _NETINET_ETHER_H
+#define _NETINET_ETHER_H	1
+
+#include <features.h>
+
+/* Get definition of `struct ether_addr'.  */
+#include <netinet/if_ether.h>
+
+__BEGIN_DECLS
+
+/* Convert 48 bit Ethernet ADDRess to ASCII.  */
+extern char *ether_ntoa (const struct ether_addr *__addr) __THROW;
+extern char *ether_ntoa_r (const struct ether_addr *__addr, char *__buf)
+     __THROW;
+
+/* Convert ASCII string S to 48 bit Ethernet address.  */
+extern struct ether_addr *ether_aton (const char *__asc) __THROW;
+extern struct ether_addr *ether_aton_r (const char *__asc,
+					struct ether_addr *__addr) __THROW;
+
+/* Map 48 bit Ethernet number ADDR to HOSTNAME.  */
+extern int ether_ntohost (char *__hostname, const struct ether_addr *__addr)
+     __THROW;
+
+/* Map HOSTNAME to 48 bit Ethernet address.  */
+extern int ether_hostton (const char *__hostname, struct ether_addr *__addr)
+     __THROW;
+
+/* Scan LINE and set ADDR and HOSTNAME.  */
+extern int ether_line (const char *__line, struct ether_addr *__addr,
+		       char *__hostname) __THROW;
+
+__END_DECLS
+
+#endif /* netinet/ether.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/netinet/icmp6.h b/ap/libc/glibc/glibc-2.23/inet/netinet/icmp6.h
new file mode 100644
index 0000000..b7a9637
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/netinet/icmp6.h
@@ -0,0 +1,345 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _NETINET_ICMP6_H
+#define _NETINET_ICMP6_H 1
+
+#include <inttypes.h>
+#include <string.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+
+#define ICMP6_FILTER 1
+
+#define ICMP6_FILTER_BLOCK		1
+#define ICMP6_FILTER_PASS		2
+#define ICMP6_FILTER_BLOCKOTHERS	3
+#define ICMP6_FILTER_PASSONLY		4
+
+struct icmp6_filter
+  {
+    uint32_t icmp6_filt[8];
+  };
+
+struct icmp6_hdr
+  {
+    uint8_t     icmp6_type;   /* type field */
+    uint8_t     icmp6_code;   /* code field */
+    uint16_t    icmp6_cksum;  /* checksum field */
+    union
+      {
+	uint32_t  icmp6_un_data32[1]; /* type-specific field */
+	uint16_t  icmp6_un_data16[2]; /* type-specific field */
+	uint8_t   icmp6_un_data8[4];  /* type-specific field */
+      } icmp6_dataun;
+  };
+
+#define icmp6_data32    icmp6_dataun.icmp6_un_data32
+#define icmp6_data16    icmp6_dataun.icmp6_un_data16
+#define icmp6_data8     icmp6_dataun.icmp6_un_data8
+#define icmp6_pptr      icmp6_data32[0]  /* parameter prob */
+#define icmp6_mtu       icmp6_data32[0]  /* packet too big */
+#define icmp6_id        icmp6_data16[0]  /* echo request/reply */
+#define icmp6_seq       icmp6_data16[1]  /* echo request/reply */
+#define icmp6_maxdelay  icmp6_data16[0]  /* mcast group membership */
+
+#define ICMP6_DST_UNREACH             1
+#define ICMP6_PACKET_TOO_BIG          2
+#define ICMP6_TIME_EXCEEDED           3
+#define ICMP6_PARAM_PROB              4
+
+#define ICMP6_INFOMSG_MASK  0x80    /* all informational messages */
+
+#define ICMP6_ECHO_REQUEST          128
+#define ICMP6_ECHO_REPLY            129
+#define MLD_LISTENER_QUERY          130
+#define MLD_LISTENER_REPORT         131
+#define MLD_LISTENER_REDUCTION      132
+
+#define ICMP6_DST_UNREACH_NOROUTE     0 /* no route to destination */
+#define ICMP6_DST_UNREACH_ADMIN       1 /* communication with destination */
+                                        /* administratively prohibited */
+#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */
+#define ICMP6_DST_UNREACH_ADDR        3 /* address unreachable */
+#define ICMP6_DST_UNREACH_NOPORT      4 /* bad port */
+
+#define ICMP6_TIME_EXCEED_TRANSIT     0 /* Hop Limit == 0 in transit */
+#define ICMP6_TIME_EXCEED_REASSEMBLY  1 /* Reassembly time out */
+
+#define ICMP6_PARAMPROB_HEADER        0 /* erroneous header field */
+#define ICMP6_PARAMPROB_NEXTHEADER    1 /* unrecognized Next Header */
+#define ICMP6_PARAMPROB_OPTION        2 /* unrecognized IPv6 option */
+
+#define ICMP6_FILTER_WILLPASS(type, filterp) \
+	((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0)
+
+#define ICMP6_FILTER_WILLBLOCK(type, filterp) \
+	((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0)
+
+#define ICMP6_FILTER_SETPASS(type, filterp) \
+	((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31))))
+
+#define ICMP6_FILTER_SETBLOCK(type, filterp) \
+	((((filterp)->icmp6_filt[(type) >> 5]) |=  (1 << ((type) & 31))))
+
+#define ICMP6_FILTER_SETPASSALL(filterp) \
+	memset (filterp, 0, sizeof (struct icmp6_filter));
+
+#define ICMP6_FILTER_SETBLOCKALL(filterp) \
+	memset (filterp, 0xFF, sizeof (struct icmp6_filter));
+
+#define ND_ROUTER_SOLICIT           133
+#define ND_ROUTER_ADVERT            134
+#define ND_NEIGHBOR_SOLICIT         135
+#define ND_NEIGHBOR_ADVERT          136
+#define ND_REDIRECT                 137
+
+struct nd_router_solicit      /* router solicitation */
+  {
+    struct icmp6_hdr  nd_rs_hdr;
+    /* could be followed by options */
+  };
+
+#define nd_rs_type               nd_rs_hdr.icmp6_type
+#define nd_rs_code               nd_rs_hdr.icmp6_code
+#define nd_rs_cksum              nd_rs_hdr.icmp6_cksum
+#define nd_rs_reserved           nd_rs_hdr.icmp6_data32[0]
+
+struct nd_router_advert       /* router advertisement */
+  {
+    struct icmp6_hdr  nd_ra_hdr;
+    uint32_t   nd_ra_reachable;   /* reachable time */
+    uint32_t   nd_ra_retransmit;  /* retransmit timer */
+    /* could be followed by options */
+  };
+
+#define nd_ra_type               nd_ra_hdr.icmp6_type
+#define nd_ra_code               nd_ra_hdr.icmp6_code
+#define nd_ra_cksum              nd_ra_hdr.icmp6_cksum
+#define nd_ra_curhoplimit        nd_ra_hdr.icmp6_data8[0]
+#define nd_ra_flags_reserved     nd_ra_hdr.icmp6_data8[1]
+#define ND_RA_FLAG_MANAGED       0x80
+#define ND_RA_FLAG_OTHER         0x40
+#define ND_RA_FLAG_HOME_AGENT    0x20
+#define nd_ra_router_lifetime    nd_ra_hdr.icmp6_data16[1]
+
+struct nd_neighbor_solicit    /* neighbor solicitation */
+  {
+    struct icmp6_hdr  nd_ns_hdr;
+    struct in6_addr   nd_ns_target; /* target address */
+    /* could be followed by options */
+  };
+
+#define nd_ns_type               nd_ns_hdr.icmp6_type
+#define nd_ns_code               nd_ns_hdr.icmp6_code
+#define nd_ns_cksum              nd_ns_hdr.icmp6_cksum
+#define nd_ns_reserved           nd_ns_hdr.icmp6_data32[0]
+
+struct nd_neighbor_advert     /* neighbor advertisement */
+  {
+    struct icmp6_hdr  nd_na_hdr;
+    struct in6_addr   nd_na_target; /* target address */
+    /* could be followed by options */
+  };
+
+#define nd_na_type               nd_na_hdr.icmp6_type
+#define nd_na_code               nd_na_hdr.icmp6_code
+#define nd_na_cksum              nd_na_hdr.icmp6_cksum
+#define nd_na_flags_reserved     nd_na_hdr.icmp6_data32[0]
+#if     BYTE_ORDER == BIG_ENDIAN
+#define ND_NA_FLAG_ROUTER        0x80000000
+#define ND_NA_FLAG_SOLICITED     0x40000000
+#define ND_NA_FLAG_OVERRIDE      0x20000000
+#else   /* BYTE_ORDER == LITTLE_ENDIAN */
+#define ND_NA_FLAG_ROUTER        0x00000080
+#define ND_NA_FLAG_SOLICITED     0x00000040
+#define ND_NA_FLAG_OVERRIDE      0x00000020
+#endif
+
+struct nd_redirect            /* redirect */
+  {
+    struct icmp6_hdr  nd_rd_hdr;
+    struct in6_addr   nd_rd_target; /* target address */
+    struct in6_addr   nd_rd_dst;    /* destination address */
+    /* could be followed by options */
+  };
+
+#define nd_rd_type               nd_rd_hdr.icmp6_type
+#define nd_rd_code               nd_rd_hdr.icmp6_code
+#define nd_rd_cksum              nd_rd_hdr.icmp6_cksum
+#define nd_rd_reserved           nd_rd_hdr.icmp6_data32[0]
+
+struct nd_opt_hdr             /* Neighbor discovery option header */
+  {
+    uint8_t  nd_opt_type;
+    uint8_t  nd_opt_len;        /* in units of 8 octets */
+    /* followed by option specific data */
+  };
+
+#define ND_OPT_SOURCE_LINKADDR		1
+#define ND_OPT_TARGET_LINKADDR		2
+#define ND_OPT_PREFIX_INFORMATION	3
+#define ND_OPT_REDIRECTED_HEADER	4
+#define ND_OPT_MTU			5
+#define ND_OPT_RTR_ADV_INTERVAL		7
+#define ND_OPT_HOME_AGENT_INFO		8
+
+struct nd_opt_prefix_info     /* prefix information */
+  {
+    uint8_t   nd_opt_pi_type;
+    uint8_t   nd_opt_pi_len;
+    uint8_t   nd_opt_pi_prefix_len;
+    uint8_t   nd_opt_pi_flags_reserved;
+    uint32_t  nd_opt_pi_valid_time;
+    uint32_t  nd_opt_pi_preferred_time;
+    uint32_t  nd_opt_pi_reserved2;
+    struct in6_addr  nd_opt_pi_prefix;
+  };
+
+#define ND_OPT_PI_FLAG_ONLINK	0x80
+#define ND_OPT_PI_FLAG_AUTO	0x40
+#define ND_OPT_PI_FLAG_RADDR	0x20
+
+struct nd_opt_rd_hdr          /* redirected header */
+  {
+    uint8_t   nd_opt_rh_type;
+    uint8_t   nd_opt_rh_len;
+    uint16_t  nd_opt_rh_reserved1;
+    uint32_t  nd_opt_rh_reserved2;
+    /* followed by IP header and data */
+  };
+
+struct nd_opt_mtu             /* MTU option */
+  {
+    uint8_t   nd_opt_mtu_type;
+    uint8_t   nd_opt_mtu_len;
+    uint16_t  nd_opt_mtu_reserved;
+    uint32_t  nd_opt_mtu_mtu;
+  };
+
+struct mld_hdr
+  {
+    struct icmp6_hdr    mld_icmp6_hdr;
+    struct in6_addr     mld_addr; /* multicast address */
+  };
+
+#define mld_type        mld_icmp6_hdr.icmp6_type
+#define mld_code        mld_icmp6_hdr.icmp6_code
+#define mld_cksum       mld_icmp6_hdr.icmp6_cksum
+#define mld_maxdelay    mld_icmp6_hdr.icmp6_data16[0]
+#define mld_reserved    mld_icmp6_hdr.icmp6_data16[1]
+
+#define ICMP6_ROUTER_RENUMBERING    138
+
+struct icmp6_router_renum    /* router renumbering header */
+  {
+    struct icmp6_hdr    rr_hdr;
+    uint8_t             rr_segnum;
+    uint8_t             rr_flags;
+    uint16_t            rr_maxdelay;
+    uint32_t            rr_reserved;
+  };
+
+#define rr_type		rr_hdr.icmp6_type
+#define rr_code         rr_hdr.icmp6_code
+#define rr_cksum        rr_hdr.icmp6_cksum
+#define rr_seqnum       rr_hdr.icmp6_data32[0]
+
+/* Router renumbering flags */
+#define ICMP6_RR_FLAGS_TEST             0x80
+#define ICMP6_RR_FLAGS_REQRESULT        0x40
+#define ICMP6_RR_FLAGS_FORCEAPPLY       0x20
+#define ICMP6_RR_FLAGS_SPECSITE         0x10
+#define ICMP6_RR_FLAGS_PREVDONE         0x08
+
+struct rr_pco_match    /* match prefix part */
+  {
+    uint8_t             rpm_code;
+    uint8_t             rpm_len;
+    uint8_t             rpm_ordinal;
+    uint8_t             rpm_matchlen;
+    uint8_t             rpm_minlen;
+    uint8_t             rpm_maxlen;
+    uint16_t            rpm_reserved;
+    struct in6_addr     rpm_prefix;
+  };
+
+/* PCO code values */
+#define RPM_PCO_ADD             1
+#define RPM_PCO_CHANGE          2
+#define RPM_PCO_SETGLOBAL       3
+
+struct rr_pco_use      /* use prefix part */
+  {
+    uint8_t             rpu_uselen;
+    uint8_t             rpu_keeplen;
+    uint8_t             rpu_ramask;
+    uint8_t             rpu_raflags;
+    uint32_t            rpu_vltime;
+    uint32_t            rpu_pltime;
+    uint32_t            rpu_flags;
+    struct in6_addr     rpu_prefix;
+  };
+
+#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK  0x20
+#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO    0x10
+
+#if BYTE_ORDER == BIG_ENDIAN
+# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000
+# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000
+#elif BYTE_ORDER == LITTLE_ENDIAN
+# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80
+# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40
+#endif
+
+struct rr_result       /* router renumbering result message */
+  {
+    uint16_t            rrr_flags;
+    uint8_t             rrr_ordinal;
+    uint8_t             rrr_matchedlen;
+    uint32_t            rrr_ifid;
+    struct in6_addr     rrr_prefix;
+  };
+
+#if BYTE_ORDER == BIG_ENDIAN
+# define ICMP6_RR_RESULT_FLAGS_OOB       0x0002
+# define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001
+#elif BYTE_ORDER == LITTLE_ENDIAN
+# define ICMP6_RR_RESULT_FLAGS_OOB       0x0200
+# define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100
+#endif
+
+/* Mobile IPv6 extension: Advertisement Interval.  */
+struct nd_opt_adv_interval
+  {
+    uint8_t   nd_opt_adv_interval_type;
+    uint8_t   nd_opt_adv_interval_len;
+    uint16_t  nd_opt_adv_interval_reserved;
+    uint32_t  nd_opt_adv_interval_ival;
+  };
+
+/* Mobile IPv6 extension: Home Agent Info.  */
+struct nd_opt_home_agent_info
+  {
+    uint8_t   nd_opt_home_agent_info_type;
+    uint8_t   nd_opt_home_agent_info_len;
+    uint16_t  nd_opt_home_agent_info_reserved;
+    uint16_t  nd_opt_home_agent_info_preference;
+    uint16_t  nd_opt_home_agent_info_lifetime;
+  };
+
+#endif /* netinet/icmpv6.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/netinet/igmp.h b/ap/libc/glibc/glibc-2.23/inet/netinet/igmp.h
new file mode 100644
index 0000000..fc7599e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/netinet/igmp.h
@@ -0,0 +1,125 @@
+/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _NETINET_IGMP_H
+#define	_NETINET_IGMP_H 1
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+#ifdef __USE_MISC
+
+#include <netinet/in.h>
+
+__BEGIN_DECLS
+
+/*
+ * Copyright (c) 1988 Stephen Deering.
+ * Copyright (c) 1992, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Stephen Deering of Stanford University.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)igmp.h	8.1 (Berkeley) 6/10/93
+ *	$FreeBSD$
+ */
+
+struct igmp {
+  u_int8_t igmp_type;             /* IGMP type */
+  u_int8_t igmp_code;             /* routing code */
+  u_int16_t igmp_cksum;           /* checksum */
+  struct in_addr igmp_group;      /* group address */
+};
+
+#define IGMP_MINLEN			8
+
+/*
+ * Message types, including version number.
+ */
+#define IGMP_MEMBERSHIP_QUERY   	0x11	/* membership query         */
+#define IGMP_V1_MEMBERSHIP_REPORT	0x12	/* Ver. 1 membership report */
+#define IGMP_V2_MEMBERSHIP_REPORT	0x16	/* Ver. 2 membership report */
+#define IGMP_V2_LEAVE_GROUP		0x17	/* Leave-group message	    */
+
+#define IGMP_DVMRP			0x13	/* DVMRP routing message    */
+#define IGMP_PIM			0x14	/* PIM routing message      */
+#define IGMP_TRACE			0x15
+
+#define IGMP_MTRACE_RESP		0x1e	/* traceroute resp.(to sender)*/
+#define IGMP_MTRACE			0x1f	/* mcast traceroute messages  */
+
+#define IGMP_MAX_HOST_REPORT_DELAY	10	/* max delay for response to     */
+						/*  query (in seconds) according */
+						/*  to RFC1112                   */
+#define IGMP_TIMER_SCALE		10	/* denotes that the igmp code field */
+						/* specifies time in 10th of seconds*/
+
+/*
+ * States for the IGMP v2 state table.
+ */
+#define IGMP_DELAYING_MEMBER	1
+#define IGMP_IDLE_MEMBER	2
+#define IGMP_LAZY_MEMBER	3
+#define IGMP_SLEEPING_MEMBER	4
+#define IGMP_AWAKENING_MEMBER	5
+
+/*
+ * States for IGMP router version cache.
+ */
+#define IGMP_v1_ROUTER		1
+#define IGMP_v2_ROUTER		2
+
+/*
+ * The following four defininitions are for backwards compatibility.
+ * They should be removed as soon as all applications are updated to
+ * use the new constant names.
+ */
+#define IGMP_HOST_MEMBERSHIP_QUERY	IGMP_MEMBERSHIP_QUERY
+#define IGMP_HOST_MEMBERSHIP_REPORT	IGMP_V1_MEMBERSHIP_REPORT
+#define IGMP_HOST_NEW_MEMBERSHIP_REPORT	IGMP_V2_MEMBERSHIP_REPORT
+#define IGMP_HOST_LEAVE_MESSAGE		IGMP_V2_LEAVE_GROUP
+
+__END_DECLS
+
+#endif
+
+#endif	/* netinet/igmp.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/netinet/in.h b/ap/libc/glibc/glibc-2.23/inet/netinet/in.h
new file mode 100644
index 0000000..6122ab5
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/netinet/in.h
@@ -0,0 +1,633 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef	_NETINET_IN_H
+#define	_NETINET_IN_H	1
+
+#include <features.h>
+#include <stdint.h>
+#include <sys/socket.h>
+#include <bits/types.h>
+
+
+__BEGIN_DECLS
+
+/* Internet address.  */
+typedef uint32_t in_addr_t;
+struct in_addr
+  {
+    in_addr_t s_addr;
+  };
+
+/* Get system-specific definitions.  */
+#include <bits/in.h>
+
+/* Standard well-defined IP protocols.  */
+enum
+  {
+    IPPROTO_IP = 0,	   /* Dummy protocol for TCP.  */
+#define IPPROTO_IP		IPPROTO_IP
+    IPPROTO_ICMP = 1,	   /* Internet Control Message Protocol.  */
+#define IPPROTO_ICMP		IPPROTO_ICMP
+    IPPROTO_IGMP = 2,	   /* Internet Group Management Protocol. */
+#define IPPROTO_IGMP		IPPROTO_IGMP
+    IPPROTO_IPIP = 4,	   /* IPIP tunnels (older KA9Q tunnels use 94).  */
+#define IPPROTO_IPIP		IPPROTO_IPIP
+    IPPROTO_TCP = 6,	   /* Transmission Control Protocol.  */
+#define IPPROTO_TCP		IPPROTO_TCP
+    IPPROTO_EGP = 8,	   /* Exterior Gateway Protocol.  */
+#define IPPROTO_EGP		IPPROTO_EGP
+    IPPROTO_PUP = 12,	   /* PUP protocol.  */
+#define IPPROTO_PUP		IPPROTO_PUP
+    IPPROTO_UDP = 17,	   /* User Datagram Protocol.  */
+#define IPPROTO_UDP		IPPROTO_UDP
+    IPPROTO_IDP = 22,	   /* XNS IDP protocol.  */
+#define IPPROTO_IDP		IPPROTO_IDP
+    IPPROTO_TP = 29,	   /* SO Transport Protocol Class 4.  */
+#define IPPROTO_TP		IPPROTO_TP
+    IPPROTO_DCCP = 33,	   /* Datagram Congestion Control Protocol.  */
+#define IPPROTO_DCCP		IPPROTO_DCCP
+    IPPROTO_IPV6 = 41,     /* IPv6 header.  */
+#define IPPROTO_IPV6		IPPROTO_IPV6
+    IPPROTO_RSVP = 46,	   /* Reservation Protocol.  */
+#define IPPROTO_RSVP		IPPROTO_RSVP
+    IPPROTO_GRE = 47,	   /* General Routing Encapsulation.  */
+#define IPPROTO_GRE		IPPROTO_GRE
+    IPPROTO_ESP = 50,      /* encapsulating security payload.  */
+#define IPPROTO_ESP		IPPROTO_ESP
+    IPPROTO_AH = 51,       /* authentication header.  */
+#define IPPROTO_AH		IPPROTO_AH
+    IPPROTO_MTP = 92,	   /* Multicast Transport Protocol.  */
+#define IPPROTO_MTP		IPPROTO_MTP
+    IPPROTO_BEETPH = 94,   /* IP option pseudo header for BEET.  */
+#define IPPROTO_BEETPH		IPPROTO_BEETPH
+    IPPROTO_ENCAP = 98,	   /* Encapsulation Header.  */
+#define IPPROTO_ENCAP		IPPROTO_ENCAP
+    IPPROTO_PIM = 103,	   /* Protocol Independent Multicast.  */
+#define IPPROTO_PIM		IPPROTO_PIM
+    IPPROTO_COMP = 108,	   /* Compression Header Protocol.  */
+#define IPPROTO_COMP		IPPROTO_COMP
+    IPPROTO_SCTP = 132,	   /* Stream Control Transmission Protocol.  */
+#define IPPROTO_SCTP		IPPROTO_SCTP
+    IPPROTO_UDPLITE = 136, /* UDP-Lite protocol.  */
+#define IPPROTO_UDPLITE		IPPROTO_UDPLITE
+    IPPROTO_MPLS = 137,    /* MPLS in IP.  */
+#define IPPROTO_MPLS		IPPROTO_MPLS
+    IPPROTO_RAW = 255,	   /* Raw IP packets.  */
+#define IPPROTO_RAW		IPPROTO_RAW
+    IPPROTO_MAX
+  };
+
+/* If __USE_KERNEL_IPV6_DEFS is defined then the user has included the kernel
+   network headers first and we should use those ABI-identical definitions
+   instead of our own.  */
+#ifndef __USE_KERNEL_IPV6_DEFS
+enum
+  {
+    IPPROTO_HOPOPTS = 0,   /* IPv6 Hop-by-Hop options.  */
+#define IPPROTO_HOPOPTS		IPPROTO_HOPOPTS
+    IPPROTO_ROUTING = 43,  /* IPv6 routing header.  */
+#define IPPROTO_ROUTING		IPPROTO_ROUTING
+    IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header.  */
+#define IPPROTO_FRAGMENT	IPPROTO_FRAGMENT
+    IPPROTO_ICMPV6 = 58,   /* ICMPv6.  */
+#define IPPROTO_ICMPV6		IPPROTO_ICMPV6
+    IPPROTO_NONE = 59,     /* IPv6 no next header.  */
+#define IPPROTO_NONE		IPPROTO_NONE
+    IPPROTO_DSTOPTS = 60,  /* IPv6 destination options.  */
+#define IPPROTO_DSTOPTS		IPPROTO_DSTOPTS
+    IPPROTO_MH = 135       /* IPv6 mobility header.  */
+#define IPPROTO_MH		IPPROTO_MH
+  };
+#endif /* !__USE_KERNEL_IPV6_DEFS */
+
+/* Type to represent a port.  */
+typedef uint16_t in_port_t;
+
+/* Standard well-known ports.  */
+enum
+  {
+    IPPORT_ECHO = 7,		/* Echo service.  */
+    IPPORT_DISCARD = 9,		/* Discard transmissions service.  */
+    IPPORT_SYSTAT = 11,		/* System status service.  */
+    IPPORT_DAYTIME = 13,	/* Time of day service.  */
+    IPPORT_NETSTAT = 15,	/* Network status service.  */
+    IPPORT_FTP = 21,		/* File Transfer Protocol.  */
+    IPPORT_TELNET = 23,		/* Telnet protocol.  */
+    IPPORT_SMTP = 25,		/* Simple Mail Transfer Protocol.  */
+    IPPORT_TIMESERVER = 37,	/* Timeserver service.  */
+    IPPORT_NAMESERVER = 42,	/* Domain Name Service.  */
+    IPPORT_WHOIS = 43,		/* Internet Whois service.  */
+    IPPORT_MTP = 57,
+
+    IPPORT_TFTP = 69,		/* Trivial File Transfer Protocol.  */
+    IPPORT_RJE = 77,
+    IPPORT_FINGER = 79,		/* Finger service.  */
+    IPPORT_TTYLINK = 87,
+    IPPORT_SUPDUP = 95,		/* SUPDUP protocol.  */
+
+
+    IPPORT_EXECSERVER = 512,	/* execd service.  */
+    IPPORT_LOGINSERVER = 513,	/* rlogind service.  */
+    IPPORT_CMDSERVER = 514,
+    IPPORT_EFSSERVER = 520,
+
+    /* UDP ports.  */
+    IPPORT_BIFFUDP = 512,
+    IPPORT_WHOSERVER = 513,
+    IPPORT_ROUTESERVER = 520,
+
+    /* Ports less than this value are reserved for privileged processes.  */
+    IPPORT_RESERVED = 1024,
+
+    /* Ports greater this value are reserved for (non-privileged) servers.  */
+    IPPORT_USERRESERVED = 5000
+  };
+
+/* Definitions of the bits in an Internet address integer.
+
+   On subnets, host and network parts are found according to
+   the subnet mask, not these masks.  */
+
+#define	IN_CLASSA(a)		((((in_addr_t)(a)) & 0x80000000) == 0)
+#define	IN_CLASSA_NET		0xff000000
+#define	IN_CLASSA_NSHIFT	24
+#define	IN_CLASSA_HOST		(0xffffffff & ~IN_CLASSA_NET)
+#define	IN_CLASSA_MAX		128
+
+#define	IN_CLASSB(a)		((((in_addr_t)(a)) & 0xc0000000) == 0x80000000)
+#define	IN_CLASSB_NET		0xffff0000
+#define	IN_CLASSB_NSHIFT	16
+#define	IN_CLASSB_HOST		(0xffffffff & ~IN_CLASSB_NET)
+#define	IN_CLASSB_MAX		65536
+
+#define	IN_CLASSC(a)		((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000)
+#define	IN_CLASSC_NET		0xffffff00
+#define	IN_CLASSC_NSHIFT	8
+#define	IN_CLASSC_HOST		(0xffffffff & ~IN_CLASSC_NET)
+
+#define	IN_CLASSD(a)		((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000)
+#define	IN_MULTICAST(a)		IN_CLASSD(a)
+
+#define	IN_EXPERIMENTAL(a)	((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000)
+#define	IN_BADCLASS(a)		((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
+
+/* Address to accept any incoming messages.  */
+#define	INADDR_ANY		((in_addr_t) 0x00000000)
+/* Address to send to all hosts.  */
+#define	INADDR_BROADCAST	((in_addr_t) 0xffffffff)
+/* Address indicating an error return.  */
+#define	INADDR_NONE		((in_addr_t) 0xffffffff)
+
+/* Network number for local host loopback.  */
+#define	IN_LOOPBACKNET		127
+/* Address to loopback in software to local host.  */
+#ifndef INADDR_LOOPBACK
+# define INADDR_LOOPBACK	((in_addr_t) 0x7f000001) /* Inet 127.0.0.1.  */
+#endif
+
+/* Defines for Multicast INADDR.  */
+#define INADDR_UNSPEC_GROUP	((in_addr_t) 0xe0000000) /* 224.0.0.0 */
+#define INADDR_ALLHOSTS_GROUP	((in_addr_t) 0xe0000001) /* 224.0.0.1 */
+#define INADDR_ALLRTRS_GROUP    ((in_addr_t) 0xe0000002) /* 224.0.0.2 */
+#define INADDR_MAX_LOCAL_GROUP  ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */
+
+#ifndef __USE_KERNEL_IPV6_DEFS
+/* IPv6 address */
+struct in6_addr
+  {
+    union
+      {
+	uint8_t	__u6_addr8[16];
+#ifdef __USE_MISC
+	uint16_t __u6_addr16[8];
+	uint32_t __u6_addr32[4];
+#endif
+      } __in6_u;
+#define s6_addr			__in6_u.__u6_addr8
+#ifdef __USE_MISC
+# define s6_addr16		__in6_u.__u6_addr16
+# define s6_addr32		__in6_u.__u6_addr32
+#endif
+  };
+#endif /* !__USE_KERNEL_IPV6_DEFS */
+
+extern const struct in6_addr in6addr_any;        /* :: */
+extern const struct in6_addr in6addr_loopback;   /* ::1 */
+#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
+#define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
+
+#define INET_ADDRSTRLEN 16
+#define INET6_ADDRSTRLEN 46
+
+
+/* Structure describing an Internet socket address.  */
+struct sockaddr_in
+  {
+    __SOCKADDR_COMMON (sin_);
+    in_port_t sin_port;			/* Port number.  */
+    struct in_addr sin_addr;		/* Internet address.  */
+
+    /* Pad to size of `struct sockaddr'.  */
+    unsigned char sin_zero[sizeof (struct sockaddr) -
+			   __SOCKADDR_COMMON_SIZE -
+			   sizeof (in_port_t) -
+			   sizeof (struct in_addr)];
+  };
+
+#ifndef __USE_KERNEL_IPV6_DEFS
+/* Ditto, for IPv6.  */
+struct sockaddr_in6
+  {
+    __SOCKADDR_COMMON (sin6_);
+    in_port_t sin6_port;	/* Transport layer port # */
+    uint32_t sin6_flowinfo;	/* IPv6 flow information */
+    struct in6_addr sin6_addr;	/* IPv6 address */
+    uint32_t sin6_scope_id;	/* IPv6 scope-id */
+  };
+#endif /* !__USE_KERNEL_IPV6_DEFS */
+
+#ifdef __USE_MISC
+/* IPv4 multicast request.  */
+struct ip_mreq
+  {
+    /* IP multicast address of group.  */
+    struct in_addr imr_multiaddr;
+
+    /* Local IP address of interface.  */
+    struct in_addr imr_interface;
+  };
+
+struct ip_mreq_source
+  {
+    /* IP multicast address of group.  */
+    struct in_addr imr_multiaddr;
+
+    /* IP address of source.  */
+    struct in_addr imr_interface;
+
+    /* IP address of interface.  */
+    struct in_addr imr_sourceaddr;
+  };
+#endif
+
+#ifndef __USE_KERNEL_IPV6_DEFS
+/* Likewise, for IPv6.  */
+struct ipv6_mreq
+  {
+    /* IPv6 multicast address of group */
+    struct in6_addr ipv6mr_multiaddr;
+
+    /* local interface */
+    unsigned int ipv6mr_interface;
+  };
+#endif /* !__USE_KERNEL_IPV6_DEFS */
+
+#ifdef __USE_MISC
+/* Multicast group request.  */
+struct group_req
+  {
+    /* Interface index.  */
+    uint32_t gr_interface;
+
+    /* Group address.  */
+    struct sockaddr_storage gr_group;
+  };
+
+struct group_source_req
+  {
+    /* Interface index.  */
+    uint32_t gsr_interface;
+
+    /* Group address.  */
+    struct sockaddr_storage gsr_group;
+
+    /* Source address.  */
+    struct sockaddr_storage gsr_source;
+  };
+
+
+/* Full-state filter operations.  */
+struct ip_msfilter
+  {
+    /* IP multicast address of group.  */
+    struct in_addr imsf_multiaddr;
+
+    /* Local IP address of interface.  */
+    struct in_addr imsf_interface;
+
+    /* Filter mode.  */
+    uint32_t imsf_fmode;
+
+    /* Number of source addresses.  */
+    uint32_t imsf_numsrc;
+    /* Source addresses.  */
+    struct in_addr imsf_slist[1];
+  };
+
+#define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \
+				  - sizeof (struct in_addr)		      \
+				  + (numsrc) * sizeof (struct in_addr))
+
+struct group_filter
+  {
+    /* Interface index.  */
+    uint32_t gf_interface;
+
+    /* Group address.  */
+    struct sockaddr_storage gf_group;
+
+    /* Filter mode.  */
+    uint32_t gf_fmode;
+
+    /* Number of source addresses.  */
+    uint32_t gf_numsrc;
+    /* Source addresses.  */
+    struct sockaddr_storage gf_slist[1];
+};
+
+#define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \
+				   - sizeof (struct sockaddr_storage)	      \
+				   + ((numsrc)				      \
+				      * sizeof (struct sockaddr_storage)))
+#endif
+
+/* Functions to convert between host and network byte order.
+
+   Please note that these functions normally take `unsigned long int' or
+   `unsigned short int' values as arguments and also return them.  But
+   this was a short-sighted decision since on different systems the types
+   may have different representations but the values are always the same.  */
+
+extern uint32_t ntohl (uint32_t __netlong) __THROW __attribute__ ((__const__));
+extern uint16_t ntohs (uint16_t __netshort)
+     __THROW __attribute__ ((__const__));
+extern uint32_t htonl (uint32_t __hostlong)
+     __THROW __attribute__ ((__const__));
+extern uint16_t htons (uint16_t __hostshort)
+     __THROW __attribute__ ((__const__));
+
+#include <endian.h>
+
+/* Get machine dependent optimized versions of byte swapping functions.  */
+#include <bits/byteswap.h>
+
+#ifdef __OPTIMIZE__
+/* We can optimize calls to the conversion functions.  Either nothing has
+   to be done or we are using directly the byte-swapping functions which
+   often can be inlined.  */
+# if __BYTE_ORDER == __BIG_ENDIAN
+/* The host byte order is the same as network byte order,
+   so these functions are all just identity.  */
+# define ntohl(x)	(x)
+# define ntohs(x)	(x)
+# define htonl(x)	(x)
+# define htons(x)	(x)
+# else
+#  if __BYTE_ORDER == __LITTLE_ENDIAN
+#   define ntohl(x)	__bswap_32 (x)
+#   define ntohs(x)	__bswap_16 (x)
+#   define htonl(x)	__bswap_32 (x)
+#   define htons(x)	__bswap_16 (x)
+#  endif
+# endif
+#endif
+
+#ifdef __GNUC__
+# define IN6_IS_ADDR_UNSPECIFIED(a) \
+  (__extension__							      \
+   ({ const struct in6_addr *__a = (const struct in6_addr *) (a);	      \
+      __a->s6_addr32[0] == 0						      \
+      && __a->s6_addr32[1] == 0						      \
+      && __a->s6_addr32[2] == 0						      \
+      && __a->s6_addr32[3] == 0; }))
+
+# define IN6_IS_ADDR_LOOPBACK(a) \
+  (__extension__							      \
+   ({ const struct in6_addr *__a = (const struct in6_addr *) (a);	      \
+      __a->s6_addr32[0] == 0						      \
+      && __a->s6_addr32[1] == 0						      \
+      && __a->s6_addr32[2] == 0						      \
+      && __a->s6_addr32[3] == htonl (1); }))
+
+# define IN6_IS_ADDR_LINKLOCAL(a) \
+  (__extension__							      \
+   ({ const struct in6_addr *__a = (const struct in6_addr *) (a);	      \
+      (__a->s6_addr32[0] & htonl (0xffc00000)) == htonl (0xfe800000); }))
+
+# define IN6_IS_ADDR_SITELOCAL(a) \
+  (__extension__							      \
+   ({ const struct in6_addr *__a = (const struct in6_addr *) (a);	      \
+      (__a->s6_addr32[0] & htonl (0xffc00000)) == htonl (0xfec00000); }))
+
+# define IN6_IS_ADDR_V4MAPPED(a) \
+  (__extension__							      \
+   ({ const struct in6_addr *__a = (const struct in6_addr *) (a);	      \
+      __a->s6_addr32[0] == 0						      \
+      && __a->s6_addr32[1] == 0						      \
+      && __a->s6_addr32[2] == htonl (0xffff); }))
+
+# define IN6_IS_ADDR_V4COMPAT(a) \
+  (__extension__							      \
+   ({ const struct in6_addr *__a = (const struct in6_addr *) (a);	      \
+      __a->s6_addr32[0] == 0						      \
+      && __a->s6_addr32[1] == 0						      \
+      && __a->s6_addr32[2] == 0						      \
+      && ntohl (__a->s6_addr32[3]) > 1; }))
+
+# define IN6_ARE_ADDR_EQUAL(a,b) \
+  (__extension__							      \
+   ({ const struct in6_addr *__a = (const struct in6_addr *) (a);	      \
+      const struct in6_addr *__b = (const struct in6_addr *) (b);	      \
+      __a->s6_addr32[0] == __b->s6_addr32[0]				      \
+      && __a->s6_addr32[1] == __b->s6_addr32[1]				      \
+      && __a->s6_addr32[2] == __b->s6_addr32[2]				      \
+      && __a->s6_addr32[3] == __b->s6_addr32[3]; }))
+#else
+# define IN6_IS_ADDR_UNSPECIFIED(a) \
+	(((const uint32_t *) (a))[0] == 0				      \
+	 && ((const uint32_t *) (a))[1] == 0				      \
+	 && ((const uint32_t *) (a))[2] == 0				      \
+	 && ((const uint32_t *) (a))[3] == 0)
+
+# define IN6_IS_ADDR_LOOPBACK(a) \
+	(((const uint32_t *) (a))[0] == 0				      \
+	 && ((const uint32_t *) (a))[1] == 0				      \
+	 && ((const uint32_t *) (a))[2] == 0				      \
+	 && ((const uint32_t *) (a))[3] == htonl (1))
+
+# define IN6_IS_ADDR_LINKLOCAL(a) \
+	((((const uint32_t *) (a))[0] & htonl (0xffc00000))		      \
+	 == htonl (0xfe800000))
+
+# define IN6_IS_ADDR_SITELOCAL(a) \
+	((((const uint32_t *) (a))[0] & htonl (0xffc00000))		      \
+	 == htonl (0xfec00000))
+
+# define IN6_IS_ADDR_V4MAPPED(a) \
+	((((const uint32_t *) (a))[0] == 0)				      \
+	 && (((const uint32_t *) (a))[1] == 0)				      \
+	 && (((const uint32_t *) (a))[2] == htonl (0xffff)))
+
+# define IN6_IS_ADDR_V4COMPAT(a) \
+	((((const uint32_t *) (a))[0] == 0)				      \
+	 && (((const uint32_t *) (a))[1] == 0)				      \
+	 && (((const uint32_t *) (a))[2] == 0)				      \
+	 && (ntohl (((const uint32_t *) (a))[3]) > 1))
+
+# define IN6_ARE_ADDR_EQUAL(a,b) \
+	((((const uint32_t *) (a))[0] == ((const uint32_t *) (b))[0])	      \
+	 && (((const uint32_t *) (a))[1] == ((const uint32_t *) (b))[1])      \
+	 && (((const uint32_t *) (a))[2] == ((const uint32_t *) (b))[2])      \
+	 && (((const uint32_t *) (a))[3] == ((const uint32_t *) (b))[3]))
+#endif
+
+#define IN6_IS_ADDR_MULTICAST(a) (((const uint8_t *) (a))[0] == 0xff)
+
+#ifdef __USE_MISC
+/* Bind socket to a privileged IP port.  */
+extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __THROW;
+
+/* The IPv6 version of this function.  */
+extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
+     __THROW;
+#endif
+
+
+#define IN6_IS_ADDR_MC_NODELOCAL(a) \
+	(IN6_IS_ADDR_MULTICAST(a)					      \
+	 && ((((const uint8_t *) (a))[1] & 0xf) == 0x1))
+
+#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
+	(IN6_IS_ADDR_MULTICAST(a)					      \
+	 && ((((const uint8_t *) (a))[1] & 0xf) == 0x2))
+
+#define IN6_IS_ADDR_MC_SITELOCAL(a) \
+	(IN6_IS_ADDR_MULTICAST(a)					      \
+	 && ((((const uint8_t *) (a))[1] & 0xf) == 0x5))
+
+#define IN6_IS_ADDR_MC_ORGLOCAL(a) \
+	(IN6_IS_ADDR_MULTICAST(a)					      \
+	 && ((((const uint8_t *) (a))[1] & 0xf) == 0x8))
+
+#define IN6_IS_ADDR_MC_GLOBAL(a) \
+	(IN6_IS_ADDR_MULTICAST(a)					      \
+	 && ((((const uint8_t *) (a))[1] & 0xf) == 0xe))
+
+
+#ifdef __USE_GNU
+struct cmsghdr;			/* Forward declaration.  */
+
+#ifndef __USE_KERNEL_IPV6_DEFS
+/* IPv6 packet information.  */
+struct in6_pktinfo
+  {
+    struct in6_addr ipi6_addr;	/* src/dst IPv6 address */
+    unsigned int ipi6_ifindex;	/* send/recv interface index */
+  };
+
+/* IPv6 MTU information.  */
+struct ip6_mtuinfo
+  {
+    struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
+    uint32_t ip6m_mtu;		   /* path MTU in host byte order */
+  };
+#endif /* !__USE_KERNEL_IPV6_DEFS */
+
+/* Obsolete hop-by-hop and Destination Options Processing (RFC 2292).  */
+extern int inet6_option_space (int __nbytes)
+     __THROW __attribute_deprecated__;
+extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp,
+			      int __type) __THROW __attribute_deprecated__;
+extern int inet6_option_append (struct cmsghdr *__cmsg,
+				const uint8_t *__typep, int __multx,
+				int __plusy) __THROW __attribute_deprecated__;
+extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen,
+				    int __multx, int __plusy)
+     __THROW __attribute_deprecated__;
+extern int inet6_option_next (const struct cmsghdr *__cmsg,
+			      uint8_t **__tptrp)
+     __THROW __attribute_deprecated__;
+extern int inet6_option_find (const struct cmsghdr *__cmsg,
+			      uint8_t **__tptrp, int __type)
+     __THROW __attribute_deprecated__;
+
+
+/* Hop-by-Hop and Destination Options Processing (RFC 3542).  */
+extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) __THROW;
+extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset,
+			     uint8_t __type, socklen_t __len, uint8_t __align,
+			     void **__databufp) __THROW;
+extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset)
+     __THROW;
+extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val,
+			      socklen_t __vallen) __THROW;
+extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset,
+			   uint8_t *__typep, socklen_t *__lenp,
+			   void **__databufp) __THROW;
+extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset,
+			   uint8_t __type, socklen_t *__lenp,
+			   void **__databufp) __THROW;
+extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val,
+			      socklen_t __vallen) __THROW;
+
+
+/* Routing Header Option (RFC 3542).  */
+extern socklen_t inet6_rth_space (int __type, int __segments) __THROW;
+extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type,
+			     int __segments) __THROW;
+extern int inet6_rth_add (void *__bp, const struct in6_addr *__addr) __THROW;
+extern int inet6_rth_reverse (const void *__in, void *__out) __THROW;
+extern int inet6_rth_segments (const void *__bp) __THROW;
+extern struct in6_addr *inet6_rth_getaddr (const void *__bp, int __index)
+     __THROW;
+
+
+/* Multicast source filter support.  */
+
+/* Get IPv4 source filter.  */
+extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr,
+				struct in_addr __group, uint32_t *__fmode,
+				uint32_t *__numsrc, struct in_addr *__slist)
+     __THROW;
+
+/* Set IPv4 source filter.  */
+extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr,
+				struct in_addr __group, uint32_t __fmode,
+				uint32_t __numsrc,
+				const struct in_addr *__slist)
+     __THROW;
+
+
+/* Get source filter.  */
+extern int getsourcefilter (int __s, uint32_t __interface_addr,
+			    const struct sockaddr *__group,
+			    socklen_t __grouplen, uint32_t *__fmode,
+			    uint32_t *__numsrc,
+			    struct sockaddr_storage *__slist) __THROW;
+
+/* Set source filter.  */
+extern int setsourcefilter (int __s, uint32_t __interface_addr,
+			    const struct sockaddr *__group,
+			    socklen_t __grouplen, uint32_t __fmode,
+			    uint32_t __numsrc,
+			    const struct sockaddr_storage *__slist) __THROW;
+#endif	/* use GNU */
+
+__END_DECLS
+
+#endif	/* netinet/in.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/netinet/ip6.h b/ap/libc/glibc/glibc-2.23/inet/netinet/ip6.h
new file mode 100644
index 0000000..929d4b5
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/netinet/ip6.h
@@ -0,0 +1,188 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _NETINET_IP6_H
+#define _NETINET_IP6_H 1
+
+#include <inttypes.h>
+#include <netinet/in.h>
+
+struct ip6_hdr
+  {
+    union
+      {
+	struct ip6_hdrctl
+	  {
+	    uint32_t ip6_un1_flow;   /* 4 bits version, 8 bits TC,
+					20 bits flow-ID */
+	    uint16_t ip6_un1_plen;   /* payload length */
+	    uint8_t  ip6_un1_nxt;    /* next header */
+	    uint8_t  ip6_un1_hlim;   /* hop limit */
+	  } ip6_un1;
+	uint8_t ip6_un2_vfc;       /* 4 bits version, top 4 bits tclass */
+      } ip6_ctlun;
+    struct in6_addr ip6_src;      /* source address */
+    struct in6_addr ip6_dst;      /* destination address */
+  };
+
+#define ip6_vfc   ip6_ctlun.ip6_un2_vfc
+#define ip6_flow  ip6_ctlun.ip6_un1.ip6_un1_flow
+#define ip6_plen  ip6_ctlun.ip6_un1.ip6_un1_plen
+#define ip6_nxt   ip6_ctlun.ip6_un1.ip6_un1_nxt
+#define ip6_hlim  ip6_ctlun.ip6_un1.ip6_un1_hlim
+#define ip6_hops  ip6_ctlun.ip6_un1.ip6_un1_hlim
+
+/* Generic extension header.  */
+struct ip6_ext
+  {
+    uint8_t  ip6e_nxt;		/* next header.  */
+    uint8_t  ip6e_len;		/* length in units of 8 octets.  */
+  };
+
+/* Hop-by-Hop options header.  */
+struct ip6_hbh
+  {
+    uint8_t  ip6h_nxt;		/* next header.  */
+    uint8_t  ip6h_len;		/* length in units of 8 octets.  */
+    /* followed by options */
+  };
+
+/* Destination options header */
+struct ip6_dest
+  {
+    uint8_t  ip6d_nxt;		/* next header */
+    uint8_t  ip6d_len;		/* length in units of 8 octets */
+    /* followed by options */
+  };
+
+/* Routing header */
+struct ip6_rthdr
+  {
+    uint8_t  ip6r_nxt;		/* next header */
+    uint8_t  ip6r_len;		/* length in units of 8 octets */
+    uint8_t  ip6r_type;		/* routing type */
+    uint8_t  ip6r_segleft;	/* segments left */
+    /* followed by routing type specific data */
+  };
+
+/* Type 0 Routing header */
+struct ip6_rthdr0
+  {
+    uint8_t  ip6r0_nxt;		/* next header */
+    uint8_t  ip6r0_len;		/* length in units of 8 octets */
+    uint8_t  ip6r0_type;	/* always zero */
+    uint8_t  ip6r0_segleft;	/* segments left */
+    uint8_t  ip6r0_reserved;	/* reserved field */
+    uint8_t  ip6r0_slmap[3];	/* strict/loose bit map */
+    /* followed by up to 127 struct in6_addr */
+    struct in6_addr ip6r0_addr[0];
+  };
+
+/* Fragment header */
+struct ip6_frag
+  {
+    uint8_t   ip6f_nxt;		/* next header */
+    uint8_t   ip6f_reserved;	/* reserved field */
+    uint16_t  ip6f_offlg;	/* offset, reserved, and flag */
+    uint32_t  ip6f_ident;	/* identification */
+  };
+
+#if BYTE_ORDER == BIG_ENDIAN
+# define IP6F_OFF_MASK       0xfff8  /* mask out offset from _offlg */
+# define IP6F_RESERVED_MASK  0x0006  /* reserved bits in ip6f_offlg */
+# define IP6F_MORE_FRAG      0x0001  /* more-fragments flag */
+#else   /* BYTE_ORDER == LITTLE_ENDIAN */
+# define IP6F_OFF_MASK       0xf8ff  /* mask out offset from _offlg */
+# define IP6F_RESERVED_MASK  0x0600  /* reserved bits in ip6f_offlg */
+# define IP6F_MORE_FRAG      0x0100  /* more-fragments flag */
+#endif
+
+/* IPv6 options */
+struct ip6_opt
+  {
+    uint8_t  ip6o_type;
+    uint8_t  ip6o_len;
+  };
+
+/* The high-order 3 bits of the option type define the behavior
+ * when processing an unknown option and whether or not the option
+ * content changes in flight.
+ */
+#define IP6OPT_TYPE(o)		((o) & 0xc0)
+#define IP6OPT_TYPE_SKIP	0x00
+#define IP6OPT_TYPE_DISCARD	0x40
+#define IP6OPT_TYPE_FORCEICMP	0x80
+#define IP6OPT_TYPE_ICMP	0xc0
+#define IP6OPT_TYPE_MUTABLE	0x20
+
+/* Special option types for padding.  */
+#define IP6OPT_PAD1	0
+#define IP6OPT_PADN	1
+
+#define IP6OPT_JUMBO		0xc2
+#define IP6OPT_NSAP_ADDR	0xc3
+#define IP6OPT_TUNNEL_LIMIT	0x04
+#define IP6OPT_ROUTER_ALERT	0x05
+
+/* Jumbo Payload Option */
+struct ip6_opt_jumbo
+  {
+    uint8_t  ip6oj_type;
+    uint8_t  ip6oj_len;
+    uint8_t  ip6oj_jumbo_len[4];
+  };
+#define IP6OPT_JUMBO_LEN	6
+
+/* NSAP Address Option */
+struct ip6_opt_nsap
+  {
+    uint8_t  ip6on_type;
+    uint8_t  ip6on_len;
+    uint8_t  ip6on_src_nsap_len;
+    uint8_t  ip6on_dst_nsap_len;
+      /* followed by source NSAP */
+      /* followed by destination NSAP */
+  };
+
+/* Tunnel Limit Option */
+struct ip6_opt_tunnel
+  {
+    uint8_t  ip6ot_type;
+    uint8_t  ip6ot_len;
+    uint8_t  ip6ot_encap_limit;
+  };
+
+/* Router Alert Option */
+struct ip6_opt_router
+  {
+    uint8_t  ip6or_type;
+    uint8_t  ip6or_len;
+    uint8_t  ip6or_value[2];
+  };
+
+/* Router alert values (in network byte order) */
+#if BYTE_ORDER == BIG_ENDIAN
+# define IP6_ALERT_MLD	0x0000
+# define IP6_ALERT_RSVP	0x0001
+# define IP6_ALERT_AN	0x0002
+#else /* BYTE_ORDER == LITTLE_ENDING */
+# define IP6_ALERT_MLD	0x0000
+# define IP6_ALERT_RSVP	0x0100
+# define IP6_ALERT_AN	0x0200
+#endif
+
+#endif /* netinet/ip6.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/protocols/routed.h b/ap/libc/glibc/glibc-2.23/inet/protocols/routed.h
new file mode 100644
index 0000000..befd865
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/protocols/routed.h
@@ -0,0 +1,101 @@
+/*-
+ * Copyright (c) 1983, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)routed.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _PROTOCOLS_ROUTED_H
+#define	_PROTOCOLS_ROUTED_H 1
+
+#include <sys/socket.h>
+/*
+ * Routing Information Protocol
+ *
+ * Derived from Xerox NS Routing Information Protocol
+ * by changing 32-bit net numbers to sockaddr's and
+ * padding stuff to 32-bit boundaries.
+ */
+#define	RIPVERSION	1
+
+struct netinfo {
+	struct	sockaddr rip_dst;	/* destination net/host */
+	int	rip_metric;		/* cost of route */
+};
+
+struct rip {
+	u_char	rip_cmd;		/* request/response */
+	u_char	rip_vers;		/* protocol version # */
+	u_char	rip_res1[2];		/* pad to 32-bit boundary */
+	union {
+		struct	netinfo ru_nets[1];	/* variable length... */
+		char	ru_tracefile[1];	/* ditto ... */
+	} ripun;
+#define	rip_nets	ripun.ru_nets
+#define	rip_tracefile	ripun.ru_tracefile
+};
+
+/*
+ * Packet types.
+ */
+#define	RIPCMD_REQUEST		1	/* want info */
+#define	RIPCMD_RESPONSE		2	/* responding to request */
+#define	RIPCMD_TRACEON		3	/* turn tracing on */
+#define	RIPCMD_TRACEOFF		4	/* turn it off */
+
+#define	RIPCMD_MAX		5
+#ifdef RIPCMDS
+char *ripcmds[RIPCMD_MAX] =
+  { "#0", "REQUEST", "RESPONSE", "TRACEON", "TRACEOFF" };
+#endif
+
+#define	HOPCNT_INFINITY		16	/* per Xerox NS */
+#define	MAXPACKETSIZE		512	/* max broadcast size */
+
+/*
+ * Timer values used in managing the routing table.
+ * Complete tables are broadcast every SUPPLY_INTERVAL seconds.
+ * If changes occur between updates, dynamic updates containing only changes
+ * may be sent.  When these are sent, a timer is set for a random value
+ * between MIN_WAITTIME and MAX_WAITTIME, and no additional dynamic updates
+ * are sent until the timer expires.
+ *
+ * Every update of a routing entry forces an entry's timer to be reset.
+ * After EXPIRE_TIME without updates, the entry is marked invalid,
+ * but held onto until GARBAGE_TIME so that others may
+ * see it "be deleted".
+ */
+#define	TIMER_RATE		30	/* alarm clocks every 30 seconds */
+
+#define	SUPPLY_INTERVAL		30	/* time to supply tables */
+#define	MIN_WAITTIME		2	/* min. interval to broadcast changes */
+#define	MAX_WAITTIME		5	/* max. time to delay changes */
+
+#define	EXPIRE_TIME		180	/* time to mark entry invalid */
+#define	GARBAGE_TIME		240	/* time to garbage collect */
+
+#endif /* protocols/routed.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/protocols/rwhod.h b/ap/libc/glibc/glibc-2.23/inet/protocols/rwhod.h
new file mode 100644
index 0000000..446d6f9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/protocols/rwhod.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 1983, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)rwhod.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _PROTOCOLS_RWHOD_H
+#define	_PROTOCOLS_RWHOD_H 1
+
+#include <sys/types.h>
+
+/*
+ * rwho protocol packet format.
+ */
+struct	outmp {
+	char	out_line[8];		/* tty name */
+	char	out_name[8];		/* user id */
+	int32_t	out_time;		/* time on */
+};
+
+struct	whod {
+	char	wd_vers;		/* protocol version # */
+	char	wd_type;		/* packet type, see below */
+	char	wd_pad[2];
+	int	wd_sendtime;		/* time stamp by sender */
+	int	wd_recvtime;		/* time stamp applied by receiver */
+	char	wd_hostname[32];	/* hosts's name */
+	int	wd_loadav[3];		/* load average as in uptime */
+	int	wd_boottime;		/* time system booted */
+	struct	whoent {
+		struct	outmp we_utmp;	/* active tty info */
+		int	we_idle;	/* tty idle time */
+	} wd_we[1024 / sizeof (struct whoent)];
+};
+
+#define	WHODVERSION	1
+#define	WHODTYPE_STATUS	1		/* host status */
+
+/* We used to define _PATH_RWHODIR here but it's now in <paths.h>.  */
+#include <paths.h>
+
+#endif /* protocols/rwhod.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/protocols/talkd.h b/ap/libc/glibc/glibc-2.23/inet/protocols/talkd.h
new file mode 100644
index 0000000..a8f33b1
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/protocols/talkd.h
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 1983, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)talkd.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _PROTOCOLS_TALKD_H
+#define	_PROTOCOLS_TALKD_H 1
+
+/*
+ * This describes the protocol used by the talk server and clients.
+ *
+ * The talk server acts a repository of invitations, responding to
+ * requests by clients wishing to rendezvous for the purpose of
+ * holding a conversation.  In normal operation, a client, the caller,
+ * initiates a rendezvous by sending a CTL_MSG to the server of
+ * type LOOK_UP.  This causes the server to search its invitation
+ * tables to check if an invitation currently exists for the caller
+ * (to speak to the callee specified in the message).  If the lookup
+ * fails, the caller then sends an ANNOUNCE message causing the server
+ * to broadcast an announcement on the callee's login ports requesting
+ * contact.  When the callee responds, the local server uses the
+ * recorded invitation to respond with the appropriate rendezvous
+ * address and the caller and callee client programs establish a
+ * stream connection through which the conversation takes place.
+ */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+/*
+ * Client->server request message format.
+ */
+typedef struct {
+	u_char	vers;		/* protocol version */
+	u_char	type;		/* request type, see below */
+	u_char	answer;		/* not used */
+	u_char	pad;
+	u_int32_t id_num;	/* message id */
+	struct	osockaddr addr;		/* old (4.3) style */
+	struct	osockaddr ctl_addr;	/* old (4.3) style */
+	int32_t	pid;		/* caller's process id */
+#define	NAME_SIZE	12
+	char	l_name[NAME_SIZE];/* caller's name */
+	char	r_name[NAME_SIZE];/* callee's name */
+#define	TTY_SIZE	16
+	char	r_tty[TTY_SIZE];/* callee's tty name */
+} CTL_MSG;
+
+/*
+ * Server->client response message format.
+ */
+typedef struct {
+	u_char	vers;		/* protocol version */
+	u_char	type;		/* type of request message, see below */
+	u_char	answer;		/* response to request message, see below */
+	u_char	pad;
+	u_int32_t id_num;	/* message id */
+	struct	osockaddr addr;	/* address for establishing conversation */
+} CTL_RESPONSE;
+
+#define	TALK_VERSION	1		/* protocol version */
+
+/* message type values */
+#define LEAVE_INVITE	0	/* leave invitation with server */
+#define LOOK_UP		1	/* check for invitation by callee */
+#define DELETE		2	/* delete invitation by caller */
+#define ANNOUNCE	3	/* announce invitation by caller */
+
+/* answer values */
+#define SUCCESS		0	/* operation completed properly */
+#define NOT_HERE	1	/* callee not logged in */
+#define FAILED		2	/* operation failed for unexplained reason */
+#define MACHINE_UNKNOWN	3	/* caller's machine name unknown */
+#define PERMISSION_DENIED 4	/* callee's tty doesn't permit announce */
+#define UNKNOWN_REQUEST	5	/* request has invalid type value */
+#define	BADVERSION	6	/* request has invalid protocol version */
+#define	BADADDR		7	/* request has invalid addr value */
+#define	BADCTLADDR	8	/* request has invalid ctl_addr value */
+
+/*
+ * Operational parameters.
+ */
+#define MAX_LIFE	60	/* max time daemon saves invitations */
+/* RING_WAIT should be 10's of seconds less than MAX_LIFE */
+#define RING_WAIT	30	/* time to wait before resending invitation */
+
+#endif /* protocols/talkd.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/protocols/timed.h b/ap/libc/glibc/glibc-2.23/inet/protocols/timed.h
new file mode 100644
index 0000000..b5d4702
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/protocols/timed.h
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 1983, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)timed.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef	_PROTOCOLS_TIMED_H
+#define	_PROTOCOLS_TIMED_H 1
+
+#include <sys/types.h>
+#include <sys/time.h>
+
+/*
+ * Time Synchronization Protocol
+ */
+
+#define	TSPVERSION	1
+#define ANYADDR 	NULL
+#define MAXHOSTNAMELEN	64
+
+struct tsp {
+	u_char	tsp_type;
+	u_char	tsp_vers;
+	u_short	tsp_seq;
+	union {
+		struct timeval tspu_time;
+		char tspu_hopcnt;
+	} tsp_u;
+	char tsp_name[MAXHOSTNAMELEN];
+};
+
+#define	tsp_time	tsp_u.tspu_time
+#define	tsp_hopcnt	tsp_u.tspu_hopcnt
+
+/*
+ * Command types.
+ */
+#define	TSP_ANY			0	/* match any types */
+#define	TSP_ADJTIME		1	/* send adjtime */
+#define	TSP_ACK			2	/* generic acknowledgement */
+#define	TSP_MASTERREQ		3	/* ask for master's name */
+#define	TSP_MASTERACK		4	/* acknowledge master request */
+#define	TSP_SETTIME		5	/* send network time */
+#define	TSP_MASTERUP		6	/* inform slaves that master is up */
+#define	TSP_SLAVEUP		7	/* slave is up but not polled */
+#define	TSP_ELECTION		8	/* advance candidature for master */
+#define	TSP_ACCEPT		9	/* support candidature of master */
+#define	TSP_REFUSE		10	/* reject candidature of master */
+#define	TSP_CONFLICT		11	/* two or more masters present */
+#define	TSP_RESOLVE		12	/* masters' conflict resolution */
+#define	TSP_QUIT		13	/* reject candidature if master is up */
+#define	TSP_DATE		14	/* reset the time (date command) */
+#define	TSP_DATEREQ		15	/* remote request to reset the time */
+#define	TSP_DATEACK		16	/* acknowledge time setting  */
+#define	TSP_TRACEON		17	/* turn tracing on */
+#define	TSP_TRACEOFF		18	/* turn tracing off */
+#define	TSP_MSITE		19	/* find out master's site */
+#define	TSP_MSITEREQ		20	/* remote master's site request */
+#define	TSP_TEST		21	/* for testing election algo */
+#define	TSP_SETDATE		22	/* New from date command */
+#define	TSP_SETDATEREQ		23	/* New remote for above */
+#define	TSP_LOOP		24	/* loop detection packet */
+
+#define	TSPTYPENUMBER		25
+
+#ifdef TSPTYPES
+char *tsptype[TSPTYPENUMBER] =
+  { "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP",
+  "SLAVEUP", "ELECTION", "ACCEPT", "REFUSE", "CONFLICT", "RESOLVE", "QUIT",
+  "DATE", "DATEREQ", "DATEACK", "TRACEON", "TRACEOFF", "MSITE", "MSITEREQ",
+  "TEST", "SETDATE", "SETDATEREQ", "LOOP" };
+#endif
+
+#endif /* protocols/timed.h */
diff --git a/ap/libc/glibc/glibc-2.23/inet/rcmd.c b/ap/libc/glibc/glibc-2.23/inet/rcmd.c
new file mode 100644
index 0000000..ace6b14
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/rcmd.c
@@ -0,0 +1,826 @@
+/*
+ * Copyright (C) 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/*
+ * Copyright (c) 1983, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)rcmd.c	8.3 (Berkeley) 3/26/94";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/param.h>
+#include <sys/poll.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <alloca.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <netdb.h>
+#include <unistd.h>
+#include <pwd.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <ctype.h>
+#include <string.h>
+#include <libintl.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <sys/uio.h>
+
+
+int __ivaliduser (FILE *, u_int32_t, const char *, const char *);
+static int __validuser2_sa (FILE *, struct sockaddr *, size_t,
+			    const char *, const char *, const char *);
+static int ruserok2_sa (struct sockaddr *ra, size_t ralen,
+			int superuser, const char *ruser,
+			const char *luser, const char *rhost);
+static int ruserok_sa (struct sockaddr *ra, size_t ralen,
+			int superuser, const char *ruser,
+			const char *luser);
+int iruserok_af (const void *raddr, int superuser, const char *ruser,
+		 const char *luser, sa_family_t af);
+int iruserok (u_int32_t raddr, int superuser, const char *ruser,
+	      const char *luser);
+
+libc_hidden_proto (iruserok_af)
+
+libc_freeres_ptr(static char *ahostbuf);
+
+int
+rcmd_af (char **ahost, u_short rport, const char *locuser, const char *remuser,
+	 const char *cmd, int *fd2p, sa_family_t af)
+{
+	char paddr[INET6_ADDRSTRLEN];
+	struct addrinfo hints, *res, *ai;
+	union
+	{
+		struct sockaddr sa;
+		struct sockaddr_storage ss;
+		struct sockaddr_in sin;
+		struct sockaddr_in6 sin6;
+	} from;
+	struct pollfd pfd[2];
+	int32_t oldmask;
+	pid_t pid;
+	int s, lport, timo, error;
+	char c;
+	int refused;
+	char num[8];
+	ssize_t n;
+
+	if (af != AF_INET && af != AF_INET6 && af != AF_UNSPEC)
+	  {
+	    __set_errno (EAFNOSUPPORT);
+	    return -1;
+	  }
+
+	pid = __getpid();
+
+	memset(&hints, '\0', sizeof(hints));
+	hints.ai_flags = AI_CANONNAME;
+	hints.ai_family = af;
+	hints.ai_socktype = SOCK_STREAM;
+	(void)__snprintf(num, sizeof(num), "%d", ntohs(rport));
+	error = getaddrinfo(*ahost, num, &hints, &res);
+	if (error) {
+		if (error == EAI_NONAME && *ahost != NULL)
+			__fxprintf(NULL, "%s: Unknown host\n", *ahost);
+		else
+			__fxprintf(NULL, "rcmd: getaddrinfo: %s\n",
+				   gai_strerror(error));
+
+		return -1;
+	}
+
+	pfd[0].events = POLLIN;
+	pfd[1].events = POLLIN;
+
+	if (res->ai_canonname){
+		free (ahostbuf);
+		ahostbuf = strdup (res->ai_canonname);
+		if (ahostbuf == NULL) {
+			__fxprintf(NULL, "%s",
+				   _("rcmd: Cannot allocate memory\n"));
+			return -1;
+		}
+		*ahost = ahostbuf;
+	} else
+		*ahost = NULL;
+	ai = res;
+	refused = 0;
+	oldmask = __sigblock(sigmask(SIGURG));
+	for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
+		char errbuf[200];
+
+		s = rresvport_af(&lport, ai->ai_family);
+		if (s < 0) {
+			if (errno == EAGAIN)
+				__fxprintf(NULL, "%s", _("\
+rcmd: socket: All ports in use\n"));
+			else
+				__fxprintf(NULL, "rcmd: socket: %m\n");
+
+			__sigsetmask(oldmask);
+			freeaddrinfo(res);
+			return -1;
+		}
+		__fcntl(s, F_SETOWN, pid);
+		if (__connect(s, ai->ai_addr, ai->ai_addrlen) >= 0)
+			break;
+		(void)__close(s);
+		if (errno == EADDRINUSE) {
+			lport--;
+			continue;
+		}
+		if (errno == ECONNREFUSED)
+			refused = 1;
+		if (ai->ai_next != NULL) {
+			int oerrno = errno;
+			char *buf = NULL;
+
+			getnameinfo(ai->ai_addr, ai->ai_addrlen,
+				    paddr, sizeof(paddr),
+				    NULL, 0,
+				    NI_NUMERICHOST);
+
+			if (__asprintf (&buf, _("connect to address %s: "),
+					paddr) >= 0)
+			  {
+			    __fxprintf(NULL, "%s", buf);
+			    free (buf);
+			  }
+			__set_errno (oerrno);
+			perror(0);
+			ai = ai->ai_next;
+			getnameinfo(ai->ai_addr, ai->ai_addrlen,
+				    paddr, sizeof(paddr),
+				    NULL, 0,
+				    NI_NUMERICHOST);
+			if (__asprintf (&buf, _("Trying %s...\n"), paddr) >= 0)
+			  {
+			    __fxprintf (NULL, "%s", buf);
+			    free (buf);
+			  }
+			continue;
+		}
+		if (refused && timo <= 16) {
+			(void)__sleep(timo);
+			timo *= 2;
+			ai = res;
+			refused = 0;
+			continue;
+		}
+		freeaddrinfo(res);
+		(void)__fxprintf(NULL, "%s: %s\n", *ahost,
+				 __strerror_r(errno, errbuf, sizeof (errbuf)));
+		__sigsetmask(oldmask);
+		return -1;
+	}
+	lport--;
+	if (fd2p == 0) {
+		__write(s, "", 1);
+		lport = 0;
+	} else {
+		char num[8];
+		int s2 = rresvport_af(&lport, ai->ai_family), s3;
+		socklen_t len = ai->ai_addrlen;
+
+		if (s2 < 0)
+			goto bad;
+		__listen(s2, 1);
+		(void)__snprintf(num, sizeof(num), "%d", lport);
+		if (__write(s, num, strlen(num)+1) != (ssize_t)strlen(num)+1) {
+			char *buf = NULL;
+
+			if (__asprintf (&buf, _("\
+rcmd: write (setting up stderr): %m\n")) >= 0)
+			  {
+			    __fxprintf(NULL, "%s", buf);
+			    free (buf);
+			  }
+			(void)__close(s2);
+			goto bad;
+		}
+		pfd[0].fd = s;
+		pfd[1].fd = s2;
+		__set_errno (0);
+		if (__poll (pfd, 2, -1) < 1 || (pfd[1].revents & POLLIN) == 0){
+			char *buf = NULL;
+
+			if ((errno != 0
+			     && __asprintf(&buf, _("\
+rcmd: poll (setting up stderr): %m\n")) >= 0)
+			    || (errno == 0
+				&& __asprintf(&buf, _("\
+poll: protocol failure in circuit setup\n")) >= 0))
+			  {
+			    __fxprintf (NULL, "%s", buf);
+			    free  (buf);
+			  }
+			(void)__close(s2);
+			goto bad;
+		}
+		s3 = TEMP_FAILURE_RETRY (accept(s2, &from.sa, &len));
+		switch (from.sa.sa_family) {
+		case AF_INET:
+			rport = ntohs(from.sin.sin_port);
+			break;
+		case AF_INET6:
+			rport = ntohs(from.sin6.sin6_port);
+			break;
+		default:
+			rport = 0;
+			break;
+		}
+		(void)__close(s2);
+		if (s3 < 0) {
+			(void)__fxprintf(NULL, "rcmd: accept: %m\n");
+			lport = 0;
+			goto bad;
+		}
+		*fd2p = s3;
+
+		if (rport >= IPPORT_RESERVED || rport < IPPORT_RESERVED / 2){
+			char *buf = NULL;
+
+			if (__asprintf(&buf, _("\
+socket: protocol failure in circuit setup\n")) >= 0)
+			  {
+			    __fxprintf (NULL, "%s", buf);
+			    free (buf);
+			  }
+			goto bad2;
+		}
+	}
+	struct iovec iov[3] =
+	  {
+	    [0] = { .iov_base = (void *) locuser,
+		    .iov_len = strlen (locuser) + 1 },
+	    [1] = { .iov_base = (void *) remuser,
+		    .iov_len = strlen (remuser) + 1 },
+	    [2] = { .iov_base = (void *) cmd,
+		    .iov_len = strlen (cmd) + 1 }
+	  };
+	(void) TEMP_FAILURE_RETRY (__writev (s, iov, 3));
+	n = TEMP_FAILURE_RETRY (__read(s, &c, 1));
+	if (n != 1) {
+		char *buf = NULL;
+
+		if ((n == 0
+		     && __asprintf(&buf, _("rcmd: %s: short read"),
+				   *ahost) >= 0)
+		    || (n != 0
+			&& __asprintf(&buf, "rcmd: %s: %m\n", *ahost) >= 0))
+		  {
+		    __fxprintf (NULL, "%s", buf);
+		    free (buf);
+		  }
+		goto bad2;
+	}
+	if (c != 0) {
+		while (__read(s, &c, 1) == 1) {
+			(void)__write(STDERR_FILENO, &c, 1);
+			if (c == '\n')
+				break;
+		}
+		goto bad2;
+	}
+	__sigsetmask(oldmask);
+	freeaddrinfo(res);
+	return s;
+bad2:
+	if (lport)
+		(void)__close(*fd2p);
+bad:
+	(void)__close(s);
+	__sigsetmask(oldmask);
+	freeaddrinfo(res);
+	return -1;
+}
+libc_hidden_def (rcmd_af)
+
+int
+rcmd (char **ahost, u_short rport, const char *locuser, const char *remuser,
+      const char *cmd, int *fd2p)
+{
+  return rcmd_af (ahost, rport, locuser, remuser, cmd, fd2p, AF_INET);
+}
+
+int
+rresvport_af (int *alport, sa_family_t family)
+{
+	union {
+		struct sockaddr generic;
+		struct sockaddr_in in;
+		struct sockaddr_in6 in6;
+	} ss;
+	int s;
+	size_t len;
+	uint16_t *sport;
+
+	switch(family){
+	case AF_INET:
+		len = sizeof(struct sockaddr_in);
+		sport = &ss.in.sin_port;
+		break;
+	case AF_INET6:
+		len = sizeof(struct sockaddr_in6);
+		sport = &ss.in6.sin6_port;
+		break;
+	default:
+		__set_errno (EAFNOSUPPORT);
+		return -1;
+	}
+	s = __socket(family, SOCK_STREAM, 0);
+	if (s < 0)
+		return -1;
+
+	memset (&ss, '\0', sizeof(ss));
+#ifdef SALEN
+	ss.generic.__ss_len = len;
+#endif
+	ss.generic.sa_family = family;
+
+	/* Ignore invalid values.  */
+	if (*alport < IPPORT_RESERVED / 2)
+		*alport = IPPORT_RESERVED / 2;
+	else if (*alport >= IPPORT_RESERVED)
+		*alport = IPPORT_RESERVED - 1;
+
+	int start = *alport;
+	do {
+		*sport = htons((uint16_t) *alport);
+		if (__bind(s, &ss.generic, len) >= 0)
+			return s;
+		if (errno != EADDRINUSE) {
+			(void)__close(s);
+			return -1;
+		}
+		if ((*alport)-- == IPPORT_RESERVED/2)
+			*alport = IPPORT_RESERVED - 1;
+	} while (*alport != start);
+	(void)__close(s);
+	__set_errno (EAGAIN);
+	return -1;
+}
+libc_hidden_def (rresvport_af)
+
+int
+rresvport (int *alport)
+{
+	return rresvport_af(alport, AF_INET);
+}
+
+int	__check_rhosts_file = 1;
+char	*__rcmd_errstr;
+
+int
+ruserok_af (const char *rhost, int superuser, const char *ruser,
+	    const char *luser, sa_family_t af)
+{
+	struct addrinfo hints, *res, *res0;
+	int gai;
+	int ret;
+
+	memset (&hints, '\0', sizeof(hints));
+	hints.ai_family = af;
+	gai = getaddrinfo(rhost, NULL, &hints, &res0);
+	if (gai)
+		return -1;
+	ret = -1;
+	for (res=res0; res; res=res->ai_next)
+		if (ruserok2_sa(res->ai_addr, res->ai_addrlen,
+				superuser, ruser, luser, rhost) == 0){
+			ret = 0;
+			break;
+		}
+	freeaddrinfo(res0);
+	return (ret);
+}
+libc_hidden_def (ruserok_af)
+
+int
+ruserok (const char *rhost, int superuser, const char *ruser,
+	 const char *luser)
+{
+	return ruserok_af(rhost, superuser, ruser, luser, AF_INET);
+}
+
+/* Extremely paranoid file open function. */
+static FILE *
+iruserfopen (const char *file, uid_t okuser)
+{
+  struct stat64 st;
+  char *cp = NULL;
+  FILE *res = NULL;
+
+  /* If not a regular file, if owned by someone other than user or
+     root, if writeable by anyone but the owner, or if hardlinked
+     anywhere, quit.  */
+  if (__lxstat64 (_STAT_VER, file, &st))
+    cp = _("lstat failed");
+  else if (!S_ISREG (st.st_mode))
+    cp = _("not regular file");
+  else
+    {
+      res = fopen (file, "rce");
+      if (!res)
+	cp = _("cannot open");
+      else if (__fxstat64 (_STAT_VER, fileno (res), &st) < 0)
+	cp = _("fstat failed");
+      else if (st.st_uid && st.st_uid != okuser)
+	cp = _("bad owner");
+      else if (st.st_mode & (S_IWGRP|S_IWOTH))
+	cp = _("writeable by other than owner");
+      else if (st.st_nlink > 1)
+	cp = _("hard linked somewhere");
+    }
+
+  /* If there were any problems, quit.  */
+  if (cp != NULL)
+    {
+      __rcmd_errstr = cp;
+      if (res)
+	fclose (res);
+      return NULL;
+    }
+
+  /* No threads use this stream.  */
+  __fsetlocking (res, FSETLOCKING_BYCALLER);
+
+  return res;
+}
+
+/*
+ * New .rhosts strategy: We are passed an ip address. We spin through
+ * hosts.equiv and .rhosts looking for a match. When the .rhosts only
+ * has ip addresses, we don't have to trust a nameserver.  When it
+ * contains hostnames, we spin through the list of addresses the nameserver
+ * gives us and look for a match.
+ *
+ * Returns 0 if ok, -1 if not ok.
+ */
+static int
+ruserok2_sa (struct sockaddr *ra, size_t ralen, int superuser,
+	     const char *ruser, const char *luser, const char *rhost)
+{
+  FILE *hostf = NULL;
+  int isbad = -1;
+
+  if (!superuser)
+    hostf = iruserfopen (_PATH_HEQUIV, 0);
+
+  if (hostf)
+    {
+      isbad = __validuser2_sa (hostf, ra, ralen, luser, ruser, rhost);
+      fclose (hostf);
+
+      if (!isbad)
+	return 0;
+    }
+
+  if (__check_rhosts_file || superuser)
+    {
+      char *pbuf;
+      struct passwd pwdbuf, *pwd;
+      size_t dirlen;
+      size_t buflen = __sysconf (_SC_GETPW_R_SIZE_MAX);
+      char *buffer = __alloca (buflen);
+      uid_t uid;
+
+      if (__getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) != 0
+	  || pwd == NULL)
+	return -1;
+
+      dirlen = strlen (pwd->pw_dir);
+      pbuf = alloca (dirlen + sizeof "/.rhosts");
+      __mempcpy (__mempcpy (pbuf, pwd->pw_dir, dirlen),
+		 "/.rhosts", sizeof "/.rhosts");
+
+       /* Change effective uid while reading .rhosts.  If root and
+	  reading an NFS mounted file system, can't read files that
+	  are protected read/write owner only.  */
+       uid = __geteuid ();
+       seteuid (pwd->pw_uid);
+       hostf = iruserfopen (pbuf, pwd->pw_uid);
+
+       if (hostf != NULL)
+	 {
+	   isbad = __validuser2_sa (hostf, ra, ralen, luser, ruser, rhost);
+	   fclose (hostf);
+	 }
+
+       seteuid (uid);
+       return isbad;
+    }
+  return -1;
+}
+/*
+ * ruserok_sa() is now discussed on ipng, so
+ * currently disabled for external use
+ */
+static int
+ruserok_sa (struct sockaddr *ra, size_t ralen, int superuser,
+	    const char *ruser, const char *luser)
+{
+  return ruserok2_sa(ra, ralen, superuser, ruser, luser, "-");
+}
+
+/* This is the exported version.  */
+int
+iruserok_af (const void *raddr, int superuser, const char *ruser,
+	     const char *luser, sa_family_t af)
+{
+  union {
+    struct sockaddr generic;
+    struct sockaddr_in in;
+    struct sockaddr_in6 in6;
+  } ra;
+  size_t ralen;
+
+  memset (&ra, '\0', sizeof(ra));
+  switch (af){
+  case AF_INET:
+    ra.in.sin_family = AF_INET;
+    memcpy (&ra.in.sin_addr, raddr, sizeof(struct in_addr));
+    ralen = sizeof(struct sockaddr_in);
+    break;
+  case AF_INET6:
+    ra.in6.sin6_family = AF_INET6;
+    memcpy (&ra.in6.sin6_addr, raddr, sizeof(struct in6_addr));
+    ralen = sizeof(struct sockaddr_in6);
+    break;
+  default:
+    return 0;
+  }
+  return ruserok_sa (&ra.generic, ralen, superuser, ruser, luser);
+}
+libc_hidden_def (iruserok_af)
+
+int
+iruserok (u_int32_t raddr, int superuser, const char *ruser, const char *luser)
+{
+  return iruserok_af (&raddr, superuser, ruser, luser, AF_INET);
+}
+
+/*
+ * XXX
+ * Don't make static, used by lpd(8).
+ *
+ * This function is not used anymore. It is only present because lpd(8)
+ * calls it (!?!). We simply call __invaliduser2() with an illegal rhost
+ * argument. This means that netgroups won't work in .rhost/hosts.equiv
+ * files. If you want lpd to work with netgroups, fix lpd to use ruserok()
+ * or PAM.
+ * Returns 0 if ok, -1 if not ok.
+ */
+int
+__ivaliduser (FILE *hostf, u_int32_t raddr, const char *luser,
+	      const char *ruser)
+{
+	struct sockaddr_in ra;
+	memset(&ra, '\0', sizeof(ra));
+	ra.sin_family = AF_INET;
+	ra.sin_addr.s_addr = raddr;
+	return __validuser2_sa(hostf, (struct sockaddr *)&ra, sizeof(ra),
+			       luser, ruser, "-");
+}
+
+
+/* Returns 1 on positive match, 0 on no match, -1 on negative match.  */
+static int
+internal_function
+__checkhost_sa (struct sockaddr *ra, size_t ralen, char *lhost,
+		const char *rhost)
+{
+	struct addrinfo hints, *res0, *res;
+	char raddr[INET6_ADDRSTRLEN];
+	int match;
+	int negate=1;    /* Multiply return with this to get -1 instead of 1 */
+
+	/* Check nis netgroup.  */
+	if (strncmp ("+@", lhost, 2) == 0)
+		return innetgr (&lhost[2], rhost, NULL, NULL);
+
+	if (strncmp ("-@", lhost, 2) == 0)
+		return -innetgr (&lhost[2], rhost, NULL, NULL);
+
+	/* -host */
+	if (strncmp ("-", lhost,1) == 0) {
+		negate = -1;
+		lhost++;
+	} else if (strcmp ("+",lhost) == 0) {
+		return 1;                    /* asking for trouble, but ok.. */
+	}
+
+	/* Try for raw ip address first. */
+	/* XXX */
+	if (getnameinfo(ra, ralen,
+			raddr, sizeof(raddr), NULL, 0,
+			NI_NUMERICHOST) == 0
+	    && strcmp(raddr, lhost) == 0)
+		return negate;
+
+	/* Better be a hostname. */
+	match = 0;
+	memset(&hints, '\0', sizeof(hints));
+	hints.ai_family = ra->sa_family;
+	if (getaddrinfo(lhost, NULL, &hints, &res0) == 0){
+		/* Spin through ip addresses. */
+		for (res = res0; res; res = res->ai_next)
+		  {
+		    if (res->ai_family == ra->sa_family
+			&& !memcmp(res->ai_addr, ra, res->ai_addrlen))
+		      {
+			match = 1;
+			break;
+		      }
+		  }
+		freeaddrinfo (res0);
+	}
+	return negate * match;
+}
+
+/* Returns 1 on positive match, 0 on no match, -1 on negative match.  */
+static int
+internal_function
+__icheckuser (const char *luser, const char *ruser)
+{
+    /*
+      luser is user entry from .rhosts/hosts.equiv file
+      ruser is user id on remote host
+      */
+
+    /* [-+]@netgroup */
+    if (strncmp ("+@", luser, 2) == 0)
+	return innetgr (&luser[2], NULL, ruser, NULL);
+
+    if (strncmp ("-@", luser,2) == 0)
+	return -innetgr (&luser[2], NULL, ruser, NULL);
+
+    /* -user */
+    if (strncmp ("-", luser, 1) == 0)
+	return -(strcmp (&luser[1], ruser) == 0);
+
+    /* + */
+    if (strcmp ("+", luser) == 0)
+	return 1;
+
+    /* simple string match */
+    return strcmp (ruser, luser) == 0;
+}
+
+/*
+ * Returns 1 for blank lines (or only comment lines) and 0 otherwise
+ */
+static int
+__isempty (char *p)
+{
+    while (*p && isspace (*p)) {
+	++p;
+    }
+
+    return (*p == '\0' || *p == '#') ? 1 : 0 ;
+}
+
+/*
+ * Returns 0 if positive match, -1 if _not_ ok.
+ */
+static int
+__validuser2_sa (FILE *hostf, struct sockaddr *ra, size_t ralen,
+		 const char *luser, const char *ruser, const char *rhost)
+{
+    const char *user;
+    char *p;
+    int hcheck, ucheck;
+    char *buf = NULL;
+    size_t bufsize = 0;
+    int retval = -1;
+
+    while (__getline (&buf, &bufsize, hostf) > 0) {
+	buf[bufsize - 1] = '\0'; /* Make sure it's terminated.  */
+	p = buf;
+
+	/* Skip empty or comment lines */
+	if (__isempty (p)) {
+	    continue;
+	}
+
+	for (;*p && !isspace(*p); ++p) {
+	    *p = _tolower (*p);
+	}
+
+	/* Next we want to find the permitted name for the remote user.  */
+	if (*p == ' ' || *p == '\t') {
+	    /* <nul> terminate hostname and skip spaces */
+	    for (*p++='\0'; *p && isspace (*p); ++p);
+
+	    user = p;                   /* this is the user's name */
+	    while (*p && !isspace (*p))
+		++p;                    /* find end of user's name */
+	} else
+	    user = p;
+
+	*p = '\0';              /* <nul> terminate username (+host?) */
+
+	/* buf -> host(?) ; user -> username(?) */
+	if (*buf == '\0')
+	  break;
+	if (*user == '\0')
+	  user = luser;
+
+	/* First check the user part.  In a naive implementation we
+	   would check the host part first, then the user.  However,
+	   if we check the user first and reject the entry we will
+	   have saved doing any host lookups to normalize the comparison
+	   and that likely saves several DNS queries.  Therefore we
+	   check the user first.  */
+	ucheck = __icheckuser (user, ruser);
+
+	/* Either we found the user, or we didn't and this is a
+	   negative host check.  We must do the negative host lookup
+	   in order to preserve the semantics of stopping on this line
+	   before processing others.  */
+	if (ucheck != 0 || *buf == '-') {
+
+	    /* Next check host part.  */
+	    hcheck = __checkhost_sa (ra, ralen, buf, rhost);
+
+	    /* Negative '-host user(?)' match?  */
+	    if (hcheck < 0)
+		break;
+
+	    /* Positive 'host user' match?  */
+	    if (hcheck > 0 && ucheck > 0) {
+		retval = 0;
+		break;
+	    }
+
+	    /* Negative 'host -user' match?  */
+	    if (hcheck > 0 && ucheck < 0)
+	      break;
+
+	    /* Neither, go on looking for match.  */
+	}
+    }
+
+    free (buf);
+
+    return retval;
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/rexec.c b/ap/libc/glibc/glibc-2.23/inet/rexec.c
new file mode 100644
index 0000000..4e6d48d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/rexec.c
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 1980, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)rexec.c	8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+
+#include <alloca.h>
+#include <stdio.h>
+#include <netdb.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/uio.h>
+
+int	rexecoptions;
+libc_freeres_ptr (static char *ahostbuf);
+
+int
+rexec_af (char **ahost, int rport, const char *name, const char *pass,
+	  const char *cmd, int *fd2p, sa_family_t af)
+{
+	struct sockaddr_storage from;
+	struct addrinfo hints, *res0;
+	const char *orig_name = name;
+	const char *orig_pass = pass;
+	u_short port = 0;
+	int s, timo = 1, s3;
+	char c;
+	int gai;
+	char servbuff[NI_MAXSERV];
+
+	__snprintf(servbuff, sizeof(servbuff), "%d", ntohs(rport));
+	servbuff[sizeof(servbuff) - 1] = '\0';
+
+	memset(&hints, '\0', sizeof(hints));
+	hints.ai_family = af;
+	hints.ai_socktype = SOCK_STREAM;
+	hints.ai_flags = AI_CANONNAME;
+	gai = getaddrinfo(*ahost, servbuff, &hints, &res0);
+	if (gai){
+		/* XXX: set errno? */
+		return -1;
+	}
+
+	if (res0->ai_canonname){
+		free (ahostbuf);
+		ahostbuf = strdup (res0->ai_canonname);
+		if (ahostbuf == NULL) {
+			perror ("rexec: strdup");
+			return (-1);
+		}
+		*ahost = ahostbuf;
+	} else {
+		*ahost = NULL;
+		__set_errno (ENOENT);
+		return -1;
+	}
+	ruserpass(res0->ai_canonname, &name, &pass);
+retry:
+	s = __socket(res0->ai_family, res0->ai_socktype, 0);
+	if (s < 0) {
+		perror("rexec: socket");
+		return (-1);
+	}
+	if (__connect(s, res0->ai_addr, res0->ai_addrlen) < 0) {
+		if (errno == ECONNREFUSED && timo <= 16) {
+			(void) __close(s);
+			__sleep(timo);
+			timo *= 2;
+			goto retry;
+		}
+		perror(res0->ai_canonname);
+		return (-1);
+	}
+	if (fd2p == 0) {
+		(void) __write(s, "", 1);
+		port = 0;
+	} else {
+		char num[32];
+		int s2;
+		union
+		{
+		  struct sockaddr_storage ss;
+		  struct sockaddr sa;
+		} sa2;
+		socklen_t sa2len;
+
+		s2 = __socket(res0->ai_family, res0->ai_socktype, 0);
+		if (s2 < 0) {
+			(void) __close(s);
+			return (-1);
+		}
+		__listen(s2, 1);
+		sa2len = sizeof (sa2);
+		if (__getsockname(s2, &sa2.sa, &sa2len) < 0) {
+			perror("getsockname");
+			(void) __close(s2);
+			goto bad;
+		} else if (sa2len != SA_LEN(&sa2.sa)) {
+			__set_errno(EINVAL);
+			(void) __close(s2);
+			goto bad;
+		}
+		port = 0;
+		if (!getnameinfo(&sa2.sa, sa2len,
+				 NULL, 0, servbuff, sizeof(servbuff),
+				 NI_NUMERICSERV))
+			port = atoi(servbuff);
+		(void) sprintf(num, "%u", port);
+		(void) __write(s, num, strlen(num)+1);
+		{ socklen_t len = sizeof (from);
+		  s3 = TEMP_FAILURE_RETRY (accept(s2, (struct sockaddr *)&from,
+						  &len));
+		  __close(s2);
+		  if (s3 < 0) {
+			perror("accept");
+			port = 0;
+			goto bad;
+		  }
+		}
+		*fd2p = s3;
+	}
+
+	struct iovec iov[3] =
+	  {
+	    [0] = { .iov_base = (void *) name, .iov_len = strlen (name) + 1 },
+	    /* should public key encypt the password here */
+	    [1] = { .iov_base = (void *) pass, .iov_len = strlen (pass) + 1 },
+	    [2] = { .iov_base = (void *) cmd, .iov_len = strlen (cmd) + 1 }
+	  };
+	(void) TEMP_FAILURE_RETRY (__writev (s, iov, 3));
+
+	/* We don't need the memory allocated for the name and the password
+	   in ruserpass anymore.  */
+	if (name != orig_name)
+	  free ((char *) name);
+	if (pass != orig_pass)
+	  free ((char *) pass);
+
+	if (__read(s, &c, 1) != 1) {
+		perror(*ahost);
+		goto bad;
+	}
+	if (c != 0) {
+		while (__read(s, &c, 1) == 1) {
+			(void) __write(2, &c, 1);
+			if (c == '\n')
+				break;
+		}
+		goto bad;
+	}
+	freeaddrinfo(res0);
+	return (s);
+bad:
+	if (port)
+		(void) __close(*fd2p);
+	(void) __close(s);
+	freeaddrinfo(res0);
+	return (-1);
+}
+libc_hidden_def (rexec_af)
+
+int
+rexec (char **ahost, int rport, const char *name, const char *pass,
+       const char *cmd, int *fd2p)
+{
+	return rexec_af(ahost, rport, name, pass, cmd, fd2p, AF_INET);
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/ruserpass.c b/ap/libc/glibc/glibc-2.23/inet/ruserpass.c
new file mode 100644
index 0000000..ff379db
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/ruserpass.c
@@ -0,0 +1,327 @@
+/*
+ * Copyright (c) 1985, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)ruserpass.c	8.3 (Berkeley) 4/2/94";
+#endif /* not lint */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <ctype.h>
+#include <err.h>
+#include <errno.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <libintl.h>
+
+/* #include "ftp_var.h" */
+
+static	int token (void);
+static	FILE *cfile;
+
+#define	DEFAULT	1
+#define	LOGIN	2
+#define	PASSWD	3
+#define	ACCOUNT 4
+#define MACDEF  5
+#define	ID	10
+#define	MACHINE	11
+
+static char tokval[100];
+
+static const char tokstr[] =
+{
+#define TOK_DEFAULT_IDX	0
+  "default\0"
+#define TOK_LOGIN_IDX	(TOK_DEFAULT_IDX + sizeof "default")
+  "login\0"
+#define TOK_PASSWORD_IDX (TOK_LOGIN_IDX + sizeof "login")
+  "password\0"
+#define TOK_PASSWD_IDX	(TOK_PASSWORD_IDX + sizeof "password")
+  "passwd\0"
+#define TOK_ACCOUNT_IDX	(TOK_PASSWD_IDX + sizeof "passwd")
+  "account\0"
+#define TOK_MACHINE_IDX	(TOK_ACCOUNT_IDX + sizeof "account")
+  "machine\0"
+#define TOK_MACDEF_IDX	(TOK_MACHINE_IDX + sizeof "machine")
+  "macdef"
+};
+
+static const struct toktab {
+	int tokstr_off;
+	int tval;
+} toktab[]= {
+	{ TOK_DEFAULT_IDX,	DEFAULT },
+	{ TOK_LOGIN_IDX,	LOGIN },
+	{ TOK_PASSWORD_IDX,	PASSWD },
+	{ TOK_PASSWD_IDX,	PASSWD },
+	{ TOK_ACCOUNT_IDX,	ACCOUNT },
+	{ TOK_MACHINE_IDX,	MACHINE },
+	{ TOK_MACDEF_IDX,	MACDEF }
+};
+
+
+
+int
+ruserpass (const char *host, const char **aname, const char **apass)
+{
+	char *hdir, *buf, *tmp;
+	char myname[1024], *mydomain;
+	int t, usedefault = 0;
+	struct stat64 stb;
+
+	hdir = __libc_secure_getenv("HOME");
+	if (hdir == NULL) {
+		/* If we can't get HOME, fail instead of trying ".",
+		   which is no improvement. This really should call
+		   getpwuid(getuid()).  */
+		/*hdir = ".";*/
+		return -1;
+	}
+
+	buf = alloca (strlen (hdir) + 8);
+
+	__stpcpy (__stpcpy (buf, hdir), "/.netrc");
+	cfile = fopen(buf, "rce");
+	if (cfile == NULL) {
+		if (errno != ENOENT)
+			warn("%s", buf);
+		return (0);
+	}
+	/* No threads use this stream.  */
+	__fsetlocking (cfile, FSETLOCKING_BYCALLER);
+	if (__gethostname(myname, sizeof(myname)) < 0)
+		myname[0] = '\0';
+	mydomain = __strchrnul(myname, '.');
+next:
+	while ((t = token())) switch(t) {
+
+	case DEFAULT:
+		usedefault = 1;
+		/* FALL THROUGH */
+
+	case MACHINE:
+		if (!usedefault) {
+			if (token() != ID)
+				continue;
+			/*
+			 * Allow match either for user's input host name
+			 * or official hostname.  Also allow match of
+			 * incompletely-specified host in local domain.
+			 */
+			if (__strcasecmp(host, tokval) == 0)
+				goto match;
+/*			if (__strcasecmp(hostname, tokval) == 0)
+				goto match;
+			if ((tmp = strchr(hostname, '.')) != NULL &&
+			    __strcasecmp(tmp, mydomain) == 0 &&
+			    __strncasecmp(hostname, tokval, tmp-hostname) == 0 &&
+			    tokval[tmp - hostname] == '\0')
+				goto match; */
+			if ((tmp = strchr(host, '.')) != NULL &&
+			    __strcasecmp(tmp, mydomain) == 0 &&
+			    __strncasecmp(host, tokval, tmp - host) == 0 &&
+			    tokval[tmp - host] == '\0')
+				goto match;
+			continue;
+		}
+	match:
+		while ((t = token()) && t != MACHINE && t != DEFAULT) switch(t) {
+
+		case LOGIN:
+			if (token()) {
+				if (*aname == 0) {
+				  char *newp;
+				  newp = malloc((unsigned) strlen(tokval) + 1);
+				  if (newp == NULL)
+				    {
+				      warnx(_("out of memory"));
+				      goto bad;
+				    }
+				  *aname = strcpy(newp, tokval);
+				} else {
+					if (strcmp(*aname, tokval))
+						goto next;
+				}
+			}
+			break;
+		case PASSWD:
+			if (strcmp(*aname, "anonymous") &&
+			    fstat64(fileno(cfile), &stb) >= 0 &&
+			    (stb.st_mode & 077) != 0) {
+	warnx(_("Error: .netrc file is readable by others."));
+	warnx(_("Remove password or make file unreadable by others."));
+				goto bad;
+			}
+			if (token() && *apass == 0) {
+				char *newp;
+				newp = malloc((unsigned) strlen(tokval) + 1);
+				if (newp == NULL)
+				  {
+				    warnx(_("out of memory"));
+				    goto bad;
+				  }
+				*apass = strcpy(newp, tokval);
+			}
+			break;
+		case ACCOUNT:
+#if 0
+			if (fstat64(fileno(cfile), &stb) >= 0
+			    && (stb.st_mode & 077) != 0) {
+	warnx("Error: .netrc file is readable by others.");
+	warnx("Remove account or make file unreadable by others.");
+				goto bad;
+			}
+			if (token() && *aacct == 0) {
+				*aacct = malloc((unsigned) strlen(tokval) + 1);
+				(void) strcpy(*aacct, tokval);
+			}
+#endif
+			break;
+		case MACDEF:
+#if 0
+			if (proxy) {
+				(void) fclose(cfile);
+				return (0);
+			}
+			while ((c=getc_unlocked(cfile)) != EOF && c == ' '
+			       || c == '\t');
+			if (c == EOF || c == '\n') {
+				printf("Missing macdef name argument.\n");
+				goto bad;
+			}
+			if (macnum == 16) {
+				printf("Limit of 16 macros have already been defined\n");
+				goto bad;
+			}
+			tmp = macros[macnum].mac_name;
+			*tmp++ = c;
+			for (i=0; i < 8 && (c=getc_unlocked(cfile)) != EOF &&
+			    !isspace(c); ++i) {
+				*tmp++ = c;
+			}
+			if (c == EOF) {
+				printf("Macro definition missing null line terminator.\n");
+				goto bad;
+			}
+			*tmp = '\0';
+			if (c != '\n') {
+				while ((c=getc_unlocked(cfile)) != EOF
+				       && c != '\n');
+			}
+			if (c == EOF) {
+				printf("Macro definition missing null line terminator.\n");
+				goto bad;
+			}
+			if (macnum == 0) {
+				macros[macnum].mac_start = macbuf;
+			}
+			else {
+				macros[macnum].mac_start = macros[macnum-1].mac_end + 1;
+			}
+			tmp = macros[macnum].mac_start;
+			while (tmp != macbuf + 4096) {
+				if ((c=getc_unlocked(cfile)) == EOF) {
+				printf("Macro definition missing null line terminator.\n");
+					goto bad;
+				}
+				*tmp = c;
+				if (*tmp == '\n') {
+					if (*(tmp-1) == '\0') {
+					   macros[macnum++].mac_end = tmp - 1;
+					   break;
+					}
+					*tmp = '\0';
+				}
+				tmp++;
+			}
+			if (tmp == macbuf + 4096) {
+				printf("4K macro buffer exceeded\n");
+				goto bad;
+			}
+#endif
+			break;
+		default:
+			warnx(_("Unknown .netrc keyword %s"), tokval);
+			break;
+		}
+		goto done;
+	}
+done:
+	(void) fclose(cfile);
+	return (0);
+bad:
+	(void) fclose(cfile);
+	return (-1);
+}
+libc_hidden_def (ruserpass)
+
+static int
+token (void)
+{
+	char *cp;
+	int c;
+	int i;
+
+	if (feof_unlocked(cfile) || ferror_unlocked(cfile))
+		return (0);
+	while ((c = getc_unlocked(cfile)) != EOF &&
+	    (c == '\n' || c == '\t' || c == ' ' || c == ','))
+		continue;
+	if (c == EOF)
+		return (0);
+	cp = tokval;
+	if (c == '"') {
+		while ((c = getc_unlocked(cfile)) != EOF && c != '"') {
+			if (c == '\\')
+				c = getc_unlocked(cfile);
+			*cp++ = c;
+		}
+	} else {
+		*cp++ = c;
+		while ((c = getc_unlocked(cfile)) != EOF
+		    && c != '\n' && c != '\t' && c != ' ' && c != ',') {
+			if (c == '\\')
+				c = getc_unlocked(cfile);
+			*cp++ = c;
+		}
+	}
+	*cp = 0;
+	if (tokval[0] == 0)
+		return (0);
+	for (i = 0; i < (int) (sizeof (toktab) / sizeof (toktab[0])); ++i)
+		if (!strcmp(&tokstr[toktab[i].tokstr_off], tokval))
+			return toktab[i].tval;
+	return (ID);
+}
diff --git a/ap/libc/glibc/glibc-2.23/inet/setipv4sourcefilter.c b/ap/libc/glibc/glibc-2.23/inet/setipv4sourcefilter.c
new file mode 100644
index 0000000..0422c31
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/setipv4sourcefilter.c
@@ -0,0 +1,33 @@
+/* Set source filter.  Stub version.
+   Copyright (C) 2004-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stdint.h>
+#include <netinet/in.h>
+
+
+int
+setipv4sourcefilter (int s, struct in_addr interface, struct in_addr group,
+		     uint32_t fmode, uint32_t numsrc,
+		     const struct in_addr *slist)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (setipv4sourcefilter)
diff --git a/ap/libc/glibc/glibc-2.23/inet/setsourcefilter.c b/ap/libc/glibc/glibc-2.23/inet/setsourcefilter.c
new file mode 100644
index 0000000..9cbeff1
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/setsourcefilter.c
@@ -0,0 +1,33 @@
+/* Set source filter.  Stub version.
+   Copyright (C) 2004-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stdint.h>
+#include <netinet/in.h>
+
+
+int
+setsourcefilter (int s, uint32_t interface, const struct sockaddr *group,
+		 socklen_t grouplen, uint32_t fmode, uint32_t numsrc,
+		 const struct sockaddr_storage *slist)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (setsourcefilter)
diff --git a/ap/libc/glibc/glibc-2.23/inet/test-ifaddrs.c b/ap/libc/glibc/glibc-2.23/inet/test-ifaddrs.c
new file mode 100644
index 0000000..32555af
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/test-ifaddrs.c
@@ -0,0 +1,99 @@
+/* Test listing of network interface addresses.
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ifaddrs.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+static int failures;
+
+static const char *
+addr_string (struct sockaddr *sa, char *buf, size_t size)
+{
+  if (sa == NULL)
+    return "<none>";
+
+  switch (sa->sa_family)
+    {
+    case AF_INET:
+      return inet_ntop (AF_INET, &((struct sockaddr_in *) sa)->sin_addr,
+			buf, size);
+    case AF_INET6:
+      return inet_ntop (AF_INET6, &((struct sockaddr_in6 *) sa)->sin6_addr,
+			buf, size);
+#ifdef AF_LINK
+    case AF_LINK:
+      return "<link>";
+#endif
+    case AF_UNSPEC:
+      return "---";
+
+#ifdef AF_PACKET
+    case AF_PACKET:
+      return "<packet>";
+#endif
+
+    default:
+      ++failures;
+      printf ("sa_family=%d %08x\n", sa->sa_family,
+	      *(int*)&((struct sockaddr_in *) sa)->sin_addr.s_addr);
+      return "<unexpected sockaddr family>";
+    }
+}
+
+
+static int
+do_test (void)
+{
+  struct ifaddrs *ifaces, *ifa;
+
+  if (getifaddrs (&ifaces) < 0)
+    {
+      if (errno != ENOSYS)
+	{
+	  printf ("Couldn't get any interfaces: %s.\n", strerror (errno));
+	  exit (1);
+	}
+      /* The function is simply not implemented.  */
+      exit (0);
+    }
+
+  puts ("\
+Name           Flags   Address         Netmask         Broadcast/Destination");
+
+  for (ifa = ifaces; ifa != NULL; ifa = ifa->ifa_next)
+    {
+      char abuf[64], mbuf[64], dbuf[64];
+      printf ("%-15s%#.4x  %-15s %-15s %-15s\n",
+	      ifa->ifa_name, ifa->ifa_flags,
+	      addr_string (ifa->ifa_addr, abuf, sizeof (abuf)),
+	      addr_string (ifa->ifa_netmask, mbuf, sizeof (mbuf)),
+	      addr_string (ifa->ifa_broadaddr, dbuf, sizeof (dbuf)));
+    }
+
+  freeifaddrs (ifaces);
+
+  return failures ? 1 : 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/test-inet6_opt.c b/ap/libc/glibc/glibc-2.23/inet/test-inet6_opt.c
new file mode 100644
index 0000000..a7ebf00
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/test-inet6_opt.c
@@ -0,0 +1,211 @@
+#include <netinet/in.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+
+#define OPT_X	42
+#define OPT_Y	43
+#define OPT_Z	44
+
+static void *
+encode_inet6_opt (socklen_t *elp)
+{
+  void *eb = NULL;
+  socklen_t el;
+  int cl;
+  void *db;
+  int offset;
+  uint8_t val1;
+  uint16_t val2;
+  uint32_t val4;
+  uint64_t val8;
+
+  *elp = 0;
+#define CHECK() \
+  if (cl == -1)						\
+    {							\
+      printf ("cl == -1 on line %d\n", __LINE__);	\
+      free (eb);					\
+      return NULL;					\
+    }
+
+  /* Estimate the length */
+  cl = inet6_opt_init (NULL, 0);
+  CHECK ();
+  cl = inet6_opt_append (NULL, 0, cl, OPT_X, 12, 8, NULL);
+  CHECK ();
+  cl = inet6_opt_append (NULL, 0, cl, OPT_Y, 7, 4, NULL);
+  CHECK ();
+  cl = inet6_opt_append (NULL, 0, cl, OPT_Z, 7, 1, NULL);
+  CHECK ();
+  cl = inet6_opt_finish (NULL, 0, cl);
+  CHECK ();
+  el = cl;
+
+  eb = malloc (el + 8);
+  if (eb == NULL)
+    {
+      puts ("malloc failed");
+      return NULL;
+    }
+  /* Canary.  */
+  memcpy (eb + el, "deadbeef", 8);
+
+  cl = inet6_opt_init (eb, el);
+  CHECK ();
+
+  cl = inet6_opt_append (eb, el, cl, OPT_X, 12, 8, &db);
+  CHECK ();
+  val4 = 0x12345678;
+  offset = inet6_opt_set_val (db, 0, &val4, sizeof  (val4));
+  val8 = 0x0102030405060708LL;
+  inet6_opt_set_val (db, offset, &val8, sizeof  (val8));
+
+  cl = inet6_opt_append (eb, el, cl, OPT_Y, 7, 4, &db);
+  CHECK ();
+  val1 = 0x01;
+  offset = inet6_opt_set_val (db, 0, &val1, sizeof  (val1));
+  val2 = 0x1331;
+  offset = inet6_opt_set_val (db, offset, &val2, sizeof  (val2));
+  val4 = 0x01020304;
+  inet6_opt_set_val (db, offset, &val4, sizeof  (val4));
+
+  cl = inet6_opt_append (eb, el, cl, OPT_Z, 7, 1, &db);
+  CHECK ();
+  inet6_opt_set_val (db, 0, (void *) "abcdefg", 7);
+
+  cl = inet6_opt_finish (eb, el, cl);
+  CHECK ();
+
+  if (memcmp (eb + el, "deadbeef", 8) != 0)
+    {
+      puts ("Canary corrupted");
+      free (eb);
+      return NULL;
+    }
+  *elp = el;
+  return eb;
+}
+
+int
+decode_inet6_opt (void *eb, socklen_t el)
+{
+  int ret = 0;
+  int seq = 0;
+  int cl = 0;
+  int offset;
+  uint8_t type;
+  socklen_t len;
+  uint8_t val1;
+  uint16_t val2;
+  uint32_t val4;
+  uint64_t val8;
+  void *db;
+  char buf[8];
+
+  while ((cl = inet6_opt_next (eb, el, cl, &type, &len, &db)) != -1)
+    switch (type)
+      {
+      case OPT_X:
+	if (seq++ != 0)
+	  {
+	    puts ("OPT_X is not first");
+	    ret = 1;
+	  }
+	if (len != 12)
+	  {
+	    printf ("OPT_X's length %d != 12\n", len);
+	    ret = 1;
+	  }
+	offset = inet6_opt_get_val (db, 0, &val4, sizeof (val4));
+	if (val4 != 0x12345678)
+	  {
+	    printf ("OPT_X's val4 %x != 0x12345678\n", val4);
+	    ret = 1;
+	  }
+	offset = inet6_opt_get_val (db, offset, &val8, sizeof (val8));
+	if (offset != len || val8 != 0x0102030405060708LL)
+	  {
+	    printf ("OPT_X's val8 %llx != 0x0102030405060708\n",
+		    (long long) val8);
+	    ret = 1;
+	  }
+	break;
+      case OPT_Y:
+	if (seq++ != 1)
+	  {
+	    puts ("OPT_Y is not second");
+	    ret = 1;
+	  }
+	if (len != 7)
+	  {
+	    printf ("OPT_Y's length %d != 7\n", len);
+	    ret = 1;
+	  }
+	offset = inet6_opt_get_val (db, 0, &val1, sizeof (val1));
+	if (val1 != 0x01)
+	  {
+	    printf ("OPT_Y's val1 %x != 0x01\n", val1);
+	    ret = 1;
+	  }
+	offset = inet6_opt_get_val (db, offset, &val2, sizeof (val2));
+	if (val2 != 0x1331)
+	  {
+	    printf ("OPT_Y's val2 %x != 0x1331\n", val2);
+	    ret = 1;
+	  }
+	offset = inet6_opt_get_val (db, offset, &val4, sizeof (val4));
+	if (offset != len || val4 != 0x01020304)
+	  {
+	    printf ("OPT_Y's val4 %x != 0x01020304\n", val4);
+	    ret = 1;
+	  }
+	break;
+      case OPT_Z:
+	if (seq++ != 2)
+	  {
+	    puts ("OPT_Z is not third");
+	    ret = 1;
+	  }
+	if (len != 7)
+	  {
+	    printf ("OPT_Z's length %d != 7\n", len);
+	    ret = 1;
+	  }
+	offset = inet6_opt_get_val (db, 0, buf, 7);
+	if (offset != len || memcmp (buf, "abcdefg", 7) != 0)
+	  {
+	    buf[7] = '\0';
+	    printf ("OPT_Z's buf \"%s\" != \"abcdefg\"\n", buf);
+	    ret = 1;
+	  }
+	break;
+      default:
+	printf ("Unknown option %d\n", type);
+	ret = 1;
+	break;
+      }
+  if (seq != 3)
+    {
+      puts ("Didn't see all of OPT_X, OPT_Y and OPT_Z");
+      ret = 1;
+    }
+  return ret;
+}
+
+static int
+do_test (void)
+{
+  void *eb;
+  socklen_t el;
+  eb = encode_inet6_opt (&el);
+  if (eb == NULL)
+    return 1;
+  if (decode_inet6_opt (eb, el))
+    return 1;
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/test_ifindex.c b/ap/libc/glibc/glibc-2.23/inet/test_ifindex.c
new file mode 100644
index 0000000..f55b5af
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/test_ifindex.c
@@ -0,0 +1,67 @@
+/* Test interface name <-> index conversions.
+   Copyright (C) 1997-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Philip Blundell <Philip.Blundell@pobox.com>.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <net/if.h>
+
+static int
+do_test (void)
+{
+  int failures = 0;
+  struct if_nameindex *idx = if_nameindex (), *p;
+  if (idx == NULL)
+    {
+      if (errno != ENOSYS)
+	{
+	  printf ("Couldn't get any interfaces.\n");
+	  exit (1);
+	}
+      /* The function is simply not implemented.  */
+      exit (0);
+    }
+
+  printf ("Idx            Name | Idx           Name\n");
+
+  for (p = idx; p->if_index || p->if_name; ++p)
+    {
+      char buf[IFNAMSIZ];
+      unsigned int ni;
+      int result;
+      printf ("%3d %15s | ", p->if_index, p->if_name);
+      printf ("%3d", ni = if_nametoindex (p->if_name));
+      printf ("%15s", if_indextoname (p->if_index, buf));
+      result = (ni != p->if_index || (strcmp (buf, p->if_name)));
+      if (ni == p->if_index)
+	/* We have to make sure that this is not an alias with the
+	   same interface number.  */
+	if (p->if_index == if_nametoindex (buf))
+	  result = 0;
+      printf ("%10s", result ? "fail" : "okay");
+      printf ("\n");
+      failures += result;
+    }
+  if_freenameindex (idx);
+  return failures ? 1 : 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/tst-checks.c b/ap/libc/glibc/glibc-2.23/inet/tst-checks.c
new file mode 100644
index 0000000..5d97564
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/tst-checks.c
@@ -0,0 +1,173 @@
+#include <stdio.h>
+#include <string.h>
+#include <netinet/in.h>
+
+
+static int
+do_test (void)
+{
+  int result = 0;
+  char buf[16];
+  memset (buf, '\0', 16);
+
+  if (! IN6_IS_ADDR_UNSPECIFIED (buf))
+    {
+      puts ("positive IN6_IS_ADDR_UNSPECIFIED failed");
+      result = 1;
+    }
+  for (size_t i = 0; i < 16; ++i)
+    {
+      buf[i] = 1;
+      if (IN6_IS_ADDR_UNSPECIFIED (buf))
+	{
+	  printf ("negative IN6_IS_ADDR_UNSPECIFIED with byte %zu failed\n",
+		  i);
+	  result = 1;
+	}
+      buf[i] = 0;
+    }
+
+  if (IN6_IS_ADDR_LOOPBACK (buf))
+    {
+      puts ("negative IN6_IS_ADDR_UNSPECIFIED failed");
+      result = 1;
+    }
+  buf[15] = 1;
+  if (! IN6_IS_ADDR_LOOPBACK (buf))
+    {
+      puts ("positive IN6_IS_ADDR_UNSPECIFIED failed");
+      result = 1;
+    }
+  buf[15] = 0;
+
+  buf[0] = 0xfe;
+  buf[1] = 0x80;
+  if (! IN6_IS_ADDR_LINKLOCAL (buf))
+    {
+      puts ("positive IN6_IS_ADDR_LINKLOCAL failed");
+      result = 1;
+    }
+  for (size_t i = 1; i < 16; ++i)
+    {
+      buf[i] ^= 1;
+      if (! IN6_IS_ADDR_LINKLOCAL (buf))
+	{
+	  printf ("positive IN6_IS_ADDR_LINKLOCAL byte %zu failed\n", i);
+	  result = 1;
+	}
+      buf[i] ^= 1;
+    }
+  buf[0] = 0xff;
+  buf[1] = 0x80;
+  if (IN6_IS_ADDR_LINKLOCAL (buf))
+    {
+      puts ("negative IN6_IS_ADDR_LINKLOCAL failed");
+      result = 1;
+    }
+  buf[0] = 0xfe;
+  buf[1] = 0xc0;
+  if (IN6_IS_ADDR_LINKLOCAL (buf))
+    {
+      puts ("negative IN6_IS_ADDR_LINKLOCAL #2 failed");
+      result = 1;
+    }
+
+  buf[0] = 0xfe;
+  buf[1] = 0xc0;
+  if (! IN6_IS_ADDR_SITELOCAL (buf))
+    {
+      puts ("positive IN6_IS_ADDR_SITELOCAL failed");
+      result = 1;
+    }
+  for (size_t i = 1; i < 16; ++i)
+    {
+      buf[i] ^= 1;
+      if (! IN6_IS_ADDR_SITELOCAL (buf))
+	{
+	  printf ("positive IN6_IS_ADDR_SITELOCAL byte %zu failed\n", i);
+	  result = 1;
+	}
+      buf[i] ^= 1;
+    }
+  buf[0] = 0xff;
+  buf[1] = 0x80;
+  if (IN6_IS_ADDR_SITELOCAL (buf))
+    {
+      puts ("negative IN6_IS_ADDR_SITELOCAL failed");
+      result = 1;
+    }
+  buf[0] = 0xf8;
+  buf[1] = 0xc0;
+  if (IN6_IS_ADDR_SITELOCAL (buf))
+    {
+      puts ("negative IN6_IS_ADDR_SITELOCAL #2 failed");
+      result = 1;
+    }
+
+  memset (buf, '\0', 16);
+  buf[10] = 0xff;
+  buf[11] = 0xff;
+  if (! IN6_IS_ADDR_V4MAPPED (buf))
+    {
+      puts ("positive IN6_IS_ADDR_V4MAPPED failed");
+      result = 1;
+    }
+  for (size_t i = 12; i < 16; ++i)
+    {
+      buf[i] ^= 1;
+      if (! IN6_IS_ADDR_V4MAPPED (buf))
+	{
+	  printf ("positive IN6_IS_ADDR_V4MAPPED byte %zu failed\n", i);
+	  result = 1;
+	}
+      buf[i] ^= 1;
+    }
+  for (size_t i = 0; i < 12; ++i)
+    {
+      buf[i] ^= 1;
+      if (IN6_IS_ADDR_V4MAPPED (buf))
+	{
+	  printf ("negative IN6_IS_ADDR_V4MAPPED byte %zu failed\n", i);
+	  result = 1;
+	}
+      buf[i] ^= 1;
+    }
+
+  memset (buf, '\0', 16);
+  for (size_t i = 12; i < 16; ++i)
+    {
+      buf[i] ^= 2;
+      if (! IN6_IS_ADDR_V4COMPAT (buf))
+	{
+	  printf ("positive IN6_IS_ADDR_V4COMPAT byte %zu failed\n", i);
+	  result = 1;
+	}
+      buf[i] ^= 2;
+    }
+  for (size_t i = 0; i < 12; ++i)
+    {
+      buf[i] ^= 1;
+      if (IN6_IS_ADDR_V4COMPAT (buf))
+	{
+	  printf ("negative IN6_IS_ADDR_V4COMPAT byte %zu failed\n", i);
+	  result = 1;
+	}
+      buf[i] ^= 1;
+    }
+  if (IN6_IS_ADDR_V4COMPAT (buf))
+    {
+      puts ("negative IN6_IS_ADDR_V4COMPAT #2 failed");
+      result = 1;
+    }
+  buf[15] = 1;
+  if (IN6_IS_ADDR_V4COMPAT (buf))
+    {
+      puts ("negative IN6_IS_ADDR_V4COMPAT #3 failed");
+      result = 1;
+    }
+
+  return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/tst-ether_aton.c b/ap/libc/glibc/glibc-2.23/inet/tst-ether_aton.c
new file mode 100644
index 0000000..eba350e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/tst-ether_aton.c
@@ -0,0 +1,60 @@
+#include <stdio.h>
+#include <string.h>
+#include <netinet/ether.h>
+
+static int
+do_test (void)
+{
+  struct ether_addr *valp, val;
+  int result, r;
+  char hostname[32], buf[64], *p;
+
+  valp = ether_aton ("12:34:56:78:9a:bc");
+
+  printf ("ether_aton (\"12:34:56:78:9a:bc\") = %hhx:%hhx:%hhx:%hhx:%hhx:%hhx\n",
+	  valp->ether_addr_octet[0],
+	  valp->ether_addr_octet[1],
+	  valp->ether_addr_octet[2],
+	  valp->ether_addr_octet[3],
+	  valp->ether_addr_octet[4],
+	  valp->ether_addr_octet[5]);
+
+  result = (valp->ether_addr_octet[0] != 0x12
+	    || valp->ether_addr_octet[1] != 0x34
+	    || valp->ether_addr_octet[2] != 0x56
+	    || valp->ether_addr_octet[3] != 0x78
+	    || valp->ether_addr_octet[4] != 0x9a
+	    || valp->ether_addr_octet[5] != 0xbc);
+
+  if ((r = ether_line ("0:c0:f0:46:5f:97 host.ether.com \t# comment",
+		       &val, hostname)) == 0)
+    {
+      ether_ntoa_r (&val, buf);
+      p = strchr (buf, '\0');
+      *p++ = ' ';
+      strcpy (p, hostname);
+
+      printf ("ether_line (\"0:c0:f0:46:5f:97 host.ether.com\") = \"%s\"\n",
+	      buf);
+
+      result |= strcmp ("0:c0:f0:46:5f:97 host.ether.com", buf) != 0;
+    }
+  else
+    {
+      printf ("ether_line (\"0:c0:f0:46:5f:97 host.ether.com\") = %d\n", r);
+      result |= 1;
+    }
+
+  r = ether_line ("0:c0:2:d0 foo.bar   ", &val, hostname);
+  printf ("ether_line (\"0:c0:2:d0 foo.bar   \") = %d\n", r);
+  result |= r != -1;
+
+  r = ether_line ("0:c0:2:d0:1a:2a  ", &val, hostname);
+  printf ("ether_line (\"0:c0:2:d0:1a:2a  \") = %d\n", r);
+  result |= r != -1;
+
+  return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/tst-ether_line.c b/ap/libc/glibc/glibc-2.23/inet/tst-ether_line.c
new file mode 100644
index 0000000..ff0560b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/tst-ether_line.c
@@ -0,0 +1,38 @@
+#include <stdio.h>
+#include <string.h>
+#include <netinet/ether.h>
+
+
+static int
+do_test (void)
+{
+  struct ether_addr a;
+  char buf[1000];
+  if (ether_line ("00:01:02:03:04:05       aaaaa   \n", &a, buf) != 0)
+    {
+      puts ("ether_line failed");
+      return 1;
+    }
+
+  int res = 0;
+  int i;
+  for (i = 0; i < ETH_ALEN; ++i)
+    {
+      printf ("%02x%s",
+	      (int) a.ether_addr_octet[i], i + 1 == ETH_ALEN ? "" : ":");
+      if (a.ether_addr_octet[i] != i)
+	{
+	  printf ("octet %d is %d, expected %d\n",
+		  i, (int) a.ether_addr_octet[i], i);
+	  res = 1;
+	}
+    }
+
+  printf (" \"%s\"\n", buf);
+  res |= strcmp (buf, "aaaaa") != 0;
+
+  return res;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/tst-gethnm.c b/ap/libc/glibc/glibc-2.23/inet/tst-gethnm.c
new file mode 100644
index 0000000..dd3a547
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/tst-gethnm.c
@@ -0,0 +1,67 @@
+/* Based on a test case by grd@algonet.se.  */
+
+#include <netdb.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+static int
+do_test (void)
+{
+  struct hostent *ent;
+  struct in_addr hostaddr;
+  int result = 0;
+
+  inet_aton ("127.0.0.1", (struct in_addr *) &hostaddr.s_addr);
+  ent = gethostbyaddr (&hostaddr, sizeof (hostaddr), AF_INET);
+  if (ent == NULL)
+    puts ("gethostbyaddr (...) == NULL");
+  else
+    {
+      puts ("Using gethostbyaddr(..):");
+      printf ("h_name: %s\n", ent->h_name);
+
+      if (ent->h_aliases == NULL)
+	puts ("ent->h_aliases == NULL");
+      else
+	printf ("h_aliases[0]: %s\n", ent->h_aliases[0]);
+    }
+
+  ent = gethostbyname ("127.0.0.1");
+  if (ent == NULL)
+    {
+      puts ("gethostbyname (\"127.0.0.1\") == NULL");
+      result = 1;
+    }
+  else
+    {
+      printf ("\nNow using gethostbyname(..):\n");
+      printf ("h_name: %s\n", ent->h_name);
+      if (strcmp (ent->h_name, "127.0.0.1") != 0)
+	{
+	  puts ("ent->h_name != \"127.0.0.1\"");
+	  result = 1;
+	}
+
+      if (ent->h_aliases == NULL)
+	{
+	  puts ("ent->h_aliases == NULL");
+	  result = 1;
+	}
+      else
+	{
+	  printf ("h_aliases[0]: %s\n", ent->h_aliases[0]);
+	  result |= ent->h_aliases[0] != NULL;
+	}
+    }
+
+  return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/tst-getni1.c b/ap/libc/glibc/glibc-2.23/inet/tst-getni1.c
new file mode 100644
index 0000000..3960f71
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/tst-getni1.c
@@ -0,0 +1,36 @@
+#include <netdb.h>
+#include <stdio.h>
+#include <sys/socket.h>
+
+static int
+do_test (void)
+{
+  int retval = 0;
+
+  struct sockaddr_in s;
+  s.sin_family = AF_INET;
+  s.sin_port = 80;
+  s.sin_addr.s_addr = INADDR_LOOPBACK;
+  int r = getnameinfo((struct sockaddr *) &s, sizeof (s), NULL, 0, NULL, 0,
+		      NI_NUMERICHOST | NI_NUMERICSERV);
+  printf("r = %d\n", r);
+  if (r != 0)
+    {
+      puts ("failed without NI_NAMEREQD");
+      retval = 1;
+    }
+
+  r = getnameinfo((struct sockaddr *) &s, sizeof (s), NULL, 0, NULL, 0,
+		  NI_NUMERICHOST | NI_NUMERICSERV | NI_NAMEREQD);
+  printf("r = %d\n", r);
+  if (r != EAI_NONAME)
+    {
+      puts ("did not fail with EAI_NONAME with NI_NAMEREQD set");
+      retval = 1;
+    }
+
+  return retval;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/tst-getni2.c b/ap/libc/glibc/glibc-2.23/inet/tst-getni2.c
new file mode 100644
index 0000000..66e7806
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/tst-getni2.c
@@ -0,0 +1,41 @@
+#include <netdb.h>
+#include <stdio.h>
+#include <sys/socket.h>
+
+static int
+do_test (void)
+{
+  int retval = 0;
+
+  struct sockaddr_in6 s;
+  s.sin6_family = AF_INET6;
+  s.sin6_port = htons (80);
+  s.sin6_flowinfo = 0;
+  s.sin6_addr = (struct in6_addr) IN6ADDR_ANY_INIT;
+  s.sin6_scope_id = 0;
+  char buf[1000];
+  buf[0] = '\0';
+  int r = getnameinfo((struct sockaddr *) &s, sizeof (s), buf, sizeof (buf),
+		      NULL, 0, NI_NUMERICSERV);
+  printf("r = %d, buf = \"%s\"\n", r, buf);
+  if (r != 0)
+    {
+      puts ("failed without NI_NAMEREQD");
+      retval = 1;
+    }
+
+  buf[0] = '\0';
+  r = getnameinfo((struct sockaddr *) &s, sizeof (s), buf, sizeof (buf),
+		  NULL, 0, NI_NUMERICSERV | NI_NAMEREQD);
+  printf("r = %d, buf = \"%s\"\n", r, buf);
+  if (r != EAI_NONAME)
+    {
+      puts ("did not fail with EAI_NONAME with NI_NAMEREQD set");
+      retval = 1;
+    }
+
+  return retval;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/tst-inet6_rth.c b/ap/libc/glibc/glibc-2.23/inet/tst-inet6_rth.c
new file mode 100644
index 0000000..549d717
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/tst-inet6_rth.c
@@ -0,0 +1,192 @@
+#include <stdio.h>
+#include <string.h>
+#include <arpa/inet.h>
+#include <netinet/ip6.h>
+
+static int
+do_test (void)
+{
+  int res = 0;
+  char buf[1000];
+  void *p = inet6_rth_init (buf, 24, IPV6_RTHDR_TYPE_0, 0);
+  if (p == NULL)
+    {
+      puts ("first inet6_rth_init failed");
+      res = 1;
+    }
+  else if (inet6_rth_add (p, &in6addr_any) == 0)
+    {
+      puts ("first inet6_rth_add succeeded");
+      res = 1;
+    }
+
+  p = inet6_rth_init (buf, 24, IPV6_RTHDR_TYPE_0, 1);
+  if (p == NULL)
+    {
+      puts ("second inet6_rth_init failed");
+      res = 1;
+    }
+  else if (inet6_rth_add (p, &in6addr_any) != 0)
+    {
+      puts ("second inet6_rth_add failed");
+      res = 1;
+    }
+
+  for (int nseg = 4; nseg < 6; ++nseg)
+    {
+      printf ("nseg = %d\n", nseg);
+
+      p = inet6_rth_init (buf, sizeof (buf), IPV6_RTHDR_TYPE_0, nseg);
+      if (p == NULL)
+	{
+	  puts ("third inet6_rth_init failed");
+	  res = 1;
+	}
+      else
+	{
+	  struct in6_addr tmp;
+	  memset (&tmp, '\0', sizeof (tmp));
+
+	  for (int i = 0; i < nseg; ++i)
+	    {
+	      tmp.s6_addr[0] = i;
+	      if (inet6_rth_add (p, &tmp) != 0)
+		{
+		  printf ("call %d of third inet6_rth_add failed\n", i + 1);
+		  res = 1;
+		  goto out;
+		}
+	    }
+	  ((struct ip6_rthdr0 *) p)->ip6r0_segleft = 0;
+	  if (inet6_rth_segments (p) != nseg)
+	    {
+	      puts ("\
+inet6_rth_segments returned wrong value after loop with third inet6_rth_add");
+	      res = 1;
+	      goto out;
+	    }
+
+          union
+          {
+            char buffer[1000];
+            struct ip6_rthdr0 rthdr0;
+          } buf2;
+	  if (inet6_rth_reverse (p, buf2.buffer) != 0)
+	    {
+	      puts ("first inet6_rth_reverse call failed");
+	      res = 1;
+	      goto out;
+	    }
+	  if (buf2.rthdr0.ip6r0_segleft != nseg)
+	    {
+	      puts ("segleft after first inet6_rth_reverse wrong");
+	      res = 1;
+	    }
+
+	  if (inet6_rth_segments (p) != inet6_rth_segments (buf2.buffer))
+	    {
+	      puts ("number of seconds after first inet6_rth_reverse differs");
+	      res = 1;
+	      goto out;
+	    }
+
+	  for (int i = 0; i < nseg; ++i)
+	    {
+	      struct in6_addr *addr = inet6_rth_getaddr (buf2.buffer, i);
+	      if (addr == NULL)
+		{
+		  printf ("call %d of first inet6_rth_getaddr failed\n",
+			  i + 1);
+		  res = 1;
+		}
+	      else if (addr->s6_addr[0] != nseg - 1 - i
+		       || memcmp (&addr->s6_addr[1], &in6addr_any.s6_addr[1],
+				  sizeof (in6addr_any)
+				  - sizeof (in6addr_any.s6_addr[0])) != 0)
+		{
+		  char addrbuf[100];
+		  inet_ntop (AF_INET6, addr, addrbuf, sizeof (addrbuf));
+		  printf ("\
+address %d after first inet6_rth_reverse wrong (%s)\n",
+			  i + 1, addrbuf);
+		  res = 1;
+		}
+	    }
+	out:
+	  ;
+	}
+
+      p = inet6_rth_init (buf, sizeof (buf), IPV6_RTHDR_TYPE_0, nseg);
+      if (p == NULL)
+	{
+	  puts ("fourth inet6_rth_init failed");
+	  res = 1;
+	}
+      else
+	{
+	  struct in6_addr tmp;
+	  memset (&tmp, '\0', sizeof (tmp));
+
+	  for (int i = 0; i < nseg; ++i)
+	    {
+	      tmp.s6_addr[0] = i;
+	      if (inet6_rth_add (p, &tmp) != 0)
+		{
+		  printf ("call %d of fourth inet6_rth_add failed\n", i + 1);
+		  res = 1;
+		  goto out2;
+		}
+	    }
+	  ((struct ip6_rthdr0 *) p)->ip6r0_segleft = 0;
+	  if (inet6_rth_segments (p) != nseg)
+	    {
+	      puts ("\
+inet6_rth_segments returned wrong value after loop with fourth inet6_rth_add");
+	      res = 1;
+	      goto out2;
+	    }
+
+	  if (inet6_rth_reverse (p, p) != 0)
+	    {
+	      puts ("second inet6_rth_reverse call failed");
+	      res = 1;
+	      goto out2;
+	    }
+	  if (((struct ip6_rthdr0 *) p)->ip6r0_segleft != nseg)
+	    {
+	      puts ("segleft after second inet6_rth_reverse wrong");
+	      res = 1;
+	    }
+
+	  for (int i = 0; i < nseg; ++i)
+	    {
+	      struct in6_addr *addr = inet6_rth_getaddr (p, i);
+	      if (addr == NULL)
+		{
+		  printf ("call %d of second inet6_rth_getaddr failed\n",
+			  i + 1);
+		  res = 1;
+		}
+	      else if (addr->s6_addr[0] != nseg - 1 - i
+		       || memcmp (&addr->s6_addr[1], &in6addr_any.s6_addr[1],
+				  sizeof (in6addr_any)
+				  - sizeof (in6addr_any.s6_addr[0])) != 0)
+		{
+		  char addrbuf[100];
+		  inet_ntop (AF_INET6, addr, addrbuf, sizeof (addrbuf));
+		  printf ("\
+address %d after second inet6_rth_reverse wrong (%s)\n",
+			  i + 1, addrbuf);
+		  res = 1;
+		}
+	    }
+	out2:
+	  ;
+	}
+    }
+
+  return res;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/tst-network.c b/ap/libc/glibc/glibc-2.23/inet/tst-network.c
new file mode 100644
index 0000000..e0befd7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/tst-network.c
@@ -0,0 +1,81 @@
+/* Test for inet_network.
+   Copyright (C) 2000-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Andreas Jaeger <aj@suse.de>, 2000.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stdio.h>
+#include <stdint.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+struct
+{
+  const char *network;
+  uint32_t number;
+} tests [] =
+{
+  {"1.0.0.0", 0x1000000},
+  {"1.0.0", 0x10000},
+  {"1.0", 0x100},
+  {"1", 0x1},
+  {"192.168.0.0", 0xC0A80000},
+  {"0", 0},
+  {"0x0", 0},
+  /* Now some invalid addresses.  */
+  {"0x", INADDR_NONE},
+  {"1 bar", INADDR_NONE}, /* Bug 15277.  */
+  {"141.30.225.2800", INADDR_NONE},
+  {"141.76.1.1.1", INADDR_NONE},
+  {"141.76.1.11.", INADDR_NONE},
+  {"1410", INADDR_NONE},
+  {"1.1410", INADDR_NONE},
+  {"1.1410.", INADDR_NONE},
+  {"1.1410", INADDR_NONE},
+  {"141.76.1111", INADDR_NONE},
+  {"141.76.1111.", INADDR_NONE}
+};
+
+
+static int
+do_test (void)
+{
+  int errors = 0;
+  size_t i;
+  uint32_t res;
+
+  for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
+    {
+      printf ("Testing: %s\n", tests[i].network);
+      res = inet_network (tests[i].network);
+
+      if (res != tests[i].number)
+	{
+	  ++errors;
+	  printf ("Test failed for inet_network (\"%s\"):\n",
+		  tests[i].network);
+	  printf ("Expected return value %u (0x%x) but got %u (0x%x).\n",
+		  tests[i].number, tests[i].number, res, res);
+	}
+
+    }
+
+  return errors != 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/inet/tst-ntoa.c b/ap/libc/glibc/glibc-2.23/inet/tst-ntoa.c
new file mode 100644
index 0000000..ef82d4d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/inet/tst-ntoa.c
@@ -0,0 +1,39 @@
+#include <stdio.h>
+#include <string.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+
+
+static int
+test (unsigned int inaddr, const char *expected)
+{
+  struct in_addr addr;
+  char *res;
+  int fail;
+
+  addr.s_addr = htonl (inaddr);
+  res = inet_ntoa (addr);
+  fail = strcmp (res, expected);
+
+  printf ("%#010x -> \"%s\" -> %s%s\n", inaddr, res,
+	  fail ? "fail, expected" : "ok", fail ? expected : "");
+
+  return fail;
+}
+
+
+static int
+do_test (void)
+{
+  int result = 0;
+
+  result |= test (INADDR_LOOPBACK, "127.0.0.1");
+  result |= test (INADDR_BROADCAST, "255.255.255.255");
+  result |= test (INADDR_ANY, "0.0.0.0");
+  result |= test (0xc0060746, "192.6.7.70");
+
+  return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
