Forwarder module
Overview
TAPI for Forwarder additional module external declarations. More…
// global functions int tapi_forw_task_create(const char* ta, int sid, const ndn_forw_action_plain* forw_action, int sendq_id); int tapi_forw_sendq_create(const char* ta, int sid, csap_handle_t csap, int band, int bufsize, int* sendq_id); int tapi_forw_sendq_destroy(const char* ta, int sid, int sendq_id); int tapi_forw_task_set_param(const char* ta, int sid, const char* ftask_name, const char* param, int val); int tapi_forw_task_set_drop_rate(const char* ta, int sid, const char* ftask_name, int rate); int tapi_forw_task_set_delay_min(const char* ta, int sid, const char* ftask_name, int delay); int tapi_forw_task_set_reorder_type(const char* ta, int sid, const char* ftask_name, ndn_forw_reorder_type_t type); int tapi_forw_task_set_reorder_to(const char* ta, int sid, const char* ftask_name, int to); int tapi_forw_task_set_reorder_sz(const char* ta, int sid, const char* ftask_name, int sz); int tapi_forw_task_set_delay_max(const char* ta, int sid, const char* ftask_name, int delay); int tapi_forw_task_destroy(const char* ta, int sid, const char* ftask_name); int tapi_forw_sendq_set_param(const char* ta, int sid, const char* param, int val, int sendq_id); int tapi_forw_sendq_get_param(const char* ta, int sid, const char* param, int sendq_id, int* val); int tapi_forw_set_ftask_name(asn_value* pat_unit, const char* task_name);
Detailed Documentation
TAPI for Forwarder additional module external declarations.
Copyright (C) 2004-2022 OKTET Labs Ltd. All rights reserved.
Global Functions
int tapi_forw_task_create(const char* ta, int sid, const ndn_forw_action_plain* forw_action, int sendq_id)
Create forwarding task according with specification.
Parameters:
ta |
name of TA, on which forw. task should be added |
sid |
RCF session ID. |
forw_action |
plain C structure with specification of forwarder task |
sendq_id |
Id of destination sending queue |
Returns:
zero on success or error code.
int tapi_forw_sendq_create(const char* ta, int sid, csap_handle_t csap, int band, int bufsize, int* sendq_id)
Create send queue with specified parameters.
Parameters:
ta |
name of TA, on which forw. task should be added |
sid |
RCF session ID. |
csap |
ID of CSAP, which should send data |
band |
Bandwidth of send queue in bytes per second, zero for unlimited |
bufsize |
Buffer size of send queue |
sendq_id |
location for id of destination sending queue (OUT) |
Returns:
zero on success or error code.
int tapi_forw_sendq_destroy(const char* ta, int sid, int sendq_id)
Destroy send queue with specified ID.
Parameters:
ta |
name of TA, on which send queue is running. |
sid |
RCF session ID. |
sendq_id |
id of sending queue |
Returns:
zero on success or error code.
int tapi_forw_task_set_param(const char* ta, int sid, const char* ftask_name, const char* param, int val)
Set forwarding task parameter.
Parameters:
ta |
name of TA, on which the send queue is situated |
sid |
RCF session ID. |
ftask_name |
Name of forwarder task. |
param |
Parameter name, which should be ASN lib labels string, see ASN lib docs and NDN specification for Forwarder-Action ASN type. |
val |
New parameter value. |
Returns:
zero on success or error code.
int tapi_forw_task_set_drop_rate(const char* ta, int sid, const char* ftask_name, int rate)
Set forwarding task drop rate.
Parameters:
ta |
name of TA, on which the send queue is situated |
sid |
RCF session ID. |
ftask_name |
Name of forwarder task. |
rate |
New drop rate value. |
Returns:
zero on success or error code.
int tapi_forw_task_set_delay_min(const char* ta, int sid, const char* ftask_name, int delay)
Set forwarding task minimum delay. Applicable for constant delay type. If delay was disabled, it becomes ‘constant’ with specified value.
Parameters:
ta |
name of TA, on which the send queue is situated |
sid |
RCF session ID |
ftask_name |
Name of forwarder task |
delay |
New delay value in microseconds |
Returns:
zero on success or error code.
int tapi_forw_task_set_reorder_type(const char* ta, int sid, const char* ftask_name, ndn_forw_reorder_type_t type)
Set forwarding task reorder type
Parameters:
ta |
name of TA, on which the send queue is situated |
sid |
RCF session ID |
ftask_name |
Name of forwarder task |
type |
New type value |
Returns:
zero on success or error code.
int tapi_forw_task_set_reorder_to(const char* ta, int sid, const char* ftask_name, int to)
Set forwarding task reorder timeout.
Parameters:
ta |
name of TA, on which the send queue is situated |
sid |
RCF session ID |
ftask_name |
Name of forwarder task |
to |
New timeout value in microseconds |
Returns:
zero on success or error code.
int tapi_forw_task_set_reorder_sz(const char* ta, int sid, const char* ftask_name, int sz)
Set forwarding task reorder size.
Parameters:
ta |
name of TA, on which the send queue is situated |
sid |
RCF session ID |
ftask_name |
Name of forwarder task |
sz |
New reorder size value |
Returns:
zero on success or error code.
int tapi_forw_task_set_delay_max(const char* ta, int sid, const char* ftask_name, int delay)
Set forwarding task maximum delay. Applicable for constant delay type. If delay was disabled, it becomes ‘constant’ with specified value.
Parameters:
ta |
name of TA, on which the send queue is situated |
sid |
RCF session ID. |
ftask_name |
Name of forwarder task. |
delay |
New delay value in microseconds. |
Returns:
zero on success or error code.
int tapi_forw_task_destroy(const char* ta, int sid, const char* ftask_name)
Destroy forwarding task.
Parameters:
ta |
name of TA, on which the send queue is situated |
sid |
RCF session ID. |
ftask_name |
Name of forwarder task. |
Returns:
zero on success or error code.
int tapi_forw_sendq_set_param(const char* ta, int sid, const char* param, int val, int sendq_id)
Set send queue parameters.
Parameters:
ta |
name of TA, on which the send queue is situated |
sid |
RCF session ID. |
param |
Parameter name in human form (“size_max” or “bandwidth”) |
val |
New parameter value. |
sendq_id |
ID of the send queue. |
Returns:
zero on success or error code.
int tapi_forw_sendq_get_param(const char* ta, int sid, const char* param, int sendq_id, int* val)
Get send queue parameters.
Parameters:
ta |
name of TA, on which the send queue is situated |
sid |
RCF session ID. |
param |
Parameter name in human form (“size_max” or “bandwidth”) |
sendq_id |
ID of the send queue. |
val |
Value of the parameter (OUT) |
Returns:
zero on success or error code.
int tapi_forw_set_ftask_name(asn_value* pat_unit, const char* task_name)
Set forw task name to pattern unit
Parameters:
pat_unit |
ASN value of type Traffic-Pattern-Unit |
task_name |
Name of forwarder task. |
Returns:
zero on success or error code.