mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-01 17:30:07 +00:00
5a82c74822
Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
106 lines
4.2 KiB
C
106 lines
4.2 KiB
C
/* Copyright (C) 1997-2019 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
|
|
<https://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 */
|