]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap.c
Prefix routines declared in pcap-int.h with pcap_.
[libpcap] / pcap.c
diff --git a/pcap.c b/pcap.c
index 04aa7441ed1cadc61e5051c3739c64d4bdb25f97..471515831b81df1f21f32c8f702c90c7b67973cc 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -1014,7 +1014,7 @@ get_if_description(const char *name _U_)
  * the new entry, otherwise return NULL and set errbuf to an error message.
  */
 pcap_if_t *
-find_or_add_if(pcap_if_list_t *devlistp, const char *name,
+pcap_find_or_add_if(pcap_if_list_t *devlistp, const char *name,
     bpf_u_int32 if_flags, get_if_flags_func get_flags_func, char *errbuf)
 {
        bpf_u_int32 pcap_flags;
@@ -1048,7 +1048,7 @@ find_or_add_if(pcap_if_list_t *devlistp, const char *name,
         * Attempt to find an entry for this device; if we don't find one,
         * attempt to add one.
         */
-       return (find_or_add_dev(devlistp, name, pcap_flags,
+       return (pcap_find_or_add_dev(devlistp, name, pcap_flags,
            get_flags_func, get_if_description(name), errbuf));
 }
 
@@ -1071,7 +1071,7 @@ find_or_add_if(pcap_if_list_t *devlistp, const char *name,
  * add interfaces even if they have no addresses.)
  */
 int
-add_addr_to_if(pcap_if_list_t *devlistp, const char *name,
+pcap_add_addr_to_if(pcap_if_list_t *devlistp, const char *name,
     bpf_u_int32 if_flags, get_if_flags_func get_flags_func,
     struct sockaddr *addr, size_t addr_size,
     struct sockaddr *netmask, size_t netmask_size,
@@ -1084,7 +1084,7 @@ add_addr_to_if(pcap_if_list_t *devlistp, const char *name,
        /*
         * Check whether the device exists and, if not, add it.
         */
-       curdev = find_or_add_if(devlistp, name, if_flags, get_flags_func,
+       curdev = pcap_find_or_add_if(devlistp, name, if_flags, get_flags_func,
            errbuf);
        if (curdev == NULL) {
                /*
@@ -1106,7 +1106,7 @@ add_addr_to_if(pcap_if_list_t *devlistp, const char *name,
         * address for it; add an entry for that address to the
         * interface's list of addresses.
         */
-       return (add_addr_to_dev(curdev, addr, addr_size, netmask,
+       return (pcap_add_addr_to_dev(curdev, addr, addr_size, netmask,
            netmask_size, broadaddr, broadaddr_size, dstaddr,
            dstaddr_size, errbuf));
 }
@@ -1117,7 +1117,7 @@ add_addr_to_if(pcap_if_list_t *devlistp, const char *name,
  * "curdev" is the entry for that interface.
  */
 int
-add_addr_to_dev(pcap_if_t *curdev,
+pcap_add_addr_to_dev(pcap_if_t *curdev,
     struct sockaddr *addr, size_t addr_size,
     struct sockaddr *netmask, size_t netmask_size,
     struct sockaddr *broadaddr, size_t broadaddr_size,
@@ -1232,7 +1232,7 @@ add_addr_to_dev(pcap_if_t *curdev,
  * return -1 and set errbuf to an error message.
  */
 pcap_if_t *
-find_or_add_dev(pcap_if_list_t *devlistp, const char *name, bpf_u_int32 flags,
+pcap_find_or_add_dev(pcap_if_list_t *devlistp, const char *name, bpf_u_int32 flags,
     get_if_flags_func get_flags_func, const char *description, char *errbuf)
 {
        pcap_if_t *curdev;
@@ -1240,7 +1240,7 @@ find_or_add_dev(pcap_if_list_t *devlistp, const char *name, bpf_u_int32 flags,
        /*
         * Is there already an entry in the list for this device?
         */
-       curdev = find_dev(devlistp, name);
+       curdev = pcap_find_dev(devlistp, name);
        if (curdev != NULL) {
                /*
                 * Yes, return it.
@@ -1265,7 +1265,7 @@ find_or_add_dev(pcap_if_list_t *devlistp, const char *name, bpf_u_int32 flags,
        /*
         * Now, try to add it to the list of devices.
         */
-       return (add_dev(devlistp, name, flags, description, errbuf));
+       return (pcap_add_dev(devlistp, name, flags, description, errbuf));
 }
 
 /*
@@ -1273,7 +1273,7 @@ find_or_add_dev(pcap_if_list_t *devlistp, const char *name, bpf_u_int32 flags,
  * the entry for it if we find it or NULL if we don't.
  */
 pcap_if_t *
-find_dev(pcap_if_list_t *devlistp, const char *name)
+pcap_find_dev(pcap_if_list_t *devlistp, const char *name)
 {
        pcap_if_t *curdev;
 
@@ -1307,7 +1307,7 @@ find_dev(pcap_if_list_t *devlistp, const char *name)
  * If we weren't given a description, try to get one.
  */
 pcap_if_t *
-add_dev(pcap_if_list_t *devlistp, const char *name, bpf_u_int32 flags,
+pcap_add_dev(pcap_if_list_t *devlistp, const char *name, bpf_u_int32 flags,
     const char *description, char *errbuf)
 {
        pcap_if_t *curdev, *prevdev, *nextdev;