From 7dc7ef45f1551a0ec2ac0241725fe70aee66de7b Mon Sep 17 00:00:00 2001 From: Alin Jerpelea Date: Fri, 19 Feb 2021 15:01:46 +0100 Subject: [PATCH] net: nxstyle fixes Nxstyle fixes to pass CI. Signed-off-by: Alin Jerpelea --- net/arp/arp.h | 10 ++++---- net/arp/arp_ipin.c | 3 ++- net/arp/arp_out.c | 11 +++++--- net/bluetooth/bluetooth_finddev.c | 3 ++- net/bluetooth/bluetooth_input.c | 4 +-- net/icmp/icmp_input.c | 8 +++--- net/icmpv6/icmpv6.h | 39 +++++++++++++++++------------ net/icmpv6/icmpv6_advertise.c | 3 ++- net/icmpv6/icmpv6_conn.c | 10 +++++--- net/icmpv6/icmpv6_input.c | 14 +++++++---- net/icmpv6/icmpv6_poll.c | 3 ++- net/ieee802154/ieee802154.h | 16 ++++++------ net/ieee802154/ieee802154_conn.c | 3 ++- net/ieee802154/ieee802154_finddev.c | 3 ++- net/ieee802154/ieee802154_poll.c | 3 ++- net/igmp/igmp_initialize.c | 22 ++++++++-------- net/igmp/igmp_mcastmac.c | 22 ++++++++-------- net/igmp/igmp_msg.c | 26 ++++++++++--------- net/igmp/igmp_poll.c | 22 ++++++++-------- net/inet/ipv4_getsockname.c | 6 +++-- net/inet/ipv6_getsockname.c | 6 +++-- net/ipforward/ipfwd_forward.c | 3 ++- net/ipforward/ipv4_forward.c | 6 ++--- net/ipforward/ipv6_forward.c | 15 ++++++----- net/local/local_accept.c | 7 +++--- net/local/local_release.c | 3 ++- net/local/local_sendto.c | 10 +++++--- net/mld/mld_msg.c | 4 ++- net/mld/mld_query.c | 6 +++-- net/mld/mld_report.c | 3 ++- net/mld/mld_send.c | 7 +++--- net/neighbor/neighbor.h | 3 ++- net/neighbor/neighbor_lookup.c | 3 ++- net/neighbor/neighbor_snapshot.c | 3 ++- net/netdev/netdev.h | 11 +++++--- net/netdev/netdev_findbyaddr.c | 8 +++--- net/procfs/net_mld.c | 12 ++++++--- net/procfs/net_statistics.c | 25 +++++++++--------- net/route/fileroute.h | 12 ++++++--- net/route/net_cacheroute.c | 4 ++- net/route/net_del_fileroute.c | 14 ++++++++--- net/route/net_del_ramroute.c | 19 ++++++++------ net/route/net_router.c | 6 +++-- net/route/route.h | 8 ++++-- net/sixlowpan/sixlowpan.h | 4 +-- net/socket/accept.c | 10 +++++--- net/socket/connect.c | 9 ++++--- net/socket/listen.c | 8 +++--- net/socket/net_fstat.c | 10 +++++--- net/tcp/tcp_backlog.c | 16 +++++++----- net/udp/udp_notifier.c | 7 +++--- net/udp/udp_setsockopt.c | 8 +++--- 52 files changed, 299 insertions(+), 202 deletions(-) diff --git a/net/arp/arp.h b/net/arp/arp.h index af0fcd3d2d..0ab4ce9ed5 100644 --- a/net/arp/arp.h +++ b/net/arp/arp.h @@ -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. diff --git a/net/arp/arp_ipin.c b/net/arp/arp_ipin.c index 870e9a0a08..3f562f9644 100644 --- a/net/arp/arp_ipin.c +++ b/net/arp/arp_ipin.c @@ -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 diff --git a/net/arp/arp_out.c b/net/arp/arp_out.c index c7a586262c..7356006e33 100644 --- a/net/arp/arp_out.c +++ b/net/arp/arp_out.c @@ -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 diff --git a/net/bluetooth/bluetooth_finddev.c b/net/bluetooth/bluetooth_finddev.c index 98b8b17902..44564d1dc4 100644 --- a/net/bluetooth/bluetooth_finddev.c +++ b/net/bluetooth/bluetooth_finddev.c @@ -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; diff --git a/net/bluetooth/bluetooth_input.c b/net/bluetooth/bluetooth_input.c index 97c5dd31b6..12047191d3 100644 --- a/net/bluetooth/bluetooth_input.c +++ b/net/bluetooth/bluetooth_input.c @@ -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) diff --git a/net/icmp/icmp_input.c b/net/icmp/icmp_input.c index a184bdfe82..525ee2c145 100644 --- a/net/icmp/icmp_input.c +++ b/net/icmp/icmp_input.c @@ -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; diff --git a/net/icmpv6/icmpv6.h b/net/icmpv6/icmpv6.h index a0cdf47403..c129ece17a 100644 --- a/net/icmpv6/icmpv6.h +++ b/net/icmpv6/icmpv6.h @@ -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 diff --git a/net/icmpv6/icmpv6_advertise.c b/net/icmpv6/icmpv6_advertise.c index 03daf006b3..a18c832b6a 100644 --- a/net/icmpv6/icmpv6_advertise.c +++ b/net/icmpv6/icmpv6_advertise.c @@ -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; diff --git a/net/icmpv6/icmpv6_conn.c b/net/icmpv6/icmpv6_conn.c index f0c80c5410..eabce3f412 100644 --- a/net/icmpv6/icmpv6_conn.c +++ b/net/icmpv6/icmpv6_conn.c @@ -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) { diff --git a/net/icmpv6/icmpv6_input.c b/net/icmpv6/icmpv6_input.c index a6d4cb0496..0cbc391e2f 100644 --- a/net/icmpv6/icmpv6_input.c +++ b/net/icmpv6/icmpv6_input.c @@ -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; } diff --git a/net/icmpv6/icmpv6_poll.c b/net/icmpv6/icmpv6_poll.c index 9c21be8cdc..5dd6c53792 100644 --- a/net/icmpv6/icmpv6_poll.c +++ b/net/icmpv6/icmpv6_poll.c @@ -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 */ diff --git a/net/ieee802154/ieee802154.h b/net/ieee802154/ieee802154.h index f1128630af..e070e3ba28 100644 --- a/net/ieee802154/ieee802154.h +++ b/net/ieee802154/ieee802154.h @@ -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: diff --git a/net/ieee802154/ieee802154_conn.c b/net/ieee802154/ieee802154_conn.c index 8d5114169b..847248d58d 100644 --- a/net/ieee802154/ieee802154_conn.c +++ b/net/ieee802154/ieee802154_conn.c @@ -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) { diff --git a/net/ieee802154/ieee802154_finddev.c b/net/ieee802154/ieee802154_finddev.c index c3157165f1..1131bff773 100644 --- a/net/ieee802154/ieee802154_finddev.c +++ b/net/ieee802154/ieee802154_finddev.c @@ -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; diff --git a/net/ieee802154/ieee802154_poll.c b/net/ieee802154/ieee802154_poll.c index 595a5461c1..e3c8a7a372 100644 --- a/net/ieee802154/ieee802154_poll.c +++ b/net/ieee802154/ieee802154_poll.c @@ -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 diff --git a/net/igmp/igmp_initialize.c b/net/igmp/igmp_initialize.c index def18f26b8..f95653084a 100644 --- a/net/igmp/igmp_initialize.c +++ b/net/igmp/igmp_initialize.c @@ -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. * ****************************************************************************/ diff --git a/net/igmp/igmp_mcastmac.c b/net/igmp/igmp_mcastmac.c index f5ad89b07c..4a357fcbad 100644 --- a/net/igmp/igmp_mcastmac.c +++ b/net/igmp/igmp_mcastmac.c @@ -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. * ****************************************************************************/ diff --git a/net/igmp/igmp_msg.c b/net/igmp/igmp_msg.c index e4d0a5d6f1..f2cfe72bbe 100644 --- a/net/igmp/igmp_msg.c +++ b/net/igmp/igmp_msg.c @@ -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) diff --git a/net/igmp/igmp_poll.c b/net/igmp/igmp_poll.c index a8b008bcc1..22fe26deec 100644 --- a/net/igmp/igmp_poll.c +++ b/net/igmp/igmp_poll.c @@ -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. * ****************************************************************************/ diff --git a/net/inet/ipv4_getsockname.c b/net/inet/ipv4_getsockname.c index b12240c823..365e1e4a1f 100644 --- a/net/inet/ipv4_getsockname.c +++ b/net/inet/ipv4_getsockname.c @@ -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; diff --git a/net/inet/ipv6_getsockname.c b/net/inet/ipv6_getsockname.c index 5fbafa95cd..656b0c9a69 100644 --- a/net/inet/ipv6_getsockname.c +++ b/net/inet/ipv6_getsockname.c @@ -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; diff --git a/net/ipforward/ipfwd_forward.c b/net/ipforward/ipfwd_forward.c index 0d04e8ac01..659e07382d 100644 --- a/net/ipforward/ipfwd_forward.c +++ b/net/ipforward/ipfwd_forward.c @@ -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; diff --git a/net/ipforward/ipv4_forward.c b/net/ipforward/ipv4_forward.c index f60185d1f4..0364bdd513 100644 --- a/net/ipforward/ipv4_forward.c +++ b/net/ipforward/ipv4_forward.c @@ -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 diff --git a/net/ipforward/ipv6_forward.c b/net/ipforward/ipv6_forward.c index 9b2752fe8e..9acce271f0 100644 --- a/net/ipforward/ipv6_forward.c +++ b/net/ipforward/ipv6_forward.c @@ -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; } diff --git a/net/local/local_accept.c b/net/local/local_accept.c index 8f03700f38..eebef4739f 100644 --- a/net/local/local_accept.c +++ b/net/local/local_accept.c @@ -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); } } diff --git a/net/local/local_release.c b/net/local/local_release.c index 4190f97b5a..cb676235e8 100644 --- a/net/local/local_release.c +++ b/net/local/local_release.c @@ -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)) { diff --git a/net/local/local_sendto.c b/net/local/local_sendto.c index 8db7c01824..2bada044d8 100644 --- a/net/local/local_sendto.c +++ b/net/local/local_sendto.c @@ -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; } diff --git a/net/mld/mld_msg.c b/net/mld/mld_msg.c index 26751da19e..45ccce2b33 100644 --- a/net/mld/mld_msg.c +++ b/net/mld/mld_msg.c @@ -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) diff --git a/net/mld/mld_query.c b/net/mld/mld_query.c index ab5817c7c0..d0d5caba79 100644 --- a/net/mld/mld_query.c +++ b/net/mld/mld_query.c @@ -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) { diff --git a/net/mld/mld_report.c b/net/mld/mld_report.c index be8d512314..4053fc0741 100644 --- a/net/mld/mld_report.c +++ b/net/mld/mld_report.c @@ -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; diff --git a/net/mld/mld_send.c b/net/mld/mld_send.c index 54cba6a1c2..82005de660 100644 --- a/net/mld/mld_send.c +++ b/net/mld/mld_send.c @@ -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. */ diff --git a/net/neighbor/neighbor.h b/net/neighbor/neighbor.h index 219e463de3..b522f26038 100644 --- a/net/neighbor/neighbor.h +++ b/net/neighbor/neighbor.h @@ -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 diff --git a/net/neighbor/neighbor_lookup.c b/net/neighbor/neighbor_lookup.c index 389582c4c5..277d0872e2 100644 --- a/net/neighbor/neighbor_lookup.c +++ b/net/neighbor/neighbor_lookup.c @@ -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 diff --git a/net/neighbor/neighbor_snapshot.c b/net/neighbor/neighbor_snapshot.c index 5e04b20fb7..20c4cf9105 100644 --- a/net/neighbor/neighbor_snapshot.c +++ b/net/neighbor/neighbor_snapshot.c @@ -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++; } } diff --git a/net/netdev/netdev.h b/net/netdev/netdev.h index 93da0ba1b9..f840ddb7a8 100644 --- a/net/netdev/netdev.h +++ b/net/netdev/netdev.h @@ -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 /**************************************************************************** diff --git a/net/netdev/netdev_findbyaddr.c b/net/netdev/netdev_findbyaddr.c index a2a174b9f6..9186c26f65 100644 --- a/net/netdev/netdev_findbyaddr.c +++ b/net/netdev/netdev_findbyaddr.c @@ -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 diff --git a/net/procfs/net_mld.c b/net/procfs/net_mld.c index aaec339c3b..09c73c5aee 100644 --- a/net/procfs/net_mld.c +++ b/net/procfs/net_mld.c @@ -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 */ diff --git a/net/procfs/net_statistics.c b/net/procfs/net_statistics.c index 379741810c..1e8ce223f6 100644 --- a/net/procfs/net_statistics.c +++ b/net/procfs/net_statistics.c @@ -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 diff --git a/net/route/fileroute.h b/net/route/fileroute.h index 2263b496a0..7ff2ed33e0 100644 --- a/net/route/fileroute.h +++ b/net/route/fileroute.h @@ -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 diff --git a/net/route/net_cacheroute.c b/net/route/net_cacheroute.c index 4e9361e941..1adafd8d41 100644 --- a/net/route/net_cacheroute.c +++ b/net/route/net_cacheroute.c @@ -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++) { diff --git a/net/route/net_del_fileroute.c b/net/route/net_del_fileroute.c index 750244e23a..00b5d975a9 100644 --- a/net/route/net_del_fileroute.c +++ b/net/route/net_del_fileroute.c @@ -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) diff --git a/net/route/net_del_ramroute.c b/net/route/net_del_ramroute.c index 38ce547af0..593dafa766 100644 --- a/net/route/net_del_ramroute.c +++ b/net/route/net_del_ramroute.c @@ -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 { diff --git a/net/route/net_router.c b/net/route/net_router.c index fe1dc6b1e7..6f9fbb325b 100644 --- a/net/route/net_router.c +++ b/net/route/net_router.c @@ -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 diff --git a/net/route/route.h b/net/route/route.h index 079debda1c..97a3087923 100644 --- a/net/route/route.h +++ b/net/route/route.h @@ -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); diff --git a/net/sixlowpan/sixlowpan.h b/net/sixlowpan/sixlowpan.h index bfe8341aa5..d7bcf2116e 100644 --- a/net/sixlowpan/sixlowpan.h +++ b/net/sixlowpan/sixlowpan.h @@ -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. diff --git a/net/socket/accept.c b/net/socket/accept.c index d7a78b33a0..fb6706d5a9 100644 --- a/net/socket/accept.c +++ b/net/socket/accept.c @@ -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) diff --git a/net/socket/connect.c b/net/socket/connect.c index ed8b78aa97..dffd6468a4 100644 --- a/net/socket/connect.c +++ b/net/socket/connect.c @@ -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 diff --git a/net/socket/listen.c b/net/socket/listen.c index 6f1b8951e3..31bd31c7d7 100644 --- a/net/socket/listen.c +++ b/net/socket/listen.c @@ -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 diff --git a/net/socket/net_fstat.c b/net/socket/net_fstat.c index 46b6788bde..f239dbd274 100644 --- a/net/socket/net_fstat.c +++ b/net/socket/net_fstat.c @@ -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); diff --git a/net/tcp/tcp_backlog.c b/net/tcp/tcp_backlog.c index a7410bbd20..c7e12d32ea 100644 --- a/net/tcp/tcp_backlog.c +++ b/net/tcp/tcp_backlog.c @@ -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) { diff --git a/net/udp/udp_notifier.c b/net/udp/udp_notifier.c index ddd0d80bbb..742796dc8b 100644 --- a/net/udp/udp_notifier.c +++ b/net/udp/udp_notifier.c @@ -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. diff --git a/net/udp/udp_setsockopt.c b/net/udp/udp_setsockopt.c index 1ed66c59b3..d63756f6bc 100644 --- a/net/udp/udp_setsockopt.c +++ b/net/udp/udp_setsockopt.c @@ -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 */