mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
net/: Run all .c files under net/ through tools/nxstyle and fix all resulting complaints.
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
bb09471d63
commit
98f431d8d8
@@ -2,7 +2,7 @@
|
|||||||
* net/bluetooth/bluetooth_poll.c
|
* net/bluetooth/bluetooth_poll.c
|
||||||
* Poll for the availability of ougoing Bluetooth frames
|
* Poll for the availability of ougoing Bluetooth frames
|
||||||
*
|
*
|
||||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2018, 2020 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
|
||||||
@@ -96,6 +96,7 @@ void bluetooth_poll(FAR struct net_driver_s *dev,
|
|||||||
*
|
*
|
||||||
* REVISIT: Need to pass the meta data and the IOB through the callback
|
* REVISIT: Need to pass the meta data and the IOB through the callback
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#warning Missing logic
|
#warning Missing logic
|
||||||
|
|
||||||
/* Perform the application callback */
|
/* Perform the application callback */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/icmp/icmp_sendto.c
|
* net/icmp/icmp_sendto.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017, 2019 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2017, 2019-2020 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
|
||||||
@@ -422,6 +422,7 @@ ssize_t icmp_sendto(FAR struct socket *psock, FAR const void *buf, size_t len,
|
|||||||
ret = -ENETUNREACH;
|
ret = -ENETUNREACH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
state.snd_result = ret;
|
state.snd_result = ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/icmpv6/icmpv6_autoconfig.c
|
* net/icmpv6/icmpv6_autoconfig.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015-2016, 2018-2019 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2015-2016, 2018-2020 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
|
||||||
@@ -309,7 +309,8 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev)
|
|||||||
net_lock();
|
net_lock();
|
||||||
|
|
||||||
/* IPv6 Stateless Autoconfiguration
|
/* IPv6 Stateless Autoconfiguration
|
||||||
* Reference: http://www.tcpipguide.com/free/t_IPv6AutoconfigurationandRenumbering.htm
|
* Reference:
|
||||||
|
* http://www.tcpipguide.com/free/t_IPv6AutoconfigurationandRenumbering.htm
|
||||||
*
|
*
|
||||||
* The following is a summary of the steps a device takes when using
|
* The following is a summary of the steps a device takes when using
|
||||||
* stateless auto-configuration:
|
* stateless auto-configuration:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/icmpv6/icmpv6_poll.c
|
* net/icmpv6/icmpv6_poll.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015, 2019 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2015, 2019, 2020 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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* net/icmpv6/icmpv6_radvertise.c
|
* net/icmpv6/icmpv6_radvertise.c
|
||||||
* Send an ICMPv6 Router Advertisement
|
* Send an ICMPv6 Router Advertisement
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015, 2017 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2015, 2017, 2020 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Adapted for NuttX from logic in uIP which also has a BSD-like license:
|
* Adapted for NuttX from logic in uIP which also has a BSD-like license:
|
||||||
@@ -202,7 +202,8 @@ void icmpv6_radvertise(FAR struct net_driver_s *dev)
|
|||||||
/* Set up the MTU option */
|
/* Set up the MTU option */
|
||||||
|
|
||||||
mtu = (FAR struct icmpv6_mtu_s *)
|
mtu = (FAR struct icmpv6_mtu_s *)
|
||||||
((FAR uint8_t *)srcaddr + SIZEOF_ICMPV6_SRCLLADDR_S(lladdrsize));
|
((FAR uint8_t *)srcaddr +
|
||||||
|
SIZEOF_ICMPV6_SRCLLADDR_S(lladdrsize));
|
||||||
mtu->opttype = ICMPv6_OPT_MTU;
|
mtu->opttype = ICMPv6_OPT_MTU;
|
||||||
mtu->optlen = 1;
|
mtu->optlen = 1;
|
||||||
mtu->reserved = 0;
|
mtu->reserved = 0;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/icmpv6/icmpv6_sendto.c
|
* net/icmpv6/icmpv6_sendto.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017, 2019 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2017, 2019-2020 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
|
||||||
@@ -415,6 +415,7 @@ ssize_t icmpv6_sendto(FAR struct socket *psock, FAR const void *buf, size_t len,
|
|||||||
ret = -ENETUNREACH;
|
ret = -ENETUNREACH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
state.snd_result = ret;
|
state.snd_result = ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* net/ieee802154/ieee802154_poll.c
|
* net/ieee802154/ieee802154_poll.c
|
||||||
* Poll for the availability of ougoing IEEE 802.15.4 frames
|
* Poll for the availability of ougoing IEEE 802.15.4 frames
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2017, 2020 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
|
||||||
@@ -96,6 +96,7 @@ void ieee802154_poll(FAR struct net_driver_s *dev,
|
|||||||
*
|
*
|
||||||
* REVISIT: Need to pass the meta data and the IOB through the callback.
|
* REVISIT: Need to pass the meta data and the IOB through the callback.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#warning Missing logic
|
#warning Missing logic
|
||||||
|
|
||||||
/* Perform the application callback */
|
/* Perform the application callback */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/igmp/igmp_input.c
|
* net/igmp/igmp_input.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010, 2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 2014, 2020 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* The NuttX implementation of IGMP was inspired by the IGMP add-on for the
|
* The NuttX implementation of IGMP was inspired by the IGMP add-on for the
|
||||||
@@ -245,7 +245,8 @@ void igmp_input(struct net_driver_s *dev)
|
|||||||
{
|
{
|
||||||
ticks = net_dsec2tick((int)igmp->maxresp);
|
ticks = net_dsec2tick((int)igmp->maxresp);
|
||||||
|
|
||||||
if (IS_IDLEMEMBER(group->flags) || igmp_cmptimer(group, ticks))
|
if (IS_IDLEMEMBER(group->flags) ||
|
||||||
|
igmp_cmptimer(group, ticks))
|
||||||
{
|
{
|
||||||
igmp_startticks(group, ticks);
|
igmp_startticks(group, ticks);
|
||||||
CLR_IDLEMEMBER(group->flags);
|
CLR_IDLEMEMBER(group->flags);
|
||||||
@@ -261,7 +262,8 @@ void igmp_input(struct net_driver_s *dev)
|
|||||||
ninfo("Unicast query\n");
|
ninfo("Unicast query\n");
|
||||||
IGMP_STATINCR(g_netstats.igmp.ucast_query);
|
IGMP_STATINCR(g_netstats.igmp.ucast_query);
|
||||||
|
|
||||||
ninfo("Query to a specific group with the group address as destination\n");
|
ninfo("Query to a specific group with the group address as "
|
||||||
|
"destination\n");
|
||||||
|
|
||||||
ticks = net_dsec2tick((int)igmp->maxresp);
|
ticks = net_dsec2tick((int)igmp->maxresp);
|
||||||
if (IS_IDLEMEMBER(group->flags) || igmp_cmptimer(group, ticks))
|
if (IS_IDLEMEMBER(group->flags) || igmp_cmptimer(group, ticks))
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/neighbor/neighbor_globals.c
|
* net/neighbor/neighbor_globals.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2015, 2018 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2015, 2018, 2020 Gregory Nutt. All rights
|
||||||
|
* reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* A leverage of logic from uIP which also has a BSD style license
|
* A leverage of logic from uIP which also has a BSD style license
|
||||||
@@ -55,3 +56,6 @@
|
|||||||
|
|
||||||
struct neighbor_entry_s g_neighbors[CONFIG_NET_IPv6_NCONF_ENTRIES];
|
struct neighbor_entry_s g_neighbors[CONFIG_NET_IPv6_NCONF_ENTRIES];
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/route/net_fileroute.c
|
* net/route/net_fileroute.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2017, 2020 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
|
||||||
@@ -178,7 +178,8 @@ int net_routesize(FAR const char *path, size_t entrysize)
|
|||||||
#ifdef CONFIG_DEBUG_NET_WARN
|
#ifdef CONFIG_DEBUG_NET_WARN
|
||||||
if (nentries * entrysize != buf.st_size)
|
if (nentries * entrysize != buf.st_size)
|
||||||
{
|
{
|
||||||
nwarn("WARNING: Size of routing table is not an even multiple of entries\n");
|
nwarn("WARNING: Size of routing table is not an even multiple of "
|
||||||
|
"entries\n");
|
||||||
nwarn(" %lu != %lu / %lu\n",
|
nwarn(" %lu != %lu / %lu\n",
|
||||||
(unsigned long)nentries,
|
(unsigned long)nentries,
|
||||||
(unsigned long)buf.st_size,
|
(unsigned long)buf.st_size,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/sixlowpan/sixlowpan_globals.c
|
* net/sixlowpan/sixlowpan_globals.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2017, 2020 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
|
||||||
@@ -67,4 +67,8 @@ uint8_t g_uncomp_hdrlen;
|
|||||||
|
|
||||||
uint8_t g_frame_hdrlen;
|
uint8_t g_frame_hdrlen;
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
#endif /* CONFIG_NET_6LOWPAN */
|
#endif /* CONFIG_NET_6LOWPAN */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* 6lowpan HC06 implementation (draft-ietf-6lowpan-hc-06, updated to RFC
|
* 6lowpan HC06 implementation (draft-ietf-6lowpan-hc-06, updated to RFC
|
||||||
* 6282)
|
* 6282)
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017, 2019 Gregory Nutt, all rights reserved
|
* Copyright (C) 2017, 2019-2020 Gregory Nutt, all rights reserved
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Derives from Contiki:
|
* Derives from Contiki:
|
||||||
@@ -240,7 +240,8 @@ static FAR struct sixlowpan_addrcontext_s *
|
|||||||
if ((g_hc06_addrcontexts[i].used == 1) &&
|
if ((g_hc06_addrcontexts[i].used == 1) &&
|
||||||
net_ipv6addr_prefixcmp(&g_hc06_addrcontexts[i].prefix, ipaddr, 64))
|
net_ipv6addr_prefixcmp(&g_hc06_addrcontexts[i].prefix, ipaddr, 64))
|
||||||
{
|
{
|
||||||
ninfo("Context found for ipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x Context: %d\n",
|
ninfo("Context found for "
|
||||||
|
"ipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x Context: %d\n",
|
||||||
ntohs(ipaddr[0]), ntohs(ipaddr[1]), ntohs(ipaddr[2]),
|
ntohs(ipaddr[0]), ntohs(ipaddr[1]), ntohs(ipaddr[2]),
|
||||||
ntohs(ipaddr[3]), ntohs(ipaddr[4]), ntohs(ipaddr[5]),
|
ntohs(ipaddr[3]), ntohs(ipaddr[4]), ntohs(ipaddr[5]),
|
||||||
ntohs(ipaddr[6]), ntohs(ipaddr[7]),
|
ntohs(ipaddr[6]), ntohs(ipaddr[7]),
|
||||||
@@ -612,14 +613,22 @@ void sixlowpan_hc06_initialize(void)
|
|||||||
g_hc06_addrcontexts[1].used = 1;
|
g_hc06_addrcontexts[1].used = 1;
|
||||||
g_hc06_addrcontexts[1].number = 1;
|
g_hc06_addrcontexts[1].number = 1;
|
||||||
|
|
||||||
g_hc06_addrcontexts[1].prefix[0] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_0;
|
g_hc06_addrcontexts[1].prefix[0] =
|
||||||
g_hc06_addrcontexts[1].prefix[1] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_1;
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_0;
|
||||||
g_hc06_addrcontexts[1].prefix[2] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_2;
|
g_hc06_addrcontexts[1].prefix[1] =
|
||||||
g_hc06_addrcontexts[1].prefix[3] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_3;
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_1;
|
||||||
g_hc06_addrcontexts[1].prefix[4] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_4;
|
g_hc06_addrcontexts[1].prefix[2] =
|
||||||
g_hc06_addrcontexts[1].prefix[5] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_5;
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_2;
|
||||||
g_hc06_addrcontexts[1].prefix[6] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_6;
|
g_hc06_addrcontexts[1].prefix[3] =
|
||||||
g_hc06_addrcontexts[1].prefix[7] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_7;
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_3;
|
||||||
|
g_hc06_addrcontexts[1].prefix[4] =
|
||||||
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_4;
|
||||||
|
g_hc06_addrcontexts[1].prefix[5] =
|
||||||
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_5;
|
||||||
|
g_hc06_addrcontexts[1].prefix[6] =
|
||||||
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_6;
|
||||||
|
g_hc06_addrcontexts[1].prefix[7] =
|
||||||
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_1_7;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#ifdef CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREINIT_2
|
#ifdef CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREINIT_2
|
||||||
@@ -628,14 +637,22 @@ void sixlowpan_hc06_initialize(void)
|
|||||||
g_hc06_addrcontexts[2].used = 1;
|
g_hc06_addrcontexts[2].used = 1;
|
||||||
g_hc06_addrcontexts[2].number = 2;
|
g_hc06_addrcontexts[2].number = 2;
|
||||||
|
|
||||||
g_hc06_addrcontexts[2].prefix[0] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_0;
|
g_hc06_addrcontexts[2].prefix[0] =
|
||||||
g_hc06_addrcontexts[2].prefix[1] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_1;
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_0;
|
||||||
g_hc06_addrcontexts[2].prefix[2] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_2;
|
g_hc06_addrcontexts[2].prefix[1] =
|
||||||
g_hc06_addrcontexts[2].prefix[3] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_3;
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_1;
|
||||||
g_hc06_addrcontexts[2].prefix[4] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_4;
|
g_hc06_addrcontexts[2].prefix[2] =
|
||||||
g_hc06_addrcontexts[2].prefix[5] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_5;
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_2;
|
||||||
g_hc06_addrcontexts[2].prefix[6] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_6;
|
g_hc06_addrcontexts[2].prefix[3] =
|
||||||
g_hc06_addrcontexts[2].prefix[7] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_7;
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_3;
|
||||||
|
g_hc06_addrcontexts[2].prefix[4] =
|
||||||
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_4;
|
||||||
|
g_hc06_addrcontexts[2].prefix[5] =
|
||||||
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_5;
|
||||||
|
g_hc06_addrcontexts[2].prefix[6] =
|
||||||
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_6;
|
||||||
|
g_hc06_addrcontexts[2].prefix[7] =
|
||||||
|
CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_2_7;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif /* SIXLOWPAN_CONF_ADDR_CONTEXT_2 */
|
#endif /* SIXLOWPAN_CONF_ADDR_CONTEXT_2 */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/sixlowpan/sixlowpan_send.c
|
* net/sixlowpan/sixlowpan_send.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2017, 2020 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
|
||||||
@@ -272,6 +272,7 @@ int sixlowpan_send(FAR struct net_driver_s *dev,
|
|||||||
{
|
{
|
||||||
neighbor_notreachable(dev);
|
neighbor_notreachable(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
sinfo.s_result = ret;
|
sinfo.s_result = ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/socket/setsockopt.c
|
* net/socket/setsockopt.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2008, 2011-2012, 2014-2015, 2017-2018 Gregory Nutt.
|
* Copyright (C) 2007, 2008, 2011-2012, 2014-2015, 2017-2018, 2020 Gregory
|
||||||
* All rights reserved.
|
* 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
|
||||||
@@ -459,7 +459,8 @@ int psock_setsockopt(FAR struct socket *psock, int level, int option,
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int setsockopt(int sockfd, int level, int option, const void *value, socklen_t value_len)
|
int setsockopt(int sockfd, int level, int option, const void *value,
|
||||||
|
socklen_t value_len)
|
||||||
{
|
{
|
||||||
FAR struct socket *psock;
|
FAR struct socket *psock;
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/tcp/tcp_backlog.c
|
* net/tcp/tcp_backlog.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2011-2013, 2020 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
|
||||||
@@ -186,7 +187,8 @@ int tcp_backlogdestroy(FAR struct tcp_conn_s *conn)
|
|||||||
|
|
||||||
/* Handle any pending connections in the backlog */
|
/* Handle any pending connections in the backlog */
|
||||||
|
|
||||||
while ((blc = (FAR struct tcp_blcontainer_s *)sq_remfirst(&blg->bl_pending)) != NULL)
|
while ((blc = (FAR struct tcp_blcontainer_s *)
|
||||||
|
sq_remfirst(&blg->bl_pending)) != NULL)
|
||||||
{
|
{
|
||||||
blconn = blc->bc_conn;
|
blconn = blc->bc_conn;
|
||||||
if (blconn)
|
if (blconn)
|
||||||
@@ -362,7 +364,8 @@ int tcp_backlogdelete(FAR struct tcp_conn_s *conn,
|
|||||||
{
|
{
|
||||||
/* Find the container hold the connection */
|
/* Find the container hold the connection */
|
||||||
|
|
||||||
for (blc = (FAR struct tcp_blcontainer_s *)sq_peek(&bls->bl_pending), prev = NULL;
|
for (blc = (FAR struct tcp_blcontainer_s *)sq_peek(&bls->bl_pending),
|
||||||
|
prev = NULL;
|
||||||
blc;
|
blc;
|
||||||
prev = blc, blc = (FAR struct tcp_blcontainer_s *)sq_next(&blc->bc_node))
|
prev = blc, blc = (FAR struct tcp_blcontainer_s *)sq_next(&blc->bc_node))
|
||||||
{
|
{
|
||||||
|
|||||||
+3
-1
@@ -2,7 +2,8 @@
|
|||||||
* net/tcp/tcp_input.c
|
* net/tcp/tcp_input.c
|
||||||
* Handling incoming TCP input
|
* Handling incoming TCP input
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2014, 2017-2019 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2014, 2017-2019, 2020 Gregory Nutt. All rights
|
||||||
|
* reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Adapted for NuttX from logic in uIP which also has a BSD-like license:
|
* Adapted for NuttX from logic in uIP which also has a BSD-like license:
|
||||||
@@ -768,6 +769,7 @@ found:
|
|||||||
* the received data. So the socket layer has to get this ACK even
|
* the received data. So the socket layer has to get this ACK even
|
||||||
* if the connection is going to be closed.
|
* if the connection is going to be closed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (conn->tx_unacked > 0)
|
if (conn->tx_unacked > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* net/tcp/tcp_setsockopt.c
|
* net/tcp/tcp_setsockopt.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2018, 2020 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
|
||||||
|
|||||||
+2
-1
@@ -2,7 +2,7 @@
|
|||||||
* net/tcp/tcp_timer.c
|
* net/tcp/tcp_timer.c
|
||||||
* Poll for the availability of TCP TX data
|
* Poll for the availability of TCP TX data
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2010, 2015-2016, 2018 Gregory Nutt. All rights
|
* Copyright (C) 2007-2010, 2015-2016, 2018, 2020 Gregory Nutt. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
@@ -426,6 +426,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
|
|||||||
*
|
*
|
||||||
* Get the size of the IP header and the TCP header.
|
* Get the size of the IP header and the TCP header.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_NET_IPv4
|
#ifdef CONFIG_NET_IPv4
|
||||||
#ifdef CONFIG_NET_IPv6
|
#ifdef CONFIG_NET_IPv6
|
||||||
if (conn->domain == PF_INET)
|
if (conn->domain == PF_INET)
|
||||||
|
|||||||
@@ -187,6 +187,7 @@ int usrsock_close(FAR struct usrsock_conn_s *conn)
|
|||||||
/* TODO: Error handling for close? Mark closed anyway? There is not
|
/* TODO: Error handling for close? Mark closed anyway? There is not
|
||||||
* much we can do if this happens.
|
* much we can do if this happens.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ninfo("user-space daemon reported error %d for usockid=%d\n",
|
ninfo("user-space daemon reported error %d for usockid=%d\n",
|
||||||
state.result, conn->usockid);
|
state.result, conn->usockid);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user