diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-19 16:54:35 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-19 16:54:35 +0000 |
commit | 91d77b455375c2cb410ae981646f398de40175fc (patch) | |
tree | 14831436a60f148182392569b1313a21824e461a /nuttx/include/net/uip | |
parent | ac9a608fd04466f3c5c52674efaf0a3ce9aefd17 (diff) | |
download | px4-nuttx-91d77b455375c2cb410ae981646f398de40175fc.tar.gz px4-nuttx-91d77b455375c2cb410ae981646f398de40175fc.tar.bz2 px4-nuttx-91d77b455375c2cb410ae981646f398de40175fc.zip |
Move netutils header files from include/net/uip to include/apps/netutils
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3399 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/net/uip')
-rw-r--r-- | nuttx/include/net/uip/dhcpc.h | 85 | ||||
-rw-r--r-- | nuttx/include/net/uip/dhcpd.h | 71 | ||||
-rw-r--r-- | nuttx/include/net/uip/httpd.h | 54 | ||||
-rwxr-xr-x | nuttx/include/net/uip/ipmsfilter.h | 101 | ||||
-rw-r--r-- | nuttx/include/net/uip/resolv.h | 65 | ||||
-rw-r--r-- | nuttx/include/net/uip/smtp.h | 66 | ||||
-rw-r--r-- | nuttx/include/net/uip/telnetd.h | 70 | ||||
-rw-r--r-- | nuttx/include/net/uip/tftp.h | 73 | ||||
-rw-r--r-- | nuttx/include/net/uip/thttpd.h | 101 | ||||
-rw-r--r-- | nuttx/include/net/uip/uip-lib.h | 129 | ||||
-rw-r--r-- | nuttx/include/net/uip/webclient.h | 149 |
11 files changed, 0 insertions, 964 deletions
diff --git a/nuttx/include/net/uip/dhcpc.h b/nuttx/include/net/uip/dhcpc.h deleted file mode 100644 index 3d2fe4109..000000000 --- a/nuttx/include/net/uip/dhcpc.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** - * net/uip/dhcpc.n - * - * Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> - * - * This logic was leveraged from uIP which also has a BSD-style license: - * - * Copyright (c) 2005, Swedish Institute of Computer Science - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef __NET_UIP_DHCPC_H -#define __NET_UIP_DHCPC_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include <stdint.h> - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -struct dhcpc_state -{ - struct in_addr serverid; - struct in_addr ipaddr; - struct in_addr netmask; - struct in_addr dnsaddr; - struct in_addr default_router; - uint32_t lease_time; /* Lease expires in this number of seconds */ -}; - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -EXTERN void *dhcpc_open(const void *mac_addr, int mac_len); -EXTERN int dhcpc_request(void *handle, struct dhcpc_state *presult); -EXTERN void dhcpc_close(void *handle); - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __NET_UIP_DHCPC_H */ diff --git a/nuttx/include/net/uip/dhcpd.h b/nuttx/include/net/uip/dhcpd.h deleted file mode 100644 index f9aea86f3..000000000 --- a/nuttx/include/net/uip/dhcpd.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** - * net/uipt/dhcpd.h - * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> - * - * This logic was leveraged from uIP which also has a BSD-style license: - * - * Copyright (c) 2005, Swedish Institute of Computer Science - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef __NET_UIP_DHCPD_H -#define __NET_UIP_DHCPD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -EXTERN int dhcpd_run(void); - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __NET_UIP_DHCPD_H */ diff --git a/nuttx/include/net/uip/httpd.h b/nuttx/include/net/uip/httpd.h deleted file mode 100644 index cd850e51d..000000000 --- a/nuttx/include/net/uip/httpd.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** - * net/uip/httpd.h - * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> - * - * Based on uIP which also has a BSD style license: - * - * Author: Adam Dunkels <adam@sics.se> - * Copyright (c) 2001-2005, Adam Dunkels. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef _NET_UIP_HTTPD_H -#define _NET_UIP_HTTPD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -extern void httpd_init(void); -extern int httpd_listen(void); - -#endif /* _NET_UIP_HTTPD_H */ diff --git a/nuttx/include/net/uip/ipmsfilter.h b/nuttx/include/net/uip/ipmsfilter.h deleted file mode 100755 index df792d50b..000000000 --- a/nuttx/include/net/uip/ipmsfilter.h +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** - * net/uip/ipmsfilter.h - * User interface to add/remove IP multicast address - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __NET_UIP_IPMSFILTER_H -#define __NET_UIP_IPMSFILTER_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include <nuttx/config.h> -#include <netinet/in.h> - -#ifdef CONFIG_NET_IGMP - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifdef CONFIG_NET_IPv6 -# error "IGMP for IPv6 not supported" -#endif - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Name: ipmsfilter - * - * Description: - * Add or remove an IP address from a multicast filter set. - * (See netutils/uiplib/uip_ipmsfilter.c) - * - * Parameters: - * ifname The name of the interface to use, size must less than IMSFNAMSIZ - * multiaddr Multicast group address to add/remove - * fmode MCAST_INCLUDE: Add multicast address - * MCAST_EXCLUDE: Remove multicast address - * - * Return: - * 0 on sucess; Negated errno on failure - * - ****************************************************************************/ - -EXTERN int ipmsfilter(FAR const char *ifname, - FAR const struct in_addr *multiaddr, - uint32_t fmode); - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* CONFIG_NET_IGMP */ -#endif /* __NET_UIP_IPMSFILTER_H */ diff --git a/nuttx/include/net/uip/resolv.h b/nuttx/include/net/uip/resolv.h deleted file mode 100644 index 8b9f3bace..000000000 --- a/nuttx/include/net/uip/resolv.h +++ /dev/null @@ -1,65 +0,0 @@ -/* resolv.h - * DNS resolver code header file. - * Authtor Adam Dunkels <adam@dunkels.com> - * - * Copyright (c) 2002-2003, Adam Dunkels. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __UIP_RESOLV_H__ -#define __UIP_RESOLV_H__ - -#include <net/uip/uipopt.h> - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/* Functions. */ - -EXTERN int resolv_init(void); - -#ifdef CONFIG_NET_IPv6 -EXTERN void resolv_conf(const struct in6_addr *dnsserver); -EXTERN void resolv_getserver(const struct in_addr *dnsserver); -EXTERN int resolv_query(const char *name, struct sockaddr_in6 *addr); -#else -EXTERN void resolv_conf(const struct in_addr *dnsserver); -EXTERN void resolv_getserver(struct in_addr *dnsserver); -EXTERN int resolv_query(const char *name, struct sockaddr_in *addr); -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __UIP_RESOLV_H__ */ diff --git a/nuttx/include/net/uip/smtp.h b/nuttx/include/net/uip/smtp.h deleted file mode 100644 index 4653443ff..000000000 --- a/nuttx/include/net/uip/smtp.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** - * smtp.h - * SMTP header file - * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> - * - * Heavily leveraged from uIP 1.0 which also has a BSD-like license: - * - * Author: Adam Dunkels <adam@dunkels.com> - * Copyright (c) 2002, Adam Dunkels. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __SMTP_H__ -#define __SMTP_H__ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include <net/uip/uipopt.h> -#include <net/uip/uip.h> - -/**************************************************************************** - * Type Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -extern void *smtp_open(void); -extern void smtp_configure(void *handle, const char *localhostname, - const uip_ipaddr_t *paddr); -extern int smtp_send(void *handle, const char *to, const char *cc, - const char *from, const char *subject, - const char *msg, int msglen); -extern void smtp_close(void *handle); - -#endif /* __SMTP_H__ */ diff --git a/nuttx/include/net/uip/telnetd.h b/nuttx/include/net/uip/telnetd.h deleted file mode 100644 index 32247c206..000000000 --- a/nuttx/include/net/uip/telnetd.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** - * include/net/uip/telnetd.h - * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> - * - * This is a leverage of similar logic from uIP: - * - * Author: Adam Dunkels <adam@sics.se> - * Copyright (c) 2003, Adam Dunkels. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - ****************************************************************************/ - -#ifndef __NET_UIP_TELNETD_H -#define __NET_UIP_TELNETD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/* Start the telnet server -- does not return unless an error occurs */ - -EXTERN void telnetd_init(void); - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __NET_UIP_TELNETD_H */ diff --git a/nuttx/include/net/uip/tftp.h b/nuttx/include/net/uip/tftp.h deleted file mode 100644 index 7aa77c109..000000000 --- a/nuttx/include/net/uip/tftp.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * include/net/uip/tftp.h - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __NET_UIP_TFTP_H -#define __NET_UIP_TFTP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include <stdbool.h> -#include <arpa/inet.h> - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Type Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -EXTERN int tftpget(const char *remote, const char *local, in_addr_t addr, bool binary); -EXTERN int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary); - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __NET_UIP_TFTP_H */
\ No newline at end of file diff --git a/nuttx/include/net/uip/thttpd.h b/nuttx/include/net/uip/thttpd.h deleted file mode 100644 index bd445766c..000000000 --- a/nuttx/include/net/uip/thttpd.h +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** - * net/uip/thttpd.h - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __NET_UIP_THTTPD_H -#define __NET_UIP_THTTPD_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include <nuttx/config.h> - -#include <nuttx/symtab.h> - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/* These values must be provided by the user before the THTTPD task daemon - * is started: - * - * g_thttpdsymtab: A symbol table describing all of the symbols exported - * from the base system. These symbols are used to bind address references - * in CGI programs to NuttX. - * g_nsymbols: The number of symbols in g_thttpdsymtab[]. - * - * (See examples/nxflat and examples/thttpd for examples of how such a symbol - * table may be created.) - */ - -EXTERN FAR const struct symtab_s *g_thttpdsymtab; -EXTERN int g_thttpdnsymbols; - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Function: thttpd_main - * - * Description: - * This function is the entrypoint into the THTTPD server. It does not - * return. It may be called, the normal mechanism for starting the server - * is: - * - * 1) Set is g_thttpdsymtab and g_thttpdnsymbols. The user is required - * to provide a symbol table to use for binding CGI programs (if CGI - * is enabled. See examples/nxflat and examples/thttpd for examples of - * how such a symbol table may be created.) - * 2) Call task_create() to start thttpd_main() - * - ****************************************************************************/ - -EXTERN int thttpd_main(int argc, char **argv); - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __NET_UIP_THTTPD_H */ diff --git a/nuttx/include/net/uip/uip-lib.h b/nuttx/include/net/uip/uip-lib.h deleted file mode 100644 index 813245953..000000000 --- a/nuttx/include/net/uip/uip-lib.h +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************************** - * net/uip/uiplib.h - * Various non-standard APIs to support netutils. All non-standard and - * intended only for internal use. - * - * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> - * - * Some of these APIs derive from uIP but all of them use the uip_ prefix - * to identify them as members of this library. uIP also has a BSD style - * license: - * - * Author: Adam Dunkels <adam@sics.se> - * Copyright (c) 2002, Adam Dunkels. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __NET_UIP_UIP_LIB_H -#define __NET_UIP_UIP_LIB_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include <nuttx/config.h> - -#include <stdint.h> -#include <stdbool.h> -#include <pthread.h> - -#include <netinet/in.h> -#include <net/uip/uipopt.h> - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* SOCK_DGRAM is the preferred socket type to use when we just want a - * socket for performing drive ioctls. However, we can't use SOCK_DRAM - * if UDP is disabled. - */ - -#ifdef CONFIG_NET_UDP -# define UIPLIB_SOCK_IOCTL SOCK_DGRAM -#else -# define UIPLIB_SOCK_IOCTL SOCK_STREAM -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -/* Convert a textual representation of an IP address to a numerical representation. - * - * This function takes a textual representation of an IP address in - * the form a.b.c.d and converts it into a 4-byte array that can be - * used by other uIP functions. - * - * addrstr A pointer to a string containing the IP address in - * textual form. - * - * addr A pointer to a 4-byte array that will be filled in with - * the numerical representation of the address. - * - * Return: 0 If the IP address could not be parsed. - * Return: Non-zero If the IP address was parsed. - */ - -extern bool uiplib_ipaddrconv(const char *addrstr, uint8_t *addr); - -/* Get and set IP/MAC addresses (Ethernet L2 only) */ - -#ifdef CONFIG_NET_ETHERNET -extern int uip_setmacaddr(const char *ifname, const uint8_t *macaddr); -extern int uip_getmacaddr(const char *ifname, uint8_t *macaddr); -#endif - -/* IP address support */ - -#ifdef CONFIG_NET_IPv6 -extern int uip_gethostaddr(const char *ifname, struct in6_addr *addr); -extern int uip_sethostaddr(const char *ifname, const struct in6_addr *addr); -extern int uip_setdraddr(const char *ifname, const struct in6_addr *addr); -extern int uip_setnetmask(const char *ifname, const struct in6_addr *addr); -#else -extern int uip_gethostaddr(const char *ifname, struct in_addr *addr); -extern int uip_sethostaddr(const char *ifname, const struct in_addr *addr); -extern int uip_setdraddr(const char *ifname, const struct in_addr *addr); -extern int uip_setnetmask(const char *ifname, const struct in_addr *addr); -#endif - -/* HTTP support */ - -extern int uip_parsehttpurl(const char *url, uint16_t *port, - char *hostname, int hostlen, - char *filename, int namelen); - -/* Generic server logic */ - -extern void uip_server(uint16_t portno, pthread_startroutine_t handler, int stacksize); - -#endif /* __NET_UIP_UIP_LIB_H */ diff --git a/nuttx/include/net/uip/webclient.h b/nuttx/include/net/uip/webclient.h deleted file mode 100644 index 6e91bfb23..000000000 --- a/nuttx/include/net/uip/webclient.h +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************** - * include/net/uip/webclient.h - * Header file for the HTTP client - * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> - * - * Based remotely on the uIP webclient which also has a BSD style license: - * - * Author: Adam Dunkels <adam@dunkels.com> - * Copyright (c) 2002, Adam Dunkels. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __NET_UIP_WEBCLIENT_H -#define __NET_UIP_WEBCLIENT_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#ifndef CONFIG_WEBCLIENT_HOST -# include <nuttx/config.h> -#endif -#include <sys/types.h> - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifndef CONFIG_WEBCLIENT_MAXHTTPLINE -# define CONFIG_WEBCLIENT_MAXHTTPLINE 200 -#endif - -#ifndef CONFIG_WEBCLIENT_MAXMIMESIZE -# define CONFIG_WEBCLIENT_MAXMIMESIZE 32 -#endif - -#ifndef CONFIG_WEBCLIENT_MAXHOSTNAME -# define CONFIG_WEBCLIENT_MAXHOSTNAME 40 -#endif - -#ifndef CONFIG_WEBCLIENT_MAXFILENAME -# define CONFIG_WEBCLIENT_MAXFILENAME 100 -#endif - -/**************************************************************************** - * Public types - ****************************************************************************/ - -/* wget calls a user provided function of the follwoing type to process - * each received chuck of the incoming file data. If the system has a file - * system, then it may just write the data to a file. Or it may buffer the - * file in memory. To facilitate this latter case, the caller may modify - * the buffer address in this callback by writing to buffer and buflen. This - * may be used, for example, to implement double buffering. - * - * Input Parameters: - * buffer - A pointer to a pointer to a buffer. If the callee wishes to - * change the buffer address, it may do so in the callback by writing - * to buffer. - * offset - Offset to the beginning of valid data in the buffer. Offset - * is used to skip over any HTTP header info that may be at the - * beginning of the buffer. - * datend - The end+1 offset of valid data in the buffer. The total number - * of valid bytes is datend - offset. - * buflen - A pointer to the length of the buffer. If the callee wishes - * to change the size of the buffer, it may write to buflen. - */ - -typedef void (*wget_callback_t)(FAR char **buffer, int offset, - int datend, FAR int *buflen, FAR void *arg); - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Name: wget - * - * Description: - * Obtain the requested file from an HTTP server using the GET method. - * - * Note: If the function is passed a host name, it must already be in - * the resolver cache in order for the function to connect to the web - * server. It is therefore up to the calling module to implement the - * resolver calls and the signal handler used for reporting a resolv - * query answer. - * - * Input Parameters - * url - A pointer to a string containing either the full URL to - * the file to get (e.g., http://www.nutt.org/index.html, or - * http://192.168.23.1:80/index.html). - * buffer - A user provided buffer to receive the file data (also - * used for the outgoing GET request - * buflen - The size of the user provided buffer - * callback - As data is obtained from the host, this function is - * to dispose of each block of file data as it is received. - * arg - User argument passed to callback. - * - * Returned Value: - * 0: if the GET operation completed successfully; - * -1: On a failure with errno set appropriately - * - ****************************************************************************/ - -EXTERN int wget(FAR const char *url, FAR char *buffer, int buflen, - wget_callback_t callback, FAR void *arg); - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __NET_UIP_WEBCLIENT_H */ |