#include "vsl_api.h"
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | phead_t |
VSL packet header. More... | |
Defines | |
#define | CHECK_MAGIC(X) ((X)[0] == 'V' && (X)[1] == 'S' && (X)[2] == 'L' && (X)[3] == '1') |
Check a VSL packet header prefix. | |
#define | CONSTAT(X) (X >> 5) << 5 |
Get precise status. | |
#define | CONWAIT(X) (X & 0x1F) |
Get pending event. | |
#define | FILL_MAGIC(X) do { (X)[0] = 'V'; (X)[1] = 'S'; (X)[2] = 'L'; (X)[3] = '1'; } while(0) |
Fill a VSL packet header prefix. | |
#define | KEY_STR |
To print VSL Keys in hex. | |
#define | KEY_VEC(K) |
To print VSL Keys in hex. | |
#define | LOG() |
Log message. | |
#define | LOGFAIL(ERR,) |
Log failure and return from function, preserving errno. | |
#define | LOGFATAL() |
Internal error in library code, log and abort. | |
#define | P_DATA 0x00 |
VSL data packet. | |
#define | P_MAGIC_SIZE 4 |
Length of the magic VSL packet header prefix. | |
#define | PHEAD_SIZE |
Size of the packet header without aligning. | |
#define | TRY(S) do { int ret; if ( (ret = (S)) != 0 ) return ret; } while (false) |
Call function, escalate a nonzero return value. | |
Enumerations | |
enum | connstat_t { C_WAIT_FD_R = 1, C_WAIT_FD_W = 2, C_WAIT_VFD_R = 4, C_WAIT_VFD_W = 8, C_WAIT_PID = 16, C_INITIALIZED = (1 << 5), C_ESTABLISHED = (2 << 5), C_SSH_FORKED = (3 << 5), C_SSH_WROTE_SEC = (4 << 5), C_SSH_VF_CON = (5 << 5) } |
VSL Connection Status. More... |
Definition in file vsl.h.
#define CHECK_MAGIC | ( | X | ) | ((X)[0] == 'V' && (X)[1] == 'S' && (X)[2] == 'L' && (X)[3] == '1') |
#define FILL_MAGIC | ( | X | ) | do { (X)[0] = 'V'; (X)[1] = 'S'; (X)[2] = 'L'; (X)[3] = '1'; } while(0) |
#define KEY_STR |
#define KEY_VEC | ( | K | ) |
#define LOG | ( | ) |
#define LOGFAIL | ( | ERR | ) |
#define LOGFATAL | ( | ) |
#define P_MAGIC_SIZE 4 |
#define PHEAD_SIZE |
Value:
(sizeof(uint64_t)+\ VSL_MACLEN+\ P_MAGIC_SIZE+\ sizeof(char)+\ sizeof(uint32_t))
#define TRY | ( | S | ) | do { int ret; if ( (ret = (S)) != 0 ) return ret; } while (false) |
enum connstat_t |