Orxonox  0.0.5 Codename: Arcturus
Macros | Typedefs | Functions | Variables
unix.c File Reference

ENet Unix system specific functions. More...

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <time.h>
#include "enet/enet.h"

Macros

#define ENET_BUILDING_LIB   1
 
#define MSG_NOSIGNAL   0
 

Typedefs

typedef int socklen_t
 

Functions

int enet_address_get_host (const ENetAddress *address, char *name, size_t nameLength)
 Attempts to do a reverse lookup of the host field in the address parameter. More...
 
int enet_address_get_host_ip (const ENetAddress *address, char *name, size_t nameLength)
 Gives the printable form of the ip address specified in the address parameter. More...
 
static int enet_address_get_host_x (const ENetAddress *address, char *name, size_t nameLength, int flags)
 
static ENetAddressFamily enet_address_set_address (ENetAddress *address, const struct sockaddr *sin)
 
int enet_address_set_host (ENetAddress *address, const char *name)
 Attempts to resolve the host named by the parameter hostName and sets the host field in the address parameter if successful. More...
 
static int enet_address_set_sin (struct sockaddr *sin, const ENetAddress *address, ENetAddressFamily family)
 
static enet_uint16 enet_af (ENetAddressFamily family)
 
void enet_deinitialize (void)
 Shuts down ENet globally. More...
 
int enet_initialize (void)
 Initializes ENet globally. More...
 
static socklen_t enet_sa_size (ENetAddressFamily family)
 
ENetSocket enet_socket_accept (ENetSocket socket, ENetAddress *address, ENetAddressFamily family)
 
int enet_socket_bind (ENetSocket socket, const ENetAddress *address, ENetAddressFamily family)
 
int enet_socket_connect (ENetSocket socket, const ENetAddress *address, ENetAddressFamily family)
 
ENetSocket enet_socket_create (ENetSocketType type, ENetAddressFamily family)
 
void enet_socket_destroy (ENetSocket socket)
 
int enet_socket_listen (ENetSocket socket, int backlog)
 
int enet_socket_receive (ENetSocket socket, ENetAddress *address, ENetBuffer *buffers, size_t bufferCount, ENetAddressFamily family)
 
int enet_socket_send (ENetSocket socket, const ENetAddress *address, const ENetBuffer *buffers, size_t bufferCount, ENetAddressFamily family)
 
int enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value)
 
int enet_socket_wait (ENetSocket socket4, ENetSocket socket6, enet_uint32 *condition, enet_uint32 timeout)
 
int enet_socketset_select (ENetSocket maxSocket, ENetSocketSet *readSet, ENetSocketSet *writeSet, enet_uint32 timeout)
 
enet_uint32 enet_time_get (void)
 Returns the wall-time in milliseconds. More...
 
void enet_time_set (enet_uint32 newTimeBase)
 Sets the current wall-time in milliseconds. More...
 

Variables

static enet_uint32 timeBase = 0
 

Detailed Description

ENet Unix system specific functions.

Macro Definition Documentation

#define ENET_BUILDING_LIB   1
#define MSG_NOSIGNAL   0

Typedef Documentation

typedef int socklen_t

Function Documentation

static int enet_address_get_host_x ( const ENetAddress address,
char *  name,
size_t  nameLength,
int  flags 
)
static
static ENetAddressFamily enet_address_set_address ( ENetAddress address,
const struct sockaddr *  sin 
)
static
static int enet_address_set_sin ( struct sockaddr *  sin,
const ENetAddress address,
ENetAddressFamily  family 
)
static
static enet_uint16 enet_af ( ENetAddressFamily  family)
static
static socklen_t enet_sa_size ( ENetAddressFamily  family)
static
enet_uint32 enet_time_get ( void  )

Returns the wall-time in milliseconds.

Its initial value is unspecified unless otherwise set.

void enet_time_set ( enet_uint32  newTimeBase)

Sets the current wall-time in milliseconds.

Variable Documentation

enet_uint32 timeBase = 0
static