ICP  1
Classes | Macros | Functions | Variables
isisds_command.c File Reference
#include <stdio.h>
#include "isisds_command.h"
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <unistd.h>

Go to the source code of this file.

Classes

struct  isisds_open_t
 
struct  isisds_command_header_t
 

Macros

#define ISISDS_MAJOR_VER   1
 
#define ISISDS_MINOR_VER   1
 
#define closesocket   close
 

Functions

static int recv_all (SOCKET s, char *buffer, int len, int flags)
 
static void clear_replies (SOCKET s)
 
SOCKET isisds_send_open (const char *host, ISISDSAccessMode access_type)
 
int isisds_recv_open (SOCKET s, ISISDSAccessMode *access_type)
 
int isisds_send_command (SOCKET s, const char *command, const void *data, ISISDSDataType type, const int dims_array[], int ndims)
 
static int isisds_recv_command_helper (SOCKET s, char **command, void **data, ISISDSDataType *type, int dims_array[], int *ndims, int do_alloc)
 
int isisds_recv_command (SOCKET s, char *command, int *len_command, void *data, ISISDSDataType *type, int dims_array[], int *ndims)
 
int isisds_recv_command_alloc (SOCKET s, char **command, void **data, ISISDSDataType *type, int dims_array[], int *ndims)
 
int isisds_send_close (SOCKET s)
 
static void default_status_reporter (int status, int code, const char *message)
 
int isisds_report (int status, int code, const char *format,...)
 
int isisds_set_report_func (isisds_error_report_t report_func)
 

Variables

static isisds_error_report_t status_reporter = default_status_reporter
 

Macro Definition Documentation

#define closesocket   close
#define ISISDS_MAJOR_VER   1

Definition at line 7 of file isisds_command.c.

Referenced by isisds_recv_open(), and isisds_send_open().

#define ISISDS_MINOR_VER   1

Definition at line 8 of file isisds_command.c.

Referenced by isisds_recv_open(), and isisds_send_open().

Function Documentation

static void clear_replies ( SOCKET  s)
static

Definition at line 68 of file isisds_command.c.

Referenced by isisds_send_command().

static void default_status_reporter ( int  status,
int  code,
const char *  message 
)
static

Definition at line 349 of file isisds_command.c.

int isisds_recv_command ( SOCKET  s,
char *  command,
int *  len_command,
void *  data,
ISISDSDataType type,
int  dims_array[],
int *  ndims 
)

Definition at line 292 of file isisds_command.c.

References isisds_recv_command_helper().

int isisds_recv_command_alloc ( SOCKET  s,
char **  command,
void **  data,
ISISDSDataType type,
int  dims_array[],
int *  ndims 
)

Definition at line 322 of file isisds_command.c.

References isisds_recv_command_helper(), and ISISDSUnknown.

Referenced by isisds_send_open(), and ISISDSRequest::run().

static int isisds_recv_command_helper ( SOCKET  s,
char **  command,
void **  data,
ISISDSDataType type,
int  dims_array[],
int *  ndims,
int  do_alloc 
)
static
int isisds_recv_open ( SOCKET  s,
ISISDSAccessMode access_type 
)
int isisds_report ( int  status,
int  code,
const char *  format,
  ... 
)

Definition at line 356 of file isisds_command.c.

Referenced by isisds_recv_command_helper().

int isisds_send_close ( SOCKET  s)

Definition at line 340 of file isisds_command.c.

References closesocket.

int isisds_send_command ( SOCKET  s,
const char *  command,
const void *  data,
ISISDSDataType  type,
const int  dims_array[],
int  ndims 
)
SOCKET isisds_send_open ( const char *  host,
ISISDSAccessMode  access_type 
)
int isisds_set_report_func ( isisds_error_report_t  report_func)

Definition at line 368 of file isisds_command.c.

References status_reporter.

static int recv_all ( SOCKET  s,
char *  buffer,
int  len,
int  flags 
)
static

Definition at line 49 of file isisds_command.c.

Referenced by isisds_recv_command_helper(), and isisds_recv_open().

Variable Documentation

Definition at line 354 of file isisds_command.c.

Referenced by isisds_set_report_func().