aboutsummaryrefslogtreecommitdiff
path: root/inet
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-10-31 01:51:16 -0400
committerUlrich Drepper <drepper@gmail.com>2011-10-31 01:51:16 -0400
commit3a2c02424d9824f5cdea4ebd32ff929b2b1f49c6 (patch)
treede7827ff96076cb4d181ed781c418601906fa772 /inet
parent636064eb4c03397c86aa26e489e68f952bd5e53f (diff)
downloadglibc-3a2c02424d9824f5cdea4ebd32ff929b2b1f49c6.tar
glibc-3a2c02424d9824f5cdea4ebd32ff929b2b1f49c6.tar.gz
glibc-3a2c02424d9824f5cdea4ebd32ff929b2b1f49c6.tar.bz2
glibc-3a2c02424d9824f5cdea4ebd32ff929b2b1f49c6.zip
Cache network interface information
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.
Diffstat (limited to 'inet')
-rw-r--r--inet/check_pf.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/inet/check_pf.c b/inet/check_pf.c
index b015432659..0fa34ccbbd 100644
--- a/inet/check_pf.c
+++ b/inet/check_pf.c
@@ -1,5 +1,5 @@
/* Determine protocol families for which interfaces exist. Generic version.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2011 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
@@ -54,3 +54,19 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
(void) freeifaddrs (ifa);
}
+
+
+void
+__free_in6ai (struct in6addrinfo *in6ai)
+{
+ /* Nothing to do. */
+}
+
+
+#ifdef IS_IN_nscd
+uint32_t
+__bump_nl_timestamp (void)
+{
+ return 0;
+}
+#endif