Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)  DO NOT MERGE

Bug: 5449033
Change-Id: I9244d927f14c750cd359ebffb1fc1c355a755d5a
diff --git a/libnetutils/dhcpclient.c b/libnetutils/dhcpclient.c
index 4f2d1c1..b38e258 100644
--- a/libnetutils/dhcpclient.c
+++ b/libnetutils/dhcpclient.c
@@ -70,7 +70,7 @@
     vsnprintf(errmsg, sizeof(errmsg), fmt, ap);
     va_end(ap);
 
-    LOGD("%s", errmsg);
+    ALOGD("%s", errmsg);
 }
 
 const char *dhcp_lasterror()
@@ -151,14 +151,14 @@
 void dump_dhcp_info(dhcp_info *info)
 {
     char addr[20], gway[20], mask[20];
-    LOGD("--- dhcp %s (%d) ---",
+    ALOGD("--- dhcp %s (%d) ---",
             dhcp_type_to_name(info->type), info->type);
     strcpy(addr, ipaddr(info->ipaddr));
     strcpy(gway, ipaddr(info->gateway));
-    LOGD("ip %s gw %s prefixLength %d", addr, gway, info->prefixLength);
-    if (info->dns1) LOGD("dns1: %s", ipaddr(info->dns1));
-    if (info->dns2) LOGD("dns2: %s", ipaddr(info->dns2));
-    LOGD("server %s, lease %d seconds",
+    ALOGD("ip %s gw %s prefixLength %d", addr, gway, info->prefixLength);
+    if (info->dns1) ALOGD("dns1: %s", ipaddr(info->dns1));
+    if (info->dns2) ALOGD("dns2: %s", ipaddr(info->dns2));
+    ALOGD("server %s, lease %d seconds",
             ipaddr(info->serveraddr), info->lease);
 }
 
@@ -250,9 +250,9 @@
     const char *name;
     char buf[2048];
 
-    LOGD("===== DHCP message:");
+    ALOGD("===== DHCP message:");
     if (len < DHCP_MSG_FIXED_SIZE) {
-        LOGD("Invalid length %d, should be %d", len, DHCP_MSG_FIXED_SIZE);
+        ALOGD("Invalid length %d, should be %d", len, DHCP_MSG_FIXED_SIZE);
         return;
     }
 
@@ -264,18 +264,18 @@
         name = "BOOTREPLY";
     else
         name = "????";
-    LOGD("op = %s (%d), htype = %d, hlen = %d, hops = %d",
+    ALOGD("op = %s (%d), htype = %d, hlen = %d, hops = %d",
            name, msg->op, msg->htype, msg->hlen, msg->hops);
-    LOGD("xid = 0x%08x secs = %d, flags = 0x%04x optlen = %d",
+    ALOGD("xid = 0x%08x secs = %d, flags = 0x%04x optlen = %d",
            ntohl(msg->xid), ntohs(msg->secs), ntohs(msg->flags), len);
-    LOGD("ciaddr = %s", ipaddr(msg->ciaddr));
-    LOGD("yiaddr = %s", ipaddr(msg->yiaddr));
-    LOGD("siaddr = %s", ipaddr(msg->siaddr));
-    LOGD("giaddr = %s", ipaddr(msg->giaddr));
+    ALOGD("ciaddr = %s", ipaddr(msg->ciaddr));
+    ALOGD("yiaddr = %s", ipaddr(msg->yiaddr));
+    ALOGD("siaddr = %s", ipaddr(msg->siaddr));
+    ALOGD("giaddr = %s", ipaddr(msg->giaddr));
 
     c = msg->hlen > 16 ? 16 : msg->hlen;
     hex2str(buf, msg->chaddr, c);
-    LOGD("chaddr = {%s}", buf);
+    ALOGD("chaddr = {%s}", buf);
 
     for (n = 0; n < 64; n++) {
         if ((msg->sname[n] < ' ') || (msg->sname[n] > 127)) {
@@ -293,8 +293,8 @@
     }
     msg->file[127] = 0;
 
-    LOGD("sname = '%s'", msg->sname);
-    LOGD("file = '%s'", msg->file);
+    ALOGD("sname = '%s'", msg->sname);
+    ALOGD("file = '%s'", msg->file);
 
     if (len < 4) return;
     len -= 4;
@@ -327,7 +327,7 @@
             name = dhcp_type_to_name(x[2]);
         else
             name = NULL;
-        LOGD("op %d len %d {%s} %s", x[0], optsz, buf, name == NULL ? "" : name);
+        ALOGD("op %d len %d {%s} %s", x[0], optsz, buf, name == NULL ? "" : name);
         len -= optsz;
         x = x + optsz + 2;
     }
@@ -347,28 +347,28 @@
 static int is_valid_reply(dhcp_msg *msg, dhcp_msg *reply, int sz)
 {
     if (sz < DHCP_MSG_FIXED_SIZE) {
-        if (verbose) LOGD("netcfg: Wrong size %d != %d\n", sz, DHCP_MSG_FIXED_SIZE);
+        if (verbose) ALOGD("netcfg: Wrong size %d != %d\n", sz, DHCP_MSG_FIXED_SIZE);
         return 0;
     }
     if (reply->op != OP_BOOTREPLY) {
-        if (verbose) LOGD("netcfg: Wrong Op %d != %d\n", reply->op, OP_BOOTREPLY);
+        if (verbose) ALOGD("netcfg: Wrong Op %d != %d\n", reply->op, OP_BOOTREPLY);
         return 0;
     }
     if (reply->xid != msg->xid) {
-        if (verbose) LOGD("netcfg: Wrong Xid 0x%x != 0x%x\n", ntohl(reply->xid),
+        if (verbose) ALOGD("netcfg: Wrong Xid 0x%x != 0x%x\n", ntohl(reply->xid),
                           ntohl(msg->xid));
         return 0;
     }
     if (reply->htype != msg->htype) {
-        if (verbose) LOGD("netcfg: Wrong Htype %d != %d\n", reply->htype, msg->htype);
+        if (verbose) ALOGD("netcfg: Wrong Htype %d != %d\n", reply->htype, msg->htype);
         return 0;
     }
     if (reply->hlen != msg->hlen) {
-        if (verbose) LOGD("netcfg: Wrong Hlen %d != %d\n", reply->hlen, msg->hlen);
+        if (verbose) ALOGD("netcfg: Wrong Hlen %d != %d\n", reply->hlen, msg->hlen);
         return 0;
     }
     if (memcmp(msg->chaddr, reply->chaddr, msg->hlen)) {
-        if (verbose) LOGD("netcfg: Wrong chaddr %x != %x\n", *(reply->chaddr),*(msg->chaddr));
+        if (verbose) ALOGD("netcfg: Wrong chaddr %x != %x\n", *(reply->chaddr),*(msg->chaddr));
         return 0;
     }
     return 1;
@@ -469,7 +469,7 @@
         r = receive_packet(s, &reply);
         if (r < 0) {
             if (errno != 0) {
-                LOGD("receive_packet failed (%d): %s", r, strerror(errno));
+                ALOGD("receive_packet failed (%d): %s", r, strerror(errno));
                 if (errno == ENETDOWN || errno == ENXIO) {
                     return -1;
                 }
diff --git a/libnetutils/ifc_utils.c b/libnetutils/ifc_utils.c
index 0a2f760..f08a14d 100644
--- a/libnetutils/ifc_utils.c
+++ b/libnetutils/ifc_utils.c
@@ -46,7 +46,7 @@
 #else
 #include <stdio.h>
 #include <string.h>
-#define LOGD printf
+#define ALOGD printf
 #define LOGW printf
 #endif
 
@@ -686,7 +686,7 @@
         init_sockaddr_in(&rt.rt_genmask, mask);
         addr.s_addr = dest;
         if (ioctl(ifc_ctl_sock, SIOCDELRT, &rt) < 0) {
-            LOGD("failed to remove route for %s to %s: %s",
+            ALOGD("failed to remove route for %s to %s: %s",
                  ifname, inet_ntoa(addr), strerror(errno));
         }
     }
@@ -752,7 +752,7 @@
     ifc_init();
     addr.s_addr = gateway;
     if ((result = ifc_create_default_route(ifname, gateway)) < 0) {
-        LOGD("failed to add %s as default route for %s: %s",
+        ALOGD("failed to add %s as default route for %s: %s",
              inet_ntoa(addr), ifname, strerror(errno));
     }
     ifc_close();
@@ -773,7 +773,7 @@
     rt.rt_flags = RTF_UP|RTF_GATEWAY;
     init_sockaddr_in(&rt.rt_dst, 0);
     if ((result = ioctl(ifc_ctl_sock, SIOCDELRT, &rt)) < 0) {
-        LOGD("failed to remove default route for %s: %s", ifname, strerror(errno));
+        ALOGD("failed to remove default route for %s: %s", ifname, strerror(errno));
     }
     ifc_close();
     return result;
diff --git a/libnetutils/packet.c b/libnetutils/packet.c
index 9388345..f9112b5 100644
--- a/libnetutils/packet.c
+++ b/libnetutils/packet.c
@@ -31,7 +31,7 @@
 #else
 #include <stdio.h>
 #include <string.h>
-#define LOGD printf
+#define ALOGD printf
 #define LOGW printf
 #endif
 
@@ -179,23 +179,23 @@
     is_valid = 0;
     if (nread < (int)(sizeof(struct iphdr) + sizeof(struct udphdr))) {
 #if VERBOSE
-        LOGD("Packet is too small (%d) to be a UDP datagram", nread);
+        ALOGD("Packet is too small (%d) to be a UDP datagram", nread);
 #endif
     } else if (packet.ip.version != IPVERSION || packet.ip.ihl != (sizeof(packet.ip) >> 2)) {
 #if VERBOSE
-        LOGD("Not a valid IP packet");
+        ALOGD("Not a valid IP packet");
 #endif
     } else if (nread < ntohs(packet.ip.tot_len)) {
 #if VERBOSE
-        LOGD("Packet was truncated (read %d, needed %d)", nread, ntohs(packet.ip.tot_len));
+        ALOGD("Packet was truncated (read %d, needed %d)", nread, ntohs(packet.ip.tot_len));
 #endif
     } else if (packet.ip.protocol != IPPROTO_UDP) {
 #if VERBOSE
-        LOGD("IP protocol (%d) is not UDP", packet.ip.protocol);
+        ALOGD("IP protocol (%d) is not UDP", packet.ip.protocol);
 #endif
     } else if (packet.udp.dest != htons(PORT_BOOTP_CLIENT)) {
 #if VERBOSE
-        LOGD("UDP dest port (%d) is not DHCP client", ntohs(packet.udp.dest));
+        ALOGD("UDP dest port (%d) is not DHCP client", ntohs(packet.udp.dest));
 #endif
     } else {
         is_valid = 1;