XenevaOS
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
tcp.cpp File Reference
#include <net\socket.h>
#include <net\aunet.h>
#include <Mm\kmalloc.h>
#include <string.h>
#include <Hal\x86_64_sched.h>
#include <process.h>
#include <stack.h>
#include <Hal\serial.h>
#include <Hal/x86_64_hal.h>
#include <net\tcp.h>
#include <Net/ipv4.h>
#include <stdio.h>
#include <aucon.h>
Include dependency graph for tcp.cpp:

Classes

struct  _tcpcheckheader_
 

Typedefs

typedef struct _tcpcheckheader_ TCPCheckHeader
 

Functions

uint16_t CalculateTCPChecksum (TCPCheckHeader *p, TCPHeader *h, void *d, size_t payloadsz)
 
int AuTCPReceive (AuSocket *sock, msghdr *msg, int flags)
 
int AuTCPSend (AuSocket *sock, msghdr *msg, int flags)
 
void AuTCPClose (AuSocket *sock)
 
void AuTCPObtainPort (AuSocket *sock)
 
int AuTCPAcknowledge (AuVFSNode *nic, AuSocket *sock, IPv4Header *ippack, size_t payloadLen)
 
int AuTCPConnect (AuSocket *sock, sockaddr *addr, socklen_t addrlen)
 
int AuTCPBind (AuSocket *sock, sockaddr *addr, socklen_t addrlen)
 
uint64_t AuTCPRead (AuVFSNode *node, AuVFSNode *file, uint64_t *buffer, uint32_t len)
 
uint64_t AuTCPWrite (AuVFSNode *node, AuVFSNode *file, uint64_t *buffer, uint32_t len)
 
int AuTCPFileClose (AuVFSNode *fsys, AuVFSNode *file)
 
int CreateTCPSocket ()
 
list_tTCPGetSocketList ()
 
void TCPProtocolInstall ()
 

Variables

list_ttcpSocketList
 

Typedef Documentation

◆ TCPCheckHeader

Function Documentation

◆ AuTCPAcknowledge()

int AuTCPAcknowledge ( AuVFSNode nic,
AuSocket sock,
IPv4Header ippack,
size_t  payloadLen 
)

◆ AuTCPBind()

int AuTCPBind ( AuSocket sock,
sockaddr addr,
socklen_t  addrlen 
)

◆ AuTCPClose()

void AuTCPClose ( AuSocket sock)

◆ AuTCPConnect()

int AuTCPConnect ( AuSocket sock,
sockaddr addr,
socklen_t  addrlen 
)

◆ AuTCPFileClose()

int AuTCPFileClose ( AuVFSNode fsys,
AuVFSNode file 
)

◆ AuTCPObtainPort()

void AuTCPObtainPort ( AuSocket sock)

◆ AuTCPRead()

uint64_t AuTCPRead ( AuVFSNode node,
AuVFSNode file,
uint64_t buffer,
uint32_t  len 
)

◆ AuTCPReceive()

int AuTCPReceive ( AuSocket sock,
msghdr msg,
int  flags 
)

◆ AuTCPSend()

int AuTCPSend ( AuSocket sock,
msghdr msg,
int  flags 
)

◆ AuTCPWrite()

uint64_t AuTCPWrite ( AuVFSNode node,
AuVFSNode file,
uint64_t buffer,
uint32_t  len 
)

◆ CalculateTCPChecksum()

uint16_t CalculateTCPChecksum ( TCPCheckHeader p,
TCPHeader h,
void *  d,
size_t  payloadsz 
)

Implementation needed

◆ CreateTCPSocket()

int CreateTCPSocket ( )

◆ TCPGetSocketList()

list_t * TCPGetSocketList ( )

◆ TCPProtocolInstall()

void TCPProtocolInstall ( )

Variable Documentation

◆ tcpSocketList

list_t* tcpSocketList

BSD 2-Clause License

Copyright (c) 2022-2024, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.