|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#include "ipv4.h"#include "ethernet.h"#include "libk/serial.h"#include <str.h>#include "net/netdev.h"#include "net/netutils.h"#include "type.h"Go to the source code of this file.
Functions | |
| static void | fill_ip_header (struct ipv4_header *ip_hdr, uint16_t total_length, uint16_t id, uint16_t flags_fragment, uint8_t protocol, uint32_t src_ip, uint32_t dst_ip) |
| void | ipv4_send (netdev_t *dev, struct netbuff *nb, uint32_t dst_ip, uint8_t protocol, uint8_t mac_dest[6]) |
|
static |
Definition at line 9 of file ipv4.c.
References ipv4_header::checksum, checksum16_adc(), dst_ip, ipv4_header::dst_ip, flags_fragment, ipv4_header::flags_fragment, ipv4_header::id, ipv4_header::protocol, protocol, ipv4_header::src_ip, src_ip, ipv4_header::tos, ipv4_header::total_length, total_length, ipv4_header::ttl, UNUSED, ipv4_header::version_ihl, and vxHtons().
Referenced by ipv4_send().
| void ipv4_send | ( | netdev_t * | dev, |
| struct netbuff * | nb, | ||
| uint32_t | dst_ip, | ||
| uint8_t | protocol, | ||
| uint8_t | mac_dest[6] ) |
Definition at line 32 of file ipv4.c.
References create_netbuff(), netbuff::data, dst_ip, ETHER_TYPE_IP, ethernet_send_frame(), fill_ip_header(), free_netbuff(), get_next_ip_id(), netbuff::length, memcopy(), netdev::mtu, netbuff_push(), netbuff_put(), offset, protocol, vxHtons(), and vxInetAddr().
Referenced by handle_icmp(), send_command(), and send_tcp_data().