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

Go to the source code of this file.

Functions

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)
 
static int u8_to_str (uint8_t val, char *buf)
 
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().

◆ u8_to_str()

static int u8_to_str ( uint8_t val,
char * buf )
static

Definition at line 60 of file netutils.c.

Referenced by vxInetNtoa().

◆ 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().