diff options
Diffstat (limited to 'nuttx/include/net/uip/uip-lib.h')
-rw-r--r-- | nuttx/include/net/uip/uip-lib.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nuttx/include/net/uip/uip-lib.h b/nuttx/include/net/uip/uip-lib.h index 3f6c9860d..d5799ee56 100644 --- a/nuttx/include/net/uip/uip-lib.h +++ b/nuttx/include/net/uip/uip-lib.h @@ -42,9 +42,33 @@ #ifndef __UIPLIB_H__ #define __UIPLIB_H__ +/**************************************************************************** + * Included Files + ****************************************************************************/ + #include <nuttx/config.h> +#include <sched.h> #include <netinet/in.h> +/**************************************************************************** + * 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 @@ -80,4 +104,8 @@ 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 +/* Generic server logic */ + +extern void uip_server(uint16 portno, main_t handler, int stacksize); + #endif /* __UIPLIB_H__ */ |