mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #3295 from authmillenon/ng_udp/doc/fix
ng_udp: fix documentation
This commit is contained in:
commit
e6811e8c28
@ -70,9 +70,9 @@ typedef struct __attribute__((packed)) {
|
||||
* @param[in] pseudo_hdr Pointer to the network layer header
|
||||
*
|
||||
* @return 0 on success
|
||||
* @return -EBADMSG if @p pkt is not of type NG_NETTYPE_UDP
|
||||
* @return -EFAULT if @p pkt or @p pseudo_hdr is NULL
|
||||
* @return -ENOENT if @p pseudo_hdr_type is not known
|
||||
* @return -EBADMSG if @p hdr is not of type NG_NETTYPE_UDP
|
||||
* @return -EFAULT if @p hdr or @p pseudo_hdr is NULL
|
||||
* @return -ENOENT if ng_pktsnip_t::type of @p pseudo_hdr is not known
|
||||
*/
|
||||
int ng_udp_calc_csum(ng_pktsnip_t *hdr, ng_pktsnip_t *pseudo_hdr);
|
||||
|
||||
@ -86,7 +86,8 @@ int ng_udp_calc_csum(ng_pktsnip_t *hdr, ng_pktsnip_t *pseudo_hdr);
|
||||
* @param[in] dst_len Length of @p dst, must be 2
|
||||
*
|
||||
* @return pointer to the newly created (and allocated) header
|
||||
* @return NULL on error
|
||||
* @return NULL on `src == NULL`, `dst == NULL`, `src_len != 2`, `dst_len != 2`
|
||||
* or on allocation error
|
||||
*/
|
||||
ng_pktsnip_t *ng_udp_hdr_build(ng_pktsnip_t *payload,
|
||||
uint8_t *src, size_t src_len,
|
||||
|
@ -208,7 +208,7 @@ int ng_udp_calc_csum(ng_pktsnip_t *hdr, ng_pktsnip_t *pseudo_hdr)
|
||||
{
|
||||
uint16_t csum;
|
||||
|
||||
if (hdr == NULL || hdr->next == NULL) {
|
||||
if ((hdr == NULL) || (pseudo_hdr == NULL)) {
|
||||
return -EFAULT;
|
||||
}
|
||||
if (hdr->type != NG_NETTYPE_UDP) {
|
||||
|
Loading…
Reference in New Issue
Block a user