Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

socket.h File Reference

Socket Operations and packet manipulations. More...

#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

Go to the source code of this file.

Data Structures

struct  socket_data
 Socket data. More...

Defines

#define RFIFOP(fd, pos)   (session[fd]->rdata + session[fd]->rdata_pos + (pos))
#define RFIFOB(fd, pos)
#define RFIFOW(fd, pos)
#define RFIFOL(fd, pos)
#define RFIFOSKIP(fd, len)   (session[fd]->rdata_pos += (len))
#define RFIFOREST(fd)   (session[fd]->rdata_size - session[fd]->rdata_pos)
#define RFIFOFLUSH(fd)
#define RFIFOSPACE(fd)   (session[fd]->max_rdata - session[fd]->rdata_size)
#define RBUFP(p, pos)   (((unsigned char*)(p)) + (pos))
#define RBUFB(p, pos)   (*(unsigned char*)((p) + (pos)))
#define RBUFW(p, pos)   (*(unsigned short*)((p) + (pos)))
#define RBUFL(p, pos)   (*(unsigned int*)((p) + (pos)))
#define WFIFOSPACE(fd)   (session[fd]->max_wdata - session[fd]->wdata_size)
#define WPACKETP(pos)   (WPACKETBUF + (pos))
 Gets a pointer from the packet buffer.
#define WPACKETB(pos)   (*(unsigned char*)(WPACKETBUF + (pos)))
 Gets an unsigned char from the packet buffer.
#define WPACKETW(pos)   (*(unsigned short*)(WPACKETBUF + (pos)))
 Gets an unsigned short from packet buffer.
#define WPACKETL(pos)   (*(unsigned int*)(WPACKETBUF + (pos)))
 Gets an unsigned int from packet buffer.
#define WBUFP(p, pos)   (((unsigned char*)(p)) + (pos))
#define WBUFB(p, pos)   (*(unsigned char*)((p) + (pos)))
#define WBUFW(p, pos)   (*(unsigned short*)((p) + (pos)))
#define WBUFL(p, pos)   (*(unsigned int*)((p) + (pos)))

Functions

int make_listen_port (int)
int make_connection (long, int)
int delete_session (int)
int realloc_fifo (int fd, int rfifo_size, int wfifo_size)
void SENDPACKET (const int fd, const int len)
void flush_fifos (void)
int do_sendrecv (int next)
int do_parsepacket (void)
void do_socket (void)
int start_console (int(*parse_console_func)(char *))
void set_defaultparse (int(*defaultparse)(int))
int Net_Init (void)

Variables

char WPACKETBUF [65536]
 The Packet buffer.
socket_datasession [FD_SETSIZE]
int fd_max
char listen_ip [16]
unsigned int addr_ [16]
unsigned int naddr_


Detailed Description

Socket Operations and packet manipulations.


Generated on Fri Apr 28 10:20:05 2006 for OpenAthena by  doxygen 1.4.4