Make lwIP compile with clang -Wdocumentation -> several documentation fixes

This commit is contained in:
Dirk Ziegelmeier 2016-10-09 12:21:39 +02:00
parent 9cd555c51a
commit f6e27940bd
23 changed files with 81 additions and 99 deletions

View File

@ -306,7 +306,7 @@ netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port)
* Disconnect a netconn from its current peer (only valid for UDP netconns).
*
* @param conn the netconn to disconnect
* @return @todo: return value is not set here...
* @return See @ref err_t
*/
err_t
netconn_disconnect(struct netconn *conn)

View File

@ -540,7 +540,6 @@ accept_function(void *arg, struct tcp_pcb *newpcb, err_t err)
* Called from lwip_netconn_do_newconn().
*
* @param msg the api_msg_msg describing the connection type
* @return msg->conn->err, but the return value is currently ignored
*/
static void
pcb_new(struct api_msg *msg)
@ -807,7 +806,6 @@ netconn_drain(struct netconn *conn)
* places.
*
* @param conn the TCP netconn to close
* [@param delay 1 if called from sent/poll (wake up calling thread on end)]
*/
static err_t
lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM)
@ -1492,7 +1490,6 @@ lwip_netconn_do_accepted(void *m)
* blocking application thread (waiting in netconn_write) is released.
*
* @param conn netconn (that is currently in state NETCONN_WRITE) to process
* [@param delay 1 if called from sent/poll (wake up calling thread on end)]
* @return ERR_OK
* ERR_MEM if LWIP_TCPIP_CORE_LOCKING=1 and sending hasn't yet finished
*/

View File

@ -1258,12 +1258,12 @@ lwip_writev(int s, const struct iovec *iov, int iovcnt)
* the sockets enabled that had events.
*
* @param maxfdp1 the highest socket index in the sets
* @param readset_in: set of sockets to check for read events
* @param writeset_in: set of sockets to check for write events
* @param exceptset_in: set of sockets to check for error events
* @param readset_out: set of sockets that had read events
* @param writeset_out: set of sockets that had write events
* @param exceptset_out: set os sockets that had error events
* @param readset_in set of sockets to check for read events
* @param writeset_in set of sockets to check for write events
* @param exceptset_in set of sockets to check for error events
* @param readset_out set of sockets that had read events
* @param writeset_out set of sockets that had write events
* @param exceptset_out set os sockets that had error events
* @return number of sockets that had events (read/write/exception) (>= 0)
*/
static int

View File

@ -260,7 +260,7 @@ tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block)
/**
* call sys_timeout in tcpip_thread
*
* @param msec time in milliseconds for timeout
* @param msecs time in milliseconds for timeout
* @param h function to be called on timeout
* @param arg argument to pass to timeout function h
* @return ERR_MEM on memory error, ERR_OK otherwise
@ -288,7 +288,6 @@ tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg)
/**
* call sys_untimeout in tcpip_thread
*
* @param msec time in milliseconds for timeout
* @param h function to be called on timeout
* @param arg argument to pass to timeout function h
* @return ERR_MEM on memory error, ERR_OK otherwise

View File

@ -1879,7 +1879,7 @@ http_continue(void *connection)
* When data has been received in the correct state, try to parse it
* as a HTTP request.
*
* @param p the received pbuf
* @param inp the received pbuf
* @param hs the connection state
* @param pcb the tcp_pcb which received this packet
* @return ERR_OK if request was OK and hs has been initialized correctly
@ -2211,7 +2211,7 @@ http_find_file(struct http_state *hs, const char *uri, int is_09)
* @param is_09 1 if the request is HTTP/0.9 (no HTTP headers in response)
* @param uri the HTTP header URI
* @param tag_check enable SSI tag checking
* @param uri_has_params != NULL if URI has parameters (separated by '?')
* @param params != NULL if URI has parameters (separated by '?')
* @return ERR_OK if file was found and hs has been initialized correctly
* another err_t otherwise
*/

View File

@ -1742,8 +1742,6 @@ mdns_handle_response(struct mdns_packet *pkt)
/**
* Receive input function for MDNS packets.
* Handles both IPv4 and IPv6 UDP pcbs.
*
* @params see udp.h
*/
static void
mdns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)

View File

@ -288,7 +288,7 @@ snmp_asn1_enc_oid(struct snmp_pbuf_stream* pbuf_stream, const u32_t *oid, u16_t
/**
* Returns octet count for length.
*
* @param length
* @param length parameter length
* @param octets_needed points to the return value
*/
void
@ -306,7 +306,7 @@ snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed)
/**
* Returns octet count for an u32_t.
*
* @param value
* @param value value to be encoded
* @param octets_needed points to the return value
*
* @note ASN coded integers are _always_ signed. E.g. +0xFFFF is coded
@ -332,7 +332,7 @@ snmp_asn1_enc_u32t_cnt(u32_t value, u16_t *octets_needed)
/**
* Returns octet count for an u64_t.
*
* @param value
* @param value value to be encoded
* @param octets_needed points to the return value
*
* @note ASN coded integers are _always_ signed. E.g. +0xFFFF is coded
@ -357,7 +357,7 @@ snmp_asn1_enc_u64t_cnt(const u32_t *value, u16_t *octets_needed)
/**
* Returns octet count for an s32_t.
*
* @param value
* @param value value to be encoded
* @param octets_needed points to the return value
*
* @note ASN coded integers are _always_ signed.

View File

@ -359,9 +359,9 @@ snmp_ip6_to_oid(const ip6_addr_t *ip, u32_t *oid)
#if LWIP_IPV4 || LWIP_IPV6
/**
* Convert to InetAddressType+InetAddress+InetPortNumber
* @param ip
* @param port
* @param oid
* @param ip IP address
* @param port Port
* @param oid OID
* @return OID length
*/
u8_t
@ -378,8 +378,8 @@ snmp_ip_port_to_oid(const ip_addr_t *ip, u16_t port, u32_t *oid)
/**
* Convert to InetAddressType+InetAddress
* @param ip
* @param oid
* @param ip IP address
* @param oid OID
* @return OID length
*/
u8_t
@ -412,9 +412,9 @@ snmp_ip_to_oid(const ip_addr_t *ip, u32_t *oid)
/**
* Convert from InetAddressType+InetAddress to ip_addr_t
* @param oid
* @param oid_len
* @param ip
* @param oid OID
* @param oid_len OID length
* @param ip IP address
* @return Parsed OID length
*/
u8_t
@ -487,10 +487,10 @@ snmp_oid_to_ip(const u32_t *oid, u8_t oid_len, ip_addr_t *ip)
/**
* Convert from InetAddressType+InetAddress+InetPortNumber to ip_addr_t and u16_t
* @param oid
* @param oid_len
* @param ip
* @param port
* @param oid OID
* @param oid_len OID length
* @param ip IP address
* @param port Port
* @return Parsed OID length
*/
u8_t
@ -520,10 +520,10 @@ snmp_oid_to_ip_port(const u32_t *oid, u8_t oid_len, ip_addr_t *ip, u16_t *port)
#endif /* LWIP_IPV4 || LWIP_IPV6 */
/**
* Assign an OID to \struct snmp_obj_id
* @param target
* @param oid
* @param oid_len
* Assign an OID to struct snmp_obj_id
* @param target Assignment target
* @param oid OID
* @param oid_len OID length
*/
void
snmp_oid_assign(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len)
@ -538,10 +538,10 @@ snmp_oid_assign(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len)
}
/**
* Prefix an OID to OID in \struct snmp_obj_id
* @param target
* @param oid
* @param oid_len
* Prefix an OID to OID in struct snmp_obj_id
* @param target Assignment target to prefix
* @param oid OID
* @param oid_len OID length
*/
void
snmp_oid_prefix(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len)
@ -561,12 +561,12 @@ snmp_oid_prefix(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len)
}
/**
* Combine two OIDs into \struct snmp_obj_id
* @param target
* @param oid1
* @param oid1_len
* @param oid2
* @param oid2_len
* Combine two OIDs into struct snmp_obj_id
* @param target Assignmet target
* @param oid1 OID 1
* @param oid1_len OID 1 length
* @param oid2 OID 2
* @param oid2_len OID 2 length
*/
void
snmp_oid_combine(struct snmp_obj_id* target, const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len)
@ -576,10 +576,10 @@ snmp_oid_combine(struct snmp_obj_id* target, const u32_t *oid1, u8_t oid1_len, c
}
/**
* Append OIDs to \struct snmp_obj_id
* @param target
* @param oid
* @param oid_len
* Append OIDs to struct snmp_obj_id
* @param target Assignment target to append to
* @param oid OID
* @param oid_len OID length
*/
void
snmp_oid_append(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len)
@ -594,11 +594,11 @@ snmp_oid_append(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len)
/**
* Compare two OIDs
* @param oid1
* @param oid1_len
* @param oid2
* @param oid2_len
* @return
* @param oid1 OID 1
* @param oid1_len OID 1 length
* @param oid2 OID 2
* @param oid2_len OID 2 length
* @return -1: OID1<OID2 1: OID1 >OID2 0: equal
*/
s8_t
snmp_oid_compare(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len)
@ -635,11 +635,11 @@ snmp_oid_compare(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_
/**
* Check of two OIDs are equal
* @param oid1
* @param oid1_len
* @param oid2
* @param oid2_len
* @return
* @param oid1 OID 1
* @param oid1_len OID 1 length
* @param oid2 OID 2
* @param oid2_len OID 2 length
* @return 1: equal 0: non-equal
*/
u8_t
snmp_oid_equal(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len)
@ -649,7 +649,7 @@ snmp_oid_equal(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_le
/**
* Convert netif to interface index
* @param netif
* @param netif netif
* @return index
*/
u8_t

View File

@ -146,7 +146,7 @@ ip_get_value(struct snmp_node_instance* instance, void* value)
/**
* Test ip object value before setting.
*
* @param od is the object definition
* @param instance node instance
* @param len return value space (in bytes)
* @param value points to (varbind) space to copy value from.
*

View File

@ -323,7 +323,7 @@ snmp_process_varbind(struct snmp_request *request, struct snmp_varbind *vb, u8_t
/**
* Service an internal or external event for SNMP GET.
*
* @param msg_ps points to the associated message process state
* @param request points to the associated message process state
*/
static err_t
snmp_process_get_request(struct snmp_request *request)
@ -359,7 +359,7 @@ snmp_process_get_request(struct snmp_request *request)
/**
* Service an internal or external event for SNMP GET.
*
* @param msg_ps points to the associated message process state
* @param request points to the associated message process state
*/
static err_t
snmp_process_getnext_request(struct snmp_request *request)
@ -395,7 +395,7 @@ snmp_process_getnext_request(struct snmp_request *request)
/**
* Service an internal or external event for SNMP GETBULKT.
*
* @param msg_ps points to the associated message process state
* @param request points to the associated message process state
*/
static err_t
snmp_process_getbulk_request(struct snmp_request *request)
@ -493,7 +493,7 @@ snmp_process_getbulk_request(struct snmp_request *request)
/**
* Service an internal or external event for SNMP SET.
*
* @param msg_ps points to the associated message process state
* @param request points to the associated message process state
*/
static err_t
snmp_process_set_request(struct snmp_request *request)

View File

@ -297,8 +297,8 @@ snmp_trap_varbind_sum(struct snmp_msg_trap *trap, struct snmp_varbind *varbinds)
* Sums trap header field lengths from tail to head and
* returns trap_header_lengths for second encoding pass.
*
* @param trap Trap message
* @param vb_len varbind-list length
* @param thl points to returned header lengths
* @return the required length for encoding the trap header
*/
static u16_t

View File

@ -1013,8 +1013,6 @@ dns_correct_response(u8_t idx, u32_t ttl)
}
/**
* Receive input function for DNS response packets arriving for the dns UDP pcb.
*
* @params see udp.h
*/
static void
dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)
@ -1193,7 +1191,7 @@ memerr:
* @param hostnamelen length of the hostname
* @param found a callback function to be called on success, failure or timeout
* @param callback_arg argument to pass to the callback function
* @return @return a err_t return code.
* @return err_t return code.
*/
static err_t
dns_enqueue(const char *name, size_t hostnamelen, dns_found_callback found,
@ -1357,7 +1355,7 @@ dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback foun
* @param found a callback function to be called on success, failure or timeout (only if
* ERR_INPROGRESS is returned!)
* @param callback_arg argument to pass to the callback function
* @param dns_addrtype: - LWIP_DNS_ADDRTYPE_IPV4_IPV6: try to resolve IPv4 first, try IPv6 if IPv4 fails only
* @param dns_addrtype - LWIP_DNS_ADDRTYPE_IPV4_IPV6: try to resolve IPv4 first, try IPv6 if IPv4 fails only
* - LWIP_DNS_ADDRTYPE_IPV6_IPV4: try to resolve IPv6 first, try IPv4 if IPv6 fails only
* - LWIP_DNS_ADDRTYPE_IPV4: try to resolve IPv4 only
* - LWIP_DNS_ADDRTYPE_IPV6: try to resolve IPv6 only

View File

@ -72,6 +72,7 @@
*/
#define ARP_MAXPENDING 5
/** ARP states */
enum etharp_state {
ETHARP_STATE_EMPTY = 0,
ETHARP_STATE_PENDING,
@ -239,7 +240,7 @@ etharp_tmr(void)
* old entries. Heuristic choose the least important entry for recycling.
*
* @param ipaddr IP address to find in ARP cache, or to add if not found.
* @param flags @see definition of ETHARP_FLAG_*
* @param flags See @ref etharp_state
* @param netif netif related to this address (used for NETIF_HWADDRHINT)
*
* @return The ARP entry index that matched or is created, ERR_MEM if no
@ -402,7 +403,7 @@ etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif)
* @param netif netif related to this entry (used for NETIF_ADDRHINT)
* @param ipaddr IP address of the inserted ARP entry.
* @param ethaddr Ethernet address of the inserted ARP entry.
* @param flags @see definition of ETHARP_FLAG_*
* @param flags See @ref etharp_state
*
* @return
* - ERR_OK Successfully updated ARP cache.
@ -626,8 +627,6 @@ etharp_get_entry(u8_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_a
* @param p The ARP packet that arrived on netif. Is freed by this function.
* @param netif The lwIP network interface on which the ARP packet pbuf arrived.
*
* @return NULL
*
* @see pbuf_free()
*/
void

View File

@ -723,8 +723,6 @@ igmp_delaying_member(struct igmp_group *group, u8_t maxresp)
* @param src the source IP address to send from (if src == IP4_ADDR_ANY, the
* IP address of the netif used to send is used as source address)
* @param dest the destination IP address to send the packet to
* @param ttl the TTL value to be set in the IP header
* @param proto the PROTOCOL to be set in the IP header
* @param netif the netif on which to send this packet
* @return ERR_OK if the packet was sent OK
* ERR_BUF if p doesn't have enough space for IP/LINK headers

View File

@ -222,7 +222,6 @@ ip4_route(const ip4_addr_t *dest)
* that may not be forwarded, or whether datagrams to that destination
* may be forwarded.
* @param p the packet to forward
* @param dest the destination IP address
* @return 1: can forward 0: discard
*/
static int

View File

@ -331,7 +331,7 @@ ip_reass_dequeue_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev)
* will grow over time as new pbufs are rx.
* Also checks that the datagram passes basic continuity checks (if the last
* fragment was received at least once).
* @param root_p points to the 'root' pbuf for the current datagram being assembled.
* @param ipr points to the reassembly state
* @param new_p points to the pbuf for the current fragment
* @return 0 if invalid, >0 otherwise
*/

View File

@ -250,9 +250,6 @@ raw_connect(struct raw_pcb *pcb, const ip_addr_t *ipaddr)
* packet will not be passed to other raw PCBs or other protocol layers.
* - not free the packet, and return zero. The packet will be matched
* against further PCBs and/or forwarded to another protocol layers.
*
* @return non-zero if the packet was free()d, zero if the packet remains
* available for others.
*/
void
raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg)

