![]() |
Max OS 0.3
|
Handles ICMP packets. More...
#include <icmp.h>
Public Member Functions | |
| InternetControlMessageProtocol (InternetProtocolHandler *internet_protocol_handler, common::OutputStream *error_messages) | |
| Constructs an InternetControlMessageProtocol handler. | |
| bool | handle_internet_protocol_payload (net::InternetProtocolAddress src_ip_be, net::InternetProtocolAddress dst_ip_be, uint8_t *payload_data, uint32_t size) final |
| Called by the InternetProtocolProvider when a new packet has arrived. | |
| void | request_echo_reply (uint32_t ip_be) |
| Sends an ICMP echo request to the specified IP address. | |
| InternetControlMessageProtocol::InternetControlMessageProtocol | ( | InternetProtocolHandler * | internet_protocol_handler, |
| common::OutputStream * | error_messages | ||
| ) |
Constructs an InternetControlMessageProtocol handler.
| internet_protocol_handler | The Internet protocol handler to use. |
| error_messages | The output stream to use for error messages. |
Definition at line 21 of file icmp.cpp.
|
finalvirtual |
Called by the InternetProtocolProvider when a new packet has arrived.
| src_ip_be | The source IP address of the packet |
| dst_ip_be | The destination IP address of the packet |
| payload_data | The payload of the packet |
| size | The size of the payload |
Reply to ping requests
Implement the rest of the ICMP messages
Reimplemented from MaxOS::net::IPV4PayloadHandler.
Definition at line 43 of file icmp.cpp.
References MaxOS::net::InternetProtocolHandler::checksum().
Sends an ICMP echo request to the specified IP address.
| ip_be | The IP address to send the request to |
Definition at line 84 of file icmp.cpp.
References MaxOS::net::InternetProtocolHandler::checksum(), and MaxOS::net::IPV4PayloadHandler::send().