Revision: 14843
Author: adrian.chadd
Date: Tue Jan 11 23:15:40 2011
Log: Add a function to return the address family of the current ipcache
entry.
It's just IPv4 for now. It'll eventually grow to become ipv6-aware.
http://code.google.com/p/lusca-cache/source/detail?r=14843
Modified:
/playpen/LUSCA_HEAD_ipv6/libsqname/ipcache.c
/playpen/LUSCA_HEAD_ipv6/libsqname/ipcache.h
=======================================
--- /playpen/LUSCA_HEAD_ipv6/libsqname/ipcache.c Tue Jan 11 21:26:33 2011
+++ /playpen/LUSCA_HEAD_ipv6/libsqname/ipcache.c Tue Jan 11 23:15:40 2011
@@ -734,3 +734,10 @@
sqinet_set_v4_inaddr(a, &ia->in_addrs[i]);
return 1;
}
+
+/* XXX for now - this'll grow ipv6-ness when in_addrs is ipv6 aware */
+int
+ipcacheGetAddrFamily(const ipcache_addrs *ia, int i)
+{
+ return AF_INET;
+}
=======================================
--- /playpen/LUSCA_HEAD_ipv6/libsqname/ipcache.h Tue Jan 11 21:26:33 2011
+++ /playpen/LUSCA_HEAD_ipv6/libsqname/ipcache.h Tue Jan 11 23:15:40 2011
@@ -65,8 +65,10 @@
extern void ipcache_restart(void);
extern int ipcacheAddEntryFromHosts(const char *name, const char *ipaddr);
extern int ipcacheFlushAll(void);
+
extern struct in_addr ipcacheGetAddrV4(const ipcache_addrs *, int i);
extern int ipcacheGetAddr(const ipcache_addrs *, int i, sqaddr_t *a);
+extern int ipcacheGetAddrFamily(const ipcache_addrs *, int i);
#endif
--
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en.