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/netutils | |
parent | 7f24c737b4d75340484337f5418c08c5de8c981d (diff) | |
download | nuttx-d559bea3ebb08291f2312551bfb43c91ba03c18c.tar.gz nuttx-d559bea3ebb08291f2312551bfb43c91ba03c18c.tar.bz2 nuttx-d559bea3ebb08291f2312551bfb43c91ba03c18c.zip |
NET: Rename functions in apps/netutils/netlib to begin with netlib_ vs uip_
Diffstat (limited to 'apps/netutils')
-rw-r--r-- | apps/netutils/dhcpc/dhcpc.c | 8 | ||||
-rw-r--r-- | apps/netutils/netlib/Makefile | 2 | ||||
-rw-r--r-- | apps/netutils/netlib/netlib_gethostaddr.c | 8 | ||||
-rw-r--r-- | apps/netutils/netlib/netlib_getifstatus.c (renamed from apps/netutils/netlib/netlib_getifflag.c) | 6 | ||||
-rw-r--r-- | apps/netutils/netlib/netlib_getmacaddr.c | 6 | ||||
-rw-r--r-- | apps/netutils/netlib/netlib_ipmsfilter.c | 2 | ||||
-rw-r--r-- | apps/netutils/netlib/netlib_listenon.c | 6 | ||||
-rw-r--r-- | apps/netutils/netlib/netlib_parsehttpurl.c | 6 | ||||
-rw-r--r-- | apps/netutils/netlib/netlib_server.c | 8 | ||||
-rw-r--r-- | apps/netutils/netlib/netlib_setdraddr.c | 8 | ||||
-rw-r--r-- | apps/netutils/netlib/netlib_sethostaddr.c | 8 | ||||
-rw-r--r-- | apps/netutils/netlib/netlib_setifstatus.c (renamed from apps/netutils/netlib/netlib_setifflag.c) | 10 | ||||
-rw-r--r-- | apps/netutils/netlib/netlib_setmacaddr.c | 6 | ||||
-rw-r--r-- | apps/netutils/netlib/netlib_setnetmask.c | 8 | ||||
-rw-r--r-- | apps/netutils/webclient/webclient.c | 4 | ||||
-rw-r--r-- | apps/netutils/webserver/httpd.c | 4 |
16 files changed, 50 insertions, 50 deletions
diff --git a/apps/netutils/dhcpc/dhcpc.c b/apps/netutils/dhcpc/dhcpc.c index 2033be31d..dab1ed8e3 100644 --- a/apps/netutils/dhcpc/dhcpc.c +++ b/apps/netutils/dhcpc/dhcpc.c @@ -447,7 +447,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) /* Save the currently assigned IP address (should be INADDR_ANY) */ oldaddr.s_addr = 0; - uip_gethostaddr("eth0", &oldaddr); + netlib_gethostaddr("eth0", &oldaddr); /* Loop until we receive the lease (or an error occurs) */ @@ -456,7 +456,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) /* Set the IP address to INADDR_ANY. */ newaddr.s_addr = INADDR_ANY; - (void)uip_sethostaddr("eth0", &newaddr); + (void)netlib_sethostaddr("eth0", &newaddr); /* Loop sending DISCOVER until we receive an OFFER from a DHCP * server. We will lock on to the first OFFER and decline any @@ -495,7 +495,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) * out of the loop. */ - (void)uip_sethostaddr("eth0", &presult->ipaddr); + (void)netlib_sethostaddr("eth0", &presult->ipaddr); state = STATE_HAVE_OFFER; } } @@ -587,7 +587,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) { /* An error other than a timeout was received */ - (void)uip_sethostaddr("eth0", &oldaddr); + (void)netlib_sethostaddr("eth0", &oldaddr); return ERROR; } } diff --git a/apps/netutils/netlib/Makefile b/apps/netutils/netlib/Makefile index b42607134..7eb376646 100644 --- a/apps/netutils/netlib/Makefile +++ b/apps/netutils/netlib/Makefile @@ -42,7 +42,7 @@ include $(APPDIR)/Make.defs ASRCS = CSRCS = netlib.c netlib_sethostaddr.c netlib_gethostaddr.c CSRCS += netlib_setdraddr.c netlib_setnetmask.c netlib_parsehttpurl.c -CSRCS += netlib_setifflag.c netlib_getifflag.c +CSRCS += netlib_setifstatus.c netlib_getifstatus.c # These require TCP support diff --git a/apps/netutils/netlib/netlib_gethostaddr.c b/apps/netutils/netlib/netlib_gethostaddr.c index e354ca9de..b772b1ee4 100644 --- a/apps/netutils/netlib/netlib_gethostaddr.c +++ b/apps/netutils/netlib/netlib_gethostaddr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/netlib/uip_gethostaddr.c + * netutils/netlib/netlib_gethostaddr.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -61,7 +61,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: uip_gethostaddr + * Name: netlib_gethostaddr * * Description: * Get the network driver IP address @@ -76,9 +76,9 @@ ****************************************************************************/ #ifdef CONFIG_NET_IPv6 -int uip_gethostaddr(const char *ifname, struct in6_addr *addr) +int netlib_gethostaddr(const char *ifname, struct in6_addr *addr) #else -int uip_gethostaddr(const char *ifname, struct in_addr *addr) +int netlib_gethostaddr(const char *ifname, struct in_addr *addr) #endif { int ret = ERROR; diff --git a/apps/netutils/netlib/netlib_getifflag.c b/apps/netutils/netlib/netlib_getifstatus.c index 8e82afe03..ae0c760fc 100644 --- a/apps/netutils/netlib/netlib_getifflag.c +++ b/apps/netutils/netlib/netlib_getifstatus.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/netlib/uip_getifflag.c + * netutils/netlib/netlib_getifflag.c * * Copyright (C) 2007-2009, 2011, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -58,7 +58,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: uip_getifstatus + * Name: netlib_getifstatus * * Description: * Get the network driver ifup/ifdown status @@ -72,7 +72,7 @@ * ****************************************************************************/ -int uip_getifstatus(FAR const char *ifname, FAR uint8_t *flags) +int netlib_getifstatus(FAR const char *ifname, FAR uint8_t *flags) { int ret = ERROR; if (ifname) diff --git a/apps/netutils/netlib/netlib_getmacaddr.c b/apps/netutils/netlib/netlib_getmacaddr.c index 8923f4bb1..da0e64e6d 100644 --- a/apps/netutils/netlib/netlib_getmacaddr.c +++ b/apps/netutils/netlib/netlib_getmacaddr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/netlib/uip_getmacaddr.c + * netutils/netlib/netlib_getmacaddr.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -57,7 +57,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: uip_getmacaddr + * Name: netlib_getmacaddr * * Description: * Get the network driver IP address @@ -71,7 +71,7 @@ * ****************************************************************************/ -int uip_getmacaddr(const char *ifname, uint8_t *macaddr) +int netlib_getmacaddr(const char *ifname, uint8_t *macaddr) { int ret = ERROR; if (ifname && macaddr) diff --git a/apps/netutils/netlib/netlib_ipmsfilter.c b/apps/netutils/netlib/netlib_ipmsfilter.c index 1068d0804..a5fc96398 100644 --- a/apps/netutils/netlib/netlib_ipmsfilter.c +++ b/apps/netutils/netlib/netlib_ipmsfilter.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/netlib/uip_setmultiaddr.c + * netutils/netlib/netlib_setipmsfilter.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> diff --git a/apps/netutils/netlib/netlib_listenon.c b/apps/netutils/netlib/netlib_listenon.c index cacea174b..5037632d4 100644 --- a/apps/netutils/netlib/netlib_listenon.c +++ b/apps/netutils/netlib/netlib_listenon.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/netlib/uip_listenon.c + * netutils/netlib/netlib_listenon.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -59,7 +59,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: uip_listenon + * Name: netlib_listenon * * Description: * Implement basic server listening @@ -72,7 +72,7 @@ * ****************************************************************************/ -int uip_listenon(uint16_t portno) +int netlib_listenon(uint16_t portno) { struct sockaddr_in myaddr; int listensd; diff --git a/apps/netutils/netlib/netlib_parsehttpurl.c b/apps/netutils/netlib/netlib_parsehttpurl.c index efc88956a..a4d4c7051 100644 --- a/apps/netutils/netlib/netlib_parsehttpurl.c +++ b/apps/netutils/netlib/netlib_parsehttpurl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/netlib/uip_parsehttpurl.c + * netutils/netlib/netlib_parsehttpurl.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -57,10 +57,10 @@ const char g_http[] = "http://"; *****************************************************************************/ /**************************************************************************** - * Name: uip_parsehttpurl + * Name: netlib_parsehttpurl ****************************************************************************/ -int uip_parsehttpurl(const char *url, uint16_t *port, +int netlib_parsehttpurl(const char *url, uint16_t *port, char *hostname, int hostlen, char *filename, int namelen) { diff --git a/apps/netutils/netlib/netlib_server.c b/apps/netutils/netlib/netlib_server.c index c6b3d1631..d2c9ee3e9 100644 --- a/apps/netutils/netlib/netlib_server.c +++ b/apps/netutils/netlib/netlib_server.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/netlib/uip_server.c + * netutils/netlib/netlib_server.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -62,7 +62,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: uip_server + * Name: netlib_server * * Description: * Implement basic server logic @@ -78,7 +78,7 @@ * ****************************************************************************/ -void uip_server(uint16_t portno, pthread_startroutine_t handler, int stacksize) +void netlib_server(uint16_t portno, pthread_startroutine_t handler, int stacksize) { struct sockaddr_in myaddr; #ifdef CONFIG_NET_HAVE_SOLINGER @@ -93,7 +93,7 @@ void uip_server(uint16_t portno, pthread_startroutine_t handler, int stacksize) /* Create a new TCP socket to use to listen for connections */ - listensd = uip_listenon(portno); + listensd = netlib_listenon(portno); if (listensd < 0) { return; diff --git a/apps/netutils/netlib/netlib_setdraddr.c b/apps/netutils/netlib/netlib_setdraddr.c index bdc19d624..a0b3d77c3 100644 --- a/apps/netutils/netlib/netlib_setdraddr.c +++ b/apps/netutils/netlib/netlib_setdraddr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/netlib/uip_setdraddr.c + * netutils/netlib/netlib_setdraddr.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -57,7 +57,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: uip_setdraddr + * Name: netlib_setdraddr * * Description: * Set the default router IP address @@ -72,9 +72,9 @@ ****************************************************************************/ #ifdef CONFIG_NET_IPv6 -int uip_setdraddr(const char *ifname, const struct in6_addr *addr) +int netlib_setdraddr(const char *ifname, const struct in6_addr *addr) #else -int uip_setdraddr(const char *ifname, const struct in_addr *addr) +int netlib_setdraddr(const char *ifname, const struct in_addr *addr) #endif { int ret = ERROR; diff --git a/apps/netutils/netlib/netlib_sethostaddr.c b/apps/netutils/netlib/netlib_sethostaddr.c index ada4431f5..a0f76cb27 100644 --- a/apps/netutils/netlib/netlib_sethostaddr.c +++ b/apps/netutils/netlib/netlib_sethostaddr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/netlib/uip_sethostaddr.c + * netutils/netlib/netlib_sethostaddr.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -57,7 +57,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: uip_sethostaddr + * Name: netlib_sethostaddr * * Description: * Set the network driver IP address @@ -72,9 +72,9 @@ ****************************************************************************/ #ifdef CONFIG_NET_IPv6 -int uip_sethostaddr(const char *ifname, const struct in6_addr *addr) +int netlib_sethostaddr(const char *ifname, const struct in6_addr *addr) #else -int uip_sethostaddr(const char *ifname, const struct in_addr *addr) +int netlib_sethostaddr(const char *ifname, const struct in_addr *addr) #endif { int ret = ERROR; diff --git a/apps/netutils/netlib/netlib_setifflag.c b/apps/netutils/netlib/netlib_setifstatus.c index c7a6dfb73..e20f2240b 100644 --- a/apps/netutils/netlib/netlib_setifflag.c +++ b/apps/netutils/netlib/netlib_setifstatus.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/netlib/uip_setifflag.c + * netutils/netlib/netlib_setifstatus.c * * Copyright (C) 2007-2009, 2011, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -57,7 +57,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: uip_ifup + * Name: netlib_ifup * * Description: * Set the network interface UP @@ -70,7 +70,7 @@ * ****************************************************************************/ -int uip_ifup(const char *ifname) +int netlib_ifup(const char *ifname) { int ret = ERROR; if (ifname) @@ -100,7 +100,7 @@ int uip_ifup(const char *ifname) } /**************************************************************************** - * Name: uip_ifdown + * Name: netlib_ifdown * * Description: * Set the network interface DOWN @@ -113,7 +113,7 @@ int uip_ifup(const char *ifname) * ****************************************************************************/ -int uip_ifdown(const char *ifname) +int netlib_ifdown(const char *ifname) { int ret = ERROR; if (ifname) diff --git a/apps/netutils/netlib/netlib_setmacaddr.c b/apps/netutils/netlib/netlib_setmacaddr.c index d35034a69..47fb463a3 100644 --- a/apps/netutils/netlib/netlib_setmacaddr.c +++ b/apps/netutils/netlib/netlib_setmacaddr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/netlib/uip_setmacaddr.c + * netutils/netlib/netlib_setmacaddr.c * * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -67,7 +67,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: uip_setmacaddr + * Name: netlib_setmacaddr * * Description: * Set the network driver MAC address @@ -81,7 +81,7 @@ * ****************************************************************************/ -int uip_setmacaddr(const char *ifname, const uint8_t *macaddr) +int netlib_setmacaddr(const char *ifname, const uint8_t *macaddr) { int ret = ERROR; diff --git a/apps/netutils/netlib/netlib_setnetmask.c b/apps/netutils/netlib/netlib_setnetmask.c index 8b3f9651c..45d4dee25 100644 --- a/apps/netutils/netlib/netlib_setnetmask.c +++ b/apps/netutils/netlib/netlib_setnetmask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/netlib/uip_setnetmask.c + * netutils/netlib/netlib_setnetmask.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -56,7 +56,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: uip_setnetmask + * Name: netlib_setnetmask * * Description: * Set the netmask @@ -71,9 +71,9 @@ ****************************************************************************/ #ifdef CONFIG_NET_IPv6 -int uip_setnetmask(const char *ifname, const struct in6_addr *addr) +int netlib_setnetmask(const char *ifname, const struct in6_addr *addr) #else -int uip_setnetmask(const char *ifname, const struct in_addr *addr) +int netlib_setnetmask(const char *ifname, const struct in_addr *addr) #endif { int ret = ERROR; diff --git a/apps/netutils/webclient/webclient.c b/apps/netutils/webclient/webclient.c index 41f3ef6f5..5bb7d6328 100644 --- a/apps/netutils/webclient/webclient.c +++ b/apps/netutils/webclient/webclient.c @@ -347,7 +347,7 @@ static inline int wget_parseheaders(struct wget_s *ws) * retain the current location. */ - (void)uip_parsehttpurl(ws->line + strlen(g_httplocation), &ws->port, + (void)netlib_parsehttpurl(ws->line + strlen(g_httplocation), &ws->port, ws->hostname, CONFIG_WEBCLIENT_MAXHOSTNAME, ws->filename, CONFIG_WEBCLIENT_MAXFILENAME); nvdbg("New hostname='%s' filename='%s'\n", ws->hostname, ws->filename); @@ -423,7 +423,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen, /* Parse the hostname (with optional port number) and filename from the URL */ - ret = uip_parsehttpurl(url, &ws.port, + ret = netlib_parsehttpurl(url, &ws.port, ws.hostname, CONFIG_WEBCLIENT_MAXHOSTNAME, ws.filename, CONFIG_WEBCLIENT_MAXFILENAME); if (ret != 0) diff --git a/apps/netutils/webserver/httpd.c b/apps/netutils/webserver/httpd.c index c4ada2f8b..e9b9f96d5 100644 --- a/apps/netutils/webserver/httpd.c +++ b/apps/netutils/webserver/httpd.c @@ -788,7 +788,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s struct timeval tv; #endif - listensd = uip_listenon(portno); + listensd = netlib_listenon(portno); if (listensd < 0) { return; @@ -861,7 +861,7 @@ int httpd_listen(void) #ifdef CONFIG_NETUTILS_HTTPD_SINGLECONNECT single_server(HTONS(80), httpd_handler, CONFIG_NETUTILS_HTTPDSTACKSIZE); #else - uip_server(HTONS(80), httpd_handler, CONFIG_NETUTILS_HTTPDSTACKSIZE); + netlib_server(HTONS(80), httpd_handler, CONFIG_NETUTILS_HTTPDSTACKSIZE); #endif /* the server accept loop only returns on errors */ |