diff options
author | Elliott Hughes <enh@google.com> | 2015-02-02 14:37:07 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-02-03 11:08:07 -0800 |
commit | f8e83054cb8a8b13ee84a4aeeaa0a2fd8debca81 (patch) | |
tree | 6f3b04a2c9c8c96c4b2834dd934041d25c5215a9 /libnetutils | |
parent | 520ca3e13a134386762c3fc754a8bc2e51af3c2f (diff) | |
download | system_core-f8e83054cb8a8b13ee84a4aeeaa0a2fd8debca81.zip system_core-f8e83054cb8a8b13ee84a4aeeaa0a2fd8debca81.tar.gz system_core-f8e83054cb8a8b13ee84a4aeeaa0a2fd8debca81.tar.bz2 |
Remove netcfg's unused options.
Only "netcfg" for a list of interfaces and "netcfg <interface> dhcp" still
seem to be used.
Change-Id: Iaf499c06b09ffe5e0925339b9cd6e502f3234a86
Diffstat (limited to 'libnetutils')
-rw-r--r-- | libnetutils/dhcpclient.c | 14 | ||||
-rw-r--r-- | libnetutils/ifc_utils.c | 20 |
2 files changed, 7 insertions, 27 deletions
diff --git a/libnetutils/dhcpclient.c b/libnetutils/dhcpclient.c index 700b02f..a05b7cb 100644 --- a/libnetutils/dhcpclient.c +++ b/libnetutils/dhcpclient.c @@ -353,28 +353,28 @@ static int send_message(int sock, int if_index, dhcp_msg *msg, int size) static int is_valid_reply(dhcp_msg *msg, dhcp_msg *reply, int sz) { if (sz < DHCP_MSG_FIXED_SIZE) { - if (verbose) ALOGD("netcfg: Wrong size %d != %d\n", sz, DHCP_MSG_FIXED_SIZE); + if (verbose) ALOGD("Wrong size %d != %d\n", sz, DHCP_MSG_FIXED_SIZE); return 0; } if (reply->op != OP_BOOTREPLY) { - if (verbose) ALOGD("netcfg: Wrong Op %d != %d\n", reply->op, OP_BOOTREPLY); + if (verbose) ALOGD("Wrong Op %d != %d\n", reply->op, OP_BOOTREPLY); return 0; } if (reply->xid != msg->xid) { - if (verbose) ALOGD("netcfg: Wrong Xid 0x%x != 0x%x\n", ntohl(reply->xid), - ntohl(msg->xid)); + if (verbose) ALOGD("Wrong Xid 0x%x != 0x%x\n", ntohl(reply->xid), + ntohl(msg->xid)); return 0; } if (reply->htype != msg->htype) { - if (verbose) ALOGD("netcfg: Wrong Htype %d != %d\n", reply->htype, msg->htype); + if (verbose) ALOGD("Wrong Htype %d != %d\n", reply->htype, msg->htype); return 0; } if (reply->hlen != msg->hlen) { - if (verbose) ALOGD("netcfg: Wrong Hlen %d != %d\n", reply->hlen, msg->hlen); + if (verbose) ALOGD("Wrong Hlen %d != %d\n", reply->hlen, msg->hlen); return 0; } if (memcmp(msg->chaddr, reply->chaddr, msg->hlen)) { - if (verbose) ALOGD("netcfg: Wrong chaddr %x != %x\n", *(reply->chaddr),*(msg->chaddr)); + if (verbose) ALOGD("Wrong chaddr %x != %x\n", *(reply->chaddr),*(msg->chaddr)); return 0; } return 1; diff --git a/libnetutils/ifc_utils.c b/libnetutils/ifc_utils.c index bfe7121..ab6c654 100644 --- a/libnetutils/ifc_utils.c +++ b/libnetutils/ifc_utils.c @@ -639,26 +639,6 @@ int ifc_reset_connections(const char *ifname, const int reset_mask) #endif } -/* - * Removes the default route for the named interface. - */ -int ifc_remove_default_route(const char *ifname) -{ - struct rtentry rt; - int result; - - ifc_init(); - memset(&rt, 0, sizeof(rt)); - rt.rt_dev = (void *)ifname; - rt.rt_flags = RTF_UP|RTF_GATEWAY; - init_sockaddr_in(&rt.rt_dst, 0); - if ((result = ioctl(ifc_ctl_sock, SIOCDELRT, &rt)) < 0) { - ALOGD("failed to remove default route for %s: %s", ifname, strerror(errno)); - } - ifc_close(); - return result; -} - int ifc_configure(const char *ifname, in_addr_t address, |