Commit 58520618 authored by Martin Vítek's avatar Martin Vítek

Add ICMP_protocol class

parent 0c664b92
#include "ICMP_protocol.h"
#include <cstdint>
ICMP_protocol::ICMP_protocol()
{
}
#pragma once
#include <cstdint>
enum ICMPv4_error_messages
{
DESTINATION_UNREACHABLE = 3,
SOURCE_QUENCH = 4,
REDIRECT = 5,
TIME_EXCEEDED = 11,
PARAMETER_PROBLEM = 12
};
enum ICMPv4_informational_messages
{
ECHO_REPLY = 0,
ECHO_REQUEST = 8,
ROUTER_ADVERTISEMENT = 9,
ROUTER_SOLICITATION = 10,
TIMESTAMP_REQUEST = 13,
TIMESTAMP_REPLY = 14,
INFORMATION_REQUEST = 15,
INFORMATION_REPLY = 16,
ADDRESS_MASK_REQUEST = 17,
ADDRESS_MASK_REPLY = 18,
TRACEROUTE = 30
};
struct ICMP_packet
{
uint8_t type;
uint8_t code;
uint16_t checksum;
};
struct ICMP_echo_packet
{
ICMP_packet icmp_header;
uint16_t identifier;
uint16_t sequence_number;
//Optional data (not specified)
};
class ICMP_protocol
{
public:
ICMP_protocol();
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment