ARPDAS_QNX6 1.0
Classes | Typedefs | Functions | Variables
cis.c File Reference
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <unistd.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include "cis.h"
#include "tm.h"
#include "nortlib.h"
#include "nl_assert.h"
Include dependency graph for cis.c:

Go to the source code of this file.

Classes

struct  rdrs_s

Typedefs

typedef struct rdrs_s rdrs_t

Functions

static int io_read (resmgr_context_t *ctp, io_read_t *msg, RESMGR_OCB_T *ocb)
static int io_write (resmgr_context_t *ctp, io_write_t *msg, RESMGR_OCB_T *ocb)
static int io_notify (resmgr_context_t *ctp, io_notify_t *msg, RESMGR_OCB_T *ocb)
static int io_close_ocb (resmgr_context_t *ctp, void *rsvd, RESMGR_OCB_T *ocb)
static command_out_tnew_command (void)
static command_out_tfree_command (command_out_t *cmd)
static struct ocbocb_calloc (resmgr_context_t *ctp, IOFUNC_ATTR_T *device)
static void ocb_free (struct ocb *ocb)
IOFUNC_ATTR_T * cis_setup_rdr (char *node)
static void cis_shutdown_rdr (rdrs_t **p)
static int all_closed (void)
static void process_quit (void)
void ci_server (void)
static void read_reply (RESMGR_OCB_T *ocb)
void cis_turf (IOFUNC_ATTR_T *handle, char *format,...)

Variables

static resmgr_connect_funcs_t connect_funcs
static resmgr_io_funcs_t rd_io_funcs
static resmgr_io_funcs_t wr_io_funcs
static IOFUNC_ATTR_T wr_attr
static int wr_id
static resmgr_attr_t resmgr_attr
static dispatch_t * dpp
static IOFUNC_ATTR_T * rd_attrs
static iofunc_funcs_t ocb_funcs
static iofunc_mount_t mountpoint = { 0, 0, 0, 0, &ocb_funcs }
static rdrs_trdrs
static int quit_received = 0
static command_out_tfree_commands

Typedef Documentation

typedef struct rdrs_s rdrs_t

Function Documentation

static int all_closed ( void  ) [static]

Definition at line 144 of file cis.c.

References assert, cis_shutdown_rdr(), IOFUNC_ATTR_T, rdrs_s::next, rdrs_s::rdr, rdrs, and wr_attr.

Referenced by ci_server(), and process_quit().

Here is the call graph for this function:

Here is the caller graph for this function:

void ci_server ( void  )

Definition at line 176 of file cis.c.

IOFUNC_ATTR_T* cis_setup_rdr ( char *  node)

Definition at line 83 of file cis.c.

References ioattr_s::attr, connect_funcs, dpp, ioattr_s::first_cmd, rdrs_s::id, ioattr_s::last_cmd, mountpoint, new_command(), new_memory(), rdrs_s::next, ioattr_s::next, nl_error, nl_strdup, ioattr_s::nodename, ioattr_s::notify, rd_attrs, rd_io_funcs, rdrs_s::rdr, rdrs, resmgr_attr, and tm_dev_name().

Referenced by cmdif_rd::Setup().

Here is the call graph for this function:

Here is the caller graph for this function:

static void cis_shutdown_rdr ( rdrs_t **  p) [static]

Definition at line 124 of file cis.c.

References assert, attr, dpp, rdrs_s::id, IOFUNC_ATTR_T, rdrs_s::next, nl_error, nl_free_memory(), and rdrs_s::rdr.

Referenced by all_closed().

Here is the call graph for this function:

Here is the caller graph for this function:

void cis_turf ( IOFUNC_ATTR_T *  handle,
char *  format,
  ... 
)

Definition at line 491 of file cis.c.

References assert, CMD_MAX_COMMAND_OUT, command_out_s::cmdlen, command_out_s::command, IOFUNC_OCB_T, new_command(), command_out_s::next, ocb::next_ocb, nl_error, and read_reply().

Referenced by process_quit().

Here is the call graph for this function:

Here is the caller graph for this function:

static command_out_t * free_command ( command_out_t cmd) [static]

Definition at line 481 of file cis.c.

References assert, free_commands, command_out_s::next, and command_out_s::ref_count.

Referenced by read_reply().

Here is the caller graph for this function:

static int io_close_ocb ( resmgr_context_t *  ctp,
void *  rsvd,
RESMGR_OCB_T *  ocb 
) [static]

Definition at line 401 of file cis.c.

