XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
socket.cpp File Reference
#include <net/socket.h>
#include <net/ipv4.h>
#include <Hal/x86_64_hal.h>
#include <Mm/kmalloc.h>
#include <string.h>
#include <_null.h>
#include <net/AuNet.h>
#include <list.h>
#include <Hal/serial.h>
#include <aucon.h>
#include <Net/route.h>
Include dependency graph for socket.cpp:

Classes

struct  _dns_entry_
 

Macros

#define SOL_SOCKET   0
 
#define SO_KEEPALIVE   1
 
#define SO_REUSEADDR   2
 
#define SO_BINDTODEVICE   3
 

Typedefs

typedef struct _dns_entry_ AuDNSEntry
 

Functions

void AuSocketAdd (AuSocket *sock, void *data, size_t sz)
 
void * AuSocketGet (AuSocket *sock)
 
int AuRawSocketReceive (AuSocket *sock, msghdr *msg, int flags)
 
int AuRawSocketSend (AuSocket *sock, msghdr *msg, int flags)
 
int AuSocketSOSocket (AuSocket *sock, int optname, const void *optval, socklen_t optlen)
 
int AuSocketSetOpt (int sockfd, int level, int optname, const void *optval, socklen_t optlen)
 
AuSocketAuNetCreateSocket ()
 
int AuRawSocketClose (AuVFSNode *fs, AuVFSNode *file)
 
int SocketIOControl (AuVFSNode *file, int code, void *arg)
 
int AuCreateRawSocket (int type, int protocol)
 
int AuCreateSocket (int domain, int type, int protocol)
 
void AuSocketInstall ()
 
list_tAuRawSocketGetList ()
 

Variables

list_traw_socket_list
 

Macro Definition Documentation

◆ SO_BINDTODEVICE

#define SO_BINDTODEVICE   3

◆ SO_KEEPALIVE

#define SO_KEEPALIVE   1

◆ SO_REUSEADDR

#define SO_REUSEADDR   2

◆ SOL_SOCKET

#define SOL_SOCKET   0

Typedef Documentation

◆ AuDNSEntry

typedef struct _dns_entry_ AuDNSEntry

Function Documentation

◆ AuCreateRawSocket()

int AuCreateRawSocket ( int  type,
int  protocol 
)

◆ AuCreateSocket()

int AuCreateSocket ( int  domain,
int  type,
int  protocol 
)

◆ AuNetCreateSocket()

AuSocket * AuNetCreateSocket ( )

◆ AuRawSocketClose()

int AuRawSocketClose ( AuVFSNode fs,
AuVFSNode file 
)

◆ AuRawSocketGetList()

list_t * AuRawSocketGetList ( )

◆ AuRawSocketReceive()

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

◆ AuRawSocketSend()

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

◆ AuSocketAdd()

void AuSocketAdd ( AuSocket sock,
void *  data,
size_t  sz 
)

◆ AuSocketGet()

void * AuSocketGet ( AuSocket sock)

◆ AuSocketInstall()

void AuSocketInstall ( )

◆ AuSocketSetOpt()

int AuSocketSetOpt ( int  sockfd,
int  level,
int  optname,
const void *  optval,
socklen_t  optlen 
)

◆ AuSocketSOSocket()

int AuSocketSOSocket ( AuSocket sock,
int  optname,
const void *  optval,
socklen_t  optlen 
)

◆ SocketIOControl()

int SocketIOControl ( AuVFSNode file,
int  code,
void *  arg 
)

Variable Documentation

◆ raw_socket_list

list_t* raw_socket_list

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.