struct csap_instance

Overview

CSAP instance support resources and attributes. More…

#include <tad_csap_inst.h>

struct csap_instance {
    // fields

    unsigned int id;
    unsigned int ref;
    char* csap_type;
    asn_value* nds;
    unsigned int depth;
    csap_layer_t* layers;
    unsigned int rw_layer;
    void* rw_data;
    unsigned int stop_latency_timeout;
    unsigned int recv_timeout;
    struct timeval wait_for;
    struct timeval first_pkt;
    struct timeval last_pkt;
    pthread_cond_t event;
    unsigned int state;
    pthread_mutex_t lock;
    tad_send_context sender;
    tad_recv_context receiver;
    unsigned int poll_id;

    // methods

    TAILQ_HEAD(tad_recv_op_context);
    LIST_HEAD(tad_poll_context);
};

Detailed Documentation

CSAP instance support resources and attributes.

Fields

unsigned int id

CSAP ID

unsigned int ref

CSAP reference count (have to be >0)

char* csap_type

Pointer to original CSAP type, proto[] entries are blocks of this string

asn_value* nds

ASN.1 value with CSAP specification

unsigned int depth

Number of layers in stack

csap_layer_t* layers

Array of protocol layer descroptors

unsigned int rw_layer

Index of layer in protocol stack responsible for read and write operations, usually lower

void* rw_data

Private data of read/write layer

unsigned int stop_latency_timeout

Maximum timeout for read operations in microseconds (it affects latency of stop/destroy operations)

unsigned int recv_timeout

Default receive timeout

struct timeval wait_for

Zero or moment of timeout current CSAP operation

struct timeval first_pkt

Moment of first good packet processed: matched or sent

struct timeval last_pkt

Moment of last good packet processed: matched or sent

pthread_cond_t event

Event condition

unsigned int state

Current state bitmask

pthread_mutex_t lock

Mutex for lock CSAP data which are changed from different threads (event, state, queue of received packets)

tad_send_context sender

Sender context

tad_recv_context receiver

Receiver context

unsigned int poll_id

ID of the last poll request

Methods

TAILQ_HEAD(tad_recv_op_context)

Receiver operations queue

LIST_HEAD(tad_poll_context)

List of poll requests