#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, unsigned long type) |
Variables | |
int | errno |
|
|
|
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. |
|
network_address: returns the ip address of the hostname# |
|
network_init: initiates the networking layer by creating socket and bind it to port# |
|
network_send: host, data, size Sends a message to host, updating the measurement info. |
|
|