Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
netutils.h File Reference
#include <type.h>

Go to the source code of this file.

Functions

static uint16_t vxHtons (uint16_t value)
 
static uint16_t vxNtohs (uint16_t netshort)
 
static uint32_t vxHtonl (uint32_t value)
 
static uint32_t vxNtohl (uint32_t netlong)
 
uint32_t vxInetAddr (const char *addr)
 
uint16_t checksum16_adc (const uint16_t *data, size_t length)
 
uint32_t checksum16_raw (const uint16_t *data, size_t length)
 
char * vxInetNtoa (uint32_t ip, char *buffer)
 

Function Documentation

◆ checksum16_adc()

uint16_t checksum16_adc ( const uint16_t * data,
size_t length )

Definition at line 26 of file netutils.c.

References data, and length.

Referenced by fill_ip_header(), and handle_icmp().

◆ checksum16_raw()

uint32_t checksum16_raw ( const uint16_t * data,
size_t length )

Definition at line 49 of file netutils.c.

References data, and length.

Referenced by send_command(), and send_tcp_data().

◆ vxHtonl()

static uint32_t vxHtonl ( uint32_t value)
inlinestatic

Definition at line 15 of file netutils.h.

References value.

Referenced by send_command(), and send_tcp_data().

◆ vxHtons()

static uint16_t vxHtons ( uint16_t value)
inlinestatic

Definition at line 6 of file netutils.h.

References value.

Referenced by fill_ip_header(), ipv4_send(), send_command(), send_tcp_data(), and socket_receive().

◆ vxInetAddr()

uint32_t vxInetAddr ( const char * addr)

Definition at line 3 of file netutils.c.

References addr.

Referenced by arp_reply(), ipv4_send(), and socket_receive().

◆ vxInetNtoa()

char * vxInetNtoa ( uint32_t ip,
char * buffer )

Definition at line 78 of file netutils.c.

References buffer, len, and u8_to_str().

Referenced by handle_icmp(), and socket_receive().

◆ vxNtohl()

static uint32_t vxNtohl ( uint32_t netlong)
inlinestatic

Definition at line 20 of file netutils.h.

Referenced by send_command(), and send_tcp_data().

◆ vxNtohs()

static uint16_t vxNtohs ( uint16_t netshort)
inlinestatic

Definition at line 10 of file netutils.h.

Referenced by handle_icmp(), handle_tcp(), and send_tcp_data().