Skip to content
Snippets Groups Projects
Commit e6811e8c authored by Martine Lenders's avatar Martine Lenders
Browse files

Merge pull request #3295 from authmillenon/ng_udp/doc/fix

ng_udp: fix documentation
parents 715306b8 380c53c3
No related branches found
No related tags found
No related merge requests found
...@@ -70,9 +70,9 @@ typedef struct __attribute__((packed)) { ...@@ -70,9 +70,9 @@ typedef struct __attribute__((packed)) {
* @param[in] pseudo_hdr Pointer to the network layer header * @param[in] pseudo_hdr Pointer to the network layer header
* *
* @return 0 on success * @return 0 on success
* @return -EBADMSG if @p pkt is not of type NG_NETTYPE_UDP * @return -EBADMSG if @p hdr is not of type NG_NETTYPE_UDP
* @return -EFAULT if @p pkt or @p pseudo_hdr is NULL * @return -EFAULT if @p hdr or @p pseudo_hdr is NULL
* @return -ENOENT if @p pseudo_hdr_type is not known * @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); 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); ...@@ -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 * @param[in] dst_len Length of @p dst, must be 2
* *
* @return pointer to the newly created (and allocated) header * @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, ng_pktsnip_t *ng_udp_hdr_build(ng_pktsnip_t *payload,
uint8_t *src, size_t src_len, 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) ...@@ -208,7 +208,7 @@ int ng_udp_calc_csum(ng_pktsnip_t *hdr, ng_pktsnip_t *pseudo_hdr)
{ {
uint16_t csum; uint16_t csum;
if (hdr == NULL || hdr->next == NULL) { if ((hdr == NULL) || (pseudo_hdr == NULL)) {
return -EFAULT; return -EFAULT;
} }
if (hdr->type != NG_NETTYPE_UDP) { if (hdr->type != NG_NETTYPE_UDP) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment