Hybrid ICN (hICN) plugin
v21.06-rc0-4-g18fa668
hicn-plugin
src
hicn
protocol
udp.h
1
/*
2
* Copyright (c) 2017-2019 Cisco and/or its affiliates.
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at:
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
#ifndef HICN_PROTOCOL_UDP_H
17
#define HICN_PROTOCOL_UDP_H
18
19
/*
20
* The length of the UDP header struct must be 8 bytes.
21
*/
22
#define EXPECTED_UDP_HDRLEN 8
23
24
typedef
struct
25
{
26
u16 src_port;
27
u16 dst_port;
28
u16 length;
29
u16 checksum;
30
}
_udp_header_t
;
31
32
#define UDP_HDRLEN sizeof(_udp_header_t)
33
static_assert (EXPECTED_UDP_HDRLEN == UDP_HDRLEN,
34
"Size of UDP struct does not match its expected size."
);
35
36
#endif
/* HICN_PROTOCOL_UDP_H */
37
38
/*
39
* fd.io coding-style-patch-verification: ON
40
*
41
* Local Variables:
42
* eval: (c-set-style "gnu")
43
* End:
44
*/
_udp_header_t
Definition:
udp.h:24
Generated by
1.8.17