![]() |
Max OS 0.3
|
Handles the payload of a specific IP protocol. More...
#include <ipv4.h>
Public Member Functions | |
| IPV4PayloadHandler (InternetProtocolHandler *internet_protocol_handler, uint8_t protocol) | |
| Construct a new IPV4 Payload Handler object and register it with the Internet Protocol Handler. | |
| virtual bool | handle_internet_protocol_payload (net::InternetProtocolAddress src_ip_be, net::InternetProtocolAddress dst_ip_be, uint8_t *internetprotocol_payload, uint32_t size) |
| Called when an IP packet is received. (Deafult, does nothing, overide for use) | |
| void | send (InternetProtocolAddress destination_ip, uint8_t *payload_data, uint32_t size) |
| Sends an IP packet. | |
Protected Attributes | |
| InternetProtocolHandler * | internet_protocol_handler |
| The Internet protocol handler this payload handler is connected to. | |
| uint8_t | ip_protocol |
| The IP protocol this handler handles. | |
Friends | |
| class | InternetProtocolHandler |
| IPV4PayloadHandler::IPV4PayloadHandler | ( | InternetProtocolHandler * | internet_protocol_handler, |
| uint8_t | protocol | ||
| ) |
Construct a new IPV4 Payload Handler object and register it with the Internet Protocol Handler.
| internet_protocol_handler | The Internet Protocol Handler to register with |
| protocol | The IP protocol to handle |
Definition at line 57 of file ipv4.cpp.
References MaxOS::net::InternetProtocolHandler::connect_ipv_4_payload_handler(), internet_protocol_handler, and ip_protocol.
|
virtual |
Called when an IP packet is received. (Deafult, does nothing, overide for use)
| src_ip_be | The source IP address. |
| dst_ip_be | The destination IP address. |
| internetprotocol_payload | The payload of the IP packet. |
| size | The size of the IP packet. |
Reimplemented in MaxOS::net::TransmissionControlProtocolHandler, MaxOS::net::UserDatagramProtocolHandler, and MaxOS::net::InternetControlMessageProtocol.
Definition at line 79 of file ipv4.cpp.
| void IPV4PayloadHandler::send | ( | InternetProtocolAddress | destination_ip, |
| uint8_t * | payload_data, | ||
| uint32_t | size | ||
| ) |
Sends an IP packet.
| destination_ip | The destination IP address. |
| payload_data | The payload of the IP packet. |
| size | The size of the IP packet. |
Definition at line 93 of file ipv4.cpp.
References internet_protocol_handler, ip_protocol, and MaxOS::net::InternetProtocolHandler::send_internet_protocol_packet().
Referenced by MaxOS::net::InternetControlMessageProtocol::request_echo_reply(), MaxOS::net::UserDatagramProtocolHandler::send(), and MaxOS::net::TransmissionControlProtocolHandler::send_transmission_control_protocol_packet().
|
friend |
|
protected |
The Internet protocol handler this payload handler is connected to.
Definition at line 70 of file ipv4.h.
Referenced by MaxOS::net::TransmissionControlProtocolHandler::connect(), MaxOS::net::UserDatagramProtocolHandler::connect(), IPV4PayloadHandler(), MaxOS::net::TransmissionControlProtocolHandler::listen(), MaxOS::net::UserDatagramProtocolHandler::listen(), and send().
|
protected |
The IP protocol this handler handles.
Definition at line 71 of file ipv4.h.
Referenced by IPV4PayloadHandler(), and send().