summaryrefslogtreecommitdiffstats
path: root/libnetutils
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2016-09-28 10:07:20 -0700
committerMark Salyzyn <salyzyn@google.com>2016-09-30 12:47:05 -0700
commit66ce3e08c5632a20ea66bde6dd76397041edf034 (patch)
treee77589e0f6c62e8ac1c8faabe2d9dd2934d3ecee /libnetutils
parent0dd4431072cce3c62876b728cb20aa5b77b11a8d (diff)
downloadcore-66ce3e08c5632a20ea66bde6dd76397041edf034.tar.gz
core-66ce3e08c5632a20ea66bde6dd76397041edf034.tar.bz2
core-66ce3e08c5632a20ea66bde6dd76397041edf034.zip
system/core Replace cutils/log.h with android/log.h
Should use android/log.h instead of cutils/log.h as a good example to all others. Adjust header order to comply with Android Coding standards. Test: Compile Bug: 26552300 Bug: 31289077 Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
Diffstat (limited to 'libnetutils')
-rw-r--r--libnetutils/dhcpclient.c26
-rw-r--r--libnetutils/ifc_utils.c50
-rw-r--r--libnetutils/packet.c29
3 files changed, 49 insertions, 56 deletions
diff --git a/libnetutils/dhcpclient.c b/libnetutils/dhcpclient.c
index 240a7891e..d17bdd3c2 100644
--- a/libnetutils/dhcpclient.c
+++ b/libnetutils/dhcpclient.c
@@ -14,27 +14,25 @@
* limitations under the License.
*/
-#include <stdio.h>
+#define LOG_TAG "DHCP"
+
+#include <dirent.h>
+#include <errno.h>
+#include <poll.h>
+#include <netinet/in.h>
#include <stdarg.h>
#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
+#include <stdio.h>
#include <string.h>
-
-#include <time.h>
-#include <sys/time.h>
-#include <poll.h>
-
-#include <sys/socket.h>
#include <sys/select.h>
+#include <sys/socket.h>
+#include <sys/time.h>
#include <sys/types.h>
-#include <netinet/in.h>
+#include <time.h>
+#include <unistd.h>
+#include <android/log.h>
#include <cutils/properties.h>
-#define LOG_TAG "DHCP"
-#include <cutils/log.h>
-
-#include <dirent.h>
#include <netutils/ifc.h>
#include "dhcpmsg.h"
diff --git a/libnetutils/ifc_utils.c b/libnetutils/ifc_utils.c
index eae32ce36..275327ab4 100644
--- a/libnetutils/ifc_utils.c
+++ b/libnetutils/ifc_utils.c
@@ -1,34 +1,21 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <sys/socket.h>
-#include <sys/select.h>
-#include <sys/types.h>
-#include <netinet/in.h>
#include <arpa/inet.h>
-#include <net/if.h>
-#include <netdb.h>
-
+#include <errno.h>
#include <linux/if.h>
#include <linux/if_ether.h>
#include <linux/if_arp.h>
@@ -37,20 +24,29 @@
#include <linux/ipv6_route.h>
#include <linux/rtnetlink.h>
#include <linux/sockios.h>
-
-#include "netutils/ifc.h"
+#include <net/if.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/select.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
#ifdef ANDROID
#define LOG_TAG "NetUtils"
-#include <cutils/log.h>
+#include <android/log.h>
#include <cutils/properties.h>
#else
-#include <stdio.h>
-#include <string.h>
#define ALOGD printf
#define ALOGW printf
#endif
+#include "netutils/ifc.h"
+
#if defined(__ANDROID__)
/* SIOCKILLADDR is an Android extension. */
#define SIOCKILLADDR 0x8939
diff --git a/libnetutils/packet.c b/libnetutils/packet.c
index cd26d058a..56168e844 100644
--- a/libnetutils/packet.c
+++ b/libnetutils/packet.c
@@ -1,37 +1,36 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-#include <sys/uio.h>
#include <sys/socket.h>
+#include <sys/uio.h>
+#include <linux/if_ether.h>
+#include <linux/if_packet.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
-#include <linux/if_packet.h>
-#include <linux/if_ether.h>
-#include <errno.h>
+#include <unistd.h>
#ifdef ANDROID
#define LOG_TAG "DHCP"
-#include <cutils/log.h>
+#include <android/log.h>
#else
#include <stdio.h>
-#include <string.h>
#define ALOGD printf
#define ALOGW printf
#endif