OpenVPN 3 Core Library
Loading...
Searching...
No Matches
icmp4.hpp
Go to the documentation of this file.
1
// OpenVPN -- An application to securely tunnel IP networks
2
// over a single port, with support for SSL/TLS-based
3
// session authentication and key exchange,
4
// packet encryption, packet authentication, and
5
// packet compression.
6
//
7
// Copyright (C) 2012- OpenVPN Inc.
8
//
9
// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10
//
11
12
// Define the ICMPv4 header
13
14
#pragma once
15
16
#include <cstdint>
// for std::uint32_t, uint16_t, uint8_t
17
18
#include <
openvpn/ip/ip4.hpp
>
19
20
#pragma pack(push)
21
#pragma pack(1)
22
23
namespace
openvpn
{
24
struct
ICMPv4
25
{
26
enum
27
{
28
ECHO_REQUEST
= 8,
29
ECHO_REPLY
= 0,
30
DEST_UNREACH
= 3,
31
FRAG_NEEDED
= 4,
32
MIN_DATA_SIZE
= 8
33
};
34
35
struct
IPv4Header
head
;
36
37
union
{
38
struct
39
{
40
std::uint8_t
type
;
41
std::uint8_t
code
;
42
};
43
std::uint16_t
type_code
;
44
};
45
std::uint16_t
checksum
;
46
47
union
{
48
struct
49
{
50
std::uint16_t
id
;
51
std::uint16_t
seq_num
;
52
};
53
struct
54
{
55
std::uint16_t
unused
;
56
std::uint16_t
nexthop_mtu
;
57
};
58
};
59
};
60
}
// namespace openvpn
61
62
#pragma pack(pop)
ip4.hpp
openvpn
Definition
ovpncli.cpp:97
openvpn::ICMPv4
Definition
icmp4.hpp:25
openvpn::ICMPv4::type
std::uint8_t type
Definition
icmp4.hpp:40
openvpn::ICMPv4::ECHO_REPLY
@ ECHO_REPLY
Definition
icmp4.hpp:29
openvpn::ICMPv4::DEST_UNREACH
@ DEST_UNREACH
Definition
icmp4.hpp:30
openvpn::ICMPv4::MIN_DATA_SIZE
@ MIN_DATA_SIZE
Definition
icmp4.hpp:32
openvpn::ICMPv4::FRAG_NEEDED
@ FRAG_NEEDED
Definition
icmp4.hpp:31
openvpn::ICMPv4::ECHO_REQUEST
@ ECHO_REQUEST
Definition
icmp4.hpp:28
openvpn::ICMPv4::id
std::uint16_t id
Definition
icmp4.hpp:50
openvpn::ICMPv4::checksum
std::uint16_t checksum
Definition
icmp4.hpp:45
openvpn::ICMPv4::code
std::uint8_t code
Definition
icmp4.hpp:41
openvpn::ICMPv4::seq_num
std::uint16_t seq_num
Definition
icmp4.hpp:51
openvpn::ICMPv4::nexthop_mtu
std::uint16_t nexthop_mtu
Definition
icmp4.hpp:56
openvpn::ICMPv4::type_code
std::uint16_t type_code
Definition
icmp4.hpp:43
openvpn::ICMPv4::unused
std::uint16_t unused
Definition
icmp4.hpp:55
openvpn::ICMPv4::head
struct IPv4Header head
Definition
icmp4.hpp:35
openvpn::IPv4Header
Definition
ip4.hpp:24
openvpn
ip
icmp4.hpp
Generated by
1.9.8