UniSaSA
1.0
C Gateway
|
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "unisasa_types.h"
#include "connector.h"
#include "configuration.h"
Go to the source code of this file.
Data Structures | |
union | messageInt_t |
Typedefs | |
typedef union messageInt_t | messageInt_t |
Functions | |
void | init_gateway () |
void | load_table (char *path) |
device_t * | getDevices () |
unsigned int | getNumDevices () |
void | addConnector (connectorInterface_t newConnector) |
void | discoveryAndCreateTable () |
void | verifyDevices () |
void | verifyTable () |
void | createNewTable () |
void | create_tcp_server (unsigned int port) |
void | close_gateway () |
int | wait_client () |
void | client_communication (int client_sock) |
Gateway Implementation.
This gateway reads a request from a TCP socket, forwards it to a different network and sends the answer to the requestor.
Definition in file gateway.h.
typedef union messageInt_t messageInt_t |
Union to convert int/bytes.
Internal use only.
void addConnector | ( | connectorInterface_t | newConnector | ) |
Add a new connector.
connector | a connectorInterface_t implementation. |
void client_communication | ( | int | client_sock | ) |
void create_tcp_server | ( | unsigned int | port | ) |
void createNewTable | ( | ) |
void discoveryAndCreateTable | ( | ) |
unsigned int getNumDevices | ( | ) |
void init_gateway | ( | ) |
void load_table | ( | char * | path | ) |
void verifyDevices | ( | ) |