]> The Tcpdump Group git mirrors - libpcap/commitdiff
revert renaming of pcap_nametoaddrinfo to pcap_nametoaddr. this gets
authoritojun <itojun>
Thu, 27 Apr 2000 09:18:57 +0000 (09:18 +0000)
committeritojun <itojun>
Thu, 27 Apr 2000 09:18:57 +0000 (09:18 +0000)
painful when upgrading old libpcap to tcpdump.org pcap (function rename
usually requires shlib major number bump, while api addition only require
minor)

gencode.c
nametoaddr.c
pcap-namedb.h

index e5fccc3ac18b122fa9b2d45c4d8e5485e0c9c0ee..e1b5ad5350db2e839c5073b8af0fa78db76be01c 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -21,7 +21,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.106 2000-04-27 09:11:11 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.107 2000-04-27 09:18:57 itojun Exp $ (LBL)";
 #endif
 
 #include <sys/types.h>
@@ -2040,7 +2040,7 @@ gen_scode(name, q)
                        return b;
 #else
                        memset(&mask128, 0xff, sizeof(mask128));
-                       res0 = res = pcap_nametoaddr(name);
+                       res0 = res = pcap_nametoaddrinfo(name);
                        if (res == NULL)
                                bpf_error("unknown host '%s'", name);
                        b = tmp = NULL;
@@ -2294,7 +2294,7 @@ gen_mcode6(s1, s2, masklen, q)
        if (s2)
                bpf_error("no mask %s supported", s2);
 
-       res = pcap_nametoaddr(s1);
+       res = pcap_nametoaddrinfo(s1);
        if (!res)
                bpf_error("invalid ip6 address %s", s1);
        if (res->ai_next)
index 8ec6ba964f19dd015f95e0e3725ffc8b75a4353f..8cc0120a430b66e764508c640508d9f9a84e21f7 100644 (file)
@@ -24,7 +24,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.51 1999-11-25 08:25:35 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.52 2000-04-27 09:18:58 itojun Exp $ (LBL)";
 #endif
 
 #include <sys/param.h>
@@ -74,7 +74,6 @@ static inline int xdtoi(int);
  *  Convert host name to internet address.
  *  Return 0 upon failure.
  */
-#ifndef INET6
 bpf_u_int32 **
 pcap_nametoaddr(const char *name)
 {
@@ -98,9 +97,10 @@ pcap_nametoaddr(const char *name)
        else
                return 0;
 }
-#else
+
+#ifdef INET6
 struct addrinfo *
-pcap_nametoaddr(const char *name)
+pcap_nametoaddrinfo(const char *name)
 {
        struct addrinfo hints, *res;
        int error;
index d08a69bd7ae9c11974fb2745d7335f676905deb2..ccd21fd433144367e0065e86b86b958f16025ecf 100644 (file)
@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * @(#) $Header: /tcpdump/master/libpcap/pcap-namedb.h,v 1.6 1999-10-19 15:18:31 itojun Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap-namedb.h,v 1.7 2000-04-27 09:18:58 itojun Exp $ (LBL)
  */
 
 #ifndef lib_pcap_ethers_h
@@ -54,10 +54,9 @@ struct       pcap_etherent *pcap_next_etherent(FILE *);
 u_char *pcap_ether_hostton(const char*);
 u_char *pcap_ether_aton(const char *);
 
-#ifndef INET6
 bpf_u_int32 **pcap_nametoaddr(const char *);
-#else
-struct addrinfo *pcap_nametoaddr(const char *);
+#ifdef INET6
+struct addrinfo *pcap_nametoaddrinfo(const char *);
 #endif
 bpf_u_int32 pcap_nametonetaddr(const char *);