Changeset View
Changeset View
Standalone View
Standalone View
sbin/ggate/shared/ggate.h
Show All 28 Lines | |||||
#ifndef _GGATE_H_ | #ifndef _GGATE_H_ | ||||
#define _GGATE_H_ | #define _GGATE_H_ | ||||
#include <sys/endian.h> | #include <sys/endian.h> | ||||
#include <stdarg.h> | #include <stdarg.h> | ||||
#define G_GATE_PORT 3080 | #define G_GATE_PORT 3080 | ||||
#define G_GATE_RCVBUF 131072 | |||||
#define G_GATE_SNDBUF 131072 | |||||
#define G_GATE_QUEUE_SIZE 1024 | #define G_GATE_QUEUE_SIZE 1024 | ||||
#define G_GATE_TIMEOUT 0 | #define G_GATE_TIMEOUT 0 | ||||
#define GGATE_MAGIC "GEOM_GATE " | #define GGATE_MAGIC "GEOM_GATE " | ||||
#define GGATE_VERSION 0 | #define GGATE_VERSION 0 | ||||
#define GGATE_FLAG_RDONLY 0x0001 | #define GGATE_FLAG_RDONLY 0x0001 | ||||
#define GGATE_FLAG_WRONLY 0x0002 | #define GGATE_FLAG_WRONLY 0x0002 | ||||
/* | /* | ||||
* If GGATE_FLAG_SEND not GGATE_FLAG_RECV flag is set, this is initial | * If GGATE_FLAG_SEND not GGATE_FLAG_RECV flag is set, this is initial | ||||
* connection. | * connection. | ||||
* If GGATE_FLAG_SEND flag is set - this is socket to send data. | * If GGATE_FLAG_SEND flag is set - this is socket to send data. | ||||
* If GGATE_FLAG_RECV flag is set - this is socket to receive data. | * If GGATE_FLAG_RECV flag is set - this is socket to receive data. | ||||
*/ | */ | ||||
#define GGATE_FLAG_SEND 0x0004 | #define GGATE_FLAG_SEND 0x0004 | ||||
#define GGATE_FLAG_RECV 0x0008 | #define GGATE_FLAG_RECV 0x0008 | ||||
#define GGATE_CMD_READ 0 | #define GGATE_CMD_READ 0 | ||||
#define GGATE_CMD_WRITE 1 | #define GGATE_CMD_WRITE 1 | ||||
extern int g_gate_devfd; | extern int g_gate_devfd; | ||||
extern int g_gate_verbose; | extern int g_gate_verbose; | ||||
extern int niothreads; | |||||
extern int nagle; | extern int nagle; | ||||
extern unsigned rcvbuf, sndbuf; | extern unsigned rcvbuf, sndbuf; | ||||
struct g_gate_version { | struct g_gate_version { | ||||
char gv_magic[16]; | char gv_magic[16]; | ||||
uint16_t gv_version; | uint16_t gv_version; | ||||
uint16_t gv_error; | uint16_t gv_error; | ||||
} __packed; | } __packed; | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |