Loading...
Searching...
No Matches
udp.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
23
24#include <stdint.h>
25
26#include "byteorder.h"
27#include "net/gnrc.h"
28#include "net/udp.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
46#ifndef CONFIG_GNRC_UDP_MSG_QUEUE_SIZE_EXP
47#define CONFIG_GNRC_UDP_MSG_QUEUE_SIZE_EXP (3U)
48#endif
49
53#ifndef GNRC_UDP_PRIO
54#define GNRC_UDP_PRIO (THREAD_PRIORITY_MAIN - 2)
55#endif
56
64#ifndef GNRC_UDP_STACK_SIZE
65#define GNRC_UDP_STACK_SIZE ((THREAD_STACKSIZE_SMALL) - 64)
66#endif
68
72#ifndef GNRC_UDP_MSG_QUEUE_SIZE
73#define GNRC_UDP_MSG_QUEUE_SIZE (1 << CONFIG_GNRC_UDP_MSG_QUEUE_SIZE_EXP)
74#endif
75
88
103 uint16_t dst);
104
112
113#ifdef __cplusplus
114}
115#endif
116
Functions to work with different byte orders.
Includes all essential GNRC network stack base modules.
struct gnrc_pktsnip gnrc_pktsnip_t
Type to represent parts (either headers or payload) of a packet, called snips.
int gnrc_udp_calc_csum(gnrc_pktsnip_t *hdr, gnrc_pktsnip_t *pseudo_hdr)
Calculate the checksum for the given packet.
int gnrc_udp_init(void)
Initialize and start UDP.
gnrc_pktsnip_t * gnrc_udp_hdr_build(gnrc_pktsnip_t *payload, uint16_t src, uint16_t dst)
Allocate and initialize a fresh UDP header in the packet buffer.
UDP header and helper functions definition.