GNRC's implementation of the UDP protocol.  
More...
GNRC's implementation of the UDP protocol. 
|  | 
| file | udp.h | 
|  | UDP GNRC definition. 
 | 
|  | 
◆ GNRC_UDP_MSG_QUEUE_SIZE
Message queue size to use for the UDP thread. 
Definition at line 73 of file udp.h.
 
 
◆ gnrc_udp_calc_csum()
Calculate the checksum for the given packet. 
- Parameters
- 
  
    | [in] | hdr | Pointer to the UDP header |  | [in] | pseudo_hdr | Pointer to the network layer header |  
 
- Returns
- 0 on success 
- 
-EBADMSG if hdris not of type GNRC_NETTYPE_UDP
- 
-EFAULT if hdrorpseudo_hdris NULL
- 
-ENOENT if gnrc_pktsnip_t::type of pseudo_hdris not known
 
 
◆ gnrc_udp_hdr_build()
Allocate and initialize a fresh UDP header in the packet buffer. 
- Parameters
- 
  
    | [in] | payload | Payload contained in the UDP packet |  | [in] | src | Source port in host byte order |  | [in] | dst | Destination port in host byte order |  
 
- Returns
- pointer to the newly created (and allocated) header 
- 
NULL on src == NULL,dst == NULL,src_len != 2,dst_len != 2or on allocation error
- Precondition
- src > 0and- dst > 0
 
 
◆ gnrc_udp_init()
      
        
          | int gnrc_udp_init | ( | void |  | ) |  | 
      
 
Initialize and start UDP. 
- Returns
- PID of the UDP thread 
- 
negative value on error