Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
tcp.h File Reference
#include "net/ipv4.h"
#include "net/netdev.h"
#include <type.h>

Go to the source code of this file.

Data Structures

struct  tcp_options_t
 

Functions

struct __attribute__ ((packed)) tcp_header
 
void handle_tcp (netdev_t *dev, struct ipv4_header *ip, uint8_t mac_dst[6])
 
void send_tcp_data (netdev_t *dev, struct ipv4_header *ip, struct tcp_header *tcp, uint8_t *data, size_t len, uint8_t mac_dst[6])
 
void parse_tcp_options (struct tcp_header *tcp, tcp_options_t *out)
 
uint8_t build_synack_options (netdev_t *dev, uint8_t *buf, tcp_options_t *client_opts)
 
void send_command (netdev_t *dev, struct ipv4_header *ip, struct tcp_header *tcp, tcp_options_t *opt, uint8_t flags, uint8_t mac_dst[6])
 

Function Documentation

◆ __attribute__()

struct __attribute__ ( (packed) )

Definition at line 1 of file tcp.h.

References checksum, flags, offset, sequence, and __attribute__::source_port.

◆ build_synack_options()

uint8_t build_synack_options ( netdev_t * dev,
uint8_t * buf,
tcp_options_t * client_opts )

Definition at line 273 of file tcp.c.

References tcp_options_t::mss, and netdev::mtu.

Referenced by send_command().

◆ handle_tcp()

void handle_tcp ( netdev_t * dev,
struct ipv4_header * ip,
uint8_t mac_dst[6] )

◆ parse_tcp_options()

void parse_tcp_options ( struct tcp_header * tcp,
tcp_options_t * out )

◆ send_command()

void send_command ( netdev_t * dev,
struct ipv4_header * ip,
struct tcp_header * tcp,
tcp_options_t * opt,
uint8_t flags,
uint8_t mac_dst[6] )

◆ send_tcp_data()