ArvernOS
|
Data Structures | |
struct | ipv4_header_t |
Functions | |
void | ipv4_receive_packet (net_interface_t *interface, uint8_t *data, uint32_t len) |
void | ipv4_send_packet (net_interface_t *interface, struct sockaddr_in *dst_addr, uint8_t protocol, uint16_t flags, uint8_t *data, uint32_t len) |
uint16_t | ipv4_checksum (void *addr, int count) |
From: https://tools.ietf.org/html/rfc1071. | |
uint16_t ipv4_checksum | ( | void * | addr, |
int | count ) |
From: https://tools.ietf.org/html/rfc1071.
Computes an Internet checksum as defined in RFC1071.
addr | the address of the data to compute a checksum to |
count | the number of data bytes to use for the checksum |
void ipv4_receive_packet | ( | net_interface_t * | interface, |
uint8_t * | data, | ||
uint32_t | len ) |
Handles IPv4 packets.
interface | the interface that received the IPv4 packet |
data | the data containing the IPv4 packet |
len | the length of the data |
void ipv4_send_packet | ( | net_interface_t * | interface, |
struct sockaddr_in * | dst_addr, | ||
uint8_t | protocol, | ||
uint16_t | flags, | ||
uint8_t * | data, | ||
uint32_t | len ) |
Sends an IPv4 packet.
interface | the interface to use to send the IPv4 request |
dst_addr | the destination socket address |
protocol | the protocol encapsulated in the IP packet |
flags | IP flags |
data | the data to send over IP |
len | the size of the data to send |