net: nxstyle fixes
Nxstyle fixes to pass CI. Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
parent
d0002b24c7
commit
7dc7ef45f1
@ -193,11 +193,11 @@ void arp_format(FAR struct net_driver_s *dev, in_addr_t ipaddr);
|
||||
* address. This function first checks if the IPv4 address is already in
|
||||
* the ARP table. If so, then it returns success immediately.
|
||||
*
|
||||
* If the requested IPv4 address in not in the ARP table, then this function
|
||||
* will send an ARP request, delay, then check if the IP address is now in
|
||||
* the ARP table. It will repeat this sequence until either (1) the IP
|
||||
* address mapping is now in the ARP table, or (2) a configurable number
|
||||
* of timeouts occur without receiving the ARP replay.
|
||||
* If the requested IPv4 address in not in the ARP table, then this
|
||||
* function will send an ARP request, delay, then check if the IP address
|
||||
* is now in the ARP table. It will repeat this sequence until either (1)
|
||||
* the IP address mapping is now in the ARP table, or (2) a configurable
|
||||
* number of timeouts occur without receiving the ARP replay.
|
||||
*
|
||||
* Input Parameters:
|
||||
* ipaddr The IP address to be queried.
|
||||
|
@ -70,7 +70,8 @@
|
||||
* The arp_ipin() function should be called by Ethernet device drivers
|
||||
* whenever an IP packet arrives from the network. The function will
|
||||
* check if the address is in the ARP cache, and if so the ARP cache entry
|
||||
* will be refreshed. If no ARP cache entry was found, a new one is created.
|
||||
* will be refreshed. If no ARP cache entry was found, a new one is
|
||||
* created.
|
||||
*
|
||||
* This function expects that an IP packet with an Ethernet header is
|
||||
* present in the d_buf buffer and that the length of the packet is in the
|
||||
|
@ -171,14 +171,17 @@ void arp_out(FAR struct net_driver_s *dev)
|
||||
|
||||
if (net_ipv4addr_hdrcmp(pip->eh_destipaddr, g_broadcast_ipaddr))
|
||||
{
|
||||
memcpy(peth->dest, g_broadcast_ethaddr.ether_addr_octet, ETHER_ADDR_LEN);
|
||||
memcpy(peth->dest,
|
||||
g_broadcast_ethaddr.ether_addr_octet,
|
||||
ETHER_ADDR_LEN);
|
||||
goto finish_header;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
/* Check if the destination address is a multicast address
|
||||
*
|
||||
* - IPv4: multicast addresses lie in the class D group -- The address range
|
||||
* - IPv4:
|
||||
* multicast addresses lie in the class D group -- The address range
|
||||
* 224.0.0.0 to 239.255.255.255 (224.0.0.0/4)
|
||||
*
|
||||
* - IPv6 multicast addresses are have the high-order octet of the
|
||||
@ -240,7 +243,9 @@ void arp_out(FAR struct net_driver_s *dev)
|
||||
{
|
||||
/* Yes.. then we won't need to know the destination MAC address */
|
||||
|
||||
memcpy(peth->dest, g_broadcast_ethaddr.ether_addr_octet, ETHER_ADDR_LEN);
|
||||
memcpy(peth->dest,
|
||||
g_broadcast_ethaddr.ether_addr_octet,
|
||||
ETHER_ADDR_LEN);
|
||||
goto finish_header;
|
||||
}
|
||||
else
|
||||
|
@ -80,7 +80,8 @@ struct bluetooth_finddev_s
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int bluetooth_dev_callback(FAR struct net_driver_s *dev, FAR void *arg)
|
||||
static int bluetooth_dev_callback(FAR struct net_driver_s *dev,
|
||||
FAR void *arg)
|
||||
{
|
||||
FAR struct bluetooth_finddev_s *match =
|
||||
(FAR struct bluetooth_finddev_s *)arg;
|
||||
|
@ -140,8 +140,8 @@ static int bluetooth_queue_frame(FAR struct bluetooth_conn_s *conn,
|
||||
}
|
||||
|
||||
#if CONFIG_NET_BLUETOOTH_BACKLOG > 0
|
||||
/* If incrementing the count would exceed the maximum bc_backlog value, then
|
||||
* delete the oldest frame from the head of the RX queue.
|
||||
/* If incrementing the count would exceed the maximum bc_backlog value,
|
||||
* then delete the oldest frame from the head of the RX queue.
|
||||
*/
|
||||
|
||||
if (conn->bc_backlog >= CONFIG_NET_BLUETOOTH_BACKLOG)
|
||||
|
@ -160,7 +160,8 @@ static uint16_t icmp_datahandler(FAR struct net_driver_s *dev,
|
||||
* not free any I/O buffers.
|
||||
*/
|
||||
|
||||
nerr("ERROR: Failed to source address to the I/O buffer chain: %d\n", ret);
|
||||
nerr("ERROR: Failed to source address to the I/O buffer chain: %d\n",
|
||||
ret);
|
||||
goto drop_with_chain;
|
||||
}
|
||||
|
||||
@ -275,8 +276,9 @@ void icmp_input(FAR struct net_driver_s *dev)
|
||||
/* The slow way... sum over the ICMP message */
|
||||
|
||||
icmp->icmpchksum = 0;
|
||||
icmp->icmpchksum = ~icmp_chksum(dev, (((uint16_t)ipv4->len[0] << 8) |
|
||||
(uint16_t)ipv4->len[1]) - iphdrlen);
|
||||
icmp->icmpchksum = ~icmp_chksum(dev,
|
||||
(((uint16_t)ipv4->len[0] << 8) |
|
||||
(uint16_t)ipv4->len[1]) - iphdrlen);
|
||||
if (icmp->icmpchksum == 0)
|
||||
{
|
||||
icmp->icmpchksum = 0xffff;
|
||||
|
@ -217,7 +217,8 @@ void icmpv6_input(FAR struct net_driver_s *dev, unsigned int iplen);
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success and the IP address mapping can now be
|
||||
* found in the Neighbor Table. On error a negated errno value is returned:
|
||||
* found in the Neighbor Table.
|
||||
* On error a negated errno value is returned:
|
||||
*
|
||||
* -ETIMEDOUT: The number or retry counts has been exceed.
|
||||
* -EHOSTUNREACH: Could not find a route to the host
|
||||
@ -350,8 +351,8 @@ void icmpv6_radvertise(FAR struct net_driver_s *dev);
|
||||
* is sent so that there is no race condition when icmpv6_wait() is called.
|
||||
*
|
||||
* Assumptions:
|
||||
* This function is called from icmpv6_neighbor() and executes in the normal
|
||||
* tasking environment.
|
||||
* This function is called from icmpv6_neighbor() and executes in the
|
||||
* normal tasking environment.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@ -521,8 +522,10 @@ int icmpv6_rwait(FAR struct icmpv6_rnotify_s *notify, unsigned int timeout);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_ICMPv6_AUTOCONF
|
||||
void icmpv6_rnotify(FAR struct net_driver_s *dev, const net_ipv6addr_t draddr,
|
||||
const net_ipv6addr_t prefix, unsigned int preflen);
|
||||
void icmpv6_rnotify(FAR struct net_driver_s *dev,
|
||||
const net_ipv6addr_t draddr,
|
||||
const net_ipv6addr_t prefix,
|
||||
unsigned int preflen);
|
||||
#else
|
||||
# define icmpv6_rnotify(d,p,l)
|
||||
#endif
|
||||
@ -602,8 +605,8 @@ FAR struct icmpv6_conn_s *icmpv6_nextconn(FAR struct icmpv6_conn_s *conn);
|
||||
* Name: icmpv6_findconn
|
||||
*
|
||||
* Description:
|
||||
* Find an ICMPv6 connection structure that is expecting a ICMPv6 ECHO response
|
||||
* with this ID from this device
|
||||
* Find an ICMPv6 connection structure that is expecting a ICMPv6 ECHO
|
||||
* response with this ID from this device
|
||||
*
|
||||
* Assumptions:
|
||||
* This function is called from network logic at with the network locked.
|
||||
@ -641,8 +644,12 @@ FAR struct icmpv6_conn_s *icmpv6_findconn(FAR struct net_driver_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_ICMPv6_SOCKET
|
||||
ssize_t icmpv6_sendto(FAR struct socket *psock, FAR const void *buf, size_t len,
|
||||
int flags, FAR const struct sockaddr *to, socklen_t tolen);
|
||||
ssize_t icmpv6_sendto(FAR struct socket *psock,
|
||||
FAR const void *buf,
|
||||
size_t len,
|
||||
int flags,
|
||||
FAR const struct sockaddr *to,
|
||||
socklen_t tolen);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -725,13 +732,13 @@ int icmpv6_pollteardown(FAR struct socket *psock, FAR struct pollfd *fds);
|
||||
* Name: icmpv6_linkipaddr
|
||||
*
|
||||
* Description:
|
||||
* Generate the device link scope ipv6 address as below:
|
||||
* 128 112 96 80 64 48 32 16
|
||||
* ---- ---- ---- ---- ---- ---- ---- ----
|
||||
* fe80 0000 0000 0000 0000 00ff fe00 xx00 1-byte short address IEEE 48-bit MAC
|
||||
* fe80 0000 0000 0000 0000 00ff fe00 xxxx 2-byte short address IEEE 48-bit MAC
|
||||
* fe80 0000 0000 0000 xxxx xxff fexx xxxx 6-byte normal address IEEE 48-bit MAC
|
||||
* fe80 0000 0000 0000 xxxx xxxx xxxx xxxx 8-byte extended address IEEE EUI-64
|
||||
* Generate the device link scope ipv6 address as below:
|
||||
* 128 112 96 80 64 48 32 16
|
||||
* ---- ---- ---- ---- ---- ---- ---- ----
|
||||
* fe80 0000 0000 0000 0000 00ff fe00 xx00 1-byte short addr IEEE 48-bit MAC
|
||||
* fe80 0000 0000 0000 0000 00ff fe00 xxxx 2-byte short addr IEEE 48-bit MAC
|
||||
* fe80 0000 0000 0000 xxxx xxff fexx xxxx 6-byte normal addr IEEE 48-bit MAC
|
||||
* fe80 0000 0000 0000 xxxx xxxx xxxx xxxx 8-byte extended addr IEEE EUI-64
|
||||
*
|
||||
* Input Parameters:
|
||||
* dev - The device driver structure containing the link layer address
|
||||
|
@ -125,7 +125,8 @@ void icmpv6_advertise(FAR struct net_driver_s *dev,
|
||||
adv = ICMPv6ADVERTISE;
|
||||
adv->type = ICMPv6_NEIGHBOR_ADVERTISE; /* Message type */
|
||||
adv->code = 0; /* Message qualifier */
|
||||
adv->flags[0] = ICMPv6_NADV_FLAG_S | ICMPv6_NADV_FLAG_O; /* Solicited+Override flags. */
|
||||
adv->flags[0] = ICMPv6_NADV_FLAG_S |
|
||||
ICMPv6_NADV_FLAG_O; /* Solicited+Override flags. */
|
||||
adv->flags[1] = 0;
|
||||
adv->flags[2] = 0;
|
||||
adv->flags[3] = 0;
|
||||
|
@ -122,7 +122,8 @@ FAR struct icmpv6_conn_s *icmpv6_alloc(void)
|
||||
ret = net_lockedwait(&g_free_sem);
|
||||
if (ret >= 0)
|
||||
{
|
||||
conn = (FAR struct icmpv6_conn_s *)dq_remfirst(&g_free_icmpv6_connections);
|
||||
conn = (FAR struct icmpv6_conn_s *)
|
||||
dq_remfirst(&g_free_icmpv6_connections);
|
||||
if (conn != NULL)
|
||||
{
|
||||
/* Clear the connection structure */
|
||||
@ -232,8 +233,8 @@ FAR struct icmpv6_conn_s *icmpv6_nextconn(FAR struct icmpv6_conn_s *conn)
|
||||
* Name: icmpv6_findconn
|
||||
*
|
||||
* Description:
|
||||
* Find an ICMPv6 connection structure that is expecting a ICMPv6 ECHO response
|
||||
* with this ID from this device
|
||||
* Find an ICMPv6 connection structure that is expecting a ICMPv6 ECHO
|
||||
* response with this ID from this device
|
||||
*
|
||||
* Assumptions:
|
||||
* This function is called from network logic at with the network locked.
|
||||
@ -245,7 +246,8 @@ FAR struct icmpv6_conn_s *icmpv6_findconn(FAR struct net_driver_s *dev,
|
||||
{
|
||||
FAR struct icmpv6_conn_s *conn;
|
||||
|
||||
for (conn = icmpv6_nextconn(NULL); conn != NULL; conn = icmpv6_nextconn(conn))
|
||||
for (conn = icmpv6_nextconn(NULL); conn != NULL;
|
||||
conn = icmpv6_nextconn(conn))
|
||||
{
|
||||
if (conn->id == id && conn->dev == dev && conn->nreqs > 0)
|
||||
{
|
||||
|
@ -165,7 +165,8 @@ static uint16_t icmpv6_datahandler(FAR struct net_driver_s *dev,
|
||||
* not free any I/O buffers.
|
||||
*/
|
||||
|
||||
nerr("ERROR: Failed to source address to the I/O buffer chain: %d\n", ret);
|
||||
nerr("ERROR: Failed to source address to the I/O buffer chain: %d\n",
|
||||
ret);
|
||||
goto drop_with_chain;
|
||||
}
|
||||
|
||||
@ -275,7 +276,7 @@ void icmpv6_input(FAR struct net_driver_s *dev, unsigned int iplen)
|
||||
neighbor_add(dev, ipv6->srcipaddr, sol->srclladdr);
|
||||
}
|
||||
|
||||
/* Yes.. Send a neighbor advertisement back to where the neighbor
|
||||
/* Yes.. Send a neighbor advertisement back to where the neighbor
|
||||
* solicitation came from.
|
||||
*/
|
||||
|
||||
@ -303,7 +304,8 @@ void icmpv6_input(FAR struct net_driver_s *dev, unsigned int iplen)
|
||||
*
|
||||
* Missing checks:
|
||||
* optlen = 1 (8 octets)
|
||||
* Should only update Neighbor Table if [O]verride bit is set in flags
|
||||
* Should only update Neighbor Table if
|
||||
* [O]verride bit is set in flags
|
||||
*/
|
||||
|
||||
adv = ICMPv6ADVERTISE;
|
||||
@ -384,7 +386,8 @@ void icmpv6_input(FAR struct net_driver_s *dev, unsigned int iplen)
|
||||
*/
|
||||
|
||||
adv = ICMPv6RADVERTISE;
|
||||
options = (FAR uint8_t *)adv + sizeof(struct icmpv6_router_advertise_s);
|
||||
options = (FAR uint8_t *)adv +
|
||||
sizeof(struct icmpv6_router_advertise_s);
|
||||
|
||||
for (ndx = 0; ndx + sizeof(struct icmpv6_prefixinfo_s) <= optlen; )
|
||||
{
|
||||
@ -408,7 +411,8 @@ void icmpv6_input(FAR struct net_driver_s *dev, unsigned int iplen)
|
||||
{
|
||||
/* Yes.. Notify any waiting threads */
|
||||
|
||||
icmpv6_rnotify(dev, ipv6->srcipaddr, opt->prefix, opt->preflen);
|
||||
icmpv6_rnotify(dev, ipv6->srcipaddr,
|
||||
opt->prefix, opt->preflen);
|
||||
prefix = true;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,8 @@ void icmpv6_poll(FAR struct net_driver_s *dev,
|
||||
|
||||
/* Perform the application callback */
|
||||
|
||||
devif_conn_event(dev, conn, ICMPv6_POLL, conn ? conn->list : dev->d_conncb);
|
||||
devif_conn_event(dev, conn, ICMPv6_POLL,
|
||||
conn ? conn->list : dev->d_conncb);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET_ICMPv6_SOCKET || CONFIG_NET_ICMPv6_NEIGHBOR */
|
||||
|
@ -289,7 +289,8 @@ FAR struct ieee802154_conn_s *
|
||||
* Name: ieee802154_callback
|
||||
*
|
||||
* Description:
|
||||
* Inform the application holding the IEEE 802.15.4 socket of a change in state.
|
||||
* Inform the application holding the IEEE 802.15.4 socket of a change in
|
||||
* state.
|
||||
*
|
||||
* Returned Value:
|
||||
* OK if IEEE 802.15.4 has been processed, otherwise ERROR.
|
||||
@ -308,9 +309,9 @@ uint16_t ieee802154_callback(FAR struct radio_driver_s *radio,
|
||||
*
|
||||
* Description:
|
||||
* Implements the socket recvfrom interface for the case of the AF_INET
|
||||
* and AF_INET6 address families. ieee802154_recvfrom() receives messages from
|
||||
* a socket, and may be used to receive data on a socket whether or not it
|
||||
* is connection-oriented.
|
||||
* and AF_INET6 address families. ieee802154_recvfrom() receives messages
|
||||
* from a socket, and may be used to receive data on a socket whether or
|
||||
* not it is connection-oriented.
|
||||
*
|
||||
* If 'from' is not NULL, and the underlying protocol provides the source
|
||||
* address, this source address is filled in. The argument 'fromlen' is
|
||||
@ -407,7 +408,8 @@ void ieee802154_poll(FAR struct net_driver_s *dev,
|
||||
ssize_t psock_ieee802154_sendto(FAR struct socket *psock,
|
||||
FAR const void *buf,
|
||||
size_t len, int flags,
|
||||
FAR const struct sockaddr *to, socklen_t tolen);
|
||||
FAR const struct sockaddr *to,
|
||||
socklen_t tolen);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ieee802154_container_initialize
|
||||
@ -445,8 +447,8 @@ void ieee802154_container_initialize(void);
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* A reference to the allocated container structure. All user fields in this
|
||||
* structure have been zeroed. On a failure to allocate, NULL is
|
||||
* A reference to the allocated container structure. All user fields in
|
||||
* this structure have been zeroed. On a failure to allocate, NULL is
|
||||
* returned.
|
||||
*
|
||||
* Assumptions:
|
||||
|
@ -208,7 +208,8 @@ FAR struct ieee802154_conn_s *
|
||||
|
||||
DEBUGASSERT(meta != NULL);
|
||||
|
||||
for (conn = (FAR struct ieee802154_conn_s *)g_active_ieee802154_connections.head;
|
||||
for (conn = (FAR struct ieee802154_conn_s *)
|
||||
g_active_ieee802154_connections.head;
|
||||
conn != NULL;
|
||||
conn = (FAR struct ieee802154_conn_s *)conn->node.flink)
|
||||
{
|
||||
|
@ -79,7 +79,8 @@ struct ieee802154_finddev_s
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int ieee802154_dev_callback(FAR struct net_driver_s *dev, FAR void *arg)
|
||||
static int ieee802154_dev_callback(FAR struct net_driver_s *dev,
|
||||
FAR void *arg)
|
||||
{
|
||||
FAR struct ieee802154_finddev_s *match =
|
||||
(FAR struct ieee802154_finddev_s *)arg;
|
||||
|
@ -94,7 +94,8 @@ void ieee802154_poll(FAR struct net_driver_s *dev,
|
||||
|
||||
/* Perform the application callback.
|
||||
*
|
||||
* 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
|
||||
|
@ -20,21 +20,21 @@
|
||||
* 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 CITEL Technologies Ltd nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
* 3. Neither the name of CITEL Technologies Ltd 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 CITEL TECHNOLOGIES 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 CITEL TECHNOLOGIES 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.
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
@ -19,21 +19,21 @@
|
||||
* 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 CITEL Technologies Ltd nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
* 3. Neither the name of CITEL Technologies Ltd 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 CITEL TECHNOLOGIES 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 CITEL TECHNOLOGIES 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.
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
@ -19,21 +19,21 @@
|
||||
* 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 CITEL Technologies Ltd nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
* 3. Neither the name of CITEL Technologies Ltd 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 CITEL TECHNOLOGIES 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 CITEL TECHNOLOGIES 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.
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@ -78,7 +78,9 @@ int igmp_schedmsg(FAR struct igmp_group_s *group, uint8_t msgid)
|
||||
DEBUGASSERT(group != NULL && !IS_SCHEDMSG(group->flags));
|
||||
DEBUGASSERT(group->ifindex > 0);
|
||||
|
||||
/* Get the device instance associated with the interface index of the group */
|
||||
/* Get the device instance associated with the interface index of the
|
||||
* group
|
||||
*/
|
||||
|
||||
dev = netdev_findbyindex(group->ifindex);
|
||||
if (dev == NULL)
|
||||
|
@ -19,21 +19,21 @@
|
||||
* 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 CITEL Technologies Ltd nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
* 3. Neither the name of CITEL Technologies Ltd 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 CITEL TECHNOLOGIES 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 CITEL TECHNOLOGIES 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.
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
@ -108,7 +108,8 @@ int ipv4_getsockname(FAR struct socket *psock, FAR struct sockaddr *addr,
|
||||
#ifdef NET_TCP_HAVE_STACK
|
||||
case SOCK_STREAM:
|
||||
{
|
||||
FAR struct tcp_conn_s *tcp_conn = (FAR struct tcp_conn_s *)psock->s_conn;
|
||||
FAR struct tcp_conn_s *tcp_conn =
|
||||
(FAR struct tcp_conn_s *)psock->s_conn;
|
||||
|
||||
outaddr->sin_port = tcp_conn->lport; /* Already in network byte order */
|
||||
lipaddr = tcp_conn->u.ipv4.laddr;
|
||||
@ -120,7 +121,8 @@ int ipv4_getsockname(FAR struct socket *psock, FAR struct sockaddr *addr,
|
||||
#ifdef NET_UDP_HAVE_STACK
|
||||
case SOCK_DGRAM:
|
||||
{
|
||||
FAR struct udp_conn_s *udp_conn = (FAR struct udp_conn_s *)psock->s_conn;
|
||||
FAR struct udp_conn_s *udp_conn =
|
||||
(FAR struct udp_conn_s *)psock->s_conn;
|
||||
|
||||
outaddr->sin_port = udp_conn->lport; /* Already in network byte order */
|
||||
lipaddr = udp_conn->u.ipv4.laddr;
|
||||
|
@ -107,7 +107,8 @@ int ipv6_getsockname(FAR struct socket *psock, FAR struct sockaddr *addr,
|
||||
#ifdef NET_TCP_HAVE_STACK
|
||||
case SOCK_STREAM:
|
||||
{
|
||||
FAR struct tcp_conn_s *tcp_conn = (FAR struct tcp_conn_s *)psock->s_conn;
|
||||
FAR struct tcp_conn_s *tcp_conn =
|
||||
(FAR struct tcp_conn_s *)psock->s_conn;
|
||||
|
||||
outaddr->sin6_port = tcp_conn->lport; /* Already in network byte order */
|
||||
lipaddr = &tcp_conn->u.ipv6.laddr;
|
||||
@ -119,7 +120,8 @@ int ipv6_getsockname(FAR struct socket *psock, FAR struct sockaddr *addr,
|
||||
#ifdef NET_UDP_HAVE_STACK
|
||||
case SOCK_DGRAM:
|
||||
{
|
||||
FAR struct udp_conn_s *udp_conn = (FAR struct udp_conn_s *)psock->s_conn;
|
||||
FAR struct udp_conn_s *udp_conn =
|
||||
(FAR struct udp_conn_s *)psock->s_conn;
|
||||
|
||||
outaddr->sin6_port = udp_conn->lport; /* Already in network byte order */
|
||||
lipaddr = &udp_conn->u.ipv6.laddr;
|
||||
|
@ -132,7 +132,8 @@ static inline void forward_ipselect(FAR struct forward_s *fwd)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static uint16_t ipfwd_eventhandler(FAR struct net_driver_s *dev, FAR void *conn,
|
||||
static uint16_t ipfwd_eventhandler(FAR struct net_driver_s *dev,
|
||||
FAR void *conn,
|
||||
FAR void *pvpriv, uint16_t flags)
|
||||
{
|
||||
FAR struct forward_s *fwd = (FAR struct forward_s *)pvpriv;
|
||||
|
@ -476,9 +476,9 @@ int ipv4_forward(FAR struct net_driver_s *dev, FAR struct ipv4_hdr_s *ipv4)
|
||||
else
|
||||
{
|
||||
/* Single network device. The use case here is where an endpoint acts
|
||||
* as a hub in a star configuration. This is typical for a wireless star
|
||||
* configuration where not all endpoints are accessible from all other
|
||||
* endpoints, but seems less useful for a wired network.
|
||||
* as a hub in a star configuration. This is typical for a wireless
|
||||
* star configuration where not all endpoints are accessible from all
|
||||
* other endpoints, but seems less useful for a wired network.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_NET_ETHERNET
|
||||
|
@ -609,9 +609,9 @@ int ipv6_forward(FAR struct net_driver_s *dev, FAR struct ipv6_hdr_s *ipv6)
|
||||
#if defined(CONFIG_NET_6LOWPAN) /* REVISIT: Currently only support for 6LoWPAN */
|
||||
{
|
||||
/* Single network device. The use case here is where an endpoint acts
|
||||
* as a hub in a star configuration. This is typical for a wireless star
|
||||
* configuration where not all endpoints are accessible from all other
|
||||
* endpoints, but seems less useful for a wired network.
|
||||
* as a hub in a star configuration. This is typical for a wireless
|
||||
* star configuration where not all endpoints are accessible from all
|
||||
* other endpoints, but seems less useful for a wired network.
|
||||
*/
|
||||
|
||||
/* Perform any necessary packet conversions. If the packet was handled
|
||||
@ -629,9 +629,11 @@ int ipv6_forward(FAR struct net_driver_s *dev, FAR struct ipv6_hdr_s *ipv6)
|
||||
else if (ret == PACKET_NOT_FORWARDED)
|
||||
{
|
||||
#ifdef CONFIG_NET_ETHERNET
|
||||
/* REVISIT: For Ethernet we may have to fix up the Ethernet header:
|
||||
/* REVISIT:
|
||||
* For Ethernet we may have to fix up the Ethernet header:
|
||||
* - source MAC, the MAC of the current device.
|
||||
* - dest MAC, the MAC associated with the destination IPv6 address.
|
||||
* - dest MAC, the MAC associated with the destination IPv6
|
||||
* address.
|
||||
* This will involve ICMPv6 and Neighbor Discovery.
|
||||
*/
|
||||
|
||||
@ -653,7 +655,8 @@ int ipv6_forward(FAR struct net_driver_s *dev, FAR struct ipv6_hdr_s *ipv6)
|
||||
|
||||
#else /* CONFIG_NET_6LOWPAN */
|
||||
{
|
||||
nwarn("WARNING: Packet forwarding not supported in this configuration\n");
|
||||
nwarn(
|
||||
"WARNING: Packet forwarding not supported in this configuration\n");
|
||||
ret = -ENOSYS;
|
||||
goto drop;
|
||||
}
|
||||
|
@ -95,7 +95,8 @@ static int local_waitlisten(FAR struct local_conn_s *server)
|
||||
* Input Parameters:
|
||||
* psock The listening Unix domain socket structure
|
||||
* addr Receives the address of the connecting client
|
||||
* addrlen Input: allocated size of 'addr', Return: returned size of 'addr'
|
||||
* addrlen Input: allocated size of 'addr',
|
||||
* Return: returned size of 'addr'
|
||||
* newconn The new, accepted Unix domain connection structure
|
||||
*
|
||||
* Returned Value:
|
||||
@ -190,8 +191,8 @@ int local_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
|
||||
_SS_ISNONBLOCK(psock->s_flags));
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("ERROR: Failed to open write-only FIFOs for %s: %d\n",
|
||||
conn->lc_path, ret);
|
||||
nerr("ERROR: Failed to open write-only FIFOs for %s: %d\n",
|
||||
conn->lc_path, ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,8 @@ int local_release(FAR struct local_conn_s *conn)
|
||||
|
||||
/* Are there still clients waiting for a connection to the server? */
|
||||
|
||||
for (client = (FAR struct local_conn_s *)conn->u.server.lc_waiters.head;
|
||||
for (client =
|
||||
(FAR struct local_conn_s *)conn->u.server.lc_waiters.head;
|
||||
client;
|
||||
client = (FAR struct local_conn_s *)dq_next(&client->lc_node))
|
||||
{
|
||||
|
@ -81,8 +81,10 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ssize_t psock_local_sendto(FAR struct socket *psock, FAR const void *buf,
|
||||
size_t len, int flags, FAR const struct sockaddr *to,
|
||||
ssize_t psock_local_sendto(FAR struct socket *psock,
|
||||
FAR const void *buf,
|
||||
size_t len, int flags,
|
||||
FAR const struct sockaddr *to,
|
||||
socklen_t tolen)
|
||||
{
|
||||
FAR struct local_conn_s *conn = (FAR struct local_conn_s *)psock->s_conn;
|
||||
@ -118,7 +120,9 @@ ssize_t psock_local_sendto(FAR struct socket *psock, FAR const void *buf,
|
||||
|
||||
if (tolen < sizeof(sa_family_t) + 2)
|
||||
{
|
||||
/* EFAULT - An invalid user space address was specified for a parameter */
|
||||
/* EFAULT
|
||||
* - An invalid user space address was specified for a parameter
|
||||
*/
|
||||
|
||||
return -EFAULT;
|
||||
}
|
||||
|
@ -72,7 +72,9 @@ int mld_schedmsg(FAR struct mld_group_s *group, uint8_t msgtype)
|
||||
DEBUGASSERT(group != NULL && !IS_MLD_SCHEDMSG(group->flags));
|
||||
DEBUGASSERT(group->ifindex > 0);
|
||||
|
||||
/* Get the device instance associated with the interface index of the group */
|
||||
/* Get the device instance associated with the interface index
|
||||
* of the group
|
||||
*/
|
||||
|
||||
dev = netdev_findbyindex(group->ifindex);
|
||||
if (dev == NULL)
|
||||
|
@ -106,7 +106,7 @@ static inline void mld_check_v1compat(FAR struct net_driver_s *dev,
|
||||
*/
|
||||
|
||||
mld_start_v1timer(dev,
|
||||
MSEC2TICK(MLD_V1PRESENT_MSEC((clock_t)MLD_QUERY_MSEC)));
|
||||
MSEC2TICK(MLD_V1PRESENT_MSEC((clock_t)MLD_QUERY_MSEC)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,7 +124,9 @@ static clock_t mld_mrc2mrd(uint16_t mrc)
|
||||
{
|
||||
uint32_t mrd; /* Units of milliseconds */
|
||||
|
||||
/* If bit 15 is not set (i.e., mrc < 32768), then no conversion is required. */
|
||||
/* If bit 15 is not set (i.e., mrc < 32768),
|
||||
* then no conversion is required.
|
||||
*/
|
||||
|
||||
if (mrc < 32768)
|
||||
{
|
||||
|
@ -62,7 +62,8 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int mld_report(FAR struct net_driver_s *dev, FAR const net_ipv6addr_t grpaddr)
|
||||
int mld_report(FAR struct net_driver_s *dev,
|
||||
FAR const net_ipv6addr_t grpaddr)
|
||||
{
|
||||
FAR struct mld_group_s *group;
|
||||
|
||||
|
@ -205,14 +205,15 @@ void mld_send(FAR struct net_driver_s *dev, FAR struct mld_group_s *group,
|
||||
|
||||
net_ipv6addr_hdrcopy(ipv6->srcipaddr, dev->d_ipv6addr);
|
||||
|
||||
/* Select the IPv6 destination address. This varies with the type of message
|
||||
* being sent:
|
||||
/* Select the IPv6 destination address.
|
||||
* This varies with the type of message being sent:
|
||||
*
|
||||
* MESSAGE DESTINATION ADDRESS
|
||||
* General Query Message: The link-local, all nodes multicast address.
|
||||
* MAS Query Messages: The group multicast address.
|
||||
* V1 Report Message: The group multicast address.
|
||||
* V2 Report Message: The link-local, all MLDv2 router multicast address.
|
||||
* V2 Report Message: The link-local, all MLDv2 router multicast
|
||||
* address.
|
||||
* Done Message: The link-local, all routers multicast address.
|
||||
*/
|
||||
|
||||
|
@ -120,7 +120,8 @@ void neighbor_add(FAR struct net_driver_s *dev, FAR net_ipv6addr_t ipaddr,
|
||||
* ipaddr - The IPv6 address to use in the lookup;
|
||||
* laddr - Location to return the corresponding link layer address.
|
||||
* This address may be NULL. In that case, this function may be
|
||||
* used simply to determine if the link layer address is available.
|
||||
* used simply to determine if the link layer address is
|
||||
* available.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) if the link layer address is returned. A negated errno value
|
||||
|
@ -120,7 +120,8 @@ static int neighbor_match(FAR struct net_driver_s *dev, FAR void *arg)
|
||||
* ipaddr - The IPv6 address to use in the lookup;
|
||||
* laddr - Location to return the corresponding link layer address.
|
||||
* This address may be NULL. In that case, this function may be
|
||||
* used simply to determine if the link layer address is available.
|
||||
* used simply to determine if the link layer address is
|
||||
* available.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) if the link layer address is returned. A negated errno value
|
||||
|
@ -92,7 +92,8 @@ unsigned int neighbor_snapshot(FAR struct neighbor_entry_s *snapshot,
|
||||
|
||||
if (!net_ipv6addr_cmp(neighbor->ne_ipaddr, g_ipv6_unspecaddr))
|
||||
{
|
||||
memcpy(&snapshot[ncopied], neighbor, sizeof(struct neighbor_entry_s));
|
||||
memcpy(&snapshot[ncopied], neighbor,
|
||||
sizeof(struct neighbor_entry_s));
|
||||
ncopied++;
|
||||
}
|
||||
}
|
||||
|
@ -108,7 +108,8 @@ EXTERN uint32_t g_devfreed;
|
||||
/* Callback from netdev_foreach() */
|
||||
|
||||
struct net_driver_s; /* Forward reference */
|
||||
typedef int (*netdev_callback_t)(FAR struct net_driver_s *dev, FAR void *arg);
|
||||
typedef int (*netdev_callback_t)(FAR struct net_driver_s *dev,
|
||||
FAR void *arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
@ -224,7 +225,8 @@ FAR struct net_driver_s *netdev_findby_lipv4addr(in_addr_t lipaddr);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
FAR struct net_driver_s *netdev_findby_lipv6addr(const net_ipv6addr_t lipaddr);
|
||||
FAR struct net_driver_s *netdev_findby_lipv6addr(
|
||||
const net_ipv6addr_t lipaddr);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -267,8 +269,9 @@ FAR struct net_driver_s *netdev_findby_ripv4addr(in_addr_t lipaddr,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
FAR struct net_driver_s *netdev_findby_ripv6addr(const net_ipv6addr_t lipaddr,
|
||||
const net_ipv6addr_t ripaddr);
|
||||
FAR struct net_driver_s *netdev_findby_ripv6addr(
|
||||
const net_ipv6addr_t lipaddr,
|
||||
const net_ipv6addr_t ripaddr);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -129,7 +129,8 @@ FAR struct net_driver_s *netdev_findby_lipv4addr(in_addr_t lipaddr)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
FAR struct net_driver_s *netdev_findby_lipv6addr(const net_ipv6addr_t lipaddr)
|
||||
FAR struct net_driver_s *netdev_findby_lipv6addr(
|
||||
const net_ipv6addr_t lipaddr)
|
||||
{
|
||||
FAR struct net_driver_s *dev;
|
||||
|
||||
@ -270,8 +271,9 @@ FAR struct net_driver_s *netdev_findby_ripv4addr(in_addr_t lipaddr,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
FAR struct net_driver_s *netdev_findby_ripv6addr(const net_ipv6addr_t lipaddr,
|
||||
const net_ipv6addr_t ripaddr)
|
||||
FAR struct net_driver_s *netdev_findby_ripv6addr(
|
||||
const net_ipv6addr_t lipaddr,
|
||||
const net_ipv6addr_t ripaddr)
|
||||
{
|
||||
struct net_driver_s *dev;
|
||||
#ifdef CONFIG_NET_ROUTE
|
||||
|
@ -85,9 +85,12 @@ static int netprocfs_joinleave(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_queries_sent(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_reports_sent(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_done_sent(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_queries_received_1(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_queries_received_2(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_reports_received(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_queries_received_1(
|
||||
FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_queries_received_2(
|
||||
FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_reports_received(
|
||||
FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_done_received(FAR struct netprocfs_file_s *netfile);
|
||||
|
||||
/****************************************************************************
|
||||
@ -261,7 +264,8 @@ static int netprocfs_done_received(FAR struct netprocfs_file_s *netfile)
|
||||
ssize_t netprocfs_read_mldstats(FAR struct netprocfs_file_s *priv,
|
||||
FAR char *buffer, size_t buflen)
|
||||
{
|
||||
return netprocfs_read_linegen(priv, buffer, buflen, g_mld_linegen, NSTAT_LINES);
|
||||
return netprocfs_read_linegen(priv, buffer, buflen,
|
||||
g_mld_linegen, NSTAT_LINES);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET_ICMPv6 || CONFIG_NET_MLD */
|
||||
|
@ -61,24 +61,24 @@
|
||||
|
||||
/* Line generating functions */
|
||||
|
||||
static int netprocfs_header(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_received(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_dropped(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_header(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_received(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_dropped(FAR struct netprocfs_file_s *netfile);
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
static int netprocfs_ipv4_dropped(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_ipv4_dropped(FAR struct netprocfs_file_s *netfile);
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
static int netprocfs_ipv6_dropped(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_ipv6_dropped(FAR struct netprocfs_file_s *netfile);
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
static int netprocfs_checksum(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_checksum(FAR struct netprocfs_file_s *netfile);
|
||||
#ifdef CONFIG_NET_TCP
|
||||
static int netprocfs_tcp_dropped_1(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_tcp_dropped_2(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_tcp_dropped_1(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_tcp_dropped_2(FAR struct netprocfs_file_s *netfile);
|
||||
#endif /* CONFIG_NET_TCP */
|
||||
static int netprocfs_prototype(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_sent(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_prototype(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_sent(FAR struct netprocfs_file_s *netfile);
|
||||
#ifdef CONFIG_NET_TCP
|
||||
static int netprocfs_retransmissions(FAR struct netprocfs_file_s *netfile);
|
||||
static int netprocfs_retransmissions(FAR struct netprocfs_file_s *netfile);
|
||||
#endif /* CONFIG_NET_TCP */
|
||||
|
||||
/****************************************************************************
|
||||
@ -461,7 +461,8 @@ static int netprocfs_retransmissions(FAR struct netprocfs_file_s *netfile)
|
||||
ssize_t netprocfs_read_netstats(FAR struct netprocfs_file_s *priv,
|
||||
FAR char *buffer, size_t buflen)
|
||||
{
|
||||
return netprocfs_read_linegen(priv, buffer, buflen, g_stat_linegen, NSTAT_LINES);
|
||||
return netprocfs_read_linegen(priv, buffer, buflen,
|
||||
g_stat_linegen, NSTAT_LINES);
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -111,7 +111,8 @@ int net_openroute_ipv6(int oflags, FAR struct file *filep);
|
||||
* Read one route entry from the IPv4/IPv6 routing table.
|
||||
*
|
||||
* Input Parameters:
|
||||
* filep - Detached file instance obtained by net_openroute_ipv{4|6}[_rdonly]
|
||||
* filep - Detached file instance obtained by
|
||||
* net_openroute_ipv{4|6}[_rdonly]
|
||||
* route - Location to return the next route read from the file
|
||||
*
|
||||
* Returned Value:
|
||||
@ -138,7 +139,8 @@ ssize_t net_readroute_ipv6(FAR struct file *filep,
|
||||
* Write one route entry to the IPv4/IPv6 routing table.
|
||||
*
|
||||
* Input Parameters:
|
||||
* filep - Detached file instance obtained by net_openroute_ipv{4|6}[_rdonly]
|
||||
* filep - Detached file instance obtained by
|
||||
* net_openroute_ipv{4|6}[_rdonly]
|
||||
* route - Location to return the next route read from the file
|
||||
*
|
||||
* Returned Value:
|
||||
@ -164,7 +166,8 @@ ssize_t net_writeroute_ipv6(FAR struct file *filep,
|
||||
* Seek to a specific entry entry to the IPv4/IPv6 routing table.
|
||||
*
|
||||
* Input Parameters:
|
||||
* filep - Detached file instance obtained by net_openroute_ipv{4|6}[_rdonly]
|
||||
* filep - Detached file instance obtained by
|
||||
* net_openroute_ipv{4|6}[_rdonly]
|
||||
* index - The index of the routing table entry to seek to.
|
||||
*
|
||||
* Returned Value:
|
||||
@ -264,7 +267,8 @@ int net_unlockroute_ipv6(void);
|
||||
* Close the IPv4/IPv6 routing table.
|
||||
*
|
||||
* Input Parameters:
|
||||
* filep - Detached file instance obtained by net_openroute_ipv{4|6}[_rdonly]
|
||||
* filep - Detached file instance obtained by
|
||||
* net_openroute_ipv{4|6}[_rdonly]
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success. A negated errno value is returned on
|
||||
|
@ -427,7 +427,9 @@ static void net_reset_ipv4_cache(void)
|
||||
cacheroute_init(&g_ipv4_cache);
|
||||
cacheroute_init(&g_free_ipv4cache);
|
||||
|
||||
/* Add all of the pre-allocated routing table cache entries to a free list */
|
||||
/* Add all of the pre-allocated routing table cache entries to
|
||||
* a free list
|
||||
*/
|
||||
|
||||
for (i = 0; i < CONFIG_ROUTE_MAX_IPv4_CACHEROUTES; i++)
|
||||
{
|
||||
|
@ -101,7 +101,8 @@ struct route_match_ipv6_s
|
||||
#ifdef CONFIG_ROUTE_IPv4_FILEROUTE
|
||||
static int net_match_ipv4(FAR struct net_route_ipv4_s *route, FAR void *arg)
|
||||
{
|
||||
FAR struct route_match_ipv4_s *match = (FAR struct route_match_ipv4_s *)arg;
|
||||
FAR struct route_match_ipv4_s *match =
|
||||
(FAR struct route_match_ipv4_s *)arg;
|
||||
|
||||
/* To match, the masked target address must be the same, and the masks
|
||||
* must be the same.
|
||||
@ -132,7 +133,8 @@ static int net_match_ipv4(FAR struct net_route_ipv4_s *route, FAR void *arg)
|
||||
#ifdef CONFIG_ROUTE_IPv6_FILEROUTE
|
||||
static int net_match_ipv6(FAR struct net_route_ipv6_s *route, FAR void *arg)
|
||||
{
|
||||
FAR struct route_match_ipv6_s *match = (FAR struct route_match_ipv6_s *)arg;
|
||||
FAR struct route_match_ipv6_s *match =
|
||||
(FAR struct route_match_ipv6_s *)arg;
|
||||
|
||||
/* To match, the masked target address must be the same, and the masks
|
||||
* must be the same.
|
||||
@ -230,7 +232,9 @@ int net_delroute_ipv4(in_addr_t target, in_addr_t netmask)
|
||||
net_ipv4addr_copy(match.netmask, netmask);
|
||||
match.index = 0;
|
||||
|
||||
/* Then find the index into the routing table where the match can be found */
|
||||
/* Then find the index into the routing table where the match can be
|
||||
* found
|
||||
*/
|
||||
|
||||
ret = net_foreachroute_ipv4(net_match_ipv4, &match);
|
||||
if (ret < 0)
|
||||
@ -378,7 +382,9 @@ int net_delroute_ipv6(net_ipv6addr_t target, net_ipv6addr_t netmask)
|
||||
net_ipv6addr_copy(match.netmask, netmask);
|
||||
match.index = 0;
|
||||
|
||||
/* Then find the index into the routing table where the match can be found */
|
||||
/* Then find the index into the routing table where the match can be
|
||||
* found
|
||||
*/
|
||||
|
||||
ret = net_foreachroute_ipv6(net_match_ipv6, &match);
|
||||
if (ret < 0)
|
||||
|
@ -96,7 +96,8 @@ struct route_match_ipv6_s
|
||||
#ifdef CONFIG_ROUTE_IPv4_RAMROUTE
|
||||
static int net_match_ipv4(FAR struct net_route_ipv4_s *route, FAR void *arg)
|
||||
{
|
||||
FAR struct route_match_ipv4_s *match = (FAR struct route_match_ipv4_s *)arg;
|
||||
FAR struct route_match_ipv4_s *match =
|
||||
(FAR struct route_match_ipv4_s *)arg;
|
||||
|
||||
/* To match, the masked target address must be the same, and the masks
|
||||
* must be the same.
|
||||
@ -114,8 +115,9 @@ static int net_match_ipv4(FAR struct net_route_ipv4_s *route, FAR void *arg)
|
||||
|
||||
if (match->prev)
|
||||
{
|
||||
ramroute_ipv4_remafter((FAR struct net_route_ipv4_entry_s *)match->prev,
|
||||
&g_ipv4_routes);
|
||||
ramroute_ipv4_remafter(
|
||||
(FAR struct net_route_ipv4_entry_s *)match->prev,
|
||||
&g_ipv4_routes);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -139,9 +141,11 @@ static int net_match_ipv4(FAR struct net_route_ipv4_s *route, FAR void *arg)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ROUTE_IPv6_RAMROUTE
|
||||
static int net_match_ipv6(FAR struct net_route_ipv6_s *route, FAR void *arg)
|
||||
static int net_match_ipv6(
|
||||
FAR struct net_route_ipv6_s *route, FAR void *arg)
|
||||
{
|
||||
FAR struct route_match_ipv6_s *match = (FAR struct route_match_ipv6_s *)arg;
|
||||
FAR struct route_match_ipv6_s *match =
|
||||
(FAR struct route_match_ipv6_s *)arg;
|
||||
|
||||
/* To match, the masked target address must be the same, and the masks
|
||||
* must be the same.
|
||||
@ -167,8 +171,9 @@ static int net_match_ipv6(FAR struct net_route_ipv6_s *route, FAR void *arg)
|
||||
|
||||
if (match->prev)
|
||||
{
|
||||
ramroute_ipv6_remafter((FAR struct net_route_ipv6_entry_s *)match->prev,
|
||||
&g_ipv6_routes);
|
||||
ramroute_ipv6_remafter(
|
||||
(FAR struct net_route_ipv6_entry_s *)match->prev,
|
||||
&g_ipv6_routes);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -119,7 +119,8 @@ struct route_ipv6_match_s
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
static int net_ipv4_match(FAR struct net_route_ipv4_s *route, FAR void *arg)
|
||||
{
|
||||
FAR struct route_ipv4_match_s *match = (FAR struct route_ipv4_match_s *)arg;
|
||||
FAR struct route_ipv4_match_s *match =
|
||||
(FAR struct route_ipv4_match_s *)arg;
|
||||
|
||||
/* To match, the masked target addresses must be the same. In the event
|
||||
* of multiple matches, only the first is returned. There is not (yet) any
|
||||
@ -162,7 +163,8 @@ static int net_ipv4_match(FAR struct net_route_ipv4_s *route, FAR void *arg)
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
static int net_ipv6_match(FAR struct net_route_ipv6_s *route, FAR void *arg)
|
||||
{
|
||||
FAR struct route_ipv6_match_s *match = (FAR struct route_ipv6_match_s *)arg;
|
||||
FAR struct route_ipv6_match_s *match =
|
||||
(FAR struct route_ipv6_match_s *)arg;
|
||||
|
||||
/* To match, the masked target addresses must be the same. In the event
|
||||
* of multiple matches, only the first is returned. There is not (yet) any
|
||||
|
@ -62,7 +62,9 @@ struct net_route_ipv4_s
|
||||
in_addr_t router; /* Route packets via this router */
|
||||
};
|
||||
|
||||
/* Type of the call out function pointer provided to net_foreachroute_ipv4() */
|
||||
/* Type of the call out function pointer provided to
|
||||
* net_foreachroute_ipv4()
|
||||
*/
|
||||
|
||||
typedef int (*route_handler_ipv4_t)(FAR struct net_route_ipv4_s *route,
|
||||
FAR void *arg);
|
||||
@ -76,7 +78,9 @@ struct net_route_ipv6_s
|
||||
net_ipv6addr_t router; /* Route packets via this router */
|
||||
};
|
||||
|
||||
/* Type of the call out function pointer provided to net_foreachroute_ipv6() */
|
||||
/* Type of the call out function pointer provided to
|
||||
* net_foreachroute_ipv6()
|
||||
*/
|
||||
|
||||
typedef int (*route_handler_ipv6_t)(FAR struct net_route_ipv6_s *route,
|
||||
FAR void *arg);
|
||||
|
@ -83,8 +83,8 @@ void sixlowpan_initialize(void);
|
||||
* Name: psock_6lowpan_tcp_send
|
||||
*
|
||||
* Description:
|
||||
* psock_6lowpan_tcp_send() call may be used only when the TCP socket is in a
|
||||
* connected state (so that the intended recipient is known).
|
||||
* psock_6lowpan_tcp_send() call may be used only when the TCP socket is in
|
||||
* a connected state (so that the intended recipient is known).
|
||||
*
|
||||
* Input Parameters:
|
||||
* psock - An instance of the internal socket structure.
|
||||
|
@ -86,7 +86,8 @@
|
||||
* Input Parameters:
|
||||
* psock Reference to the listening socket structure
|
||||
* addr Receives the address of the connecting client
|
||||
* addrlen Input: allocated size of 'addr', Return: returned size of 'addr'
|
||||
* addrlen Input: allocated size of 'addr', Return: returned size
|
||||
* of 'addr'
|
||||
* newsock Location to return the accepted socket information.
|
||||
*
|
||||
* Returned Value:
|
||||
@ -197,7 +198,8 @@ errout_with_lock:
|
||||
* Input Parameters:
|
||||
* sockfd The listening socket descriptor
|
||||
* addr Receives the address of the connecting client
|
||||
* addrlen Input: allocated size of 'addr', Return: returned size of 'addr'
|
||||
* addrlen Input: allocated size of 'addr',
|
||||
* Return: returned size of 'addr'
|
||||
*
|
||||
* Returned Value:
|
||||
* Returns -1 on error. If it succeeds, it returns a non-negative integer
|
||||
@ -252,8 +254,8 @@ int accept(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen)
|
||||
if (psock == NULL || psock->s_crefs <= 0)
|
||||
{
|
||||
/* It is not a valid socket description. Distinguish between the cases
|
||||
* where sockfd is a just valid and when it is a valid file descriptor used
|
||||
* in the wrong context.
|
||||
* where sockfd is a just valid and when it is a valid file descriptor
|
||||
* used in the wrong context.
|
||||
*/
|
||||
|
||||
if ((unsigned int)sockfd < CONFIG_NFILE_DESCRIPTORS)
|
||||
|
@ -149,7 +149,8 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr,
|
||||
|
||||
/* Let the address family's connect() method handle the operation */
|
||||
|
||||
DEBUGASSERT(psock->s_sockif != NULL && psock->s_sockif->si_connect != NULL);
|
||||
DEBUGASSERT(psock->s_sockif != NULL &&
|
||||
psock->s_sockif->si_connect != NULL);
|
||||
ret = psock->s_sockif->si_connect(psock, addr, addrlen);
|
||||
if (ret < 0)
|
||||
{
|
||||
@ -172,9 +173,9 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr,
|
||||
* Name: connect
|
||||
*
|
||||
* Description:
|
||||
* connect() connects the socket referred to by the file descriptor 'sockfd'
|
||||
* to the address specified by 'addr'. The addrlen argument specifies
|
||||
* the size of 'addr'. The format of the address in 'addr' is
|
||||
* connect() connects the socket referred to by the file descriptor
|
||||
* 'sockfd' to the address specified by 'addr'. The addrlen argument
|
||||
* specifies the size of 'addr'. The format of the address in 'addr' is
|
||||
* determined by the address space of the socket 'sockfd'.
|
||||
*
|
||||
* If the socket 'sockfd' is of type SOCK_DGRAM then 'addr' is the address
|
||||
|
@ -112,10 +112,10 @@ int psock_listen(FAR struct socket *psock, int backlog)
|
||||
*
|
||||
* Description:
|
||||
* To accept connections, a socket is first created with socket(), a
|
||||
* willingness to accept incoming connections and a queue limit for incoming
|
||||
* connections are specified with listen(), and then the connections are
|
||||
* accepted with accept(). The listen() call applies only to sockets of
|
||||
* type SOCK_STREAM or SOCK_SEQPACKET.
|
||||
* willingness to accept incoming connections and a queue limit for
|
||||
* incoming connections are specified with listen(), and then the
|
||||
* connections are accepted with accept(). The listen() call applies only
|
||||
* to sockets of type SOCK_STREAM or SOCK_SEQPACKET.
|
||||
*
|
||||
* Input Parameters:
|
||||
* sockfd Socket descriptor of the bound socket
|
||||
|
@ -124,7 +124,8 @@ int net_fstat(int sockfd, FAR struct stat *buf)
|
||||
#if defined(NET_TCP_HAVE_STACK)
|
||||
case SOCK_STREAM:
|
||||
{
|
||||
FAR struct tcp_conn_s *conn = (FAR struct tcp_conn_s *)psock->s_conn;
|
||||
FAR struct tcp_conn_s *conn =
|
||||
(FAR struct tcp_conn_s *)psock->s_conn;
|
||||
|
||||
/* For TCP, the MSS is a dynamic value that maintained in the
|
||||
* connection structure.
|
||||
@ -138,7 +139,8 @@ int net_fstat(int sockfd, FAR struct stat *buf)
|
||||
#if defined(NET_UDP_HAVE_STACK)
|
||||
case SOCK_DGRAM:
|
||||
{
|
||||
FAR struct udp_conn_s *conn = (FAR struct udp_conn_s *)psock->s_conn;
|
||||
FAR struct udp_conn_s *conn =
|
||||
(FAR struct udp_conn_s *)psock->s_conn;
|
||||
FAR struct net_driver_s *dev;
|
||||
uint16_t iplen;
|
||||
|
||||
@ -146,8 +148,8 @@ int net_fstat(int sockfd, FAR struct stat *buf)
|
||||
*
|
||||
* MSS = MTU - LL_HDRLEN - UDP_HDRLEN - IP_HDRLEN
|
||||
*
|
||||
* We need to have the device that services the connection in order
|
||||
* to get the MTU and LL_HDRLEN:
|
||||
* We need to have the device that services the connection in
|
||||
* order to get the MTU and LL_HDRLEN:
|
||||
*/
|
||||
|
||||
dev = udp_find_raddr_device(conn);
|
||||
|
@ -136,9 +136,9 @@ int tcp_backlogcreate(FAR struct tcp_conn_s *conn, int nblg)
|
||||
tcp_backlogdestroy(conn);
|
||||
|
||||
/* Now install the backlog tear-off in the connection. NOTE that bls may
|
||||
* actually be NULL if nblg is <= 0; In that case, we are disabling backlog
|
||||
* support. Since the network is locked, destroying the old backlog and
|
||||
* replace it with the new is an atomic operation
|
||||
* actually be NULL if nblg is <= 0; In that case, we are disabling
|
||||
* backlog support. Since the network is locked, destroying the old
|
||||
* backlog and replace it with the new is an atomic operation
|
||||
*/
|
||||
|
||||
conn->backlog = bls;
|
||||
@ -193,7 +193,9 @@ int tcp_backlogdestroy(FAR struct tcp_conn_s *conn)
|
||||
blconn = blc->bc_conn;
|
||||
if (blconn)
|
||||
{
|
||||
/* REVISIT -- such connections really need to be gracefully closed */
|
||||
/* REVISIT
|
||||
* -- such connections really need to be gracefully closed
|
||||
*/
|
||||
|
||||
blconn->blparent = NULL;
|
||||
blconn->backlog = NULL;
|
||||
@ -223,7 +225,8 @@ int tcp_backlogdestroy(FAR struct tcp_conn_s *conn)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int tcp_backlogadd(FAR struct tcp_conn_s *conn, FAR struct tcp_conn_s *blconn)
|
||||
int tcp_backlogadd(FAR struct tcp_conn_s *conn,
|
||||
FAR struct tcp_conn_s *blconn)
|
||||
{
|
||||
FAR struct tcp_backlog_s *bls;
|
||||
FAR struct tcp_blcontainer_s *blc;
|
||||
@ -367,7 +370,8 @@ int tcp_backlogdelete(FAR struct tcp_conn_s *conn,
|
||||
for (blc = (FAR struct tcp_blcontainer_s *)sq_peek(&bls->bl_pending),
|
||||
prev = NULL;
|
||||
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))
|
||||
{
|
||||
if (blc->bc_conn == blconn)
|
||||
{
|
||||
|
@ -170,8 +170,8 @@ int udp_writebuffer_notifier_setup(worker_t worker,
|
||||
*
|
||||
* Description:
|
||||
* Eliminate a UDP read-ahead notification previously setup by
|
||||
* udp_readahead_notifier_setup(). This function should only be called if the
|
||||
* notification should be aborted prior to the notification. The
|
||||
* udp_readahead_notifier_setup(). This function should only be called if
|
||||
* the notification should be aborted prior to the notification. The
|
||||
* notification will automatically be torn down after the notification.
|
||||
*
|
||||
* Input Parameters:
|
||||
@ -201,7 +201,8 @@ int udp_notifier_teardown(int key)
|
||||
* When read-ahead data becomes available, *all* of the workers waiting
|
||||
* for read-ahead data will be executed. If there are multiple workers
|
||||
* waiting for read-ahead data then only the first to execute will get the
|
||||
* data. Others will need to call udp_readahead_notifier_setup() once again.
|
||||
* data.
|
||||
* Others will need to call udp_readahead_notifier_setup() once again.
|
||||
*
|
||||
* Input Parameters:
|
||||
* conn - The UDP connection where read-ahead data was just buffered.
|
||||
|
@ -120,10 +120,10 @@ int udp_setsockopt(FAR struct socket *psock, int option,
|
||||
* but this option only makes sense for UDP sockets trying to broadcast
|
||||
* while their local address is not set, eg, with DHCP requests.
|
||||
* The problem is that we are not able to determine the interface to be
|
||||
* used for sending packets when multiple interfaces do not have a local
|
||||
* address yet. This option can be used to "force" the interface used to
|
||||
* send the UDP traffic in this connection. Note that it does NOT only
|
||||
* apply to broadcast packets.
|
||||
* used for sending packets when multiple interfaces do not have a
|
||||
* local address yet. This option can be used to "force" the interface
|
||||
* used to send the UDP traffic in this connection. Note that it does
|
||||
* NOT only apply to broadcast packets.
|
||||
*/
|
||||
|
||||
case UDP_BINDTODEVICE: /* Bind socket to a specific network device */
|
||||
|
Loading…
Reference in New Issue
Block a user