|
Retro Rocket Kernel
BASIC-Powered Operating System
|
#include "kernel.h"Data Structures | |
| struct | icmp_packet |
| struct | icmp_redirect_packet |
| struct | icmp_information |
| struct | icmp_parameter_problem_packet |
| struct | icmp_echo_packet |
| struct | icmp_timestamp_packet |
Enumerations | |
| enum | icmp_type_t { ICMP_ECHO_REPLY = 0 , ICMP_DESTINATION_UNREACHABLE = 3 , ICMP_SOURCE_QUENCH = 4 , ICMP_REDIRECT = 5 , ICMP_ECHO = 8 , ICMP_TIME_EXCEEDED = 11 , ICMP_PARAMETER_PROBLEM = 12 , ICMP_TIMESTAMP = 13 , ICMP_TIMESTAMP_REPLY = 14 , ICMP_INFORMATION_REQUEST = 15 , ICMP_INFORMATION_REPLY = 16 } |
| enum | icmp_unreachable_code_t { ICMP_NET_UNREACHABLE = 0 , ICMP_HOST_UNREACHABLE = 1 , ICMP_PROTOCOL_UNREACHABLE = 2 , ICMP_PORT_UNREACHABLE = 3 , ICMP_FRAGMENTATION_NEEDED = 4 , ICMP_SOURCE_ROUTE_FAILED = 5 } |
| enum | icmp_time_exceeded_code_t { ICMP_TTL_EXCEEDED = 0 , ICMP_FRAGMENT_REASSEMBLY_TIME_EXCEEDED = 1 } |
| enum | icmp_redirect_code_t { ICMP_REDIRECT_NETWORK = 0 , ICMP_REDIRECT_HOST = 1 , ICMP_REDIRECT_TOS_NETWORK = 2 , ICMP_REDIRECT_TOS_HOST = 3 } |
Functions | |
| struct icmp_packet | __attribute__ ((packed)) icmp_packet_t |
| void | icmp_handle_packet ([[maybe_unused]] ip_packet_t *encap_packet, icmp_packet_t *packet, size_t len) |
| Handle ICMP packet from the IP driver. More... | |
| void | icmp_send_echo (uint32_t destination, uint16_t id, uint16_t seq) |
Variables | |
| uint8_t | type |
| uint8_t | code |
| uint16_t | checksum |
| uint32_t | unused |
| ip_packet_t | original_datagram |
| uint32_t | gateway |
| uint16_t | id |
| uint16_t | seq |
| uint8_t | problem_ptr |
| uint16_t | unused1 |
| uint16_t | unused2 |
| uint32_t | originate_timestamp |
| uint32_t | receive_timestamp |
| uint32_t | transmit_timestamp |
| enum icmp_redirect_code_t |
| enum icmp_type_t |
| struct icmp_packet __attribute__ | ( | (packed) | ) |
| void icmp_handle_packet | ( | [[maybe_unused] ] ip_packet_t * | encap_packet, |
| icmp_packet_t * | packet, | ||
| size_t | len | ||
| ) |
Handle ICMP packet from the IP driver.
| ip | Encapsulating IP packet |
| packet | raw ICMP packet |
| length | ICMP packet length |
| void icmp_send_echo | ( | uint32_t | destination, |
| uint16_t | id, | ||
| uint16_t | seq | ||
| ) |
| uint16_t checksum |
| uint8_t code |
| uint32_t gateway |
| uint16_t id |
| ip_packet_t original_datagram |
| uint32_t originate_timestamp |
| uint8_t problem_ptr |
| uint32_t receive_timestamp |
| uint16_t seq |
| uint32_t transmit_timestamp |
| uint8_t type |
| uint32_t unused |
| uint16_t unused1 |
| uint16_t unused2 |