mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-11 10:03:47 +08:00
Whitespace cleanup lwIP
This commit is contained in:
@@ -158,7 +158,7 @@ altcp_free(struct altcp_pcb *conn)
|
||||
|
||||
/**
|
||||
* @ingroup altcp
|
||||
* altcp_new_ip6: @ref altcp_new for IPv6
|
||||
* altcp_new_ip6: @ref altcp_new for IPv6
|
||||
*/
|
||||
struct altcp_pcb *
|
||||
altcp_new_ip6(altcp_allocator_t *allocator)
|
||||
@@ -166,9 +166,9 @@ altcp_new_ip6(altcp_allocator_t *allocator)
|
||||
return altcp_new_ip_type(allocator, IPADDR_TYPE_V6);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* @ingroup altcp
|
||||
* altcp_new: @ref altcp_new for IPv4
|
||||
* altcp_new: @ref altcp_new for IPv4
|
||||
*/
|
||||
struct altcp_pcb *
|
||||
altcp_new(altcp_allocator_t *allocator)
|
||||
|
||||
@@ -1047,7 +1047,7 @@ options_done:
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len));
|
||||
|
||||
ip_data.current_ip_header_tot_len = hlen_tot;
|
||||
|
||||
|
||||
#if LWIP_RAW
|
||||
/* p points to IPv6 header again for raw_input. */
|
||||
pbuf_add_header_force(p, hlen_tot);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @ingroup ip6
|
||||
* Multicast listener discovery for IPv6. Aims to be compliant with RFC 2710.
|
||||
* No support for MLDv2.\n
|
||||
* Note: The allnodes (ff01::1, ff02::1) group is assumed be received by your
|
||||
* Note: The allnodes (ff01::1, ff02::1) group is assumed be received by your
|
||||
* netif since it must always be received for correct IPv6 operation (e.g. SLAAC).
|
||||
* Ensure the netif filters are configured accordingly!\n
|
||||
* The netif flags also need NETIF_FLAG_MLD6 flag set to enable MLD6 on a
|
||||
|
||||
@@ -1835,9 +1835,9 @@ nd6_new_router(const ip6_addr_t *router_addr, struct netif *netif)
|
||||
for (router_index = LWIP_ND6_NUM_ROUTERS - 1; router_index >= 0; router_index--) {
|
||||
/* check if router already exists (this is a special case for 2 netifs on the same subnet
|
||||
- e.g. wifi and cable) */
|
||||
if(default_router_list[router_index].neighbor_entry == &(neighbor_cache[neighbor_index])){
|
||||
return router_index;
|
||||
}
|
||||
if(default_router_list[router_index].neighbor_entry == &(neighbor_cache[neighbor_index])){
|
||||
return router_index;
|
||||
}
|
||||
if (default_router_list[router_index].neighbor_entry == NULL) {
|
||||
/* remember lowest free index to create a new entry */
|
||||
free_router_index = router_index;
|
||||
|
||||
@@ -895,7 +895,7 @@ netif_issue_reports(struct netif *netif, u8_t report_type)
|
||||
#if LWIP_ARP && !LWIP_ACD
|
||||
/* For Ethernet network interfaces:
|
||||
* we would like to send a "gratuitous ARP".
|
||||
* Only needs to be done here if ACD isn't configured.
|
||||
* Only needs to be done here if ACD isn't configured.
|
||||
*/
|
||||
if (netif->flags & (NETIF_FLAG_ETHARP)) {
|
||||
etharp_gratuitous(netif);
|
||||
|
||||
@@ -166,4 +166,3 @@ stats_display(void)
|
||||
#endif /* LWIP_STATS_DISPLAY */
|
||||
|
||||
#endif /* LWIP_STATS */
|
||||
|
||||
|
||||
@@ -45,30 +45,30 @@
|
||||
* No need to implement functions in this section in NO_SYS mode.
|
||||
* The OS-specific code should be implemented in arch/sys_arch.h
|
||||
* and sys_arch.c of your port.
|
||||
*
|
||||
*
|
||||
* The operating system emulation layer provides a common interface
|
||||
* between the lwIP code and the underlying operating system kernel. The
|
||||
* general idea is that porting lwIP to new architectures requires only
|
||||
* small changes to a few header files and a new sys_arch
|
||||
* implementation. It is also possible to do a sys_arch implementation
|
||||
* that does not rely on any underlying operating system.
|
||||
*
|
||||
*
|
||||
* The sys_arch provides semaphores, mailboxes and mutexes to lwIP. For the full
|
||||
* lwIP functionality, multiple threads support can be implemented in the
|
||||
* sys_arch, but this is not required for the basic lwIP
|
||||
* functionality. Timer scheduling is implemented in lwIP, but can be implemented
|
||||
* by the sys_arch port (LWIP_TIMERS_CUSTOM==1).
|
||||
*
|
||||
*
|
||||
* In addition to the source file providing the functionality of sys_arch,
|
||||
* the OS emulation layer must provide several header files defining
|
||||
* macros used throughout lwip. The files required and the macros they
|
||||
* must define are listed below the sys_arch description.
|
||||
*
|
||||
*
|
||||
* Since lwIP 1.4.0, semaphore, mutexes and mailbox functions are prototyped in a way that
|
||||
* allows both using pointers or actual OS structures to be used. This way, memory
|
||||
* required for such types can be either allocated in place (globally or on the
|
||||
* stack) or on the heap (allocated internally in the "*_new()" functions).
|
||||
*
|
||||
*
|
||||
* Note:
|
||||
* -----
|
||||
* Be careful with using mem_malloc() in sys_arch. When malloc() refers to
|
||||
@@ -96,7 +96,7 @@
|
||||
* Mailboxes should be implemented as a queue which allows multiple messages
|
||||
* to be posted (implementing as a rendez-vous point where only one message can be
|
||||
* posted at a time can have a highly negative impact on performance). A message
|
||||
* in a mailbox is just a pointer, nothing more.
|
||||
* in a mailbox is just a pointer, nothing more.
|
||||
*
|
||||
* @defgroup sys_time Time
|
||||
* @ingroup sys_layer
|
||||
|
||||
@@ -355,7 +355,7 @@ tcp_write_checks(struct tcp_pcb *pcb, u16_t len)
|
||||
* it can send them more efficiently by combining them together).
|
||||
* To prompt the system to send data now, call tcp_output() after
|
||||
* calling tcp_write().
|
||||
*
|
||||
*
|
||||
* This function enqueues the data pointed to by the argument dataptr. The length of
|
||||
* the data is passed as the len parameter. The apiflags can be one or more of:
|
||||
* - TCP_WRITE_FLAG_COPY: indicates whether the new memory should be allocated
|
||||
|
||||
@@ -241,7 +241,7 @@ lwip_cyclic_timer(void *arg)
|
||||
cyclic->handler();
|
||||
|
||||
now = sys_now();
|
||||
next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */
|
||||
next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */
|
||||
if (TIME_LESS_THAN(next_timeout_time, now)) {
|
||||
/* timer would immediately expire again -> "overload" -> restart without any correction */
|
||||
#if LWIP_DEBUG_TIMERNAMES
|
||||
@@ -296,7 +296,7 @@ sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg)
|
||||
|
||||
LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4));
|
||||
|
||||
next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */
|
||||
next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */
|
||||
|
||||
#if LWIP_DEBUG_TIMERNAMES
|
||||
sys_timeout_abs(next_timeout_time, handler, arg, handler_name);
|
||||
|
||||
@@ -911,7 +911,7 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d
|
||||
/**
|
||||
* @ingroup udp_raw
|
||||
* Bind an UDP PCB.
|
||||
*
|
||||
*
|
||||
* @param pcb UDP PCB to be bound with a local address ipaddr and port.
|
||||
* @param ipaddr local IP address to bind with. Use IP_ANY_TYPE to
|
||||
* bind to all local interfaces.
|
||||
@@ -1168,8 +1168,8 @@ udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg)
|
||||
|
||||
/**
|
||||
* @ingroup udp_raw
|
||||
* Removes and deallocates the pcb.
|
||||
*
|
||||
* Removes and deallocates the pcb.
|
||||
*
|
||||
* @param pcb UDP PCB to be removed. The PCB is removed from the list of
|
||||
* UDP PCB's and the data structure is freed from memory.
|
||||
*
|
||||
@@ -1242,7 +1242,7 @@ udp_new(void)
|
||||
* Create a UDP PCB for specific IP type.
|
||||
* The pcb is not active until it has either been bound to a local address
|
||||
* or connected to a remote address.
|
||||
*
|
||||
*
|
||||
* @param type IP address type, see @ref lwip_ip_addr_type definitions.
|
||||
* If you want to listen to IPv4 and IPv6 (dual-stack) packets,
|
||||
* supply @ref IPADDR_TYPE_ANY as argument and bind to @ref IP_ANY_TYPE.
|
||||
|
||||
Reference in New Issue
Block a user