View File

@ -534,10 +534,7 @@ dropped:
* connection (from tcp_input()).
*
* @param pcb the tcp_pcb_listen for which a segment arrived
* @return ERR_OK if the segment was processed
* another err_t on error
*
* @note the return value is not (yet?) used in tcp_input()
* @note the segment which arrived is saved in global variables, therefore only the pcb
* involved is passed as a parameter to this function
*/

View File

@ -80,13 +80,13 @@ typedef enum {
PBUF_IP,
/** Includes spare room for link layer header (ethernet header).
* Use this if you intend to pass the pbuf to functions like ethernet_output().
* @see @ref PBUF_LINK_HLEN
* @see PBUF_LINK_HLEN
*/
PBUF_LINK,
/** Includes spare room for additional encapsulation header before ethernet
* headers (e.g. 802.11).
* Use this if you intend to pass the pbuf to functions like netif->linkoutput().
* @see @ref PBUF_LINK_ENCAPSULATION_HLEN
* @see PBUF_LINK_ENCAPSULATION_HLEN
*/
PBUF_RAW_TX,
/** Use this for input packets in a netif driver when calling netif->input()

View File

@ -69,9 +69,9 @@ const struct eth_addr ethzero = {{0,0,0,0,0,0}};
* @param p the received packet, p->payload pointing to the ethernet header
* @param netif the network interface on which the packet was received
*
* @see @ref LWIP_HOOK_UNKNOWN_ETH_PROTOCOL,
* @ref ETHARP_SUPPORT_VLAN and
* @ref LWIP_HOOK_VLAN_CHECK.
* @see LWIP_HOOK_UNKNOWN_ETH_PROTOCOL
* @see ETHARP_SUPPORT_VLAN
* @see LWIP_HOOK_VLAN_CHECK
*/
err_t
ethernet_input(struct pbuf *p, struct netif *netif)
@ -247,7 +247,7 @@ free_and_return:
* Send an ethernet packet on the network using netif->linkoutput().
* The ethernet header is filled in before sending.
*
* @see @ref LWIP_HOOK_VLAN_SET
* @see LWIP_HOOK_VLAN_SET
*
* @param netif the lwIP network interface on which to send the packet
* @param p the packet to send. pbuf layer must be @ref PBUF_LINK.

View File

@ -611,7 +611,7 @@ lowpan4_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr)
* @param q The pbuf(s) containing the IP packet to be sent.
* @param ip6addr The IP address of the packet destination.
*
* @return
* @return err_t
*/
err_t
lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr)

