ATM

Overview

Declarations of API for TAPI ATM. More…

// global functions

te_errno tapi_atm_add_csap_layer(asn_value** csap_spec, const char* device, ndn_atm_type type, const uint16_t* vpi, const uint16_t* vci, te_bool* congestion, te_bool* clp);
te_errno tapi_atm_aal5_add_csap_layer(asn_value** csap_spec, const uint8_t* cpcs_uu, const uint8_t* cpi);
te_errno tapi_atm_add_pdu(asn_value** tmpl_or_ptrn, te_bool is_pattern, const uint8_t* gfc, const uint16_t* vpi, const uint16_t* vci, const uint8_t* payload_type, te_bool* clp);
te_errno tapi_atm_add_payload(asn_value* container, size_t pld_len, const uint8_t* pld);
te_errno tapi_atm_aal5_add_pdu(asn_value** tmpl_or_ptrn, te_bool is_pattern, const uint8_t* cpcs_uu, const uint8_t* cpi);

Detailed Documentation

Declarations of API for TAPI ATM.

Copyright (C) 2004-2022 OKTET Labs Ltd. All rights reserved.

Global Functions

te_errno tapi_atm_add_csap_layer(asn_value** csap_spec, const char* device, ndn_atm_type type, const uint16_t* vpi, const uint16_t* vci, te_bool* congestion, te_bool* clp)

Add ATM layer in CSAP specification.

Parameters:

csap_spec

Location of CSAP specification pointer.

device

Interface name on TA host or NULL (have to be not-NULL, if it is the bottom layer)

type

ATM cell header format.

vpi

Pointer to Virtual Path Identifier or NULL. If NULL, it have to be specified in traffic templates and match any, if it is not specified in traffic pattern.

vci

Pointer to Virtual Channel Identifier or NULL. If NULL, it have to be specified in traffic templates and match any, if it is not specified in traffic pattern.

congestion

Pointer to congestion bit value or NULL. If NULL, default value on transmit is 0 and match any on receive.

clp

Pointer to Cell Loss Priority bit value or NULL. If NULL, default value on transmit is 0 and match any on receive.

Status

code.

te_errno tapi_atm_aal5_add_csap_layer(asn_value** csap_spec, const uint8_t* cpcs_uu, const uint8_t* cpi)

Add AAL5 layer in CSAP specification.

Parameters:

csap_spec

Location of CSAP specification pointer.

cpcs_uu

Pointer to CPCS User-to-User indication or NULL. If NULL, default value on transmit is 0 and match any on receive.

cpi

Pointer to Common Part Indicator or NULL. If NULL, default value on transmit is 0 and match any on receive.

Status

code.

te_errno tapi_atm_add_pdu(asn_value** tmpl_or_ptrn, te_bool is_pattern, const uint8_t* gfc, const uint16_t* vpi, const uint16_t* vci, const uint8_t* payload_type, te_bool* clp)

Add ATM PDU as the last PDU to the last unit of the traffic template or pattern.

Parameters:

tmpl_or_ptrn

Location of ASN.1 value with traffic template or pattern

is_pattern

Is the first argument template or pattern

gfc

Pointer to GFC field value or NULL, if unspecified (default value is 0)

vpi

Pointer to VPI or NULL (default value have to be specified during CSAP creation)

vci

Pointer to VCI or NULL (default value have to be specified during CSAP creation)

payload_type

Pointer to payload type or NULL (default value is zero or’ed with congestion bit specified during CSAP creation)

clp

Pointer to CLP or NULL (default value is specified during CSAP creation or 0)

Returns:

Status code.

te_errno tapi_atm_add_payload(asn_value* container, size_t pld_len, const uint8_t* pld)

Add ATM cell payload to traffic template or pattern unit.

Parameters:

container

Container to add payload

pld_len

Length of user payload (should be not greater than 48, if less, the rest is padded by zeros)

pld

Payload

Returns:

Status code.

te_errno tapi_atm_aal5_add_pdu(asn_value** tmpl_or_ptrn, te_bool is_pattern, const uint8_t* cpcs_uu, const uint8_t* cpi)

Add AAL5 PDU as the last PDU to the last unit of the traffic template or pattern.

Parameters:

tmpl_or_ptrn

Location of ASN.1 value with traffic template or pattern

is_pattern

Is the first argument template or pattern

cpcs_uu

Pointer to CPCS User-to-User indication or NULL. If NULL, default value is specified during CSAP creation or 0 on transmit/match any on receive.

cpi

Pointer to Common Part Indicator or NULL. If NULL, default value is specified during CSAP creation or 0 on transmit/match any on receive.

Returns:

Status code.