diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-02 16:52:02 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-02 16:52:02 -0600 |
commit | d559bea3ebb08291f2312551bfb43c91ba03c18c (patch) | |
tree | 8f2bce9ac07964ef0cc8923400768bf18e10d37e /apps/nshlib | |
parent | 7f24c737b4d75340484337f5418c08c5de8c981d (diff) | |
download | px4-nuttx-d559bea3ebb08291f2312551bfb43c91ba03c18c.tar.gz px4-nuttx-d559bea3ebb08291f2312551bfb43c91ba03c18c.tar.bz2 px4-nuttx-d559bea3ebb08291f2312551bfb43c91ba03c18c.zip |
NET: Rename functions in apps/netutils/netlib to begin with netlib_ vs uip_
Diffstat (limited to 'apps/nshlib')
-rw-r--r-- | apps/nshlib/nsh_netcmds.c | 22 | ||||
-rw-r--r-- | apps/nshlib/nsh_netinit.c | 16 |
2 files changed, 19 insertions, 19 deletions
diff --git a/apps/nshlib/nsh_netcmds.c b/apps/nshlib/nsh_netcmds.c index b05b547f7..92aa7a0a5 100644 --- a/apps/nshlib/nsh_netcmds.c +++ b/apps/nshlib/nsh_netcmds.c @@ -287,7 +287,7 @@ int ifconfig_callback(FAR struct net_driver_s *dev, void *arg) const char *status; int ret; - ret = uip_getifstatus(dev->d_ifname, &iff); + ret = netlib_getifstatus(dev->d_ifname, &iff); if (ret != OK) { nsh_output(vtbl, "\tGet %s interface flags error: %d\n", @@ -546,7 +546,7 @@ int cmd_ifup(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) } intf = argv[1]; - ret = uip_ifup(intf); + ret = netlib_ifup(intf); nsh_output(vtbl, "ifup %s...%s\n", intf, (ret == OK) ? "OK" : "Failed"); return ret; } @@ -570,7 +570,7 @@ int cmd_ifdown(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) } intf = argv[1]; - ret = uip_ifdown(intf); + ret = netlib_ifdown(intf); nsh_output(vtbl, "ifdown %s...%s\n", intf, (ret == OK) ? "OK" : "Failed"); return ret; } @@ -712,7 +712,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) if (hw) { ndbg("HW MAC: %s\n", hw); - uip_setmacaddr(intf, mac); + netlib_setmacaddr(intf, mac); } #endif @@ -733,7 +733,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) gip = addr.s_addr = inet_addr(hostip); } - uip_sethostaddr(intf, &addr); + netlib_sethostaddr(intf, &addr); /* Set gateway */ @@ -756,7 +756,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) addr.s_addr = gip; } - uip_setdraddr(intf, &addr); + netlib_setdraddr(intf, &addr); /* Set network mask */ @@ -771,7 +771,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) addr.s_addr = inet_addr("255.255.255.0"); } - uip_setnetmask(intf, &addr); + netlib_setnetmask(intf, &addr); #if defined(CONFIG_NSH_DHCPC) || defined(CONFIG_NSH_DNS) if (dns) @@ -793,7 +793,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) if (!gip) { - uip_getmacaddr("eth0", mac); + netlib_getmacaddr("eth0", mac); /* Set up the DHCPC modules */ @@ -808,16 +808,16 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) struct dhcpc_state ds; (void)dhcpc_request(handle, &ds); - uip_sethostaddr("eth0", &ds.ipaddr); + netlib_sethostaddr("eth0", &ds.ipaddr); if (ds.netmask.s_addr != 0) { - uip_setnetmask("eth0", &ds.netmask); + netlib_setnetmask("eth0", &ds.netmask); } if (ds.default_router.s_addr != 0) { - uip_setdraddr("eth0", &ds.default_router); + netlib_setdraddr("eth0", &ds.default_router); } if (ds.dnsaddr.s_addr != 0) diff --git a/apps/nshlib/nsh_netinit.c b/apps/nshlib/nsh_netinit.c index 8c09319f8..b59eaf571 100644 --- a/apps/nshlib/nsh_netinit.c +++ b/apps/nshlib/nsh_netinit.c @@ -123,7 +123,7 @@ int nsh_netinit(void) mac[3] = 0xad; mac[4] = 0xbe; mac[5] = 0xef; - uip_setmacaddr(NET_DEVNAME, mac); + netlib_setmacaddr(NET_DEVNAME, mac); #endif /* Set up our host address */ @@ -133,17 +133,17 @@ int nsh_netinit(void) #else addr.s_addr = 0; #endif - uip_sethostaddr(NET_DEVNAME, &addr); + netlib_sethostaddr(NET_DEVNAME, &addr); /* Set up the default router address */ addr.s_addr = HTONL(CONFIG_NSH_DRIPADDR); - uip_setdraddr(NET_DEVNAME, &addr); + netlib_setdraddr(NET_DEVNAME, &addr); /* Setup the subnet mask */ addr.s_addr = HTONL(CONFIG_NSH_NETMASK); - uip_setnetmask(NET_DEVNAME, &addr); + netlib_setnetmask(NET_DEVNAME, &addr); #if defined(CONFIG_NSH_DHCPC) || defined(CONFIG_NSH_DNS) /* Set up the resolver */ @@ -158,7 +158,7 @@ int nsh_netinit(void) #if defined(CONFIG_NSH_DHCPC) /* Get the MAC address of the NIC */ - uip_getmacaddr(NET_DEVNAME, mac); + netlib_getmacaddr(NET_DEVNAME, mac); /* Set up the DHCPC modules */ @@ -172,16 +172,16 @@ int nsh_netinit(void) { struct dhcpc_state ds; (void)dhcpc_request(handle, &ds); - uip_sethostaddr(NET_DEVNAME, &ds.ipaddr); + netlib_sethostaddr(NET_DEVNAME, &ds.ipaddr); if (ds.netmask.s_addr != 0) { - uip_setnetmask(NET_DEVNAME, &ds.netmask); + netlib_setnetmask(NET_DEVNAME, &ds.netmask); } if (ds.default_router.s_addr != 0) { - uip_setdraddr(NET_DEVNAME, &ds.default_router); + netlib_setdraddr(NET_DEVNAME, &ds.default_router); } if (ds.dnsaddr.s_addr != 0) |