Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
udp.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2017 Intel Corporation
7 *
8 * SPDX-License-Identifier: Apache-2.0
9 */
10
11#ifndef ZEPHYR_INCLUDE_NET_UDP_H_
12#define ZEPHYR_INCLUDE_NET_UDP_H_
13
14#include <zephyr/types.h>
15
16#include <zephyr/net/net_core.h>
17#include <zephyr/net/net_ip.h>
18#include <zephyr/net/net_pkt.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24/* These APIs are mostly meant for Zephyr internal use so do not generate
25 * documentation for them.
26 */
53#if defined(CONFIG_NET_UDP)
54struct net_udp_hdr *net_udp_get_hdr(struct net_pkt *pkt,
55 struct net_udp_hdr *hdr);
56#else
57static inline struct net_udp_hdr *net_udp_get_hdr(struct net_pkt *pkt,
58 struct net_udp_hdr *hdr)
59{
60 return NULL;
61}
62#endif /* CONFIG_NET_UDP */
63
79#if defined(CONFIG_NET_UDP)
80struct net_udp_hdr *net_udp_set_hdr(struct net_pkt *pkt,
81 struct net_udp_hdr *hdr);
82#else
83static inline struct net_udp_hdr *net_udp_set_hdr(struct net_pkt *pkt,
84 struct net_udp_hdr *hdr)
85{
86 return NULL;
87}
88#endif /* CONFIG_NET_UDP */
89
96#ifdef __cplusplus
97}
98#endif
99
100#endif /* ZEPHYR_INCLUDE_NET_UDP_H_ */
Network core definitions.
IPv6 and IPv4 definitions.
Network packet buffer descriptor API.
Network packet.
Definition: net_pkt.h:67