References IOFUNC_ATTR_T.

Referenced by ci_server().

Here is the caller graph for this function:

static int io_notify ( resmgr_context_t *  ctp,
io_notify_t *  msg,
RESMGR_OCB_T *  ocb 
) [static]

Definition at line 392 of file cis.c.

References IOFUNC_ATTR_T.

Referenced by ci_server().

Here is the caller graph for this function:

static int io_read ( resmgr_context_t *  ctp,
io_read_t *  msg,
RESMGR_OCB_T *  ocb 
) [static]

Definition at line 433 of file cis.c.

References IOFUNC_ATTR_T, and read_reply().

Referenced by ci_server().

Here is the call graph for this function:

Here is the caller graph for this function:

static int io_write ( resmgr_context_t *  ctp,
io_write_t *  msg,
RESMGR_OCB_T *  ocb 
) [static]

Definition at line 281 of file cis.c.

References ci_version, cmd_batch(), cmd_init(), CMD_MAX_COMMAND_IN, CMDREP_SYNERR, CMDREP_TYPE, nl_error, nl_response, and process_quit().

Referenced by ci_server().

Here is the call graph for this function:

Here is the caller graph for this function:

static command_out_t * new_command ( void  ) [static]

Definition at line 463 of file cis.c.

References command_out_s::cmdlen, command_out_s::command, free_commands, new_memory(), command_out_s::next, and command_out_s::ref_count.

Referenced by cis_setup_rdr(), and cis_turf().

Here is the call graph for this function:

Here is the caller graph for this function:

static struct ocb* ocb_calloc ( resmgr_context_t *  ctp,
IOFUNC_ATTR_T *  device 
) [static, read]

Definition at line 41 of file cis.c.

References ocb::next_command.

static void ocb_free ( struct ocb ocb) [static]

Definition at line 52 of file cis.c.

References assert, ocb::next_command, ocb::next_ocb, ocb::rcvid, and command_out_s::ref_count.

static void process_quit ( void  ) [static]

Definition at line 161 of file cis.c.

References all_closed(), cis_interfaces_close(), cis_turf(), dpp, rdrs_s::next, nl_error, quit_received, rdrs_s::rdr, and wr_id.

Referenced by io_write().

Here is the call graph for this function:

Here is the caller graph for this function:

static void read_reply ( RESMGR_OCB_T *  ocb) [static]

Definition at line 407 of file cis.c.

References assert, command_out_s::cmdlen, command_out_s::command, free_command(), IOFUNC_ATTR_T, command_out_s::next, and command_out_s::ref_count.

Referenced by cis_turf(), and io_read().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

resmgr_connect_funcs_t connect_funcs [static]

Definition at line 23 of file cis.c.

Referenced by ci_server(), and cis_setup_rdr().

dispatch_t* dpp [static]

Definition at line 461 of file cis.c.

Referenced by free_command(), and new_command().

iofunc_mount_t mountpoint = { 0, 0, 0, 0, &ocb_funcs } [static]

Definition at line 72 of file cis.c.

Referenced by ci_server(), and cis_setup_rdr().

iofunc_funcs_t ocb_funcs [static]
Initial value:
 { 
    _IOFUNC_NFUNCS,
    ocb_calloc,
    ocb_free
}

Definition at line 65 of file cis.c.

int quit_received = 0 [static]

Definition at line 142 of file cis.c.

Referenced by ci_server(), and process_quit().

IOFUNC_ATTR_T* rd_attrs [static]

Definition at line 29 of file cis.c.

Referenced by cis_setup_rdr().

resmgr_io_funcs_t rd_io_funcs [static]

Definition at line 24 of file cis.c.

Referenced by ci_server(), and cis_setup_rdr().

rdrs_t* rdrs [static]

Definition at line 80 of file cis.c.

Referenced by all_closed(), and cis_setup_rdr().

resmgr_attr_t resmgr_attr [static]

Definition at line 27 of file cis.c.

Referenced by DG_cmd::attach(), ci_server(), cis_setup_rdr(), DG_data::DG_data(), and main().

IOFUNC_ATTR_T wr_attr [static]

Definition at line 25 of file cis.c.

Referenced by all_closed(), ci_server(), DG_data_io_close_ocb(), and DG_data_io_notify().

int wr_id [static]

Definition at line 26 of file cis.c.

Referenced by ci_server(), and process_quit().

resmgr_io_funcs_t wr_io_funcs

Definition at line 24 of file cis.c.

Referenced by ci_server(), and main().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines