Whitespace cleanup lwIP

This commit is contained in:
Dirk Ziegelmeier
2018-10-22 20:53:37 +02:00
parent 64e0ede1a1
commit 06cc825431
43 changed files with 126 additions and 136 deletions

View File

@@ -7,7 +7,7 @@
* Copyright (c) 2017 Joel Cunningham, Garmin International, Inc. <joel.cunningham@garmin.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
@@ -16,17 +16,17 @@
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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.
*
* This file is part of the lwIP TCP/IP stack.

View File

@@ -153,27 +153,27 @@ enum netconn_state {
};
/** Used to inform the callback function about changes
*
*
* Event explanation:
*
*
* In the netconn implementation, there are three ways to block a client:
*
*
* - accept mbox (sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, 0); in netconn_accept())
* - receive mbox (sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0); in netconn_recv_data())
* - send queue is full (sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); in lwip_netconn_do_write())
*
*
* The events have to be seen as events signaling the state of these mboxes/semaphores. For non-blocking
* connections, you need to know in advance whether a call to a netconn function call would block or not,
* and these events tell you about that.
*
* RCVPLUS events say: Safe to perform a potentially blocking call call once more.
*
* RCVPLUS events say: Safe to perform a potentially blocking call call once more.
* They are counted in sockets - three RCVPLUS events for accept mbox means you are safe
* to call netconn_accept 3 times without being blocked.
* Same thing for receive mbox.
*
*
* RCVMINUS events say: Your call to to a possibly blocking function is "acknowledged".
* Socket implementation decrements the counter.
*
*
* For TX, there is no need to count, its merely a flag. SENDPLUS means you may send something.
* SENDPLUS occurs when enough data was delivered to peer so netconn_send() can be called again.
* A SENDMINUS event occurs when the next call to a netconn_send() would be blocking.

View File

@@ -1,8 +1,8 @@
/*
* Copyright (c) 2001-2003 Swedish Institute of Computer Science.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
@@ -11,21 +11,21 @@
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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.
*
* This file is part of the lwIP TCP/IP stack.
*
*
* Author: Adam Dunkels <adam@sics.se>
*
*/

View File

@@ -52,7 +52,7 @@ extern "C" {
#endif
/**
* @ingroup httpc
* @ingroup httpc
* HTTPC_HAVE_FILE_IO: define this to 1 to have functions dowloading directly
* to disk via fopen/fwrite.
* These functions are example implementations of the interface only.
@@ -62,13 +62,13 @@ extern "C" {
#endif
/**
* @ingroup httpc
* @ingroup httpc
* The default TCP port used for HTTP
*/
#define HTTP_DEFAULT_PORT LWIP_IANA_PORT_HTTP
/**
* @ingroup httpc
* @ingroup httpc
* HTTP client result codes
*/
typedef enum ehttpc_result {
@@ -97,7 +97,7 @@ typedef enum ehttpc_result {
typedef struct _httpc_state httpc_state_t;
/**
* @ingroup httpc
* @ingroup httpc
* Prototype of a http client callback function
*
* @param arg argument specified when initiating the request
@@ -110,7 +110,7 @@ typedef struct _httpc_state httpc_state_t;
typedef void (*httpc_result_fn)(void *arg, httpc_result_t httpc_result, u32_t rx_content_len, u32_t srv_res, err_t err);
/**
* @ingroup httpc
* @ingroup httpc
* Prototype of http client callback: called when the headers are received
*
* @param connection http client connection

View File

@@ -175,7 +175,7 @@
#define HTTPD_DEBUG LWIP_DBG_OFF
#endif
/** Set this to 1 to use a memp pool for allocating
/** Set this to 1 to use a memp pool for allocating
* struct http_state instead of the heap.
* If enabled, you'll need to define MEMP_NUM_PARALLEL_HTTPD_CONNS
* (and MEMP_NUM_PARALLEL_HTTPD_SSI_CONNS for SSI) to set the size of

View File

@@ -78,4 +78,3 @@
*/
#endif /* LWIP_HDR_APPS_MDNS_OPTS_H */

View File

@@ -134,7 +134,7 @@ enum {
MQTT_DATA_FLAG_LAST = 1
};
/**
/**
* @ingroup mqtt
* Function prototype for MQTT incoming publish data callback function. Called when data
* arrives to a subscribed topic @see mqtt_subscribe
@@ -149,7 +149,7 @@ enum {
typedef void (*mqtt_incoming_data_cb_t)(void *arg, const u8_t *data, u16_t len, u8_t flags);
/**
/**
* @ingroup mqtt
* Function prototype for MQTT incoming publish function. Called when an incoming publish
* arrives to a subscribed topic @see mqtt_subscribe

View File

@@ -6,14 +6,14 @@
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup smtp_opts Options
* @ingroup smtp
*
*
* @{
*/
/** Set this to 1 to enable data handler callback on BODY */
#ifndef SMTP_BODYDH
#define SMTP_BODYDH 0
@@ -78,4 +78,3 @@ extern "C" {
#endif
#endif /* SMTP_OPTS_H */

View File

@@ -101,7 +101,7 @@ extern "C" {
/** error codes predefined by SNMP prot. */
typedef enum {
SNMP_ERR_NOERROR = 0,
/*
/*
outdated v1 error codes. do not use anmore!
#define SNMP_ERR_NOSUCHNAME 2 use SNMP_ERR_NOSUCHINSTANCE instead
#define SNMP_ERR_BADVALUE 3 use SNMP_ERR_WRONGTYPE,SNMP_ERR_WRONGLENGTH,SNMP_ERR_WRONGENCODING or SNMP_ERR_WRONGVALUE instead

View File

@@ -11,7 +11,7 @@
*
*/
/*
/*
* Redistribution and use in source and binary forms, with or without
* modification,are permitted provided that the following conditions are met:
*

View File

@@ -74,7 +74,7 @@
/** Platform specific diagnostic output.\n
* Note the default implementation pulls in printf, which may
* in turn pull in a lot of standard libary code. In resource-constrained
* in turn pull in a lot of standard libary code. In resource-constrained
* systems, this should be defined to something less resource-consuming.
*/
#ifndef LWIP_PLATFORM_DIAG
@@ -85,7 +85,7 @@
/** Platform specific assertion handling.\n
* Note the default implementation pulls in printf, fflush and abort, which may
* in turn pull in a lot of standard libary code. In resource-constrained
* in turn pull in a lot of standard libary code. In resource-constrained
* systems, this should be defined to something less resource-consuming.
*/
#ifndef LWIP_PLATFORM_ASSERT

View File

@@ -78,7 +78,7 @@ struct dhcp
u8_t state;
/** retries of current request */
u8_t tries;
u8_t subnet_mask_given;
u16_t request_timeout; /* #ticks with period DHCP_FINE_TIMER_SECS for request timeout */

View File

@@ -99,7 +99,7 @@ err_t igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr);
err_t igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr);
void igmp_tmr(void);
/** @ingroup igmp
/** @ingroup igmp
* Get list head of IGMP groups for netif.
* Note: The allsystems group IP is contained in the list as first entry.
* @see @ref netif_set_igmp_mac_filter()

View File

@@ -102,4 +102,3 @@ u16_t ip_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len,
#endif
#endif /* LWIP_HDR_INET_H */

View File

@@ -326,5 +326,3 @@ err_t ip_input(struct pbuf *p, struct netif *inp);
#endif
#endif /* LWIP_HDR_IP_H */

View File

@@ -107,5 +107,3 @@ void ip4_debug_print(struct pbuf *p);
#endif /* LWIP_IPV4 */
#endif /* LWIP_HDR_IP_H */

View File

@@ -404,7 +404,7 @@ extern const ip_addr_t ip_addr_broadcast;
extern const ip_addr_t ip6_addr_any;
/**
/**
* @ingroup ip6addr
* IP6_ADDR_ANY can be used as a fixed ip_addr_t
* for the IPv6 wildcard address

View File

@@ -84,7 +84,7 @@ err_t mld6_leavegroup_netif(struct netif *netif, const ip6_addr_t *groupaddr);
/** @ingroup mld6
* Get list head of MLD6 groups for netif.
* Note: The allnodes group IP is NOT in the list, since it must always
* Note: The allnodes group IP is NOT in the list, since it must always
* be received for correct IPv6 operation.
* @see @ref netif_set_mld_mac_filter()
*/

View File

@@ -55,7 +55,7 @@ extern "C" {
#define LWIP_SUPPORT_CUSTOM_PBUF ((IP_FRAG && !LWIP_NETIF_TX_SINGLE_PBUF) || (LWIP_IPV6 && LWIP_IPV6_FRAG))
#endif
/** @ingroup pbuf
/** @ingroup pbuf
* PBUF_NEEDS_COPY(p): return a boolean value indicating whether the given
* pbuf needs to be copied in order to be kept around beyond the current call
* stack without risking being corrupted. The default setting provides safety:

View File

@@ -53,7 +53,7 @@ enum lwip_ieee_eth_type {
/** Internet protocol v4 */
ETHTYPE_IP = 0x0800U,
/** Address resolution protocol */
ETHTYPE_ARP = 0x0806U,
ETHTYPE_ARP = 0x0806U,
/** Wake on lan */
ETHTYPE_WOL = 0x0842U,
/** RARP */

View File

@@ -130,7 +130,7 @@ typedef void (*lwip_thread_fn)(void *arg);
* If the mutex has been created, ERR_OK should be returned. Returning any
* other error will provide a hint what went wrong, but except for assertions,
* no real error handling is implemented.
*
*
* @param mutex pointer to the mutex to create
* @return ERR_OK if successful, another err_t otherwise
*/
@@ -205,13 +205,13 @@ void sys_sem_signal(sys_sem_t *sem);
* "timeout" argument is non-zero, the thread should only be blocked for the
* specified time (measured in milliseconds). If the "timeout" argument is zero,
* the thread should be blocked until the semaphore is signalled.
*
*
* The return value is SYS_ARCH_TIMEOUT if the semaphore wasn't signaled within
* the specified time or any other value if it was signaled (with or without
* waiting).
* Notice that lwIP implements a function with a similar name,
* sys_sem_wait(), that uses the sys_arch_sem_wait() function.
*
*
* @param sem the semaphore to wait for
* @param timeout timeout in milliseconds to wait (0 = wait forever)
* @return SYS_ARCH_TIMEOUT on timeout, any other value on success
@@ -277,7 +277,7 @@ void sys_msleep(u32_t ms); /* only has a (close to) 1 ms resolution. */
* If the mailbox has been created, ERR_OK should be returned. Returning any
* other error will provide a hint what went wrong, but except for assertions,
* no real error handling is implemented.
*
*
* @param mbox pointer to the mbox to create
* @param size (minimum) number of messages in this mbox
* @return ERR_OK if successful, another err_t otherwise
@@ -287,7 +287,7 @@ err_t sys_mbox_new(sys_mbox_t *mbox, int size);
* @ingroup sys_mbox
* Post a message to an mbox - may not fail
* -> blocks if full, only to be used from tasks NOT from ISR!
*
*
* @param mbox mbox to posts the message
* @param msg message to post (ATTENTION: can be NULL)
*/
@@ -297,7 +297,7 @@ void sys_mbox_post(sys_mbox_t *mbox, void *msg);
* Try to post a message to an mbox - may fail if full.
* Can be used from ISR (if the sys arch layer allows this).
* Returns ERR_MEM if it is full, else, ERR_OK if the "msg" is posted.
*
*
* @param mbox mbox to posts the message
* @param msg message to post (ATTENTION: can be NULL)
*/
@@ -307,7 +307,7 @@ err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg);
* Try to post a message to an mbox - may fail if full.
* To be be used from ISR.
* Returns ERR_MEM if it is full, else, ERR_OK if the "msg" is posted.
*
*
* @param mbox mbox to posts the message
* @param msg message to post (ATTENTION: can be NULL)
*/
@@ -324,10 +324,10 @@ err_t sys_mbox_trypost_fromisr(sys_mbox_t *mbox, void *msg);
* The return values are the same as for the sys_arch_sem_wait() function:
* SYS_ARCH_TIMEOUT if there was a timeout, any other value if a messages
* is received.
*
*
* Note that a function with a similar name, sys_mbox_fetch(), is
* implemented by lwIP.
*
* implemented by lwIP.
*
* @param mbox mbox to get a message from
* @param msg pointer where the message is stored
* @param timeout maximum time (in milliseconds) to wait for a message (0 = wait forever)
@@ -346,7 +346,7 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout);
* example, a naive implementation could be:
* \#define sys_arch_mbox_tryfetch(mbox,msg) sys_arch_mbox_fetch(mbox,msg,1)
* although this would introduce unnecessary delays.
*
*
* @param mbox mbox to get a message from
* @param msg pointer where the message is stored
* @return 0 (milliseconds) if a message has been received
@@ -363,7 +363,7 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg);
* Deallocates a mailbox. If there are messages still present in the
* mailbox when the mailbox is deallocated, it is an indication of a
* programming error in lwIP and the developer should be notified.
*
*
* @param mbox mbox to delete
*/
void sys_mbox_free(sys_mbox_t *mbox);
@@ -411,7 +411,7 @@ void sys_mbox_set_invalid(sys_mbox_t *mbox);
* the "stacksize" parameter. The id of the new thread is returned. Both the id
* and the priority are system dependent.
* ATTENTION: although this function returns a value, it MUST NOT FAIL (ports have to assert this!)
*
*
* @param name human-readable name for the thread (used for debugging purposes)
* @param thread thread-function
* @param arg parameter passed to 'thread'

View File

@@ -6,7 +6,7 @@
/*
* Copyright (c) 2017 Benjamin Aigner
* Copyright (c) 2015 Inico Technologies Ltd. , Author: Ivan Delamer <delamer@inicotech.com>
*
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -32,10 +32,10 @@
* OF SUCH DAMAGE.
*
* Author: Benjamin Aigner <aignerb@technikum-wien.at>
*
*
* Based on the original 6lowpan implementation of lwIP ( @see 6lowpan.c)
*/
#ifndef LWIP_HDR_LOWPAN6_BLE_H
#define LWIP_HDR_LOWPAN6_BLE_H

View File

@@ -109,7 +109,7 @@
#define LWIP_RFC7668_IP_UNCOMPRESSED_DEBUG LWIP_DBG_OFF
#endif
/** LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS:
/** LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS:
* Currently, the linux kernel driver for 6lowpan sets/clears a bit in
* the address, depending on the BD address (either public or not).
* Might not be RFC7668 conform, so you may select to do that (=1) or

View File

@@ -84,4 +84,3 @@ void slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len);
#endif
#endif /* LWIP_HDR_NETIF_SLIPIF_H */