View File

@ -404,9 +404,9 @@ pppos_destroy(ppp_pcb *ppp, void *ctx)
#if !NO_SYS && !PPP_INPROC_IRQ_SAFE
/** Pass received raw characters to PPPoS to be decoded through lwIP TCPIP thread.
*
* @param pcb PPP descriptor index, returned by pppos_create()
* @param data received data
* @param len length of received data
* @param ppp PPP descriptor index, returned by pppos_create()
* @param s received data
* @param l length of received data
*/
err_t
pppos_input_tcpip(ppp_pcb *ppp, u8_t *s, int l)
@ -458,9 +458,9 @@ PACK_STRUCT_END
/** Pass received raw characters to PPPoS to be decoded.
*
* @param pcb PPP descriptor index, returned by pppos_create()
* @param data received data
* @param len length of received data
* @param ppp PPP descriptor index, returned by pppos_create()
* @param s received data
* @param l length of received data
*/
void
pppos_input(ppp_pcb *ppp, u8_t *s, int l)

View File

@ -304,7 +304,7 @@ slipif_rxbyte(struct netif *netif, u8_t c)
/** Like slipif_rxbyte, but passes completed packets to netif->input
*
* @param netif The lwip network interface structure for this slipif
* @param data received character
* @param c received character
*/
static void
slipif_rxbyte_input(struct netif *netif, u8_t c)