about summary refs log tree commit diff
path: root/include/ifaddrs.h
Commit message (Collapse)AuthorAgeFilesLines
* hurd: Fix `getifaddrs' and `freeifaddrs' symbol expositionSamuel Thibault2017-09-281-0/+5
| | | | | | | | | | | | | | | from `freeaddrinfo'. `getifaddrs' and `freeifaddrs' are not in POSIX, they should not be exposed along `freeaddrinfo' (through `__check_pf') which is POSIX. * include/ifaddrs.h (__getifaddrs, __freeifaddrs): New declarations, and use libc_hidden_def on them. * inet/ifaddrs.c (__getifaddrs, __freeifaddrs): Use libc_hidden_def on them. * sysdeps/gnu/ifaddrs.c (__getifaddrs, __freeifaddrs): Likewise. * inet/check_pf.c (__check_pf): Use __getifaddrs and __freeifaddrs instead of getifaddrs and freeifaddrs.
* Installed header hygiene (BZ#20366): Test of installed headers.Zack Weinberg2016-09-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a test to ensure that the problems fixed in the last several patches do not recur. Each directory checks the headers that it installs for two properties: first, each header must be compilable in isolation, as both C and C++, under a representative combination of language and library conformance levels; second, there is a blacklist of identifiers that may not appear in any installed header, currently consisting of the legacy BSD typedefs. (There is an exemption for the headers that define those typedefs, and for the RPC headers. It may be necessary to make this more sophisticated if we add more stuff to the blacklist in the future.) In order for this test to work correctly, every wrapper header that actually defines something must guard those definitions with #ifndef _ISOMAC. This is the existing mechanism used by the conform/ tests to tell wrapper headers not to define anything that the public header wouldn't, and not to use anything from libc-symbols.h. conform/ only cares for headers that we need to check for standards conformance, whereas this test applies to *every* header. (Headers in include/ that are either installed directly, or are internal-use-only and do *not* correspond to any installed header, are not affected.) * scripts/check-installed-headers.sh: New script. * Rules: In each directory that defines header files to be installed, run check-installed-headers.sh on them as a special test. * Makefile: Likewise for the headers installed at top level. * include/aliases.h, include/alloca.h, include/argz.h * include/arpa/nameser.h, include/arpa/nameser_compat.h * include/elf.h, include/envz.h, include/err.h * include/execinfo.h, include/fpu_control.h, include/getopt.h * include/gshadow.h, include/ifaddrs.h, include/libintl.h * include/link.h, include/malloc.h, include/mcheck.h * include/mntent.h, include/netinet/ether.h * include/nss.h, include/obstack.h, include/printf.h * include/pty.h, include/resolv.h, include/rpc/auth.h * include/rpc/auth_des.h, include/rpc/auth_unix.h * include/rpc/clnt.h, include/rpc/des_crypt.h * include/rpc/key_prot.h, include/rpc/netdb.h * include/rpc/pmap_clnt.h, include/rpc/pmap_prot.h * include/rpc/pmap_rmt.h, include/rpc/rpc.h * include/rpc/rpc_msg.h, include/rpc/svc.h * include/rpc/svc_auth.h, include/rpc/xdr.h * include/rpcsvc/nis_callback.h, include/rpcsvc/nislib.h * include/rpcsvc/yp.h, include/rpcsvc/ypclnt.h * include/rpcsvc/ypupd.h, include/shadow.h * include/stdio_ext.h, include/sys/epoll.h * include/sys/file.h, include/sys/gmon.h, include/sys/ioctl.h * include/sys/prctl.h, include/sys/profil.h * include/sys/statfs.h, include/sys/sysctl.h * include/sys/sysinfo.h, include/ttyent.h, include/utmp.h * sysdeps/arm/nacl/include/bits/setjmp.h * sysdeps/mips/include/sys/asm.h * sysdeps/unix/sysv/linux/include/sys/sysinfo.h * sysdeps/unix/sysv/linux/include/sys/timex.h * sysdeps/x86/fpu/include/bits/fenv.h: Add #ifndef _ISOMAC guard around internal declarations. Add multiple-inclusion guard if not already present.
* Remove IS_IN_nscdSiddhesh Poyarekar2014-11-241-1/+1
| | | | | | | | | Replace with IS_IN (nscd). Generated code unchanged on x86_64. * include/ifaddrs.h: Use IS_IN. * inet/check_pf.c: Likewise. * sysdeps/unix/sysv/linux/check_pf.c: Likewise. * nscd/Makefile (CPPFLAGS-nscd): Remove IS_IN_nscd.
* Cache network interface informationUlrich Drepper2011-10-311-0/+5
| | | | | | | | | | | | Whenever getaddrinfo needed network interface information it used the netlink interface to read the information every single time. The problem is that this information can change at any time. The patch implements monitoring of the network interfaces through nscd. If no change is detected the previously read information can be reused (which is the norm). This timestamp information is also made available to other processes using the shared memory segment between nscd and those processes.
* * include/ifaddrs.h: Remove in6ai_temporary.Ulrich Drepper2007-11-141-2/+5
| | | | | | | | | | | | | | | | | (struct in6addrinfo): Add index element. Declare __check_native. * inet/Makefile (aux): Add check_native. * sysdeps/unix/sysv/linux/check_native.c: New file. * sysdeps/unix/sysv/linux/check_pf.c: No need to recognize IFA_F_TEMPORARY. Pass back ifa_index. * sysdeps/posix/getaddrinfo.c: Remove netlink compatibility code. (rfc3484_sort): Add new parameter. Implement rule 7 correctly: call __check_native if necessary. (getaddrinfo): Fill in index field. Use qsort_r instead of qsort to sort addresses. Pass information about the results. * posix/tst-rfc3484.c: Adjust for addition of index field and change of rfc3484_sort interface. * posix/tst-rfc3484-2.c: Likewise.
* (struct in6addrinfo): Add prefixlen field.Ulrich Drepper2007-11-121-1/+3
|
* * sysdeps/posix/getaddrinfo.c (rfc3484_sort): Implement rule 4,Ulrich Drepper2006-09-241-1/+2
| | | | | | | | home addresses. * sysdeps/unix/sysv/linux/check_pf.c (make_request): Recognize IFA_F_HOMEADDRESS flag for interfaces. * include/ifaddrs.h (struct in6addrinfo): Define in6ai_homeaddress.
* * include/ifaddrs.h: Get uint32_t definition.Ulrich Drepper2006-04-201-0/+1
| | | | | * posix/tst-rfc3484.c: Update fake __check_pf implementation. * posix/tst-rfc3484-2.c: Likewise.
* * include/ifaddrs.h: Define struct in6addrinfo.Ulrich Drepper2006-04-161-1/+12
| | | | | | | | | | | | | | | | | Add two more parameters to __check_pf. * sysdeps/unix/sysv/linux/check_pf.c: When using the netlink interface, determine whether IPv6 addresses are deprecated or temporary. Create array of those addresses. * inet/check_pf.c: Always tell caller there are no depracated and temporary addresses. * sysdeps/posix/getaddrinfo.c: Pretty printing. (struct sort_result): Add source_addr_flags field. (rfc3484_sort): Implement rule 3 and 7. (in6aicmp): New function. (getaddrinfo): Call __check_pf also when we need info about IPv6 source addresses. When creating array for sorting addresses, look up deprecated and temporary addresses returned by __check_pf and add flag if necessary.
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-221-14/+1
|
* 2.5-18.1Jakub Jelinek2007-07-121-1/+14
|
* Update.Ulrich Drepper2003-06-101-0/+3
| | | | | | | | | | | | | * inet/Makefile (aux): Add check_fd. * include/ifaddrs.h: Add prototype for __check_fd. * sysdeps/generic/check_fd.c: New file. * sysdeps/unix/sysv/linux/check_fd.c: New file. * sysdeps/unix/sysv/linux/ifaddrs.h (__no_netlink_support): Renamed from no_netlink_support. Export. * sysdeps/posix/getaddrinfo.c (getaddrinfo): Don't call getifaddrs, call __check_pf. * sysdeps/generic/ifaddrs.h: Add libc_hidden_def.
* Internal shadow header for <ifaddrs.h>.Ulrich Drepper2003-04-241-0/+7