Packet flow processing

Overview

Packet flow processing API. More…

// typedefs

typedef struct tapi_flow_ep tapi_flow_ep;
typedef struct tapi_flow_traffic tapi_flow_traffic;
typedef struct tapi_flow_s tapi_flow_t;

// structs

struct tapi_flow_ep;
struct tapi_flow_s;
struct tapi_flow_traffic;

// global functions

char* tapi_flow_preprocess_links(const char* param);
char* tapi_flow_preprocess_quotes(const char* param);
char** tapi_flow_preprocess_args(int argc, char** argv);
te_errno tapi_flow_conf_get(int argc, char** argv, te_bool do_preprocess, tapi_flow_t* flow);
tapi_flow_ep* tapi_flow_find_ep(tapi_flow_t* flow, const char* name);
tapi_flow_traffic* tapi_flow_find_traffic(tapi_flow_t* flow, const char* name);
te_errno tapi_flow_prepare_endpoints(tapi_flow_t* flow);
te_errno tapi_flow_prepare_traffic(tapi_flow_t* flow);
te_errno tapi_flow_csap_spec_to_stack(asn_value* spec, char** stack);
te_errno tapi_flow_gen_base_ptrn(asn_value* rcv_ptrn, asn_value** base_ptrn_p);
te_errno tapi_flow_setup_endpoints(tapi_flow_t* flow);
te_errno tapi_flow_prepare(int argc, char** argv, te_bool do_preprocess, tapi_flow_t* flow);
void tapi_flow_init(tapi_flow_t* flow);
void tapi_flow_fini(tapi_flow_t* flow);
te_errno tapi_flow_start(tapi_flow_t* flow, char* name);
te_errno tapi_flow_stop(tapi_flow_t* flow, char* name, int* rcv_num_p, int* rcv_base_num_p);
te_errno tapi_flow_check(tapi_flow_t* flow, char* name, int* rcv_num_p, int* rcv_base_num_p);
te_errno tapi_flow_check_sequence(tapi_flow_t* flow, ...);
te_errno tapi_flow_check_all(tapi_flow_t* flow, const char* traffic_prefix);

// macros

#define TAPI_FLOW_RECV_COUNT_MAX
#define TAPI_FLOW_RECV_TIMEOUT
#define TEST_GET_FLOW_CONFIG(_flow, _do_preprocess)

Detailed Documentation

Packet flow processing API.

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

Typedefs

typedef struct tapi_flow_s tapi_flow_t

General Flow structure List of endpoints and traffic entries

Global Functions

char* tapi_flow_preprocess_links(const char* param)

Preprocess parameter value and resolve all configurator links within.

Parameters:

param

Textual parameter value to preprocess

Returns:

Preprocessed value on success or NULL on any error

char* tapi_flow_preprocess_quotes(const char* param)

Preprocess parameter value and substitute quoted values. Quoted notation is used to increase readability Also dereference configurator links if quotting means configurator link reduction.

Parameters:

param

Textual parameter value to preprocess

Returns:

Preprocessed value on success or NULL on any error

char** tapi_flow_preprocess_args(int argc, char** argv)

Preprocess all test arguments

Parameters:

argc

Amount of arguments to preprocess

argv

Array of test arguments

Returns:

Array of preprocessed arguments on success or NULL on any error

te_errno tapi_flow_conf_get(int argc, char** argv, te_bool do_preprocess, tapi_flow_t* flow)

Get and process flow parametrisation from test arguments

Parameters:

argc

Amount of arguments to preprocess

argv

Array of test arguments

flow

Initialised flow structure (OUT)

Returns:

0, if success, or -1 otherwise

tapi_flow_ep* tapi_flow_find_ep(tapi_flow_t* flow, const char* name)

Find Endpoint by its name

Parameters:

flow

Flow structure to find endpoint in

name

Name of endpoint to find

Returns:

Endpoint structure, if success, or NULL otherwise

tapi_flow_traffic* tapi_flow_find_traffic(tapi_flow_t* flow, const char* name)

Find Traffic Entry by its name

Parameters:

flow

Flow structure to find traffic entry in

name

Name of traffic entry to find

Returns:

Endpoint structure, if success, or NULL otherwise

Macros

#define TEST_GET_FLOW_CONFIG(_flow, _do_preprocess)

Read configuration from test’s parameters

Parameters:

platfrom_config

Pointer to platform_config_s structure to receive configuration (OUT)