network.c File Reference

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/select.h>
#include <netdb.h>
#include <pthread.h>
#include "network.h"
#include "host.h"
#include "message.h"
#include "log.h"
#include "semaphore.h"
#include "jrb.h"
#include "jval.h"
#include "dtime.h"

Classes

struct  NetworkGlobal

Defines

#define SEND_SIZE   NETWORK_PACK_SIZE

Functions

unsigned long network_address (void *networkglobal, char *hostname)
void * network_init (void *logs, int port)
void * network_activate (void *state)
int network_send (void *state, ChimeraHost *host, char *data, int size)

Variables

int errno

Define Documentation

#define SEND_SIZE   NETWORK_PACK_SIZE
 


Function Documentation

void* network_activate void *  state  ) 
 

network_activate: NEVER RETURNS. Puts the network layer into listen mode. This thread manages acknowledgements, delivers incomming messages to the message handler, and drives the network layer. It should only be called once.

unsigned long network_address void *  networkglobal,
char *  hostname
 

network_address: returns the ip address of the hostname#

void* network_init void *  logs,
int  port
 

network_init: initiates the networking layer by creating socket and bind it to port#

int network_send void *  state,
ChimeraHost host,
char *  data,
int  size
 

network_send: host, data, size Sends a message to host, updating the measurement info.


Variable Documentation

int errno
 


Generated on Sat Nov 12 16:43:14 2005 for Chimera by  doxygen 1.4.5