mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
Socket I/F: Misc clean-up to get a clean USRSOCK build.
This commit is contained in:
@@ -108,6 +108,7 @@ typedef uint8_t sockcaps_t;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
struct socket; /* Forward reference */
|
struct socket; /* Forward reference */
|
||||||
|
struct pollfd; /* Forward reference */
|
||||||
|
|
||||||
struct sock_intf_s
|
struct sock_intf_s
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(CONFIG_NET_TCP),y)
|
ifeq ($(CONFIG_NET_TCP),y)
|
||||||
SOCK_CSRCS += listen.c accept.c
|
SOCK_CSRCS += listen.c accept.c
|
||||||
|
|
||||||
ifneq ($(CONFIG_NET_TCP_NO_STACK),y)
|
ifneq ($(CONFIG_NET_TCP_NO_STACK),y)
|
||||||
SOCK_CSRCS += net_monitor.c
|
SOCK_CSRCS += net_monitor.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -49,10 +49,7 @@
|
|||||||
#include <nuttx/cancelpt.h>
|
#include <nuttx/cancelpt.h>
|
||||||
#include <arch/irq.h>
|
#include <arch/irq.h>
|
||||||
|
|
||||||
#include "tcp/tcp.h"
|
|
||||||
#include "local/local.h"
|
|
||||||
#include "socket/socket.h"
|
#include "socket/socket.h"
|
||||||
#include "usrsock/usrsock.h"
|
|
||||||
|
|
||||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||||
|
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ static int usrsock_socket_setup(int domain, int type, int protocol,
|
|||||||
static int inet_setup(FAR struct socket *psock, int protocol)
|
static int inet_setup(FAR struct socket *psock, int protocol)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_NET_USRSOCK
|
#ifdef CONFIG_NET_USRSOCK
|
||||||
/* Handle speical setup for user INET sockets */
|
/* Handle special setup for user INET sockets */
|
||||||
|
|
||||||
ret = usrsock_socket_setup(domain, type, protocol, psock);
|
ret = usrsock_socket_setup(domain, type, protocol, psock);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/socket/net_clone.c
|
* net/socket/net_clone.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2011-2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2011-2015, 2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -48,12 +48,7 @@
|
|||||||
#include <nuttx/net/net.h>
|
#include <nuttx/net/net.h>
|
||||||
#include <nuttx/net/udp.h>
|
#include <nuttx/net/udp.h>
|
||||||
|
|
||||||
#include "tcp/tcp.h"
|
|
||||||
#include "udp/udp.h"
|
|
||||||
#include "pkt/pkt.h"
|
|
||||||
#include "local/local.h"
|
|
||||||
#include "socket/socket.h"
|
#include "socket/socket.h"
|
||||||
#include "usrsock/usrsock.h"
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
|
|||||||
@@ -47,11 +47,6 @@
|
|||||||
|
|
||||||
#include <nuttx/cancelpt.h>
|
#include <nuttx/cancelpt.h>
|
||||||
|
|
||||||
#include "pkt/pkt.h"
|
|
||||||
#include "tcp/tcp.h"
|
|
||||||
#include "udp/udp.h"
|
|
||||||
#include "sixlowpan/sixlowpan.h"
|
|
||||||
#include "local/local.h"
|
|
||||||
#include "socket/socket.h"
|
#include "socket/socket.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
+1
-4
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/socket/sendto.c
|
* net/socket/sendto.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2011-2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2011-2015, 2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -49,9 +49,6 @@
|
|||||||
#include <nuttx/cancelpt.h>
|
#include <nuttx/cancelpt.h>
|
||||||
#include <nuttx/net/net.h>
|
#include <nuttx/net/net.h>
|
||||||
|
|
||||||
#include "udp/udp.h"
|
|
||||||
#include "sixlowpan/sixlowpan.h"
|
|
||||||
#include "local/local.h"
|
|
||||||
#include "socket/socket.h"
|
#include "socket/socket.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
+1
-2
@@ -49,7 +49,6 @@
|
|||||||
|
|
||||||
#include <nuttx/clock.h>
|
#include <nuttx/clock.h>
|
||||||
#include <nuttx/net/net.h>
|
#include <nuttx/net/net.h>
|
||||||
#include "tcp/tcp.h"
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
@@ -176,7 +175,7 @@ struct tcp_conn_s; /* Forward reference */
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int sockfd_allocate(int minsd);
|
int sockfd_allocate(int minsd);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: sock_release
|
* Name: sock_release
|
||||||
|
|||||||
Reference in New Issue
Block a user