udp.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
23 #include "byteorder.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
32 typedef struct __attribute__((packed)) {
37 } udp_hdr_t;
38 
45 
46 #ifdef __cplusplus
47 }
48 #endif
49 
Functions to work with different byte orders.
void udp_hdr_print(udp_hdr_t *hdr)
Print the given UDP header to STDOUT.
UDP header.
Definition: udp.h:32
network_uint16_t checksum
checksum
Definition: udp.h:36
network_uint16_t length
payload length (including the header)
Definition: udp.h:35
network_uint16_t dst_port
destination port
Definition: udp.h:34
network_uint16_t src_port
source port
Definition: udp.h:33
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:70