Global Namespace

Overview

// typedefs

typedef netsnmp_session ta_snmp_session;
typedef oid ta_snmp_oid;

typedef bool (*include_callback_func)(
    const char *name,
    void *data
    );

typedef enum ta_ethtool_cmd ta_ethtool_cmd;
typedef union ta_ethtool_lsets_data ta_ethtool_lsets_data;
typedef struct ta_ethtool_lsets ta_ethtool_lsets;
typedef enum ta_ethtool_lsets_field ta_ethtool_lsets_field;
typedef enum ta_ethtool_link_mode ta_ethtool_link_mode;
typedef struct ta_ethtool_strings ta_ethtool_strings;
typedef struct te_dhcp_option te_dhcp_option;
typedef struct te_dhcp_space_opt te_dhcp_space_opt;
typedef struct space space;
typedef struct host host;
typedef struct group group;
typedef struct te_dhcp_server_subnet te_dhcp_server_subnet;
typedef struct te_dhcp_server_shared_net te_dhcp_server_shared_net;
typedef struct te_dhcp_server_cfg te_dhcp_server_cfg;
typedef enum nginx_cpu_aff_mode nginx_cpu_aff_mode;
typedef enum nginx_server_tokens_mode nginx_server_tokens_mode;
typedef struct nginx_http_listen_entry nginx_http_listen_entry;
typedef struct nginx_http_us_server nginx_http_us_server;
typedef struct nginx_http_upstream nginx_http_upstream;
typedef struct nginx_ssl_entry nginx_ssl_entry;
typedef struct nginx_http_header nginx_http_header;
typedef struct nginx_http_loc nginx_http_loc;
typedef struct nginx_http_client nginx_http_client;
typedef struct nginx_http_proxy nginx_http_proxy;
typedef struct nginx_http_file_cache nginx_http_file_cache;
typedef struct nginx_http_server nginx_http_server;
typedef struct nginx_inst nginx_inst;
typedef struct te_radvd_option te_radvd_option;
typedef struct te_radvd_ip6_addr te_radvd_ip6_addr;
typedef struct te_radvd_named_oplist te_radvd_named_optlist;
typedef struct te_radvd_subnet te_radvd_subnet;
typedef struct te_radvd_interface te_radvd_interface;
typedef struct cmd_monitor_t cmd_monitor_t;
typedef TRANSMIT_PACKETS_ELEMENT* PTRANSMIT_PACKETS_ELEMENT;
typedef TRANSMIT_PACKETS_ELEMENT FAR* LPTRANSMIT_PACKETS_ELEMENT;

typedef BOOL(__stdcall* LPFN_CONNECTEX)(
    SOCKET s,
    const struct sockaddr *name,
    int namelen,
    PVOID lpSendBuffer,
    DWORD dwSendDataLength,
    LPDWORD lpdwBytesSent,
    LPOVERLAPPED lpOverlapped
    );

typedef BOOL(__stdcall* LPFN_DISCONNECTEX)(
    SOCKET hSocket,
    LPOVERLAPPED lpOverlapped,
    DWORD dwFlags,
    DWORD reserved
    );

typedef BOOL(__stdcall* LPFN_ACCEPTEX)(
    SOCKET sListenSocket,
    SOCKET sAcceptSocket,
    PVOID lpOutputBuffer,
    DWORD dwReceiveDataLength,
    DWORD dwLocalAddressLength,
    DWORD dwRemoteAddressLength,
    LPDWORD lpdwBytesReceived,
    LPOVERLAPPED lpOverlapped
    );

typedef void(__stdcall* LPFN_GETACCEPTEXSOCKADDRS)(
    PVOID lpOutputBuffer,
    DWORD dwReceiveDataLength,
    DWORD dwLocalAddressLength,
    DWORD dwRemoteAddressLength,
    LPSOCKADDR *LocalSockaddr,
    LPINT LocalSockaddrLength,
    LPSOCKADDR *RemoteSockaddr,
    LPINT RemoteSockaddrLength
    );

typedef BOOL(__stdcall* LPFN_TRANSMITFILE)(
    SOCKET hSocket,
    HANDLE hFile,
    DWORD nNumberOfBytesToWrite,
    DWORD nNumberOfBytesPerSend,
    LPOVERLAPPED lpOverlapped,
    TRANSMIT_FILE_BUFFERS *lpTransmitBuffers,
    DWORD dwFlags
    );

typedef BOOL(PASCAL* LPFN_TRANSMITPACKETS)(
    SOCKET hSocket,
    LPTRANSMIT_PACKETS_ELEMENT lpPacketArray,
    DWORD nElementCount,
    DWORD nSendSize,
    LPOVERLAPPED lpOverlapped,
    DWORD dwFlags
    );

typedef int(__stdcall* LPFN_WSARECVMSG)(
    SOCKET s,
    LPWSAMSG lpMsg,
    LPDWORD lpdwNumberOfBytesRecvd,
    LPWSAOVERLAPPED lpOverlapped,
    LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
    );

typedef struct rpc_overlapped rpc_overlapped;
typedef struct checked_arg checked_arg;
typedef struct cfg_dependency cfg_dependency;
typedef struct cfg_object cfg_object;
typedef struct cfg_instance cfg_instance;
typedef struct refcnt_buffer refcnt_buffer;
typedef struct msg_buffer msg_buffer;
typedef enum cfg_file_type cfg_file_type;
typedef enum overfill_type overfill_type;
typedef struct snif_polling_sets_t snif_polling_sets_t;
typedef struct ta_inst ta_inst;
typedef enum listener_state listener_state;
typedef struct log_listener_conf log_listener_conf;
typedef struct log_listener log_listener;
typedef struct msg_queue msg_queue;

typedef te_errno (*streaming_handler)(
    const log_msg_view *view,
    refcnt_buffer *str
    );

typedef struct streaming_rule streaming_rule;
typedef struct streaming_action streaming_action;
typedef struct streaming_filter streaming_filter;
typedef struct ta ta;
typedef struct usrreq usrreq;

typedef te_errno (*userreq_callback)(
    ta *agent,
    usrreq *req
    );

typedef struct ta_initial_task ta_initial_task;
typedef enum ta_reboot_state ta_reboot_state;
typedef enum ta_reboot_type ta_reboot_type;
typedef struct ta_reboot_context ta_reboot_context;
typedef struct ta_check ta_check;
typedef enum test_path_type test_path_type;
typedef enum test_path_match test_path_match;
typedef struct test_path_arg test_path_arg;
typedef struct test_path_item test_path_item;
typedef struct test_path test_path;
typedef struct tester_global tester_global;
typedef struct test_suite_info test_suite_info;
typedef struct cmd_monitor_descr cmd_monitor_descr;
typedef struct person_info person_info;
typedef struct test_option test_option;
typedef struct test_entity_value test_entity_value;
typedef struct test_entity_values test_entity_values;
typedef struct test_session test_session;
typedef struct test_value_type test_value_type;
typedef enum tester_handdown tester_handdown;
typedef enum tester_track_conf_flags tester_track_conf_flags;
typedef struct test_attrs test_attrs;
typedef struct test_script test_script;
typedef struct test_var_arg test_var_arg;
typedef struct run_item run_item;
typedef struct test_info test_info;
typedef struct test_package test_package;
typedef struct test_var_arg_list test_var_arg_list;
typedef struct tester_cfg tester_cfg;
typedef struct tester_cfgs tester_cfgs;

typedef te_errno (*test_var_arg_enum_cb)(
    const test_var_arg *va,
    void *opaque
    );

typedef te_errno (*test_entity_value_enum_cb)(
    const test_entity_value *value,
    void *opaque
    );

typedef te_errno (*test_entity_value_enum_error_cb)(
    const test_entity_value *value,
    te_errno status,
    void *opaque
    );

typedef enum tester_cfg_walk_ctl tester_cfg_walk_ctl;
typedef struct tester_cfg_walk tester_cfg_walk;
typedef enum run_item_type run_item_type;
typedef enum run_item_role run_item_role;
typedef int test_id;
typedef uint64_t tester_flags;
typedef struct test_requirement test_requirement;
typedef enum tester_test_status tester_test_status;
typedef struct tester_test_result tester_test_result;
typedef struct tester_test_results tester_test_results;
typedef struct tester_test_msg_listener tester_test_msg_listener;
typedef struct test_iter_arg test_iter_arg;
typedef struct testing_act testing_act;
typedef enum testing_direction testing_direction;
typedef struct rcf_comm_connection rcf_comm_connection;

typedef void() te_log_message_f(
    const char *file,
    unsigned int line,
    te_log_ts_sec sec,
    te_log_ts_usec usec,
    unsigned int level,
    const char *entity,
    const char *user,
    const char *fmt,
    va_list ap
    );

typedef enum rcf_execute_mode rcf_execute_mode;
typedef struct rcf_msg rcf_msg;
typedef struct rcf_params rcf_params;
typedef struct rcf_tce_conf rcf_tce_conf_t;
typedef struct rcf_talib_param rcf_talib_param;

typedef te_errno (*rcf_talib_start)(
    const char *ta_name,
    const char *ta_type,
    const rcf_talib_param *param,
    const te_kvpair_h *conf,
    rcf_talib_handle *handle,
    unsigned int *flags
    );

typedef te_errno (*rcf_talib_finish)(
    rcf_talib_handle handle,
    const char *parms
    );

typedef te_errno (*rcf_talib_connect)(
    rcf_talib_handle handle,
    fd_set *select_set,
    struct timeval *select_tm
    );

typedef te_errno (*rcf_talib_transmit)(
    rcf_talib_handle handle,
    const void *data,
    size_t len
    );

typedef bool (*rcf_talib_is_ready)(rcf_talib_handle handle);

typedef te_errno (*rcf_talib_receive)(
    rcf_talib_handle handle,
    char *buf,
    size_t *len,
    char **pba
    );

typedef te_errno (*rcf_talib_close)(
    rcf_talib_handle handle,
    fd_set *select_set
    );

typedef void* rcf_talib_handle;
typedef struct rcf_tce_comp_conf rcf_tce_comp_conf_t;
typedef struct rcf_tce_type_conf rcf_tce_type_conf_t;
typedef struct rcf_tce_local_conf rcf_tce_local_conf_t;
typedef struct rcf_tce_conf rcf_tce_conf_t;
typedef unsigned int csap_handle_t;

typedef int (*tad_stream_callback)(
    uint64_t offset,
    uint32_t length,
    uint8_t *buffer
    );

typedef struct te_bpf_ip_tcpudp_filter te_bpf_ip_tcpudp_filter;
typedef struct te_bpf_rxq_stats_params te_bpf_rxq_stats_params;
typedef struct te_optional_uint_t te_optional_uint_t;
typedef struct te_optional_uintmax_t te_optional_uintmax_t;
typedef struct te_optional_double_t te_optional_double_t;
typedef bool te_bool;
typedef enum te_bool3 te_bool3;
typedef void (*te_void_func)(void);
typedef int32_t te_errno;
typedef uint64_t u64;
typedef uint32_t u32;
typedef uint16_t u16;
typedef uint8_t u8;
typedef uint16_t te_log_nfl;
typedef uint8_t te_log_version;
typedef uint32_t te_log_ts_sec;
typedef uint32_t te_log_ts_usec;
typedef uint16_t te_log_level;
typedef uint32_t te_log_id;
typedef uint32_t te_log_seqno;
typedef struct sniffer_id sniffer_id;
typedef struct te_ts_t te_ts_t;
typedef struct te_pcap_pkthdr te_pcap_pkthdr;
typedef enum te_test_status te_test_status;
typedef struct te_test_verdict te_test_verdict;
typedef struct te_test_result te_test_result;
typedef enum trc_verdict trc_verdict;
typedef enum upnp_cp_request_type te_upnp_cp_request_type;
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef INT8 int8_t;
typedef INT16 int16_t;
typedef INT32 int32_t;
typedef INT64 int64_t;
typedef UINT8 uint8_t;
typedef UINT16 uint16_t;
typedef UINT32 uint32_t;
typedef UINT64 uint64_t;
typedef int ssize_t;
typedef int pid_t;
typedef enum te_test_msg_type te_test_msg_type;
typedef struct tester_test_msg_hdr tester_test_msg_hdr;
typedef enum agent_key_manager agent_key_manager;
typedef struct rcf_symbol_entry rcf_symbol_entry;
typedef struct asn_named_entry_t asn_named_entry_t;
typedef struct asn_enum_entry_t asn_enum_entry_t;
typedef struct asn_type asn_type;
typedef uint16_t asn_tag_value;
typedef struct asn_tag_t asn_tag_t;
typedef struct asn_value asn_value;
typedef struct asn_child_desc asn_child_desc_t;

typedef te_errno (*walk_method)(
    asn_value *value,
    void *user_ptr
    );

typedef enum te_ip_type te_ip_type;
typedef enum te_ip_table_id_t te_ip_table_id;
typedef struct te_conf_ip_rule te_conf_ip_rule;
typedef enum te_conf_obj_compare_result te_conf_obj_compare_result;

typedef te_errno (*te_conf_obj_func_to_str)(
    te_string *str,
    const char *name,
    const void *arg
    );

typedef te_errno (*te_conf_obj_func_from_str)(
    const char *value,
    void *arg,
    const void *options
    );

typedef int (*te_conf_obj_func_compare)(
    const void *a,
    const void *b
    );

typedef struct te_conf_obj_methods te_conf_obj_methods;
typedef struct te_conf_obj te_conf_obj;
typedef struct cfg_object_subid cfg_object_subid;
typedef struct cfg_inst_subid cfg_inst_subid;
typedef struct cfg_oid cfg_oid;

typedef te_errno cfg_oid_action(
    const char *inst_oid,
    const cfg_oid *parsed_oid,
    void *ctx
    );

typedef struct cfg_oid_rule cfg_oid_rule;
typedef uint64_t cfg_handle;
typedef struct cfg_obj_descr cfg_obj_descr;

typedef int (*cfg_inst_handler)(
    cfg_handle handle,
    void *user_data
    );

typedef struct cfg_msg cfg_msg;
typedef struct cfg_register_msg cfg_register_msg;
typedef struct cfg_unregister_msg cfg_unregister_msg;
typedef struct cfg_find_msg cfg_find_msg;
typedef struct cfg_get_descr_msg cfg_get_descr_msg;
typedef struct cfg_get_oid_msg cfg_get_oid_msg;
typedef struct cfg_get_id_msg cfg_get_id_msg;
typedef struct cfg_pattern_msg cfg_pattern_msg;
typedef struct cfg_family_msg cfg_family_msg;
typedef struct cfg_add_msg cfg_add_msg;
typedef struct cfg_del_msg cfg_del_msg;
typedef struct cfg_set_msg cfg_set_msg;
typedef struct cfg_commit_msg cfg_commit_msg;
typedef struct cfg_get_msg cfg_get_msg;
typedef struct cfg_copy_msg cfg_copy_msg;
typedef struct cfg_sync_msg cfg_sync_msg;
typedef struct cfg_reboot_msg cfg_reboot_msg;
typedef struct cfg_backup_msg cfg_backup_msg;
typedef struct cfg_config_msg cfg_config_msg;
typedef struct cfg_conf_touch_msg cfg_conf_touch_msg;
typedef struct cfg_add_dependency_msg cfg_add_dependency_msg;
typedef struct cfg_shutdown_msg cfg_shutdown_msg;
typedef struct cfg_tree_print_msg cfg_tree_print_msg;
typedef struct cfg_process_history_msg cfg_process_history_msg;
typedef union cfg_inst_val cfg_inst_val;
typedef struct cfg_primary_type cfg_primary_type;
typedef struct ipc_client ipc_client;
typedef struct ipc_server ipc_server;
typedef struct ipc_server_client ipc_server_client;
typedef struct iscsi_connection_req iscsi_connection_req;
typedef te_errno (*iscsi_initiator_control_t)(iscsi_connection_req *req);
typedef struct iscsi_tgt_chap_data iscsi_tgt_chap_data_t;
typedef struct iscsi_connection_data iscsi_connection_data_t;
typedef struct iscsi_target_data iscsi_target_data_t;
typedef struct iscsi_initiator_data iscsi_initiator_data_t;
typedef char* (*iscsi_param_formatter_t)(void *);

typedef bool (*iscsi_param_predicate_t)(
    iscsi_target_data_t *,
    iscsi_connection_data_t *,
    iscsi_tgt_chap_data_t *
    );

typedef struct iscsi_target_param_descr_t iscsi_target_param_descr_t;
typedef struct log_branch_filter_rule log_branch_filter_rule;
typedef struct log_branch_filter log_branch_filter;
typedef struct log_duration_filter_rule log_duration_filter_rule;
typedef struct log_duration_filter_rules log_duration_filter_rules;
typedef struct log_duration_filter log_duration_filter;
typedef enum log_filter_result log_filter_result;
typedef struct log_user_filter log_user_filter;
typedef struct log_entity_filter log_entity_filter;
typedef struct log_msg_filter log_msg_filter;
typedef struct log_msg_view log_msg_view;
typedef enum logfork_msg_type logfork_msg_type;
typedef struct logfork_msg logfork_msg;
typedef long ta_log_arg;
typedef struct lgr_mess_header lgr_mess_header;
typedef int ta_log_lock_key;

typedef void (*te_log_message_tx_f)(
    const void *msg,
    size_t len
    );

typedef enum logic_expr_type logic_expr_type;
typedef struct logic_expr logic_expr;
typedef enum logic_expr_res_type logic_expr_res_type;
typedef struct logic_expr_res logic_expr_res;

typedef te_errno() logic_expr_get_val(
    const logic_expr *parsed,
    void *cookie,
    logic_expr_res *res
    );

typedef struct ndn_arp_header_plain ndn_arp_header_plain;
typedef enum ndn_atm_type ndn_atm_type;
typedef struct ndn_stp_cfg_bpdu_t ndn_stp_cfg_bpdu_t;
typedef struct ndn_stp_bpdu_t ndn_stp_bpdu_t;
typedef enum dhcp_csap_mode dhcp_csap_mode;
typedef enum dhcp6_csap_mode dhcp6_csap_mode;
typedef struct ndn_eth_header_plain ndn_eth_header_plain;
typedef struct iscsi_target_params_t iscsi_target_params_t;
typedef int iscsi_key;
typedef int iscsi_key_value;
typedef asn_value* iscsi_segment_data;
typedef asn_value* iscsi_key_values;
typedef enum netconf_link_type netconf_link_type;
typedef enum netconf_net_addr_flag netconf_net_addr_flag;
typedef enum netconf_route_type netconf_route_type;
typedef enum netconf_route_prot netconf_route_prot;
typedef enum netconf_route_scope netconf_route_scope;
typedef enum netconf_route_table netconf_route_table;
typedef enum netconf_neigh_state netconf_neigh_state;
typedef enum netconf_neigh_flags netconf_neigh_flags;
typedef struct netconf_link netconf_link;
typedef struct netconf_net_addr netconf_net_addr;
typedef struct netconf_route_nexthop netconf_route_nexthop;
typedef struct netconf_route netconf_route;
typedef struct netconf_neigh netconf_neigh;
typedef struct netconf_macvlan netconf_macvlan;
typedef struct netconf_ipvlan netconf_ipvlan;
typedef struct netconf_vlan netconf_vlan;
typedef struct netconf_veth netconf_veth;
typedef struct netconf_udp_tunnel netconf_udp_tunnel;
typedef struct netconf_geneve netconf_geneve;
typedef struct netconf_vxlan netconf_vxlan;
typedef struct netconf_bridge netconf_bridge;
typedef struct netconf_bridge_port netconf_bridge_port;
typedef struct netconf_devlink_info netconf_devlink_info;
typedef enum netconf_nla_type netconf_nla_type;
typedef union netconf_devlink_param_value_data netconf_devlink_param_value_data;
typedef struct netconf_devlink_param_value netconf_devlink_param_value;
typedef enum netconf_devlink_param_cmode netconf_devlink_param_cmode;
typedef struct netconf_devlink_param netconf_devlink_param;
typedef enum netconf_devlink_eswitch_mode netconf_devlink_eswitch_mode;
typedef struct netconf_devlink_eswitch netconf_devlink_eswitch;
typedef enum netconf_node_type netconf_node_type;
typedef te_conf_ip_rule netconf_rule;
typedef struct netconf_node netconf_node;
typedef struct netconf_list netconf_list;
typedef enum netconf_cmd netconf_cmd;

typedef bool (*netconf_node_filter_t)(
    netconf_node *node,
    void *user_data
    );

typedef struct netconf_handle_s* netconf_handle;

typedef bool (*netconf_veth_list_filter_func)(
    const char *ifname,
    void *data
    );

typedef bool (*netconf_udp_tunnel_list_filter_func)(
    const char *ifname,
    void *data
    );

typedef bool (*netconf_bridge_list_filter_func)(
    const char *ifname,
    void *data
    );

typedef bool (*netconf_port_list_filter_func)(
    const char *ifname,
    void *data
    );

typedef int() netconf_recv_cb_t(
    struct nlmsghdr *h,
    netconf_list *list,
    void *cookie
    );

typedef te_errno (*netconf_attr_cb)(
    struct nlattr *na,
    void *cb_data
    );

typedef enum rcf_call_mode rcf_call_mode_t;
typedef enum rcf_trrecv_mode rcf_trrecv_mode;

typedef void (*rcf_pkt_handler)(
    const char *pkt,
    void *user_param
    );

typedef struct rcf_trpoll_csap rcf_trpoll_csap;

typedef te_errno rcf_ta_cb(
    const char *ta,
    void *cookie
    );

typedef te_errno (*rcf_rtn)(
    void *arg,
    ...
    );

typedef te_errno (*rcf_thr_rtn)(
    void *sem,
    void *arg,
    ...
    );

typedef te_errno (*rcf_argv_rtn)(
    int argv,
    char **argc
    );

typedef te_errno (*rcf_argv_thr_rtn)(
    void *sem,
    int argc,
    char **argv
    );

typedef enum rcf_ch_trrecv_flags rcf_ch_trrecv_flags;

typedef te_errno (*rcf_ch_cfg_get)(
    unsigned int gid,
    const char *oid,
    char *value,
    ...
    );

typedef te_errno (*rcf_ch_cfg_set)(
    unsigned int gid,
    const char *oid,
    const char *value,
    ...
    );

typedef te_errno (*rcf_ch_cfg_add)(
    unsigned int gid,
    const char *oid,
    const char *value,
    ...
    );

typedef te_errno (*rcf_ch_cfg_del)(
    unsigned int gid,
    const char *oid,
    ...
    );

typedef te_errno (*rcf_ch_cfg_list)(
    unsigned int gid,
    const char *oid,
    const char *sub_id,
    char **list,
    ...
    );

typedef te_errno (*rcf_ch_cfg_commit)(
    unsigned int gid,
    const cfg_oid *p_oid
    );

typedef te_errno (*rcf_ch_substitution_apply)(
    te_string *src,
    const char *new,
    const char *old
    );

typedef struct rcf_pch_cfg_substitution rcf_pch_cfg_substitution;
typedef struct rcf_pch_cfg_object rcf_pch_cfg_object;
typedef te_errno (*rcf_pch_rsrc_grab_callback)(const char *name);
typedef te_errno (*rcf_pch_rsrc_release_callback)(const char *name);

typedef int (*rcf_pch_rpc_call)(
    struct rpcserver *rpcs,
    char *name,
    void *in,
    void *out
    );

typedef struct ta_cfg_obj_attr ta_cfg_obj_attr_t;
typedef enum ta_cfg_obj_action ta_cfg_obj_action_e;
typedef void() ta_cfg_obj_data_free(void *data);
typedef struct ta_cfg_obj ta_cfg_obj_t;
typedef te_errno (*ta_obj_cb)(ta_cfg_obj_t *obj);
typedef enum ta_route_type ta_route_type;
typedef struct ta_rt_nexthop_t ta_rt_nexthop_t;
typedef struct ta_rt_info_t ta_rt_info_t;
typedef struct rcf_rpc_server rcf_rpc_server;
typedef struct vfork_thread_data vfork_thread_data;
typedef struct rcf_rpc_server_hook rcf_rpc_server_hook;
typedef struct rpc_dpdk_offload_t rpc_dpdk_offload_t;
typedef enum rpc_lio_opcode rpc_lio_opcode;
typedef enum rpc_lio_mode rpc_lio_mode;
typedef enum rpc_aio_cancel_retval rpc_aio_cancel_retval;
typedef enum rpc_xsk_libxdp_flags rpc_xsk_libxdp_flags;
typedef enum rpc_d_type rpc_d_type;
typedef enum rpc_dlopen_flags rpc_dlopen_flags;
typedef enum rpc_fcntl_flags rpc_fcntl_flags;
typedef enum rpc_fcntl_command rpc_fcntl_command;
typedef enum rpc_lseek_mode rpc_lseek_mode;
typedef enum rpc_splice_flags rpc_splice_flags;
typedef struct rpc_hwtstamp_config rpc_hwtstamp_config;
typedef enum rpc_hwtstamp_tx_types rpc_hwtstamp_tx_types;
typedef enum rpc_hwtstamp_rx_filters rpc_hwtstamp_rx_filters;
typedef enum rpc_if_fl rpc_if_fl;
typedef enum rpc_arp_flags rpc_arp_fl;
typedef enum rpc_ai_flags rpc_ai_flags;
typedef enum rpc_ai_rc rpc_ai_rc;
typedef enum rpc_pthread_cancelstate rpc_pthread_cancelstate;
typedef enum rpc_pthread_canceltype rpc_pthread_canceltype;
typedef enum rpc_signum rpc_signum;
typedef enum rpc_si_code rpc_si_code;
typedef enum rpc_sigev_notify rpc_sigev_notify;
typedef enum rpc_sighow rpc_sighow;
typedef enum rpc_sa_flags rpc_sa_flags;
typedef enum rpc_ss_flags rpc_ss_flags;
typedef enum rpc_epoll_flags rpc_epoll_flags;
typedef enum rpc_epoll_evt rpc_epoll_evt;
typedef enum rpc_prot_flags rpc_prot_flags;
typedef enum rpc_map_flags rpc_map_flags;
typedef enum rpc_madv_value rpc_madv_value;
typedef enum rpc_poll_event rpc_poll_event;
typedef enum rpc_rlimit_resource rpc_rlimit_resource;
typedef struct rpc_onload_scm_timestamping_stream rpc_onload_scm_timestamping_stream;
typedef struct rpc_scm_timestamping rpc_scm_timestamping;
typedef enum rpc_scm_tstamp rpc_scm_tstamp;
typedef enum rpc_socket_domain rpc_socket_domain;
typedef rpc_socket_domain rpc_socket_addr_family;
typedef enum rpc_socket_type rpc_socket_type;
typedef enum rpc_socket_flags rpc_socket_flags;
typedef enum rpc_socket_proto rpc_socket_proto;
typedef enum rpc_shut_how rpc_shut_how;
typedef enum rpc_send_recv_flags rpc_send_recv_flags;
typedef enum rpc_mtu_discover_arg rpc_mtu_discover_arg;
typedef enum rpc_sockopt rpc_sockopt;
typedef enum rpc_tcp_state rpc_tcp_state;
typedef enum rpc_tcpi_options rpc_tcpi_options;
typedef enum rpc_tcp_ca_state rpc_tcp_ca_state;
typedef enum rpc_socklevel rpc_socklevel;
typedef enum rpc_ioctl_code rpc_ioctl_code;
typedef enum rpc_ethtool_flags rpc_ethtool_flags;
typedef enum rpc_ethtool_reset_flags rpc_ethtool_reset_flags;
typedef enum rpc_ethtool_cmd rpc_ethtool_cmd;
typedef enum rpc_eth_proto rpc_eth_proto;
typedef enum rpc_arp_hardware rpc_arp_hardware;
typedef enum rpc_packet_type rpc_packet_type;
typedef enum rpc_file_mode_flags rpc_file_mode_flags;
typedef enum rpc_access_mode_flags rpc_access_mode_flags;
typedef enum rpc_sysinfo_command rpc_sysinfo_command;
typedef enum rpc_clock_id rpc_clock_id;
typedef enum rpc_adj_mode rpc_adj_mode;
typedef enum rpc_timex_status rpc_timex_status;
typedef enum rpc_waitpid_opts rpc_waitpid_opts;
typedef enum rpc_wait_status_flag rpc_wait_status_flag;
typedef struct rpc_wait_status rpc_wait_status;
typedef enum rpc_sysconf_name rpc_sysconf_name;
typedef uint32_t rpc_ptr;
typedef rpc_ptr rpc_fd_set_p;
typedef rpc_ptr rpc_sigset_p;
typedef rpc_ptr rpc_aiocb_p;
typedef rpc_ptr rpc_iomux_state_p;
typedef struct rpc_ptr_off rpc_ptr_off;
typedef uint32_t rpc_ptr_id_index;
typedef uint32_t rpc_ptr_id_namespace;
typedef enum rpc_network_event rpc_network_event;
typedef enum rpc_network_event_bit rpc_network_event_bit;
typedef enum rpc_transmit_file_flags rpc_transmit_file_flags;
typedef enum rpc_servicetype_flags rpc_servicetype_flags;
typedef enum rpc_cf_access_right rpc_cf_access_right;
typedef enum rpc_cf_share_mode rpc_cf_share_mode;
typedef enum rpc_cf_creation_disposition rpc_cf_creation_disposition;
typedef enum rpc_cf_flags_attributes rpc_cf_flags_attributes;
typedef enum rpc_open_sock_flags rpc_open_sock_flags;
typedef enum rpc_join_leaf_flags rpc_join_leaf_flags;
typedef rpc_ptr rpc_rte_mempool_p;
typedef rpc_ptr rpc_rte_mbuf_p;
typedef rpc_ptr rpc_rte_ring_p;
typedef rpc_ptr rpc_rte_flow_attr_p;
typedef rpc_ptr rpc_rte_flow_item_p;
typedef rpc_ptr rpc_rte_flow_action_p;
typedef rpc_ptr rpc_rte_flow_p;
typedef struct lcore_mask_t lcore_mask_t;
typedef union iomux_funcs iomux_funcs;
typedef union iomux_state iomux_state;
typedef union iomux_return iomux_return;
typedef int iomux_return_iterator;
typedef rpc_ptr rcf_pch_mem_id;

typedef int (*api_func)(
    int param,
    ...
    );

typedef int (*api_func_ptr)(
    void *param,
    ...
    );

typedef int (*api_func_void)(void);

typedef void* (*api_func_ret_ptr)(
    int param,
    ...
    );

typedef void* (*api_func_ptr_ret_ptr)(
    void *param,
    ...
    );

typedef void* (*api_func_void_ret_ptr)(void);

typedef int64_t (*api_func_ret_int64)(
    int param,
    ...
    );

typedef struct checked_arg checked_arg;
typedef struct te_rpc_error_data te_rpc_error_data;
typedef void rpc_wrapper_func(struct rpc_call_data *call);

typedef bool rpc_copy_func(
    void *in,
    void *out
    );

typedef bool_t (*rpc_generic_xdr_out)(
    XDR *,
    void *out
    );

typedef struct rpc_func_info rpc_func_info;
typedef struct rpc_call_data rpc_call_data;
typedef struct deferred_call_list deferred_call_list;
typedef void (*sighandler_t)(int);

typedef void() tarpc_close_fd_hook(
    int fd,
    void *cookie
    );

typedef struct rpcs_msghdr_helper rpcs_msghdr_helper;
typedef enum rpcs_msghdr_check_args_mode rpcs_msghdr_check_args_mode;
typedef int rpc_transport_handle;

typedef bool_t (*rpc_func)(
    void *in,
    void *out,
    void *rqstp
    );

typedef bool_t (*rpc_arg_func)(
    void *xdrs,
    void *arg
    );

typedef int32_t tarpc_int;
typedef uint32_t tarpc_uint;
typedef uint8_t tarpc_bool;
typedef uint32_t tarpc_ptr;
typedef uint32_t tarpc_signum;
typedef uint32_t tarpc_waitpid_opts;
typedef uint32_t tarpc_wait_status_flag;
typedef uint32_t tarpc_wait_status_value;
typedef uint32_t tarpc_uid_t;
typedef uint8_t tarpc_uchar;
typedef uint16_t tarpc_usint;
typedef uint64_t tarpc_size_t;
typedef int32_t tarpc_pid_t;
typedef int64_t tarpc_ssize_t;
typedef uint32_t tarpc_socklen_t;
typedef tarpc_ptr tarpc_sigset_t;
typedef tarpc_ptr tarpc_fd_set;
typedef int64_t tarpc_off_t;
typedef int64_t tarpc_rlim_t;
typedef int64_t tarpc_clock_t;
typedef int64_t tarpc_time_t;
typedef int64_t tarpc_suseconds_t;
typedef tarpc_ptr tarpc_aiocb_t;
typedef uint64_t tarpc_pthread_t;
typedef tarpc_ptr tarpc_wsaevent;
typedef tarpc_ptr tarpc_hwnd;
typedef tarpc_ptr tarpc_overlapped;
typedef tarpc_ptr tarpc_handle;
typedef tarpc_ptr tarpc_iomux_state;
typedef uint32_t tarpc_op;
typedef int64_t tarpc_dlhandle;
typedef int64_t tarpc_dlsymaddr;
typedef uint32_t tarpc_ethtool_command;
typedef struct tarpc_void_in tarpc_rpc_is_op_done_in;
typedef struct tarpc_void_in tarpc_rpc_is_alive_in;
typedef struct tarpc_void_out tarpc_rpc_is_alive_out;
typedef struct tarpc_int_retval_out tarpc_setlibname_out;
typedef struct tarpc_socket_out tarpc_dup_out;
typedef struct tarpc_socket_out tarpc_dup2_out;
typedef struct tarpc_socket_out tarpc_dup3_out;
typedef struct tarpc_int_retval_out tarpc_close_out;
typedef struct tarpc_int_retval_out tarpc_shutdown_out;
typedef struct tarpc_stat rpc_stat;
typedef struct tarpc_mkdir_in tarpc_mkdirp_in;
typedef struct tarpc_mkdir_out tarpc_mkdirp_out;
typedef struct tarpc_statvfs tarpc_statvfs;
typedef tarpc_read_out tarpc_pread_out;
typedef struct tarpc_read_in tarpc_write_in;
typedef struct tarpc_pread_in tarpc_pwrite_in;
typedef struct tarpc_ssize_t_retval_out tarpc_write_out;
typedef struct tarpc_write_out tarpc_pwrite_out;
typedef struct tarpc_write_in tarpc_write_and_close_in;
typedef struct tarpc_ssize_t_retval_out tarpc_write_and_close_out;
typedef struct tarpc_read_in tarpc_read_via_splice_in;
typedef struct tarpc_read_out tarpc_read_via_splice_out;
typedef struct tarpc_write_in tarpc_write_via_splice_in;
typedef struct tarpc_write_out tarpc_write_via_splice_out;
typedef struct tarpc_readv_in tarpc_writev_in;
typedef struct tarpc_preadv_in tarpc_pwritev_in;
typedef struct tarpc_preadv2_in tarpc_pwritev2_in;
typedef struct tarpc_readv_out tarpc_preadv_out;
typedef struct tarpc_readv_out tarpc_preadv2_out;
typedef struct tarpc_ssize_t_retval_out tarpc_writev_out;
typedef tarpc_writev_out tarpc_pwritev_out;
typedef tarpc_pwritev_out tarpc_pwritev2_out;
typedef struct tarpc_ssize_t_retval_out tarpc_readbuf_out;
typedef struct tarpc_readbuf_in tarpc_writebuf_in;
typedef struct tarpc_ssize_t_retval_out tarpc_writebuf_out;
typedef struct tarpc_truncate_out tarpc_ftruncate_out;
typedef struct tarpc_int_retval_out tarpc_fsync_out;
typedef struct tarpc_ssize_t_retval_out tarpc_send_out;
typedef struct tarpc_ssize_t_retval_out tarpc_sendbuf_out;
typedef struct tarpc_ssize_t_retval_out tarpc_send_msg_more_out;
typedef struct tarpc_ssize_t_retval_out tarpc_send_one_byte_many_out;
typedef struct tarpc_ssize_t_retval_out tarpc_recvbuf_out;
typedef struct tarpc_ssize_t_retval_out tarpc_sendto_out;
typedef struct tarpc_int_retval_out tarpc_sendmsg_out;
typedef struct tarpc_int_retval_out tarpc_bind_out;
typedef struct tarpc_int_retval_out tarpc_connect_out;
typedef struct tarpc_int_retval_out tarpc_disconnect_ex_out;
typedef struct tarpc_int_retval_out tarpc_listen_out;
typedef struct tarpc_int_retval_out tarpc_transmit_file_out;
typedef struct tarpc_int_retval_out tarpc_transmitfile_tabufs_out;
typedef struct tarpc_int_retval_out tarpc_vm_trasher_out;
typedef struct tarpc_accept_in tarpc_getsockname_in;
typedef struct tarpc_accept_out tarpc_getsockname_out;
typedef struct tarpc_accept_in tarpc_getpeername_in;
typedef struct tarpc_accept_out tarpc_getpeername_out;
typedef struct tarpc_void_in tarpc_fd_set_new_in;
typedef struct tarpc_void_out tarpc_fd_set_delete_out;
typedef struct tarpc_void_out tarpc_do_fd_zero_out;
typedef struct tarpc_int_retval_out tarpc_close_event_out;
typedef struct tarpc_int_retval_out tarpc_reset_event_out;
typedef struct tarpc_int_retval_out tarpc_set_event_out;
typedef struct tarpc_posix_memalign_in tarpc_posix_memalign_in;
typedef struct tarpc_posix_memalign_out tarpc_posix_memalign_out;
typedef struct tarpc_int_retval_out tarpc_memcmp_out;
typedef struct tarpc_void_out tarpc_delete_overlapped_out;
typedef struct tarpc_int_retval_out tarpc_event_select_out;
typedef struct tarpc_void_out tarpc_destroy_window_out;
typedef struct tarpc_int_retval_out tarpc_wsa_async_select_out;
typedef struct tarpc_void_out tarpc_do_fd_set_out;
typedef struct tarpc_void_out tarpc_do_fd_clr_out;
typedef struct tarpc_int_retval_out tarpc_do_fd_isset_out;
typedef struct tarpc_int_retval_out tarpc_epoll_create_out;
typedef struct tarpc_int_retval_out tarpc_epoll_create1_out;
typedef struct tarpc_int_retval_out tarpc_epoll_ctl_out;
typedef struct tarpc_int_retval_out tarpc_setsockopt_out;
typedef struct tarpc_void_out tarpc_if_freenameindex_out;
typedef struct tarpc_int_retval_out tarpc_kill_out;
typedef struct tarpc_int_retval_out tarpc_pthread_kill_out;
typedef struct tarpc_int_retval_out tarpc_call_tgkill_out;
typedef struct tarpc_void_in tarpc_call_gettid_in;
typedef struct tarpc_int_retval_out tarpc_call_gettid_out;
typedef struct tarpc_int_retval_out tarpc_ta_kill_death_out;
typedef struct tarpc_int_retval_out tarpc_ta_kill_and_wait_out;
typedef struct tarpc_void_in tarpc_sigset_new_in;
typedef struct tarpc_void_out tarpc_sigset_delete_out;
typedef struct tarpc_int_retval_out tarpc_sigset_cmp_out;
typedef struct tarpc_int_retval_out tarpc_sigprocmask_out;
typedef struct tarpc_int_retval_out tarpc_sigemptyset_out;
typedef struct tarpc_sigemptyset_in tarpc_sigfillset_in;
typedef struct tarpc_sigemptyset_out tarpc_sigfillset_out;
typedef struct tarpc_sigemptyset_out tarpc_sigaddset_out;
typedef struct tarpc_sigaddset_in tarpc_sigdelset_in;
typedef struct tarpc_sigemptyset_out tarpc_sigdelset_out;
typedef struct tarpc_sigaddset_in tarpc_sigismember_in;
typedef struct tarpc_sigemptyset_out tarpc_sigismember_out;
typedef struct tarpc_sigemptyset_in tarpc_sigpending_in;
typedef struct tarpc_int_retval_out tarpc_sigpending_out;
typedef struct tarpc_sigemptyset_in tarpc_sigsuspend_in;
typedef struct tarpc_int_retval_out tarpc_sigsuspend_out;
typedef struct tarpc_void_in tarpc_sigreceived_in;
typedef struct tarpc_sigset_new_out tarpc_sigreceived_out;
typedef struct tarpc_void_in tarpc_siginfo_received_in;
typedef struct tarpc_siginfo_received_out tarpc_siginfo_received_out;
typedef struct tarpc_void_in tarpc_signal_registrar_cleanup_in;
typedef struct tarpc_void_out tarpc_signal_registrar_cleanup_out;
typedef struct tarpc_void_out tarpc_freeaddrinfo_out;
typedef struct tarpc_int_retval_out tarpc_chroot_out;
typedef struct tarpc_int_retval_out tarpc_copy_ta_libs_out;
typedef struct tarpc_int_retval_out tarpc_rm_ta_libs_out;
typedef struct tarpc_exit_in tarpc__exit_in;
typedef struct tarpc_void_out tarpc_exit_out;
typedef struct tarpc_void_out tarpc__exit_out;
typedef struct tarpc_getuid_in tarpc_geteuid_in;
typedef struct tarpc_getuid_out tarpc_geteuid_out;
typedef struct tarpc_int_retval_out tarpc_setuid_out;
typedef struct tarpc_setuid_in tarpc_seteuid_in;
typedef struct tarpc_setuid_out tarpc_seteuid_out;
typedef struct tarpc_int_retval_out tarpc_getpid_out;
typedef struct tarpc_pthread_self_in tarpc_pthread_self_in;
typedef struct tarpc_pthread_self_out tarpc_pthread_self_out;
typedef struct tarpc_int_retval_out tarpc_pthread_cancel_out;
typedef struct tarpc_int_retval_out tarpc_access_out;
typedef struct tarpc_void_out tarpc_fill_aiocb_out;
typedef struct tarpc_void_out tarpc_delete_aiocb_out;
typedef struct tarpc_int_retval_out tarpc_aio_read_out;
typedef struct tarpc_int_retval_out tarpc_aio_write_out;
typedef struct tarpc_ssize_t_retval_out tarpc_aio_return_out;
typedef struct tarpc_int_retval_out tarpc_aio_error_out;
typedef struct tarpc_int_retval_out tarpc_aio_cancel_out;
typedef struct tarpc_ssize_t_retval_out tarpc_aio_fsync_out;
typedef struct tarpc_int_retval_out tarpc_aio_suspend_out;
typedef struct tarpc_int_retval_out tarpc_lio_listio_out;
typedef struct tarpc_int_retval_out tarpc_wait_readable_out;
typedef struct tarpc_pat_gen_arg tarpc_pat_gen_arg;
typedef struct tarpc_pattern_sender_out tarpc_pattern_receiver_out;
typedef struct tarpc_int_retval_out tarpc_thread_cancel_out;
typedef struct tarpc_int_retval_out tarpc_thread_join_out;
typedef struct tarpc_ssize_t_retval_out tarpc_socket_to_file_out;
typedef struct tarpc_ssize_t_retval_out tarpc_wsa_send_disconnect_out;
typedef struct tarpc_int_retval_out tarpc_iomux_close_state_out;
typedef struct tarpc_int_retval_out tarpc_setrlimit_out;
typedef struct tarpc_int_retval_out tarpc_power_sw_out;
typedef struct tarpc_ta_dlsym_in tarpc_ta_dlsym_call_in;
typedef struct tarpc_int_retval_out tarpc_ta_dlsym_call_out;
typedef struct tarpc_int_retval_out tarpc_ta_dlclose_out;
typedef struct tarpc_int_retval_out tarpc_socket_connect_close_out;
typedef struct tarpc_int_retval_out tarpc_socket_listen_close_out;
typedef struct tarpc_int_retval_out tarpc_vfork_pipe_exec_out;
typedef struct tarpc_int_retval_out tarpc_execve_gen_out;
typedef struct tarpc_void_out tarpc_release_rpc_ptr_out;
typedef struct tarpc_int_retval_out tarpc_rpcserver_plugin_enable_out;
typedef struct tarpc_void_in tarpc_rpcserver_plugin_disable_in;
typedef struct tarpc_int_retval_out tarpc_rpcserver_plugin_disable_out;
typedef struct tarpc_int_retval_out tarpc_remove_dir_with_files_out;
typedef struct tarpc_int_retval_out tarpc_clock_settime_out;
typedef struct tarpc_int_retval_out tarpc_xsk_umem__delete_out;
typedef struct tarpc_int_retval_out tarpc_xsk_socket__delete_out;
typedef struct tarpc_int_retval_out tarpc_xsk_map_set_out;
typedef struct tarpc_ssize_t_retval_out tarpc_xsk_rx_fill_simple_out;
typedef struct tarpc_int_retval_out tarpc_xsk_send_simple_out;
typedef struct tarpc_int_retval_out tarpc_bpf_obj_get_out;
typedef tarpc_ptr tarpc_rte_mempool;
typedef tarpc_ptr tarpc_rte_mbuf;
typedef tarpc_ptr tarpc_rte_ring;
typedef uint64_t tarpc_rss_hash_protos_t;
typedef struct tarpc_int_retval_out tarpc_rte_eal_init_out;
typedef struct tarpc_int_retval_out tarpc_rte_eal_hotplug_add_out;
typedef struct tarpc_int_retval_out tarpc_rte_eal_hotplug_remove_out;
typedef struct tarpc_void_out tarpc_rte_mempool_free_out;
typedef struct tarpc_mbuf_retval_out tarpc_rte_pktmbuf_alloc_out;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_free_in;
typedef struct tarpc_void_out tarpc_rte_pktmbuf_free_out;
typedef struct tarpc_void_out tarpc_rte_pktmbuf_free_array_out;
typedef struct tarpc_int_retval_out tarpc_rte_pktmbuf_append_data_out;
typedef struct tarpc_mbuf_retval_out tarpc_rte_pktmbuf_clone_out;
typedef struct tarpc_int_retval_out tarpc_rte_pktmbuf_prepend_data_out;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_next_in;
typedef struct tarpc_mbuf_retval_out tarpc_rte_pktmbuf_get_next_out;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_pkt_len_in;
typedef struct tarpc_int_retval_out tarpc_rte_pktmbuf_chain_out;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_nb_segs_in;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_port_in;
typedef struct tarpc_void_out tarpc_rte_pktmbuf_set_port_out;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_data_len_in;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_vlan_tci_in;
typedef struct tarpc_void_out tarpc_rte_pktmbuf_set_vlan_tci_out;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_vlan_tci_outer_in;
typedef struct tarpc_void_out tarpc_rte_pktmbuf_set_vlan_tci_outer_out;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_flags_in;
typedef struct tarpc_int_retval_out tarpc_rte_pktmbuf_set_flags_out;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_pool_in;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_headroom_in;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_tailroom_in;
typedef struct tarpc_int_retval_out tarpc_rte_pktmbuf_trim_out;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_packet_type_in;
typedef struct tarpc_int_retval_out tarpc_rte_pktmbuf_set_packet_type_out;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_rss_hash_in;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_fdir_id_in;
typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_tx_offload_in;
typedef struct tarpc_void_out tarpc_rte_pktmbuf_set_tx_offload_out;
typedef struct tarpc_void_out tarpc_rte_pktmbuf_refcnt_update_out;
typedef struct tarpc_void_out tarpc_rte_ring_free_out;
typedef struct tarpc_int_retval_out tarpc_rte_ring_enqueue_mbuf_out;
typedef struct tarpc_mbuf_retval_out tarpc_rte_ring_dequeue_mbuf_out;
typedef struct tarpc_mbuf_in tarpc_rte_mbuf_match_tx_rx_pre_in;
typedef struct tarpc_int_retval_out tarpc_rte_mbuf_match_tx_rx_pre_out;
typedef struct tarpc_void_out tarpc_rte_eth_stats_reset_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_info_get_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_configure_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_close_in;
typedef struct tarpc_void_out tarpc_rte_eth_dev_close_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_reset_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_reset_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_start_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_start_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_stop_in;
typedef struct tarpc_void_out tarpc_rte_eth_dev_stop_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_tx_queue_setup_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_rx_queue_setup_out;
typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_dev_rx_intr_enable_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_rx_intr_enable_out;
typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_dev_rx_intr_disable_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_rx_intr_disable_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_rx_intr_ctl_q_out;
typedef struct tarpc_rte_eth_tx_burst_in tarpc_rte_eth_tx_prepare_in;
typedef struct tarpc_rte_eth_tx_burst_out tarpc_rte_eth_tx_prepare_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_set_link_up_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_set_link_up_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_set_link_down_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_set_link_down_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_promiscuous_enable_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_promiscuous_enable_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_promiscuous_disable_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_promiscuous_disable_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_promiscuous_get_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_promiscuous_get_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_allmulticast_enable_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_allmulticast_enable_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_allmulticast_disable_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_allmulticast_disable_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_allmulticast_get_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_allmulticast_get_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_set_mtu_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_vlan_filter_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_set_vlan_strip_on_queue_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_set_vlan_ether_type_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_set_vlan_offload_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_get_vlan_offload_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_get_vlan_offload_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_set_vlan_pvid_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_rx_queue_count_out;
typedef struct tarpc_descriptor_status_in tarpc_rte_eth_rx_descriptor_status_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_rx_descriptor_status_out;
typedef struct tarpc_descriptor_status_in tarpc_rte_eth_tx_descriptor_status_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_tx_descriptor_status_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_socket_id_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_socket_id_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_is_valid_port_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_is_valid_port_out;
typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_dev_rx_queue_start_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_rx_queue_start_out;
typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_dev_rx_queue_stop_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_rx_queue_stop_out;
typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_dev_tx_queue_start_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_tx_queue_start_out;
typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_dev_tx_queue_stop_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_tx_queue_stop_out;
typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_rx_queue_info_get_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_default_mac_addr_set_out;
typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_tx_queue_info_get_in;
typedef struct tarpc_int_retval_out tarpc_rte_vlan_strip_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_rss_reta_update_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_flow_ctrl_get_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_flow_ctrl_set_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_rss_hash_update_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_link_get_nowait_in;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_link_get_in;
typedef struct tarpc_void_out tarpc_rte_eth_xstats_reset_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_set_mc_addr_list_out;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_udp_tunnel_port_add_out;
typedef struct tarpc_rte_eth_dev_udp_tunnel_port_add_in tarpc_rte_eth_dev_udp_tunnel_port_delete_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_dev_udp_tunnel_port_delete_out;
typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_get_name_by_port_in;
typedef tarpc_ptr tarpc_rte_flow_attr;
typedef tarpc_ptr tarpc_rte_flow_item;
typedef tarpc_ptr tarpc_rte_flow_action;
typedef tarpc_ptr tarpc_rte_flow;
typedef struct tarpc_void_out tarpc_rte_free_flow_rule_out;
typedef struct tarpc_rte_flow_validate_in tarpc_rte_flow_create_in;
typedef struct tarpc_rte_flow_validate_out tarpc_rte_flow_destroy_out;
typedef struct tarpc_rte_flow_validate_out tarpc_rte_flow_flush_out;
typedef struct tarpc_rte_flow_validate_out tarpc_rte_flow_isolate_out;
typedef struct tarpc_void_out tarpc_rte_flow_release_united_actions_out;
typedef struct tarpc_void_out tarpc_rte_flow_release_united_items_out;
typedef struct tarpc_int_retval_out tarpc_dpdk_eth_await_link_up_out;
typedef struct tarpc_void_in tarpc_dpdk_get_version_in;
typedef struct tarpc_void_in tarpc_dpdk_find_representors_in;
typedef struct tarpc_int_retval_out tarpc_rte_eth_fec_set_out;
typedef struct tarpc_serial_open_in tarpc_serial_open_in;
typedef struct tarpc_serial_open_out tarpc_serial_open_out;
typedef struct tarpc_serial_read_in tarpc_serial_read_in;
typedef struct tarpc_serial_read_out tarpc_serial_read_out;
typedef struct tarpc_serial_common_in tarpc_serial_common_in;
typedef struct tarpc_serial_common_out tarpc_serial_common_out;
typedef tarpc_serial_common_in tarpc_serial_close_in;
typedef tarpc_serial_common_out tarpc_serial_close_out;
typedef tarpc_serial_common_in tarpc_serial_spy_in;
typedef tarpc_serial_common_out tarpc_serial_spy_out;
typedef tarpc_serial_common_in tarpc_serial_force_rw_in;
typedef tarpc_serial_common_out tarpc_serial_force_rw_out;
typedef tarpc_serial_common_in tarpc_serial_send_enter_in;
typedef tarpc_serial_common_out tarpc_serial_send_enter_out;
typedef tarpc_serial_common_in tarpc_serial_send_ctrl_c_in;
typedef tarpc_serial_common_out tarpc_serial_send_ctrl_c_out;
typedef struct tarpc_serial_flush_in tarpc_serial_flush_in;
typedef tarpc_serial_common_out tarpc_serial_flush_out;
typedef struct tarpc_serial_send_str_in tarpc_serial_send_str_in;
typedef struct tarpc_serial_send_str_out tarpc_serial_send_str_out;
typedef struct tarpc_serial_check_pattern_in tarpc_serial_check_pattern_in;
typedef struct tarpc_serial_check_pattern_out tarpc_serial_check_pattern_out;
typedef struct tarpc_serial_wait_pattern_in tarpc_serial_wait_pattern_in;
typedef struct tarpc_serial_check_pattern_out tarpc_serial_wait_pattern_out;
typedef enum rpc_xml_op rpc_xml_op;
typedef struct xml_app_data xml_app_data;
typedef struct te_xdp_frame te_xdp_frame;
typedef struct ta_job_manager_t ta_job_manager_t;
typedef enum ta_job_status_type_t ta_job_status_type_t;
typedef struct ta_job_status_t ta_job_status_t;
typedef struct ta_job_buffer_t ta_job_buffer_t;
typedef enum ta_job_wrapper_priority_t ta_job_wrapper_priority_t;
typedef struct restconf_settings restconf_settings;
typedef struct tad_atm_cell_ctrl_data tad_atm_cell_ctrl_data;
typedef struct bridge_csap_specific_data* bridge_csap_specific_data_p;
typedef struct bridge_csap_specific_data bridge_csap_specific_data_t;
typedef enum cli_conn_type cli_conn_type_t;
typedef struct cli_csap_prompt cli_csap_prompt;
typedef struct cli_csap_prompts cli_csap_prompts_t;
typedef struct cli_csap_specific_data* cli_csap_specific_data_p;
typedef struct cli_csap_specific_data cli_csap_specific_data_t;

typedef void (*csap_id_enum_cb)(
    csap_handle_t csap_id,
    void *ptr,
    void *opaque
    );

typedef struct dhcp_csap_specific_data dhcp_csap_specific_data_t;
typedef struct tad_eth_rw_data tad_eth_rw_data;
typedef struct sendq_entry_s sendq_entry_t;
typedef struct sendq_s sendq_t;
typedef struct igmp_csap_specific_data* igmp_csap_specific_data_p;
typedef struct igmp_csap_specific_data igmp_csap_specific_data_t;
typedef struct tcp_csap_specific_data tcp_csap_specific_data_t;
typedef struct tad_iscsi_layer_data tad_iscsi_layer_data;
typedef struct ppp_csap_specific_data* ppp_csap_specific_data_p;
typedef struct ppp_csap_specific_data ppp_csap_specific_data_t;
typedef struct pppoe_csap_specific_data* pppoe_csap_specific_data_p;
typedef struct pppoe_csap_specific_data pppoe_csap_specific_data_t;
typedef struct tad_rte_mbuf_rw_data tad_rte_mbuf_rw_data;
typedef struct snmp_csap_specific_data* snmp_csap_specific_data_p;
typedef struct snmp_csap_specific_data snmp_csap_specific_data_t;
typedef struct tad_socket_rw_data tad_socket_rw_data;
typedef struct tad_bps_pkt_frag tad_bps_pkt_frag;
typedef struct tad_bps_pkt_frag_def tad_bps_pkt_frag_def;
typedef struct tad_bps_pkt_frag_data tad_bps_pkt_frag_data;
typedef struct csap_instance csap_instance;
typedef struct csap_layer_t csap_layer_t;
typedef struct tad_tmpl_arg_t tad_tmpl_arg_t;
typedef void (*csap_spt_unregister_cb_t)(void);

typedef te_errno (*csap_layer_init_cb_t)(
    csap_p csap,
    unsigned int layer
    );

typedef te_errno (*csap_layer_destroy_cb_t)(
    csap_p csap,
    unsigned int layer
    );

typedef char* (*csap_layer_get_param_cb_t)(
    csap_p csap,
    unsigned int layer,
    const char *param
    );

typedef te_errno (*csap_layer_confirm_pdu_cb_t)(
    csap_p csap,
    unsigned int layer,
    asn_value *layer_pdu,
    void **p_opaque
    );

typedef void (*csap_layer_release_opaque_cb_t)(
    csap_p csap,
    unsigned int layer,
    void *opaque
    );

typedef te_errno (*csap_layer_generate_pkts_cb_t)(
    csap_p csap,
    unsigned int layer,
    const asn_value *tmpl_pdu,
    void *opaque,
    const tad_tmpl_arg_t *args,
    size_t arg_num,
    tad_pkts *sdus,
    tad_pkts *pdus
    );

typedef te_errno (*csap_layer_match_pre_cb_t)(
    csap_p csap,
    unsigned int layer,
    tad_recv_pkt_layer *meta_pkt_layer
    );

typedef csap_layer_match_pre_cb_t csap_layer_match_post_cb_t;

typedef te_errno (*csap_layer_match_do_cb_t)(
    csap_p csap,
    unsigned int layer,
    const asn_value *ptrn_pdu,
    void *ptrn_opaque,
    tad_recv_pkt *meta_pkt,
    tad_pkt *pdu,
    tad_pkt *sdu
    );

typedef csap_layer_match_do_cb_t csap_layer_match_done_cb_t;

typedef te_errno (*csap_layer_gen_pattern_cb_t)(
    csap_p csap,
    unsigned int layer,
    const asn_value *tmpl_pdu,
    asn_value **pattern_pdu
    );

typedef te_errno (*csap_rw_init_cb_t)(csap_p csap);
typedef te_errno (*csap_rw_destroy_cb_t)(csap_p csap);
typedef te_errno (*csap_low_resource_cb_t)(csap_p csap);

typedef te_errno (*csap_read_cb_t)(
    csap_p csap,
    unsigned int timeout,
    tad_pkt *pkt,
    size_t *pkt_len
    );

typedef te_errno (*csap_write_cb_t)(
    csap_p csap,
    const tad_pkt *pkt
    );

typedef te_errno (*csap_write_read_cb_t)(
    csap_p csap,
    unsigned int timeout,
    const tad_pkt *w_pkt,
    tad_pkt *r_pkt,
    size_t *r_pkt_len
    );

typedef struct csap_spt_type_t* csap_spt_type_p;
typedef struct csap_spt_type_t csap_spt_type_t;
typedef struct tad_eth_sap tad_eth_sap;
typedef struct tad_pkt_seg tad_pkt_seg;
typedef struct tad_pkt tad_pkt;
typedef struct tad_pkts tad_pkts;

typedef void (*tad_pkt_seg_free)(
    void *ptr,
    size_t len
    );

typedef void (*tad_pkt_ctrl_free)(void *ptr);

typedef te_errno (*tad_pkt_seg_enum_cb)(
    const tad_pkt *pkt,
    tad_pkt_seg *seg,
    unsigned int seg_num,
    void *opaque
    );

typedef te_errno (*tad_pkt_enum_cb)(
    tad_pkt *pkt,
    void *opaque
    );

typedef struct tad_poll_context tad_poll_context;

typedef te_errno (*tad_processing_pkt_method)(
    csap_p csap,
    const char *usr_param,
    const uint8_t *pkt,
    size_t pkt_len
    );

typedef struct tad_action_spec tad_action_spec;
typedef struct tad_recv_ptrn_unit_data tad_recv_ptrn_unit_data;
typedef struct tad_recv_pattern_data tad_recv_pattern_data;
typedef struct tad_recv_context tad_recv_context;
typedef struct tad_recv_op_context tad_recv_op_context;
typedef struct tad_recv_pkt_layer tad_recv_pkt_layer;
typedef struct tad_recv_pkt tad_recv_pkt;

typedef te_errno() tad_reply_op_status(
    void *,
    te_errno
    );

typedef te_errno() tad_reply_op_poll(
    void *,
    te_errno,
    unsigned int
    );

typedef te_errno() tad_reply_op_pkts(
    void *,
    te_errno,
    unsigned int
    );

typedef te_errno() tad_reply_op_pkt(
    void *,
    const asn_value *
    );

typedef struct tad_reply_spec tad_reply_spec;
typedef struct tad_reply_context tad_reply_context;
typedef struct tad_rte_mbuf_sap tad_rte_mbuf_sap;
typedef struct tad_send_tmpl_unit_data tad_send_tmpl_unit_data;
typedef struct tad_send_template_data tad_send_template_data;
typedef struct tad_send_context tad_send_context;

typedef te_errno (*tad_special_send_pkt_cb)(
    csap_p csap,
    const char *usr_param,
    tad_pkts *pkts
    );

typedef struct tad_int_expr_t tad_int_expr_t;
typedef struct tad_du_data_t tad_du_data_t;

typedef int (*tad_user_generate_method)(
    int csap_id,
    int layer,
    asn_value *tmpl
    );

typedef struct csap_instance* csap_p;

typedef te_errno (*tapi_cache_cb)(
    const char *oid,
    void *opaque
    );

typedef struct tapi_rt_entry tapi_rt_entry_t;
typedef struct tapi_cfg_rt_nexthop tapi_cfg_rt_nexthop;
typedef struct tapi_cfg_rt_params tapi_cfg_rt_params;
typedef enum arl_entry_type arl_entry_type;
typedef struct arl_entry_t arl_entry_t;
typedef enum tapi_cfg_base_ta_dir tapi_cfg_base_ta_dir;
typedef struct tapi_cfg_base_loadavg tapi_cfg_base_loadavg;

typedef te_errno tapi_cfg_changed_callback(
    const char *tag,
    size_t start,
    size_t len,
    void *ctx
    );

typedef struct tapi_cpu_index_t tapi_cpu_index_t;
typedef struct tapi_cpu_prop_t tapi_cpu_prop_t;
typedef enum tapi_cfg_if_chan tapi_cfg_if_chan;
typedef struct tapi_cfg_if_fc tapi_cfg_if_fc;
typedef struct tapi_cfg_if_rss_hfunc tapi_cfg_if_rss_hfunc;
typedef struct tapi_rt_ip_rule_entry tapi_rt_ip_rule_entry;
typedef enum tapi_cfg_key_manager tapi_cfg_key_manager;
typedef enum tapi_cfg_key_type tapi_cfg_key_type;
typedef enum tapi_cfg_key_size tapi_cfg_key_size;
typedef enum tapi_cfg_key_mode tapi_cfg_key_mode;
typedef struct l2tp_ipaddr_range l2tp_ipaddr_range;
typedef struct l2tp_ppp_secret l2tp_ppp_secret;
typedef struct l2tp_auth l2tp_auth;
typedef struct cfg_net_node_t cfg_net_node_t;
typedef enum cfg_nat_setup_t cfg_nat_setup_t;
typedef struct cfg_net_t cfg_net_t;
typedef struct cfg_nets_t cfg_nets_t;
typedef struct cfg_net_pci_info_t cfg_net_pci_info_t;

typedef te_errno tapi_cfg_net_node_cb(
    cfg_net_t *net,
    cfg_net_node_t *node,
    const char *str,
    cfg_oid *oid,
    void *cookie
    );

typedef struct tapi_cfg_net_assigned tapi_cfg_net_assigned;
typedef enum te_nginx_cpu_aff_mode te_nginx_cpu_aff_mode;
typedef enum te_nginx_server_tokens_mode te_nginx_server_tokens_mode;
typedef const char* tapi_openvpn_id;
typedef const char* tapi_openvpn_prop;

typedef te_errno (*tapi_cfg_openvpn_int_param_set)(
    const char *ta,
    tapi_openvpn_id id,
    int val
    );

typedef te_errno (*tapi_cfg_openvpn_str_param_set)(
    const char *ta,
    tapi_openvpn_id id,
    const char *val
    );

typedef enum tapi_cfg_ovs_cfg_type tapi_cfg_ovs_cfg_type;
typedef struct tapi_cfg_ovs_cfg tapi_cfg_ovs_cfg;
typedef enum tapi_cfg_pci_param_cmode tapi_cfg_pci_param_cmode;
typedef enum tapi_cfg_ps_exit_status_type_t tapi_cfg_ps_exit_status_type_t;
typedef struct tapi_cfg_ps_exit_status_t tapi_cfg_ps_exit_status_t;
typedef enum tapi_cfg_qdisc_kind_t tapi_cfg_qdisc_kind_t;
typedef enum tapi_cfg_rx_rule_spec_loc tapi_cfg_rx_rule_spec_loc;
typedef enum tapi_cfg_rx_rule_flow tapi_cfg_rx_rule_flow;
typedef const char* tapi_socks_id;
typedef const char* tapi_socks_user_id;
typedef const char* tapi_socks_proto_id;
typedef const char* tapi_socks_cipher_id;
typedef const char* tapi_socks_interface_id;
typedef enum te_socks_impl te_socks_impl;
typedef struct tapi_cfg_if_stats tapi_cfg_if_stats;
typedef struct tapi_cfg_net_stats_ipv4 tapi_cfg_net_stats_ipv4;
typedef struct tapi_cfg_net_stats_icmp tapi_cfg_net_stats_icmp;
typedef struct tapi_cfg_net_stats tapi_cfg_net_stats;

typedef te_errno (*tapi_host_ns_if_cb_func)(
    const char *ta,
    const char *ifname,
    void *opaque
    );

typedef struct tapi_jmp_point tapi_jmp_point;
typedef struct tapi_route_gateway tapi_route_gateway;
typedef struct tapi_parser_id tapi_parser_id;
typedef struct tapi_sniffer_id tapi_sniffer_id;
typedef struct tapi_sniff_list_s tapi_sniff_list_s;
typedef struct sniffl_h_t sniffl_h_t;
typedef enum sapi_buf_size sapi_buf_size;
typedef struct tapi_test_expected_result tapi_test_expected_result;
typedef struct test_behaviour test_behaviour;
typedef enum tapi_bpf_state tapi_bpf_state;
typedef enum tapi_bpf_prog_type tapi_bpf_prog_type;
typedef enum tapi_bpf_map_type tapi_bpf_map_type;
typedef enum tapi_bpf_link_point tapi_bpf_link_point;
typedef enum tapi_bpf_xdp_action tapi_bpf_xdp_action;
typedef struct tapi_bpf_lpm_trie_key tapi_bpf_lpm_trie_key;
typedef struct tapi_bpf_rxq_stats tapi_bpf_rxq_stats;
typedef enum tapi_bpf_stim_type tapi_bpf_stim_type;
typedef struct tapi_bpf_stim_ctx tapi_bpf_stim_ctx;
typedef struct tapi_bpf_stim_hdl tapi_bpf_stim_hdl;
typedef enum tapi_dns_unbound_verbose tapi_dns_unbound_verbose;
typedef struct tapi_dns_unbound_cfg_address tapi_dns_unbound_cfg_address;
typedef enum tapi_dns_unbound_cfg_ac_action tapi_dns_unbound_cfg_ac_action;
typedef struct tapi_dns_unbound_cfg_ac tapi_dns_unbound_cfg_ac;
typedef struct tapi_dns_unbound_cfg_auth_zone tapi_dns_unbound_cfg_auth_zone;
typedef struct tapi_dns_unbound_cfg_opt tapi_dns_unbound_cfg_opt;
typedef struct tapi_dns_unbound_opt tapi_dns_unbound_opt;
typedef struct tapi_dns_unbound_app tapi_dns_unbound_app;
typedef struct tapi_dns_unbound_cfg_opt tapi_dns_unbound_cfg_opt;
typedef enum tapi_dns_zone_file_rr_type tapi_dns_zone_file_rr_type;
typedef enum tapi_dns_zone_file_rr_class tapi_dns_zone_file_rr_class;
typedef struct tapi_dns_zone_file_rr_a tapi_dns_zone_file_rr_a;
typedef struct tapi_dns_zone_file_rr_soa tapi_dns_zone_file_rr_soa;
typedef struct tapi_dns_zone_file_rr_ns tapi_dns_zone_file_rr_ns;
typedef struct tapi_dns_zone_file_rr_data tapi_dns_zone_file_rr_data;
typedef struct tapi_dns_zone_file_rr tapi_dns_zone_file_rr;
typedef struct tapi_dnsperf_app tapi_dnsperf_app;
typedef struct tapi_dnsperf_report tapi_dnsperf_report;
typedef enum tapi_dnsperf_addr_family tapi_dnsperf_addr_family;
typedef enum tapi_dnsperf_transport_mode tapi_dnsperf_transport_mode;
typedef struct tapi_dnsperf_opt tapi_dnsperf_opt;
typedef struct tapi_dpdk_testpmd_job_t tapi_dpdk_testpmd_job_t;
typedef struct tapi_dpdk_l2fwd_job_t tapi_dpdk_l2fwd_job_t;
typedef struct cfg_handle_tqe cfg_handle_tqe;
typedef struct tapi_env_net tapi_env_net;
typedef struct tapi_env_host tapi_env_host;
typedef struct tapi_env_if tapi_env_if;
typedef struct tapi_env_ps_if tapi_env_ps_if;
typedef struct tapi_env_process tapi_env_process;
typedef struct tapi_env_pco tapi_env_pco;
typedef struct tapi_env_addr tapi_env_addr;
typedef struct tapi_env_alias tapi_env_alias;
typedef struct tapi_env tapi_env;

typedef void tapi_env_foreach_if_fn(
    tapi_env_if *iface,
    void *opaque
    );

typedef struct tapi_fio_report_lat tapi_fio_report_lat;
typedef struct tapi_fio_report_bw tapi_fio_report_bw;
typedef struct tapi_fio_report_percentiles tapi_fio_report_percentiles;
typedef struct tapi_fio_report_clat tapi_fio_report_clat;
typedef struct tapi_fio_report_iops tapi_fio_report_iops;
typedef struct tapi_fio_report_io tapi_fio_report_io;
typedef struct tapi_fio_report tapi_fio_report;
typedef struct tapi_fio_numjobs_t tapi_fio_numjobs_t;
typedef struct tapi_fio_opts tapi_fio_opts;
typedef struct tapi_fio_app tapi_fio_app;
typedef struct tapi_fio tapi_fio;
typedef te_errno (*tapi_fio_method_start)(tapi_fio *fio);

typedef te_errno (*tapi_fio_method_wait)(
    tapi_fio *fio,
    int16_t timeout_sec
    );

typedef te_errno (*tapi_fio_method_stop)(tapi_fio *fio);

typedef te_errno (*tapi_fio_method_get_report)(
    tapi_fio *fio,
    tapi_fio_report *report
    );

typedef struct tapi_fio_methods tapi_fio_methods;
typedef struct tapi_gtest_impl tapi_gtest_impl;
typedef struct tapi_gtest tapi_gtest;
typedef enum cfg_job_exit_status_type_t cfg_job_exit_status_type_t;
typedef struct cfg_job_exit_status_t cfg_job_exit_status_t;
typedef struct tapi_job_factory_t tapi_job_factory_t;
typedef struct tapi_job_t tapi_job_t;
typedef struct tapi_job_wrapper_t tapi_job_wrapper_t;
typedef struct tapi_job_channel_t tapi_job_channel_t;
typedef tapi_job_channel_t* tapi_job_channel_set_t[];
typedef struct tapi_job_simple_filter_t tapi_job_simple_filter_t;
typedef struct tapi_job_simple_desc_t tapi_job_simple_desc_t;
typedef struct tapi_job_status_t tapi_job_status_t;
typedef struct tapi_job_buffer_t tapi_job_buffer_t;
typedef enum tapi_job_exec_param_type tapi_job_exec_param_type;
typedef enum tapi_job_sched_param_type tapi_job_sched_param_type;
typedef struct tapi_job_exec_param tapi_job_exec_param;
typedef tapi_job_exec_param tapi_job_sched_param;
typedef struct tapi_job_exec_affinity_param tapi_job_exec_affinity_param;
typedef tapi_job_exec_affinity_param tapi_job_sched_affinity_param;
typedef struct tapi_job_exec_priority_param tapi_job_exec_priority_param;
typedef tapi_job_exec_priority_param tapi_job_sched_priority_param;
typedef struct tapi_job_exec_workdir_param tapi_job_exec_workdir_param;

typedef te_errno() tapi_job_method_create(
    tapi_job_t *job,
    const char *spawner,
    const char *program,
    const char **argv,
    const char **env
    );

typedef te_errno() tapi_job_method_start(const tapi_job_t *job);

typedef te_errno() tapi_job_method_allocate_channels(
    const tapi_job_t *job,
    bool input_channels,
    unsigned int n_channels,
    unsigned int *channels
    );

typedef te_errno() tapi_job_method_kill(
    const tapi_job_t *job,
    int signo
    );

typedef te_errno() tapi_job_method_killpg(
    const tapi_job_t *job,
    int signo
    );

typedef te_errno() tapi_job_method_wait(
    const tapi_job_t *job,
    int timeout_ms,
    tapi_job_status_t *status
    );

typedef te_errno() tapi_job_method_stop(
    const tapi_job_t *job,
    int signo,
    int term_timeout_ms
    );

typedef te_errno() tapi_job_method_destroy(
    const tapi_job_t *job,
    int term_timeout_ms
    );

typedef te_errno() tapi_job_method_set_workdir(
    const tapi_job_t *job,
    const char *dir
    );

typedef te_errno() tapi_job_method_wrapper_add(
    const tapi_job_t *job,
    const char *tool,
    const char **argv,
    tapi_job_wrapper_priority_t priority,
    unsigned int *wrapper_id
    );

typedef te_errno() tapi_job_method_wrapper_delete(
    const tapi_job_t *job,
    unsigned int wrapper_id
    );

typedef te_errno() tapi_job_method_add_exec_param(
    const tapi_job_t *job,
    tapi_job_exec_param *exec_param
    );

typedef te_errno() tapi_job_method_add_sched_param(
    const tapi_job_t *job,
    tapi_job_sched_param *sched_param
    );

typedef te_errno() tapi_job_method_set_autorestart(
    const tapi_job_t *job,
    unsigned int value
    );

typedef te_errno() tapi_job_method_get_autorestart(
    const tapi_job_t *job,
    unsigned int *value
    );

typedef te_errno() tapi_job_method_recreate(
    tapi_job_t *job,
    const void *identifier
    );

typedef struct tapi_job_methods_t tapi_job_methods_t;

typedef te_errno (*tapi_job_opt_arg_format)(
    const void *opt,
    const void *priv,
    te_vec *arg
    );

typedef struct tapi_job_opt_bind tapi_job_opt_bind;
typedef struct tapi_job_opt_array tapi_job_opt_array;
typedef struct tapi_job_opt_struct tapi_job_opt_struct;
typedef te_optional_uint_t tapi_job_opt_uint_t;
typedef te_optional_uintmax_t tapi_job_opt_uintmax_t;
typedef te_optional_double_t tapi_job_opt_double_t;
typedef struct tapi_media_file_metadata tapi_media_file_metadata;
typedef struct tapi_media_file tapi_media_file;
typedef enum tapi_media_player_client tapi_media_player_client;
typedef enum tapi_media_player_error tapi_media_player_error;
typedef struct tapi_media_player tapi_media_player;

typedef te_errno (*tapi_media_player_method_play)(
    tapi_media_player *player,
    const char *source,
    const char *options
    );

typedef te_errno (*tapi_media_player_method_stop)(tapi_media_player *player);
typedef te_errno (*tapi_media_player_method_get_errors)(tapi_media_player *player);
typedef struct tapi_media_player_methods tapi_media_player_methods;
typedef const char* tapi_nvme_subnqn;

typedef te_errno (*tapi_nvme_target_method_init)(
    struct tapi_nvme_target *tgt,
    void *opts
    );

typedef te_errno (*tapi_nvme_target_method_setup)(struct tapi_nvme_target *tgt);
typedef void (*tapi_nvme_target_method_cleanup)(struct tapi_nvme_target *tgt);
typedef void (*tapi_nvme_target_method_fini)(struct tapi_nvme_target *tgt);
typedef struct tapi_nvme_target_methods tapi_nvme_target_methods;
typedef struct tapi_nvme_target tapi_nvme_target;
typedef struct tapi_nvme_host_ctrl tapi_nvme_host_ctrl;
typedef struct tapi_nvme_connect_opts tapi_nvme_connect_opts;
typedef enum tapi_nvme_feature tapi_nvme_feature;
typedef bool bool struct tapi_nvme_internal_dirinfo tapi_nvme_internal_dirinfo;
typedef struct tapi_nvme_onvme_target_opts tapi_nvme_onvme_target_opts;
typedef struct tapi_nvme_onvme_target_proc tapi_nvme_onvme_target_proc;
typedef struct tapi_packetdrill_opts tapi_packetdrill_opts;
typedef struct tapi_packetdrill_app tapi_packetdrill_app;
typedef struct tapi_perf_error_map tapi_perf_error_map;
typedef enum tapi_perf_bench tapi_perf_bench;
typedef enum tapi_perf_error tapi_perf_error;
typedef enum tapi_perf_report_kind tapi_perf_report_kind;
typedef struct tapi_perf_report tapi_perf_report;
typedef struct tapi_perf_server tapi_perf_server;
typedef struct tapi_perf_opts tapi_perf_opts;

typedef void (*tapi_perf_server_method_build_args)(
    te_vec *args,
    const tapi_perf_opts *options
    );

typedef te_errno (*tapi_perf_server_method_get_report)(
    tapi_perf_server *server,
    tapi_perf_report_kind kind,
    tapi_perf_report *report
    );

typedef struct tapi_perf_server_methods tapi_perf_server_methods;
typedef struct tapi_perf_client tapi_perf_client;

typedef void (*tapi_perf_client_method_build_args)(
    te_vec *args,
    const tapi_perf_opts *options
    );

typedef te_errno (*tapi_perf_client_method_wait)(
    tapi_perf_client *client,
    int16_t timeout
    );

typedef te_errno (*tapi_perf_client_method_get_report)(
    tapi_perf_client *client,
    tapi_perf_report_kind kind,
    tapi_perf_report *report
    );

typedef struct tapi_perf_client_methods tapi_perf_client_methods;
typedef struct tapi_perf_app tapi_perf_app;
typedef uint8_t tapi_radius_attr_type_t;

typedef void (*radius_callback)(
    const tapi_radius_packet_t *pkt,
    void *userdata
    );

typedef struct tapi_radius_pkt_handler_data tapi_radius_pkt_handler_data;
typedef struct tapi_radius_serv_s tapi_radius_serv_t;
typedef struct tapi_radius_clnt_s tapi_radius_clnt_t;
typedef struct tapi_auth_tls_s tapi_auth_tls_t;
typedef struct tapi_auth_info_s tapi_auth_info_t;
typedef struct tapi_auth_wifi_s tapi_auth_wifi_t;
typedef enum tapi_iomux_evt tapi_iomux_evt;
typedef struct tapi_iomux_handle tapi_iomux_handle;
typedef struct tapi_iomux_evt_fd tapi_iomux_evt_fd;
typedef void (*tapi_iomux_method_create)(tapi_iomux_handle *iomux);

typedef void (*tapi_iomux_method_add)(
    tapi_iomux_handle *iomux,
    int fd,
    tapi_iomux_evt evt
    );

typedef void (*tapi_iomux_method_mod)(
    tapi_iomux_handle *iomux,
    int fd,
    tapi_iomux_evt evt
    );

typedef void (*tapi_iomux_method_del)(
    tapi_iomux_handle *iomux,
    int fd
    );

typedef int (*tapi_iomux_method_call)(
    tapi_iomux_handle *iomux,
    int timeout,
    tapi_iomux_evt_fd **revts
    );

typedef void (*tapi_iomux_method_destroy)(tapi_iomux_handle *iomux);
typedef struct tapi_iomux_methods tapi_iomux_methods;
typedef struct tapi_iomux_select_context tapi_iomux_select_context;
typedef struct tapi_iomux_poll_context tapi_iomux_poll_context;
typedef struct tapi_iomux_epoll_context tapi_iomux_epoll_context;
typedef struct tapi_iomux_evts_list tapi_iomux_evts_list;
typedef struct tapi_iomux_evts_list_h tapi_iomux_evts_list_h;
typedef rpc_ptr rpc_dir_p;
typedef struct rpc_dirent rpc_dirent;
typedef int64_t rpc_dlhandle;
typedef int64_t rpc_dlsymaddr;
typedef struct tapi_rand_gen tapi_rand_gen;
typedef struct tapi_pat_sender tapi_pat_sender;
typedef struct tapi_pat_receiver tapi_pat_receiver;
typedef struct te_saved_mtu te_saved_mtu;
typedef struct rpc_struct_sigaction rpc_struct_sigaction;
typedef enum rpc_msg_flags_mode rpc_msg_flags_mode;
typedef enum rpc_msghdr_field_mode rpc_msghdr_field_mode;
typedef struct rpc_msghdr rpc_msghdr;
typedef struct rpc_tcp_info rpc_tcp_info;
typedef union rpc_sockopt_value rpc_sockopt_value;
typedef rpc_ptr rpc_file_p;
typedef struct rpc_iovec rpc_iovec;
typedef union rpc_epoll_data rpc_epoll_data_t;
typedef rpc_ptr rpc_wsaevent;
typedef rpc_ptr rpc_handle;
typedef rpc_ptr rpc_overlapped;
typedef rpc_ptr rpc_hwnd;
typedef struct _rpc_qos rpc_qos;
typedef struct _rpc_sys_info rpc_sys_info;
typedef enum accept_verdict accept_verdict;
typedef struct accept_cond accept_cond;
typedef struct tapi_serial tapi_serial;
typedef tapi_serial* tapi_serial_handle;
typedef enum tapi_local_file_type tapi_local_file_type;
typedef struct tapi_local_file_property tapi_local_file_property;
typedef struct tapi_local_file tapi_local_file;
typedef struct tapi_local_file_le tapi_local_file_le;
typedef struct tapi_local_file_list tapi_local_file_list;

typedef te_errno (*tapi_local_fs_traverse_cb)(
    tapi_local_file *file,
    void *user_data
    );

typedef struct tapi_local_storage_device tapi_local_storage_device;
typedef te_errno (*tapi_local_storage_device_method_insert)(tapi_local_storage_device *device);
typedef te_errno (*tapi_local_storage_device_method_eject)(tapi_local_storage_device *device);
typedef struct tapi_local_storage_device_methods tapi_local_storage_device_methods;
typedef enum tapi_local_storage_device_type tapi_local_storage_device_type;
typedef struct tapi_local_storage_device_le tapi_local_storage_device_le;
typedef struct tapi_local_storage_device_list tapi_local_storage_device_list;
typedef struct tapi_storage_client tapi_storage_client;
typedef te_errno (*tapi_storage_client_method_open)(tapi_storage_client *client);
typedef te_errno (*tapi_storage_client_method_close)(tapi_storage_client *client);

typedef te_errno (*tapi_storage_client_method_pwd)(
    tapi_storage_client *client,
    tapi_local_file *directory
    );

typedef te_errno (*tapi_storage_client_method_ls)(
    tapi_storage_client *client,
    const char *path,
    tapi_local_file_list *files
    );

typedef te_errno (*tapi_storage_client_method_cd)(
    tapi_storage_client *client,
    const char *remote_directory
    );

typedef te_errno (*tapi_storage_client_method_put)(
    tapi_storage_client *client,
    const char *local_file,
    const char *remote_file
    );

typedef te_errno (*tapi_storage_client_method_get)(
    tapi_storage_client *client,
    const char *remote_file,
    const char *local_file
    );

typedef te_errno (*tapi_storage_client_method_rm)(
    tapi_storage_client *client,
    const char *filename,
    bool recursive
    );

typedef te_errno (*tapi_storage_client_method_mkdir)(
    tapi_storage_client *client,
    const char *directory_name
    );

typedef te_errno (*tapi_storage_client_method_rmdir)(
    tapi_storage_client *client,
    const char *directory_name
    );

typedef struct tapi_storage_client_methods tapi_storage_client_methods;
typedef struct tapi_storage_client_ftp_context tapi_storage_client_ftp_context;
typedef enum tapi_storage_service_type tapi_storage_service_type;
typedef struct tapi_storage_auth_params tapi_storage_auth_params;
typedef struct tapi_storage_server tapi_storage_server;
typedef te_errno (*tapi_storage_server_method_enable)(tapi_storage_server *server);
typedef te_errno (*tapi_storage_server_method_disable)(tapi_storage_server *server);
typedef bool (*tapi_storage_server_method_is_enabled)(tapi_storage_server *server);

typedef te_errno (*tapi_storage_server_method_add_storage)(
    tapi_storage_server *server,
    const char *storage_name
    );

typedef te_errno (*tapi_storage_server_method_add_share)(
    tapi_storage_server *server,
    const char *storage,
    const char *path
    );

typedef te_errno (*tapi_storage_server_method_del_share)(
    tapi_storage_server *server,
    const char *storage,
    const char *path
    );

typedef te_errno (*tapi_storage_server_method_get_share)(
    tapi_storage_server *server,
    tapi_storage_share_list *share
    );

typedef struct tapi_storage_server_methods tapi_storage_server_methods;
typedef struct tapi_storage_share_le tapi_storage_share_le;
typedef struct tapi_storage_share_list tapi_storage_share_list;
typedef struct tapi_arp_frame tapi_arp_frame_t;

typedef void (*tapi_arp_frame_callback)(
    const tapi_arp_frame_t *header,
    void *userdata
    );

typedef void (*tapi_stp_bpdu_callback)(
    const ndn_stp_bpdu_t *bpdu,
    const struct timeval *time_stamp,
    void *userdata
    );

typedef enum dhcp_option_type dhcp_option_type;
typedef struct dhcp_message dhcp_message;

typedef void (*tapi_eth_frame_callback)(
    const asn_value *packet,
    int layer,
    const ndn_eth_header_plain *header,
    const uint8_t *payload,
    uint16_t plen,
    void *user_data
    );

typedef struct tapi_flow_ep tapi_flow_ep;
typedef struct tapi_flow_traffic tapi_flow_traffic;
typedef struct tapi_flow_s tapi_flow_t;
typedef int tapi_igmp_msg_type;
typedef struct tapi_igmp3_src_list_s tapi_igmp3_src_list_t;
typedef struct tapi_igmp3_group_record_s tapi_igmp3_group_record_t;
typedef struct tapi_igmp3_group_list_s tapi_igmp3_group_list_t;
typedef struct icmp6_msg_body icmp6_msg_body;
typedef struct icmp6_msg_option icmp6_msg_option;
typedef struct tapi_ip4_packet_t tapi_ip4_packet_t;

typedef void (*ip4_callback)(
    const tapi_ip4_packet_t *pkt,
    void *userdata
    );

typedef struct tapi_ip6_packet_t tapi_ip6_packet_t;

typedef void (*ip6_callback)(
    const tapi_ip6_packet_t *pkt,
    void *userdata
    );

typedef struct tapi_ip_frag_spec tapi_ip_frag_spec;
typedef uint32_t tapi_tcp_pos_t;
typedef struct tcp_message_t tcp_message_t;
typedef struct tcp4_message tcp4_message;

typedef void (*tcp_callback)(
    const tcp_message_t *pkt,
    void *userdata
    );

typedef void (*tcp4_callback)(
    const tcp4_message *pkt,
    void *userdata
    );

typedef int tapi_tcp_handler_t;
typedef struct udp4_datagram udp4_datagram;

typedef void (*udp4_callback)(
    const udp4_datagram *pkt,
    void *userdata
    );

typedef int iscsi_target_id;
typedef int iscsi_cid;
typedef struct iscsi_io_handle_t iscsi_io_handle_t;
typedef unsigned iscsi_io_taskid;

typedef void (*tapi_pcap_recv_callback)(
    int filter_id,
    const uint8_t *pkt_data,
    uint16_t pkt_len,
    void *user_data
    );

typedef enum tapi_snmp_version_t tapi_snmp_version_t;
typedef enum tapi_snmp_sec_model_t tapi_snmp_sec_model_t;
typedef enum tapi_snmp_sec_level_t tapi_snmp_sec_level_t;
typedef enum tapi_snmp_auth_proto_t tapi_snmp_auth_proto_t;
typedef enum tapi_snmp_priv_proto_t tapi_snmp_priv_proto_t;
typedef enum tapi_snmp_vartypes_t tapi_snmp_vartypes_t;
typedef enum tapi_snmp_gen_trap_t tapi_snmp_gen_trap_t;
typedef enum tapi_snmp_mib_access tapi_snmp_mib_access;
typedef enum tapi_snmp_mib_status tapi_snmp_mib_status;
typedef struct tapi_snmp_var_access tapi_snmp_var_access;
typedef enum tapi_snmp_truth_value tapi_snmp_truth_value;
typedef struct tapi_snmp_common_table_row_s tapi_snmp_common_table_row_t;
typedef struct tapi_snmp_security_s tapi_snmp_security_t;

typedef int (*walk_callback)(
    const tapi_snmp_varbind_t *varbind,
    void *userdata
    );

typedef void (*tapi_snmp_trap_callback)(
    const tapi_snmp_message_t *trap,
    void *user_data
    );

typedef struct tapi_snmp_pkt_handler_data tapi_snmp_pkt_handler_data;
typedef struct tapi_snmp_if_table_row_t tapi_snmp_if_table_row_t;
typedef struct tapi_snmp_ip_addr_table_row_s tapi_snmp_ip_addr_table_row_t;
typedef struct tapi_snmp_if_table_row_t tapi_snmp_if_table_row_t;
typedef struct tapi_snmp_ip_addrtable_row_t tapi_snmp_ip_addrtable_row_t;
typedef struct tapi_snmp_ip_address_table_row_s tapi_snmp_ip_address_table_row_t;
typedef struct tapi_snmp_ip_net_to_media_table_row_s tapi_snmp_ip_net_to_media_table_row_t;
typedef struct tapi_snmp_ip_cidr_route_table_row_s tapi_snmp_ip_cidr_route_table_row_t;
typedef struct send_transform send_transform;
typedef struct receive_transform receive_transform;
typedef enum tapi_ndn_level_e tapi_ndn_level_t;

typedef void (*tapi_tad_trrecv_cb)(
    asn_value *packet,
    void *user_data
    );

typedef struct tapi_tad_trrecv_cb_data tapi_tad_trrecv_cb_data;
typedef enum tsa_tst_type tsa_tst_type;
typedef enum tsa_flags tsa_flags;
typedef struct tsa_config tsa_config;
typedef struct tsa_state_sock tsa_state_sock;
typedef struct tsa_state_csap tsa_state_csap;
typedef te_errno (*tsa_handler)(struct tsa_session *ss);
typedef struct tsa_handlers tsa_handlers;
typedef struct tsa_state tsa_state;
typedef struct tsa_session tsa_session;
typedef struct tcp_move_action tcp_move_action;
typedef struct tsa_packets_counter tsa_packets_counter;
typedef struct tapi_bttrack_app tapi_bttrack_app;
typedef struct tapi_bttrack_opt tapi_bttrack_opt;
typedef struct tapi_ctorrent_app tapi_ctorrent_app;
typedef struct tapi_ctorrent_opt tapi_ctorrent_opt;
typedef enum tapi_ethtool_cmd tapi_ethtool_cmd;
typedef struct tapi_ethtool_opt tapi_ethtool_opt;
typedef struct tapi_ethtool_if_props tapi_ethtool_if_props;
typedef struct tapi_ethtool_pause tapi_ethtool_pause;
typedef struct tapi_ethtool_ring tapi_ethtool_ring;
typedef struct tapi_ethtool_report tapi_ethtool_report;
typedef struct tapi_haproxy_opt tapi_haproxy_opt;
typedef struct tapi_haproxy_app tapi_haproxy_app;
typedef struct tapi_haproxy_cfg_address tapi_haproxy_cfg_address;
typedef enum tapi_haproxy_cfg_shards tapi_haproxy_cfg_shards;
typedef struct tapi_haproxy_cfg_backend tapi_haproxy_cfg_backend;
typedef struct tapi_haproxy_cfg_opt tapi_haproxy_cfg_opt;
typedef struct tapi_memaslap_app tapi_memaslap_app;
typedef struct tapi_memaslap_report tapi_memaslap_report;
typedef struct tapi_memaslap_cfg_opt tapi_memaslap_cfg_opt;
typedef struct tapi_memaslap_opt tapi_memaslap_opt;
typedef struct tapi_memcached_app tapi_memcached_app;
typedef enum tapi_mamcached_proto tapi_mamcached_proto_t;
typedef enum tapi_mamcached_verbose tapi_mamcached_verbose_t;
typedef struct tapi_memcached_opt tapi_memcached_opt;
typedef struct tapi_memtier_app tapi_memtier_app;
typedef struct tapi_memtier_op_stats tapi_memtier_op_stats;
typedef struct tapi_memtier_report tapi_memtier_report;
typedef enum tapi_memtier_proto tapi_memtier_proto;
typedef struct tapi_memtier_opt tapi_memtier_opt;
typedef struct tapi_mke2fs_opt tapi_mke2fs_opt;
typedef struct tapi_mke2fs_app tapi_mke2fs_app;
typedef enum tapi_netperf_test_name tapi_netperf_test_name;
typedef enum tapi_netperf_test_type tapi_netperf_test_type;
typedef struct tapi_netperf_test_opt tapi_netperf_test_opt;
typedef struct tapi_netperf_opt tapi_netperf_opt;
typedef struct tapi_netperf_report tapi_netperf_report;
typedef struct tapi_netperf_app_server_t tapi_netperf_app_server_t;
typedef struct tapi_netperf_app_client_t tapi_netperf_app_client_t;
typedef struct tapi_nptcp_opt tapi_nptcp_opt;
typedef struct tapi_nptcp_report_entry tapi_nptcp_report_entry;
typedef struct tapi_nptcp_app tapi_nptcp_app;
typedef struct tapi_ping_opt tapi_ping_opt;
typedef struct tapi_ping_rtt_stats tapi_ping_rtt_stats;
typedef struct tapi_ping_report tapi_ping_report;
typedef struct tapi_ping_app tapi_ping_app;
typedef struct tapi_redis_benchmark_app tapi_redis_benchmark_app;
typedef struct tapi_redis_benchmark_opt tapi_redis_benchmark_opt;
typedef struct tapi_redis_benchmark_stat tapi_redis_benchmark_stat;
typedef struct tapi_redis_srv_app tapi_redis_srv_app;
typedef enum tapi_redis_srv_loglevel tapi_redis_srv_loglevel;
typedef enum tapi_redis_srv_rdl tapi_redis_srv_rdl;
typedef struct tapi_redis_srv_opt tapi_redis_srv_opt;
typedef struct tapi_sfnt_pp_opt tapi_sfnt_pp_opt;
typedef struct tapi_sfnt_pp_report tapi_sfnt_pp_report;
typedef struct tapi_sfnt_pp_app_server_t tapi_sfnt_pp_app_server_t;
typedef struct tapi_sfnt_pp_app_client_t tapi_sfnt_pp_app_client_t;
typedef struct tapi_ssh tapi_ssh_t;
typedef enum tapi_ssh_permit_root_login tapi_ssh_permit_root_login_t;
typedef enum tapi_ssh_strict_host_key_checking tapi_ssh_strict_host_key_checking_t;
typedef struct tapi_ssh_client_opt tapi_ssh_client_opt;
typedef struct tapi_ssh_server_opt tapi_ssh_server_opt;
typedef struct tapi_stress_opt tapi_stress_opt;
typedef enum tapi_trex_port_stat_enum tapi_trex_port_stat_enum;
typedef struct tapi_trex_port_stat_flt tapi_trex_port_stat_flt;
typedef struct tapi_trex_per_port_stat_flts tapi_trex_per_port_stat_flts;
typedef struct tapi_trex_port_stat tapi_trex_port_stat;
typedef struct tapi_trex_per_port_stat tapi_trex_per_port_stat;
typedef struct tapi_trex_app tapi_trex_app;
typedef enum tapi_trex_verbose tapi_trex_verbose_t;
typedef enum tapi_trex_iom tapi_trex_iom_t;
typedef enum tapi_trex_so tapi_trex_so_t;
typedef struct tapi_trex_interface tapi_trex_interface;
typedef struct tapi_trex_common_config tapi_trex_common_config;
typedef struct tapi_trex_client_config tapi_trex_client_config;
typedef struct tapi_trex_server_config tapi_trex_server_config;
typedef struct tapi_trex_opt tapi_trex_opt;
typedef struct tapi_trex_report tapi_trex_report;
typedef struct tapi_wrk_opt tapi_wrk_opt;
typedef struct tapi_wrk_thread_stats tapi_wrk_thread_stats;
typedef struct tapi_wrk_latency_percentile tapi_wrk_latency_percentile;
typedef struct tapi_wrk_socket_errors tapi_wrk_socket_errors;
typedef struct tapi_wrk_report tapi_wrk_report;
typedef struct tapi_wrk_app tapi_wrk_app;
typedef enum tapi_upnp_cd_resource_type tapi_upnp_cd_resource_type;
typedef enum tapi_upnp_cd_object_type tapi_upnp_cd_object_type;
typedef struct tapi_upnp_cd_contributor tapi_upnp_cd_contributor;
typedef struct tapi_upnp_cd_contributor_node tapi_upnp_cd_contributor_node;
typedef struct tapi_upnp_cd_resource tapi_upnp_cd_resource;
typedef struct tapi_upnp_cd_resource_node tapi_upnp_cd_resource_node;
typedef struct tapi_upnp_cd_object tapi_upnp_cd_object;
typedef struct tapi_upnp_cd_container tapi_upnp_cd_container;
typedef struct tapi_upnp_cd_container_node tapi_upnp_cd_container_node;

typedef void (*cd_handler)(
    tapi_upnp_cd_container_node *,
    void *
    );

typedef struct tapi_upnp_device_info tapi_upnp_device_info;
typedef struct tapi_upnp_devices tapi_upnp_devices;
typedef struct tapi_upnp_resources_uri_node tapi_upnp_resources_uri_node;
typedef struct tapi_upnp_media_uri tapi_upnp_media_uri;
typedef struct tapi_upnp_sv_allowed_values tapi_upnp_sv_allowed_values;
typedef struct tapi_upnp_state_variable tapi_upnp_state_variable;
typedef struct tapi_upnp_state_variables tapi_upnp_state_variables;
typedef struct tapi_upnp_argument tapi_upnp_argument;
typedef struct tapi_upnp_action_arguments tapi_upnp_action_arguments;
typedef struct tapi_upnp_action tapi_upnp_action;
typedef struct tapi_upnp_actions tapi_upnp_actions;
typedef struct tapi_upnp_service_info tapi_upnp_service_info;
typedef struct tapi_upnp_services tapi_upnp_services;
typedef enum tapi_wifi_policy tapi_wifi_policy;
typedef enum tapi_wifi_cipher tapi_wifi_cipher;
typedef enum tapi_wifi_key_mgmt tapi_wifi_key_mgmt;
typedef enum tapi_wifi_pmf tapi_wifi_pmf;
typedef enum tapi_wpa_supplicant_status tapi_wpa_supplicant_status;
typedef struct tapi_wpa_supplicant_security tapi_wpa_supplicant_security;
typedef struct te_log_buf_bit2str te_bit2str;
typedef struct te_log_buf_flag2str te_flag2str;
typedef struct te_log_buf te_log_buf;
typedef struct te_buf_pattern te_buf_pattern;
typedef struct te_dbuf te_dbuf;
typedef struct te_enum_map te_enum_map;
typedef enum te_exec_param_type te_exec_param_type;
typedef enum te_sched_param_type te_sched_param_type;
typedef struct te_exec_param te_exec_param;
typedef te_exec_param te_sched_param;
typedef struct te_exec_affinity_param te_exec_affinity_param;
typedef te_exec_affinity_param te_sched_affinity_param;
typedef struct te_exec_priority_param te_exec_priority_param;
typedef te_exec_priority_param te_sched_priority_param;
typedef struct te_exec_workdir_param te_exec_workdir_param;

typedef bool (*te_expand_param_func)(
    const char *name,
    const void *ctx,
    te_string *dest
    );

typedef const char* (*te_param_value_getter)(
    const char *name,
    const void *ctx
    );

typedef te_errno te_file_scandir_callback(
    const char *pattern,
    const char *pathname,
    void *data
    );

typedef struct te_intset_ops te_intset_ops;
typedef struct te_charset te_charset;
typedef enum iscsi_connection_status iscsi_connection_status;
typedef enum te_json_compound te_json_compound;
typedef struct te_json_level_t te_json_level_t;
typedef enum te_json_out_t te_json_out_t;
typedef union te_json_out_loc_t te_json_out_loc_t;
typedef struct te_json_ctx_t te_json_ctx_t;
typedef struct te_kvpair te_kvpair;

typedef te_errno te_kvpairs_iter_fn(
    const char *key,
    const char *value,
    void *user
    );

typedef enum te_log_msg_arg_type te_log_msg_arg_type;
typedef struct te_log_msg_out te_log_msg_out;

typedef te_errno (*te_log_msg_fmt_args_f)(
    te_log_msg_out *out,
    const char *fmt,
    va_list ap
    );

typedef te_errno (*te_log_msg_raw_arg_f)(
    te_log_msg_out *out,
    const char *fmt,
    size_t fmt_len,
    te_log_msg_arg_type arg_type,
    const void *arg_addr,
    size_t arg_len
    );

typedef struct te_log_arg_descr te_log_arg_descr;
typedef struct te_log_msg_raw_data te_log_msg_raw_data;
typedef struct te_log_msg_truncated te_log_msg_truncated;
typedef int te_meas_stats_update_code;
typedef struct te_meas_stats_data_t te_meas_stats_data_t;
typedef struct te_meas_stats_stab_t te_meas_stats_stab_t;
typedef struct te_meas_stats_summary_t te_meas_stats_summary_t;
typedef struct te_meas_stats_t te_meas_stats_t;
typedef enum te_mi_type te_mi_type;
typedef struct te_mi_logger te_mi_logger;
typedef struct te_mi_log_kvpair te_mi_log_kvpair;
typedef enum te_mi_meas_aggr te_mi_meas_aggr;
typedef enum te_mi_meas_type te_mi_meas_type;
typedef enum te_mi_meas_multiplier te_mi_meas_multiplier;
typedef struct te_mi_meas te_mi_meas;
typedef void enum te_mi_meas_view_type te_mi_meas_view_type;
typedef enum te_mi_graph_axis te_mi_graph_axis;
typedef enum te_scalar_type te_scalar_type;
typedef struct te_ring te_ring;
typedef struct serial_console_t serial_console_t;
typedef struct serial_pattern_t serial_pattern_t;
typedef struct serial_pattern_h_t serial_pattern_h_t;
typedef struct serial_event_t serial_event_t;
typedef struct serial_event_h_t serial_event_h_t;
typedef struct serial_parser_t serial_parser_t;
typedef struct te_sockaddr_subnet te_sockaddr_subnet;
typedef struct te_stopwatch_t te_stopwatch_t;
typedef void() te_string_free_func(struct te_string *str);
typedef struct te_string te_string;
typedef enum te_string_uri_escape_mode te_string_uri_escape_mode;

typedef void te_string_generic_escape_fn(
    te_string *str,
    char c
    );

typedef te_errno te_string_line_handler_fn(
    char *line,
    void *user
    );

typedef struct te_substring_t te_substring_t;
typedef struct te_timer_t te_timer_t;
typedef struct te_toeplitz_hash_cache te_toeplitz_hash_cache;
typedef enum te_toeplitz_hash_variant te_toeplitz_hash_variant;
typedef struct te_tree te_tree;

typedef te_errno te_tree_traverse_fn(
    const te_tree *tree,
    void *data
    );

typedef te_errno te_tree_map_fn(
    const te_kvpair_h *src,
    te_kvpair_h *dst,
    void *data
    );

typedef enum te_unit_prefix te_unit_prefix;
typedef struct te_unit te_unit;
typedef struct te_unit_list te_unit_list;
typedef void te_vec_item_destroy_fn(const void *item);
typedef struct te_vec te_vec;
typedef struct tqe_string tqe_string;
typedef struct trc_test_iter_arg trc_test_iter_arg;
typedef struct trc_test_iter_args trc_test_iter_args;
typedef struct trc_report_argument trc_report_argument;
typedef struct trc_exp_result_entry trc_exp_result_entry;
typedef struct trc_exp_result trc_exp_result;
typedef struct te_trc_db te_trc_db;
typedef struct te_trc_db_walker te_trc_db_walker;

typedef int (*func_args_match_ptr)(
    const void *,
    unsigned int,
    trc_report_argument *,
    bool
    );

typedef enum step_iter_flags step_iter_flags;
typedef enum trc_db_walker_motion trc_db_walker_motion;
typedef struct trc_user_data trc_user_data;
typedef struct trc_file trc_file;
typedef struct trc_tests trc_tests;
typedef struct trc_globals trc_globals;
typedef struct trc_test_iter trc_test_iter;
typedef struct trc_test_iters trc_test_iters;
typedef enum trc_test_type trc_test_type;
typedef struct trc_test trc_test;
typedef struct trc_global trc_global;
typedef struct tarpc_void_in tarpc_upnp_cp_connect_in;
typedef struct tarpc_int_retval_out tarpc_upnp_cp_connect_out;
typedef struct tarpc_void_in tarpc_upnp_cp_disconnect_in;
typedef struct tarpc_int_retval_out tarpc_upnp_cp_disconnect_out;
typedef enum rgt_attr_type rgt_attr_type_t;
typedef struct rgt_attrs rgt_attrs_t;
typedef enum rgt_blk_type rgt_blk_type_t;
typedef struct rgt_var_def rgt_var_def_t;
typedef struct rgt_blk rgt_blk_t;
typedef struct rgt_tmpl rgt_tmpl_t;
typedef gint node_id_t;
typedef enum rgt_io_mode rgt_io_mode_t;
typedef struct param param;
typedef enum result_status result_status_t;
typedef struct result_info result_info_t;
typedef enum node_type node_type_t;
typedef struct rgt_author rgt_author;
typedef struct node_descr node_descr_t;
typedef struct node_info node_info_t;
typedef struct ctrl_msg_data ctrl_msg_data;

typedef int (*f_process_ctrl_log_msg)(
    node_info_t *node,
    ctrl_msg_data *data
    );

typedef int (*f_process_reg_log_msg)(log_msg *);
typedef int (*f_process_log_root)(void);
typedef enum rgt_op_mode rgt_op_mode_t;

typedef int (*f_fetch_log_msg)(
    struct log_msg **msg,
    struct rgt_gen_ctx *ctx
    );

typedef struct rgt_gen_ctx rgt_gen_ctx_t;
typedef struct msg_arg msg_arg;
typedef struct log_msg log_msg;
typedef struct log_msg_ptr log_msg_ptr;
typedef struct msg_queue msg_queue;

typedef void (*capture_tmpls_output_t)(
    rgt_gen_ctx_t *ctx,
    rgt_depth_ctx_t *depth_ctx,
    rgt_tmpl_t *tmpl,
    const rgt_attrs_t *attrs
    );

typedef struct te_rgt_mi_meas_value te_rgt_mi_meas_value;
typedef struct te_rgt_mi_meas_param te_rgt_mi_meas_param;
typedef struct te_rgt_mi_kv te_rgt_mi_kv;
typedef struct te_rgt_mi_meas_view_line_graph te_rgt_mi_meas_view_line_graph;
typedef struct te_rgt_mi_meas_view te_rgt_mi_meas_view;
typedef struct te_rgt_mi_meas te_rgt_mi_meas;
typedef struct te_rgt_mi_person te_rgt_mi_person;
typedef struct te_rgt_mi_test_start te_rgt_mi_test_start;
typedef struct te_rgt_mi_test_result te_rgt_mi_test_result;
typedef struct te_rgt_mi_test_end te_rgt_mi_test_end;
typedef struct te_rgt_mi_trc_tag_entry te_rgt_mi_trc_tag_entry;
typedef struct te_rgt_mi_trc_tags te_rgt_mi_trc_tags;
typedef struct te_rgt_mi te_rgt_mi;
typedef enum rgt_state rgt_state_t;
typedef enum rgt_node rgt_node_t;
typedef struct rgt_depth_ctx rgt_depth_ctx_t;
typedef struct rgt_mem_ctx rgt_mem_ctx_t;
typedef struct rgt_gen_ctx rgt_gen_ctx_t;

typedef void (*rgt_xml2fmt_cb_func)(
    rgt_gen_ctx_t *ctx,
    rgt_depth_ctx_t *depth_ctx,
    const char **xml_attrs
    );

typedef struct rgt_depth_data_storage rgt_depth_data_storage;
typedef void() rgt_xml2fmt_free_depth_data_cb(void *data);
typedef struct rgt_xml2multi_opts rgt_xml2multi_opts;
typedef enum read_message_rc read_message_rc;
typedef uint64_t entry[2];
typedef struct rgt_cap_idx_rec rgt_cap_idx_rec;
typedef struct rgt_frag_rec rgt_frag_rec;
typedef struct set set;
typedef struct problem problem;
typedef enum alg_type alg_type;
typedef enum trc_log_parse_app_id trc_log_parse_app_id;
typedef enum trc_log_parse_state trc_log_parse_state;
typedef struct trc_log_parse_ctx trc_log_parse_ctx;
typedef struct trc_re_match_subst trc_re_match_subst;
typedef struct trc_re_subst trc_re_subst;
typedef struct trc_re_namespace trc_re_namespace;
typedef struct trc_diff_key_stats trc_diff_key_stats;
typedef struct trc_diff_set trc_diff_set;
typedef enum trc_test_status trc_test_status;
typedef enum trc_diff_status trc_diff_status;
typedef enum trc_diff_summary_status trc_diff_summary_status;
typedef enum trc_diff_summary_component trc_diff_summary_component;
typedef struct trc_diff_stats_counter_list_entry trc_diff_stats_counter_list_entry;
typedef struct trc_diff_stats_counter_s trc_diff_stats_counter;
typedef trc_diff_stats_counter trc_diff_stats_counters[TRC_TEST_STATUS_MAX][TRC_TEST_STATUS_MAX][TRC_DIFF_STATUS_MAX];
typedef trc_diff_stats_counters trc_diff_stats[TRC_DIFF_IDS][TRC_DIFF_IDS - 1];
typedef struct trc_diff_entry trc_diff_entry;
typedef struct trc_diff_ctx trc_diff_ctx;
typedef struct trc_report_stats trc_report_stats;
typedef struct trc_report_test_iter_entry trc_report_test_iter_entry;
typedef struct trc_report_test_iter_data trc_report_test_iter_data;
typedef struct trc_report_test_data trc_report_test_data;
typedef struct trc_report_ctx trc_report_ctx;
typedef struct trc_report_key_iter_entry trc_report_key_iter_entry;
typedef struct trc_report_key_test_entry trc_report_key_test_entry;
typedef struct trc_report_key_entry trc_report_key_entry;
typedef struct trc_report_key_ctx trc_report_key_ctx;
typedef struct trc_update_tag_logs trc_update_tag_logs;
typedef struct trc_update_wilds_list_entry trc_update_wilds_list_entry;
typedef enum trc_update_rtype trc_update_rtype;
typedef struct trc_update_rule trc_update_rule;
typedef enum res_simpl_stat res_simpl_stat;
typedef struct trc_update_args_group trc_update_args_group;
typedef struct trc_update_test_iter_data trc_update_test_iter_data;
typedef struct trc_update_test_data trc_update_test_data;
typedef struct trc_update_test_entry trc_update_test_entry;
typedef struct trc_update_tests_group trc_update_tests_group;
typedef struct trc_update_ctx trc_update_ctx;

// enums

enum {
    TE_DHCPS_DDNS_UPDATE_NONE,
    TE_DHCPS_DDNS_UPDATE_AD_HOC,
    TE_DHCPS_DDNS_UPDATE_INTERIM,
};

enum {
    RCF_SID_GET_LOG = 1,
    RCF_SID_TACHECK,
    RCF_SID_UNUSED,
};

enum {
    RPC_SOF_TIMESTAMPING_TX_HARDWARE   =(1<<0),
    RPC_SOF_TIMESTAMPING_TX_SOFTWARE   =(1<<1),
    RPC_SOF_TIMESTAMPING_RX_HARDWARE   =(1<<2),
    RPC_SOF_TIMESTAMPING_RX_SOFTWARE   =(1<<3),
    RPC_SOF_TIMESTAMPING_SOFTWARE      =(1<<4),
    RPC_SOF_TIMESTAMPING_SYS_HARDWARE  =(1<<5),
    RPC_SOF_TIMESTAMPING_RAW_HARDWARE  =(1<<6),
    RPC_SOF_TIMESTAMPING_OPT_ID        =(1<<7),
    RPC_SOF_TIMESTAMPING_TX_SCHED      =(1<<8),
    RPC_SOF_TIMESTAMPING_TX_ACK        =(1<<9),
    RPC_SOF_TIMESTAMPING_OPT_CMSG      =(1<<10),
    RPC_SOF_TIMESTAMPING_OPT_TSONLY    =(1<<11),
    RPC_SOF_TIMESTAMPING_OPT_STATS     =(1<<12),
    RPC_SOF_TIMESTAMPING_OPT_PKTINFO   =(1<<13),
    RPC_SOF_TIMESTAMPING_OPT_TX_SWHW   =(1<<14),
    RPC_SOF_TIMESTAMPING_BIND_PHC      =(1<<15),
    RPC_SOF_TIMESTAMPING_OPT_ID_TCP    =(1<<16),
    RPC_ONLOAD_SOF_TIMESTAMPING_STREAM =(1<<23),
    RPC_SOF_TIMESTAMPING_LAST          = RPC_SOF_TIMESTAMPING_OPT_ID_TCP,
    RPC_SOF_TIMESTAMPING_MASK          =(RPC_SOF_TIMESTAMPING_LAST - 1) |                                 RPC_SOF_TIMESTAMPING_LAST,
};

enum {
    CRC32_INIT = 0xffffffff,
};

enum {
    CSAP_STATE_IDLE               = 0x00001,
    CSAP_STATE_SEND               = 0x00002,
    CSAP_STATE_RECV               = 0x00004,
    CSAP_STATE_DONE               = 0x00010,
    CSAP_STATE_SEND_DONE          = 0x00020,
    CSAP_STATE_RECV_DONE          = 0x00040,
    CSAP_STATE_COMPLETE           = 0x00100,
    CSAP_STATE_RECV_SEQ_MATCH     =     0x00200,
    CSAP_STATE_RECV_MISMATCH      =      0x00400,
    CSAP_STATE_PACKETS_NO_PAYLOAD = 0x00800,
    CSAP_STATE_RESULTS            = 0x01000,
    CSAP_STATE_FOREGROUND         = 0x02000,
    CSAP_STATE_WAIT               = 0x04000,
    CSAP_STATE_STOP               = 0x08000,
    CSAP_STATE_DESTROY            = 0x10000,
};

enum {
    CSAP_INVALID_HANDLE = 0,
};

enum {
    WSA_WAIT_FAILED    = 1,
    WAIT_IO_COMPLETION,
    WSA_WAIT_TIMEOUT,
    WSA_WAIT_EVENT_0,
};

enum {
    CFG_REGISTER,
    CFG_UNREGISTER,
    CFG_FIND,
    CFG_GET_DESCR,
    CFG_GET_OID,
    CFG_GET_ID,
    CFG_PATTERN,
    CFG_FAMILY,
    CFG_ADD,
    CFG_DEL,
    CFG_SET,
    CFG_COMMIT,
    CFG_GET,
    CFG_COPY,
    CFG_SYNC,
    CFG_REBOOT,
    CFG_BACKUP,
    CFG_CONFIG,
    CFG_CONF_TOUCH,
    CFG_CONF_DELAY,
    CFG_SHUTDOWN,
    CFG_ADD_DEPENDENCY,
    CFG_TREE_PRINT,
    CFG_PROCESS_HISTORY,
};

enum {
    ISCSI_OPCODE_UNDEF = 0xff,
};

enum {
    TSA_IUT = 0,
    TSA_TST,
};

enum {
    ITER_NO_MATCH    = 0,
    ITER_EXACT_MATCH,
    ITER_WILD_MATCH,
};

enum {
    TE_DHCPS_ALLOW,
    TE_DHCPS_DENY,
    TE_DHCPS_IGNORE,
};

enum accept_verdict;
enum agent_key_manager;
enum alg_type;
enum arl_entry_type;
enum asn_syntax;
enum asn_tag_class;
enum asn_tagging_type;
enum cfg_file_type;
enum cfg_job_exit_status_type_t;
enum cfg_nat_setup_t;
enum cfg_val_type;
enum cli_conn_type;
enum cs_neigh_entry_state;
enum ctrl_event_type;
enum dhcp6_csap_mode;
enum dhcp_csap_mode;
enum dhcp_message_type;
enum dhcp_option_type;
enum enc_fmt_e;
enum event_type;
enum fcntl_type;
enum icmp6_msg_type;
enum icmp6_opt_type;
enum interactive_mode_opts;
enum ioctl_access;
enum ioctl_type;
enum iomux_func;
enum iscsi_bit_spec_t;
enum iscsi_command_attr_values;
enum iscsi_connection_status;
enum iscsi_digest_type;
enum iscsi_dump_mode_t;
enum iscsi_error_recovery_levels;
enum iscsi_initiator_opcode;
enum iscsi_initiator_type;
enum iscsi_login_stage_t;
enum iscsi_logout_reasons;
enum iscsi_logout_responses;
enum iscsi_reject_reasons;
enum iscsi_snack_types;
enum iscsi_status_classes;
enum iscsi_status_details;
enum iscsi_targ_async_msg_events;
enum iscsi_target_opcodes;
enum iscsi_target_param_kind_t;
enum iscsi_tmf_responses;
enum iscsi_tmf_task_codes;
enum l2tp_auth_policy;
enum l2tp_auth_prot;
enum l2tp_bit;
enum l2tp_iprange_class;
enum l2tp_policy;
enum listener_state;
enum log_filter_result;
enum logfork_msg_type;
enum logic_expr_res_type;
enum logic_expr_type;
enum ndn_arp_tags_t;
enum ndn_atm_tags_t;
enum ndn_atm_type;
enum ndn_bridge_tags_t;
enum ndn_cli_tags_t;
enum ndn_data_unit_tags_t;
enum ndn_dhcp6_msg_type;
enum ndn_dhcp6_tags_t;
enum ndn_dhcp_duid_type;
enum ndn_dhcp_opt_type;
enum ndn_dhcp_tags_t;
enum ndn_env_tags_t;
enum ndn_eth_tags_t;
enum ndn_forw_delay_type_t;
enum ndn_forw_drop_type_t;
enum ndn_forw_reorder_type_t;
enum ndn_geneve_tags_t;
enum ndn_gre_tags_t;
enum ndn_icmp4_tags_t;
enum ndn_icmp6_tags_t;
enum ndn_igmp_tags_t;
enum ndn_intervals_tags_t;
enum ndn_ip4_tags_t;
enum ndn_ip6_tags_t;
enum ndn_iscsi_sd_tags_t;
enum ndn_iscsi_tags_t;
enum ndn_llc_tags_t;
enum ndn_mask_tags_t;
enum ndn_message_tags_t;
enum ndn_packet_action_tags_t;
enum ndn_pattern_unit_tags_t;
enum ndn_pld_tags_t;
enum ndn_ppp_tags_t;
enum ndn_range_tags_t;
enum ndn_raw_packet_tags_t;
enum ndn_rte_flow_action_conf_t;
enum ndn_rte_flow_action_t;
enum ndn_rte_flow_action_type_t;
enum ndn_rte_flow_attr_t;
enum ndn_rte_flow_item_conf_t;
enum ndn_rte_flow_item_t;
enum ndn_rte_flow_item_type_t;
enum ndn_rte_flow_rule_t;
enum ndn_rte_flow_tags_t;
enum ndn_rte_mbuf_tags_t;
enum ndn_snmp_auth_proto_t;
enum ndn_snmp_msg_t;
enum ndn_snmp_objsyn_t;
enum ndn_snmp_priv_proto_t;
enum ndn_snmp_sec_level_t;
enum ndn_snmp_sec_model_t;
enum ndn_socket_tags_t;
enum ndn_tcp_options_tags_t;
enum ndn_tcp_tags_t;
enum ndn_timestamp_tags_t;
enum ndn_tmpl_iter_tags_t;
enum ndn_traffic_template_tags_t;
enum ndn_udp_tags_t;
enum ndn_vxlan_tags_t;
enum net_node_rsrc_type;
enum net_node_type;
enum netconf_cmd;
enum netconf_devlink_eswitch_mode;
enum netconf_devlink_param_cmode;
enum netconf_link_type;
enum netconf_neigh_flags;
enum netconf_neigh_state;
enum netconf_net_addr_flag;
enum netconf_nla_type;
enum netconf_node_type;
enum netconf_route_prot;
enum netconf_route_scope;
enum netconf_route_table;
enum netconf_route_type;
enum nginx_cpu_aff_mode;
enum nginx_server_tokens_mode;
enum node_fltr_mode;
enum node_type;
enum option_type;
enum overfill_type;
enum pcap_csap_receive_mode;
enum power_sw_cmd;
enum power_sw_dev_type;
enum preference_optval;
enum rcf_call_mode;
enum rcf_ch_cfg_op_t;
enum rcf_ch_trrecv_flags;
enum rcf_execute_mode;
enum rcf_op_t;
enum rcf_reboot_type;
enum rcf_rpc_op;
enum rcf_ta_flags;
enum rcf_trrecv_mode;
enum rcf_var_type_t;
enum read_message_rc;
enum res_simpl_stat;
enum result_status;
enum rgt_attr_type;
enum rgt_blk_type;
enum rgt_io_mode;
enum rgt_match_type;
enum rgt_node;
enum rgt_op_mode;
enum rgt_state;
enum rpc_access_mode_flags;
enum rpc_adj_mode;
enum rpc_ai_flags;
enum rpc_ai_rc;
enum rpc_aio_cancel_retval;
enum rpc_arp_flags;
enum rpc_arp_hardware;
enum rpc_cf_access_right;
enum rpc_cf_creation_disposition;
enum rpc_cf_flags_attributes;
enum rpc_cf_share_mode;
enum rpc_clock_id;
enum rpc_d_type;
enum rpc_dlopen_flags;
enum rpc_epoll_evt;
enum rpc_epoll_flags;
enum rpc_errno;
enum rpc_eth_proto;
enum rpc_ethtool_cmd;
enum rpc_ethtool_flags;
enum rpc_ethtool_reset_flags;
enum rpc_fcntl_command;
enum rpc_fcntl_flags;
enum rpc_file_mode_flags;
enum rpc_hwtstamp_rx_filters;
enum rpc_hwtstamp_tx_types;
enum rpc_if_fl;
enum rpc_ioctl_code;
enum rpc_join_leaf_flags;
enum rpc_lio_mode;
enum rpc_lio_opcode;
enum rpc_lseek_mode;
enum rpc_madv_value;
enum rpc_map_flags;
enum rpc_msg_flags_mode;
enum rpc_msghdr_field_mode;
enum rpc_mtu_discover_arg;
enum rpc_network_event;
enum rpc_network_event_bit;
enum rpc_open_sock_flags;
enum rpc_packet_type;
enum rpc_poll_event;
enum rpc_preadv2_pwritev2_flags;
enum rpc_prot_flags;
enum rpc_pthread_cancelstate;
enum rpc_pthread_canceltype;
enum rpc_rlimit_resource;
enum rpc_sa_flags;
enum rpc_scm_tstamp;
enum rpc_send_recv_flags;
enum rpc_servicetype_flags;
enum rpc_shut_how;
enum rpc_si_code;
enum rpc_sigev_notify;
enum rpc_sighow;
enum rpc_signum;
enum rpc_socket_domain;
enum rpc_socket_flags;
enum rpc_socket_proto;
enum rpc_socket_type;
enum rpc_socklevel;
enum rpc_sockopt;
enum rpc_splice_flags;
enum rpc_ss_flags;
enum rpc_sysconf_name;
enum rpc_sysinfo_command;
enum rpc_tcp_ca_state;
enum rpc_tcp_state;
enum rpc_tcpi_options;
enum rpc_timex_status;
enum rpc_transmit_file_flags;
enum rpc_wait_status_flag;
enum rpc_waitpid_opts;
enum rpc_xml_op;
enum rpc_xsk_libxdp_flags;
enum rpcs_msghdr_check_args_mode;
enum run_item_role;
enum run_item_type;
enum sapi_buf_size;
enum snmp_obj_type;
enum step_iter_flags;
enum ta_cfg_obj_action;
enum ta_ethtool_cmd;
enum ta_ethtool_link_mode;
enum ta_ethtool_lsets_field;
enum ta_job_status_type_t;
enum ta_job_wrapper_priority_t;
enum ta_reboot_state;
enum ta_reboot_type;
enum ta_route_type;
enum ta_snmp_type_t;
enum tad_cksum_str_code;
enum tad_csap_status_t;
enum tad_du_type_t;
enum tad_eth_recv_mode;
enum tad_expr_node_type;
enum tad_iscsi_send_mode_t;
enum tad_payload_type;
enum tad_pkt_get_frag_mode;
enum tad_tmpl_arg_type_t;
enum tad_tmpl_iter_type_t;
enum tad_traffic_op_t;
enum tapi_address_type;
enum tapi_auth_eap_t;
enum tapi_auth_key_mgmt_t;
enum tapi_auth_proto_t;
enum tapi_bpf_link_point;
enum tapi_bpf_map_type;
enum tapi_bpf_prog_type;
enum tapi_bpf_state;
enum tapi_bpf_stim_type;
enum tapi_bpf_xdp_action;
enum tapi_cfg_base_ta_dir;
enum tapi_cfg_driver_type;
enum tapi_cfg_if_chan;
enum tapi_cfg_key_manager;
enum tapi_cfg_key_mode;
enum tapi_cfg_key_size;
enum tapi_cfg_key_type;
enum tapi_cfg_ovs_cfg_type;
enum tapi_cfg_pci_param_cmode;
enum tapi_cfg_ps_exit_status_type_t;
enum tapi_cfg_qdisc_kind_t;
enum tapi_cfg_rx_rule_flow;
enum tapi_cfg_rx_rule_spec_loc;
enum tapi_cli_csap_type;
enum tapi_cli_prompt_t;
enum tapi_dns_unbound_cfg_ac_action;
enum tapi_dns_unbound_verbose;
enum tapi_dns_zone_file_rr_class;
enum tapi_dns_zone_file_rr_type;
enum tapi_dnsperf_addr_family;
enum tapi_dnsperf_transport_mode;
enum tapi_env_addr_type;
enum tapi_env_type;
enum tapi_ethtool_cmd;
enum tapi_fio_ioengine;
enum tapi_fio_rwtype;
enum tapi_haproxy_cfg_shards;
enum tapi_igmp_query_type;
enum tapi_igmp_version;
enum tapi_iomux_evt;
enum tapi_iomux_type;
enum tapi_iscsi_change_key_val_type;
enum tapi_iscsi_parameter;
enum tapi_iscsi_parameter_type;
enum tapi_job_exec_param_type;
enum tapi_job_sched_param_type;
enum tapi_job_status_type_t;
enum tapi_job_wrapper_priority_t;
enum tapi_local_file_type;
enum tapi_local_storage_device_type;
enum tapi_mamcached_proto;
enum tapi_mamcached_verbose;
enum tapi_media_player_client;
enum tapi_media_player_error;
enum tapi_memtier_proto;
enum tapi_ndn_level_e;
enum tapi_netif_msg_level;
enum tapi_netperf_test_name;
enum tapi_netperf_test_type;
enum tapi_nvme_feature;
enum tapi_nvme_transport;
enum tapi_packetdrill_ip_version_t;
enum tapi_perf_bench;
enum tapi_perf_error;
enum tapi_perf_report_kind;
enum tapi_radius_acct_status_t;
enum tapi_radius_code_t;
enum tapi_radius_nas_port_type_t;
enum tapi_radius_term_action_t;
enum tapi_radius_term_cause_t;
enum tapi_radius_type_t;
enum tapi_radius_usr_list_t;
enum tapi_redis_srv_loglevel;
enum tapi_redis_srv_rdl;
enum tapi_rte_mbuf_cksum;
enum tapi_rte_mbuf_cksum_mode;
enum tapi_sfnt_pp_muxer;
enum tapi_snmp_auth_proto_t;
enum tapi_snmp_gen_trap_t;
enum tapi_snmp_get_type_t;
enum tapi_snmp_if_status_t;
enum tapi_snmp_mib_access;
enum tapi_snmp_mib_status;
enum tapi_snmp_priv_proto_t;
enum tapi_snmp_sec_level_t;
enum tapi_snmp_sec_model_t;
enum tapi_snmp_truth_value;
enum tapi_snmp_vartypes_t;
enum tapi_snmp_vb_cmp_type;
enum tapi_snmp_version_t;
enum tapi_ssh_permit_root_login;
enum tapi_ssh_strict_host_key_checking;
enum tapi_storage_service_type;
enum tapi_tcp_mode_t;
enum tapi_tcp_protocol_mode_t;
enum tapi_trex_iom;
enum tapi_trex_port_stat_enum;
enum tapi_trex_so;
enum tapi_trex_verbose;
enum tapi_upnp_cd_object_type;
enum tapi_upnp_cd_resource_type;
enum tapi_wifi_cipher;
enum tapi_wifi_key_mgmt;
enum tapi_wifi_pmf;
enum tapi_wifi_policy;
enum tapi_wpa_supplicant_status;
enum tarpc_accept_verdict;
enum tarpc_clock_id_type;
enum tarpc_cmsg_data_type;
enum tarpc_dev_rx_offload_bits;
enum tarpc_dev_tx_offload_bits;
enum tarpc_epoll_data_type;
enum tarpc_eth_dev_capa;
enum tarpc_eth_link_speeds;
enum tarpc_eth_num_link_speeds;
enum tarpc_ethtool_type;
enum tarpc_flags;
enum tarpc_job_exec_param_type;
enum tarpc_job_status_type;
enum tarpc_job_wrapper_priority;
enum tarpc_joining_method;
enum tarpc_lib_flags;
enum tarpc_pktmbuf_inner_l2_types;
enum tarpc_pktmbuf_inner_l3_types;
enum tarpc_pktmbuf_inner_l4_types;
enum tarpc_pktmbuf_l2_types;
enum tarpc_pktmbuf_l3_types;
enum tarpc_pktmbuf_l4_types;
enum tarpc_pktmbuf_ol_flags;
enum tarpc_pktmbuf_tunnel_types;
enum tarpc_rte_dev_name_max_len;
enum tarpc_rte_eth_fc_mode;
enum tarpc_rte_eth_fec_mode;
enum tarpc_rte_eth_metadata_bits;
enum tarpc_rte_eth_representor_type;
enum tarpc_rte_eth_rss_types;
enum tarpc_rte_eth_rx_desc_status_value;
enum tarpc_rte_eth_rx_mq_mode;
enum tarpc_rte_eth_rxmode_flags;
enum tarpc_rte_eth_tunnel_type;
enum tarpc_rte_eth_tx_desc_status_value;
enum tarpc_rte_eth_tx_mq_mode;
enum tarpc_rte_eth_txmode_flags;
enum tarpc_rte_eth_txq_flags;
enum tarpc_rte_eth_vlan_offload_flags;
enum tarpc_rte_eth_xstats_name_size;
enum tarpc_rte_flow_error_type;
enum tarpc_rte_flow_query_data_types;
enum tarpc_rte_flow_restore_info_bits;
enum tarpc_rte_flow_rule_component_flags;
enum tarpc_rte_intr_op;
enum tarpc_rte_mbuf_match_tx_rx_status;
enum tarpc_rte_mbuf_ol_status;
enum tarpc_rte_pktmbuf_types_masks;
enum tarpc_rte_pktmbuf_types_offsets;
enum tarpc_rte_proc_type_t;
enum tarpc_rte_ring_flags;
enum tarpc_rte_vlan_type;
enum tarpc_send_function;
enum tarpc_socket_addr_family;
enum tarpc_transmit_packet_type;
enum tarpc_wait_code;
enum te_bool3;
enum te_conf_obj_compare_result;
enum te_errno_codes;
enum te_exec_param_type;
enum te_interface_kind;
enum te_ip4_upper_layer_csum_t;
enum te_ip6_upper_layer_csum_t;
enum te_ip_table_id_t;
enum te_ip_type;
enum te_json_compound;
enum te_json_out_t;
enum te_log_msg_arg_type;
enum te_meas_stats_init_flags;
enum te_meas_stats_update_codes;
enum te_mi_graph_axis;
enum te_mi_meas_aggr;
enum te_mi_meas_multiplier;
enum te_mi_meas_type;
enum te_mi_meas_view_type;
enum te_mi_type;
enum te_module;
enum te_nginx_cpu_aff_mode;
enum te_nginx_server_tokens_mode;
enum te_radvd_optcode;
enum te_radvd_optgroup;
enum te_radvd_opttype;
enum te_rgt_mi_type;
enum te_scalar_type;
enum te_sched_param_type;
enum te_socks_impl;
enum te_string_uri_escape_mode;
enum te_tad_protocols_t;
enum te_tcp_options_kind_t;
enum te_test_msg_type;
enum te_test_run_status;
enum te_test_status;
enum te_toeplitz_hash_variant;
enum te_unit_prefix;
enum te_upnp_action_arg_property_idx;
enum te_upnp_arg_direction;
enum te_upnp_device_property_idx;
enum te_upnp_service_property_idx;
enum te_upnp_state_variable_property_idx;
enum test_ethdev_state;
enum test_path_match;
enum test_path_type;
enum tester_cfg_walk_ctl;
enum tester_handdown;
enum tester_test_status;
enum tester_track_conf_flags;
enum testing_direction;
enum trc_db_walker_motion;
enum trc_diff_status;
enum trc_diff_summary_component;
enum trc_diff_summary_status;
enum trc_log_parse_app_id;
enum trc_log_parse_flags;
enum trc_log_parse_state;
enum trc_open_flags;
enum trc_report_flags;
enum trc_save_flags;
enum trc_test_status;
enum trc_test_type;
enum trc_update_log_parse_flags;
enum trc_update_rtype;
enum trc_verdict;
enum tsa_flags;
enum tsa_tst_type;
enum upnp_cp_request_type;
enum vfork_hook_phase;
enum wsa_ioctl_type;

// structs

struct _rpc_qos;
struct _rpc_sys_info;
struct accept_cond;
struct arl_entry_t;
struct asn_child_desc;
struct asn_enum_entry_t;
struct asn_named_entry_t;
struct asn_tag_t;
struct asn_type;
struct asn_value;
struct bridge_csap_specific_data;
struct cfg_add_dependency_msg;
struct cfg_add_msg;
struct cfg_backup_msg;
struct cfg_commit_msg;
struct cfg_conf_touch_msg;
struct cfg_config_msg;
struct cfg_copy_msg;
struct cfg_del_msg;
struct cfg_dependency;
struct cfg_family_msg;
struct cfg_find_msg;
struct cfg_get_descr_msg;
struct cfg_get_id_msg;
struct cfg_get_msg;
struct cfg_get_oid_msg;
struct cfg_handle_tqe;
struct cfg_inst_subid;
struct cfg_instance;
struct cfg_job_exit_status_t;
struct cfg_msg;
struct cfg_net_node_t;
struct cfg_net_pci_info_t;
struct cfg_net_t;
struct cfg_nets_t;
struct cfg_obj_descr;
struct cfg_object;
struct cfg_object_subid;
struct cfg_oid;
struct cfg_oid_rule;
struct cfg_pattern_msg;
struct cfg_primary_type;
struct cfg_process_history_msg;
struct cfg_reboot_msg;
struct cfg_register_msg;
struct cfg_set_msg;
struct cfg_shutdown_msg;
struct cfg_sync_msg;
struct cfg_tree_print_msg;
struct cfg_unregister_msg;
struct checked_arg;
struct cli_csap_prompt;
struct cli_csap_prompts;
struct cli_csap_specific_data;
struct cmd_monitor_descr;
struct cmd_monitor_t;
struct csap_instance;
struct csap_layer_t;
struct csap_spt_type_t;
struct ctrl_msg_data;
struct dhcp_csap_specific_data;
struct dhcp_message;
struct dhcp_option;
struct echo_body;
struct generic_pdu;
struct group;
struct host;
struct icmp6_msg_body;
struct icmp6_msg_option;
struct igmp_csap_specific_data;
struct ipc_datagram;
struct ipc_dgram_header;
struct iscsi_connection_data;
struct iscsi_connection_req;
struct iscsi_init_login_cmnd;
struct iscsi_init_logout_cmnd;
struct iscsi_init_nopout;
struct iscsi_init_scsi_cmnd;
struct iscsi_init_scsi_data_out;
struct iscsi_init_snack;
struct iscsi_init_task_mgt_command;
struct iscsi_init_text_cmnd;
struct iscsi_initiator_data;
struct iscsi_targ_async_msg;
struct iscsi_targ_login_rsp;
struct iscsi_targ_logout_rsp;
struct iscsi_targ_nopin;
struct iscsi_targ_r2t;
struct iscsi_targ_rjt;
struct iscsi_targ_scsi_data_in;
struct iscsi_targ_scsi_rsp;
struct iscsi_targ_task_mgt_response;
struct iscsi_targ_text_rsp;
struct iscsi_target_data;
struct iscsi_target_param_descr_t;
struct iscsi_target_params_t;
struct iscsi_target_thread_params_t;
struct iscsi_tgt_chap_data;
struct l2tp_auth;
struct l2tp_ipaddr_range;
struct l2tp_ppp_secret;
struct lcore_mask_t;
struct lgr_mess_header;
struct lgr_rb;
struct log_branch_filter;
struct log_branch_filter_rule;
struct log_duration_filter;
struct log_duration_filter_rule;
struct log_duration_filter_rules;
struct log_entity_filter;
struct log_listener;
struct log_listener_conf;
struct log_msg;
struct log_msg_filter;
struct log_msg_ptr;
struct log_msg_view;
struct log_user_filter;
struct logfork_msg;
struct logic_expr;
struct logic_expr_res;
struct msg_arg;
struct msg_buffer;
struct msg_queue;
struct nadv_body;
struct ndn_arp_header_plain;
struct ndn_delay_discr_pair_t;
struct ndn_eth_header_plain;
struct ndn_forw_action_plain;
struct ndn_forw_delay_t;
struct ndn_forw_drop_t;
struct ndn_forw_reorder_t;
struct ndn_stp_bpdu_t;
struct ndn_stp_cfg_bpdu_t;
struct netconf_bridge;
struct netconf_bridge_port;
struct netconf_devlink_eswitch;
struct netconf_devlink_info;
struct netconf_devlink_param;
struct netconf_devlink_param_value;
struct netconf_geneve;
struct netconf_handle_s;
struct netconf_ipvlan;
struct netconf_link;
struct netconf_list;
struct netconf_macvlan;
struct netconf_neigh;
struct netconf_net_addr;
struct netconf_node;
struct netconf_route;
struct netconf_route_nexthop;
struct netconf_udp_tunnel;
struct netconf_veth;
struct netconf_vlan;
struct netconf_vxlan;
struct nginx_http_client;
struct nginx_http_file_cache;
struct nginx_http_header;
struct nginx_http_listen_entry;
struct nginx_http_loc;
struct nginx_http_proxy;
struct nginx_http_server;
struct nginx_http_upstream;
struct nginx_http_us_server;
struct nginx_inst;
struct nginx_ssl_entry;
struct node_descr;
struct node_info;
struct nsol_body;
struct option_value_mreq;
struct option_value_mreq6;
struct option_value_mreq_source;
struct option_value_mreqn;
struct option_value_tcp_info;
struct param;
struct param_map_entry;
struct person_info;
struct ppp_csap_specific_data;
struct pppoe_csap_specific_data;
struct prefix_info;
struct problem;
struct radv_body;
struct rcf_msg;
struct rcf_params;
struct rcf_pch_cfg_object;
struct rcf_pch_cfg_substitution;
struct rcf_rpc_server;
struct rcf_rpc_server_hook;
struct rcf_symbol_entry;
struct rcf_talib_methods;
struct rcf_talib_param;
struct rcf_tce_comp_conf;
struct rcf_tce_conf;
struct rcf_tce_local_conf;
struct rcf_tce_type_conf;
struct rcf_trpoll_csap;
struct receive_transform;
struct refcnt_buffer;
struct response_pdu;
struct restconf_settings;
struct result_info;
struct rgt_attrs;
struct rgt_author;
struct rgt_blk;
struct rgt_cap_idx_rec;
struct rgt_depth_ctx;
struct rgt_depth_data_storage;
struct rgt_frag_rec;
struct rgt_gen_ctx;
struct rgt_mem_ctx;
struct rgt_statistics;
struct rgt_tmpl;
struct rgt_var_def;
struct rgt_xml2multi_opts;
struct rpc_bit_map_entry;
struct rpc_call_data;
struct rpc_dirent;
struct rpc_dpdk_offload_t;
struct rpc_epoll_event;
struct rpc_f_owner_ex;
struct rpc_func_info;
struct rpc_hwtstamp_config;
struct rpc_info;
struct rpc_iovec;
struct rpc_mmsghdr;
struct rpc_msghdr;
struct rpc_onload_scm_timestamping_stream;
struct rpc_overlapped;
struct rpc_pollfd;
struct rpc_ptr_off;
struct rpc_scm_timestamping;
struct rpc_struct_sigaction;
struct rpc_tcp_info;
struct rpc_wait_status;
struct rpcs_msghdr_helper;
struct run_item;
struct scsi_fixed_sense_data;
struct send_transform;
struct sendq_entry_s;
struct sendq_s;
struct serial_console_t;
struct serial_event_t;
struct serial_parser_t;
struct serial_pattern_t;
struct set;
struct snif_polling_sets_t;
struct sniffer_id;
struct snmp_csap_specific_data;
struct space;
struct streaming_action;
struct streaming_filter;
struct streaming_rule;
struct ta;
struct ta_cfg_obj;
struct ta_cfg_obj_attr;
struct ta_check;
struct ta_ethtool_lsets;
struct ta_ethtool_strings;
struct ta_initial_task;
struct ta_inst;
struct ta_job_buffer_t;
struct ta_job_status_t;
struct ta_reboot_context;
struct ta_rt_info_t;
struct ta_rt_nexthop_t;
struct tad_action_spec;
struct tad_atm_cell_ctrl_data;
struct tad_bps_pkt_frag;
struct tad_bps_pkt_frag_data;
struct tad_bps_pkt_frag_def;
struct tad_data_unit_t;
struct tad_du_data_t;
struct tad_eth_rw_data;
struct tad_eth_sap;
struct tad_int_expr_t;
struct tad_iscsi_layer_data;
struct tad_payload_spec_t;
struct tad_pkt;
struct tad_pkt_seg;
struct tad_pkts;
struct tad_poll_context;
struct tad_recv_context;
struct tad_recv_op_context;
struct tad_recv_pattern_data;
struct tad_recv_pkt;
struct tad_recv_pkt_layer;
struct tad_recv_ptrn_unit_data;
struct tad_reply_context;
struct tad_reply_spec;
struct tad_rte_mbuf_rw_data;
struct tad_rte_mbuf_sap;
struct tad_send_context;
struct tad_send_template_data;
struct tad_send_tmpl_unit_data;
struct tad_socket_rw_data;
struct tad_tmpl_arg_t;
struct tad_tmpl_iter_spec_t;
struct tad_vlan_tag;
struct tapi_arp_frame;
struct tapi_auth_info_s;
struct tapi_auth_tls_s;
struct tapi_auth_wifi_s;
struct tapi_bpf_lpm_trie_key;
struct tapi_bpf_rxq_stats;
struct tapi_bpf_stim_ctx;
struct tapi_bpf_stim_hdl;
struct tapi_bttrack_app;
struct tapi_bttrack_opt;
struct tapi_cfg_base_loadavg;
struct tapi_cfg_if_fc;
struct tapi_cfg_if_rss_hfunc;
struct tapi_cfg_if_stats;
struct tapi_cfg_net_assigned;
struct tapi_cfg_net_stats;
struct tapi_cfg_net_stats_icmp;
struct tapi_cfg_net_stats_ipv4;
struct tapi_cfg_ovs_cfg;
struct tapi_cfg_ps_exit_status_t;
struct tapi_cfg_rt_nexthop;
struct tapi_cfg_rt_params;
struct tapi_cpu_index_t;
struct tapi_cpu_prop_t;
struct tapi_ctorrent_opt;
struct tapi_dns_unbound_app;
struct tapi_dns_unbound_cfg_ac;
struct tapi_dns_unbound_cfg_address;
struct tapi_dns_unbound_cfg_auth_zone;
struct tapi_dns_unbound_cfg_opt;
struct tapi_dns_unbound_opt;
struct tapi_dns_zone_file_rr;
struct tapi_dns_zone_file_rr_a;
struct tapi_dns_zone_file_rr_data;
struct tapi_dns_zone_file_rr_ns;
struct tapi_dns_zone_file_rr_soa;
struct tapi_dnsperf_app;
struct tapi_dnsperf_opt;
struct tapi_dnsperf_report;
struct tapi_dpdk_l2fwd_job_t;
struct tapi_dpdk_testpmd_job_t;
struct tapi_env;
struct tapi_env_addr;
struct tapi_env_alias;
struct tapi_env_host;
struct tapi_env_if;
struct tapi_env_net;
struct tapi_env_pco;
struct tapi_env_process;
struct tapi_env_ps_if;
struct tapi_ethtool_if_props;
struct tapi_ethtool_opt;
struct tapi_ethtool_pause;
struct tapi_ethtool_report;
struct tapi_ethtool_ring;
struct tapi_fio;
struct tapi_fio_app;
struct tapi_fio_methods;
struct tapi_fio_numjobs_t;
struct tapi_fio_opts;
struct tapi_fio_report;
struct tapi_fio_report_bw;
struct tapi_fio_report_clat;
struct tapi_fio_report_io;
struct tapi_fio_report_iops;
struct tapi_fio_report_lat;
struct tapi_fio_report_percentiles;
struct tapi_flow_ep;
struct tapi_flow_s;
struct tapi_flow_traffic;
struct tapi_gtest;
struct tapi_gtest_impl;
struct tapi_haproxy_app;
struct tapi_haproxy_cfg_address;
struct tapi_haproxy_cfg_backend;
struct tapi_haproxy_cfg_opt;
struct tapi_haproxy_opt;
struct tapi_igmp3_group_list_s;
struct tapi_igmp3_group_record_s;
struct tapi_igmp3_src_list_s;
struct tapi_iomux_epoll_context;
struct tapi_iomux_evt_fd;
struct tapi_iomux_evts_list;
struct tapi_iomux_handle;
struct tapi_iomux_methods;
struct tapi_iomux_poll_context;
struct tapi_iomux_select_context;
struct tapi_ip4_packet_t;
struct tapi_ip6_packet_t;
struct tapi_ip_frag_spec;
struct tapi_jmp_point;
struct tapi_job_buffer_t;
struct tapi_job_exec_affinity_param;
struct tapi_job_exec_param;
struct tapi_job_exec_priority_param;
struct tapi_job_exec_workdir_param;
struct tapi_job_methods_t;
struct tapi_job_opt_array;
struct tapi_job_opt_bind;
struct tapi_job_opt_struct;
struct tapi_job_simple_desc_t;
struct tapi_job_simple_filter_t;
struct tapi_job_status_t;
struct tapi_local_file;
struct tapi_local_file_le;
struct tapi_local_file_property;
struct tapi_local_storage_device;
struct tapi_local_storage_device_le;
struct tapi_local_storage_device_methods;
struct tapi_media_file;
struct tapi_media_file_metadata;
struct tapi_media_player;
struct tapi_media_player_methods;
struct tapi_memaslap_app;
struct tapi_memaslap_cfg_opt;
struct tapi_memaslap_opt;
struct tapi_memaslap_report;
struct tapi_memcached_app;
struct tapi_memcached_opt;
struct tapi_memtier_app;
struct tapi_memtier_op_stats;
struct tapi_memtier_opt;
struct tapi_memtier_report;
struct tapi_mke2fs_opt;
struct tapi_ndn_gso_conf;
struct tapi_netperf_opt;
struct tapi_netperf_report;
struct tapi_netperf_test_opt;
struct tapi_nptcp_app;
struct tapi_nptcp_opt;
struct tapi_nptcp_report_entry;
struct tapi_nvme_connect_opts;
struct tapi_nvme_host_ctrl;
struct tapi_nvme_internal_dirinfo;
struct tapi_nvme_onvme_target_opts;
struct tapi_nvme_onvme_target_proc;
struct tapi_nvme_target;
struct tapi_nvme_target_methods;
struct tapi_packetdrill_opts;
struct tapi_parser_id;
struct tapi_pat_receiver;
struct tapi_pat_sender;
struct tapi_perf_app;
struct tapi_perf_client;
struct tapi_perf_client_methods;
struct tapi_perf_error_map;
struct tapi_perf_opts;
struct tapi_perf_report;
struct tapi_perf_server;
struct tapi_perf_server_methods;
struct tapi_ping_opt;
struct tapi_ping_report;
struct tapi_ping_rtt_stats;
struct tapi_radius_attr_info_t;
struct tapi_radius_attr_list_t;
struct tapi_radius_attr_t;
struct tapi_radius_clnt_s;
struct tapi_radius_packet_t;
struct tapi_radius_pkt_handler_data;
struct tapi_radius_serv_s;
struct tapi_rand_gen;
struct tapi_redis_benchmark_app;
struct tapi_redis_benchmark_opt;
struct tapi_redis_benchmark_stat;
struct tapi_redis_srv_app;
struct tapi_redis_srv_opt;
struct tapi_route_gateway;
struct tapi_rt_entry;
struct tapi_rt_ip_rule_entry;
struct tapi_serial;
struct tapi_sfnt_pp_opt;
struct tapi_sfnt_pp_report;
struct tapi_sniff_list_s;
struct tapi_sniffer_id;
struct tapi_snmp_common_table_row_s;
struct tapi_snmp_if_table_row_t;
struct tapi_snmp_ip_addr_table_row_s;
struct tapi_snmp_ip_address_table_row_s;
struct tapi_snmp_ip_addrtable_row_t;
struct tapi_snmp_ip_cidr_route_table_row_s;
struct tapi_snmp_ip_net_to_media_table_row_s;
struct tapi_snmp_message_t;
struct tapi_snmp_oct_string_t;
struct tapi_snmp_oid_t;
struct tapi_snmp_pkt_handler_data;
struct tapi_snmp_security_s;
struct tapi_snmp_v1_gen_trap_name;
struct tapi_snmp_var_access;
struct tapi_snmp_varbind_t;
struct tapi_ssh;
struct tapi_ssh_client_opt;
struct tapi_ssh_server_opt;
struct tapi_storage_auth_params;
struct tapi_storage_client;
struct tapi_storage_client_methods;
struct tapi_storage_server;
struct tapi_storage_server_methods;
struct tapi_storage_share_le;
struct tapi_stress_opt;
struct tapi_tad_trrecv_cb_data;
struct tapi_tcp_reset_hack_t;
struct tapi_test_expected_result;
struct tapi_trex_app;
struct tapi_trex_client_config;
struct tapi_trex_common_config;
struct tapi_trex_opt;
struct tapi_trex_per_port_stat;
struct tapi_trex_per_port_stat_flts;
struct tapi_trex_port_stat;
struct tapi_trex_port_stat_flt;
struct tapi_trex_report;
struct tapi_trex_server_config;
struct tapi_upnp_action;
struct tapi_upnp_argument;
struct tapi_upnp_cd_container;
struct tapi_upnp_cd_container_node;
struct tapi_upnp_cd_contributor;
struct tapi_upnp_cd_contributor_node;
struct tapi_upnp_cd_object;
struct tapi_upnp_cd_resource;
struct tapi_upnp_cd_resource_node;
struct tapi_upnp_device_info;
struct tapi_upnp_resources_uri_node;
struct tapi_upnp_service_info;
struct tapi_upnp_state_variable;
struct tapi_upnp_sv_allowed_values;
struct tapi_wpa_supplicant_security;
struct tapi_wrk_app;
struct tapi_wrk_latency_percentile;
struct tapi_wrk_opt;
struct tapi_wrk_report;
struct tapi_wrk_socket_errors;
struct tapi_wrk_thread_stats;
struct tarpc___sysv_signal_in;
struct tarpc___sysv_signal_out;
struct tarpc_accept4_in;
struct tarpc_accept4_out;
struct tarpc_accept_cond;
struct tarpc_accept_ex_in;
struct tarpc_accept_ex_out;
struct tarpc_accept_in;
struct tarpc_accept_out;
struct tarpc_access_in;
struct tarpc_ai;
struct tarpc_aio_cancel_in;
struct tarpc_aio_error_in;
struct tarpc_aio_fsync_in;
struct tarpc_aio_read_in;
struct tarpc_aio_return_in;
struct tarpc_aio_suspend_in;
struct tarpc_aio_write_in;
struct tarpc_alloc_wsabuf_in;
struct tarpc_alloc_wsabuf_out;
struct tarpc_arpreq;
struct tarpc_bind_in;
struct tarpc_bond_get_slaves_in;
struct tarpc_bond_get_slaves_out;
struct tarpc_bpf_obj_get_in;
struct tarpc_bsd_signal_in;
struct tarpc_bsd_signal_out;
struct tarpc_call_tgkill_in;
struct tarpc_cancel_io_in;
struct tarpc_cancel_io_out;
struct tarpc_char_array;
struct tarpc_check_port_is_free_in;
struct tarpc_check_port_is_free_out;
struct tarpc_chroot_in;
struct tarpc_clock_adjtime_in;
struct tarpc_clock_adjtime_out;
struct tarpc_clock_gettime_in;
struct tarpc_clock_gettime_out;
struct tarpc_clock_settime_in;
struct tarpc_close_event_in;
struct tarpc_close_in;
struct tarpc_closedir_in;
struct tarpc_closedir_out;
struct tarpc_closesocket_in;
struct tarpc_closesocket_out;
struct tarpc_cmsg_data_parse_ip_pktinfo_in;
struct tarpc_cmsg_data_parse_ip_pktinfo_out;
struct tarpc_cmsghdr;
struct tarpc_completion_callback_in;
struct tarpc_completion_callback_out;
struct tarpc_connect_ex_in;
struct tarpc_connect_ex_out;
struct tarpc_connect_in;
struct tarpc_copy_fd2fd_in;
struct tarpc_copy_fd2fd_out;
struct tarpc_copy_ta_libs_in;
struct tarpc_create_aiocb_in;
struct tarpc_create_aiocb_out;
struct tarpc_create_event_in;
struct tarpc_create_event_out;
struct tarpc_create_event_with_bit_in;
struct tarpc_create_event_with_bit_out;
struct tarpc_create_file_in;
struct tarpc_create_file_out;
struct tarpc_create_io_completion_port_in;
struct tarpc_create_io_completion_port_out;
struct tarpc_create_overlapped_in;
struct tarpc_create_overlapped_out;
struct tarpc_create_process_in;
struct tarpc_create_process_out;
struct tarpc_create_window_in;
struct tarpc_create_window_out;
struct tarpc_delete_aiocb_in;
struct tarpc_delete_overlapped_in;
struct tarpc_descriptor_status_in;
struct tarpc_destroy_window_in;
struct tarpc_dirent;
struct tarpc_disconnect_ex_in;
struct tarpc_do_fd_clr_in;
struct tarpc_do_fd_isset_in;
struct tarpc_do_fd_set_in;
struct tarpc_do_fd_zero_in;
struct tarpc_dpdk_eth_await_link_up_in;
struct tarpc_dpdk_find_representors_out;
struct tarpc_dpdk_get_version_out;
struct tarpc_drain_fd_in;
struct tarpc_drain_fd_out;
struct tarpc_dup2_in;
struct tarpc_dup3_in;
struct tarpc_dup_in;
struct tarpc_duplicate_handle_in;
struct tarpc_duplicate_handle_out;
struct tarpc_duplicate_socket_in;
struct tarpc_duplicate_socket_out;
struct tarpc_echoer_in;
struct tarpc_echoer_out;
struct tarpc_enum_network_events_in;
struct tarpc_enum_network_events_out;
struct tarpc_epoll_create1_in;
struct tarpc_epoll_create_in;
struct tarpc_epoll_ctl_in;
struct tarpc_epoll_event;
struct tarpc_epoll_pwait2_in;
struct tarpc_epoll_pwait2_out;
struct tarpc_epoll_pwait_in;
struct tarpc_epoll_pwait_out;
struct tarpc_epoll_wait_in;
struct tarpc_epoll_wait_out;
struct tarpc_ether_addr;
struct tarpc_ethtool;
struct tarpc_ethtool_cmd;
struct tarpc_ethtool_perm_addr;
struct tarpc_ethtool_ts_info;
struct tarpc_ethtool_value;
struct tarpc_event_select_in;
struct tarpc_execve_gen_in;
struct tarpc_execve_in;
struct tarpc_execve_out;
struct tarpc_exit_in;
struct tarpc_f_owner_ex;
struct tarpc_fclose_in;
struct tarpc_fclose_out;
struct tarpc_fcntl_in;
struct tarpc_fcntl_out;
struct tarpc_fd_set_delete_in;
struct tarpc_fd_set_new_out;
struct tarpc_fdopen_in;
struct tarpc_fdopen_out;
struct tarpc_file_data;
struct tarpc_fileno_in;
struct tarpc_fileno_out;
struct tarpc_fill_aiocb_in;
struct tarpc_flooder_in;
struct tarpc_flooder_out;
struct tarpc_flowspec;
struct tarpc_fopen_in;
struct tarpc_fopen_out;
struct tarpc_free_in;
struct tarpc_free_out;
struct tarpc_free_wsabuf_in;
struct tarpc_free_wsabuf_out;
struct tarpc_freeaddrinfo_in;
struct tarpc_fstatvfs_in;
struct tarpc_fstatvfs_out;
struct tarpc_fsync_in;
struct tarpc_ftp_close_in;
struct tarpc_ftp_close_out;
struct tarpc_ftp_open_in;
struct tarpc_ftp_open_out;
struct tarpc_ftruncate_in;
struct tarpc_get_accept_addr_in;
struct tarpc_get_accept_addr_out;
struct tarpc_get_addr_by_id_in;
struct tarpc_get_addr_by_id_out;
struct tarpc_get_addrof_in;
struct tarpc_get_addrof_out;
struct tarpc_get_buf_in;
struct tarpc_get_buf_out;
struct tarpc_get_current_process_id_in;
struct tarpc_get_current_process_id_out;
struct tarpc_get_queued_completion_status_in;
struct tarpc_get_queued_completion_status_out;
struct tarpc_get_rw_ability_in;
struct tarpc_get_rw_ability_out;
struct tarpc_get_sizeof_in;
struct tarpc_get_sizeof_out;
struct tarpc_get_sys_info_in;
struct tarpc_get_sys_info_out;
struct tarpc_get_var_in;
struct tarpc_get_var_out;
struct tarpc_get_wsa_ioctl_overlapped_result_in;
struct tarpc_get_wsa_ioctl_overlapped_result_out;
struct tarpc_getaddrinfo_in;
struct tarpc_getaddrinfo_out;
struct tarpc_getenv_in;
struct tarpc_getenv_out;
struct tarpc_gethostbyaddr_in;
struct tarpc_gethostbyaddr_out;
struct tarpc_gethostbyname_in;
struct tarpc_gethostbyname_out;
struct tarpc_gethostname_in;
struct tarpc_gethostname_out;
struct tarpc_getpid_in;
struct tarpc_getpwnam_in;
struct tarpc_getpwnam_out;
struct tarpc_getrlimit_in;
struct tarpc_getrlimit_out;
struct tarpc_getsockopt_in;
struct tarpc_getsockopt_out;
struct tarpc_gettimeofday_in;
struct tarpc_gettimeofday_out;
struct tarpc_getuid_in;
struct tarpc_getuid_out;
struct tarpc_group_req;
struct tarpc_guid;
struct tarpc_h_addr;
struct tarpc_h_alias;
struct tarpc_has_overlapped_io_completed_in;
struct tarpc_has_overlapped_io_completed_out;
struct tarpc_hostent;
struct tarpc_hwtstamp_config;
struct tarpc_if_freenameindex_in;
struct tarpc_if_indextoname_in;
struct tarpc_if_indextoname_out;
struct tarpc_if_nameindex;
struct tarpc_if_nameindex_in;
struct tarpc_if_nameindex_out;
struct tarpc_if_nametoindex_in;
struct tarpc_if_nametoindex_out;
struct tarpc_ifconf;
struct tarpc_ifname;
struct tarpc_ifreq;
struct tarpc_in6_pktinfo;
struct tarpc_in_arg;
struct tarpc_in_pktinfo;
struct tarpc_int_retval_out;
struct tarpc_integer2raw_in;
struct tarpc_integer2raw_out;
struct tarpc_ioctl_in;
struct tarpc_ioctl_out;
struct tarpc_iomux_close_state_in;
struct tarpc_iomux_create_state_in;
struct tarpc_iomux_create_state_out;
struct tarpc_iomux_splice_in;
struct tarpc_iomux_splice_out;
struct tarpc_iovec;
struct tarpc_job_add_exec_param_in;
struct tarpc_job_add_exec_param_out;
struct tarpc_job_allocate_channels_in;
struct tarpc_job_allocate_channels_out;
struct tarpc_job_attach_filter_in;
struct tarpc_job_attach_filter_out;
struct tarpc_job_buffer;
struct tarpc_job_clear_in;
struct tarpc_job_clear_out;
struct tarpc_job_create_in;
struct tarpc_job_create_out;
struct tarpc_job_deallocate_channels_in;
struct tarpc_job_deallocate_channels_out;
struct tarpc_job_destroy_in;
struct tarpc_job_destroy_out;
struct tarpc_job_exec_affinity;
struct tarpc_job_exec_param;
struct tarpc_job_exec_priority;
struct tarpc_job_exec_workdir;
struct tarpc_job_filter_add_channels_in;
struct tarpc_job_filter_add_channels_out;
struct tarpc_job_filter_add_regexp_in;
struct tarpc_job_filter_add_regexp_out;
struct tarpc_job_filter_remove_channels_in;
struct tarpc_job_filter_remove_channels_out;
struct tarpc_job_kill_in;
struct tarpc_job_kill_out;
struct tarpc_job_killpg_in;
struct tarpc_job_killpg_out;
struct tarpc_job_poll_in;
struct tarpc_job_poll_out;
struct tarpc_job_process_setting;
struct tarpc_job_receive_in;
struct tarpc_job_receive_last_in;
struct tarpc_job_receive_last_out;
struct tarpc_job_receive_many_in;
struct tarpc_job_receive_many_out;
struct tarpc_job_receive_out;
struct tarpc_job_send_in;
struct tarpc_job_send_out;
struct tarpc_job_start_in;
struct tarpc_job_start_out;
struct tarpc_job_status;
struct tarpc_job_stop_in;
struct tarpc_job_stop_out;
struct tarpc_job_wait_in;
struct tarpc_job_wait_out;
struct tarpc_job_wrapper_add_in;
struct tarpc_job_wrapper_add_out;
struct tarpc_job_wrapper_delete_in;
struct tarpc_job_wrapper_delete_out;
struct tarpc_kill_in;
struct tarpc_linger;
struct tarpc_link_in;
struct tarpc_link_out;
struct tarpc_lio_listio_in;
struct tarpc_listen_in;
struct tarpc_ll;
struct tarpc_local;
struct tarpc_lseek_in;
struct tarpc_lseek_out;
struct tarpc_madvise_in;
struct tarpc_madvise_out;
struct tarpc_malloc_in;
struct tarpc_malloc_misaligned_in;
struct tarpc_malloc_misaligned_out;
struct tarpc_malloc_out;
struct tarpc_mbuf_in;
struct tarpc_mbuf_retval_out;
struct tarpc_mcast_join_leave_in;
struct tarpc_mcast_join_leave_out;
struct tarpc_mcast_source_join_leave_in;
struct tarpc_mcast_source_join_leave_out;
struct tarpc_memcmp_in;
struct tarpc_mkdir_in;
struct tarpc_mkdir_out;
struct tarpc_mkstemp_in;
struct tarpc_mkstemp_out;
struct tarpc_mmap_in;
struct tarpc_mmap_out;
struct tarpc_mmsghdr;
struct tarpc_mreq_source;
struct tarpc_mreqn;
struct tarpc_msghdr;
struct tarpc_multiple_iomux_in;
struct tarpc_multiple_iomux_out;
struct tarpc_multiple_iomux_wait_in;
struct tarpc_multiple_iomux_wait_out;
struct tarpc_munmap_in;
struct tarpc_munmap_out;
struct tarpc_namespace_id2str_in;
struct tarpc_namespace_id2str_out;
struct tarpc_network_events;
struct tarpc_onload_scm_timestamping_stream;
struct tarpc_open64_in;
struct tarpc_open64_out;
struct tarpc_open_in;
struct tarpc_open_out;
struct tarpc_opendir_in;
struct tarpc_opendir_out;
struct tarpc_out_arg;
struct tarpc_overfill_buffers_in;
struct tarpc_overfill_buffers_out;
struct tarpc_overfill_fd_in;
struct tarpc_overfill_fd_out;
struct tarpc_passwd;
struct tarpc_pat_gen_arg;
struct tarpc_pattern_receiver_in;
struct tarpc_pattern_sender_in;
struct tarpc_pattern_sender_out;
struct tarpc_pclose_in;
struct tarpc_pclose_out;
struct tarpc_peek_message_in;
struct tarpc_peek_message_out;
struct tarpc_pipe2_in;
struct tarpc_pipe2_out;
struct tarpc_pipe_in;
struct tarpc_pipe_out;
struct tarpc_pktmbuf_seg_group;
struct tarpc_poll_in;
struct tarpc_poll_out;
struct tarpc_pollfd;
struct tarpc_popen_in;
struct tarpc_popen_out;
struct tarpc_posix_memalign_in;
struct tarpc_posix_memalign_out;
struct tarpc_post_queued_completion_status_in;
struct tarpc_post_queued_completion_status_out;
struct tarpc_power_sw_in;
struct tarpc_ppoll_in;
struct tarpc_ppoll_out;
struct tarpc_pread_in;
struct tarpc_preadv2_in;
struct tarpc_preadv_in;
struct tarpc_protocol_info_cmp_in;
struct tarpc_protocol_info_cmp_out;
struct tarpc_pselect_in;
struct tarpc_pselect_out;
struct tarpc_pthread_cancel_in;
struct tarpc_pthread_join_in;
struct tarpc_pthread_join_out;
struct tarpc_pthread_kill_in;
struct tarpc_pthread_self_in;
struct tarpc_pthread_self_out;
struct tarpc_pthread_setcancelstate_in;
struct tarpc_pthread_setcancelstate_out;
struct tarpc_pthread_setcanceltype_in;
struct tarpc_pthread_setcanceltype_out;
struct tarpc_ptp_clock_caps;
struct tarpc_ptp_clock_time;
struct tarpc_ptp_sys_offset;
struct tarpc_ptp_sys_offset_extended;
struct tarpc_ptp_sys_offset_precise;
struct tarpc_ptp_three_ts;
struct tarpc_qos;
struct tarpc_raw2integer_in;
struct tarpc_raw2integer_out;
struct tarpc_read_fd_in;
struct tarpc_read_fd_out;
struct tarpc_read_file_ex_in;
struct tarpc_read_file_ex_out;
struct tarpc_read_file_in;
struct tarpc_read_file_out;
struct tarpc_read_in;
struct tarpc_read_out;
struct tarpc_readbuf_in;
struct tarpc_readdir_in;
struct tarpc_readdir_out;
struct tarpc_readlink_in;
struct tarpc_readlink_out;
struct tarpc_readv_in;
struct tarpc_readv_out;
struct tarpc_recv_in;
struct tarpc_recv_out;
struct tarpc_recv_verify_in;
struct tarpc_recv_verify_out;
struct tarpc_recvbuf_in;
struct tarpc_recvfrom_in;
struct tarpc_recvfrom_out;
struct tarpc_recvmmsg_alt_in;
struct tarpc_recvmmsg_alt_out;
struct tarpc_recvmsg_in;
struct tarpc_recvmsg_out;
struct tarpc_release_rpc_ptr_in;
struct tarpc_remove_dir_with_files_in;
struct tarpc_rename_in;
struct tarpc_rename_out;
struct tarpc_reset_event_in;
struct tarpc_rlimit;
struct tarpc_rm_ta_libs_in;
struct tarpc_rmdir_in;
struct tarpc_rmdir_out;
struct tarpc_rpc_find_func_in;
struct tarpc_rpc_find_func_out;
struct tarpc_rpc_is_op_done_out;
struct tarpc_rpcserver_plugin_enable_in;
struct tarpc_rte_dev_reg_info;
struct tarpc_rte_eal_hotplug_add_in;
struct tarpc_rte_eal_hotplug_remove_in;
struct tarpc_rte_eal_init_in;
struct tarpc_rte_eal_process_type_in;
struct tarpc_rte_eal_process_type_out;
struct tarpc_rte_epoll_data;
struct tarpc_rte_epoll_event;
struct tarpc_rte_epoll_wait_in;
struct tarpc_rte_epoll_wait_out;
struct tarpc_rte_eth_conf;
struct tarpc_rte_eth_desc_lim;
struct tarpc_rte_eth_dev_configure_in;
struct tarpc_rte_eth_dev_default_mac_addr_set_in;
struct tarpc_rte_eth_dev_flow_ctrl_get_out;
struct tarpc_rte_eth_dev_flow_ctrl_set_in;
struct tarpc_rte_eth_dev_fw_version_get_in;
struct tarpc_rte_eth_dev_fw_version_get_out;
struct tarpc_rte_eth_dev_get_mtu_in;
struct tarpc_rte_eth_dev_get_mtu_out;
struct tarpc_rte_eth_dev_get_name_by_port_out;
struct tarpc_rte_eth_dev_get_port_by_name_in;
struct tarpc_rte_eth_dev_get_port_by_name_out;
struct tarpc_rte_eth_dev_get_reg_info_in;
struct tarpc_rte_eth_dev_get_reg_info_out;
struct tarpc_rte_eth_dev_get_supported_ptypes_in;
struct tarpc_rte_eth_dev_get_supported_ptypes_out;
struct tarpc_rte_eth_dev_info;
struct tarpc_rte_eth_dev_info_get_out;
struct tarpc_rte_eth_dev_port_id_in;
struct tarpc_rte_eth_dev_port_id_queue_id_in;
struct tarpc_rte_eth_dev_portconf;
struct tarpc_rte_eth_dev_rss_hash_conf_get_in;
struct tarpc_rte_eth_dev_rss_hash_conf_get_out;
struct tarpc_rte_eth_dev_rss_hash_update_in;
struct tarpc_rte_eth_dev_rss_reta_query_in;
struct tarpc_rte_eth_dev_rss_reta_query_out;
struct tarpc_rte_eth_dev_rss_reta_update_in;
struct tarpc_rte_eth_dev_rx_intr_ctl_q_in;
struct tarpc_rte_eth_dev_rx_offload_name_in;
struct tarpc_rte_eth_dev_rx_offload_name_out;
struct tarpc_rte_eth_dev_set_mc_addr_list_in;
struct tarpc_rte_eth_dev_set_mtu_in;
struct tarpc_rte_eth_dev_set_vlan_ether_type_in;
struct tarpc_rte_eth_dev_set_vlan_offload_in;
struct tarpc_rte_eth_dev_set_vlan_pvid_in;
struct tarpc_rte_eth_dev_set_vlan_strip_on_queue_in;
struct tarpc_rte_eth_dev_tx_offload_name_in;
struct tarpc_rte_eth_dev_tx_offload_name_out;
struct tarpc_rte_eth_dev_udp_tunnel_port_add_in;
struct tarpc_rte_eth_dev_vlan_filter_in;
struct tarpc_rte_eth_fc_conf;
struct tarpc_rte_eth_fec_capa;
struct tarpc_rte_eth_fec_get_capability_in;
struct tarpc_rte_eth_fec_get_capability_out;
struct tarpc_rte_eth_fec_get_in;
struct tarpc_rte_eth_fec_get_out;
struct tarpc_rte_eth_fec_set_in;
struct tarpc_rte_eth_link;
struct tarpc_rte_eth_link_get_nowait_out;
struct tarpc_rte_eth_link_get_out;
struct tarpc_rte_eth_macaddr_get_in;
struct tarpc_rte_eth_macaddr_get_out;
struct tarpc_rte_eth_representor_info;
struct tarpc_rte_eth_representor_info_get_in;
struct tarpc_rte_eth_representor_info_get_out;
struct tarpc_rte_eth_representor_range;
struct tarpc_rte_eth_rss_conf;
struct tarpc_rte_eth_rss_reta_entry64;
struct tarpc_rte_eth_rx_adv_conf;
struct tarpc_rte_eth_rx_burst_in;
struct tarpc_rte_eth_rx_burst_out;
struct tarpc_rte_eth_rx_metadata_negotiate_in;
struct tarpc_rte_eth_rx_metadata_negotiate_out;
struct tarpc_rte_eth_rx_queue_count_in;
struct tarpc_rte_eth_rx_queue_info_get_out;
struct tarpc_rte_eth_rx_queue_setup_in;
struct tarpc_rte_eth_rxconf;
struct tarpc_rte_eth_rxmode;
struct tarpc_rte_eth_rxq_info;
struct tarpc_rte_eth_stats;
struct tarpc_rte_eth_stats_get_in;
struct tarpc_rte_eth_stats_get_out;
struct tarpc_rte_eth_stats_reset_in;
struct tarpc_rte_eth_thresh;
struct tarpc_rte_eth_tx_burst_in;
struct tarpc_rte_eth_tx_burst_out;
struct tarpc_rte_eth_tx_queue_info_get_out;
struct tarpc_rte_eth_tx_queue_setup_in;
struct tarpc_rte_eth_txconf;
struct tarpc_rte_eth_txmode;
struct tarpc_rte_eth_txq_info;
struct tarpc_rte_eth_udp_tunnel;
struct tarpc_rte_eth_xstat;
struct tarpc_rte_eth_xstat_name;
struct tarpc_rte_eth_xstats_get_by_id_in;
struct tarpc_rte_eth_xstats_get_by_id_out;
struct tarpc_rte_eth_xstats_get_in;
struct tarpc_rte_eth_xstats_get_names_by_id_in;
struct tarpc_rte_eth_xstats_get_names_by_id_out;
struct tarpc_rte_eth_xstats_get_names_in;
struct tarpc_rte_eth_xstats_get_names_out;
struct tarpc_rte_eth_xstats_get_out;
struct tarpc_rte_eth_xstats_reset_in;
struct tarpc_rte_flow_create_out;
struct tarpc_rte_flow_destroy_in;
struct tarpc_rte_flow_error;
struct tarpc_rte_flow_flush_in;
struct tarpc_rte_flow_get_restore_info_in;
struct tarpc_rte_flow_get_restore_info_out;
struct tarpc_rte_flow_isolate_in;
struct tarpc_rte_flow_pick_transfer_proxy_in;
struct tarpc_rte_flow_pick_transfer_proxy_out;
struct tarpc_rte_flow_prepend_opaque_actions_in;
struct tarpc_rte_flow_prepend_opaque_actions_out;
struct tarpc_rte_flow_prepend_opaque_items_in;
struct tarpc_rte_flow_prepend_opaque_items_out;
struct tarpc_rte_flow_query_count;
struct tarpc_rte_flow_query_in;
struct tarpc_rte_flow_query_out;
struct tarpc_rte_flow_release_united_actions_in;
struct tarpc_rte_flow_release_united_items_in;
struct tarpc_rte_flow_restore_info;
struct tarpc_rte_flow_tunnel;
struct tarpc_rte_flow_tunnel_action_decap_release_in;
struct tarpc_rte_flow_tunnel_action_decap_release_out;
struct tarpc_rte_flow_tunnel_decap_set_in;
struct tarpc_rte_flow_tunnel_decap_set_out;
struct tarpc_rte_flow_tunnel_item_release_in;
struct tarpc_rte_flow_tunnel_item_release_out;
struct tarpc_rte_flow_tunnel_match_in;
struct tarpc_rte_flow_tunnel_match_out;
struct tarpc_rte_flow_validate_in;
struct tarpc_rte_flow_validate_out;
struct tarpc_rte_free_flow_rule_in;
struct tarpc_rte_insert_flow_rule_items_in;
struct tarpc_rte_insert_flow_rule_items_out;
struct tarpc_rte_intr_conf;
struct tarpc_rte_mbuf_match_pattern_in;
struct tarpc_rte_mbuf_match_pattern_out;
struct tarpc_rte_mbuf_match_tx_rx_in;
struct tarpc_rte_mbuf_match_tx_rx_out;
struct tarpc_rte_mbuf_report;
struct tarpc_rte_mempool_free_in;
struct tarpc_rte_mempool_in_use_count_in;
struct tarpc_rte_mempool_in_use_count_out;
struct tarpc_rte_mempool_lookup_in;
struct tarpc_rte_mempool_lookup_out;
struct tarpc_rte_mk_flow_rule_components_in;
struct tarpc_rte_mk_flow_rule_components_out;
struct tarpc_rte_mk_mbuf_from_template_in;
struct tarpc_rte_mk_mbuf_from_template_out;
struct tarpc_rte_pktmbuf_adj_in;
struct tarpc_rte_pktmbuf_adj_out;
struct tarpc_rte_pktmbuf_alloc_bulk_in;
struct tarpc_rte_pktmbuf_alloc_bulk_out;
struct tarpc_rte_pktmbuf_alloc_in;
struct tarpc_rte_pktmbuf_append_data_in;
struct tarpc_rte_pktmbuf_calc_packet_crc_in;
struct tarpc_rte_pktmbuf_calc_packet_crc_out;
struct tarpc_rte_pktmbuf_chain_in;
struct tarpc_rte_pktmbuf_clone_in;
struct tarpc_rte_pktmbuf_free_array_in;
struct tarpc_rte_pktmbuf_get_data_len_out;
struct tarpc_rte_pktmbuf_get_fdir_id_out;
struct tarpc_rte_pktmbuf_get_flags_out;
struct tarpc_rte_pktmbuf_get_nb_segs_out;
struct tarpc_rte_pktmbuf_get_packet_type_out;
struct tarpc_rte_pktmbuf_get_pkt_len_out;
struct tarpc_rte_pktmbuf_get_pool_out;
struct tarpc_rte_pktmbuf_get_port_out;
struct tarpc_rte_pktmbuf_get_rss_hash_out;
struct tarpc_rte_pktmbuf_get_tx_offload_out;
struct tarpc_rte_pktmbuf_get_vlan_tci_out;
struct tarpc_rte_pktmbuf_get_vlan_tci_outer_out;
struct tarpc_rte_pktmbuf_headroom_out;
struct tarpc_rte_pktmbuf_packet_type;
struct tarpc_rte_pktmbuf_pool_create_by_ops_in;
struct tarpc_rte_pktmbuf_pool_create_by_ops_out;
struct tarpc_rte_pktmbuf_pool_create_in;
struct tarpc_rte_pktmbuf_pool_create_out;
struct tarpc_rte_pktmbuf_prepend_data_in;
struct tarpc_rte_pktmbuf_read_data_in;
struct tarpc_rte_pktmbuf_read_data_out;
struct tarpc_rte_pktmbuf_redist_in;
struct tarpc_rte_pktmbuf_redist_out;
struct tarpc_rte_pktmbuf_refcnt_update_in;
struct tarpc_rte_pktmbuf_set_flags_in;
struct tarpc_rte_pktmbuf_set_packet_type_in;
struct tarpc_rte_pktmbuf_set_port_in;
struct tarpc_rte_pktmbuf_set_tx_offload_in;
struct tarpc_rte_pktmbuf_set_vlan_tci_in;
struct tarpc_rte_pktmbuf_set_vlan_tci_outer_in;
struct tarpc_rte_pktmbuf_tailroom_out;
struct tarpc_rte_pktmbuf_trim_in;
struct tarpc_rte_pktmbuf_tx_offload;
struct tarpc_rte_ring_create_in;
struct tarpc_rte_ring_create_out;
struct tarpc_rte_ring_dequeue_mbuf_in;
struct tarpc_rte_ring_enqueue_mbuf_in;
struct tarpc_rte_ring_free_in;
struct tarpc_rte_vlan_strip_in;
struct tarpc_sa;
struct tarpc_scm_timestamping;
struct tarpc_select_in;
struct tarpc_select_out;
struct tarpc_send_flooder_iomux_in;
struct tarpc_send_flooder_iomux_out;
struct tarpc_send_in;
struct tarpc_send_msg_more_in;
struct tarpc_send_one_byte_many_in;
struct tarpc_sendbuf_in;
struct tarpc_sendfile_in;
struct tarpc_sendfile_out;
struct tarpc_sendfile_via_splice_in;
struct tarpc_sendfile_via_splice_out;
struct tarpc_sendmmsg_alt_in;
struct tarpc_sendmmsg_alt_out;
struct tarpc_sendmsg_in;
struct tarpc_sendto_in;
struct tarpc_serial_check_pattern_in;
struct tarpc_serial_check_pattern_out;
struct tarpc_serial_common_in;
struct tarpc_serial_common_out;
struct tarpc_serial_flush_in;
struct tarpc_serial_open_in;
struct tarpc_serial_open_out;
struct tarpc_serial_read_in;
struct tarpc_serial_read_out;
struct tarpc_serial_send_str_in;
struct tarpc_serial_send_str_out;
struct tarpc_serial_wait_pattern_in;
struct tarpc_set_buf_in;
struct tarpc_set_buf_out;
struct tarpc_set_buf_pattern_in;
struct tarpc_set_buf_pattern_out;
struct tarpc_set_event_in;
struct tarpc_set_var_in;
struct tarpc_set_var_out;
struct tarpc_setenv_in;
struct tarpc_setenv_out;
struct tarpc_setlibname_in;
struct tarpc_setrlimit_in;
struct tarpc_setsockopt_in;
struct tarpc_setuid_in;
struct tarpc_sgio;
struct tarpc_shutdown_in;
struct tarpc_sigaction;
struct tarpc_sigaction_in;
struct tarpc_sigaction_out;
struct tarpc_sigaddset_in;
struct tarpc_sigaltstack_in;
struct tarpc_sigaltstack_out;
struct tarpc_sigemptyset_in;
struct tarpc_sigevent;
struct tarpc_siginfo_received_out;
struct tarpc_siginfo_t;
struct tarpc_siginterrupt_in;
struct tarpc_siginterrupt_out;
struct tarpc_signal_in;
struct tarpc_signal_out;
struct tarpc_sigprocmask_in;
struct tarpc_sigset_cmp_in;
struct tarpc_sigset_delete_in;
struct tarpc_sigset_new_out;
struct tarpc_simple_receiver_in;
struct tarpc_simple_receiver_out;
struct tarpc_simple_sender_in;
struct tarpc_simple_sender_out;
struct tarpc_sin;
struct tarpc_sin6;
struct tarpc_sock_extended_err;
struct tarpc_socket_connect_close_in;
struct tarpc_socket_in;
struct tarpc_socket_listen_close_in;
struct tarpc_socket_out;
struct tarpc_socket_to_file_in;
struct tarpc_socketpair_in;
struct tarpc_socketpair_out;
struct tarpc_splice_in;
struct tarpc_splice_out;
struct tarpc_ssize_t_retval_out;
struct tarpc_stack_t;
struct tarpc_stat;
struct tarpc_statvfs;
struct tarpc_statvfs_in;
struct tarpc_statvfs_out;
struct tarpc_string;
struct tarpc_struct_dirent_props_in;
struct tarpc_struct_dirent_props_out;
struct tarpc_sun;
struct tarpc_symlink_in;
struct tarpc_symlink_out;
struct tarpc_sysconf_in;
struct tarpc_sysconf_out;
struct tarpc_system_in;
struct tarpc_system_out;
struct tarpc_sysv_signal_in;
struct tarpc_sysv_signal_out;
struct tarpc_ta_dlclose_in;
struct tarpc_ta_dlerror_in;
struct tarpc_ta_dlerror_out;
struct tarpc_ta_dlopen_in;
struct tarpc_ta_dlopen_out;
struct tarpc_ta_dlsym_in;
struct tarpc_ta_dlsym_out;
struct tarpc_ta_kill_and_wait_in;
struct tarpc_ta_kill_death_in;
struct tarpc_tcp_keepalive;
struct tarpc_te_file_check_executable_in;
struct tarpc_te_file_check_executable_out;
struct tarpc_te_fstat64_in;
struct tarpc_te_fstat64_out;
struct tarpc_te_fstat_in;
struct tarpc_te_fstat_out;
struct tarpc_te_shell_cmd_in;
struct tarpc_te_shell_cmd_out;
struct tarpc_te_stat_in;
struct tarpc_te_stat_out;
struct tarpc_thread_cancel_in;
struct tarpc_thread_create_in;
struct tarpc_thread_create_out;
struct tarpc_thread_join_in;
struct tarpc_timespec;
struct tarpc_timeval;
struct tarpc_timex;
struct tarpc_timezone;
struct tarpc_transmit_file_in;
struct tarpc_transmit_packets_element;
struct tarpc_transmit_packets_in;
struct tarpc_transmit_packets_out;
struct tarpc_transmitfile_tabufs_in;
struct tarpc_truncate_in;
struct tarpc_truncate_out;
struct tarpc_uname_in;
struct tarpc_uname_out;
struct tarpc_unlink_in;
struct tarpc_unlink_out;
struct tarpc_unsetenv_in;
struct tarpc_unsetenv_out;
struct tarpc_upnp_cp_action_in;
struct tarpc_upnp_cp_action_out;
struct tarpc_utsname;
struct tarpc_vfork_in;
struct tarpc_vfork_out;
struct tarpc_vfork_pipe_exec_in;
struct tarpc_vlan_get_parent_in;
struct tarpc_vlan_get_parent_out;
struct tarpc_vm_trasher_in;
struct tarpc_void_in;
struct tarpc_void_out;
struct tarpc_wait_for_multiple_events_in;
struct tarpc_wait_for_multiple_events_out;
struct tarpc_wait_readable_in;
struct tarpc_waitpid_in;
struct tarpc_waitpid_out;
struct tarpc_write_at_offset_in;
struct tarpc_write_at_offset_out;
struct tarpc_write_file_ex_in;
struct tarpc_write_file_ex_out;
struct tarpc_write_file_in;
struct tarpc_write_file_out;
struct tarpc_wsa_accept_in;
struct tarpc_wsa_accept_out;
struct tarpc_wsa_address_to_string_in;
struct tarpc_wsa_address_to_string_out;
struct tarpc_wsa_async_get_host_by_addr_in;
struct tarpc_wsa_async_get_host_by_addr_out;
struct tarpc_wsa_async_get_host_by_name_in;
struct tarpc_wsa_async_get_host_by_name_out;
struct tarpc_wsa_async_get_proto_by_name_in;
struct tarpc_wsa_async_get_proto_by_name_out;
struct tarpc_wsa_async_get_proto_by_number_in;
struct tarpc_wsa_async_get_proto_by_number_out;
struct tarpc_wsa_async_get_serv_by_name_in;
struct tarpc_wsa_async_get_serv_by_name_out;
struct tarpc_wsa_async_get_serv_by_port_in;
struct tarpc_wsa_async_get_serv_by_port_out;
struct tarpc_wsa_async_select_in;
struct tarpc_wsa_cancel_async_request_in;
struct tarpc_wsa_cancel_async_request_out;
struct tarpc_wsa_cleanup_in;
struct tarpc_wsa_cleanup_out;
struct tarpc_wsa_connect_in;
struct tarpc_wsa_connect_out;
struct tarpc_wsa_get_overlapped_result_in;
struct tarpc_wsa_get_overlapped_result_out;
struct tarpc_wsa_ioctl_in;
struct tarpc_wsa_ioctl_out;
struct tarpc_wsa_join_leaf_in;
struct tarpc_wsa_join_leaf_out;
struct tarpc_wsa_recv_disconnect_in;
struct tarpc_wsa_recv_disconnect_out;
struct tarpc_wsa_recv_ex_in;
struct tarpc_wsa_recv_ex_out;
struct tarpc_wsa_recv_from_in;
struct tarpc_wsa_recv_from_out;
struct tarpc_wsa_recv_in;
struct tarpc_wsa_recv_msg_in;
struct tarpc_wsa_recv_msg_out;
struct tarpc_wsa_recv_out;
struct tarpc_wsa_send_disconnect_in;
struct tarpc_wsa_send_in;
struct tarpc_wsa_send_out;
struct tarpc_wsa_send_to_in;
struct tarpc_wsa_send_to_out;
struct tarpc_wsa_socket_in;
struct tarpc_wsa_socket_out;
struct tarpc_wsa_startup_in;
struct tarpc_wsa_startup_out;
struct tarpc_wsa_string_to_address_in;
struct tarpc_wsa_string_to_address_out;
struct tarpc_xsk_map_set_in;
struct tarpc_xsk_receive_simple_in;
struct tarpc_xsk_receive_simple_out;
struct tarpc_xsk_rx_fill_simple_in;
struct tarpc_xsk_send_simple_in;
struct tarpc_xsk_socket__create_in;
struct tarpc_xsk_socket__create_out;
struct tarpc_xsk_socket__delete_in;
struct tarpc_xsk_socket_config;
struct tarpc_xsk_umem__create_in;
struct tarpc_xsk_umem__create_out;
struct tarpc_xsk_umem__delete_in;
struct tarpc_xsk_umem_config;
struct tcp4_message;
struct tcp_csap_specific_data;
struct tcp_message_t;
struct tcp_move_action;
struct te_bpf_ip_tcpudp_filter;
struct te_bpf_rxq_stats_params;
struct te_buf_pattern;
struct te_charset;
struct te_conf_ip_rule;
struct te_conf_obj;
struct te_conf_obj_methods;
struct te_dbuf;
struct te_dhcp_option;
struct te_dhcp_server_cfg;
struct te_dhcp_server_shared_net;
struct te_dhcp_server_subnet;
struct te_dhcp_space_opt;
struct te_enum_map;
struct te_exec_affinity_param;
struct te_exec_param;
struct te_exec_priority_param;
struct te_exec_workdir_param;
struct te_intset_ops;
struct te_ipstack_pseudo_header_ip;
struct te_ipstack_pseudo_header_ip6;
struct te_json_ctx_t;
struct te_json_level_t;
struct te_kvpair;
struct te_log_arg_descr;
struct te_log_buf_bit2str;
struct te_log_buf_flag2str;
struct te_log_msg_out;
struct te_log_msg_raw_data;
struct te_log_msg_truncated;
struct te_log_out_params;
struct te_meas_stats_data_t;
struct te_meas_stats_stab_t;
struct te_meas_stats_summary_t;
struct te_meas_stats_t;
struct te_mi_log_kvpair;
struct te_mi_meas;
struct te_optional_double_t;
struct te_optional_uint_t;
struct te_optional_uintmax_t;
struct te_pcap_pkthdr;
struct te_radvd_interface;
struct te_radvd_ip6_addr;
struct te_radvd_named_oplist;
struct te_radvd_option;
struct te_radvd_subnet;
struct te_rgt_mi;
struct te_rgt_mi_kv;
struct te_rgt_mi_meas;
struct te_rgt_mi_meas_param;
struct te_rgt_mi_meas_value;
struct te_rgt_mi_meas_view;
struct te_rgt_mi_meas_view_line_graph;
struct te_rgt_mi_person;
struct te_rgt_mi_test_end;
struct te_rgt_mi_test_result;
struct te_rgt_mi_test_start;
struct te_rgt_mi_trc_tag_entry;
struct te_rgt_mi_trc_tags;
struct te_ring;
struct te_rpc_error_data;
struct te_saved_mtu;
struct te_sockaddr_subnet;
struct te_stopwatch_t;
struct te_string;
struct te_substring_t;
struct te_test_result;
struct te_test_verdict;
struct te_timer_t;
struct te_trc_db;
struct te_ts_t;
struct te_unit;
struct te_unit_list;
struct te_vec;
struct te_xdp_frame;
struct test_attrs;
struct test_behaviour;
struct test_entity_value;
struct test_entity_values;
struct test_info;
struct test_iter_arg;
struct test_option;
struct test_package;
struct test_path;
struct test_path_arg;
struct test_path_item;
struct test_requirement;
struct test_script;
struct test_session;
struct test_suite_info;
struct test_value_type;
struct test_var_arg;
struct test_var_arg_list;
struct tester_cfg;
struct tester_cfg_walk;
struct tester_cfgs;
struct tester_global;
struct tester_test_msg_hdr;
struct tester_test_result;
struct tester_test_results;
struct testing_act;
struct tqe_string;
struct trc_diff_ctx;
struct trc_diff_entry;
struct trc_diff_key_stats;
struct trc_diff_set;
struct trc_diff_stats_counter_list_entry;
struct trc_diff_stats_counter_s;
struct trc_exp_result;
struct trc_exp_result_entry;
struct trc_file;
struct trc_global;
struct trc_globals;
struct trc_log_parse_ctx;
struct trc_re_match_subst;
struct trc_re_namespace;
struct trc_re_subst;
struct trc_report_argument;
struct trc_report_ctx;
struct trc_report_key_ctx;
struct trc_report_key_entry;
struct trc_report_key_iter_entry;
struct trc_report_key_test_entry;
struct trc_report_stats;
struct trc_report_test_data;
struct trc_report_test_iter_data;
struct trc_report_test_iter_entry;
struct trc_test;
struct trc_test_iter;
struct trc_test_iter_arg;
struct trc_test_iter_args;
struct trc_test_iters;
struct trc_tests;
struct trc_update_args_group;
struct trc_update_ctx;
struct trc_update_rule;
struct trc_update_tag_logs;
struct trc_update_test_data;
struct trc_update_test_entry;
struct trc_update_test_iter_data;
struct trc_update_tests_group;
struct trc_update_wilds_list_entry;
struct trc_user_data;
struct tsa_config;
struct tsa_handlers;
struct tsa_packets_counter;
struct tsa_session;
struct tsa_state;
struct tsa_state_csap;
struct tsa_state_sock;
struct udp4_datagram;
struct usrreq;
struct vfork_thread_data;
struct vlanhdr;
struct xml_app_data;

// unions

union cfg_inst_val;
union iomux_funcs;
union iomux_return;
union iomux_state;
union netconf_devlink_param_value_data;
union rpc_epoll_data;
union rpc_sockopt_value;
union ta_ethtool_lsets_data;
union te_json_out_loc_t;

// global variables

const char* ta_name;
const char* ta_name;
const char* ta_execname;
char ta_dir[RCF_MAX_PATH];
char ta_tmp_dir[RCF_MAX_PATH];
char ta_lib_mod_dir[RCF_MAX_PATH];
char ta_lib_bin_dir[RCF_MAX_PATH];
int cfg_socket;
int cfg6_socket;
LPFN_CONNECTEX pf_connect_ex;
LPFN_DISCONNECTEX pf_disconnect_ex;
LPFN_ACCEPTEX pf_accept_ex;
LPFN_GETACCEPTEXSOCKADDRS pf_get_accept_ex_sockaddrs;
LPFN_TRANSMITFILE pf_transmit_file;
LPFN_TRANSMITPACKETS pf_transmit_packets;
LPFN_WSARECVMSG pf_wsa_recvmsg;
dnl SPDX License Identifier;
dnl SPDX License dnl Declares a platform for and specifies platform specific dnl parameters for configure script as well platform specific dnl CPPFLAGS;
shouldn t contain dnl configure dnl Declares a platform for and specifies platform specific dnl dnl Parameters;
shouldn t contain dnl build system to use;
* TE_BS_CONF_ERR ="wrong build system $2 for platform $1";
 break;
dnl SPDX License Identifier;
dnl SPDX License dnl Specifies parameters for NUT bootable image building dnl May be called once for each NUT image name Source location may dnl be the same for several NUT image names dnl dnl Parameters;
dnl SPDX License dnl Specifies parameters for NUT bootable image building dnl May be called once for each NUT image name Source location may dnl be the same for several NUT image names dnl dnl if specified dnl source directory NUTS ="$NUTS $1" SCRIPT="$2" if test -z "$SCRIPT";
then echo Build script pathname for the NUT $1 must be specified& exit;
fi NUT_$1_SOURCES ="$3" if test "${SCRIPT:0:1}" != "/" -a -n "$3";
cfg_object cfg_obj_root;
cfg_object** cfg_all_obj;
uint64_t cfg_all_obj_size;
cfg_instance cfg_inst_root;
cfg_instance** cfg_all_inst;
uint64_t cfg_all_inst_size;
uint32_t cfg_inst_seq_num;
uint32_t cfg_conf_delay;
char* cfg_ta_list;
char* cfg_get_buf;
bool local_cmd_seq;
char max_commit_subtree[CFG_INST_NAME_MAX];
char* local_cmd_bkp;
te_log_message_f lgr_log_message;
pid_t tester_pid;
log_listener_conf listener_confs[LOG_MAX_LISTENERS];
size_t listener_confs_num;
log_listener listeners[LOG_MAX_LISTENERS];
size_t listeners_num;
msg_queue listener_queue;
bool listeners_enabled;
streaming_filter streaming_filters[LOG_MAX_FILTERS];
size_t streaming_filters_num;
ta_check ta_checker;
fd_set set0;
struct timeval tv0;
jmp_buf test_path_jmp_buf;
tester_global tester_global_context;
int tester_monitor_id;
bool tester_sigint_received;
te_log_message_f* te_log_message_va;
const char* te_lgr_entity;
m4_dnl SPDX License Identifier;
m4_dnl SPDX License so just undefine them m4_undefine(`__unix__') m4_dnl m4_undefine(`__windows__') m4_dnl m4_dnl m4_dnl Use C-style comments m4_changecom(`') m4_dnl m4_dnl m4_dnl The macros are intended to work around a limitation m4_dnl of C preprocessor that disallows preprocessor directives m4_dnl(including conditionals) inside a macro definition. m4_dnl The equivalent of the following macro in pseudo-C is m4_dnl m4_dnl m4_dnl H2RPC_CHECK is analogous void m4_dnl m4_dnl m4_dnl These macros are similar to m4_dnl but they check whether HAVE_DECL_<name> is defined to;
m4_dnl in configure ac or meson build m4_dnl void m4_dnl m4_dnl m4_dnl RPC2H_FLAG_CHECK and H2RPC_FLAG_CHECK should m4_dnl be used for flags conversion;
m4_dnl in configure ac or meson build m4_dnl void m4_dnl m4_dnl m4_dnl RPC2H_FLAG_CHECK and H2RPC_FLAG_CHECK should m4_dnl be used for flags like m4_dnl m4_dnl unsigned int res = 0;
m4_dnl m4_dnl Note;
m4_dnl m4_dnl they modify value;
m4_dnl m4_dnl they modify removing checked flag m4_dnl from it;
m4_dnl m4_dnl they modify removing checked flag m4_dnl from so that at the end it may be checked whether m4_dnl some unknown flags are present m4_dnl void m4_dnl m4_dnl m4_dnl __SOURCE__ macro is provided at command line m4_dnl to specify the name of the actual source file m4_dnl Just to be on a safe side;
m4_dnl SPDX License Identifier;
const asn_type*const asn_base_boolean;
const asn_type*const asn_base_integer;
const asn_type*const asn_base_uinteger;
const asn_type*const asn_base_enum;
const asn_type*const asn_base_charstring;
const asn_type*const asn_base_octstring;
const asn_type*const asn_base_bitstring;
const asn_type*const asn_base_real;
const asn_type*const asn_base_null;
const asn_type*const asn_base_objid;
const asn_type*const asn_base_int4;
const asn_type*const asn_base_int8;
const asn_type*const asn_base_int16;
const asn_type asn_base_boolean_s;
const asn_type asn_base_integer_s;
const asn_type asn_base_enum_s;
const asn_type asn_base_charstring_s;
const asn_type asn_base_octstring_s;
const asn_type asn_base_bitstring_s;
const asn_type asn_base_real_s;
const asn_type asn_base_null_s;
const asn_type asn_base_objid_s;
const asn_type asn_base_int1_s;
const asn_type asn_base_int2_s;
const asn_type asn_base_int3_s;
const asn_type asn_base_int4_s;
const asn_type asn_base_int5_s;
const asn_type asn_base_int6_s;
const asn_type asn_base_int7_s;
const asn_type asn_base_int8_s;
const asn_type asn_base_int9_s;
const asn_type asn_base_int12_s;
const asn_type asn_base_int16_s;
const asn_type asn_base_int24_s;
const asn_type asn_base_int32_s;
const asn_type asn_base_uint32_s;
te_conf_obj_methods te_conf_obj_methods__Bool;
te_conf_obj_methods te_conf_obj_methods_uint8_t;
te_conf_obj_methods te_conf_obj_methods_uint32_t;
te_conf_obj_methods te_conf_obj_methods_sockaddr;
te_conf_obj_methods te_conf_obj_methods_str;
te_errno typedef te_errno(* cfg_handle_cb_func)(cfg_handle handle, void *opaque);
const te_enum_map cfg_cva_mapping[];
const te_enum_map cfg_cvt_mapping[];
cfg_primary_type cfg_types[CFG_PRIMARY_TYPES_NUM];
te_log_message_f logfork_log_message;
struct lgr_rb log_buffer;
uint32_t log_sequence;
te_log_message_f ten_log_message;
unsigned int te_test_id = TE_LOG_ID_UNDEFINED;
static te_log_message_tx_f te_log_message_tx = NULL;
const asn_type*const ndn_data_unit_int4;
const asn_type*const ndn_data_unit_int5;
const asn_type*const ndn_data_unit_int8;
const asn_type*const ndn_data_unit_int16;
const asn_type*const ndn_data_unit_int24;
const asn_type*const ndn_data_unit_int32;
const asn_type*const ndn_data_unit_octet_string;
const asn_type*const ndn_data_unit_octet_string6;
const asn_type*const ndn_data_unit_char_string;
const asn_type*const ndn_data_unit_objid;
const asn_type*const ndn_ip_address;
const asn_type*const ndn_octet_string6;
const asn_type*const ndn_generic_pdu_sequence;
const asn_type*const ndn_payload;
const asn_type*const ndn_interval;
const asn_type*const ndn_interval_sequence;
const asn_type*const ndn_csap_params;
const asn_type*const ndn_csap_layers;
const asn_type*const ndn_csap_spec;
const asn_type*const ndn_traffic_template;
const asn_type*const ndn_template_parameter;
const asn_type*const ndn_template_params_seq;
const asn_type*const ndn_traffic_pattern;
const asn_type*const ndn_traffic_pattern_unit;
const asn_type*const ndn_raw_packet;
const asn_type*const ndn_generic_csap_layer;
const asn_type*const ndn_generic_pdu;
const asn_type*const ndn_arp_header;
const asn_type*const ndn_arp_csap;
const asn_type*const ndn_atm_header;
const asn_type*const ndn_atm_csap;
const asn_type*const ndn_aal5_cpcs_trailer;
const asn_type*const ndn_aal5_csap;
const asn_type ndn_base_boolean_s;
const asn_type ndn_base_sint8_s;
const asn_type ndn_base_uint8_s;
const asn_type ndn_base_sint16_s;
const asn_type ndn_base_uint16_s;
const asn_type ndn_base_sint32_s;
const asn_type ndn_base_uint32_s;
const asn_type ndn_base_octstring_s;
const asn_type ndn_base_charstring_s;
const asn_type ndn_base_boolean_ro_s;
const asn_type ndn_base_sint8_ro_s;
const asn_type ndn_base_uint8_ro_s;
const asn_type ndn_base_sint16_ro_s;
const asn_type ndn_base_uint16_ro_s;
const asn_type ndn_base_sint32_ro_s;
const asn_type ndn_base_uint32_ro_s;
const asn_type ndn_base_octstring_ro_s;
const asn_type ndn_base_charstring_ro_s;
const asn_type*const ndn_base_boolean;
const asn_type*const ndn_base_s8;
const asn_type*const ndn_base_u8;
const asn_type*const ndn_base_s16;
const asn_type*const ndn_base_u16;
const asn_type*const ndn_base_s32;
const asn_type*const ndn_base_u32;
const asn_type*const ndn_base_string;
const asn_type*const ndn_base_octets;
const asn_type*const ndn_base_link;
const asn_type*const ndn_base_ro_boolean;
const asn_type*const ndn_base_ro_s8;
const asn_type*const ndn_base_ro_u8;
const asn_type*const ndn_base_ro_s16;
const asn_type*const ndn_base_ro_u16;
const asn_type*const ndn_base_ro_s32;
const asn_type*const ndn_base_ro_u32;
const asn_type*const ndn_base_ro_string;
const asn_type*const ndn_base_ro_octets;
const asn_type*const ndn_base_ro_link;
const asn_type*const ndn_bridge_pdu;
const asn_type*const ndn_bridge_csap;
asn_type ndn_bridge_pdu_s;
asn_type ndn_bridge_csap_s;
asn_type* ndn_cli_message;
asn_type* ndn_cli_serial_params;
asn_type* ndn_cli_telnet_params;
asn_type* ndn_cli_shell_params;
asn_type* ndn_cli_params;
asn_type* ndn_cli_csap;
asn_type* ndn_dhcpv4_message;
asn_type* ndn_dhcpv4_options;
asn_type* ndn_dhcpv4_option;
asn_type* ndn_dhcpv4_end_pad_option;
asn_type* ndn_dhcpv4_csap;
asn_type* ndn_dhcpv6_duid;
asn_type* ndn_dhcpv6_ia_na;
asn_type* ndn_dhcpv6_ia_ta;
asn_type* ndn_dhcpv6_ia_addr;
asn_type* ndn_dhcpv6_ia_pd;
asn_type* ndn_dhcpv6_ia_prefix;
asn_type* ndn_dhcpv6_opcode;
asn_type* ndn_dhcpv6_oro;
asn_type* ndn_dhcpv6_auth;
asn_type* ndn_dhcpv6_status;
asn_type* ndn_dhcpv6_class_data_list;
asn_type* ndn_dhcpv6_class_data;
asn_type* ndn_dhcpv6_vendor_class;
asn_type* ndn_dhcpv6_vendor_specific;
asn_type* ndn_dhcpv6_message;
asn_type* ndn_dhcpv6_options;
asn_type* ndn_dhcpv6_option;
asn_type* ndn_dhcpv6_csap;
const asn_type*const ndn_eth_snap;
const asn_type*const ndn_vlan_tagged;
const asn_type*const ndn_vlan_tag_header;
const asn_type*const ndn_vlan_header;
const asn_type*const ndn_vlan_double_tag_header;
const asn_type*const ndn_eth_header;
const asn_type*const ndn_eth_csap;
const asn_type*const ndn_data_unit_eth_address;
const asn_type*const ndn_eth_address;
asn_type ndn_eth_header_s;
asn_type ndn_eth_csap_s;
asn_type ndn_data_unit_eth_address_s;
asn_type ndn_eth_address_s;
asn_type ndn_vlan_header_s;
asn_type ndn_vlan_double_tag_header_s;
const asn_type*const ndn_flow_ep;
const asn_type*const ndn_flow_pdu;
const asn_type*const ndn_flow_traffic;
const asn_type*const ndn_flow;
asn_type ndn_flow_ep_s;
asn_type ndn_flow_pdu_s;
asn_type ndn_flow_traffic_s;
asn_type ndn_flow_s;
const asn_type*const ndn_forw_action;
asn_type ndn_forw_action_s;
const asn_type*const ndn_geneve_header;
const asn_type*const ndn_geneve_option;
const asn_type*const ndn_geneve_options;
const asn_type*const ndn_geneve_csap;
const asn_type*const ndn_gre_header;
const asn_type*const ndn_gre_header_opt_cksum;
const asn_type*const ndn_gre_header_opt_key_nvgre;
const asn_type*const ndn_gre_header_opt_key;
const asn_type*const ndn_gre_header_opt_seqn;
const asn_type*const ndn_gre_csap;
const asn_type*const ndn_igmp_message;
const asn_type*const ndn_igmp_csap;
asn_type ndn_igmp_message_s;
asn_type ndn_igmp_csap_s;
asn_type ndn_data_unit_ints_s;
asn_type ndn_data_unit_enum_s;
asn_type ndn_data_unit_mask_s;
asn_type ndn_data_unit_env_s;
asn_type ndn_data_unit_int1_s;
asn_type ndn_data_unit_int2_s;
asn_type ndn_data_unit_int3_s;
asn_type ndn_data_unit_int4_s;
asn_type ndn_data_unit_int5_s;
asn_type ndn_data_unit_int6_s;
asn_type ndn_data_unit_int7_s;
asn_type ndn_data_unit_int8_s;
asn_type ndn_data_unit_int9_s;
asn_type ndn_data_unit_int12_s;
asn_type ndn_data_unit_int16_s;
asn_type ndn_data_unit_int24_s;
asn_type ndn_data_unit_int32_s;
asn_type ndn_data_unit_uint32_s;
asn_type ndn_data_unit_octet_string_s;
asn_type ndn_data_unit_char_string_s;
asn_type ndn_data_unit_objid_s;
asn_type ndn_data_unit_ip_address_s;
asn_type ndn_data_unit_ip6_address_s;
asn_type ndn_ip_address_s;
asn_type ndn_octet_string6_s;
asn_type ndn_generic_pdu_s;
asn_type ndn_generic_csap_layer_s;
asn_type ndn_template_parameter_sequence_s;
asn_type ndn_generic_pdu_sequence_s;
asn_type ndn_traffic_template_s;
asn_type ndn_traffic_pattern_s;
asn_type ndn_csap_layers_s;
asn_type ndn_csap_spec_s;
const asn_type*const ndn_ip6_header;
const asn_type*const ndn_ip6_csap;
const asn_type*const ndn_ip6_ext_header_option;
const asn_type*const ndn_ip6_ext_header_options_seq;
const asn_type*const ndn_ip6_ext_header_hop_by_hop;
const asn_type*const ndn_ip6_ext_header_destination;
const asn_type*const ndn_ip6_ext_header;
const asn_type*const ndn_ip6_ext_headers_seq;
const asn_type*const ndn_ip6_ext_header_fragment;
const asn_type*const ndn_ip6_frag_spec;
const asn_type*const ndn_ip6_frag_seq;
const asn_type*const ndn_icmp6_dest_unreach;
const asn_type*const ndn_icmp6_packet_too_big;
const asn_type*const ndn_icmp6_time_exceeded;
const asn_type*const ndn_icmp6_param_prob;
const asn_type*const ndn_icmp6_router_sol;
const asn_type*const ndn_icmp6_router_adv;
const asn_type*const ndn_icmp6_neighbor_sol;
const asn_type*const ndn_icmp6_neighbor_adv;
const asn_type*const ndn_icmp6_echo;
const asn_type*const ndn_icmp6_mld;
const asn_type*const ndn_icmp6_body;
const asn_type*const ndn_icmp6_opt_ll_addr;
const asn_type*const ndn_icmp6_opt_prefix;
const asn_type*const ndn_icmp6_opt_body;
const asn_type*const ndn_icmp6_opt;
const asn_type*const ndn_icmp6_opts;
const asn_type*const ndn_icmp6_message;
const asn_type*const ndn_icmp6_csap;
const asn_type*const ndn_ip4_header;
const asn_type*const ndn_ip4_csap;
const asn_type*const ndn_ip4_frag_spec;
const asn_type*const ndn_ip4_frag_seq;
const asn_type*const ndn_icmp4_message;
const asn_type*const ndn_icmp4_csap;
const asn_type*const ndn_udp_header;
const asn_type*const ndn_udp_csap;
const asn_type*const ndn_tcp_header;
const asn_type*const ndn_tcp_csap;
const asn_type*const ndn_tcp_option;
const asn_type*const ndn_tcp_options_seq;
const asn_type* ndn_iscsi_message;
const asn_type* ndn_iscsi_csap;
const asn_type*const ndn_iscsi_segment_data;
const asn_type*const ndn_iscsi_key_pair;
const asn_type*const ndn_iscsi_key_values;
const asn_type*const ndn_iscsi_key_value;
const asn_type*const ndn_snap_header;
const asn_type*const ndn_llc_header;
asn_type ndn_snap_header_s;
asn_type ndn_llc_header_s;
const asn_type*const ndn_pcap_filter;
const asn_type*const ndn_pcap_csap;
asn_type ndn_pcap_filter_s;
asn_type ndn_pcap_csap_s;
const asn_type*const ndn_pppoe_message;
const asn_type*const ndn_pppoe_csap;
asn_type ndn_pppoe_message_s;
asn_type ndn_pppoe_csap_s;
const asn_type*const ndn_ppp_message;
const asn_type*const ndn_ppp_csap;
asn_type ndn_ppp_message_s;
asn_type ndn_ppp_csap_s;
const asn_type*const ndn_rte_flow_attr;
const asn_type*const ndn_rte_flow_pattern;
const asn_type*const ndn_rte_flow_actions;
const asn_type*const ndn_rte_flow_rule;
const asn_type*const ndn_rte_flow_action;
const asn_type*const ndn_rte_flow_action_conf_rss;
const asn_type*const ndn_rte_flow_action_conf_rss_queue;
const asn_type*const ndn_rte_flow_action_conf_rss_opt;
const asn_type*const ndn_rte_flow_action_conf_rss_opt_hf;
const asn_type*const ndn_rte_flow_item;
const asn_type*const ndn_rte_flow_items;
const asn_type*const ndn_rte_flow_item_conf;
asn_type ndn_rte_flow_rule_s;
const asn_type*const ndn_rte_mbuf_pdu;
const asn_type*const ndn_rte_mbuf_csap;
asn_type ndn_rte_mbuf_pdu_s;
asn_type ndn_rte_mbuf_csap_s;
asn_type* ndn_snmp_message;
asn_type* ndn_snmp_csap;
asn_type* ndn_snmp_var_bind;
asn_type* ndn_snmp_var_bind_seq;
int snmp_asn_syntaxes[];
const asn_type*const ndn_snmp_obj_syntax_integer;
const asn_type*const ndn_snmp_obj_syntax_string;
const asn_type*const ndn_snmp_obj_syntax_objid;
const asn_type*const ndn_snmp_obj_syntax_ipaddr;
const asn_type*const ndn_snmp_obj_syntax_counter;
const asn_type*const ndn_snmp_obj_syntax_timeticks;
const asn_type*const ndn_snmp_obj_syntax_arbitrary;
const asn_type*const ndn_snmp_obj_syntax_big_counter;
const asn_type*const ndn_snmp_obj_syntax_unsigned;
asn_type* ndn_socket_message;
asn_type* ndn_socket_csap;
const asn_type*const ndn_vxlan_header;
const asn_type*const ndn_vxlan_csap;
netconf_recv_cb_t geneve_list_cb;
netconf_recv_cb_t vxlan_list_cb;
const char* te_lockdir;
const rpc_dpdk_offload_t rpc_dpdk_tx_offloads[];
const unsigned int rpc_dpdk_tx_offloads_num;
const rpc_dpdk_offload_t rpc_dpdk_rx_offloads[];
const unsigned int rpc_dpdk_rx_offloads_num;
sigset_t rpcs_received_signals;
tarpc_siginfo_t last_siginfo;
rpc_info tarpc_functions[];
program tarpc;
program bpf {     version ver0     {              } = 1;
program dpdk;
program job {     version ver0     {                           } = 1;
program serial {     version ver0     {                 } = 1;
restconf_settings restconf;
const char*const tapi_cfg_ovs_cfg_name[] = {     [TAPI_CFG_OVS_CFG_DPDK_ALLOC_MEM] = TAPI_OVS_OTHER_CFG ":dpdk-alloc-mem",     [TAPI_CFG_OVS_CFG_DPDK_SOCKET_MEM] = TAPI_OVS_OTHER_CFG ":dpdk-socket-mem",     [TAPI_CFG_OVS_CFG_DPDK_LCORE_MASK] = TAPI_OVS_OTHER_CFG ":dpdk-lcore-mask",     [TAPI_CFG_OVS_CFG_DPDK_HUGEPAGE_DIR] =         TAPI_OVS_OTHER_CFG ":dpdk-hugepage-dir",     [TAPI_CFG_OVS_CFG_DPDK_SOCKET_LIMIT] =         TAPI_OVS_OTHER_CFG ":dpdk-socket-limit",     [TAPI_CFG_OVS_CFG_DPDK_EXTRA] = TAPI_OVS_OTHER_CFG ":dpdk-extra", };
test_behaviour test_behaviour_storage;
bool fd_not_closed_verdict;
const tapi_dns_unbound_cfg_opt tapi_dns_unbound_cfg_default_opt;
const tapi_dns_unbound_opt tapi_dns_unbound_default_opt;
const tapi_dnsperf_opt tapi_dnsperf_default_opt;
tapi_fio_methods methods;
const tapi_job_methods_t cfg_job_methods;
tapi_job_method_create cfg_job_create;
tapi_job_method_start cfg_job_start;
tapi_job_method_kill cfg_job_kill;
tapi_job_method_killpg cfg_job_killpg;
tapi_job_method_wait cfg_job_wait;
tapi_job_method_stop cfg_job_stop;
tapi_job_method_destroy cfg_job_destroy;
tapi_job_method_set_workdir cfg_job_set_workdir;
tapi_job_method_set_autorestart cfg_job_set_autorestart;
tapi_job_method_get_autorestart cfg_job_get_autorestart;
tapi_job_method_recreate cfg_job_recreate;
const tapi_job_methods_t rpc_job_methods;
tapi_job_method_create rpc_job_create;
tapi_job_method_start rpc_job_start;
tapi_job_method_allocate_channels rpc_job_allocate_channels;
tapi_job_method_kill rpc_job_kill;
tapi_job_method_killpg rpc_job_killpg;
tapi_job_method_wait rpc_job_wait;
tapi_job_method_stop rpc_job_stop;
tapi_job_method_destroy rpc_job_destroy;
tapi_job_method_set_workdir rpc_job_set_workdir;
tapi_job_method_wrapper_add rpc_job_wrapper_add;
tapi_job_method_wrapper_delete rpc_job_wrapper_delete;
tapi_job_method_add_exec_param rpc_job_add_exec_param;
tapi_job_method_add_sched_param rpc_job_add_sched_param;
bool rpc_msghdr_msg_flags_init_check_enabled;
tapi_storage_client_methods tapi_storage_client_ftp_methods;
const char*const tapi_cli_csap_type_name[];
const char*const tapi_cli_redhat_cprompt_dflt;
const char*const tapi_cli_debian_cprompt_dflt;
const char*const tapi_cli_serial_lprompt_dflt;
const char*const tapi_cli_serial_pprompt_dflt;
const char*const tapi_cli_telnet_lprompt_dflt;
const char*const tapi_cli_telnet_pprompt_dflt;
const char*const tapi_cli_ssh_lprompt_dflt;
const char*const tapi_cli_ssh_pprompt_dflt;
const char*const tapi_cli_shell_lprompt_dflt;
const char*const tapi_cli_shell_pprompt_dflt;
const tapi_bttrack_opt tapi_bttrack_default_opt;
const tapi_ctorrent_opt tapi_ctorrent_default_opt;
const tapi_ethtool_opt tapi_ethtool_default_opt;
const tapi_ethtool_report tapi_ethtool_default_report;
const tapi_haproxy_opt tapi_haproxy_default_opt;
const tapi_haproxy_cfg_opt tapi_haproxy_cfg_default_opt;
const tapi_memaslap_opt tapi_memaslap_default_opt;
const tapi_memaslap_cfg_opt tapi_memaslap_default_cfg_opt;
const struct sockaddr_in zero_sockaddr;
const tapi_memcached_opt tapi_memcached_default_opt;
const tapi_memtier_report tapi_memtier_default_report;
const tapi_memtier_opt tapi_memtier_default_opt;
const tapi_mke2fs_opt tapi_mke2fs_default_opt;
const tapi_netperf_opt tapi_netperf_default_opt;
const tapi_nptcp_opt tapi_nptcp_default_opt;
const tapi_ping_opt tapi_ping_default_opt;
const tapi_redis_benchmark_opt tapi_redis_benchmark_default_opt;
const tapi_redis_srv_opt tapi_redis_srv_default_opt;
const tapi_sfnt_pp_opt tapi_sfnt_pp_opt_default_opt;
const tapi_ssh_client_opt tapi_ssh_client_opt_default_opt;
const tapi_ssh_server_opt tapi_ssh_server_opt_default_opt;
static const tapi_stress_opt tapi_stress_default_opt = {     .cpu = TAPI_JOB_OPT_OMIT_UINT,     .io = TAPI_JOB_OPT_OMIT_UINT,     .vm = TAPI_JOB_OPT_OMIT_UINT,     .timeout_s = TAPI_JOB_OPT_OMIT_UINT, };
const tapi_trex_client_config tapi_trex_client_config_default;
const tapi_trex_server_config tapi_trex_server_config_default;
const tapi_trex_opt tapi_trex_default_opt;
const tapi_wrk_opt tapi_wrk_default_opt;
FILE* te_log_message_file_out;
te_log_message_f te_log_message_file;
const te_intset_ops te_bits_intset;
const te_intset_ops te_charset_intset;
const te_intset_ops te_fdset_intset;
const struct te_log_msg_out te_log_msg_out_raw;
const te_enum_map te_scalar_type_names[];
te_string_free_func te_string_free_heap;
te_vec_item_destroy_fn te_vec_item_free_ptr;
int(* trc_db_compare_values)(const char *s1, const char *s2);
te_trc_db* current_db;
program upnp_cp {     version ver0     {        } = 1;
f_process_ctrl_log_msg ctrl_msg_proc[CTRL_EVT_LAST][NT_LAST];
f_process_reg_log_msg reg_msg_proc;
f_process_log_root log_root_proc[CTRL_EVT_LAST];
jmp_buf rgt_mainjmp;
rgt_gen_ctx_t rgt_ctx;
int detailed_packets;
capture_tmpls_output_t capture_tmpls_out_cb;
const char* xml2fmt_files[];
rgt_tmpl_t xml2fmt_tmpls[];
size_t xml2fmt_tmpls_num;
struct poptOption rgt_options_table[];
trc_re_substs key_substs;
trc_re_namespaces key_namespaces;

// global functions

int ta_snmp_init_cold_reboot(char* param);
te_errno ta_snmp_cold_reboot(const char* id);
int ta_shell_init_cold_reboot(char* param);
te_errno ta_shell_cold_reboot(const char* id);
void ta_snmp_init();
ta_snmp_session* ta_snmp_open_session(const struct sockaddr* net_addr, long int version, const char* community);
void ta_snmp_close_session(ta_snmp_session* session);
te_errno ta_snmp_set(ta_snmp_session* session, ta_snmp_oid* oid, size_t oid_len, ta_snmp_type_t type, const uint8_t* value, size_t value_len);
te_errno ta_snmp_get(ta_snmp_session* session, ta_snmp_oid* oid, size_t oid_len, ta_snmp_type_t* type, uint8_t* buf, size_t* buf_len);
te_errno ta_snmp_get_int(ta_snmp_session* session, ta_snmp_oid* oid, size_t oid_len, long int* value);
te_errno ta_snmp_get_string(ta_snmp_session* session, ta_snmp_oid* oid, size_t oid_len, char* buf, size_t* buf_len);
te_errno write_sys_value(const char* value, const char* format, ...);
te_errno read_sys_value(char* value, size_t len, bool ignore_eaccess, const char* format, ...);
te_errno get_dir_list(const char* path, char* buffer, size_t length, bool ignore_absence, include_callback_func include_callback, void* callback_data, int(*)(const struct dirent**, const struct dirent**) compar);
te_errno string_replace(char** dst, const char* src);
te_errno string_empty_list(char** list);
te_errno get_interface_kind(const char* ifname, char* value);
te_errno ta_unix_conf_selftest_init(void);
te_errno ta_ethtool_lsets_field_get(ta_ethtool_lsets* lsets, ta_ethtool_lsets_field field, unsigned int* value);
te_errno ta_ethtool_lsets_field_set(ta_ethtool_lsets* lsets, ta_ethtool_lsets_field field, unsigned int value);
const char* ta_ethtool_lmode_name(ta_ethtool_link_mode mode);
te_errno ta_ethtool_lmode_parse(const char* name, ta_ethtool_link_mode* mode);
te_errno ta_ethtool_lmode_supported(ta_ethtool_lsets* lsets, ta_ethtool_link_mode mode, bool* supported);
te_errno ta_ethtool_lmode_advertised(ta_ethtool_lsets* lsets, ta_ethtool_link_mode mode, bool* advertised);
te_errno ta_ethtool_lmode_lp_advertised(ta_ethtool_lsets* lsets, ta_ethtool_link_mode mode, bool* lp_advertised);
te_errno ta_ethtool_lmode_advertise(ta_ethtool_lsets* lsets, ta_ethtool_link_mode mode, bool enable);
te_errno call_ethtool_ioctl(const char* if_name, int cmd, void* value);
te_errno get_ethtool_value(const char* if_name, unsigned int gid, ta_ethtool_cmd cmd, void** ptr_out);
te_errno commit_ethtool_value(const char* if_name, unsigned int gid, ta_ethtool_cmd cmd);
te_errno ta_ethtool_lmode_list_names(ta_ethtool_lsets* lsets, bool link_partner, te_string* list_str);
te_errno ta_ethtool_get_max_speed(ta_ethtool_lsets* lsets, unsigned int* speed, unsigned int* duplex);
te_errno ta_ethtool_get_strings(unsigned int gid, const char* if_name, unsigned int set_id, const ta_ethtool_strings** strs);
te_errno ta_ethtool_get_strings_list(unsigned int gid, const char* if_name, unsigned int set_id, char** list_out);
te_errno ta_ethtool_get_string_idx(unsigned int gid, const char* if_name, unsigned int set_id, const char* target, unsigned int* idx);
int ta_ethtool_failed_cmd(void);
void ta_ethtool_reset_failed_cmd(void);
const char* ta_ethtool_cmd2str(int cmd);
static const char* get_ds_name(const char* oid);
static int file_exists(char* file);
int ds_create_backup(const char* dir, const char* name, int* index);
void ds_restore_backup(int index);
void ds_restore_backups(void);
const char* ds_config(int index);
const char* ds_backup(int index);
bool ds_config_changed(int index);
int ds_lookup(const char* dir, const char* name);
void ds_config_touch(int index);
te_errno daemon_get(unsigned int gid, const char* oid, char* value);
te_errno daemon_set(unsigned int gid, const char* oid, const char* value);
static bool daemon_running(const char* daemon);
int find_file(unsigned int n, const char*const* files, bool exec);
te_errno l2tp_grab(const char* name);
te_errno l2tp_release(const char* name);
te_errno openvpn_grab(const char* name);
te_errno openvpn_release(const char* name);
te_errno socks_grab(const char* name);
te_errno socks_release(const char* name);
te_errno radvd_grab(const char* name);
te_errno radvd_release(const char* radvd);
te_errno dhcpserver_grab(const char* name);
te_errno dhcpserver_release(const char* name);
te_errno pppoeserver_grab(const char* name);
te_errno pppoeserver_release(const char* name);
te_errno echoserver_grab(const char* name);
te_errno echoserver_release(const char* name);
te_errno todudpserver_grab(const char* name);
te_errno todudpserver_release(const char* name);
te_errno telnetd_grab(const char* name);
te_errno telnetd_release(const char* name);
te_errno rshd_grab(const char* name);
te_errno rshd_release(const char* name);
te_errno tftpserver_grab(const char* name);
te_errno tftpserver_release(const char* name);
te_errno ftpserver_grab(const char* name);
te_errno ftpserver_release(const char* name);
te_errno smtp_grab(const char* name);
te_errno smtp_release(const char* name);
te_errno vncserver_grab(const char* name);
te_errno vncserver_release(const char* name);
te_errno dnsserver_grab(const char* name);
te_errno dnsserver_release(const char* name);
te_errno radiusserver_grab(const char* name);
te_errno radiusserver_release(const char* name);
te_errno vtund_grab(const char* name);
te_errno vtund_release(const char* name);
te_errno slapd_add(void);
te_errno pppoe_client_add(void);
int isc_dhcp_server_cfg_parse(const char* filename);
te_errno nginx_commit(unsigned int gid, const cfg_oid* p_oid);
nginx_inst* nginx_inst_find(const char* name);
te_errno nginx_http_init(void);
void nginx_http_server_free(nginx_http_server* srv);
void nginx_http_upstream_free(nginx_http_upstream* us);
te_errno nginx_param_get_string(char* value, const char* param);
te_errno nginx_param_set_string(char** param, const char* value);
te_errno nginx_param_get_uint(char* value, unsigned int param);
te_errno nginx_param_set_uint(unsigned int* param, const char* value);
te_errno nginx_param_get_boolean(char* value, bool param);
te_errno nginx_param_set_boolean(bool* param, const char* value);
te_errno ta_unix_conf_ovs_init(void);
te_errno ta_unix_conf_ps_init(void);
te_errno ta_unix_conf_route_init(void);
te_errno ta_unix_conf_route_find(ta_rt_info_t* rt_info);
te_errno ta_unix_conf_route_change(ta_cfg_obj_action_e action, ta_rt_info_t* rt_info);
te_errno ta_unix_conf_route_list(char** list);
te_errno ta_unix_conf_route_blackhole_list(char** list);
te_errno ta_unix_conf_route_blackhole_add(ta_rt_info_t* rt_info);
te_errno ta_unix_conf_route_blackhole_del(ta_rt_info_t* rt_info);
te_errno ta_unix_conf_outgoing_if(ta_rt_info_t* rt_info);
te_errno ta_unix_conf_rule_init(void);
te_errno ta_unix_conf_rule_find(uint32_t required, te_conf_ip_rule* rule);
te_errno ta_unix_conf_rule_list(char** list);
int conf_net_if_wrapper_if_nametoindex(const char* if_name);
te_errno conf_qdisc_parent_get(unsigned int gid, const char* oid, char* value);
te_errno conf_qdisc_handle_get(unsigned int gid, const char* oid, char* value);
te_errno conf_qdisc_enabled_set(unsigned int gid, const char* oid, const char* value, const char* if_name);
te_errno conf_qdisc_enabled_get(unsigned int gid, const char* oid, char* value, const char* if_name);
te_errno conf_qdisc_kind_get(unsigned int gid, const char* oid, char* value, const char* if_name);
te_errno conf_qdisc_kind_set(unsigned int gid, const char* oid, const char* value, const char* if_name);
te_errno conf_qdisc_param_set(unsigned int gid, const char* oid, const char* value, const char* if_name, const char* tc, const char* qdisc_str, const char* param);
te_errno conf_qdisc_param_get(unsigned int gid, const char* oid, char* value, const char* if_name, const char* tc, const char* qdisc, const char* param);
te_errno conf_qdisc_param_add(unsigned int gid, const char* oid, const char* value, const char* if_name, const char* tc, const char* qdisc, const char* param);
te_errno conf_qdisc_param_del(unsigned int gid, const char* oid, const char* if_name, const char* tc, const char* qdisc, const char* param);
te_errno conf_qdisc_param_list(unsigned int gid, const char* oid, const char* sub_id, char** list, const char* if_name);
void conf_qdisc_tbf_params_free(void);
void conf_qdisc_clsact_params_free(void);
te_errno ta_unix_conf_tc_init(void);
void ta_unix_conf_tc_fini(void);
te_errno conf_tc_internal_init(void);
void conf_tc_internal_fini(void);
struct nl_sock* conf_tc_internal_get_sock(void);
struct rtnl_qdisc* conf_tc_internal_try_get_qdisc(const char* if_name);
struct rtnl_qdisc* conf_tc_internal_get_qdisc(const char* if_name);
te_errno conf_tc_internal_nl_error2te_errno(int nl_error);
te_errno conf_tc_internal_qdisc_enable(const char* if_name);
te_errno conf_tc_internal_qdisc_disable(const char* if_name);
static int conf_bpf_fd_by_prog_oid(const char* prog_oid_str);
te_errno ta_unix_conf_sniffer_init(void);
te_errno ta_unix_conf_sniffer_cleanup(void);
void* te_command_monitor(void* arg);
int te_sniffer_process(int argc, char* argv[]);
te_errno ta_unix_conf_vm_init(void);
static char* ifname_without_vlan(const char* ifname);
te_errno ta_interface_oper_status_get(const char* ifname, bool* status);
te_errno ta_interface_status_get(const char* ifname, bool* status);
te_errno ta_interface_status_set(const char* ifname, bool status);
void wsa_func_handles_discover();
static char* getenv_reliable(const char* name);
static int wsp_proto_rpc2h(int socktype, int proto);
void* completion_callback_addr(const char* name);
te_errno completion_callback_register(const char* name, void* callback);
te_errno get_addr_by_ifindex(int if_index, struct in_addr* addr);
static te_errno win_rpc_errno(int err);
static te_errno thread_create(void* func, void* arg, uint32_t* tid);
static te_errno thread_cancel(uint32_t tid);
static void thread_exit(void* ret);
static te_errno thread_join(uint32_t tid, void** arg);
static void rpc_overlapped_free_memory(rpc_overlapped* overlapped);
static int iovec2overlapped(rpc_overlapped* overlapped, int vector_len, struct tarpc_iovec* vector);
static int overlapped2iovec(rpc_overlapped* overlapped, int* vector_len, struct tarpc_iovec** vector_val);
static int buf2overlapped(rpc_overlapped* overlapped, int buflen, char* buf);
static int shut_how_rpc2h(rpc_shut_how how);
static void init_checked_arg(checked_arg** list, char* real_arg, int len, int len_visible);
static int check_args(checked_arg* list);
dnl SPDX License dnl Declares a platform for and specifies platform specific dnl parameters for configure script as well platform specific dnl CFLAGS and LDFLAGS dnl May be called once for each platform(including host platform). dnl Host platform should appear first. dnl dnl Parameters may be empty for host platform(name "default" dnl is used for it);
shouldn t contain dnl configure parameters(including --host for cross-compiling and dnl variables in form VAR = VAL);
meson dnl define();
dnl SPDX License dnl Specifies parameters for NUT bootable image building dnl May be called once for each NUT image name Source location may dnl be the same for several NUT image names dnl dnl if specified dnl source directory pathname(optional);
int cfg_backup_process_file(xmlNodePtr node, bool restore, const te_vec* subtrees);
int cfg_backup_restore_ta(char* ta);
int cfg_backup_create_file(const char* filename, const te_vec* subtrees);
te_errno cfg_backup_create_filter_file(const char* filename, const te_vec* subtrees);
te_errno cfg_backup_verify(const char* filename, const te_vec* subtrees);
te_errno cfg_backup_restore_nohistory(const char* filename, const te_vec* subtrees);
te_errno cfg_backup_verify_and_restore(const char* filename, const te_vec* subtrees);
te_errno cfg_backup_verify_and_restore_ta_subtrees(const char* filename, const te_vec* ta_list);
static bool cfg_object_agent(cfg_object* obj);
static bool cfg_inst_agent(cfg_instance* inst);
static bool cfg_get_ta_name(const char* oid, char* ta);
void cfg_process_msg_register(cfg_register_msg* msg);
void cfg_process_msg_find(cfg_find_msg* msg);
void cfg_process_msg_get_descr(cfg_get_descr_msg* msg);
void cfg_process_msg_get_oid(cfg_get_oid_msg* msg);
void cfg_process_msg_get_id(cfg_get_id_msg* msg);
void cfg_process_msg_family(cfg_family_msg* msg);
void cfg_process_msg_add_dependency(cfg_add_dependency_msg* msg);
void cfg_process_msg_tree_print(cfg_tree_print_msg* msg);
void cfg_process_msg_unregister(cfg_unregister_msg* msg);
cfg_pattern_msg* cfg_process_msg_pattern(cfg_pattern_msg* msg);
cfg_object* cfg_get_object(const char* oid_s);
cfg_object* cfg_get_obj_by_obj_id_str(const char* obj_id_str);
cfg_instance* cfg_get_ins_by_ins_id_str(const char* ins_id_str);
te_errno cfg_add_all_inst_by_obj(cfg_object* obj);
int cfg_db_add(const char* oid_s, cfg_handle* handle, cfg_val_type type, cfg_inst_val val);
void cfg_db_del(cfg_handle handle);
int cfg_db_del_check(cfg_handle handle);
int cfg_db_set(cfg_handle handle, cfg_inst_val val);
int cfg_db_get(cfg_handle handle, cfg_inst_val* val);
int cfg_db_find(const char* oid_s, cfg_handle* handle);
te_errno cfg_db_find_pattern(const char* pattern, unsigned int* p_nmatches, cfg_handle** p_matches);
int cfg_db_init(void);
void cfg_db_destroy(void);
bool cfg_oid_match_volatile(const char* oid_s, char** oid_out);
void cfg_conf_delay_update(const char* oid);
static void cfg_conf_delay_reset(void);
te_errno cfg_db_tree_print(const char* filename, const unsigned int log_lvl, const char* id_fmt, ...);
void cfg_db_tree_print_msg_log(cfg_tree_print_msg* msg, const unsigned int cfg_log_lvl);
te_errno cfg_db_obj_print_deps(const char* filename, const unsigned int log_lvl, const char* id_fmt, ...);
te_errno cfg_db_unregister_obj_by_id_str(char* id, const unsigned int log_lvl);
static bool cfg_instance_volatile(cfg_instance* inst);
te_errno parse_config_dh_sync(xmlNodePtr root_node, te_kvpair_h* expand_vars);
int cfg_dh_process_file(xmlNodePtr node, te_kvpair_h* expand_vars, bool postsync);
int cfg_dh_create_file(char* filename);
int cfg_dh_attach_backup(char* filename);
int cfg_dh_restore_backup(char* filename, bool hard_check);
int cfg_dh_restore_backup_on_shutdown();
int cfg_dh_push_command(cfg_msg* msg, bool local, const cfg_inst_val* old_val);
int cfg_dh_apply_commit(const char* oid);
void cfg_dh_delete_last_command(void);
void cfg_dh_destroy(void);
void cfg_dh_optimize(void);
void cfg_dh_release_after(char* filename);
int cfg_dh_release_backup(char* filename);
te_errno cfg_dh_restore_agents(const te_vec* ta_list);
te_errno cfg_rcf_add(cfg_instance* inst);
te_errno cfg_rcf_del(cfg_instance* inst);
te_errno cfg_rcf_set(cfg_instance* inst);
void cfg_ta_reboot_all(void);
int cfg_ta_sync(char* oid, bool subtree);
void cfg_ta_sync_obj(cfg_object* obj, bool subtree);
int cfg_ta_add_agent_instances(void);
int cfg_tas_commit(const char* oid);
int cfg_ta_sync_dependants(cfg_instance* inst, bool no_children);
void cfg_ta_log_syncing(bool flag);
te_errno conf_ta_reboot_agents(const te_vec* agents);
te_errno parse_config_yaml(const char* filename, te_kvpair_h* expand_vars, xmlNodePtr xn_history_root, const char* conf_dirs);
typedef TAILQ_HEAD(refcnt_buffer);
te_errno refcnt_buffer_init(refcnt_buffer* rbuf, void* data, size_t len);
te_errno refcnt_buffer_init_copy(refcnt_buffer* rbuf, const void* data, size_t len);
void refcnt_buffer_copy(refcnt_buffer* dest, const refcnt_buffer* src);
void refcnt_buffer_free(refcnt_buffer* rbuf);
void msg_buffer_init(msg_buffer* buf);
te_errno msg_buffer_add(msg_buffer* buf, const refcnt_buffer* msg);
void msg_buffer_remove_first(msg_buffer* buf);
void msg_buffer_free(msg_buffer* buf);
cfg_file_type get_cfg_file_type(const char* filename);
typedef SLIST_HEAD(ta_inst);
int config_parser(const char* filename);
void config_ta(ta_inst* ta);
void lgr_register_message(const void* buf_mess, size_t buf_len);
bool te_log_check_shutdown(void);
te_errno listener_conf_add(const char* confstr);
log_listener_conf* listener_conf_get(const char* name);
te_errno listener_init(log_listener* listener, json_t* data);
te_errno listener_add_msg(log_listener* listener, const refcnt_buffer* msg);
te_errno listener_dump(log_listener* listener);
te_errno listener_finish_request(log_listener* listener, CURLcode result);
te_errno listener_finish(log_listener* listener);
void listener_free(log_listener* listener);
te_errno msg_queue_init(msg_queue* queue);
te_errno msg_queue_post(msg_queue* queue, const char* buf, size_t len);
void msg_queue_extract(msg_queue* queue, refcnt_buffer_list* list, bool* shutdown);
void msg_queue_shutdown(msg_queue* queue);
te_errno msg_queue_fini(msg_queue* queue);
void listeners_conf_dump(void);
void* listeners_thread(void*);
te_errno streaming_action_add_listener(streaming_action* action, int listener_id);
te_errno streaming_filter_process(const streaming_filter* filter, const log_msg_view* view);
te_errno streaming_filter_add_action(streaming_filter* filter, const char* rule_name, int listener_id);
void sniffers_handler(char* agent);
void sniffer_mark_handler(char* mark_data);
void sniffers_logs_cleanup(char* agt_fldr);
void sniffers_init(void);
ta* rcf_find_ta_by_name(char* name);
usrreq* rcf_find_user_request(usrreq* req, int sid);
void rcf_answer_user_request(usrreq* req);
void rcf_answer_all_requests(usrreq* req, int error);
void rcf_set_ta_dead(ta* agent);
void rcf_set_ta_unrecoverable(ta* agent);
int rcf_init_agent(ta* agent);
int rcf_send_cmd(ta* agent, usrreq* req);
usrreq* rcf_alloc_usrreq(void);
void rcf_ta_reboot_state_handler(ta* agent);
void rcf_set_ta_reboot_state(ta* agent, ta_reboot_state state);
bool rcf_ta_reboot_before_req(ta* agent, usrreq* req);
bool rcf_ta_reboot_on_req_reply(ta* agent, rcf_op_t opcode);
void rcf_ta_reboot_init_ctx(ta* agent);
void rcf_ta_reboot_get_next_reboot_type(ta* agent);
te_errno rcf_tce_conf_parse(rcf_tce_conf_t** conf, const char* file);
void rcf_tce_conf_free(rcf_tce_conf_t* conf);
typedef TAILQ_HEAD(test_path_items, test_path_item);
typedef TAILQ_HEAD(test_paths, test_path);
te_errno tester_test_path_parse(test_path* path);
te_errno test_path_new(test_paths* paths, const char* path, test_path_type type);
void test_paths_free(test_paths* paths);
te_errno tester_process_test_paths(const tester_cfgs* cfgs, test_paths* paths, testing_scenario* scenario, bool all_by_default);
te_errno tester_log_trc_tags(const tqh_strings* trc_tags);
typedef TAILQ_HEAD(test_suites_info, test_suite_info);
static void test_suite_info_free(test_suite_info* p);
static void test_suites_info_free(test_suites_info* suites);
te_errno tester_build_suite(const test_suite_info* suite, bool verbose);
te_errno tester_build_suites(const test_suites_info* suites, bool verbose);
typedef TAILQ_HEAD(cmd_monitor_descrs, cmd_monitor_descr);
void free_cmd_monitor(cmd_monitor_descr* monitor);
void free_cmd_monitors(cmd_monitor_descrs* monitors);
int start_cmd_monitors(cmd_monitor_descrs* monitors);
int stop_cmd_monitors(cmd_monitor_descrs* monitors);
typedef TAILQ_HEAD(persons_info, person_info);
typedef TAILQ_HEAD(test_options, test_option);
typedef SLIST_HEAD(test_value_types, test_value_type);
typedef TAILQ_HEAD(test_vars_args, test_var_arg);
typedef TAILQ_HEAD(run_items, run_item);
typedef TAILQ_HEAD(tests_info, test_info);
typedef TAILQ_HEAD(test_packages, test_package);
typedef SLIST_HEAD(test_var_arg_lists, test_var_arg_list);
static test_attrs* test_get_attrs(run_item* ri);
static const char* test_get_name(const run_item* ri);
static const char* run_item_name(const run_item* ri);
static bool run_item_container(const run_item* ri);
static test_entity_values* test_var_arg_values(const test_var_arg* va);
te_errno test_run_item_enum_args(const run_item* ri, test_var_arg_enum_cb callback, bool up_to_first_err, void* opaque);
const test_var_arg* test_run_item_find_arg(const run_item* ri, const char* name, unsigned int* n_values, unsigned int* outer_iters);
te_errno test_entity_values_enum(const run_item* ri, const test_session* context, const test_entity_values* values, test_entity_value_enum_cb callback, void* opaque, test_entity_value_enum_error_cb enum_error_cb, void* ee_opaque);
te_errno test_var_arg_enum_values(const run_item* ri, const test_var_arg* va, test_entity_value_enum_cb callback, void* opaque, test_entity_value_enum_error_cb enum_error_cb, void* ee_opaque);
te_errno test_var_arg_get_value(const run_item* ri, const test_var_arg* va, const unsigned int index, test_entity_value_enum_error_cb enum_error_cb, void* ee_opaque, const test_entity_value** value);
tester_cfg* tester_cfg_new(const char* filename);
te_errno tester_parse_configs(tester_cfgs* cfgs, bool build, bool verbose);
te_errno tester_prepare_configs(tester_cfgs* cfgs);
void tester_cfgs_free(tester_cfgs* cfgs);
tester_cfg_walk_ctl tester_configs_walk(const tester_cfgs* cfgs, const tester_cfg_walk* walk_cbs, const unsigned int walk_flags, const void* opaque);
static const char* ri_type2str(run_item_type type);
static const char* ri_role2str(run_item_role role);
static void bit_mask_set(uint8_t* mem, unsigned int bit);
static void bit_mask_clear(uint8_t* mem, unsigned int bit);
static bool bit_mask_is_set(const uint8_t* mem, unsigned int bit);
enum interactive_mode_opts tester_interactive_open_prompt(const tester_cfgs* cfgs, test_paths* paths, testing_scenario* scenario);
typedef TAILQ_HEAD(test_requirements, test_requirement);
te_errno tester_new_target_reqs(logic_expr** targets, const char* req);
te_errno test_requirements_clone(const test_requirements* reqs, test_requirements* new_reqs);
void test_requirements_free(test_requirements* reqs);
bool tester_is_run_required(const logic_expr* targets, const test_requirements* sticky_reqs, const struct run_item* test, const struct test_iter_arg* args, tester_flags flags, bool quiet);
te_errno tester_get_sticky_reqs(test_requirements* sticky_reqs, const test_requirements* reqs);
const char* tester_reqs_expr_to_string(const logic_expr* expr);
static te_errno tester_test_results_init(tester_test_results* results);
static void tester_test_result_add(tester_test_results* results, tester_test_result* result);
static void tester_test_result_del(tester_test_results* results, tester_test_result* result);
te_errno tester_test_msg_listener_start(tester_test_msg_listener** ctx, tester_test_results* results);
te_errno tester_test_msg_listener_stop(tester_test_msg_listener** ctx);
typedef TAILQ_HEAD(testing_scenario, testing_act);
void scenario_act_free(testing_act* act);
void scenario_free(testing_scenario* scenario);
testing_act* scenario_new_act(const unsigned int first, const unsigned int last, const tester_flags flags);
te_errno scenario_add_act(testing_scenario* scenario, const unsigned int first, const unsigned int last, const tester_flags flags, const char* hash);
te_errno scenario_act_copy(testing_scenario* scenario, const testing_act* act);
te_errno scenario_copy(testing_scenario* dst, const testing_scenario* src);
te_errno scenario_by_bit_mask(testing_scenario* scenario, unsigned int offset, const uint8_t* bm, unsigned int bm_len, unsigned int bit_weight, const char* hash);
te_errno scenario_append(testing_scenario* scenario, testing_scenario* subscenario, unsigned int iterate);
void scenario_apply_to(testing_scenario* scenario, unsigned int from);
void scenario_apply_from(testing_scenario* scenario, unsigned int to);
void scenario_add_flags(testing_scenario* scenario, const tester_flags flags);
void scenario_del_acts_by_flags(testing_scenario* scenario, tester_flags flags);
void scenario_del_acts_with_no_flags(testing_scenario* scenario);
void scenario_glue(testing_scenario* scenario);
te_errno scenario_exclude(testing_scenario* scenario, testing_scenario* exclude, tester_flags flags);
te_errno scenario_merge(testing_scenario* scenario, testing_scenario* add, tester_flags flags);
te_errno scenario_apply_flags(testing_scenario* scenario, const testing_scenario* flags);
testing_direction scenario_step(const testing_act** act, unsigned int* act_id, unsigned int start_id, unsigned int next_id, bool skip);
const char* scenario_to_str(const testing_scenario* scenario);
te_errno scenario_apply_dial(testing_scenario* scenario, const struct tester_cfgs* cfgs, double dial);
te_errno tester_run(testing_scenario* scenario, const struct logic_expr* targets, const struct tester_cfgs* cfgs, struct test_paths* paths, const te_trc_db* trc_db, const tqh_strings* trc_tags, const tester_flags flags, const char* verdict);
te_errno tester_start_serial_thread(void);
te_errno tester_stop_serial_thread(void);
te_errno tester_set_serial_pid(pid_t i_pid);
te_errno tester_release_serial_pid(void);
bool tester_check_serial_stop(void);
void tester_term_out_start(tester_flags flags, run_item_type type, const char* name, unsigned int tin, test_id parent, test_id self);
void tester_term_out_done(tester_flags flags, run_item_type type, const char* name, unsigned int tin, test_id parent, test_id self, tester_test_status status, trc_verdict trcv);
int tester_term_cleanup(void);
te_errno tester_init_types(void);
const test_value_type* tester_find_type(const test_session* session, const char* name);
void tester_add_type(test_session* session, test_value_type* type);
const test_entity_value* tester_type_check_plain_value(const test_value_type* type, const char* plain);
te_errno rcf_comm_agent_create_listener(int port, int* listener);
int rcf_comm_agent_init(const char* config_str, rcf_comm_connection** p_rcc);
int rcf_comm_agent_wait(rcf_comm_connection* rcc, char* buffer, size_t* pbytes, void** pba);
int rcf_comm_agent_reply(rcf_comm_connection* rcc, const void* p_buffer, size_t length);
int rcf_comm_agent_close(rcf_comm_connection** p_rcc);
static const char* cs_neigh_entry_state2str(cs_neigh_entry_state state);
static const char* te_log_level2str(te_log_level level);
void te_log_init(const char* lgr_entity, te_log_message_f* log_message);
static void te_log_message_ts(const char* file, unsigned int line, te_log_ts_sec sec, te_log_ts_usec usec, unsigned int level, const char* entity, const char* user, const char* fmt, ...);
static void te_log_message(const char* file, unsigned int line, unsigned int level, const char* entity, const char* user, const char* fmt, ...);
static const char* rcf_op_to_string(rcf_op_t op);
const rcf_tce_comp_conf_t* rcf_tce_get_next_comp_conf(const rcf_tce_type_conf_t* type, const rcf_tce_comp_conf_t* comp);
const rcf_tce_type_conf_t* rcf_tce_get_type_conf(const rcf_tce_conf_t* conf, const char* type);
m4_dnl SPDX License so just undefine them m4_undefine(`__unix__') m4_dnl m4_undefine(`__windows__') m4_dnl m4_dnl m4_dnl Use C-style comments m4_changecom(`') m4_dnl m4_dnl m4_dnl The macros are intended to work around a limitation m4_dnl of C preprocessor that disallows preprocessor directives m4_dnl(including conditionals) inside a macro definition. m4_dnl The equivalent of the following macro in pseudo-C is m4_dnl m4_dnl m4_dnl H2RPC_CHECK is analogous m4_define(`RPC2H_CHECK', `(void) 0');
m4_dnl SPDX License so just undefine them m4_undefine(`__unix__') m4_dnl m4_undefine(`__windows__') m4_dnl m4_dnl m4_dnl Use C-style comments m4_changecom(`') m4_dnl m4_dnl m4_dnl The macros are intended to work around a limitation m4_dnl of C preprocessor that disallows preprocessor directives m4_dnl(including conditionals) inside a macro definition. m4_dnl The equivalent of the following macro in pseudo-C is m4_dnl m4_dnl m4_dnl H2RPC_CHECK is analogous void m4_dnl m4_dnl m4_dnl These macros are similar to RPC2H_CHECK();
m4_dnl in configure ac or meson build m4_dnl m4_define(`RPC2H_CHECK_DECL', `(void) 0');
m4_dnl RPC2H_FLAG_CHECK(res, value, FLAG1);
m4_dnl RPC2H_FLAG_CHECK(res, value, FLAG2);
m4_dnl H2RPC_FLAG_CHECK(res, value, FLAG1);
m4_dnl H2RPC_FLAG_CHECK(res, value, FLAG2);
m4_dnl if(value ! = 0);
m4_dnl m4_dnl they modify removing checked flag m4_dnl from so that at the end it may be checked whether m4_dnl some unknown flags are present m4_dnl m4_define(`RPC2H_FLAG_CHECK', `(void) 0');
m4_dnl SPDX License m4_dnl m4_dnl RPC entry point numbers normally start with for each RPC program m4_define(`program', ``program 'm4_define(`_rpc_counter', `1')');
m4_dnl SPDX License m4_dnl m4_dnl RPC entry point numbers normally start with for each RPC program tarpc_$1_out _$1(tarpc_$1_in*);
uint32_t thread_self(void);
void* thread_mutex_create(void);
void thread_mutex_destroy(void* mutex);
void thread_mutex_lock(void* mutex);
void thread_mutex_unlock(void* mutex);
bool ta_interface_is_mine(const char* ifname);
static uint16_t ip_csum_part(uint32_t checksum, const void* data, size_t length);
static uint16_t calculate_checksum(const void* data, size_t length);
static bool ptr_is_not_null(const void* ptr);
static unsigned int te_round_to_zero(unsigned int n, unsigned int m);
static const char* te_rc_mod2str(te_errno err);
static const char* te_rc_err2str(te_errno err);
static te_errno te_rc_os2te(int err);
static void te_var_name2env(const char* name, char* env, int env_size);
static int te_vasprintf(char** strp, const char* fmt, va_list ap);
static int te_asprintf(char** strp, const char* fmt, ...);
static char* te_sprintf(const char* fmt, ...);
static char* te_strerror_r(int in_errno, char* buf, size_t buf_len);
static const char* te_test_status_to_str(te_test_status status);
typedef TAILQ_HEAD(te_test_verdicts, te_test_verdict);
static void te_test_result_init(te_test_result* result);
static void te_test_result_free_verdict(te_test_verdict* verdict);
static void te_test_result_free_verdicts(te_test_verdicts* verdicts);
static void te_test_result_clean(te_test_result* result);
static void te_test_result_free(te_test_result* result);
static te_errno te_test_result_verdicts_cpy(te_test_verdicts* dst, te_test_verdicts* src);
static te_test_result* te_test_result_dup(te_test_result* result);
static void te_test_result_cpy(te_test_result* dest, te_test_result* src);
te_errno ta_vlan_get_parent(const char* ifname, char* parent);
te_errno ta_bond_get_slaves(const char* ifname, tqh_strings* slaves, int* slaves_num, bool* is_team);
te_errno ta_process_mgmt_init(void);
pid_t ta_waitpid(pid_t pid, int* status, int options);
int ta_system(const char* cmd);
int ta_system_fmt(const char* fmt, ...);
int te_errno ta_popen_r(const char* cmd, pid_t* cmd_pid, FILE** f);
te_errno ta_popen_r_fmt(pid_t* cmd_pid, FILE** f, const char* fmt, ...);
te_errno te_errno ta_pclose_r(pid_t cmd_pid, FILE* f);
int ta_kill_death(pid_t pid);
int ta_kill_and_wait(pid_t pid, int sig, unsigned int timeout_s);
te_errno mkdirp(const char* path, int mode);
te_errno rcf_ch_register_symbol_table(const rcf_symbol_entry* entries);
void* rcf_ch_symbol_addr(const char* name, bool is_func);
const char* rcf_ch_symbol_name(const void* addr);
te_errno register_vfork_hook(void(*)(void) prepare, void(*)(void) child, void(*)(void) parent);
void run_vfork_hooks(enum vfork_hook_phase phase);
bool agent_check_l4_port_is_free(int socket_family, int socket_type, uint16_t port);
te_errno agent_alloc_l4_port(int socket_family, int socket_type, uint16_t* port);
void agent_free_l4_port(uint16_t port);
te_errno agent_alloc_l4_specified_port(int socket_family, int socket_type, uint16_t port);
te_errno agent_key_generate(agent_key_manager manager, const char* type, unsigned bitsize, const char* user, const char* private_key_file);
int asn_tag_equal(asn_tag_t l, asn_tag_t r);
te_errno asn_impl_find_subtype(const asn_type* type, const char* label, const asn_type** found_type);
te_errno asn_impl_find_subvalue(const asn_value* container, const char* label, asn_value const** found_val);
te_errno asn_child_named_index(const asn_type* type, const char* labels, int* index, const char** rest_labels);
te_errno asn_child_tag_index(const asn_type* type, asn_tag_class tag_class, uint16_t tag_val, int* index);
te_errno asn_put_child_by_index(asn_value* container, asn_value* child, int index);
te_errno asn_get_child_by_index(const asn_value* container, asn_value** child, int index);
bool asn_clean_count(asn_value* value);
static int asn_syntax_is_a(asn_syntax syntax, int mask);
const char* asn_get_type_name(const asn_type* type);
asn_syntax asn_get_syntax_of_type(const asn_type* type);
te_errno asn_get_subtype(const asn_type* type, const asn_type** subtype, const char* labels);
te_errno asn_get_child_type(const asn_type* type, const asn_type** subtype, asn_tag_class tag_class, asn_tag_value tag_val);
te_errno asn_label_to_tag(const asn_type* type, const char* label, asn_tag_t* tag);
asn_value* asn_init_value(const asn_type* type);
asn_value* asn_init_value_tagged(const asn_type* type, asn_tag_class tc, asn_tag_value tag);
asn_value* asn_copy_value(const asn_value* value);
te_errno asn_assign_value(asn_value* dst, const asn_value* src);
void asn_free_value(asn_value* value);
const asn_type* asn_get_type(const asn_value* value);
bool asn_check_type(const asn_value* value, const asn_type* type);
te_errno asn_parse_value_text(const char* string, const asn_type* type, asn_value** parsed_val, int* parsed_syms);
te_errno asn_parse_dvalue_in_file(const char* filename, const asn_type* type, asn_value** parsed_value, int* syms_parsed);
int asn_sprint_value(const asn_value* value, char* buffer, size_t buf_len, unsigned int indent);
te_errno asn_save_to_file(const asn_value* value, const char* filename);
te_errno asn_encode(void* buf, size_t* buf_len, asn_value* value);
asn_value* asn_decode(const void* data);
te_errno asn_find_child_choice_values(const asn_value* container, asn_tag_value tag_value, asn_child_desc_t** items_out, unsigned int* nb_items_out);
asn_value* asn_find_child_choice_value(const asn_value* container, asn_tag_value tag_value);
asn_value* asn_choice_array_look_up_value(unsigned int nb_values, asn_value** values, asn_tag_value tag);
te_errno asn_free_child(asn_value* value, asn_tag_class tag_class, asn_tag_value tag_val);
te_errno asn_free_descendant(asn_value* value, const char* labels);
asn_value* asn_find_descendant(const asn_value* value, te_errno* status, const char* labels_fmt, ...);
asn_value* asn_retrieve_descendant(asn_value* value, te_errno* status, const char* labels_fmt, ...);
te_errno asn_get_descendent(const asn_value* container, asn_value** subval, const char* labels);
te_errno asn_put_descendent(asn_value* container, asn_value* subval, const char* labels);
te_errno asn_insert_indexed(asn_value* container, asn_value* elem_value, int index, const char* labels);
te_errno asn_remove_indexed(asn_value* container, int index, const char* labels);
te_errno asn_get_indexed(const asn_value* container, asn_value** subval, int index, const char* labels);
te_errno asn_write_primitive(asn_value* value, const void* data, size_t d_len);
te_errno asn_put_choice(asn_value* container, asn_value* value);
te_errno asn_path_from_extended(asn_value* node, const char* ext_path, char* asn_path, unsigned int asn_path_len, bool auto_insert);
int asn_insert_value_extended_path(asn_value* root_node, const char* ext_path, asn_value* value, int* index);
te_errno asn_check_value_contains(asn_value* container, asn_value* value);
te_errno asn_free_subvalue(asn_value* value, const char* labels);
te_errno asn_free_subvalue_fmt(asn_value* container, const char* labels_fmt, ...);
te_errno te_errno asn_free_child_value(asn_value* value, asn_tag_class tag_class, asn_tag_value tag_val);
te_errno asn_put_child_value(asn_value* container, asn_value* subvalue, asn_tag_class tag_class, asn_tag_value tag_val);
te_errno asn_put_child_value_by_label(asn_value* container, asn_value* subvalue, const char* label);
te_errno asn_write_value_field(asn_value* container, const void* data, size_t d_len, const char* labels);
te_errno asn_write_value_field_fmt(asn_value* container, const void* data, size_t len, const char* labels_fmt, ...);
te_errno te_errno asn_read_value_field(const asn_value* container, void* data, size_t* d_len, const char* labels);
te_errno asn_read_value_field_fmt(const asn_value* container, void* data, size_t* len, const char* labels_fmt, ...);
te_errno te_errno asn_get_enum(const asn_value* container, int32_t* value);
te_errno asn_get_enum_name(const asn_value* container, const char** name);
te_errno asn_write_int32(asn_value* container, int32_t value, const char* labels);
te_errno asn_read_int32(const asn_value* container, int32_t* value, const char* labels);
te_errno asn_write_uint32(asn_value* container, uint32_t value, const char* labels);
te_errno asn_read_uint32(const asn_value* container, uint32_t* value, const char* labels);
te_errno asn_write_bool(asn_value* container, bool value, const char* labels);
te_errno asn_read_bool(const asn_value* container, bool* value, const char* labels);
te_errno asn_write_string(asn_value* container, const char* value, const char* labels);
te_errno asn_read_string(const asn_value* container, char** value, const char* labels);
te_errno asn_write_component_value(asn_value* container, const asn_value* elem_value, const char* labels);
te_errno asn_read_component_value(const asn_value* container, asn_value** elem_value, const char* labels);
te_errno asn_write_indexed(asn_value* container, const asn_value* elem_value, int index, const char* labels);
asn_value* asn_read_indexed(const asn_value* container, int index, const char* labels);
int asn_get_length(const asn_value* container, const char* labels);
asn_syntax asn_get_syntax(const asn_value* value, const char* labels);
const char* asn_get_choice_ptr(const asn_value* container);
te_errno asn_get_choice(const asn_value* container, const char* labels, char* choice_label, size_t ch_lb_len);
const char* asn_get_name(const asn_value* container);
te_errno asn_get_subvalue(const asn_value* container, asn_value** subval, const char* labels);
te_errno asn_get_child_value(const asn_value* container, const asn_value** subval, asn_tag_class tag_class, asn_tag_value tag_val);
te_errno asn_get_choice_value(const asn_value* container, asn_value** subval, asn_tag_class* tag_class, asn_tag_value* tag_val);
te_errno asn_get_field_data(const asn_value* container, void* data_ptr, const char* labels);
asn_tag_value asn_get_tag(const asn_value* container);
size_t asn_count_txt_len(const asn_value* value, unsigned int indent);
te_errno asn_put_mark(asn_value* value, int mark);
te_errno asn_get_mark(const asn_value* value, int* mark);
te_errno asn_walk_depth(asn_value* container, bool only_leafs, te_errno* status, walk_method func, void* user_ptr);
te_errno asn_walk_breadth(asn_value* container, bool only_leafs, te_errno* status, walk_method func, void* user_ptr);
te_errno builder_build_test_suite(const char* suite, const char* sources);
int rcf_net_engine_connect(const char* addr, const char* port, struct rcf_net_connection** p_rnc, fd_set* p_select_set);
int rcf_net_engine_transmit(struct rcf_net_connection* rnc, const char* data, size_t length);
bool rcf_net_engine_is_ready(struct rcf_net_connection* rnc);
int rcf_net_engine_receive(struct rcf_net_connection* rnc, char* buffer, size_t* pbytes, char** pba);
int rcf_net_engine_close(struct rcf_net_connection** p_rnc, fd_set* p_select_set);
void te_conf_ip_rule_init(te_conf_ip_rule* rule);
te_errno te_conf_ip_rule_to_str(const te_conf_ip_rule* rule, char** str);
te_errno te_conf_ip_rule_from_str(const char* str, uint32_t* required, te_conf_ip_rule* rule);
te_conf_obj_compare_result te_conf_ip_rule_compare(uint32_t required, const te_conf_ip_rule* object_a, const te_conf_ip_rule* object_b);
void te_conf_ip_rule_set_invert(te_conf_ip_rule* rule, bool invert);
bool te_conf_ip_rule_get_invert(const te_conf_ip_rule* rule);
te_errno te_conf_obj_to_str(const te_conf_obj* fields, size_t fields_number, const void* base, uint32_t mask, char** str);
te_errno te_conf_obj_from_str(const te_conf_obj* fields, size_t fields_number, const char* str, uint32_t* required, void* base, uint32_t* mask);
te_conf_obj_compare_result te_conf_obj_compare(const te_conf_obj* fields, size_t fields_number, uint32_t required, const void* base_a, uint32_t mask_a, const void* base_b, uint32_t mask_b);
char* cfg_oid_get_inst_name(const cfg_oid* oid, int idx);
char* cfg_oid_str_get_inst_name(const char* oid_str, int idx);
static char* cfg_oid_object_subid(cfg_oid* oid, unsigned int i);
static char* cfg_oid_inst_subid(cfg_oid* oid, unsigned int i);
cfg_oid* cfg_allocate_oid(int length, bool inst);
cfg_oid* cfg_convert_oid_str(const char* oid);
char* cfg_convert_oid(const cfg_oid* oid);
void cfg_free_oid(cfg_oid* oid);
int cfg_oid_cmp(const cfg_oid* o1, const cfg_oid* o2);
bool cfg_oid_match(const cfg_oid* inst_oid, const cfg_oid* obj_oid, bool match_prefix);
te_errno cfg_oid_dispatch(const cfg_oid_rule rules[], const char* inst_oid, void* ctx);
cfg_oid* cfg_oid_common_root(const cfg_oid* oid1, const cfg_oid* oid2);
static void cfg_oid_inst2obj(const char* inst_oid, char* obj_oid);
te_errno cfg_register_object_str(const char* oid, cfg_obj_descr* descr, cfg_handle* handle);
te_errno cfg_register_object(const cfg_oid* oid, cfg_obj_descr* descr, cfg_handle* handle);
te_errno cfg_register_object_fmt(cfg_obj_descr* descr, cfg_handle* handle, const char* oid_fmt, ...);
te_errno te_errno cfg_unregister_object_str(const char* id_fmt, ...);
te_errno cfg_get_object_descr(cfg_handle handle, cfg_obj_descr* descr);
te_errno cfg_get_oid_str(cfg_handle handle, char** oid);
te_errno cfg_get_oid(cfg_handle handle, cfg_oid** oid);
te_errno cfg_get_subid(cfg_handle handle, char** subid);
te_errno cfg_get_inst_name(cfg_handle handle, char** name);
te_errno cfg_get_inst_name_type(cfg_handle handle, cfg_val_type type, cfg_inst_val* val);
te_errno cfg_get_ith_inst_name(const char* str_oid, unsigned int i, char** name);
te_errno cfg_find_str(const char* oid, cfg_handle* p_handle);
static te_errno cfg_find_vfmt(cfg_handle* p_handle, const char* oid_fmt, va_list ap);
te_errno cfg_find_fmt(cfg_handle* p_handle, const char* oid_fmt, ...);
te_errno te_errno cfg_find(const cfg_oid* oid, cfg_handle* handle);
te_errno cfg_find_object_by_instance(cfg_handle instance, cfg_handle* object);
te_errno cfg_find_pattern(const char* pattern, unsigned int* p_num, cfg_handle** p_set);
te_errno cfg_find_pattern_fmt(unsigned int* p_num, cfg_handle** p_set, const char* ptrn_fmt, ...);
te_errno cfg_find_pattern_iter_fmt(cfg_handle_cb_func cb_func, void* opaque, const char* ptrn_fmt, ...);
te_errno te_errno cfg_get_son(cfg_handle handle, cfg_handle* son);
te_errno cfg_get_brother(cfg_handle handle, cfg_handle* brother);
te_errno cfg_get_father(cfg_handle handle, cfg_handle* father);
te_errno cfg_add_instance(const cfg_oid* oid, cfg_handle* handle, cfg_val_type type, ...);
te_errno cfg_add_instance_str(const char* oid, cfg_handle* p_handle, cfg_val_type type, ...);
te_errno cfg_add_instance_fmt(cfg_handle* p_handle, cfg_val_type type, const void* val, const char* oid_fmt, ...);
te_errno te_errno cfg_add_instance_local(const cfg_oid* oid, cfg_handle* handle, cfg_val_type type, ...);
te_errno cfg_add_instance_local_str(const char* oid, cfg_handle* p_handle, cfg_val_type type, ...);
te_errno cfg_add_instance_local_fmt(cfg_handle* p_handle, cfg_val_type type, const void* val, const char* oid_fmt, ...);
te_errno te_errno cfg_add_instance_child_fmt(cfg_handle* p_handle, cfg_val_type type, const void* val, cfg_handle parent, const char* suboid_fmt, ...);
te_errno te_errno te_errno cfg_del_instance(cfg_handle handle, bool with_children);
te_errno cfg_del_instance_fmt(bool with_children, const char* oid_fmt, ...);
te_errno te_errno cfg_del_instance_local(cfg_handle handle, bool with_children);
te_errno cfg_del_instance_local_fmt(bool with_children, const char* oid_fmt, ...);
te_errno te_errno cfg_set_instance(cfg_handle handle, cfg_val_type type, ...);
te_errno cfg_set_instance_fmt(cfg_val_type type, const void* val, const char* oid_fmt, ...);
te_errno te_errno cfg_set_instance_str(cfg_val_type type, const void* val, const char* oid);
te_errno cfg_set_instance_local(cfg_handle handle, cfg_val_type type, ...);
te_errno cfg_set_instance_local_fmt(cfg_val_type type, const void* val, const char* oid_fmt, ...);
te_errno te_errno cfg_commit(const char* oid);
te_errno cfg_commit_fmt(const char* oid_fmt, ...);
te_errno te_errno cfg_get_instance(cfg_handle handle, cfg_val_type* type, ...);
te_errno cfg_get_instance_fmt(cfg_val_type* p_type, void* val, const char* oid_fmt, ...);
te_errno te_errno cfg_get_int(int* val, const char* oid_fmt, ...);
te_errno te_errno te_errno cfg_get_bool(bool* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno cfg_get_int8(int8_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno cfg_get_uint8(uint8_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_int16(int16_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_uint16(uint16_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_uint32(uint32_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_int32(int32_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_int64(int64_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_uint64(uint64_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_double(double* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_string(char** val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_addr(struct sockaddr** val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_instance_str(cfg_val_type* p_type, void* val, const char* oid);
te_errno cfg_get_instance_sync(cfg_handle handle, cfg_val_type* type, ...);
te_errno cfg_get_instance_sync_fmt(cfg_val_type* type, void* val, const char* oid_fmt, ...);
te_errno te_errno cfg_get_int_sync(int* val, const char* oid_fmt, ...);
te_errno te_errno te_errno cfg_get_bool_sync(bool* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno cfg_get_int8_sync(int8_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno cfg_get_uint8_sync(uint8_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_int16_sync(int16_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_uint16_sync(uint16_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_int32_sync(int32_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_uint32_sync(uint32_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_int64_sync(int64_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_uint64_sync(uint64_t* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_double_sync(double* val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_string_sync(char** val, const char* oid_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno cfg_get_addr_sync(struct sockaddr** val, const char* oid_fmt, ...);
te_errno cfg_synchronize(const char* oid, bool subtree);
te_errno cfg_synchronize_fmt(bool subtree, const char* oid_fmt, ...);
te_errno cfg_enumerate(cfg_handle handle, cfg_inst_handler callback, void* user_data);
te_errno cfg_reboot_ta(const char* ta_name, bool restore, rcf_reboot_type reboot_type);
te_errno cfg_create_backup(char** name);
te_errno cfg_verify_backup(const char* name);
te_errno cfg_restore_backup(const char* name);
te_errno cfg_restore_backup_ta(const char* ta, const char* name);
te_errno cfg_restore_backup_nohistory(const char* name);
te_errno cfg_release_backup(char** name);
te_errno cfg_create_config(const char* name, bool history);
te_errno cfg_process_history(const char* filename, const te_kvpair_h* expand_vars);
te_errno cfg_wait_changes(void);
te_errno cfg_touch_instance(const char* oid_tmpl, ...);
te_errno cfg_tree_print(const char* filename, const unsigned int log_lvl, const char* id_fmt, ...);
void cfg_api_cleanup(void);
te_errno cfg_copy_subtree_fmt(const char* dst_oid, const char* src_oid_fmt, ...);
te_errno cfg_ipc_mk_get(cfg_get_msg* msg, size_t msg_buf_size, cfg_handle handle, bool sync);
te_errno cfg_ipc_mk_find_str(cfg_find_msg* msg, size_t msg_buf_size, const char* oid);
te_errno cfg_ipc_mk_find_fmt(cfg_find_msg* msg, size_t msg_buf_size, const char* oid_fmt, ...);
te_errno te_errno cfg_ipc_mk_set(cfg_set_msg* msg, size_t msg_buf_size, cfg_handle handle, bool local, cfg_val_type type, cfg_inst_val value);
static te_errno cfg_ipc_mk_set_int(cfg_set_msg* msg, size_t msg_buf_size, cfg_handle handle, bool local, int32_t value);
static te_errno cfg_ipc_mk_set_str(cfg_set_msg* msg, size_t msg_buf_size, cfg_handle handle, bool local, char* value);
te_errno cfg_ipc_mk_del(cfg_del_msg* msg, size_t msg_buf_size, cfg_handle handle, bool local);
static const char* cs_server_name(void);
void cfg_process_msg(cfg_msg** msg, bool update_dh);
int ipc_init_client(const char* client_name, bool conn, struct ipc_client** p_client);
const char* ipc_client_name(const struct ipc_client* ipcc);
int ipc_send_message(struct ipc_client* ipcc, const char* server_name, const void* msg, size_t msg_len);
int ipc_send_message_with_answer(struct ipc_client* ipcc, const char* server_name, const void* msg, size_t msg_len, void* recv_buf, size_t* p_buf_len);
int ipc_receive_answer(struct ipc_client* ipcc, const char* server_name, void* buf, size_t* p_buf_len);
int ipc_receive_rest_answer(struct ipc_client* ipcc, const char* server_name, void* buf, size_t* p_buf_len);
int ipc_close_client(struct ipc_client* ipcc);
TAILQ_HEAD(ipc_datagrams, ipc_datagram);
int ipc_remember_datagram(struct ipc_datagrams* p_pool, void* data, size_t len, struct sockaddr_un* addr, size_t addr_len);
int ipc_init(void);
int ipc_register_server(const char* name, bool conn, struct ipc_server** p_ipcs);
int ipc_get_server_fd(const struct ipc_server* ipcs);
int ipc_get_server_fds(const struct ipc_server* ipcs, fd_set* set);
bool ipc_is_server_ready(struct ipc_server* ipcs, const fd_set* set, int max_fd);
const char* ipc_server_client_name(const struct ipc_server_client* ipcsc);
int ipc_receive_message(struct ipc_server* ipcs, void* buf, size_t* p_buf_len, struct ipc_server_client** p_ipcsc);
int ipc_send_answer(struct ipc_server* ipcs, struct ipc_server_client* ipcsc, const void* msg, size_t msg_len);
int ipc_close_server(struct ipc_server* ipcs);
int ipc_kill(void);
iscsi_initiator_data_t* iscsi_configuration(void);
int iscsi_get_target_id(const char* oid);
int iscsi_get_cid(const char* oid);
te_errno iscsi_post_connection_request(int target_id, int cid, int status, bool urgent);
te_errno iscsi_initiator_start_thread(void);
void iscsi_init_default_tgt_parameters(iscsi_target_data_t* tgt_data);
void iscsi_init_default_ini_parameters(void);
int iscsi_unix_cli(const char* cmd, ...);
te_errno iscsi_openiscsi_stop_daemon(void);
te_errno iscsi_initiator_dummy_set(iscsi_connection_req* req);
te_errno iscsi_initiator_unh_set(iscsi_connection_req* req);
te_errno iscsi_initiator_openiscsi_set(iscsi_connection_req* req);
te_errno iscsi_initiator_l5_set(iscsi_connection_req* req);
te_errno iscsi_initiator_win32_set(iscsi_connection_req* req);
static bool iscsi_is_param_needed(iscsi_target_param_descr_t* param, iscsi_target_data_t* tgt_data, iscsi_connection_data_t* conn_data, iscsi_tgt_chap_data_t* auth_data);
void iscsi_write_param(void(*)(void*, char*) outfunc, void* destination, iscsi_target_param_descr_t* param, iscsi_target_data_t* tgt_data, iscsi_connection_data_t* conn_data, iscsi_tgt_chap_data_t* auth_data);
void iscsi_write_to_file(void* destination, char* what);
void iscsi_put_to_buf(void* destination, char* what);
void iscsi_append_to_buf(void* destination, char* what);
bool iscsi_when_tgt_auth(iscsi_target_data_t* target_data, iscsi_connection_data_t* conn_data, iscsi_tgt_chap_data_t* auth_data);
bool iscsi_when_not_tgt_auth(iscsi_target_data_t* target_data, iscsi_connection_data_t* conn_data, iscsi_tgt_chap_data_t* auth_data);
bool iscsi_when_chap(iscsi_target_data_t* target_data, iscsi_connection_data_t* conn_data, iscsi_tgt_chap_data_t* auth_data);
te_errno iscsi_get_device_name(iscsi_connection_data_t* conn, int target_id, bool is_generic, char* outbuffer);
te_errno log_branch_filter_load_xml(log_branch_filter* filter, xmlNodePtr filter_node);
te_errno log_duration_filter_load_xml(log_duration_filter* filter, xmlNodePtr filter_node);
te_errno log_msg_filter_load_xml(log_msg_filter* filter, xmlNodePtr filter_node);
te_errno log_msg_filter_load_yaml(log_msg_filter* filter, yaml_document_t* doc, yaml_node_t* node);
void log_branch_filter_init(log_branch_filter* filter);
te_errno log_branch_filter_add(log_branch_filter* filter, const char* path, bool include);
log_filter_result log_branch_filter_check(log_branch_filter* filter, const char* path);
void log_branch_filter_free(log_branch_filter* filter);
te_errno log_duration_filter_init(log_duration_filter* filter);
te_errno log_duration_filter_add(log_duration_filter* filter, const char* type, uint32_t min, uint32_t max, bool include);
log_filter_result log_duration_filter_check(log_duration_filter* filter, const char* type, uint32_t duration);
void log_duration_filter_free(log_duration_filter* filter);
te_errno log_msg_filter_init(log_msg_filter* filter);
te_errno log_msg_filter_set_default(log_msg_filter* filter, bool include, te_log_level level_mask);
te_errno log_msg_filter_add_entity(log_msg_filter* filter, bool include, const char* name, bool regex, te_log_level level_mask);
te_errno log_msg_filter_add_user(log_msg_filter* filter, bool include, const char* entity, bool entity_regex, const char* user, bool user_regex, te_log_level level_mask);
log_filter_result log_msg_filter_check(const log_msg_filter* filter, const log_msg_view* view);
bool log_msg_filter_equal(const log_msg_filter* a, const log_msg_filter* b);
void log_msg_filter_free(log_msg_filter* filter);
te_errno te_raw_log_parse(const void* buf, size_t buf_len, log_msg_view* view);
te_errno te_raw_log_expand(const log_msg_view* view, te_string* target);
int logfork_register_user(const char* name);
int logfork_delete_user(pid_t pid, uint32_t tid);
int logfork_set_id_logging(bool enabled);
void logfork_entry(void);
te_errno ta_log_init(const char* lgr_entity);
te_errno ta_log_shutdown(void);
void ta_log_dynamic_user_ts(te_log_ts_sec sec, te_log_ts_usec usec, unsigned int level, const char* user, const char* msg);
uint32_t ta_log_get(uint32_t buf_length, uint8_t* transfer_buf);
static void ta_log_message_fast(unsigned int level, const char* user, const char* fmt, int argl1, ta_log_arg arg1, int argl2, ta_log_arg arg2, int argl3, ta_log_arg arg3, int argl4, ta_log_arg arg4, int argl5, ta_log_arg arg5, int argl6, ta_log_arg arg6, int argl7, ta_log_arg arg7, int argl8, ta_log_arg arg8, int argl9, ta_log_arg arg9, int argl10, ta_log_arg arg10, int argl11, ta_log_arg arg11, int argl12, ta_log_arg arg12, int argl13);
static void ta_log_timestamp(te_log_ts_sec* sec, te_log_ts_usec* usec);
static int lgr_rb_init(struct lgr_rb* ring_buffer);
static int lgr_rb_destroy(struct lgr_rb* ring_buffer);
static void lgr_rb_view_head(struct lgr_rb* ring_buffer, uint32_t position);
static uint32_t lgr_rb_remove_oldest(struct lgr_rb* ring_buffer);
static uint32_t lgr_rb_allocate_space(struct lgr_rb* ring_buffer, uint32_t nmbr, uint32_t* position);
static uint32_t lgr_rb_allocate_head(struct lgr_rb* ring_buffer, uint32_t force, uint32_t* position);
static void lgr_rb_init_header(lgr_mess_header* header, unsigned int level, const char* user, const char* fmt, bool user_in_first_arg, te_log_ts_sec sec, te_log_ts_usec usec);
static void lgr_rb_fill_allocated_header(lgr_mess_header* allocated, const lgr_mess_header* from);
static uint32_t lgr_rb_allocate_and_copy(struct lgr_rb* ring_buffer, const void* start, uint32_t length, uint8_t** arg_addr, bool add_zero);
static void lgr_rb_get_elements(struct lgr_rb* ring_buffer, uint32_t position, uint32_t length, uint8_t* destination);
static const char* logger_server_name(void);
static const char* logger_ta_prefix(void);
static const char* logger_flush_name(void);
void log_client_close(void);
int log_flush_ten(const char* ta_name);
static void log_message_va(te_log_msg_raw_data* out, const char* file, unsigned int line, te_log_ts_sec sec, te_log_ts_usec usec, unsigned int level, const char* entity, const char* user, const char* fmt, va_list ap);
static void log_message_int(te_log_msg_raw_data* out, const char* file, unsigned int line, unsigned int level, const char* entity, const char* user, const char* fmt, ...);
te_errno logic_expr_eval(const logic_expr* parsed, logic_expr_get_val* get_val, void* cookie, logic_expr_res* res);
te_errno logic_expr_parse(const char* str, logic_expr** expr);
void logic_expr_free_res(logic_expr_res* res);
logic_expr* logic_expr_binary(logic_expr_type type, logic_expr* lhv, logic_expr* rhv);
void logic_expr_free_nr(logic_expr* expr);
void logic_expr_free(logic_expr* expr);
logic_expr* logic_expr_dup(logic_expr* expr);
int logic_expr_match(const logic_expr* re, const tqh_strings* set);
int logic_expr_int_lex_destroy(void);
te_errno logic_expr_dnf(logic_expr** expr, int(*)(logic_expr*, logic_expr*) comp_func);
te_errno logic_expr_dnf_split(logic_expr* dnf, logic_expr*** array, int* size);
char* logic_expr_to_str(logic_expr* expr);
int ndn_du_write_plain_int(asn_value* pdu, uint16_t tag, int32_t value);
int ndn_du_read_plain_int(const asn_value* pdu, uint16_t tag, int32_t* value);
int ndn_du_write_plain_string(asn_value* pdu, uint16_t tag, const char* value);
int ndn_du_read_plain_string(const asn_value* pdu, uint16_t tag, char** value);
int ndn_du_write_plain_oct(asn_value* pdu, uint16_t tag, const uint8_t* value, size_t len);
int ndn_du_read_plain_oct(const asn_value* pdu, uint16_t tag, uint8_t* value, size_t* len);
int ndn_match_data_units(const asn_value* pat, asn_value* pkt_pdu, const uint8_t* data, size_t d_len, const char* label);
int ndn_match_mask(const asn_value* mask_pat, const uint8_t* data, size_t d_len);
int ndn_get_timestamp(const asn_value* packet, struct timeval* ts);
te_errno ndn_packet_to_template(const asn_value* pkt, asn_value** tmpl);
char* ndn_csap_stack_by_spec(const asn_value* csap_spec);
te_errno ndn_init_asn_value(asn_value** value, const asn_type* type);
te_errno ndn_csap_add_layer(asn_value** csap_spec, const asn_type* layer_type, const char* layer_choice, asn_value** layer_spec);
asn_value* ndn_csap_spec_by_traffic_template(const asn_value* tmpl);
te_errno ndn_arp_packet_to_plain(const asn_value* pkt, ndn_arp_header_plain* arp_header);
asn_value* ndn_arp_plain_to_packet(const ndn_arp_header_plain* arp_header);
int ndn_bpdu_asn_to_plain(const asn_value* pkt, ndn_stp_bpdu_t* bpdu);
asn_value* ndn_bpdu_plain_to_asn(const ndn_stp_bpdu_t* bpdu);
int ndn_eth_packet_to_plain(const asn_value* pkt, ndn_eth_header_plain* eth_header);
asn_value* ndn_eth_plain_to_packet(const ndn_eth_header_plain* eth_header);
int ndn_forw_action_asn_to_plain(const asn_value* val, ndn_forw_action_plain* forw_action);
int ndn_forw_action_plain_to_asn(const ndn_forw_action_plain* forw_action, asn_value** val);
int asn2bin_data(asn_value* segment_data, uint8_t* data, uint32_t* data_len);
int bin_data2asn(uint8_t* data, uint32_t data_len, asn_value** value);
size_t iscsi_rest_data_len(uint8_t* bhs, iscsi_digest_type header_digest, iscsi_digest_type data_digest);
te_errno ndn_rte_flow_read_with_offset(const asn_value* pdu, const char* name, size_t size, uint32_t offset, uint32_t* spec_p, uint32_t* mask_p, uint32_t* last_p);
const char* ndn_snmp_msg_type_h2str(ndn_snmp_msg_t msg_type);
typedef LIST_HEAD(netconf_route_nexthops, netconf_route_nexthop);
const char* netconf_nla_type2str(netconf_nla_type nla_type);
void netconf_devlink_param_value_data_mv(netconf_nla_type nla_type, netconf_devlink_param_value_data* dst, netconf_devlink_param_value_data* src);
const char* devlink_param_cmode_netconf2str(netconf_devlink_param_cmode cmode);
netconf_devlink_param_cmode devlink_param_cmode_str2netconf(const char* cmode);
const char* netconf_devlink_eswitch_mode_netconf2str(netconf_devlink_eswitch_mode mode);
netconf_devlink_eswitch_mode netconf_devlink_eswitch_mode_str2netconf(const char* mode);
int netconf_open(netconf_handle* nh, int netlink_family);
netconf_list* netconf_link_dump(netconf_handle nh);
te_errno netconf_link_set_ns(netconf_handle nh, const char* ifname, int32_t fd, pid_t pid);
void netconf_net_addr_init(netconf_net_addr* net_addr);
int netconf_net_addr_modify(netconf_handle nh, netconf_cmd cmd, const netconf_net_addr* net_addr);
netconf_list* netconf_net_addr_dump(netconf_handle nh, unsigned char family);
void netconf_route_init(netconf_route* route);
void netconf_route_clean(netconf_route* route);
int netconf_route_modify(netconf_handle nh, netconf_cmd cmd, const netconf_route* route);
netconf_list* netconf_route_dump(netconf_handle nh, unsigned char family);
netconf_list* netconf_route_get_entry_for_addr(netconf_handle nh, const struct sockaddr* dst_addr);
int netconf_route_get_src_addr_and_iface(netconf_handle nh, const struct sockaddr* dst_addr, const struct sockaddr* src_addr, char* ifname);
void netconf_rule_init(netconf_rule* rule);
netconf_list* netconf_rule_dump(netconf_handle nh, unsigned char family);
te_errno netconf_rule_modify(netconf_handle nh, netconf_cmd cmd, const netconf_rule* rule);
void netconf_neigh_init(netconf_neigh* neigh);
int netconf_neigh_modify(netconf_handle nh, netconf_cmd cmd, const netconf_neigh* neigh);
netconf_list* netconf_neigh_dump(netconf_handle nh, unsigned char family);
void netconf_list_filter(netconf_list* list, netconf_node_filter_t filter, void* user_data);
void netconf_list_free(netconf_list* list);
void netconf_close(netconf_handle nh);
netconf_list* netconf_net_addr_dump_iface(netconf_handle nh, unsigned char family, int ifindex);
netconf_list* netconf_net_addr_dump_primary(netconf_handle nh, unsigned char family, bool primary);
te_errno netconf_macvlan_modify(netconf_handle nh, netconf_cmd cmd, const char* link, const char* ifname, const char* mode_str);
te_errno netconf_macvlan_list(netconf_handle nh, const char* link, char** list);
te_errno netconf_macvlan_get_mode(netconf_handle nh, const char* ifname, const char** mode_str);
te_errno netconf_ipvlan_modify(netconf_handle nh, netconf_cmd cmd, const char* link, const char* ifname, uint16_t mode, uint16_t flag);
te_errno netconf_ipvlan_list(netconf_handle nh, const char* link, char** list);
te_errno netconf_ipvlan_get_mode(netconf_handle nh, const char* ifname, uint32_t* mode, uint32_t* flag);
te_errno netconf_vlan_modify(netconf_handle nh, netconf_cmd cmd, const char* link, const char* ifname, unsigned int vid);
te_errno netconf_vlan_list(netconf_handle nh, const char* link, char** list);
te_errno netconf_vlan_get_ifname(netconf_handle nh, const char* link, unsigned int vid, char* ifname, size_t len);
te_errno netconf_veth_add(netconf_handle nh, const char* ifname, const char* peer);
te_errno netconf_veth_del(netconf_handle nh, const char* ifname);
te_errno netconf_veth_get_peer(netconf_handle nh, const char* ifname, char* peer, size_t peer_len);
te_errno netconf_veth_list(netconf_handle nh, netconf_veth_list_filter_func filter_cb, void* filter_opaque, char** list);
te_errno netconf_udp_tunnel_del(netconf_handle nh, const char* ifname);
te_errno netconf_udp_tunnel_list(netconf_handle nh, netconf_udp_tunnel_list_filter_func filter_cb, void* filter_opaque, char** list, char* link_kind);
te_errno netconf_geneve_add(netconf_handle nh, const netconf_geneve* geneve);
te_errno netconf_geneve_list(netconf_handle nh, netconf_udp_tunnel_list_filter_func filter_cb, void* filter_opaque, char** list);
te_errno netconf_vxlan_add(netconf_handle nh, const netconf_vxlan* vxlan);
te_errno netconf_vxlan_list(netconf_handle nh, netconf_udp_tunnel_list_filter_func filter_cb, void* filter_opaque, char** list);
te_errno netconf_bridge_add(netconf_handle nh, const char* ifname);
te_errno netconf_bridge_del(netconf_handle nh, const char* ifname);
te_errno netconf_bridge_list(netconf_handle nh, netconf_bridge_list_filter_func filter_cb, void* filter_opaque, char** list);
te_errno netconf_port_list(netconf_handle nh, const char* brname, netconf_port_list_filter_func filter_cb, void* filter_opaque, char** list);
te_errno netconf_port_add(netconf_handle nh, const char* brname, const char* ifname);
te_errno netconf_port_del(netconf_handle nh, const char* ifname);
te_errno netconf_devlink_get_info(netconf_handle nh, const char* bus, const char* dev, netconf_list** list);
te_errno netconf_devlink_get_eswitch(netconf_handle nh, const char* bus, const char* dev, netconf_list** list);
te_errno netconf_devlink_eswitch_mode_set(netconf_handle nh, const char* bus, const char* dev, netconf_devlink_eswitch_mode mode);
te_errno netconf_devlink_param_dump(netconf_handle nh, netconf_list** list);
te_errno netconf_devlink_param_set(netconf_handle nh, const char* bus, const char* dev, const char* param_name, netconf_nla_type nla_type, netconf_devlink_param_cmode cmode, const netconf_devlink_param_value_data* value);
uint16_t netconf_cmd_to_flags(netconf_cmd cmd);
netconf_list* netconf_dump_request(netconf_handle nh, uint16_t type, unsigned char family, netconf_recv_cb_t* recv_cb, void* cookie);
int netconf_list_extend(netconf_list* list, netconf_node_type type);
te_errno netconf_append_attr(char* req, size_t max_len, uint16_t attr_type, const void* data, size_t len);
te_errno netconf_get_str_attr(struct nlattr* na, char** value);
te_errno netconf_get_uint8_attr(struct nlattr* na, uint8_t* value);
te_errno netconf_get_uint16_attr(struct nlattr* na, uint16_t* value);
te_errno netconf_get_uint32_attr(struct nlattr* na, uint32_t* value);
te_errno netconf_get_uint64_attr(struct nlattr* na, uint64_t* value);
void netconf_append_rta(struct nlmsghdr* h, const void* data, int len, unsigned short rta_type);
void netconf_append_rta_nested(struct nlmsghdr* h, unsigned short rta_type, struct rtattr** rta);
void netconf_append_rta_nested_end(struct nlmsghdr* h, struct rtattr* rta);
void netconf_parse_rtattr(struct rtattr* rta, int len, struct rtattr** rta_arr, int max);
void netconf_parse_rtattr_nested(struct rtattr* rta, struct rtattr** rta_arr, int max);
uint32_t netconf_get_rta_u32(struct rtattr* rta);
void* netconf_dup_rta(const struct rtattr* rta);
void* netconf_bytes2str_rta(const struct rtattr* rta);
te_errno netconf_process_attrs(void* first_attr, size_t attrs_size, netconf_attr_cb cb, void* cb_data);
te_errno netconf_process_hdr_attrs(struct nlmsghdr* h, size_t hdr_len, netconf_attr_cb cb, void* cb_data);
te_errno netconf_process_nested_attrs(struct nlattr* na_parent, netconf_attr_cb cb, void* cb_data);
void netconf_link_node_free(netconf_node* node);
void netconf_net_addr_node_free(netconf_node* node);
void netconf_route_node_free(netconf_node* node);
void netconf_neigh_node_free(netconf_node* node);
void netconf_rule_node_free(netconf_node* node);
void netconf_macvlan_node_free(netconf_node* node);
void netconf_ipvlan_node_free(netconf_node* node);
void netconf_vlan_node_free(netconf_node* node);
void netconf_veth_node_free(netconf_node* node);
void netconf_udp_tunnel_free(netconf_udp_tunnel* udp_tunnel);
void netconf_geneve_node_free(netconf_node* node);
void netconf_vxlan_node_free(netconf_node* node);
void netconf_bridge_node_free(netconf_node* node);
void netconf_port_node_free(netconf_node* node);
void netconf_devlink_info_node_free(netconf_node* node);
void netconf_devlink_param_node_free(netconf_node* node);
int netconf_talk(netconf_handle nh, void* req, int len, netconf_recv_cb_t* recv_cb, void* cookie, netconf_list* list);
void netconf_init_nlmsghdr(char* req, netconf_handle nh, uint16_t nlmsg_type, uint16_t nlmsg_flags, struct nlmsghdr** hdr);
void netconf_parse_link(struct nlmsghdr* h, struct rtattr** rta_arr, int max);
te_errno netconf_gn_get_family(netconf_handle nh, const char* family_name, uint16_t* family_id);
te_errno netconf_gn_process_attrs(struct nlmsghdr* h, netconf_attr_cb cb, void* cb_data);
te_errno netconf_gn_init_hdrs(void* req, size_t max_len, uint16_t nlmsg_type, uint16_t nlmsg_flags, uint8_t cmd, uint8_t version, netconf_handle nh);
static const char* rcf_server_name(void);
static const char* rcf_call_mode2str(rcf_call_mode_t mode);
te_errno rcf_add_ta(const char* name, const char* type, const char* rcflib, const char* confstr, unsigned int flags);
te_errno rcf_add_ta_unix(const char* name, const char* type, const char* host, uint16_t port, unsigned int copy_timeout, unsigned int kill_timeout, unsigned int flags);
te_errno rcf_del_ta(const char* name);
te_errno rcf_get_ta_list(char* buf, size_t* len);
te_errno rcf_ta_name2type(const char* ta_name, char* ta_type);
te_errno rcf_ta_create_session(const char* ta_name, int* session);
te_errno rcf_ta_reboot(const char* ta_name, const char* boot_params, const char* image, rcf_reboot_type reboot_type);
void rcf_log_cfg_changes(bool enable);
te_errno rcf_ta_cfg_get(const char* ta_name, int session, const char* oid, char* val_buf, size_t len);
te_errno rcf_ta_cfg_set(const char* ta_name, int session, const char* oid, const char* val);
te_errno rcf_ta_cfg_add(const char* ta_name, int session, const char* oid, const char* val);
te_errno rcf_ta_cfg_del(const char* ta_name, int session, const char* oid);
te_errno rcf_ta_cfg_group(const char* ta_name, int session, bool is_start);
te_errno rcf_get_sniffer_dump(const char* ta_name, const char* snif_id, char* fname, unsigned long long* offset);
te_errno rcf_ta_get_sniffers(const char* ta_name, const char* snif_id, char** buf, size_t* len, bool sync);
te_errno rcf_ta_get_log(const char* ta_name, char* log_file);
te_errno rcf_ta_get_var(const char* ta_name, int session, const char* var_name, rcf_var_type_t var_type, size_t var_len, void* val);
te_errno rcf_ta_set_var(const char* ta_name, int session, const char* var_name, rcf_var_type_t var_type, const char* val);
te_errno rcf_ta_get_file(const char* ta_name, int session, const char* rfile, const char* lfile);
te_errno rcf_ta_put_file(const char* ta_name, int session, const char* lfile, const char* rfile);
te_errno rcf_ta_del_file(const char* ta_name, int session, const char* rfile);
te_errno rcf_tr_op_log(bool ring);
bool rcf_tr_op_log_get(void);
te_errno rcf_ta_csap_create(const char* ta_name, int session, const char* stack_id, const char* params, csap_handle_t* csap_id);
te_errno rcf_ta_csap_destroy(const char* ta_name, int session, csap_handle_t csap_id);
te_errno rcf_ta_csap_param(const char* ta_name, int session, csap_handle_t csap_id, const char* var, size_t var_len, char* val);
te_errno rcf_ta_trsend_start(const char* ta_name, int session, csap_handle_t csap_id, const char* templ, rcf_call_mode_t blk_mode);
te_errno rcf_ta_trsend_stop(const char* ta_name, int session, csap_handle_t csap_id, int* num);
te_errno rcf_ta_trrecv_start(const char* ta_name, int session, csap_handle_t csap_id, const char* pattern, unsigned int timeout, unsigned int num, unsigned int mode);
te_errno rcf_ta_trrecv_wait(const char* ta_name, int session, csap_handle_t csap_id, rcf_pkt_handler handler, void* user_param, unsigned int* num);
te_errno rcf_ta_trrecv_stop(const char* ta_name, int session, csap_handle_t csap_id, rcf_pkt_handler handler, void* user_param, unsigned int* num);
te_errno rcf_ta_trrecv_get(const char* ta_name, int session, csap_handle_t csap_id, rcf_pkt_handler handler, void* user_param, unsigned int* num);
te_errno rcf_ta_trsend_recv(const char* ta_name, int session, csap_handle_t csap_id, const char* templ, rcf_pkt_handler handler, void* user_param, unsigned int timeout, int* error);
te_errno rcf_trpoll(rcf_trpoll_csap* csaps, unsigned int n_csaps, unsigned int timeout);
te_errno rcf_ta_call(const char* ta_name, int session, const char* rtn, int* error, int argc, bool argv, ...);
te_errno rcf_ta_start_task(const char* ta_name, int session, int priority, const char* rtn, pid_t* pid, int argc, bool argv, ...);
te_errno rcf_ta_start_thread(const char* ta_name, int session, int priority, const char* rtn, int* tid, int argc, bool argv, ...);
te_errno rcf_ta_kill_task(const char* ta_name, int session, pid_t pid);
te_errno rcf_ta_kill_thread(const char* ta_name, int session, int tid);
te_errno rcf_ta_call_rpc(const char* ta_name, int session, const char* rpcserver, int timeout, const char* rpc_name, void* in, void* out);
te_errno rcf_check_agent(const char* ta_name);
te_errno rcf_check_agents(void);
te_errno rcf_shutdown_call(void);
void rcf_api_cleanup(void);
te_errno rcf_foreach_ta(rcf_ta_cb* cb, void* cookie);
te_errno rcf_get_dead_agents(te_vec* dead_agents);
int rcf_ch_init(void);
void rcf_ch_lock(void);
void rcf_ch_unlock(void);
int rcf_ch_shutdown(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen);
int rcf_ch_reboot(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, const char* params);
int rcf_ch_configure(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, rcf_ch_cfg_op_t op, const char* oid, const char* val);
int rcf_ch_vread(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, rcf_var_type_t type, const char* var);
int rcf_ch_vwrite(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, rcf_var_type_t type, const char* var, ...);
int rcf_ch_file(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, rcf_op_t op, const char* filename);
te_errno rcf_ch_tad_init(void);
te_errno rcf_ch_tad_shutdown(void);
int rcf_ch_csap_create(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, const char* stack, const char* params);
int rcf_ch_csap_destroy(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, csap_handle_t csap);
int rcf_ch_csap_param(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, csap_handle_t csap, const char* param);
int rcf_ch_trsend_start(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, csap_handle_t csap, bool postponed);
int rcf_ch_trsend_stop(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, csap_handle_t csap);
int rcf_ch_trrecv_start(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, csap_handle_t csap, unsigned int num, unsigned int timeout, unsigned int flags);
int rcf_ch_trrecv_stop(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, csap_handle_t csap);
int rcf_ch_trrecv_get(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, csap_handle_t csap);
int rcf_ch_trrecv_wait(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, csap_handle_t csap);
int rcf_ch_trsend_recv(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, csap_handle_t csap, unsigned int timeout, unsigned int flags);
int rcf_ch_trpoll(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, csap_handle_t csap, unsigned int timeout);
int rcf_ch_trpoll_cancel(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, csap_handle_t csap, unsigned int poll_id);
int rcf_ch_call(struct rcf_comm_connection* handle, char* cbuf, size_t buflen, size_t answer_plen, const char* rtn, bool is_argv, int argc, void** params);
int rcf_ch_start_process(pid_t* pid, int priority, const char* rtn, bool do_exec, int argc, void** params);
int rcf_ch_start_thread(int* tid, int priority, const char* rtn, bool is_argv, int argc, void** params);
int rcf_ch_kill_process(unsigned int pid);
int rcf_ch_free_proc_data(unsigned int pid);
int rcf_ch_kill_thread(unsigned int tid);
int rcf_ch_conf_init(void);
void rcf_ch_conf_fini(void);
const char* rcf_ch_conf_agent(void);
int rcf_pch_vread(struct rcf_comm_connection* conn, char* cbuf, size_t buflen, size_t answer_plen, rcf_var_type_t type, const char* var);
int rcf_pch_vwrite(struct rcf_comm_connection* conn, char* cbuf, size_t buflen, size_t answer_plen, rcf_var_type_t type, const char* var, ...);
void rcf_pch_cfg_init(void);
int rcf_pch_configure(struct rcf_comm_connection* conn, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, rcf_ch_cfg_op_t op, const char* oid, const char* val);
te_errno rcf_pch_agent_list(unsigned int gid, const char* oid, const char* sub_id, char** list);
int rcf_pch_file(struct rcf_comm_connection* conn, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, rcf_op_t op, const char* filename);
int rcf_pch_call(struct rcf_comm_connection* conn, char* cbuf, size_t buflen, size_t answer_plen, const char* rtn, bool is_argv, int argc, void** params);
int rcf_pch_rpc(struct rcf_comm_connection* conn, int sid, const char* data, size_t len, const char* server, uint32_t timeout);
int rcf_pch_run(const char* confstr, const char* info);
void rcf_pch_get_id(char* id);
void rcf_pch_rpc_init(const char* tmp_path);
void rcf_pch_rpc_atfork(void);
void rcf_pch_rpc_shutdown(void);
const char* rcf_pch_rpc_get_provider(void);
te_errno rpcserver_plugin_enable(const char* install, const char* action, const char* uninstall);
te_errno rpcserver_plugin_disable(void);
te_errno rcf_pch_find_node(const char* oid_str, rcf_pch_cfg_object** node);
te_errno rcf_pch_add_node(const char* father, rcf_pch_cfg_object* node);
te_errno rcf_pch_del_node(rcf_pch_cfg_object* node);
te_errno rcf_pch_rsrc_info(const char* name, rcf_pch_rsrc_grab_callback grab, rcf_pch_rsrc_release_callback release);
te_errno rcf_pch_rsrc_grab_dummy(const char* name);
te_errno rcf_pch_rsrc_release_dummy(const char* name);
bool rcf_pch_rsrc_accessible(const char* fmt, ...);
bool rcf_pch_rsrc_accessible_may_share(const char* fmt, ...);
te_errno rcf_pch_rsrc_check_locks(const char* rsrc_ptrn);
void rcf_pch_rsrc_init(void);
void write_str_in_quotes(char* dst, const char* src, size_t len);
struct rpcserver* rcf_pch_find_rpcserver(const char* name);
struct rpcserver* rcf_pch_rpcserver_first(void);
struct rpcserver* rcf_pch_rpcserver_next(struct rpcserver* rpcs);
const char* rcf_pch_rpcserver_get_name(const struct rpcserver* rpcs);
void rcf_pch_rpcserver_plugin_init(pthread_mutex_t* rcf_pch_lock, rcf_pch_rpc_call rcf_pch_call);
void rcf_pch_rpcserver_plugin_enable(struct rpcserver* rpcs);
void rcf_pch_rpcserver_plugin_disable(struct rpcserver* rpcs);
void ta_obj_cleanup(void);
int ta_obj_attr_set(ta_cfg_obj_t* obj, const char* name, const char* value);
ta_cfg_obj_attr_t* ta_obj_attr_find(ta_cfg_obj_t* obj, const char* name);
void ta_obj_free(ta_cfg_obj_t* obj);
ta_cfg_obj_t* ta_obj_find(const char* type, const char* name, unsigned int gid);
te_errno ta_obj_find_create(const char* type, const char* name, unsigned int gid, ta_obj_cb cb_func, ta_cfg_obj_t** obj, bool* created);
int ta_obj_add(const char* type, const char* name, const char* value, unsigned int gid, void* user_data, ta_cfg_obj_data_free* user_free, ta_cfg_obj_t** new_obj);
te_errno ta_obj_value_set(const char* type, const char* name, const char* value, unsigned int gid, ta_obj_cb cb_func);
int ta_obj_set(const char* type, const char* name, const char* attr_name, const char* attr_value, unsigned int gid, ta_obj_cb cb_func);
int ta_obj_del(const char* type, const char* name, void* user_data, ta_cfg_obj_data_free* user_free, unsigned int gid, ta_obj_cb cb_func);
void ta_cfg_obj_log(const ta_cfg_obj_t* obj);
const char* ta_rt_type2name(ta_route_type type);
typedef TAILQ_HEAD(ta_rt_nexthops_t, ta_rt_nexthop_t);
void ta_rt_nexthops_clean(ta_rt_nexthops_t* hops);
void ta_rt_info_clean(ta_rt_info_t* rt_info);
static void ta_rt_info_init(ta_route_type type, ta_rt_info_t* rt_info);
int ta_rt_parse_inst_name(const char* name, ta_rt_info_t* rt_info);
int ta_rt_parse_inst_value(const char* value, ta_rt_info_t* rt_info);
int ta_rt_parse_attrs(ta_cfg_obj_attr_t* attrs, ta_rt_info_t* rt_info);
int ta_rt_parse_obj(ta_cfg_obj_t* obj, ta_rt_info_t* rt_info);
te_errno ta_rsrc_create_lock(const char* name, bool* shared, bool fallback_shared, unsigned int attempts_timeout_ms);
void ta_rsrc_delete_lock(const char* name);
te_errno rcf_rpc_server_get(const char* ta, const char* name, const char* father, int flags, rcf_rpc_server** p_handle);
static te_errno rcf_rpc_server_create(const char* ta, const char* name, rcf_rpc_server** p_handle);
static te_errno rcf_rpc_server_thread_create(rcf_rpc_server* rpcs, const char* name, rcf_rpc_server** p_new);
static te_errno rcf_rpc_server_fork(rcf_rpc_server* rpcs, const char* name, rcf_rpc_server** p_new);
static te_errno rcf_rpc_server_fork_exec(rcf_rpc_server* rpcs, const char* name, rcf_rpc_server** p_new);
te_errno rcf_rpc_server_create_process(rcf_rpc_server* rpcs, const char* name, int flags, rcf_rpc_server** p_new);
te_errno rcf_rpc_server_vfork(rcf_rpc_server* rpcs, const char* name, uint32_t time_to_wait, pid_t* pid, uint32_t* elapsed_time);
te_errno rcf_rpc_server_vfork_in_thread(vfork_thread_data* data, pthread_t* thread_id, rcf_rpc_server** p_new);
te_errno rcf_rpc_server_exec(rcf_rpc_server* rpcs);
te_errno rcf_rpc_setlibname(rcf_rpc_server* rpcs, const char* libname);
static te_errno rcf_rpc_server_restart(rcf_rpc_server* rpcs);
te_errno rcf_rpc_servers_restart_all(void);
te_errno rcf_rpc_server_destroy(rcf_rpc_server* rpcs);
static te_errno rcf_rpc_server_dead(rcf_rpc_server* rpcs);
static te_errno rcf_rpc_server_finished(rcf_rpc_server* rpcs);
void rcf_rpc_call(rcf_rpc_server* rpcs, const char* proc, void* in_arg, void* out_arg);
te_errno rcf_rpc_server_is_op_done(rcf_rpc_server* rpcs, bool* done);
bool rcf_rpc_server_is_alive(rcf_rpc_server* rpcs);
static void rcf_rpc_free_result(void* out_arg, xdrproc_t out_proc);
static const char* rpcop2str(rcf_rpc_op op);
bool rcf_rpc_server_has_children(rcf_rpc_server* rpcs);
void rcf_rpc_namespace_free_cache(rcf_rpc_server* rpcs);
te_errno rcf_rpc_namespace_id2str(rcf_rpc_server* rpcs, rpc_ptr_id_namespace id, char** str);
typedef SLIST_HEAD(rcf_rpc_server_hook);
te_errno rcf_rpc_server_hook_register(void(*)(rcf_rpc_server*rpcs) hook_to_register);
const char* rpc_dpdk_offloads_tx_get_name(unsigned long long bit);
const char* rpc_dpdk_offloads_rx_get_name(unsigned long long bit);
const char* lio_opcode_rpc2str(rpc_lio_opcode opcode);
int lio_opcode_rpc2h(rpc_lio_opcode opcode);
rpc_lio_opcode lio_opcode_h2rpc(int opcode);
const char* lio_mode_rpc2str(rpc_lio_mode mode);
int lio_mode_rpc2h(rpc_lio_mode mode);
rpc_lio_mode lio_mode_h2rpc(int mode);
const char* aio_cancel_retval_rpc2str(rpc_aio_cancel_retval ret);
int aio_cancel_retval_rpc2h(rpc_aio_cancel_retval ret);
rpc_aio_cancel_retval aio_cancel_retval_h2rpc(int ret);
const char* bitmask2str(struct rpc_bit_map_entry* maps, unsigned int val);
unsigned int d_type_rpc2h(unsigned int d_type);
unsigned int d_type_h2rpc(unsigned int d_type);
const char* d_type_rpc2str(rpc_d_type type);
unsigned int dlopen_flags_rpc2h(unsigned int flags);
unsigned int dlopen_flags_h2rpc(unsigned int flags);
static rpc_errno errno_h2rpc(int host_errno_val);
static const char* errno_rpc2str(rpc_errno rpc_errno_val);
unsigned int fcntl_flags_rpc2h(unsigned int flags);
unsigned int fcntl_flags_h2rpc(unsigned int flags);
const char* fcntl_rpc2str(rpc_fcntl_command cmd);
int fcntl_rpc2h(rpc_fcntl_command cmd);
const char* lseek_mode_rpc2str(rpc_lseek_mode mode);
int lseek_mode_rpc2h(rpc_lseek_mode mode);
rpc_lseek_mode lseek_mode_h2rpc(int mode);
unsigned int splice_flags_rpc2h(rpc_splice_flags mode);
unsigned int hwtstamp_instr_rpc2h(unsigned int instrs);
unsigned int hwtstamp_instr_h2rpc(unsigned int instrs);
int hwtstamp_tx_types_rpc2h(rpc_hwtstamp_tx_types type);
rpc_hwtstamp_tx_types hwtstamp_tx_types_h2rpc(int type);
const char* hwtstamp_tx_types_rpc2str(rpc_hwtstamp_tx_types type);
unsigned int hwtstamp_tx_types_flags_h2rpc(unsigned int flags);
te_errno hwtstamp_tx_types_flags_rpc2te_str(unsigned int flags, te_string* str);
int hwtstamp_rx_filters_rpc2h(rpc_hwtstamp_rx_filters filter);
rpc_hwtstamp_rx_filters hwtstamp_rx_filters_h2rpc(int filter);
const char* hwtstamp_rx_filters_rpc2str(rpc_hwtstamp_rx_filters filter);
unsigned int hwtstamp_rx_filters_flags_h2rpc(unsigned int flags);
te_errno hwtstamp_rx_filters_flags_rpc2te_str(unsigned int flags, te_string* str);
unsigned int if_fl_rpc2h(unsigned int flags);
unsigned int if_fl_h2rpc(unsigned int flags);
unsigned int arp_fl_rpc2h(unsigned int flags);
unsigned int arp_fl_h2rpc(unsigned int flags);
int ai_flags_rpc2h(rpc_ai_flags flags);
rpc_ai_flags ai_flags_h2rpc(int flags);
rpc_ai_rc ai_rc_h2rpc(int rc);
const char* pthread_cancelstate_rpc2str(rpc_pthread_cancelstate state);
int pthread_cancelstate_rpc2h(rpc_pthread_cancelstate state);
rpc_pthread_cancelstate pthread_cancelstate_h2rpc(int state);
const char* pthread_canceltype_rpc2str(rpc_pthread_canceltype type);
int pthread_canceltype_rpc2h(rpc_pthread_canceltype type);
rpc_pthread_canceltype pthread_canceltype_h2rpc(int type);
const char* signum_rpc2str(rpc_signum s);
int signum_rpc2h(rpc_signum s);
rpc_signum signum_h2rpc(int s);
const char* si_code_rpc2str(rpc_si_code si);
int si_code_rpc2h(rpc_si_code si);
rpc_si_code si_code_h2rpc(rpc_signum s, int si);
const char* sigev_notify_rpc2str(rpc_sigev_notify notify);
int sigev_notify_rpc2h(rpc_sigev_notify notify);
rpc_sigev_notify sigev_notify_h2rpc(int notify);
int sighow_rpc2h(rpc_sighow how);
unsigned int sigaction_flags_rpc2h(unsigned int flags);
unsigned int sigaction_flags_h2rpc(unsigned int flags);
unsigned int sigaltstack_flags_rpc2h(rpc_ss_flags flags);
rpc_ss_flags sigaltstack_flags_h2rpc(unsigned int flags);
const char* tarpc_sigevent2str(const tarpc_sigevent* sigevent);
static const char* rpc_epoll_ctl_op2str(int op);
unsigned int epoll_event_rpc2h(unsigned int events);
unsigned int epoll_event_h2rpc(unsigned int events);
unsigned int epoll_flags_rpc2h(unsigned int flags);
unsigned int epoll_flags_h2rpc(unsigned int flags);
unsigned int prot_flags_rpc2h(unsigned int flags);
unsigned int prot_flags_h2rpc(unsigned int flags);
unsigned int map_flags_rpc2h(unsigned int flags);
unsigned int map_flags_h2rpc(unsigned int flags);
const char* madv_value_rpc2str(rpc_madv_value value);
int madv_value_rpc2h(rpc_madv_value value);
rpc_madv_value madv_value_h2rpc(int value);
unsigned int poll_event_rpc2h(unsigned int events);
unsigned int poll_event_h2rpc(unsigned int events);
static const char* iomux2str(iomux_func iomux);
static int str2iomux(const char* iomux);
const char* rlimit_resource_rpc2str(rpc_rlimit_resource resource);
int rlimit_resource_rpc2h(rpc_rlimit_resource resource);
rpc_rlimit_resource rlimit_resource_h2rpc(int resource);
const char* scm_tstamp_rpc2str(rpc_scm_tstamp type);
size_t tarpc_cmsg_data_len(tarpc_cmsghdr* rpc_cmsg);
size_t tarpc_cmsg_total_len(tarpc_cmsghdr* rpc_cmsg, unsigned int num);
te_errno cmsg_data_h2rpc(int level, int type, uint8_t* data, int len, tarpc_cmsghdr* rpc_cmsg);
te_errno cmsg_data_rpc2h(tarpc_cmsghdr* rpc_cmsg, uint8_t* data, int* len);
te_errno msg_control_h2rpc(uint8_t* cmsg_buf, size_t cmsg_len, tarpc_cmsghdr** rpc_cmsg, unsigned int* rpc_cmsg_count, uint8_t** tail, unsigned int* tail_len);
te_errno msg_control_rpc2h(tarpc_cmsghdr* rpc_cmsg, unsigned int rpc_cmsg_count, uint8_t* tail, unsigned int tail_len, uint8_t* cmsg_buf, size_t* cmsg_len);
const char* domain_rpc2str(rpc_socket_domain domain);
int domain_rpc2h(rpc_socket_domain domain);
rpc_socket_domain domain_h2rpc(int domain);
const char* addr_family_rpc2str(rpc_socket_addr_family addr_family);
int addr_family_rpc2h(rpc_socket_addr_family addr_family);
rpc_socket_addr_family addr_family_h2rpc(int addr_family);
const char* socktype_rpc2str(rpc_socket_type type);
int socktype_rpc2h(rpc_socket_type type);
rpc_socket_type socktype_h2rpc(int type);
int socket_flags_rpc2h(rpc_socket_flags flags);
rpc_socket_flags socket_flags_h2rpc(int flags);
const char* proto_rpc2str(rpc_socket_proto proto);
int proto_rpc2h(rpc_socket_proto proto);
rpc_socket_proto proto_h2rpc(int proto);
const char* shut_how_rpc2str(rpc_shut_how how);
unsigned int send_recv_flags_rpc2h(unsigned int flags);
unsigned int send_recv_flags_h2rpc(unsigned int flags);
const char* send_function_tarpc2str(tarpc_send_function func);
const char* mtu_discover_arg_rpc2str(rpc_mtu_discover_arg arg);
int mtu_discover_arg_rpc2h(rpc_mtu_discover_arg opt);
rpc_mtu_discover_arg mtu_discover_arg_h2rpc(int arg);
const char* sockopt_rpc2str(rpc_sockopt opt);
int sockopt_rpc2h(rpc_sockopt opt);
rpc_sockopt sockopt_h2rpc(int opt_type, int opt);
rpc_sockopt cmsg_type_h2rpc(int level, int type);
bool sockopt_is_boolean(rpc_sockopt opt);
const char* tcp_state_rpc2str(rpc_tcp_state st);
rpc_tcp_state tcp_state_str2rpc(const char* s);
int tcp_state_rpc2h(rpc_tcp_state st);
rpc_tcp_state tcp_state_h2rpc(int st);
unsigned int tcpi_options_rpc2h(unsigned int flags);
unsigned int tcpi_options_h2rpc(unsigned int flags);
const char* tcp_ca_state_rpc2str(rpc_tcp_ca_state st);
int tcp_ca_state_rpc2h(rpc_tcp_ca_state st);
rpc_tcp_ca_state tcp_ca_state_h2rpc(int st);
const char* socklevel_rpc2str(rpc_socklevel level);
int socklevel_rpc2h(rpc_socklevel level);
rpc_socklevel socklevel_h2rpc(int level);
rpc_socklevel rpc_sockopt2level(rpc_sockopt opt);
const char* ioctl_rpc2str(rpc_ioctl_code code);
int ioctl_rpc2h(rpc_ioctl_code code);
struct sockaddr* sockaddr_to_te_af(const struct sockaddr* addr, tarpc_sa** rpc_sa);
void sockaddr_raw2rpc(const void* buf, socklen_t len, tarpc_sa* rpc);
void sockaddr_input_h2rpc(const struct sockaddr* sa, tarpc_sa* rpc);
void sockaddr_output_h2rpc(const struct sockaddr* sa, socklen_t rlen, socklen_t len, tarpc_sa* rpc);
te_errno sockaddr_rpc2h(const tarpc_sa* rpc, struct sockaddr* sa, socklen_t salen, struct sockaddr** sa_out, socklen_t* salen_out);
const char* sockaddr_h2str(const struct sockaddr* addr);
const char* sockaddr_h2str_buf(const struct sockaddr* addr, char* buf, size_t len);
const char* addr_family_sockaddr_str(rpc_socket_addr_family addr_family);
RPCBITMAP2STR(ethtool_flags, ETHTOOL_FLAGS_MAPPING_LIST);
uint32_t ethtool_flags_rpc2h(uint32_t flags);
uint32_t ethtool_flags_h2rpc(uint32_t flags);
RPCBITMAP2STR(ethtool_reset_flags_aux, ETHTOOL_RESET_FLAGS_MAPPING_LIST);
const char* ethtool_reset_flags_rpc2str(uint32_t flags);
uint32_t ethtool_reset_flags_rpc2h(uint32_t flags);
uint32_t ethtool_reset_flags_h2rpc(uint32_t flags);
const char* ethtool_cmd_rpc2str(rpc_ethtool_cmd ethtool_cmd);
static const char* ethtool_cmd2str(rpc_ethtool_cmd ethtool_cmd);
int ethtool_cmd_rpc2h(rpc_ethtool_cmd ethtool_cmd);
rpc_ethtool_cmd ethtool_cmd_h2rpc(int ethtool_cmd);
tarpc_ethtool_type ethtool_cmd2type(rpc_ethtool_cmd cmd);
const char* eth_proto_rpc2str(rpc_eth_proto proto);
int eth_proto_rpc2h(rpc_eth_proto proto);
rpc_eth_proto eth_proto_h2rpc(unsigned int proto);
const char* arp_hardware_rpc2str(rpc_arp_hardware hardware);
unsigned int arp_hardware_rpc2h(rpc_arp_hardware hardware);
rpc_arp_hardware arp_hardware_h2rpc(unsigned int hardware);
const char* packet_type_rpc2str(rpc_packet_type type);
unsigned int packet_type_rpc2h(rpc_packet_type type);
rpc_packet_type packet_type_h2rpc(unsigned int type);
unsigned int file_mode_flags_rpc2h(unsigned int flags);
int access_mode_flags_rpc2h(int mode);
const char* sysinfo_command_rpc2str(rpc_sysinfo_command resource);
int sysinfo_command_rpc2h(rpc_sysinfo_command resource);
rpc_sysinfo_command sysinfo_command_h2rpc(int command);
static int timeval_h2rpc(const struct timeval* tv_h, struct tarpc_timeval* tv_rpc);
static int timeval_rpc2h(const struct tarpc_timeval* tv_rpc, struct timeval* tv_h);
static int timezone_h2rpc(const struct timezone* tz_h, struct tarpc_timezone* tz_rpc);
static int timezone_rpc2h(const struct tarpc_timezone* tz_rpc, struct timezone* tz_h);
int clock_id_rpc2h(rpc_clock_id id);
const char* clock_id_rpc2str(rpc_clock_id id);
unsigned int adj_mode_flags_rpc2h(unsigned int flags);
unsigned int adj_mode_flags_h2rpc(unsigned int flags);
unsigned int timex_status_flags_rpc2h(unsigned int flags);
unsigned int timex_status_flags_h2rpc(unsigned int flags);
te_errno timex_tarpc2te_str(const tarpc_timex* val, te_string* str);
int waitpid_opts_rpc2h(rpc_waitpid_opts opts);
const char* wait_status_flag_rpc2str(rpc_wait_status_flag flag);
rpc_wait_status wait_status_h2rpc(int st);
const char* sysconf_name_rpc2str(rpc_sysconf_name name);
int sysconf_name_rpc2h(rpc_sysconf_name name);
rpc_sysconf_name sysconf_name_h2rpc(int name);
int preadv2_pwritev2_flags_rpc2h(rpc_preadv2_pwritev2_flags flags);
rpc_preadv2_pwritev2_flags preadv2_pwritev2_flags_h2rpc(int flags);
const char* network_event_rpc2str(rpc_network_event events);
unsigned int network_event_rpc2h(rpc_network_event flags);
rpc_network_event network_event_h2rpc(unsigned int flags);
unsigned int transmit_file_flags_rpc2h(rpc_transmit_file_flags flags);
unsigned int servicetype_flags_rpc2h(rpc_servicetype_flags flags);
rpc_servicetype_flags servicetype_flags_h2rpc(unsigned int flags);
unsigned int open_sock_flags_rpc2h(unsigned int flags);
unsigned int join_leaf_flags_rpc2h(unsigned int flags);
const char* join_leaf_rpc2str(rpc_join_leaf_flags open_code);
static const char* neg_errno_rpc2str(int nerrno);
int rpc_rte_mk_flow_rule_components(rcf_rpc_server* rpcs, const asn_value* flow_rule_components, rpc_rte_flow_attr_p* attr, rpc_rte_flow_item_p* pattern, rpc_rte_flow_action_p* actions);
void rpc_rte_free_flow_rule(rcf_rpc_server* rpcs, rpc_rte_flow_attr_p attr, rpc_rte_flow_item_p pattern, rpc_rte_flow_action_p actions);
int rpc_rte_insert_flow_rule_items(rcf_rpc_server* rpcs, rpc_rte_flow_item_p* pattern, const asn_value* items, int index);
int rpc_rte_flow_prepend_opaque_actions(rcf_rpc_server* rpcs, rpc_rte_flow_action_p flow_actions, rpc_rte_flow_action_p opaque_actions, unsigned int nb_opaque_actions, rpc_rte_flow_action_p* united_actions);
void rpc_rte_flow_release_united_actions(rcf_rpc_server* rpcs, rpc_rte_flow_action_p united_actions);
int rpc_rte_flow_prepend_opaque_items(rcf_rpc_server* rpcs, rpc_rte_flow_item_p flow_items, rpc_rte_flow_item_p opaque_items, unsigned int nb_opaque_items, rpc_rte_flow_item_p* united_items);
void rpc_rte_flow_release_united_items(rcf_rpc_server* rpcs, rpc_rte_flow_item_p united_items);
int rpc_dpdk_find_representors(rcf_rpc_server* rpcs, unsigned int* n_rep, uint16_t** rep_port_ids);
int rpc_rte_eth_representor_info_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_representor_info* info);
static bool dpdk_reuse_rpcs(void);
te_errno tapi_rte_lcore_mask_set_bit(lcore_mask_t* mask, unsigned int bit);
int rpc_rte_eal_init(rcf_rpc_server* rpcs, int argc, char** argv);
te_errno tapi_rte_make_eal_args(tapi_env* env, rcf_rpc_server* rpcs, const char* program_name, const lcore_mask_t* lcore_mask_override, int argc, const char** argv, int* out_argc, char*** out_argv);
te_errno tapi_rte_eal_init(tapi_env* env, rcf_rpc_server* rpcs, int argc, const char** argv);
te_errno tapi_rte_eal_fini(tapi_env* env, rcf_rpc_server* rpcs);
const char* tarpc_rte_proc_type_t2str(enum tarpc_rte_proc_type_t val);
enum tarpc_rte_proc_type_t rpc_rte_eal_process_type(rcf_rpc_server* rpcs);
int rpc_dpdk_get_version(rcf_rpc_server* rpcs);
int rpc_rte_eal_hotplug_add(rcf_rpc_server* rpcs, const char* busname, const char* devname, const char* devargs);
te_errno tapi_rte_eal_hotplug_add(rcf_rpc_server* rpcs, const char* busname, const char* devname, const char* devargs);
int rpc_rte_eal_hotplug_remove(rcf_rpc_server* rpcs, const char* busname, const char* devname);
te_errno tapi_rte_eal_hotplug_remove(rcf_rpc_server* rpcs, const char* busname, const char* devname);
int rpc_rte_epoll_wait(rcf_rpc_server* rpcs, int epfd, struct tarpc_rte_epoll_event* events, int maxevents, int timeout);
te_errno tapi_rte_get_dev_args(const char* ta, const char* vendor, const char* device, char** arg_list);
te_errno tapi_rte_get_nb_required_service_cores(const char* ta, const char* vendor, const char* device, unsigned int* nb_cores);
te_errno tapi_eal_get_nb_required_service_cores_rpcs(tapi_env* env, rcf_rpc_server* rpcs, unsigned int* nb_cores);
te_errno tapi_rte_get_dev_args_by_pci_addr(const char* ta, const char* pci_addr, char** arg_list);
te_errno tapi_rte_get_numa_node(tapi_env* env, rcf_rpc_server* rpcs, int* numa_node);
uint32_t tapi_rpc_rte_eth_link_speeds_str2val(const char* str);
void rpc_rte_eth_dev_info_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_dev_info* dev_info);
int rpc_rte_eth_dev_configure(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t nb_rx_queue, uint16_t nb_tx_queue, const struct tarpc_rte_eth_conf* eth_conf);
struct tarpc_rte_eth_conf* tapi_rpc_rte_eth_make_eth_conf(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_conf* eth_conf);
int tapi_rpc_rte_eth_dev_configure_def(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t nb_rx_queue, uint16_t nb_tx_queue);
void rpc_rte_eth_dev_close(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_dev_reset(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_dev_start(rcf_rpc_server* rpcs, uint16_t port_id);
void rpc_rte_eth_dev_stop(rcf_rpc_server* rpcs, uint16_t port_id);
void tapi_rpc_rte_eth_dev_stop(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_tx_queue_setup(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, struct tarpc_rte_eth_txconf* tx_conf);
int rpc_rte_eth_rx_queue_setup(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, struct tarpc_rte_eth_rxconf* rx_conf, rpc_rte_mempool_p mp);
int rpc_rte_eth_dev_rx_intr_enable(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id);
int rpc_rte_eth_dev_rx_intr_disable(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id);
int rpc_rte_eth_dev_rx_intr_ctl_q(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, int epfd, enum tarpc_rte_intr_op op, uint64_t data);
uint16_t rpc_rte_eth_tx_burst(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, rpc_rte_mbuf_p* tx_pkts, uint16_t nb_pkts);
uint16_t rpc_rte_eth_tx_prepare(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, rpc_rte_mbuf_p* tx_pkts, uint16_t nb_pkts);
uint16_t rpc_rte_eth_rx_burst(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, rpc_rte_mbuf_p* rx_pkts, uint16_t nb_pkts);
int rpc_rte_eth_dev_set_link_up(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_dev_set_link_down(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_promiscuous_enable(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_promiscuous_disable(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_promiscuous_get(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_allmulticast_enable(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_allmulticast_disable(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_allmulticast_get(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_dev_get_mtu(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t* mtu);
int rpc_rte_eth_dev_set_mtu(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t mtu);
int rpc_rte_eth_dev_vlan_filter(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t vlan_id, int on);
int rpc_rte_eth_dev_set_vlan_strip_on_queue(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t rx_queue_id, int on);
int rpc_rte_eth_dev_set_vlan_ether_type(rcf_rpc_server* rpcs, uint16_t port_id, enum tarpc_rte_vlan_type vlan_type, uint16_t tag_type);
int rpc_rte_eth_dev_set_vlan_offload(rcf_rpc_server* rpcs, uint16_t port_id, tarpc_int offload_mask);
int rpc_rte_eth_dev_get_vlan_offload(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_dev_set_vlan_pvid(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t pvid, int on);
int rpc_rte_eth_rx_queue_count(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id);
int rpc_rte_eth_rx_descriptor_status(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, uint16_t offset);
int rpc_rte_eth_tx_descriptor_status(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, uint16_t offset);
int rpc_rte_eth_dev_socket_id(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_dev_is_valid_port(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_dev_rx_queue_start(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id);
int rpc_rte_eth_dev_rx_queue_stop(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id);
int rpc_rte_eth_dev_tx_queue_start(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id);
int rpc_rte_eth_dev_tx_queue_stop(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id);
void rpc_rte_eth_macaddr_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_ether_addr* mac_addr);
int rpc_rte_eth_dev_default_mac_addr_set(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_ether_addr* mac_addr);
int rpc_rte_eth_rx_queue_info_get(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, struct tarpc_rte_eth_rxq_info* qinfo);
int rpc_rte_eth_tx_queue_info_get(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t queue_id, struct tarpc_rte_eth_txq_info* qinfo);
int rpc_rte_eth_dev_rss_reta_query(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_rss_reta_entry64* reta_conf, uint16_t reta_size);
int rpc_rte_eth_dev_rss_reta_update(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_rss_reta_entry64* reta_conf, uint16_t reta_size);
int rpc_rte_eth_dev_rss_hash_conf_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_rss_conf* rss_conf);
int rpc_rte_eth_dev_flow_ctrl_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_fc_conf* fc_conf);
int rpc_rte_eth_dev_flow_ctrl_set(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_fc_conf* fc_conf);
te_errno tapi_rpc_add_mac_as_octstring2kvpair(rcf_rpc_server* rpcs, uint16_t port_id, te_kvpair_h* head, const char* name);
int rpc_rte_eth_dev_rss_hash_update(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_rss_conf* rss_conf);
void rpc_rte_eth_link_get_nowait(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_link* eth_link);
void rpc_rte_eth_link_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_link* eth_link);
int rpc_dpdk_eth_await_link_up(rcf_rpc_server* rpcs, uint16_t port_id, unsigned int nb_attempts, unsigned int wait_int_ms, unsigned int after_up_ms);
int rpc_rte_eth_stats_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_stats* stats);
void rpc_rte_eth_stats_reset(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_xstats_get_names(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_xstat_name* xstats_names, unsigned int size);
int rpc_rte_eth_xstats_get(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_xstat* xstats, unsigned int n);
void rpc_rte_eth_xstats_reset(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_eth_xstats_get_by_id(rcf_rpc_server* rpcs, uint16_t port_id, uint64_t* ids, uint64_t* values, unsigned int n);
int rpc_rte_eth_xstats_get_names_by_id(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_xstat_name* xstat_names, unsigned int size, uint64_t* ids);
int rpc_rte_eth_dev_get_supported_ptypes(rcf_rpc_server* rpcs, uint16_t port_id, uint32_t ptype_mask, uint32_t* ptypes, int num);
int rpc_rte_eth_dev_set_mc_addr_list(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_ether_addr* mc_addr_set, uint32_t nb_mc_addr);
int rpc_rte_eth_dev_fw_version_get(rcf_rpc_server* rpcs, uint16_t port_id, char* fw_version, size_t fw_size);
int rpc_rte_eth_dev_udp_tunnel_port_add(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_udp_tunnel* tunnel_udp);
int rpc_rte_eth_dev_udp_tunnel_port_delete(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_udp_tunnel* tunnel_udp);
int rpc_rte_eth_dev_get_port_by_name(rcf_rpc_server* rpcs, const char* name, uint16_t* port_id);
int rpc_rte_eth_dev_get_name_by_port(rcf_rpc_server* rpcs, uint16_t port_id, char* name);
char* rpc_rte_eth_dev_rx_offload_name(rcf_rpc_server* rpcs, uint64_t offload);
char* rpc_rte_eth_dev_tx_offload_name(rcf_rpc_server* rpcs, uint64_t offload);
int rpc_rte_eth_rx_metadata_negotiate(rcf_rpc_server* rpcs, uint16_t port_id, uint64_t* features);
const char* tarpc_rte_eth_tunnel_type2str(enum tarpc_rte_eth_tunnel_type tunnel_type);
const char* tarpc_rte_eth_dev_rss_types2str(te_log_buf* tlbp, uint64_t rss_flow_types);
int rpc_rte_eth_fec_get_capability(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_eth_fec_capa* speed_fec_capa, unsigned int num);
int rpc_rte_eth_fec_get(rcf_rpc_server* rpcs, uint16_t port_id, uint32_t* fec_capa);
int rpc_rte_eth_fec_set(rcf_rpc_server* rpcs, uint16_t port_id, uint32_t fec_capa);
int rpc_rte_eth_dev_get_reg_info(rcf_rpc_server* rpcs, uint16_t port_id, struct tarpc_rte_dev_reg_info* info);
void tapi_rpc_rte_eth_dev_get_reg_info(rcf_rpc_server* rpcs, uint16_t port_id, uint32_t offset, uint32_t length);
void tapi_rpc_rte_eth_dev_dump_reg_info(rcf_rpc_server* rpcs, uint16_t port_id);
int rpc_rte_flow_validate(rcf_rpc_server* rpcs, uint16_t port_id, rpc_rte_flow_attr_p attr, rpc_rte_flow_item_p pattern, rpc_rte_flow_action_p actions, tarpc_rte_flow_error* error);
rpc_rte_flow_p rpc_rte_flow_create(rcf_rpc_server* rpcs, uint16_t port_id, rpc_rte_flow_attr_p attr, rpc_rte_flow_item_p pattern, rpc_rte_flow_action_p actions, tarpc_rte_flow_error* error);
int rpc_rte_flow_destroy(rcf_rpc_server* rpcs, uint16_t port_id, rpc_rte_flow_p flow, tarpc_rte_flow_error* error);
int rpc_rte_flow_query(rcf_rpc_server* rpcs, uint16_t port_id, rpc_rte_flow_p flow, rpc_rte_flow_action_p action, tarpc_rte_flow_query_data* data, tarpc_rte_flow_error* error);
int rpc_rte_flow_flush(rcf_rpc_server* rpcs, uint16_t port_id, tarpc_rte_flow_error* error);
int rpc_rte_flow_isolate(rcf_rpc_server* rpcs, uint16_t port_id, int set, struct tarpc_rte_flow_error* error);
int rpc_rte_flow_tunnel_decap_set(rcf_rpc_server* rpcs, uint16_t port_id, const struct tarpc_rte_flow_tunnel* tunnel, rpc_rte_flow_action_p* actions, uint32_t* num_of_actions, struct tarpc_rte_flow_error* error);
int rpc_rte_flow_tunnel_match(rcf_rpc_server* rpcs, uint16_t port_id, const struct tarpc_rte_flow_tunnel* tunnel, rpc_rte_flow_item_p* items, uint32_t* num_of_items, struct tarpc_rte_flow_error* error);
int rpc_rte_flow_get_restore_info(rcf_rpc_server* rpcs, uint16_t port_id, rpc_rte_mbuf_p m, struct tarpc_rte_flow_restore_info* info, struct tarpc_rte_flow_error* error);
int rpc_rte_flow_tunnel_action_decap_release(rcf_rpc_server* rpcs, uint16_t port_id, rpc_rte_flow_action_p actions, uint32_t num_of_actions, struct tarpc_rte_flow_error* error);
int rpc_rte_flow_tunnel_item_release(rcf_rpc_server* rpcs, uint16_t port_id, rpc_rte_flow_item_p items, uint32_t num_of_items, struct tarpc_rte_flow_error* error);
int rpc_rte_flow_pick_transfer_proxy(rcf_rpc_server* rpcs, uint16_t port_id, uint16_t* proxy_port_id, tarpc_rte_flow_error* error);
rpc_rte_mempool_p rpc_rte_pktmbuf_pool_create(rcf_rpc_server* rpcs, const char* name, uint32_t n, uint32_t cache_size, uint16_t priv_size, uint16_t data_room_size, int socket_id);
rpc_rte_mempool_p rpc_rte_pktmbuf_pool_create_by_ops(rcf_rpc_server* rpcs, const char* name, uint32_t n, uint32_t cache_size, uint16_t priv_size, uint16_t data_room_size, int socket_id, const char* ops_name);
rpc_rte_mbuf_p rpc_rte_pktmbuf_alloc(rcf_rpc_server* rpcs, rpc_rte_mempool_p mp);
void rpc_rte_pktmbuf_free(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
void rpc_rte_pktmbuf_free_array(rcf_rpc_server* rpcs, rpc_rte_mbuf_p* mbufs, unsigned int count);
int rpc_rte_pktmbuf_append_data(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, const uint8_t* buf, size_t len);
int rpc_rte_pktmbuf_read_data(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, size_t offset, size_t count, uint8_t* buf, size_t rbuflen);
rpc_rte_mbuf_p rpc_rte_pktmbuf_clone(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, rpc_rte_mempool_p mp);
int rpc_rte_pktmbuf_prepend_data(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, uint8_t* buf, size_t len);
rpc_rte_mbuf_p rpc_rte_pktmbuf_get_next(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
uint32_t rpc_rte_pktmbuf_get_pkt_len(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
const char* rpc_rte_mbufs2str(te_log_buf* tlbp, const rpc_rte_mbuf_p* mbufs, unsigned int count, rcf_rpc_server* rpcs);
int rpc_rte_pktmbuf_alloc_bulk(rcf_rpc_server* rpcs, rpc_rte_mempool_p mp, rpc_rte_mbuf_p* bulk, unsigned int count);
int rpc_rte_pktmbuf_chain(rcf_rpc_server* rpcs, rpc_rte_mbuf_p head, rpc_rte_mbuf_p tail);
uint16_t rpc_rte_pktmbuf_get_nb_segs(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
uint16_t rpc_rte_pktmbuf_get_port(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
void rpc_rte_pktmbuf_set_port(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, uint16_t port);
uint16_t rpc_rte_pktmbuf_get_data_len(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
uint16_t rpc_rte_pktmbuf_get_vlan_tci(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
void rpc_rte_pktmbuf_set_vlan_tci(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, uint16_t vlan_tci);
uint16_t rpc_rte_pktmbuf_get_vlan_tci_outer(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
void rpc_rte_pktmbuf_set_vlan_tci_outer(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, uint16_t vlan_tci_outer);
uint64_t rpc_rte_pktmbuf_get_flags(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
int rpc_rte_pktmbuf_set_flags(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, uint64_t ol_flags);
rpc_rte_mempool_p rpc_rte_pktmbuf_get_pool(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
uint16_t rpc_rte_pktmbuf_headroom(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
uint16_t rpc_rte_pktmbuf_tailroom(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
int rpc_rte_pktmbuf_trim(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, uint16_t len);
uint16_t rpc_rte_pktmbuf_adj(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, uint16_t len);
void rpc_rte_pktmbuf_get_packet_type(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, struct tarpc_rte_pktmbuf_packet_type* p_type);
int rpc_rte_pktmbuf_set_packet_type(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, const struct tarpc_rte_pktmbuf_packet_type* p_type);
uint32_t rpc_rte_pktmbuf_get_rss_hash(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
uint32_t rpc_rte_pktmbuf_get_fdir_id(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
void rpc_rte_pktmbuf_get_tx_offload(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, struct tarpc_rte_pktmbuf_tx_offload* tx_offload);
void rpc_rte_pktmbuf_set_tx_offload(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, const struct tarpc_rte_pktmbuf_tx_offload* tx_offload);
void rpc_rte_pktmbuf_refcnt_update(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, int16_t v);
int rpc_rte_pktmbuf_redist_multi(rcf_rpc_server* rpcs, rpc_rte_mbuf_p* m, rpc_rte_mempool_p* mp_multi, unsigned int mp_multi_nb_items, struct tarpc_pktmbuf_seg_group* seg_groups, uint8_t nb_seg_groups);
int rpc_rte_pktmbuf_redist(rcf_rpc_server* rpcs, rpc_rte_mbuf_p* m, struct tarpc_pktmbuf_seg_group* seg_groups, uint8_t nb_seg_groups);
int rpc_rte_vlan_strip(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
int rpc_rte_pktmbuf_calc_packet_crc(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, bool crc_in_data, uint32_t* crc);
int rpc_rte_mk_mbuf_from_template(rcf_rpc_server* rpcs, const asn_value* template, rpc_rte_mempool_p mp, rpc_rte_mbuf_p** mbufs, unsigned int* count);
int rpc_rte_mbuf_match_pattern(rcf_rpc_server* rpcs, const asn_value* pattern, rpc_rte_mbuf_p* mbufs, unsigned int count, asn_value*** packets, unsigned int* matched);
int tapi_rte_mbuf_match_pattern_seq(rcf_rpc_server* rpcs, const asn_value* pattern, rpc_rte_mbuf_p* mbufs, unsigned int count, asn_value*** packets, unsigned int* matched);
int rpc_rte_mbuf_match_tx_rx_pre(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m);
int rpc_rte_mbuf_match_tx_rx(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m_tx, rpc_rte_mbuf_p* rx_burst, unsigned int nb_rx, struct tarpc_rte_mbuf_report* reportp);
rpc_rte_mempool_p rpc_rte_mempool_lookup(rcf_rpc_server* rpcs, const char* name);
unsigned int rpc_rte_mempool_in_use_count(rcf_rpc_server* rpcs, rpc_rte_mempool_p mp);
void rpc_rte_mempool_free(rcf_rpc_server* rpcs, rpc_rte_mempool_p mp);
void rpc_rte_mempool_free_all(rcf_rpc_server* rpcs);
rpc_rte_ring_p rpc_rte_ring_create(rcf_rpc_server* rpcs, const char* name, unsigned count, int socket_id, unsigned flags);
void rpc_rte_ring_free(rcf_rpc_server* rpcs, rpc_rte_ring_p ring);
int rte_ring_enqueue_mbuf(rcf_rpc_server* rpcs, rpc_rte_ring_p ring, rpc_rte_mbuf_p m);
rpc_rte_mbuf_p rte_ring_dequeue_mbuf(rcf_rpc_server* rpcs, rpc_rte_ring_p ring);
rpc_rte_mbuf_p tapi_rte_mk_mbuf_eth(rcf_rpc_server* rpcs, rpc_rte_mempool_p mp, const uint8_t* dst_addr, const uint8_t* src_addr, const uint16_t ether_type, const uint8_t* payload, size_t len);
rpc_rte_mbuf_p tapi_rte_mk_mbuf_ip(rcf_rpc_server* rpcs, rpc_rte_mempool_p mp, const uint8_t* eth_dst_addr, const uint8_t* eth_src_addr, const struct sockaddr* ip_dst_addr, const struct sockaddr* ip_src_addr, const uint8_t next_hdr, const uint8_t* payload, const size_t payload_len, const int cksum_opt);
rpc_rte_mbuf_p tapi_rte_mk_mbuf_udp(rcf_rpc_server* rpcs, rpc_rte_mempool_p mp, const uint8_t* eth_dst_addr, const uint8_t* eth_src_addr, const struct sockaddr* udp_dst_addr, const struct sockaddr* udp_src_addr, const uint8_t* payload, const size_t payload_len, const int cksum_opt);
rpc_rte_mbuf_p tapi_rte_mk_mbuf_tcp(rcf_rpc_server* rpcs, rpc_rte_mempool_p mp, const uint8_t* eth_dst_addr, const uint8_t* eth_src_addr, const struct sockaddr* tcp_dst_addr, const struct sockaddr* tcp_src_addr, const uint32_t th_seq, const uint32_t th_ack, const uint8_t th_off, const uint8_t th_flags, const uint16_t th_win, const uint16_t th_urp, const uint8_t* payload, const size_t payload_len, const int cksum_opt);
uint8_t* tapi_rte_get_mbuf_data(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, size_t offset, size_t* bytes_read);
void tapi_rte_mk_mbuf_mk_ptrn_by_tmpl(rcf_rpc_server* rpcs, asn_value* template, rpc_rte_mempool_p mp, send_transform* transform, rpc_rte_mbuf_p** mbufs_out, unsigned int* n_mbufs_out, asn_value** ptrn_out);
void tapi_rte_pktmbuf_random_redist(rcf_rpc_server* rpcs, rpc_rte_mempool_p* mp_multi, unsigned int mp_multi_nb_items, rpc_rte_mbuf_p* packets, unsigned int nb_packets);
void tapi_rte_mk_mbufs_by_tmpl_get_pkts(rcf_rpc_server* rpcs, const asn_value* tmpl, rpc_rte_mempool_p mp, rpc_rte_mbuf_p** mbufs, unsigned int* nb_mbufs, asn_value*** pkts, unsigned int* nb_pkts);
te_errno tapi_rte_mbuf_add_csap_layer(asn_value** csap_spec, const char* pkt_ring, const char* pkt_pool);
static void neg_errno_h2rpc(int* retval);
static te_errno rpc_dpdk_bitmask64_convert(uint64_t from_bm, const te_enum_bitmask_conv conv_map[], bool rte2rpc, uint64_t* to_bm);
static te_errno rpc_dpdk_bitmask64_rpc2rte(uint64_t rpc_bm, const te_enum_bitmask_conv conv_map[], uint64_t* rte_bm);
static uint64_t rpc_dpdk_bitmask64_rte2rpc(uint64_t rte_bm, const te_enum_bitmask_conv conv_map[], unsigned int unknown_bit);
static te_errno rpc_dpdk_bitmask32_rpc2rte(uint32_t rpc_bm, const te_enum_bitmask_conv conv_map[], uint32_t* rte_bm);
static uint32_t rpc_dpdk_bitmask32_rte2rpc(uint32_t rte_bm, const te_enum_bitmask_conv conv_map[], unsigned int unknown_bit);
static te_errno rpc_dpdk_bitmask16_rpc2rte(uint16_t rpc_bm, const te_enum_bitmask_conv conv_map[], uint16_t* rte_bm);
static uint32_t rpc_dpdk_bitmask16_rte2rpc(uint16_t rte_bm, const te_enum_bitmask_conv conv_map[], unsigned int unknown_bit);
iomux_return_iterator iomux_return_iterate(iomux_func iomux, iomux_state* st, iomux_return* ret, iomux_return_iterator it, int* p_fd, int* p_events);
int iomux_create_state(iomux_func iomux, iomux_funcs* funcs, iomux_state* state);
int iomux_close(iomux_func iomux, iomux_funcs* funcs, iomux_state* state);
int iomux_add_fd(iomux_func iomux, iomux_funcs* funcs, iomux_state* state, int fd, int events);
int iomux_wait(iomux_func iomux, iomux_funcs* funcs, iomux_state* state, iomux_return* ret, int timeout);
int iomux_find_func(tarpc_lib_flags lib_flags, iomux_func* iomux, iomux_funcs* funcs);
int iomux_mod_fd(iomux_func iomux, iomux_funcs* funcs, iomux_state* state, int fd, int events);
int iomux_fd_is_writable(int fd_exp, iomux_func iomux, iomux_state* iomux_st, iomux_return* iomux_ret, int rc, bool* writable);
static void iomux_state_init_invalid(iomux_func iomux, iomux_state* state);
static iomux_func get_default_iomux(void);
void rcf_pch_mem_init(void);
rpc_ptr rcf_pch_mem_index_alloc(void* mem, rpc_ptr_id_namespace ns, const char* caller_func, int caller_line);
void rcf_pch_mem_alloc_set_offset(tarpc_int id, size_t offset);
te_errno rcf_pch_mem_index_free(rpc_ptr id, rpc_ptr_id_namespace ns, const char* caller_func, int caller_line);
te_errno rcf_pch_mem_index_free_mem(void* mem, rpc_ptr_id_namespace ns, const char* caller_func, int caller_line);
void* rcf_pch_mem_index_mem_to_ptr(rpc_ptr id, rpc_ptr_id_namespace ns, const char* caller_func, int caller_line);
void* rcf_pch_mem_base_ptr(rpc_ptr id);
te_errno rcf_pch_mem_index_ptr_to_mem_gen(void* mem, rpc_ptr_id_namespace ns, rpc_ptr* id);
rpc_ptr rcf_pch_mem_index_ptr_to_mem(void* mem, rpc_ptr_id_namespace ns, const char* caller_func, int caller_line);
rpc_ptr_id_namespace rcf_pch_mem_ns_generic(void);
te_errno rcf_pch_mem_ns_get_index(const char* ns_string, rpc_ptr_id_namespace* ns_id);
te_errno rcf_pch_mem_ns_get_string(rpc_ptr_id_namespace ns_id, const char** ns_string);
static te_errno rcf_pch_mem_ns_create_if_needed(rpc_ptr_id_namespace* ns_id, const char* ns_str, const char* caller_func, int caller_line);
static int shut_how_rpc2h(rpc_shut_how how);
bool tarpc_dynamic_library_loaded(void);
int tarpc_find_func(tarpc_lib_flags lib_flags, const char* name, api_func* func);
typedef STAILQ_HEAD(checked_arg_list, checked_arg);
void tarpc_init_checked_arg(checked_arg_list* list, uint8_t* real_arg, size_t len, size_t len_visible, const char* name);
te_errno tarpc_check_args(checked_arg_list* list);
void te_rpc_error_set_target(tarpc_out_arg* out_common);
void te_rpc_error_set(te_errno err, const char* msg, ...);
te_errno te_rpc_error_get_num(void);
int tarpc_mutex_lock(pthread_mutex_t* mutex);
int tarpc_mutex_unlock(pthread_mutex_t* mutex);
void tarpc_before_call(struct rpc_call_data* call, const char* id);
void tarpc_after_call(struct rpc_call_data* call);
void tarpc_call_unsupported(const char* name, void* out, size_t outsize, size_t common_offset);
te_errno tarpc_defer_call(deferred_call_list* list, uintptr_t jobid, rpc_call_data* call);
bool tarpc_has_deferred_calls(const deferred_call_list* list);
void tarpc_generic_service(deferred_call_list* list, rpc_call_data* call);
void* rcf_pch_rpc_server(const char* name);
void rcf_pch_rpc_server_argv(int argc, char** argv);
te_errno rpcserver_plugin_enable(const char* install, const char* action, const char* uninstall);
te_errno rpcserver_plugin_disable(void);
void signal_registrar(int signum);
void signal_registrar_siginfo(int signum, siginfo_t* siginfo, void* context);
void tarpc_close_fd_hooks_call(int fd);
int tarpc_close_fd_hook_register(tarpc_close_fd_hook* hook, void* cookie);
int tarpc_close_fd_hook_unregister(tarpc_close_fd_hook* hook, void* cookie);
int tarpc_call_close_with_hooks(api_func close_func, int fd);
te_errno tarpc_fill_buff_with_sequence(char* buf, int size, tarpc_pat_gen_arg* arg);
te_errno tarpc_fill_buff_with_sequence_lcg(char* buf, int size, tarpc_pat_gen_arg* arg);
void rpcs_iovec_tarpc2h(const struct tarpc_iovec* tarpc_iov, struct iovec* iov, size_t count, bool may_change, checked_arg_list* arglist);
te_errno rpcs_msghdr_tarpc2h(rpcs_msghdr_check_args_mode check_args, const struct tarpc_msghdr* tarpc_msg, rpcs_msghdr_helper* helper, struct msghdr* msg, checked_arg_list* arglist, const char* name_fmt, ...);
te_errno te_errno rpcs_msghdr_h2tarpc(const struct msghdr* msg, const rpcs_msghdr_helper* helper, struct tarpc_msghdr* tarpc_msg);
void rpcs_msghdr_helper_clean(rpcs_msghdr_helper* h, struct msghdr* msg);
te_errno rpcs_mmsghdrs_tarpc2h(rpcs_msghdr_check_args_mode check_args, const tarpc_mmsghdr* tarpc_mmsgs, unsigned int num, rpcs_msghdr_helper** helpers, struct mmsghdr** mmsgs, checked_arg_list* arglist);
te_errno rpcs_mmsghdrs_h2tarpc(const struct mmsghdr* mmsgs, const rpcs_msghdr_helper* helpers, struct tarpc_mmsghdr* tarpc_mmsgs, unsigned int num);
void rpcs_mmsghdrs_helpers_clean(rpcs_msghdr_helper* helpers, struct mmsghdr* mmsgs, unsigned int num);
te_errno rpc_transport_init(const char* tmp_path);
void rpc_transport_shutdown(void);
te_errno rpc_transport_connect_rpcserver(const char* name, rpc_transport_handle* p_handle);
te_errno rpc_transport_connect_ta(const char* name, rpc_transport_handle* p_handle);
void rpc_transport_close(rpc_transport_handle handle);
void rpc_transport_read_set_init(void);
void rpc_transport_read_set_add(rpc_transport_handle handle);
bool rpc_transport_read_set_wait(int timeout);
bool rpc_transport_is_readable(rpc_transport_handle handle);
te_errno rpc_transport_recv(rpc_transport_handle handle, uint8_t* buf, size_t* p_len, int timeout);
te_errno rpc_transport_send(rpc_transport_handle handle, const uint8_t* buf, size_t len);
rpc_info* rpc_find_info(const char* name);
int rpc_xdr_encode_call(const char* name, void* buf, size_t* buflen, void* objp);
int rpc_xdr_encode_result(const char* name, bool rc, void* buf, size_t* buflen, void* objp);
int rpc_xdr_decode_call(void* buf, size_t buflen, char* name, void** objp);
int rpc_xdr_decode_result(const char* name, void* buf, size_t buflen, void* objp);
te_errno rpc_xdr_inspect_call(const void* buf, size_t buflen, char* name, struct tarpc_in_arg* common);
te_errno rpc_xdr_inspect_result(const void* buf, size_t buflen, struct tarpc_out_arg* common);
void rpc_xdr_free(rpc_arg_func func, void* objp);
union tarpc_sa_data switch(tarpc_socket_addr_family type);
union tarpc_ethtool_data switch(tarpc_ethtool_type type);
union tarpc_cmsg_data switch(tarpc_cmsg_data_type type);
union tarpc_transmit_packet_source switch(tarpc_transmit_packet_type type);
union wsa_ioctl_request switch(wsa_ioctl_type type);
union tarpc_epoll_data switch(tarpc_epoll_data_type type);
union option_value switch(option_type opttype);
union ioctl_request switch(ioctl_type type);
union fcntl_request switch(fcntl_type type);
union tarpc_sigval switch(tarpc_bool pointer);
union tarpc_rte_flow_query_data switch(tarpc_rte_flow_query_data_types type);
union tarpc_job_exec_param_data switch(tarpc_job_exec_param_type type);
bool_t xmlxdr_uint8_t(XDR* xdrs, uint8_t* ip);
bool_t xmlxdr_int(XDR* xdrs, int* ip);
bool_t xmlxdr_uint32_t(XDR* xdrs, uint32_t* ip);
bool_t xmlxdr_int32_t(XDR* xdrs, int32_t* ip);
bool_t xmlxdr_uint16_t(XDR* xdrs, uint16_t* ip);
bool_t xmlxdr_int16_t(XDR* xdrs, int16_t* ip);
bool_t xmlxdr_uint64_t(XDR* xdrs, uint64_t* ip);
bool_t xmlxdr_char(XDR* xdrs, char* ip);
bool_t xmlxdr_array(XDR* xdrs, caddr_t* addrp, u_int* sizep, u_int maxsize, u_int elsize, xdrproc_t elproc);
bool_t xmlxdr_vector(XDR* xdrs, char* basep, u_int nelem, u_int elsize, xdrproc_t elproc);
bool_t xmlxdr_string(XDR* xdrs, caddr_t* addrp, u_int maxsize);
void start_compound_data(void* data, const XML_Char* elem, const XML_Char** atts);
void end_compound_data(void* data, const XML_Char* elem);
bool_t xdrxml_create(XDR* xdrs, caddr_t buf, u_int buflen, rpc_xml_op op, bool_t rc, const char* name, enum xdr_op x_op);
bool_t xdrxml_return_code(XDR* xdrs);
bool_t xdrxml_free(XDR* xdrs);
static __always_inline int te_xdp_get_u16_ho(__u8* p, __u8*const p_end, __u16* result);
static __always_inline int te_xdp_skip_bytes(__u8** p, __u8*const p_end, int num);
static __always_inline int te_xdp_skip_vlan(__u8** p, __u8*const p_end);
static __always_inline int te_xdp_parse_ipv4(te_xdp_frame* frame);
static __always_inline int te_xdp_skip_ipv6_ext_hdr(__u8** p, __u8*const p_end, __u8* hdr_type);
static __always_inline int te_xdp_parse_ipv6(te_xdp_frame* frame);
static __always_inline int te_xdp_parse_eth_frame(te_xdp_frame* frame);
TE_XDP_EQ_FUNC(2);
TE_XDP_EQ_FUNC(4);
TE_XDP_EQ_FUNC(16);
TE_IS_ZERO_FUNC(2);
TE_IS_ZERO_FUNC(4);
TE_IS_ZERO_FUNC(16);
TE_XDP_EQ_OR_ZERO_FUNC(2);
TE_XDP_EQ_OR_ZERO_FUNC(4);
TE_XDP_EQ_OR_ZERO_FUNC(16);
static __always_inline int te_xdp_frame_match_ip_tcpudp(const te_xdp_frame* frame, te_bpf_ip_tcpudp_filter* filter);
te_errno ta_job_manager_init(ta_job_manager_t** manager);
te_errno ta_job_create(ta_job_manager_t* manager, const char* spawner, const char* tool, char** argv, char** env, unsigned int* job_id);
te_errno ta_job_start(ta_job_manager_t* manager, unsigned int id);
te_errno ta_job_allocate_channels(ta_job_manager_t* manager, unsigned int job_id, bool input_channels, unsigned int n_channels, unsigned int* channels);
void ta_job_deallocate_channels(ta_job_manager_t* manager, unsigned int n_channels, unsigned int* channels);
te_errno ta_job_attach_filter(ta_job_manager_t* manager, const char* filter_name, unsigned int n_channels, unsigned int* channels, bool readable, te_log_level log_level, unsigned int* filter_id);
te_errno ta_job_filter_add_regexp(ta_job_manager_t* manager, unsigned int filter_id, char* re, unsigned int extract);
te_errno ta_job_filter_add_channels(ta_job_manager_t* manager, unsigned int filter_id, unsigned int n_channels, unsigned int* channels);
te_errno ta_job_filter_remove_channels(ta_job_manager_t* manager, unsigned int filter_id, unsigned int n_channels, unsigned int* channels);
te_errno ta_job_poll(ta_job_manager_t* manager, unsigned int n_channels, unsigned int* channel_ids, int timeout_ms, bool filter_only);
te_errno ta_job_receive(ta_job_manager_t* manager, unsigned int n_filters, unsigned int* filters, int timeout_ms, ta_job_buffer_t* buffer);
te_errno ta_job_receive_last(ta_job_manager_t* manager, unsigned int n_filters, unsigned int* filters, int timeout_ms, ta_job_buffer_t* buffer);
te_errno ta_job_receive_many(ta_job_manager_t* manager, unsigned int n_filters, unsigned int* filters, int timeout_ms, ta_job_buffer_t** buffers, unsigned int* count);
te_errno ta_job_clear(ta_job_manager_t* manager, unsigned int n_filters, unsigned int* filters);
te_errno ta_job_send(ta_job_manager_t* manager, unsigned int channel_id, size_t count, uint8_t* buf);
te_errno ta_job_kill(ta_job_manager_t* manager, unsigned int job_id, int signo);
te_errno ta_job_killpg(ta_job_manager_t* manager, unsigned int job_id, int signo);
te_errno ta_job_wait(ta_job_manager_t* manager, unsigned int job_id, int timeout_ms, ta_job_status_t* status);
te_errno ta_job_stop(ta_job_manager_t* manager, unsigned int job_id, int signo, int term_timeout_ms);
te_errno ta_job_destroy(ta_job_manager_t* manager, unsigned int job_id, int term_timeout_ms);
te_errno ta_job_wrapper_add(ta_job_manager_t* manager, const char* tool, char** argv, unsigned int job_id, ta_job_wrapper_priority_t priority, unsigned int* wrapper_id);
te_errno ta_job_wrapper_delete(ta_job_manager_t* manager, unsigned int job_id, unsigned int wrapper_id);
te_errno ta_job_add_exec_param(ta_job_manager_t* manager, unsigned int job_id, te_exec_param* exec_params);
te_errno ta_restconf_conf_init(void);
te_errno ta_restconf_conf_server_init(void);
te_errno ta_restconf_conf_search_init(void);
te_errno tad_arp_init_cb(csap_p csap, unsigned int layer);
te_errno tad_arp_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_arp_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_arp_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_arp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_arp_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_arp_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_arp_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_atm_rw_init_cb(csap_p csap);
te_errno tad_atm_rw_destroy_cb(csap_p csap);
te_errno tad_atm_prepare_send(csap_p csap);
te_errno tad_atm_shutdown_send(csap_p csap);
te_errno tad_atm_write_cb(csap_p csap, const tad_pkt* pkt);
te_errno tad_atm_prepare_recv(csap_p csap);
te_errno tad_atm_shutdown_recv(csap_p csap);
te_errno tad_atm_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len);
te_errno tad_atm_init_cb(csap_p csap, unsigned int layer);
te_errno tad_atm_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_atm_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_atm_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
void tad_atm_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_atm_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_atm_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_atm_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_atm_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_aal5_init_cb(csap_p csap, unsigned int layer);
te_errno tad_aal5_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_aal5_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_aal5_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_aal5_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_aal5_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
uint32_t calculate_crc32(uint32_t previous_value, uint8_t* next_pkt, size_t next_len);
te_errno tad_bridge_eth_init_cb(csap_p csap, unsigned int layer, const asn_value* csap_nds);
te_errno tad_bridge_eth_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_bridge_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_bridge_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_bridge_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_bridge_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_bridge_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** ptrn_pdu);
void free_bridge_csap_data(bridge_csap_specific_data_p spec_data, char is_complete);
te_errno tad_cli_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len);
te_errno tad_cli_write_cb(csap_p csap, const tad_pkt* pkt);
te_errno tad_cli_write_read_cb(csap_p csap, unsigned int timeout, const tad_pkt* w_pkt, tad_pkt* r_pkt, size_t* r_pkt_len);
te_errno tad_cli_rw_init_cb(csap_p csap);
te_errno tad_cli_rw_destroy_cb(csap_p csap);
te_errno tad_cli_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_cli_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_cli_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** pattern_pdu);
void free_cli_csap_data(cli_csap_specific_data_p spec_data);
void csap_id_init(void);
void csap_id_destroy(void);
csap_handle_t csap_id_new(void* ptr);
void* csap_id_get(csap_handle_t csap_id);
void* csap_id_delete(csap_handle_t csap_id);
void csap_id_enum(csap_id_enum_cb cb, void* opaque);
te_errno tad_dhcp_rw_init_cb(csap_p csap);
te_errno tad_dhcp_rw_destroy_cb(csap_p csap);
te_errno tad_dhcp_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len);
te_errno tad_dhcp_write_cb(csap_p csap, const tad_pkt* pkt);
char* tad_dhcp_get_param_cb(csap_p csap, unsigned int layer, const char* param);
te_errno tad_dhcp_init_cb(csap_p csap, unsigned int layer);
te_errno tad_dhcp_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_dhcp_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_dhcp_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_dhcp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_dhcp_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_dhcp_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_dhcp_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
void tad_dhcp_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_dhcp_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** ptrn_pdu);
te_errno tad_dhcp6_init_cb(csap_p csap, unsigned int layer);
te_errno tad_dhcp6_rw_init_cb(csap_p csap);
te_errno tad_dhcp6_write_cb(csap_p csap, const tad_pkt* pkt);
te_errno tad_dhcp6_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_dhcp6_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_dhcp6_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_dhcp6_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** ptrn_pdu);
te_errno tad_eth_rw_init_cb(csap_p csap);
te_errno tad_eth_rw_destroy_cb(csap_p csap);
te_errno tad_eth_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len);
te_errno tad_eth_prepare_send(csap_p csap);
te_errno tad_eth_shutdown_send(csap_p csap);
te_errno tad_eth_write_cb(csap_p csap, const tad_pkt* pkt);
te_errno tad_eth_prepare_recv(csap_p csap);
te_errno tad_eth_shutdown_recv(csap_p csap);
te_errno tad_eth_init_cb(csap_p csap, unsigned int layer);
te_errno tad_eth_destroy_cb(csap_p csap, unsigned int layer);
char* tad_eth_get_param_cb(csap_p csap, unsigned int layer, const char* param);
te_errno tad_eth_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_eth_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_eth_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_eth_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_eth_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_eth_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
void tad_eth_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque);
int eth_echo_method(csap_p csap, uint8_t* pkt, size_t len);
int tadf_add_forw_task(const char* forw_asn_spec, int sendq_id);
int tadf_del_forw_task(const char* forw_name);
int tadf_forw_task_set_param(const char* forw_name, const char* param_spec, int value);
int tadf_forw_packet(csap_p csap_descr, const char* forw_name, const uint8_t* pkt, size_t pkt_len);
void tadf_sendq_list_create(void);
int tadf_sendq_list_destroy(void);
int tadf_sendq_list_clear(void);
sendq_t* tadf_sendq_find(int sendq_id);
int tadf_sendq_create(csap_handle_t csap_id, int bandwidth, int size_max);
int tadf_sendq_destroy(int sendq_id);
int tadf_sendq_set_param(int sendq_id, const char* param_spec, int value);
int tadf_sendq_get_param(int sendq_id, const char* param_spec);
int tadf_sendq_init(sendq_t** queue, csap_p csap, int bandwidth, int size_max);
int tadf_sendq_free(sendq_t* queue);
void* tadf_sendq_send_thread_main(void* queue);
int tadf_sendq_put_pkt(sendq_t* queue, const uint8_t* pkt, const size_t pkt_len, struct timeval mdump);
static int timeval_compare(struct timeval tv1, struct timeval tv2);
te_errno tad_frame_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_frame_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
void tad_frame_release_ptrn_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_frame_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_geneve_init_cb(csap_p csap, unsigned int layer_idx);
te_errno tad_geneve_destroy_cb(csap_p csap, unsigned int layer_idx);
void tad_geneve_release_pdu_cb(csap_p csap, unsigned int layer_idx, void* opaque);
te_errno tad_geneve_confirm_tmpl_cb(csap_p csap, unsigned int layer_idx, asn_value* layer_pdu, void** p_opaque);
te_errno tad_geneve_gen_bin_cb(csap_p csap, unsigned int layer_idx, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_geneve_confirm_ptrn_cb(csap_p csap, unsigned int layer_idx, asn_value* layer_pdu, void** p_opaque);
te_errno tad_geneve_match_post_cb(csap_p csap, unsigned int layer_idx, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_geneve_match_do_cb(csap_p csap, unsigned int layer_idx, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_gre_init_cb(csap_p csap, unsigned int layer_idx);
te_errno tad_gre_destroy_cb(csap_p csap, unsigned int layer_idx);
void tad_gre_release_pdu_cb(csap_p csap, unsigned int layer_idx, void* opaque);
te_errno tad_gre_confirm_tmpl_cb(csap_p csap, unsigned int layer_idx, asn_value* layer_pdu, void** p_opaque);
te_errno tad_gre_gen_bin_cb(csap_p csap, unsigned int layer_idx, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_gre_confirm_ptrn_cb(csap_p csap, unsigned int layer_idx, asn_value* layer_pdu, void** p_opaque);
te_errno tad_gre_match_post_cb(csap_p csap, unsigned int layer_idx, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_gre_match_do_cb(csap_p csap, unsigned int layer_idx, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_igmp_init_cb(csap_p csap, unsigned int layer);
te_errno tad_igmp_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_igmp_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_igmp_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_igmp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_igmp_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_igmp_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_igmp_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_igmp_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** ptrn_pdu);
void tad_igmp_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_ip4_rw_init_cb(csap_p csap);
te_errno tad_ip4_rw_destroy_cb(csap_p csap);
te_errno tad_ip4_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len);
te_errno tad_ip4_write_cb(csap_p csap, const tad_pkt* pkt);
te_errno tad_ip4_init_cb(csap_p csap, unsigned int layer);
te_errno tad_ip4_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_ip4_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_ip4_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_ip4_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_ip4_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_ip4_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_ip4_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
void tad_ip4_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_icmp4_init_cb(csap_p csap, unsigned int layer);
te_errno tad_icmp4_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_icmp4_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_icmp4_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_icmp4_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_icmp4_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_icmp4_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_icmp4_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
void tad_icmp4_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_udp_init_cb(csap_p csap, unsigned int layer);
te_errno tad_udp_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_udp_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_udp_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_udp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_udp_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_udp_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_udp_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
void tad_udp_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_tcp_init_cb(csap_p csap, unsigned int layer);
te_errno tad_tcp_destroy_cb(csap_p csap, unsigned int layer);
char* tad_tcp_get_param_cb(csap_p csap, unsigned int layer, const char* param);
te_errno tad_tcp_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* tmpl_pdu, void** p_opaque);
te_errno tad_tcp_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* tmpl_pdu, void** p_opaque);
te_errno tad_tcp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_tcp_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
void tad_tcp_release_opaque_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_ip6_init_cb(csap_p csap, unsigned int layer);
te_errno tad_ip6_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_ip6_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_ip6_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
void tad_ip6_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_ip6_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_ip6_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_ip6_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_ip6_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_icmp6_init_cb(csap_p csap, unsigned int layer);
te_errno tad_icmp6_destroy_cb(csap_p csap, unsigned int layer);
void tad_icmp6_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_icmp6_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_icmp6_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_icmp6_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_icmp6_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_icmp6_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_icmp6_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_does_cksum_match(csap_p csap, tad_cksum_str_code cksum_str_code, uint16_t cksum, unsigned int layer);
te_errno tad_l4_match_cksum_advanced(csap_p csap, tad_pkt* pdu, tad_recv_pkt* meta_pkt, unsigned int layer, uint8_t l4_proto, tad_cksum_str_code cksum_str_code);
te_errno tad_iscsi_rw_init_cb(csap_p csap);
te_errno tad_iscsi_rw_destroy_cb(csap_p csap);
te_errno tad_iscsi_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len);
te_errno tad_iscsi_write_cb(csap_p csap, const tad_pkt* pkt);
te_errno tad_iscsi_init_cb(csap_p csap, unsigned int layer);
te_errno tad_iscsi_destroy_cb(csap_p csap, unsigned int layer);
char* tad_iscsi_get_param_cb(csap_p csap, unsigned int layer, const char* param);
te_errno tad_iscsi_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_iscsi_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_iscsi_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** pattern_pdu);
te_errno tad_iscsi_prepare_send_cb(csap_p csap);
te_errno tad_iscsi_prepare_recv_cb(csap_p csap);
te_errno tad_iscsi_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_iscsi_dump_iscsi_pdu(const uint8_t* buffer, iscsi_dump_mode_t mode);
te_errno tad_pcap_rw_init_cb(csap_p csap);
te_errno tad_pcap_rw_destroy_cb(csap_p csap);
te_errno tad_pcap_prepare_recv(csap_p csap);
te_errno tad_pcap_shutdown_recv(csap_p csap);
te_errno tad_pcap_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len);
te_errno tad_pcap_init_cb(csap_p csap, unsigned int layer);
te_errno tad_pcap_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_pcap_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_pcap_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
void tad_pcap_release_ptrn_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_ppp_init_cb(csap_p csap, unsigned int layer);
te_errno tad_ppp_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_ppp_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_ppp_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_ppp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_ppp_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_ppp_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_ppp_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_ppp_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** ptrn_pdu);
void tad_ppp_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_pppoe_init_cb(csap_p csap, unsigned int layer);
te_errno tad_pppoe_destroy_cb(csap_p csap, unsigned int layer);
te_errno tad_pppoe_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_pppoe_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_pppoe_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_pppoe_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_pppoe_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_pppoe_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_pppoe_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** ptrn_pdu);
void tad_pppoe_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque);
te_errno tad_rte_mbuf_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_rte_mbuf_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_rte_mbuf_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_rte_mbuf_rw_init_cb(csap_p csap);
te_errno tad_rte_mbuf_rw_destroy_cb(csap_p csap);
te_errno tad_rte_mbuf_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len);
te_errno tad_rte_mbuf_write_cb(csap_p csap, const tad_pkt* pkt);
te_errno tad_snmp_rw_init_cb(csap_p csap);
te_errno tad_snmp_rw_destroy_cb(csap_p csap);
te_errno tad_snmp_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len);
te_errno tad_snmp_write_cb(csap_p csap, const tad_pkt* pkt);
te_errno tad_snmp_release_cb(csap_p csap);
te_errno tad_snmp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_snmp_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_snmp_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** pattern_pdu);
void tad_snmp_free_pdu(void* ptr, size_t len);
te_errno tad_socket_rw_init_cb(csap_p csap);
te_errno tad_socket_rw_destroy_cb(csap_p csap);
te_errno tad_socket_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len);
te_errno tad_socket_write_cb(csap_p csap, const tad_pkt* pkt);
te_errno tad_socket_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque);
te_errno tad_socket_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_socket_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tad_agent_csap_init(void);
te_errno tad_agent_csap_fini(void);
te_errno tad_csap_destroy_by_id(csap_handle_t csap_id);
te_errno tad_csap_create(const char* stack, const char* spec_str, csap_p* new_csap_p);
te_errno tad_csap_destroy(csap_p csap);
te_errno tad_send_preprocess_args(csap_p csap, const asn_value* tmpl_unit, tad_send_tmpl_unit_data* data);
te_errno tad_send_start_prepare(csap_p csap, const char* tmpl_str, bool postponed, const tad_reply_context* reply_ctx);
te_errno tad_send_release(csap_p csap, tad_send_context* context);
te_errno tad_send_do(csap_p csap);
te_errno tad_recv_start_prepare(csap_p csap, const char* ptrn_str, unsigned int num, unsigned int timeout, unsigned int flags, const tad_reply_context* reply_ctx);
te_errno tad_recv_release(csap_p csap, tad_recv_context* context);
te_errno tad_recv_do(csap_p csap);
te_errno tad_recv_get_packets(csap_p csap, tad_reply_context* reply_ctx, bool wait, unsigned int* got);
te_errno tad_bps_pkt_frag_init(const tad_bps_pkt_frag* descr, unsigned int fields, const asn_value* layer_spec, tad_bps_pkt_frag_def* bps);
void tad_bps_pkt_frag_free(tad_bps_pkt_frag_def* bps);
te_errno tad_bps_nds_to_data_units(const tad_bps_pkt_frag_def* def, const asn_value* layer_pdu, tad_bps_pkt_frag_data* data);
void tad_bps_free_pkt_frag_data(const tad_bps_pkt_frag_def* def, tad_bps_pkt_frag_data* data);
te_errno tad_bps_confirm_send(const tad_bps_pkt_frag_def* def, const tad_bps_pkt_frag_data* pkt);
size_t tad_bps_pkt_frag_bitlen(const tad_bps_pkt_frag* descr, unsigned int fields);
size_t tad_bps_pkt_frag_data_bitlen(const tad_bps_pkt_frag_def* def, const tad_bps_pkt_frag_data* pkt);
te_errno tad_bps_pkt_frag_gen_bin(const tad_bps_pkt_frag_def* def, const tad_bps_pkt_frag_data* pkt, const tad_tmpl_arg_t* args, size_t arg_num, uint8_t* bin, unsigned int* bitoff, unsigned int max_bitlen);
te_errno tad_bps_pkt_frag_match_pre(const tad_bps_pkt_frag_def* def, tad_bps_pkt_frag_data* pkt_data);
te_errno tad_bps_pkt_frag_match_do(const tad_bps_pkt_frag_def* def, const tad_bps_pkt_frag_data* ptrn, tad_bps_pkt_frag_data* pkt_data, const tad_pkt* pkt, unsigned int* bitoff);
te_errno tad_bps_pkt_frag_match_post(const tad_bps_pkt_frag_def* def, tad_bps_pkt_frag_data* pkt_data, const tad_pkt* pkt, unsigned int* bitoff, asn_value* nds);
te_errno csap_create(const char* type, csap_p* csap);
te_errno csap_destroy(csap_handle_t csap_id);
csap_p csap_find(csap_handle_t csap_id);
te_errno csap_command_under_lock(csap_p csap, tad_traffic_op_t command);
static te_errno csap_command(csap_p csap, tad_traffic_op_t command);
static te_errno csap_wait(csap_p csap, unsigned int state_bits);
te_errno csap_timedwait(csap_p csap, unsigned int state_bits, unsigned int ms);
static unsigned int csap_get_rw_layer(csap_p csap);
static void* csap_get_rw_data(csap_p csap);
static void csap_set_rw_data(csap_p csap, void* data);
static void* csap_get_proto_spec_data(csap_p csap, unsigned int layer);
static void csap_set_proto_spec_data(csap_p csap, unsigned int layer, void* data);
static struct csap_spt_type_t* csap_get_proto_support(csap_p csap, unsigned int layer);
static void csap_set_proto_support(csap_p csap, unsigned int layer, struct csap_spt_type_t* proto_support);
static tad_send_context* csap_get_send_context(csap_p csap);
static tad_recv_context* csap_get_recv_context(csap_p csap);
te_errno csap_spt_init(void);
te_errno csap_spt_add(csap_spt_type_p spt_descr);
csap_spt_type_p csap_spt_find(const char* proto);
void csap_spt_destroy(void);
te_errno tad_eth_sap_attach(const char* ifname, tad_eth_sap* sap);
te_errno tad_eth_sap_send_open(tad_eth_sap* sap, unsigned int mode);
te_errno tad_eth_sap_send(tad_eth_sap* sap, const tad_pkt* pkt);
te_errno tad_eth_sap_send_close(tad_eth_sap* sap);
te_errno tad_eth_sap_recv_open(tad_eth_sap* sap, unsigned int mode);
te_errno tad_eth_sap_recv(tad_eth_sap* sap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len);
te_errno tad_eth_sap_recv_close(tad_eth_sap* sap);
te_errno tad_eth_sap_detach(tad_eth_sap* sap);
te_errno tad_overlay_guess_def_protocol(csap_p csap, unsigned int layer_idx, tad_bps_pkt_frag_def* def, unsigned int du_idx);
void tad_pkt_seg_data_free(void* ptr, size_t len);
typedef CIRCLEQ_HEAD(tad_pkt_segs, tad_pkt_seg);
typedef CIRCLEQ_HEAD(tad_pkts_head, tad_pkt);
void tad_pkt_init_seg_data(tad_pkt_seg* seg, void* ptr, size_t len, tad_pkt_seg_free free);
void tad_pkt_free_seg_data(tad_pkt_seg* seg);
void tad_pkt_free_seg(tad_pkt_seg* seg);
tad_pkt_seg* tad_pkt_alloc_seg(void* data_ptr, size_t data_len, tad_pkt_seg_free data_free);
unsigned int tad_pkt_seg_num(const tad_pkt* pkt);
size_t tad_pkt_len(const tad_pkt* pkt);
void* tad_pkt_opaque(const tad_pkt* pkt);
void tad_pkt_set_opaque(tad_pkt* pkt, void* opaque, tad_pkt_ctrl_free opaque_free);
void tad_pkt_init_segs(tad_pkt* pkt);
void tad_pkt_free_segs(tad_pkt* pkt);
void tad_pkt_init(tad_pkt* pkt, tad_pkt_ctrl_free my_free, void* opaque, tad_pkt_ctrl_free opaque_free);
void tad_pkt_cleanup(tad_pkt* pkt);
void tad_pkt_free(tad_pkt* pkt);
tad_pkt* tad_pkt_alloc(unsigned int n_segs, size_t first_seg_len);
void tad_pkt_put_seg_data(tad_pkt* pkt, tad_pkt_seg* seg, void* ptr, size_t len, tad_pkt_seg_free free);
void tad_pkt_set_seg_data_len(tad_pkt* pkt, tad_pkt_seg* seg, size_t new_len);
void tad_pkt_append_seg(tad_pkt* pkt, tad_pkt_seg* seg);
void tad_pkt_prepend_seg(tad_pkt* pkt, tad_pkt_seg* seg);
void tad_pkt_insert_after_seg(tad_pkt* pkt, tad_pkt_seg* seg, tad_pkt_seg* new_seg);
te_errno tad_pkt_flatten_copy(tad_pkt* pkt, uint8_t** data, size_t* len);
static tad_pkt_seg* tad_pkt_first_seg(const tad_pkt* pkt);
static tad_pkt_seg* tad_pkt_last_seg(const tad_pkt* pkt);
static tad_pkt_seg* tad_pkt_next_seg(const tad_pkt* pkt, const tad_pkt_seg* seg);
static tad_pkt_seg* tad_pkt_prev_seg(const tad_pkt* pkt, const tad_pkt_seg* seg);
te_errno tad_pkt_enumerate_seg(const tad_pkt* pkt, tad_pkt_seg_enum_cb func, void* opaque);
te_errno tad_pkt_segs_to_iov(const tad_pkt* pkt, struct iovec* iov, size_t count);
unsigned int tad_pkts_get_num(const tad_pkts* pkts);
void tad_pkts_init(tad_pkts* pkts);
void tad_cleanup_pkts(tad_pkts* pkts);
void tad_free_pkts(tad_pkts* pkts);
static tad_pkt* tad_pkts_first_pkt(const tad_pkts* pkts);
void tad_pkts_add_one(tad_pkts* pkts, tad_pkt* pkt);
void tad_pkts_del_one(tad_pkts* pkts, tad_pkt* pkt);
void tad_pkts_move(tad_pkts* dst, tad_pkts* src);
te_errno tad_pkts_add_new_seg(tad_pkts* pkts, bool header, void* data_ptr, size_t data_len, tad_pkt_seg_free data_free);
te_errno tad_pkts_alloc(tad_pkts* pkts, unsigned int n_pkts, unsigned int n_segs, size_t first_seg_len);
te_errno tad_pkt_enumerate(tad_pkts* pkts, tad_pkt_enum_cb func, void* opaque);
te_errno tad_pkts_enumerate_first_segs(tad_pkts* pkts, tad_pkt_seg_enum_cb func, void* opaque);
te_errno tad_pkt_fragment(tad_pkt* pkt, size_t frag_data_len, ssize_t add_seg_len, bool header, tad_pkts* pkts);
te_errno tad_pkt_get_frag(tad_pkt* dst, tad_pkt* src, size_t frag_off, size_t frag_len, tad_pkt_get_frag_mode mode);
void tad_pkt_read(const tad_pkt* pkt, const tad_pkt_seg* seg, size_t off, size_t len, uint8_t* dst);
void tad_pkt_read_bits(const tad_pkt* pkt, size_t bitoff, size_t bitlen, uint8_t* dst);
bool tad_pkt_read_bit(const tad_pkt* pkt, size_t bitoff);
te_errno tad_pkt_match_mask(const tad_pkt* pkt, size_t len, const uint8_t* mask, const uint8_t* value, bool exact_len);
te_errno tad_pkt_match_bytes(const tad_pkt* pkt, size_t len, const uint8_t* payload, bool exact_len);
te_errno tad_pkt_realloc_segs(tad_pkt* pkt, size_t new_len);
te_errno tad_pkt_mark_layer_segments_cb(tad_pkt* pkt, void* opaque);
te_errno tad_poll_enqueue(csap_p csap, unsigned int timeout, const tad_reply_context* reply_ctx);
void tad_recv_init_context(tad_recv_context* context);
te_errno tad_recv_prepare(csap_p csap, asn_value* ptrn_unit, unsigned int num, unsigned int timeout, const tad_reply_context* reply_ctx);
void* tad_recv_thread(void* arg);
te_errno tad_recv_op_enqueue(csap_p csap, tad_traffic_op_t op, const tad_reply_context* reply_ctx);
typedef TAILQ_HEAD(tad_recv_pkt);
void tad_recv_pkt_free(csap_p csap, tad_recv_pkt* pkt);
void tad_recv_pkts_free(csap_p csap, tad_recv_pkts* pkts);
tad_recv_pkt* tad_recv_pkt_alloc(csap_p csap);
void tad_recv_pkt_cleanup_upper(csap_p csap, tad_recv_pkt* pkt);
void tad_recv_pkt_cleanup(csap_p csap, tad_recv_pkt* pkt);
static te_errno tad_reply_clone(tad_reply_context* dst, const tad_reply_context* src);
static void tad_reply_cleanup(tad_reply_context* ctx);
static te_errno tad_reply_status(tad_reply_context* ctx, te_errno rc);
static te_errno tad_reply_poll(tad_reply_context* ctx, te_errno rc, unsigned int poll_id);
static te_errno tad_reply_pkts(tad_reply_context* ctx, te_errno rc, unsigned int num);
static te_errno tad_reply_pkt(tad_reply_context* ctx, const asn_value* pkt);
te_errno tad_reply_rcf_init(tad_reply_context* ctx, rcf_comm_connection* rcfc, const char* answer_pfx, size_t pfx_len);
te_errno tad_rte_mbuf_sap_read(tad_rte_mbuf_sap* sap, tad_pkt* pkt, size_t* pkt_len, unsigned* pend);
te_errno tad_rte_mbuf_sap_write(tad_rte_mbuf_sap* sap, const tad_pkt* pkt);
void tad_send_init_context(tad_send_context* context);
te_errno tad_send_prepare(csap_p csap, asn_value* tmpl_unit, const tad_reply_context* reply_ctx);
te_errno tad_send_stop(csap_p csap, unsigned int* sent_pkts);
void* tad_send_thread(void* arg);
te_errno tad_send_prepare_bin(csap_p csap, asn_value* nds, const struct tad_tmpl_arg_t* args, size_t arg_num, tad_payload_spec_t* pld_data, void** layer_opaque, tad_pkts* pkts_per_layer);
te_errno tad_send_recv_generate_pattern(csap_p csap, asn_value* template, asn_value** pattern);
int tad_confirm_pdus(csap_p csap, bool recv, asn_value* pdus, void** layer_opaque);
te_tad_protocols_t te_proto_from_str(const char* proto_txt);
const char* te_proto_to_str(te_tad_protocols_t proto);
te_errno tad_convert_payload(const asn_value* ndn_payload, tad_payload_spec_t* pld_spec);
void tad_payload_spec_clear(tad_payload_spec_t* pld_spec);
int tad_int_expr_parse(const char* string, tad_int_expr_t** expr, int* syms);
tad_int_expr_t* tad_int_expr_constant_arr(uint8_t* arr, size_t len);
tad_int_expr_t* tad_int_expr_constant(int64_t n);
void tad_int_expr_free(tad_int_expr_t* expr);
int tad_int_expr_calculate(const tad_int_expr_t* expr, const struct tad_tmpl_arg_t* args, size_t num_args, int64_t* result);
uint64_t tad_ntohll(uint64_t n);
int tad_init_tmpl_args(tad_tmpl_iter_spec_t* arg_specs, size_t arg_specs_num, struct tad_tmpl_arg_t* arg_iterated);
int tad_iterate_tmpl_args(tad_tmpl_iter_spec_t* arg_specs, size_t arg_specs_num, struct tad_tmpl_arg_t* arg_iterated);
void tad_tmpl_args_clear(tad_tmpl_iter_spec_t* arg_specs, unsigned int arg_num);
int tad_get_tmpl_arg_specs(const asn_value* arg_set, tad_tmpl_iter_spec_t* arg_specs, size_t arg_num);
int tad_data_unit_convert_by_label(const asn_value* pdu_val, const char* label, tad_data_unit_t* location);
int tad_data_unit_convert(const asn_value* pdu_val, asn_tag_value tag_value, tad_data_unit_t* location);
int tad_data_unit_convert_simple(const asn_value* du_field, tad_data_unit_t* location);
int tad_data_unit_from_bin(const uint8_t* data, size_t d_len, tad_data_unit_t* location);
void tad_data_unit_clear(tad_data_unit_t* du);
int tad_univ_match_field(const tad_data_unit_t* pattern, asn_value* pkt_pdu, uint8_t* data, size_t d_len, const char* label);
int tad_data_unit_to_bin(const tad_data_unit_t* du_tmpl, const struct tad_tmpl_arg_t* args, size_t arg_num, uint8_t* data_place, size_t d_len);
te_errno tad_tcp_push_fin(int socket, const uint8_t* data, size_t length);
int tad_check_pdu_seq(csap_p csap, asn_value* pdus);
te_errno tad_common_write_read_cb(csap_p csap, unsigned int timeout, const tad_pkt* w_pkt, tad_pkt* r_pkt, size_t* r_pkt_len);
te_errno tad_common_read_cb_sock(csap_p csap, int sock, unsigned int flags, unsigned int timeout, tad_pkt* pkt, struct sockaddr* from, socklen_t* fromlen, size_t* pkt_len, int* msg_flags, void* cmsg_buf, size_t* cmsg_buf_len);
te_errno tad_pthread_create(pthread_t* thread, void*(*)(void*) start_routine, void* arg);
te_errno tad_du_realloc(tad_data_unit_t* du, size_t size);
tad_cksum_str_code tad_du_get_cksum_str_code(tad_data_unit_t* du);
te_errno tad_vxlan_init_cb(csap_p csap, unsigned int layer_idx);
te_errno tad_vxlan_destroy_cb(csap_p csap, unsigned int layer_idx);
void tad_vxlan_release_pdu_cb(csap_p csap, unsigned int layer_idx, void* opaque);
te_errno tad_vxlan_confirm_tmpl_cb(csap_p csap, unsigned int layer_idx, asn_value* layer_pdu, void** p_opaque);
te_errno tad_vxlan_gen_bin_cb(csap_p csap, unsigned int layer_idx, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus);
te_errno tad_vxlan_confirm_ptrn_cb(csap_p csap, unsigned int layer_idx, asn_value* layer_pdu, void** p_opaque);
te_errno tad_vxlan_match_post_cb(csap_p csap, unsigned int layer_idx, tad_recv_pkt_layer* meta_pkt_layer);
te_errno tad_vxlan_match_do_cb(csap_p csap, unsigned int layer_idx, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu);
te_errno tapi_cache_register(const char* method, const char* area, tapi_cache_cb cb_func);
te_errno tapi_cache_actualize(const char* method, void* opaque, const char* area_ptrn, ...);
te_errno te_errno tapi_cache_invalidate(const char* method, const char* area_ptrn, ...);
te_errno te_errno te_errno tapi_cache_add(cfg_val_type type, const void* value, const char* area_inst, ...);
te_errno te_errno te_errno te_errno tapi_cache_add_string(const char* value, const char* area_inst, ...);
te_errno te_errno te_errno te_errno te_errno tapi_cache_add_int(int value, const char* area_inst, ...);
te_errno te_errno te_errno te_errno te_errno te_errno tapi_cache_add_addr(const struct sockaddr* addr, const char* area_inst, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cache_del(const char* area_ptrn, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cache_find(cfg_handle_cb_func cb_func, void* opaque, const char* area_ptrn, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cache_get(cfg_val_type* type, void* value, const char* area_inst, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cache_get_string(char** value, const char* area_inst, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cache_get_int(int* value, const char* area_inst, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cache_get_addr(struct sockaddr** addr, const char* area_inst, ...);
int tapi_cfg_get_son_mac(const char* father, const char* subid, const char* name, uint8_t* p_mac);
int tapi_cfg_switch_add_vlan(const char* ta_name, uint16_t vid);
int tapi_cfg_switch_del_vlan(const char* ta_name, uint16_t vid);
int tapi_cfg_switch_vlan_add_port(const char* ta_name, uint16_t vid, unsigned int port);
int tapi_cfg_switch_vlan_del_port(const char* ta_name, uint16_t vid, unsigned int port);
int tapi_cfg_get_route_table(const char* ta, int addr_family, tapi_rt_entry_t** rt_tbl, unsigned int* n);
void tapi_cfg_rt_params_init(tapi_cfg_rt_params* params);
int tapi_cfg_add_route(const char* ta, int addr_family, const void* dst_addr, int prefix, const void* gw_addr, const char* dev, const void* src_addr, uint32_t flags, int metric, int tos, int mtu, int win, int irtt, cfg_handle* rt_hndl);
int tapi_cfg_add_full_route(const char* ta, int addr_family, const void* dst_addr, int prefix, const void* gw_addr, const char* dev, const void* src_addr, const char* type, uint32_t flags, int metric, int tos, int mtu, int win, int irtt, int table, cfg_handle* cfg_hndl);
static int tapi_cfg_add_typed_route(const char* ta, int addr_family, const void* dst_addr, int prefix, const void* gw_addr, const char* dev, const void* src_addr, const char* type, uint32_t flags, int metric, int tos, int mtu, int win, int irtt, cfg_handle* cfg_hndl);
int tapi_cfg_modify_route(const char* ta, int addr_family, const void* dst_addr, int prefix, const void* gw_addr, const char* dev, const void* src_addr, uint32_t flags, int metric, int tos, int mtu, int win, int irtt, cfg_handle* rt_hndl);
te_errno tapi_cfg_modify_route2(const char* ta, tapi_cfg_rt_params* params, cfg_handle* rt_hndl);
int tapi_cfg_modify_full_route(const char* ta, int addr_family, const void* dst_addr, int prefix, const void* gw_addr, const char* dev, const void* src_addr, const char* type, uint32_t flags, int metric, int tos, int mtu, int win, int irtt, int table, cfg_handle* cfg_hndl);
static int tapi_cfg_modify_typed_route(const char* ta, int addr_family, const void* dst_addr, int prefix, const void* gw_addr, const char* dev, const void* src_addr, const char* type, uint32_t flags, int metric, int tos, int mtu, int win, int irtt, cfg_handle* cfg_hndl);
int tapi_cfg_del_route_tmp(const char* ta, int addr_family, const void* dst_addr, int prefix, const void* gw_addr, const char* dev, const void* src_addr, uint32_t flags, int metric, int tos, int mtu, int win, int irtt);
int tapi_cfg_del_route(cfg_handle* rt_hndl);
static int tapi_cfg_add_route_via_gw(const char* ta, int addr_family, const void* dst_addr, int prefix, const void* gw_addr);
static int tapi_cfg_del_route_via_gw(const char* ta, int addr_family, const void* dst_addr, int prefix, const void* gw_addr);
te_errno tapi_cfg_add_route_simple(const char* ta, const struct sockaddr* target, int prefixlen, const struct sockaddr* gw, const char* dev);
te_errno tapi_cfg_del_route_simple(const char* ta, const struct sockaddr* target, int prefixlen, const struct sockaddr* gw, const char* dev);
te_errno tapi_cfg_add_route2(const char* ta, tapi_cfg_rt_params* params, cfg_handle* rt_hndl);
te_errno tapi_cfg_get_neigh_entry(const char* ta, const char* ifname, const struct sockaddr* net_addr, void* ret_addr, bool* is_static, cs_neigh_entry_state* state);
te_errno tapi_cfg_add_neigh_entry(const char* ta, const char* ifname, const struct sockaddr* net_addr, const void* link_addr, bool is_static);
te_errno tapi_cfg_set_neigh_entry(const char* ta, const char* ifname, const struct sockaddr* net_addr, const void* link_addr, bool is_static);
te_errno tapi_cfg_del_neigh_entry(const char* ta, const char* ifname, const struct sockaddr* net_addr);
te_errno tapi_cfg_del_neigh_dynamic(const char* ta, const char* ifname);
te_errno tapi_cfg_add_neigh_proxy(const char* ta, const char* ifname, const struct sockaddr* net_addr, cfg_handle* p_handle);
int tapi_cfg_get_hwaddr(const char* ta, const char* ifname, void* hwaddr, size_t* hwaddr_len);
te_errno tapi_cfg_set_bcast_hwaddr(const char* ta, const char* ifname, const void* hwaddr, unsigned int hwaddr_len);
int tapi_cfg_get_bcast_hwaddr(const char* ta, const char* ifname, void* hwaddr, size_t* hwaddr_len);
te_errno tapi_cfg_set_hwaddr(const char* ta, const char* ifname, const void* hwaddr, unsigned int hwaddr_len);
te_errno tapi_cfg_get_if_kind(const char* ta, const char* ifname, te_interface_kind* kind);
te_errno tapi_cfg_get_if_parent(const char* ta, const char* ifname, char* parent_ifname, size_t len);
te_errno tapi_cfg_get_if_last_ancestor(const char* ta, const char* ifname, char* ancestor_ifname, size_t len);
int tapi_cfg_alloc_entry(const char* parent_oid, cfg_handle* entry);
int tapi_cfg_free_entry(cfg_handle* entry);
static int tapi_cfg_alloc_ip4_net(cfg_handle* entry);
static int tapi_cfg_alloc_ip6_net(cfg_handle* entry);
te_errno tapi_cfg_alloc_net(int af, cfg_handle* entry);
te_errno tapi_cfg_add_net(const char* net_pool, const struct sockaddr* net_addr, unsigned int prefix, int state, cfg_handle* entry);
static te_errno tapi_cfg_add_ip4_net(const struct sockaddr_in* ip4_net_addr, unsigned int prefix, int state, cfg_handle* entry);
static te_errno tapi_cfg_add_ip6_net(const struct sockaddr_in6* ip6_net_addr, unsigned int prefix, int state, cfg_handle* entry);
int tapi_cfg_alloc_net_addr(cfg_handle net_pool_entry, cfg_handle* p_entry, struct sockaddr** addr);
int tapi_cfg_add_net_addr(cfg_handle net_pool_entry, struct sockaddr* add_addr, cfg_handle* p_entry);
te_errno tapi_cfg_env_local_to_agent(void);
te_errno tapi_cfg_rpcs_local_to_agent(void);
char* te_sprintf(const char* fmt, ...);
int te_asprintf(char** strp, const char* fmt, ...);
int te_vasprintf(char** strp, const char* fmt, va_list ap);
static bool tapi_is_cfg_link(char* s);
te_errno tapi_cfg_set_loglevel(const char* agent, int level);
static char* tapi_get_cfg_link(char* link);
te_errno tapi_cfg_set_loglevel_save(const char* ta, int new_val, int* old_val);
te_errno tapi_cfg_get_int_str(int* value, const char* oid);
te_errno tapi_cfg_get_int_fmt(int* value, const char* format, ...);
te_errno tapi_cfg_set_int_str(int value, int* old_value, const char* oid);
te_errno tapi_cfg_set_int_fmt(int value, int* old_value, const char* format, ...);
te_errno tapi_cfg_get_uint64_str(uint64_t* value, const char* oid);
te_errno tapi_cfg_get_uint64_fmt(uint64_t* value, const char* format, ...);
te_errno tapi_cfg_set_uint64_str(uint64_t value, uint64_t* old_value, const char* oid);
te_errno tapi_cfg_set_uint64_fmt(uint64_t value, uint64_t* old_value, const char* format, ...);
te_errno tapi_cfg_alloc_net_addr_pair(struct sockaddr** addr1, struct sockaddr** addr2, int* prefix);
te_errno tapi_cfg_add_new_user(const char* agent, int uid);
te_errno tapi_cfg_add_user_if_needed(const char* agent, int uid, bool* added);
te_errno tapi_cfg_del_user(const char* agent, int uid);
int tapi_cfg_aggr_create_bond(const char* ta, const char* name, char** ifname, const char* type);
int tapi_cfg_aggr_destroy_bond(const char* ta, const char* name);
int tapi_cfg_aggr_bond_enslave(const char* ta, const char* name, const char* slave_if);
int tapi_cfg_aggr_bond_free_slave(const char* ta, const char* name, const char* slave_if);
typedef TAILQ_HEAD(arl_table_t, arl_entry_t);
static void tapi_mac_next(uint8_t* mac);
static bool tapi_mac_is_broadcast(const uint8_t* mac);
static bool tapi_mac_is_multicast(const uint8_t* mac);
int tapi_cfg_arl_get_table(const char* ta, bool sync, arl_table_t* p_table);
int tapi_cfg_arl_del_entry(const char* ta, arl_entry_type type, unsigned int port_num, const uint8_t* mac_addr, const char* vlan_name);
int tapi_cfg_arl_add_entry(const char* ta, arl_entry_type type, unsigned int port_num, const uint8_t* mac_addr, const char* vlan_name);
int tapi_cfg_arl_get_entry(const char* oid, arl_entry_t* p);
void tapi_arl_free_entry(arl_entry_t* p);
void tapi_arl_free_table(arl_table_t* p_table);
arl_entry_t* tapi_arl_find(const arl_table_t* p_table, const uint8_t* mac, const char* vlan, unsigned int port, enum arl_entry_type type);
void tapi_arl_print_table(const arl_table_t* p_table);
char* tapi_cfg_base_get_ta_dir(const char* ta, tapi_cfg_base_ta_dir kind);
te_errno tapi_cfg_base_get_ta_uname(const char* ta, struct utsname* uts);
te_errno tapi_cfg_base_ipv4_fw(const char* ta, bool enable);
te_errno tapi_cfg_base_ipv4_fw_enabled(const char* ta, bool* enabled);
te_errno tapi_cfg_ipv4_fw_set(const char* ta, const char* ifname, bool enable);
te_errno tapi_cfg_ipv4_fw_get(const char* ta, const char* ifname, bool* enabled);
static te_errno tapi_cfg_ipv4_fw_enable(const char* ta, const char* ifname);
static te_errno tapi_cfg_ipv4_fw_disable(const char* ta, const char* ifname);
te_errno tapi_cfg_ipv6_fw_set(const char* ta, const char* ifname, bool enable);
te_errno tapi_cfg_ipv6_fw_get(const char* ta, const char* ifname, bool* enabled);
static te_errno tapi_cfg_ipv6_fw_enable(const char* ta, const char* ifname);
static te_errno tapi_cfg_ipv6_fw_disable(const char* ta, const char* ifname);
static te_errno tapi_cfg_base_ipv6_fw(const char* ta, bool enable);
static te_errno tapi_cfg_base_ipv6_fw_enabled(const char* ta, bool* enabled);
int tapi_cfg_base_if_get_mac(const char* oid, uint8_t* mac);
int tapi_cfg_base_if_set_mac(const char* oid, const uint8_t* mac);
int tapi_cfg_base_if_get_bcast_mac(const char* oid, uint8_t* bcast_mac);
int tapi_cfg_base_if_set_bcast_mac(const char* oid, const uint8_t* bcast_mac);
int tapi_cfg_base_if_add_mcast_mac(const char* oid, const uint8_t* mcast_mac);
int tapi_cfg_base_if_del_mcast_mac(const char* oid, const uint8_t* mcast_mac);
int tapi_cfg_base_if_get_link_addr(const char* ta, const char* dev, struct sockaddr* link_addr);
int tapi_cfg_base_if_get_mtu(const char* oid, unsigned int* p_mtu);
int tapi_cfg_base_add_net_addr(const char* oid, const struct sockaddr* addr, int prefix, bool set_bcast, cfg_handle* cfg_hndl);
static int tapi_cfg_base_if_add_net_addr(const char* ta, const char* ifname, const struct sockaddr* addr, int prefix, bool set_bcast, cfg_handle* cfg_hndl);
te_errno tapi_cfg_del_if_ip4_addresses(const char* ta, const char* if_name, const struct sockaddr* addr_to_save);
te_errno tapi_cfg_save_del_if_addresses(const char* ta, const char* if_name, const struct sockaddr* addr_to_save, bool save_first, struct sockaddr** saved_addrs, int** saved_prefixes, bool** saved_broadcasts, int* saved_count, int addr_fam);
te_errno tapi_cfg_save_del_if_ip4_addresses(const char* ta, const char* if_name, const struct sockaddr* addr_to_save, bool save_first, struct sockaddr** saved_addrs, int** saved_prefixes, bool** saved_broadcasts, int* saved_count);
te_errno tapi_cfg_del_if_ip6_addresses(const char* ta, const char* if_name, const struct sockaddr* addr_to_save);
te_errno tapi_cfg_save_del_if_ip6_addresses(const char* ta, const char* if_name, const struct sockaddr* addr_to_save, bool save_first, struct sockaddr** saved_addrs, int** saved_prefixes, bool** saved_broadcasts, int* saved_count);
te_errno tapi_cfg_restore_if_ip4_addresses(const char* ta, const char* if_name, struct sockaddr* saved_addrs, int* saved_prefixes, bool* saved_broadcasts, int saved_count);
te_errno tapi_cfg_restore_if_addresses(const char* ta, const char* if_name, struct sockaddr* saved_addrs, int* saved_prefixes, bool* saved_broadcasts, int saved_count);
static te_errno tapi_cfg_base_if_up(const char* ta, const char* iface);
static te_errno tapi_cfg_base_if_down(const char* ta, const char* iface);
te_errno tapi_cfg_base_if_await_link_up(const char* ta, const char* iface, unsigned int nb_attempts, unsigned int wait_int_ms, unsigned int after_up_ms);
static te_errno tapi_cfg_base_if_arp_enable(const char* ta, const char* iface);
static te_errno tapi_cfg_base_if_arp_disable(const char* ta, const char* iface);
static te_errno tapi_cfg_base_if_set_promisc(const char* ta, const char* ifname, bool enable);
static te_errno tapi_cfg_base_if_get_promisc(const char* ta, const char* ifname, bool* enabled);
te_errno tapi_cfg_base_if_del_vlan(const char* ta, const char* if_name, uint16_t vid);
te_errno tapi_cfg_base_if_add_vlan(const char* ta, const char* if_name, uint16_t vid, char** vlan_ifname);
static te_errno tapi_cfg_base_if_add_get_vlan(const char* ta, const char* if_name, uint16_t vid, char** vlan_ifname);
te_errno tapi_cfg_base_if_add_rsrc(const char* ta, const char* ifname);
te_errno tapi_cfg_base_if_check_add_rsrc(const char* ta, const char* ifname);
te_errno tapi_cfg_base_if_del_rsrc(const char* ta, const char* ifname);
te_errno tapi_cfg_base_if_add_macvlan(const char* ta, const char* link, const char* ifname, const char* mode);
te_errno tapi_cfg_base_if_del_macvlan(const char* ta, const char* link, const char* ifname);
te_errno tapi_cfg_base_if_get_macvlan_mode(const char* ta, const char* link, const char* ifname, char** mode);
te_errno tapi_cfg_base_if_set_macvlan_mode(const char* ta, const char* link, const char* ifname, const char* mode);
te_errno tapi_cfg_base_if_add_ipvlan(const char* ta, const char* link, const char* ifname, const char* mode, const char* flag);
te_errno tapi_cfg_base_if_del_ipvlan(const char* ta, const char* link, const char* ifname);
te_errno tapi_cfg_base_if_get_ipvlan_mode(const char* ta, const char* link, const char* ifname, char** mode, char** flag);
te_errno tapi_cfg_base_if_set_ipvlan_mode(const char* ta, const char* link, const char* ifname, const char* mode, const char* flag);
te_errno tapi_cfg_base_if_add_veth(const char* ta, const char* ifname, const char* peer);
te_errno tapi_cfg_base_if_del_veth(const char* ta, const char* ifname);
te_errno tapi_cfg_base_if_get_veth_peer(const char* ta, const char* ifname, char** peer);
te_errno tapi_cfg_base_if_get_mtu_u(const char* agent, const char* interface, int* mtu);
te_errno tapi_cfg_base_if_set_mtu_ext(const char* agent, const char* interface, int mtu, int* old_mtu, bool fast);
static te_errno tapi_cfg_base_if_set_mtu(const char* agent, const char* interface, int mtu, int* old_mtu);
te_errno tapi_cfg_base_if_set_mtu_leastwise(const char* ta, const char* ifname, unsigned int mtu);
te_errno tapi_cfg_base_if_down_up(const char* agent, const char* interface);
te_errno tapi_cfg_base_get_loadavg(const char* agent, tapi_cfg_base_loadavg* loadavg);
te_errno tapi_cfg_base_get_proc_number(const char* agent, uint64_t* runnable, uint64_t* total);
te_errno tapi_cfg_base_get_latest_pid(const char* agent, uint64_t* latest_pid);
te_errno tapi_cfg_block_initialize_loop(const char* ta);
te_errno tapi_cfg_block_grab(const char* ta, const char* block_dev);
bool tapi_cfg_block_is_loop(const char* ta, const char* block_dev);
te_errno tapi_cfg_block_loop_get_backing_file(const char* ta, const char* block_dev, char** filename);
te_errno tapi_cfg_block_loop_set_backing_file(const char* ta, const char* block_dev, const char* filename);
te_errno tapi_cfg_changed_add_region(const char* tag, size_t start, size_t len);
te_errno tapi_cfg_changed_add_region_overlap(const char* tag, size_t start, size_t len);
te_errno tapi_cfg_changed_remove_region(const char* tag, size_t start);
te_errno tapi_cfg_changed_remove_region_overlap(const char* tag, size_t start, size_t len);
te_errno tapi_cfg_changed_process_regions(const char* tag, tapi_cfg_changed_callback* cb, void* ctx);
te_errno tapi_cfg_changed_clear_tag(const char* tag);
static te_errno tapi_cfg_cmd_monitor_begin(char const* ta, char const* name, char const* command, int time_to_wait);
static te_errno tapi_cfg_cmd_monitor_end(char const* ta, char const* name);
te_errno tapi_cfg_cpu_grab_by_id(const char* ta, const tapi_cpu_index_t* cpu_id);
te_errno tapi_cfg_cpu_release_by_id(const char* ta, const tapi_cpu_index_t* cpu_id);
te_errno tapi_cfg_cpu_grab_by_prop(const char* ta, const tapi_cpu_prop_t* prop, tapi_cpu_index_t* cpu_id);
te_errno tapi_cfg_get_cpu_cores(const char* ta, size_t* size, tapi_cpu_index_t** indices);
te_errno tapi_cfg_get_all_threads(const char* ta, size_t* size, tapi_cpu_index_t** indices);
te_errno tapi_cfg_cpu_get_nodes(const char* ta, size_t* n_nodes, tapi_cpu_index_t** nodes);
te_errno tapi_cfg_cpu_grab_multiple_with_id(const char* ta, const tapi_cpu_prop_t* prop, const tapi_cpu_index_t* topology, unsigned int n_cpus, tapi_cpu_index_t* cpu_ids);
te_errno tapi_cfg_cpu_grab_multiple_on_single_node(const char* ta, const tapi_cpu_prop_t* prop, unsigned int n_cpus, tapi_cpu_index_t* cpu_ids);
te_errno tapi_cfg_cpu_calculate_numjobs(const char* ta, const char* expr, unsigned int* n_jobs);
int tapi_cfg_dhcps_add_subnet(const char* ta, const struct sockaddr* subnet, int prefix_len, cfg_handle* handle);
int tapi_cfg_dhcps_add_host(const char* ta, const char* name, const char* group, const struct sockaddr* chaddr, const void* client_id, int client_id_len, const struct sockaddr* fixed_ip, const char* next_server, const char* filename, const char* flags, cfg_handle* handle);
int tapi_cfg_dhcps_add_host_gen(const char* ta, const char* name, const char* group, const struct sockaddr* chaddr, const void* client_id, int client_id_len, const struct sockaddr* fixed_ip, const char* next_server, const char* filename, const char* flags, const void* host_id, int host_id_len, const char* prefix6, cfg_handle* handle);
te_errno tapi_cfg_if_feature_is_readonly(const char* ta, const char* ifname, const char* feature_name, bool* readonly);
te_errno tapi_cfg_if_feature_is_present(const char* ta, const char* ifname, const char* feature_name, bool* present);
te_errno tapi_cfg_if_feature_get(const char* ta, const char* ifname, const char* feature_name, int* feature_value_out);
te_errno tapi_cfg_if_feature_set(const char* ta, const char* ifname, const char* feature_name, int feature_value);
te_errno tapi_cfg_if_feature_set_all_parents(const char* ta, const char* ifname, const char* feature_name, int feature_value);
te_errno tapi_cfg_if_deviceinfo_drivername_get(const char* ta, const char* ifname, char** drivername);
te_errno tapi_cfg_if_deviceinfo_driverversion_get(const char* ta, const char* ifname, char** driverversion);
te_errno tapi_cfg_if_deviceinfo_firmwareversion_get(const char* ta, const char* ifname, char** firmwareversion);
te_errno tapi_cfg_if_gro_get(const char* ta, const char* ifname, int* gro);
te_errno tapi_cfg_if_gso_get(const char* ta, const char* ifname, int* gso);
te_errno tapi_cfg_if_tso_get(const char* ta, const char* ifname, int* tso);
te_errno tapi_cfg_if_flags_get(const char* ta, const char* ifname, int* flags);
te_errno tapi_cfg_if_get_ring_size(const char* ta, const char* ifname, bool is_rx, int64_t* ring_size);
te_errno tapi_cfg_if_get_max_ring_size(const char* ta, const char* ifname, bool is_rx, int64_t* max_ring_size);
te_errno tapi_cfg_if_gro_set(const char* ta, const char* ifname, int gro);
te_errno tapi_cfg_if_gso_set(const char* ta, const char* ifname, int gso);
te_errno tapi_cfg_if_tso_set(const char* ta, const char* ifname, int tso);
te_errno tapi_cfg_if_flags_set(const char* ta, const char* ifname, int flags);
te_errno tapi_cfg_if_set_ring_size(const char* ta, const char* ifname, bool is_rx, int64_t ring_size);
te_errno tapi_cfg_if_set_ring_size_to_max(const char* ta, const char* ifname, bool is_rx, int64_t* ring_size);
te_errno tapi_cfg_if_reset(const char* ta, const char* ifname);
te_errno tapi_cfg_if_msglvl_get(const char* ta, const char* ifname, uint64_t* msglvl);
te_errno tapi_cfg_if_msglvl_set(const char* ta, const char* ifname, uint64_t msglvl);
te_errno tapi_cfg_if_priv_flag_get(const char* ta, const char* if_name, const char* flag_name, bool* state);
te_errno tapi_cfg_if_priv_flag_set(const char* ta, const char* if_name, const char* flag_name, bool state);
te_errno tapi_cfg_if_chan_cur_get(const char* ta, const char* if_name, tapi_cfg_if_chan chan_type, int* num);
te_errno tapi_cfg_if_chan_max_get(const char* ta, const char* if_name, tapi_cfg_if_chan chan_type, int* num);
te_errno tapi_cfg_if_chan_cur_set(const char* ta, const char* if_name, tapi_cfg_if_chan chan_type, int num);
te_errno tapi_cfg_if_coalesce_get(const char* ta, const char* if_name, const char* param, uint64_t* val);
te_errno tapi_cfg_if_coalesce_set(const char* ta, const char* if_name, const char* param, uint64_t val);
te_errno tapi_cfg_if_coalesce_set_local(const char* ta, const char* if_name, const char* param, uint64_t val);
te_errno tapi_cfg_if_coalesce_commit(const char* ta, const char* if_name);
te_errno tapi_cfg_if_fc_autoneg_get(const char* ta, const char* ifname, int* autoneg);
te_errno tapi_cfg_if_fc_autoneg_set(const char* ta, const char* ifname, int autoneg);
te_errno tapi_cfg_if_fc_autoneg_set_local(const char* ta, const char* ifname, int autoneg);
te_errno tapi_cfg_if_fc_rx_get(const char* ta, const char* ifname, int* rx);
te_errno tapi_cfg_if_fc_rx_set(const char* ta, const char* ifname, int rx);
te_errno tapi_cfg_if_fc_rx_set_local(const char* ta, const char* ifname, int rx);
te_errno tapi_cfg_if_fc_tx_get(const char* ta, const char* ifname, int* tx);
te_errno tapi_cfg_if_fc_tx_set(const char* ta, const char* ifname, int tx);
te_errno tapi_cfg_if_fc_tx_set_local(const char* ta, const char* ifname, int tx);
te_errno tapi_cfg_if_fc_commit(const char* ta, const char* if_name);
te_errno tapi_cfg_if_fc_get(const char* ta, const char* ifname, tapi_cfg_if_fc* params);
te_errno tapi_cfg_if_fc_set(const char* ta, const char* ifname, tapi_cfg_if_fc* params);
te_errno tapi_cfg_if_rss_rx_queues_get(const char* ta, const char* if_name, int* rx_queues);
te_errno tapi_cfg_if_rss_hash_key_get(const char* ta, const char* if_name, unsigned int rss_context, uint8_t** buf, size_t* len);
te_errno tapi_cfg_if_rss_hash_key_set_local(const char* ta, const char* if_name, unsigned int rss_context, const uint8_t* buf, size_t len);
te_errno tapi_cfg_if_rss_hash_key_set(const char* ta, const char* if_name, unsigned int rss_context, const uint8_t* buf, size_t len);
te_errno tapi_cfg_if_rss_indir_table_size(const char* ta, const char* if_name, unsigned int rss_context, unsigned int* size);
te_errno tapi_cfg_if_rss_indir_get(const char* ta, const char* if_name, unsigned int rss_context, unsigned int idx, int* val);
te_errno tapi_cfg_if_rss_indir_set_local(const char* ta, const char* if_name, unsigned int rss_context, unsigned int idx, int val);
te_errno tapi_cfg_if_rss_indir_default_set_local(const char* ta, const char* if_name);
te_errno tapi_cfg_if_rss_indir_default_set(const char* ta, const char* if_name);
te_errno tapi_cfg_if_rss_hash_indir_commit(const char* ta, const char* if_name, unsigned int rss_context);
te_errno tapi_cfg_if_rss_fill_indir_table(const char* ta, const char* if_name, unsigned int rss_context, unsigned int queue_from, unsigned int queue_to);
te_errno tapi_cfg_if_rss_print_indir_table(const char* ta, const char* if_name, unsigned int rss_context);
te_errno tapi_cfg_if_rss_hfuncs_get(const char* ta, const char* if_name, unsigned int rss_context, tapi_cfg_if_rss_hfunc** hfuncs, unsigned int* hfuncs_num);
te_errno tapi_cfg_if_rss_hfunc_set_local(const char* ta, const char* if_name, unsigned int rss_context, const char* func_name, int state);
te_errno tapi_cfg_if_rss_hfunc_set_single_local(const char* ta, const char* if_name, unsigned int rss_context, const char* func_name);
te_errno tapi_cfg_ip6_get_linklocal_addr(const char* ta, const char* iface, struct sockaddr_in6* p_addr);
te_errno tapi_cfg_ip6_get_mcastall_addr(const char* ta, const char* iface, struct sockaddr_in6* p_addr);
te_errno tapi_cfg_get_rule_table(const char* ta, int addr_family, tapi_rt_ip_rule_entry** tbl, unsigned int* n);
te_errno tapi_cfg_add_rule(const char* ta, int addr_family, te_conf_ip_rule* ip_rule);
te_errno tapi_cfg_del_rule(const char* ta, int addr_family, uint32_t required, te_conf_ip_rule* ip_rule);
te_errno tapi_cfg_iptables_cmd(const char* ta, const char* ifname, unsigned int af, const char* table, const char* chain, const char* rule);
te_errno tapi_cfg_iptables_cmd_fmt(const char* ta, const char* ifname, unsigned int af, const char* table, const char* chain, const char* rule, ...);
te_errno tapi_cfg_iptables_rules(const char* ta, const char* ifname, unsigned int af, const char* table, const char* chain, const char* rules);
te_errno tapi_cfg_iptables_rules_fmt(const char* ta, const char* ifname, unsigned int af, const char* table, const char* chain, const char* rules, ...);
te_errno tapi_cfg_iptables_chain_set(const char* ta, const char* ifname, unsigned int af, const char* table, const char* chain, bool enable);
te_errno tapi_cfg_iptables_chain_add(const char* ta, const char* ifname, unsigned int af, const char* table, const char* chain, bool enable);
te_errno tapi_cfg_iptables_chain_del(const char* ta, const char* ifname, unsigned int af, const char* table, const char* chain);
bool tapi_cfg_key_exists(const char* ta, const char* key_name);
te_errno tapi_cfg_key_add(const char* ta, const char* key_name, tapi_cfg_key_manager manager, tapi_cfg_key_type type, tapi_cfg_key_size size, tapi_cfg_key_mode mode);
unsigned tapi_cfg_key_get_bitsize(const char* ta, const char* key_name);
char* tapi_cfg_key_get_private_key_path(const char* ta, const char* key_name);
char* tapi_cfg_key_get_public_key(const char* ta, const char* key_name);
te_errno tapi_cfg_key_del(const char* ta, const char* key_name);
te_errno tapi_cfg_key_append_public(const char* ta, const char* key_name, const char* dst_ta, const char* list_name);
te_errno tapi_cfg_l2tp_server_set(const char* ta, int status);
te_errno tapi_cfg_l2tp_server_get(const char* ta, int* status);
te_errno tapi_cfg_l2tp_lns_add(const char* ta, const char* lns);
te_errno tapi_cfg_l2tp_tunnel_ip_get(const char* ta, const char* lns, struct sockaddr** addr);
te_errno tapi_cfg_l2tp_tunnel_ip_set(const char* ta, const char* lns, const struct sockaddr* addr);
te_errno tapi_cfg_l2tp_listen_ip_get(const char* ta, struct sockaddr** addr);
te_errno tapi_cfg_l2tp_listen_ip_set(const char* ta, const struct sockaddr* addr);
te_errno tapi_cfg_l2tp_port_get(const char* ta, int* port);
te_errno tapi_cfg_l2tp_port_set(const char* ta, int port);
te_errno tapi_cfg_l2tp_lns_range_add(const char* ta, const char* lns, const l2tp_ipaddr_range* iprange, enum l2tp_iprange_class kind);
te_errno tapi_cfg_l2tp_lns_range_del(const char* ta, const char* lns, const l2tp_ipaddr_range* iprange, enum l2tp_iprange_class kind);
te_errno tapi_cfg_l2tp_lns_connected_get(const char* ta, const char* lns, struct sockaddr*** connected);
te_errno tapi_cfg_l2tp_lns_bit_add(const char* ta, const char* lns, enum l2tp_bit bit, bool value);
te_errno tapi_cfg_l2tp_lns_bit_del(const char* ta, const char* lns, enum l2tp_bit* bit);
te_errno tapi_cfg_l2tp_lns_bit_get(const char* ta, const char* lns, enum l2tp_bit* bit_name, char* selector);
te_errno tapi_cfg_l2tp_lns_add_auth(const char* ta, const char* lns, l2tp_auth param, bool value);
te_errno tapi_cfg_l2tp_lns_del_auth(const char* ta, const char* lns, l2tp_auth param);
te_errno tapi_cfg_l2tp_lns_secret_add(const char* ta, const char* lns, const l2tp_ppp_secret* secret);
te_errno tapi_cfg_l2tp_lns_secret_delete(const char* ta, const char* lns, const l2tp_ppp_secret* secret);
te_errno tapi_cfg_l2tp_lns_set_use_challenge(const char* ta, const char* lns, bool value);
te_errno tapi_cfg_l2tp_lns_get_use_challenge(const char* ta, const char* lns, bool* value);
te_errno tapi_cfg_l2tp_lns_set_unix_auth(const char* ta, const char* lns, bool value);
te_errno tapi_cfg_l2tp_lns_get_unix_auth(const char* ta, const char* lns, bool* value);
te_errno tapi_cfg_l2tp_lns_mtu_set(const char* ta, const char* lns, int value);
te_errno tapi_cfg_l2tp_lns_mtu_get(const char* ta, const char* lns, int* value);
te_errno tapi_cfg_l2tp_lns_mru_set(const char* ta, const char* lns, int value);
te_errno tapi_cfg_l2tp_lns_mru_get(const char* ta, const char* lns, int* value);
te_errno tapi_cfg_l2tp_lns_lcp_echo_failure_set(const char* ta, const char* lns, int value);
te_errno tapi_cfg_l2tp_lns_lcp_echo_failure_get(const char* ta, const char* lns, int* value);
te_errno tapi_cfg_l2tp_lns_lcp_echo_interval_set(const char* ta, const char* lns, int value);
te_errno tapi_cfg_l2tp_lns_lcp_echo_interval_get(const char* ta, const char* lns, int* value);
te_errno tapi_cfg_l2tp_lns_pppopt_add(const char* ta, const char* lns, const char* pparam);
te_errno tapi_cfg_l2tp_lns_pppopt_del(const char* ta, const char* lns, const char* pparam);
static te_errno tapi_no_reuse_pco_disable_once(void);
static te_errno tapi_no_reuse_pco_reset(void);
static te_errno tapi_no_reuse_pco_get(bool* no_reuse_pco);
te_errno tapi_cfg_get_memory(const char* ta, int node_id, uint64_t* memory);
te_errno tapi_cfg_get_free_memory(const char* ta, int node_id, uint64_t* avail_mem);
te_errno tapi_cfg_module_add(const char* ta_name, const char* mod_name, bool load);
te_errno tapi_cfg_module_load(const char* ta_name, const char* mod_name);
te_errno tapi_cfg_module_unload(const char* ta_name, const char* mod_name);
te_errno tapi_cfg_module_filename_set(const char* ta_name, const char* mod_name, const char* filename);
te_errno tapi_cfg_module_param_add(const char* ta_name, const char* mod_name, const char* param, const char* param_value);
te_errno tapi_cfg_module_int_param_add(const char* ta_name, const char* mod_name, const char* param, int param_value);
te_errno tapi_cfg_module_params_add(const char* ta_name, const char* mod_name, ...);
te_errno tapi_cfg_module_int_params_add(const char* ta_name, const char* mod_name, ...);
te_errno tapi_cfg_module_param_get(const char* ta_name, const char* mod_name, const char* param_name, char** param_value);
te_errno tapi_cfg_module_param_get_int(const char* ta_name, const char* mod_name, const char* param_name, int* param_value);
te_errno tapi_cfg_module_add_from_ta_dir(const char* ta_name, const char* module_name, bool load_dependencies);
te_errno tapi_cfg_module_add_from_ta_dir_or_fallback(const char* ta_name, const char* module_name, bool load_dependencies);
te_errno tapi_cfg_module_change_finish(const char* ta_name, const char* mod_name);
te_errno tapi_cfg_module_version_get(const char* ta_name, const char* module_name, char** version);
te_errno tapi_cfg_module_check_devices(const char* ta_name, const char* module_name, bool* all_grabbed);
void tapi_cfg_net_init_pci_info(cfg_net_pci_info_t* pci_info);
void tapi_cfg_net_free_pci_info(cfg_net_pci_info_t* pci_info);
enum net_node_rsrc_type tapi_cfg_net_get_node_rsrc_type(cfg_net_node_t* node);
te_errno tapi_cfg_net_get_net(cfg_handle net_handle, cfg_net_t* net);
te_errno tapi_cfg_net_get_nets(cfg_nets_t* nets);
void tapi_cfg_net_free_net(cfg_net_t* net);
void tapi_cfg_net_free_nets(cfg_nets_t* nets);
te_errno tapi_cfg_net_register_net(const char* name, cfg_net_t* net, ...);
te_errno tapi_cfg_net_unregister_net(const char* name, cfg_net_t* net);
int tapi_cfg_net_get_pairs(enum net_node_type first, enum net_node_type second, unsigned int* p_n_pairs, cfg_handle(**) p_pairs[2]);
int tapi_cfg_net_find_net_by_node(const char* oid, char* net);
int tapi_cfg_net_get_nodes_values(const char* net_name, enum net_node_type node_type, const char* ta_name, char*** oids);
void tapi_cfg_net_free_nodes_values(char** oids);
int tapi_cfg_net_get_switch_port(const char* ta_node, unsigned int* p_port);
te_errno tapi_cfg_net_remove_empty(void);
te_errno tapi_cfg_net_foreach_node(tapi_cfg_net_node_cb* cb, void* cookie);
te_errno tapi_cfg_net_bind_driver_by_node(enum net_node_type node_type, enum tapi_cfg_driver_type driver);
te_errno tapi_cfg_net_get_iut_if_pci_info(cfg_net_pci_info_t* iut_if_pci_info);
te_errno tapi_cfg_net_nodes_update_pci_fn_to_interface(enum net_node_type type);
te_errno tapi_cfg_net_nodes_switch_pci_fn_to_interface(enum net_node_type type);
te_errno tapi_cfg_net_reserve_all(void);
te_errno tapi_cfg_net_all_up(bool force);
te_errno tapi_cfg_net_delete_all_ip4_addresses(void);
te_errno tapi_cfg_net_delete_all_ip6_addresses(void);
te_errno tapi_cfg_net_all_check_mtu(void);
int tapi_cfg_net_assign_ip(unsigned int af, cfg_net_t* net, tapi_cfg_net_assigned* assigned);
te_errno tapi_cfg_net_unassign_ip(unsigned int af, cfg_net_t* net, tapi_cfg_net_assigned* assigned);
te_errno tapi_cfg_net_all_assign_ip(unsigned int af);
int tapi_cfg_net_assign_ip_one_end(unsigned int af, cfg_net_t* net, tapi_cfg_net_assigned* assigned);
cfg_net_node_t* tapi_cfg_net_get_gateway(const cfg_net_t* net_src, const cfg_net_t* net_tgt);
te_errno tapi_cfg_net_assigned_get_subnet_ip(tapi_cfg_net_assigned* assigned, struct sockaddr** addr, unsigned int* prefix_len);
te_errno tapi_cfg_net_delete_all(void);
te_errno tapi_cfg_net_create_routes(unsigned int af);
te_errno tapi_cfg_net_create_nat(unsigned int af);
te_errno tapi_cfg_net_node_get_pci_oids(const cfg_net_node_t* node, unsigned int* n_pci, char*** pci_oids);
te_errno tapi_cfg_net_node_interface(const char* node_value, char** iface_name);
te_errno tapi_cfg_netem_get_param(const char* ta, const char* if_name, const char* param, char** value);
te_errno tapi_cfg_netem_set_param(const char* ta, const char* if_name, const char* param, const char* value);
te_errno tapi_cfg_netem_set_delay(const char* ta, const char* if_name, uint32_t delay_us);
te_errno tapi_cfg_netem_get_delay(const char* ta, const char* if_name, uint32_t* delay_us);
te_errno tapi_cfg_netem_set_jitter(const char* ta, const char* if_name, uint32_t jitter_us);
te_errno tapi_cfg_netem_get_jitter(const char* ta, const char* if_name, uint32_t* jitter_us);
te_errno tapi_cfg_netem_set_delay_correlation(const char* ta, const char* if_name, double delay_correlation);
te_errno tapi_cfg_netem_get_delay_correlation(const char* ta, const char* if_name, double* delay_correlation);
te_errno tapi_cfg_netem_set_loss(const char* ta, const char* if_name, double loss);
te_errno tapi_cfg_netem_get_loss(const char* ta, const char* if_name, double* loss);
te_errno tapi_cfg_netem_set_loss_correlation(const char* ta, const char* if_name, double loss_correlation);
te_errno tapi_cfg_netem_get_loss_correlation(const char* ta, const char* if_name, double* loss_correlation);
te_errno tapi_cfg_netem_set_duplicate(const char* ta, const char* if_name, double duplicate);
te_errno tapi_cfg_netem_get_duplicate(const char* ta, const char* if_name, double* duplicate);
te_errno tapi_cfg_netem_set_duplicate_correlation(const char* ta, const char* if_name, double duplicate_correlation);
te_errno tapi_cfg_netem_get_duplicate_correclation(const char* ta, const char* if_name, double* duplicate_correlation);
te_errno tapi_cfg_netem_set_limit(const char* ta, const char* if_name, uint32_t limit);
te_errno tapi_cfg_netem_get_limit(const char* ta, const char* if_name, uint32_t* limit);
te_errno tapi_cfg_netem_set_gap(const char* ta, const char* if_name, uint32_t gap);
te_errno tapi_cfg_netem_get_gap(const char* ta, const char* if_name, uint32_t* gap);
te_errno tapi_cfg_netem_set_reorder_probability(const char* ta, const char* if_name, double reorder_probability);
te_errno tapi_cfg_netem_get_reorder_probability(const char* ta, const char* if_name, double* reorder_probability);
te_errno tapi_cfg_netem_set_reorder_correlation(const char* ta, const char* if_name, double reorder_correlation);
te_errno tapi_cfg_netem_get_reorder_correlation(const char* ta, const char* if_name, double* reorder_correlation);
te_errno tapi_cfg_netem_set_corruption_probability(const char* ta, const char* if_name, double corruption_probability);
te_errno tapi_cfg_netem_get_corruption_probability(const char* ta, const char* if_name, double* corruption_probability);
te_errno tapi_cfg_netem_set_corruption_correlation(const char* ta, const char* if_name, double corruption_correlation);
te_errno tapi_cfg_netem_get_corruption_correlation(const char* ta, const char* if_name, double* corruption_correlation);
te_errno tapi_cfg_nginx_add(const char* ta, const char* inst_name);
te_errno tapi_cfg_nginx_del(const char* ta, const char* inst_name);
te_errno tapi_cfg_nginx_enable(const char* ta, const char* inst_name);
te_errno tapi_cfg_nginx_disable(const char* ta, const char* inst_name);
te_errno tapi_cfg_nginx_cmd_prefix_get(const char* ta, const char* inst_name, char** cmd_prefix);
te_errno tapi_cfg_nginx_cmd_prefix_set(const char* ta, const char* inst_name, const char* cmd_prefix);
te_errno tapi_cfg_nginx_config_path_get(const char* ta, const char* inst_name, char** config_path);
te_errno tapi_cfg_nginx_error_log_path_get(const char* ta, const char* inst_name, char** error_log);
te_errno tapi_cfg_nginx_error_log_enable(const char* ta, const char* inst_name);
te_errno tapi_cfg_nginx_error_log_disable(const char* ta, const char* inst_name);
te_errno tapi_cfg_nginx_wrk_ps_num_get(const char* ta, const char* inst_name, unsigned int* wrk_ps_num);
te_errno tapi_cfg_nginx_wrk_ps_num_set(const char* ta, const char* inst_name, unsigned int wrk_ps_num);
te_errno tapi_cfg_nginx_wrk_cpu_aff_mode_get(const char* ta, const char* inst_name, te_nginx_cpu_aff_mode* wrk_cpu_aff_mode);
te_errno tapi_cfg_nginx_wrk_cpu_aff_mode_set(const char* ta, const char* inst_name, te_nginx_cpu_aff_mode wrk_cpu_aff_mode);
te_errno tapi_cfg_nginx_wrk_cpu_aff_mask_get(const char* ta, const char* inst_name, char** wrk_cpu_aff_mask);
te_errno tapi_cfg_nginx_wrk_cpu_aff_mask_set(const char* ta, const char* inst_name, const char* wrk_cpu_aff_mask);
te_errno tapi_cfg_nginx_wrk_rlimit_nofile_get(const char* ta, const char* inst_name, unsigned int* wrk_rlimit_nofile);
te_errno tapi_cfg_nginx_wrk_rlimit_nofile_set(const char* ta, const char* inst_name, unsigned int wrk_rlimit_nofile);
te_errno tapi_cfg_nginx_evt_wrk_conn_num_get(const char* ta, const char* inst_name, unsigned int* evt_wrk_conn_num);
te_errno tapi_cfg_nginx_evt_wrk_conn_num_set(const char* ta, const char* inst_name, unsigned int evt_wrk_conn_num);
te_errno tapi_cfg_nginx_evt_method_get(const char* ta, const char* inst_name, char** evt_method);
te_errno tapi_cfg_nginx_evt_method_set(const char* ta, const char* inst_name, const char* evt_method);
te_errno tapi_cfg_nginx_evt_multi_accept_get(const char* ta, const char* inst_name, bool* evt_multi_accept);
te_errno tapi_cfg_nginx_evt_multi_accept_enable(const char* ta, const char* inst_name);
te_errno tapi_cfg_nginx_evt_accept_mutex_disable(const char* ta, const char* inst_name);
te_errno tapi_cfg_nginx_evt_accept_mutex_get(const char* ta, const char* inst_name, bool* evt_accept_mutex);
te_errno tapi_cfg_nginx_evt_accept_mutex_enable(const char* ta, const char* inst_name);
te_errno tapi_cfg_nginx_http_server_add(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_del(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_access_log_path_get(const char* ta, const char* inst_name, const char* srv_name, char** access_log);
te_errno tapi_cfg_nginx_http_server_access_log_enable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_access_log_disable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_ssl_name_get(const char* ta, const char* inst_name, const char* srv_name, char** ssl_name);
te_errno tapi_cfg_nginx_http_server_ssl_name_set(const char* ta, const char* inst_name, const char* srv_name, const char* ssl_name);
te_errno tapi_cfg_nginx_http_server_hostname_get(const char* ta, const char* inst_name, const char* srv_name, char** hostname);
te_errno tapi_cfg_nginx_http_server_hostname_set(const char* ta, const char* inst_name, const char* srv_name, const char* hostname);
te_errno tapi_cfg_nginx_http_server_mime_type_def_get(const char* ta, const char* inst_name, const char* srv_name, char** mime_type_def);
te_errno tapi_cfg_nginx_http_server_mime_type_def_set(const char* ta, const char* inst_name, const char* srv_name, const char* mime_type_def);
te_errno tapi_cfg_nginx_http_server_keepalive_timeout_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* keepalive_timeout);
te_errno tapi_cfg_nginx_http_server_keepalive_timeout_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int keepalive_timeout);
te_errno tapi_cfg_nginx_http_server_keepalive_requests_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* keepalive_requests);
te_errno tapi_cfg_nginx_http_server_keepalive_requests_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int keepalive_requests);
te_errno tapi_cfg_nginx_http_server_send_timeout_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* send_timeout);
te_errno tapi_cfg_nginx_http_server_send_timeout_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int send_timeout);
te_errno tapi_cfg_nginx_http_server_tokens_mode_get(const char* ta, const char* inst_name, const char* srv_name, te_nginx_server_tokens_mode* tokens_mode);
te_errno tapi_cfg_nginx_http_server_tokens_mode_set(const char* ta, const char* inst_name, const char* srv_name, te_nginx_server_tokens_mode tokens_mode);
te_errno tapi_cfg_nginx_http_server_sendfile_get(const char* ta, const char* inst_name, const char* srv_name, bool* sendfile);
te_errno tapi_cfg_nginx_http_server_sendfile_enable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_sendfile_disable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_tcp_nopush_get(const char* ta, const char* inst_name, const char* srv_name, bool* tcp_nopush);
te_errno tapi_cfg_nginx_http_server_tcp_nopush_enable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_tcp_nopush_disable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_tcp_nodelay_get(const char* ta, const char* inst_name, const char* srv_name, bool* tcp_nodelay);
te_errno tapi_cfg_nginx_http_server_tcp_nodelay_enable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_tcp_nodelay_disable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_reset_timedout_conn_get(const char* ta, const char* inst_name, const char* srv_name, bool* reset_timedout_conn);
te_errno tapi_cfg_nginx_http_server_reset_timedout_conn_enable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_reset_timedout_conn_disable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_proxy_conn_timeout_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* proxy_conn_timeout);
te_errno tapi_cfg_nginx_http_server_proxy_conn_timeout_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int proxy_conn_timeout);
te_errno tapi_cfg_nginx_http_server_proxy_buf_num_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* proxy_buf_num);
te_errno tapi_cfg_nginx_http_server_proxy_buf_num_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int proxy_buf_num);
te_errno tapi_cfg_nginx_http_server_proxy_buf_def_size_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* proxy_buf_def_size);
te_errno tapi_cfg_nginx_http_server_proxy_buf_def_size_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int proxy_buf_def_size);
te_errno tapi_cfg_nginx_http_server_proxy_buf_init_size_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* proxy_buf_init_size);
te_errno tapi_cfg_nginx_http_server_proxy_buf_init_size_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int proxy_buf_init_size);
te_errno tapi_cfg_nginx_http_server_proxy_buf_get(const char* ta, const char* inst_name, const char* srv_name, bool* proxy_buf);
te_errno tapi_cfg_nginx_http_server_proxy_buf_enable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_proxy_buf_disable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_file_cache_max_num_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* file_cache_max_num);
te_errno tapi_cfg_nginx_http_server_file_cache_max_num_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int file_cache_max_num);
te_errno tapi_cfg_nginx_http_server_file_cache_inactive_time_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* file_cache_inactive_time);
te_errno tapi_cfg_nginx_http_server_file_cache_inactive_time_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int file_cache_inactive_time);
te_errno tapi_cfg_nginx_http_server_file_cache_valid_time_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* file_cache_valid_time);
te_errno tapi_cfg_nginx_http_server_file_cache_valid_time_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int file_cache_valid_time);
te_errno tapi_cfg_nginx_http_server_file_cache_errors_get(const char* ta, const char* inst_name, const char* srv_name, bool* file_cache_errors);
te_errno tapi_cfg_nginx_http_server_file_cache_errors_enable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_file_cache_errors_disable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_file_cache_get(const char* ta, const char* inst_name, const char* srv_name, bool* file_cache);
te_errno tapi_cfg_nginx_http_server_file_cache_enable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_file_cache_disable(const char* ta, const char* inst_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_server_client_body_timeout_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* client_body_timeout);
te_errno tapi_cfg_nginx_http_server_client_body_timeout_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int client_body_timeout);
te_errno tapi_cfg_nginx_http_server_client_body_max_size_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* client_body_max_size);
te_errno tapi_cfg_nginx_http_server_client_body_max_size_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int client_body_max_size);
te_errno tapi_cfg_nginx_http_server_client_header_timeout_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* client_header_timeout);
te_errno tapi_cfg_nginx_http_server_client_header_timeout_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int client_header_timeout);
te_errno tapi_cfg_nginx_http_server_client_header_buffer_size_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* client_header_buffer_size);
te_errno tapi_cfg_nginx_http_server_client_header_buffer_size_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int client_header_buffer_size);
te_errno tapi_cfg_nginx_http_server_client_large_header_buffer_num_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* client_large_header_buffer_num);
te_errno tapi_cfg_nginx_http_server_client_large_header_buffer_num_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int client_large_header_buffer_num);
te_errno tapi_cfg_nginx_http_server_client_large_header_buffer_size_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* client_large_header_buffer_size);
te_errno tapi_cfg_nginx_http_server_client_large_header_buffer_size_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int client_large_header_buffer_size);
te_errno tapi_cfg_nginx_http_listen_entry_add(const char* ta, const char* inst_name, const char* srv_name, const char* entry_name, const char* addr_spec);
te_errno tapi_cfg_nginx_http_listen_entry_del(const char* ta, const char* inst_name, const char* srv_name, const char* entry_name);
te_errno tapi_cfg_nginx_http_listen_entry_ssl_enable(const char* ta, const char* inst_name, const char* srv_name, const char* entry_name);
te_errno tapi_cfg_nginx_http_listen_entry_ssl_disable(const char* ta, const char* inst_name, const char* srv_name, const char* entry_name);
te_errno tapi_cfg_nginx_http_listen_entry_reuseport_enable(const char* ta, const char* inst_name, const char* srv_name, const char* entry_name);
te_errno tapi_cfg_nginx_http_listen_entry_reuseport_disable(const char* ta, const char* inst_name, const char* srv_name, const char* entry_name);
te_errno tapi_cfg_nginx_http_loc_add(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* uri);
te_errno tapi_cfg_nginx_http_loc_del(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name);
te_errno tapi_cfg_nginx_http_loc_proxy_hdr_add(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* hdr_name, const char* hdr_value);
te_errno tapi_cfg_nginx_http_loc_proxy_hdr_del(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* hdr_name);
te_errno tapi_cfg_nginx_http_loc_uri_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** uri);
te_errno tapi_cfg_nginx_http_loc_uri_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* uri);
te_errno tapi_cfg_nginx_http_loc_ret_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** ret);
te_errno tapi_cfg_nginx_http_loc_ret_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* ret);
te_errno tapi_cfg_nginx_http_loc_index_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** index);
te_errno tapi_cfg_nginx_http_loc_index_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* index);
te_errno tapi_cfg_nginx_http_loc_root_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** root);
te_errno tapi_cfg_nginx_http_loc_root_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* root);
te_errno tapi_cfg_nginx_http_loc_proxy_ssl_name_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** proxy_ssl_name);
te_errno tapi_cfg_nginx_http_loc_proxy_ssl_name_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* proxy_ssl_name);
te_errno tapi_cfg_nginx_http_loc_proxy_pass_url_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** proxy_pass_url);
te_errno tapi_cfg_nginx_http_loc_proxy_pass_url_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* proxy_pass_url);
te_errno tapi_cfg_nginx_http_loc_proxy_http_vers_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** proxy_http_vers);
te_errno tapi_cfg_nginx_http_loc_proxy_http_vers_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* proxy_http_vers);
te_errno tapi_cfg_nginx_http_loc_ssl_name_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** ssl_name);
te_errno tapi_cfg_nginx_http_loc_ssl_name_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* ssl_name);
te_errno tapi_cfg_nginx_http_upstream_add(const char* ta, const char* inst_name, const char* us_name);
te_errno tapi_cfg_nginx_http_upstream_del(const char* ta, const char* inst_name, const char* us_name);
te_errno tapi_cfg_nginx_http_upstream_keepalive_num_get(const char* ta, const char* inst_name, const char* us_name, unsigned int* keepalive_num);
te_errno tapi_cfg_nginx_http_upstream_keepalive_num_set(const char* ta, const char* inst_name, const char* us_name, unsigned int keepalive_num);
te_errno tapi_cfg_nginx_http_us_server_add(const char* ta, const char* inst_name, const char* us_name, const char* srv_name, const char* addr_spec);
te_errno tapi_cfg_nginx_http_us_server_del(const char* ta, const char* inst_name, const char* us_name, const char* srv_name);
te_errno tapi_cfg_nginx_http_us_server_weight_get(const char* ta, const char* inst_name, const char* us_name, const char* srv_name, unsigned int* weight);
te_errno tapi_cfg_nginx_http_us_server_weight_set(const char* ta, const char* inst_name, const char* us_name, const char* srv_name, unsigned int weight);
te_errno tapi_cfg_nginx_ssl_add(const char* ta, const char* inst_name, const char* ssl_name);
te_errno tapi_cfg_nginx_ssl_del(const char* ta, const char* inst_name, const char* ssl_name);
te_errno tapi_cfg_nginx_ssl_cert_get(const char* ta, const char* inst_name, const char* ssl_name, char** cert);
te_errno tapi_cfg_nginx_ssl_cert_set(const char* ta, const char* inst_name, const char* ssl_name, const char* cert);
te_errno tapi_cfg_nginx_ssl_key_get(const char* ta, const char* inst_name, const char* ssl_name, char** key);
te_errno tapi_cfg_nginx_ssl_key_set(const char* ta, const char* inst_name, const char* ssl_name, const char* key);
te_errno tapi_cfg_nginx_ssl_ciphers_get(const char* ta, const char* inst_name, const char* ssl_name, char** ciphers);
te_errno tapi_cfg_nginx_ssl_ciphers_set(const char* ta, const char* inst_name, const char* ssl_name, const char* ciphers);
te_errno tapi_cfg_nginx_ssl_protocols_get(const char* ta, const char* inst_name, const char* ssl_name, char** protocols);
te_errno tapi_cfg_nginx_ssl_protocols_set(const char* ta, const char* inst_name, const char* ssl_name, const char* protocols);
te_errno tapi_cfg_nginx_ssl_session_cache_get(const char* ta, const char* inst_name, const char* ssl_name, char** session_cache);
te_errno tapi_cfg_nginx_ssl_session_cache_set(const char* ta, const char* inst_name, const char* ssl_name, const char* session_cache);
te_errno tapi_cfg_nginx_ssl_session_timeout_get(const char* ta, const char* inst_name, const char* ssl_name, unsigned int* session_timeout);
te_errno tapi_cfg_nginx_ssl_session_timeout_set(const char* ta, const char* inst_name, const char* ssl_name, unsigned int session_timeout);
te_errno tapi_cfg_openvpn_add(const char* ta, tapi_openvpn_id id);
te_errno tapi_cfg_openvpn_del(const char* ta, tapi_openvpn_id id);
te_errno tapi_cfg_openvpn_prop_set(const char* ta, tapi_openvpn_id id, const char* prop, cfg_val_type type, const void* val);
te_errno tapi_cfg_openvpn_prop_get(const char* ta, tapi_openvpn_id id, const char* prop, cfg_val_type type, void** val);
TAPI_OPENVPN_ACCESSOR(mode, "mode:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(key_direction, "key_direction:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(cipher, "cipher:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(digest, "digest:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(tls_key, "tls_key:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(ca, "ca:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(cert, "cert:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(key, "key:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(proto, "proto:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(interface_behind, "interface_behind:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(ip_facility, "ip_facility:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(server_dh, "server:/dh:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(ip, "server:/ip:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(subnet_mask, "server:/subnet_mask:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(server_pool_start, "server:/pool:/start:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(server_pool_end, "server:/pool:/end:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(client_username, "client:/username:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(client_password, "client:/password:", const char*, STRING);
TAPI_OPENVPN_ACCESSOR(status, "status:", int, INTEGER);
TAPI_OPENVPN_ACCESSOR(lzo, "lzo:", int, INTEGER);
TAPI_OPENVPN_ACCESSOR(port, "port:", int, INTEGER);
TAPI_OPENVPN_ACCESSOR(server_dh_size, "server:/dh:/size:", int, INTEGER);
TAPI_OPENVPN_ACCESSOR(server_require_certs, "server:/require_certs:", int, INTEGER);
TAPI_OPENVPN_ACCESSOR(is_server, "is_server:", int, INTEGER);
te_errno tapi_cfg_openvpn_enable(const char* ta, tapi_openvpn_id id);
te_errno tapi_cfg_openvpn_disable(const char* ta, tapi_openvpn_id id);
te_errno tapi_cfg_openvpn_endpoint_ip_get(const char* ta, tapi_openvpn_id id, struct sockaddr** addr);
te_errno tapi_cfg_openvpn_peer_add(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop peer);
te_errno tapi_cfg_openvpn_peer_del(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop peer);
te_errno tapi_cfg_openvpn_peer_port_get(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop peer, uint16_t* val);
te_errno tapi_cfg_openvpn_peer_port_set(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop peer, uint16_t val);
te_errno tapi_cfg_openvpn_user_add(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user);
te_errno tapi_cfg_openvpn_user_del(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user);
te_errno tapi_cfg_openvpn_user_username_get(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user, char** val);
te_errno tapi_cfg_openvpn_user_username_set(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user, const char* val);
te_errno tapi_cfg_openvpn_user_password_get(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user, char** val);
te_errno tapi_cfg_openvpn_user_password_set(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user, const char* val);
te_errno tapi_cfg_openvpn_user_certificate_get(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user, char** val);
te_errno tapi_cfg_openvpn_user_certificate_set(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user, const char* val);
te_errno tapi_cfg_openvpn_option_add(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop option, const char* val);
te_errno tapi_cfg_openvpn_option_del(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop option);
te_errno tapi_cfg_ovs_convert_eal_args(int argc, const char*const* argv, tapi_cfg_ovs_cfg* ovs_cfg);
te_errno tapi_cfg_pci_get_pci_vendor_device(const char* ta, const char* pci_addr, char** vendor, char** device);
te_errno tapi_cfg_pci_resolve_device_oid(char** pci_dev_oid, const char* pci_inst_fmt, ...);
te_errno te_errno tapi_cfg_pci_devices_by_vendor_device(const char* ta, const char* vendor, const char* device, unsigned int* size, char*** pci_oids);
te_errno tapi_cfg_pci_get_max_vfs_of_pf(const char* pf_oid, unsigned int* n_vfs);
te_errno tapi_cfg_pci_get_vfs_of_pf(const char* pf_oid, bool pci_device, unsigned int* n_pci_vfs, cfg_oid*** pci_vfs, unsigned int** pci_vf_ids);
te_errno tapi_cfg_pci_enable_vfs_of_pf(const char* pf_oid, unsigned int n_vfs);
te_errno tapi_cfg_pci_addr_by_oid(const cfg_oid* pci_device, char** pci_addr);
te_errno tapi_cfg_pci_addr_by_oid_array(unsigned int n_devices, const cfg_oid** pci_devices, char*** pci_addrs);
char* tapi_cfg_pci_rsrc_name(const cfg_oid* pci_instance);
char* tapi_cfg_pci_fn_netdev_rsrc_name(const cfg_oid* oid);
te_errno tapi_cfg_pci_grab(const cfg_oid* pci_instance);
te_errno tapi_cfg_pci_oid_by_addr(const char* ta, const char* pci_addr, char** pci_oid);
te_errno tapi_cfg_pci_instance_by_addr(const char* ta, const char* pci_addr, char** pci_inst);
te_errno tapi_cfg_pci_get_ta_driver(const char* ta, enum tapi_cfg_driver_type type, char** driver);
te_errno tapi_cfg_pci_get_devices(const char* pci_oid, unsigned int* count, char*** device_names);
te_errno tapi_cfg_pci_get_driver(const char* pci_oid, char** driver);
te_errno tapi_cfg_pci_bind_driver(const char* pci_oid, const char* driver);
te_errno tapi_cfg_pci_bind_ta_driver_on_device(const char* ta, enum tapi_cfg_driver_type type, const char* pci_addr);
te_errno tapi_cfg_pci_fn_netdev_get_net_if(const char* pci_fn_oid, const char* netdev, char** interface);
te_errno tapi_cfg_pci_get_net_if(const char* pci_oid, char** interface);
te_errno tapi_cfg_pci_oid_by_net_if(const char* ta, const char* if_name, char** pci_oid);
te_errno tapi_cfg_pci_get_numa_node(const char* pci_oid, char** numa_node);
te_errno tapi_cfg_pci_get_numa_node_id(const char* pci_oid, int* numa_node);
te_errno tapi_cfg_pci_bind_driver_by_vend_dev_inst(const char* ta, const char* vendor, const char* device, unsigned int instance, const char* driver);
te_errno tapi_cfg_pci_unbind_driver_by_vend_dev_inst(const char* ta, const char* vendor, const char* device, unsigned int instance);
te_errno tapi_cfg_pci_get_driver_by_vend_dev_inst(const char* ta, const char* vendor, const char* device, unsigned int instance, char** driver);
te_errno tapi_cfg_pci_get_serialno(const char* pci_oid, char** serialno);
te_errno tapi_cfg_pci_get_class(const char* pci_oid, unsigned int* class_id, unsigned int* subclass_id, unsigned int* intf_id);
te_errno tapi_cfg_pci_param_is_present(const char* pci_oid, const char* param_name, bool* present);
te_errno tapi_cfg_pci_get_param_str(const char* pci_oid, const char* param_name, tapi_cfg_pci_param_cmode cmode, char** value);
te_errno tapi_cfg_pci_get_param_uint(const char* pci_oid, const char* param_name, tapi_cfg_pci_param_cmode cmode, uint64_t* value);
te_errno tapi_cfg_pci_set_param_str(const char* pci_oid, const char* param_name, tapi_cfg_pci_param_cmode cmode, const char* value);
te_errno tapi_cfg_pci_set_param_uint(const char* pci_oid, const char* param_name, tapi_cfg_pci_param_cmode cmode, uint64_t value);
te_errno tapi_cfg_pci_get_vendor_dev_ids(const char* pci_oid, unsigned int* vendor_id, unsigned int* device_id, unsigned int* subsystem_vendor_id, unsigned int* subsystem_device_id);
te_errno tapi_cfg_pci_get_spdk_config_filename(const char* pci_oid, const char* cfg_name, bool create, char** filename);
te_errno tapi_cfg_phy_autoneg_get(const char* ta, const char* if_name, int* state);
te_errno tapi_cfg_phy_autoneg_set(const char* ta, const char* if_name, int state);
te_errno tapi_cfg_phy_duplex_oper_get(const char* ta, const char* if_name, int* state);
te_errno tapi_cfg_phy_duplex_admin_get(const char* ta, const char* if_name, int* state);
te_errno tapi_cfg_phy_duplex_admin_set(const char* ta, const char* if_name, int state);
te_errno tapi_cfg_phy_speed_oper_get(const char* ta, const char* if_name, int* speed);
te_errno tapi_cfg_phy_speed_admin_get(const char* ta, const char* if_name, int* speed);
te_errno tapi_cfg_phy_speed_admin_set(const char* ta, const char* if_name, int speed);
te_errno tapi_cfg_phy_mode_oper_get(const char* ta, const char* if_name, int* speed, int* duplex);
te_errno tapi_cfg_phy_mode_admin_get(const char* ta, const char* if_name, int* speed, int* duplex);
te_errno tapi_cfg_phy_mode_admin_set(const char* ta, const char* if_name, int speed, int duplex);
te_errno tapi_cfg_phy_state_get(const char* ta, const char* if_name, int* state);
te_errno tapi_cfg_phy_state_wait_up(const char* ta, const char* if_name, int timeout);
te_errno tapi_cfg_phy_is_mode_advertised(const char* ta, const char* if_name, int speed, int duplex, bool* state);
te_errno tapi_cfg_phy_advertise_mode(const char* ta, const char* if_name, int speed, int duplex, bool state);
te_errno tapi_cfg_phy_mode_supported(const char* ta, const char* if_name, const char* mode_name, bool* supported);
te_errno tapi_cfg_phy_mode_adv_get(const char* ta, const char* if_name, const char* mode_name, bool* state);
te_errno tapi_cfg_phy_mode_adv_set(const char* ta, const char* if_name, const char* mode_name, bool state);
te_errno tapi_cfg_phy_lp_advertised(const char* ta, const char* if_name, const char* mode_name, bool* advertised);
te_errno tapi_cfg_phy_commit(const char* ta, const char* if_name);
int tapi_cfg_phy_duplex_str2id(char* name);
char* tapi_cfg_phy_duplex_id2str(int duplex);
te_errno tapi_cfg_phy_advertise_one(const char* ta, const char* if_name, int advert_speed, int advert_duplex);
te_errno tapi_cfg_phy_pause_lp_adv_get(const char* ta, const char* if_name, int* state);
te_errno tapi_cfg_phy_autoneg_lp_adv_get(const char* ta, const char* if_name, int* state);
te_errno tapi_cfg_phy_autoneg_oper_get(const char* ta, const char* if_name, int* state);
te_errno tapi_cfg_phy_autoneg_admin_get(const char* ta, const char* if_name, int* state);
te_errno tapi_cfg_phy_autoneg_admin_set(const char* ta, const char* if_name, int state);
te_errno tapi_cfg_pppoe_server_if_add(const char* ta, const char* ifname);
te_errno tapi_cfg_pppoe_server_if_del(const char* ta, const char* ifname);
te_errno tapi_cfg_pppoe_server_subnet_set(const char* ta, const char* subnet);
te_errno tapi_cfg_pppoe_server_subnet_get(const char* ta, char** subnet_p);
void tapi_cfg_pppoe_server_laddr_get(const char* ta, struct sockaddr** addr);
void tapi_cfg_pppoe_server_raddr_get(const char* ta, struct sockaddr** addr);
te_errno tapi_cfg_ps_add(const char* ta, const char* ps_name, const char* exe, bool start);
te_errno tapi_cfg_ps_del(const char* ta, const char* ps_name);
te_errno tapi_cfg_ps_start(const char* ta, const char* ps_name);
te_errno tapi_cfg_ps_stop(const char* ta, const char* ps_name);
te_errno tapi_cfg_ps_get_status(const char* ta, const char* ps_name, bool* status);
te_errno tapi_cfg_ps_add_arg(const char* ta, const char* ps_name, unsigned int order, const char* arg);
te_errno tapi_cfg_ps_add_env(const char* ta, const char* ps_name, const char* env_name, const char* value);
te_errno tapi_cfg_ps_add_opt(const char* ta, const char* ps_name, const char* opt_name, const char* value);
te_errno tapi_cfg_ps_set_long_opt_sep(const char* ta, const char* ps_name, const char* value);
te_errno tapi_cfg_ps_set_autorestart(const char* ta, const char* ps_name, unsigned int value);
te_errno tapi_cfg_ps_get_autorestart(const char* ta, const char* ps_name, unsigned int* value);
te_errno tapi_cfg_ps_set_workdir(const char* ta, const char* ps_name, const char* workdir);
te_errno tapi_cfg_ps_get_workdir(const char* ta, const char* ps_name, char** workdir);
te_errno tapi_cfg_ps_kill(const char* ta, const char* ps_name, int signo);
te_errno tapi_cfg_ps_killpg(const char* ta, const char* ps_name, int signo);
te_errno tapi_cfg_ps_wait(const char* ta, const char* ps_name, int timeout_ms, tapi_cfg_ps_exit_status_t* exit_status);
te_errno tapi_cfg_qdisc_get_enabled(const char* ta, const char* if_name, bool* enabled);
te_errno tapi_cfg_qdisc_set_enabled(const char* ta, const char* if_name, bool enabled);
static te_errno tapi_cfg_qdisc_enable(const char* ta, const char* if_name);
static te_errno tapi_cfg_qdisc_disable(const char* ta, const char* if_name);
te_errno tapi_cfg_qdisc_set_kind(const char* ta, const char* if_name, tapi_cfg_qdisc_kind_t kind);
te_errno tapi_cfg_qdisc_get_kind(const char* ta, const char* if_name, tapi_cfg_qdisc_kind_t* kind);
const char* tapi_cfg_qdisc_kind2str(tapi_cfg_qdisc_kind_t kind);
tapi_cfg_qdisc_kind_t tapi_cfg_qdisc_str2kind(const char* string);
te_errno tapi_cfg_qdisc_get_param(const char* ta, const char* if_name, const char* param, char** value);
te_errno tapi_cfg_qdisc_set_param(const char* ta, const char* if_name, const char* param, const char* value);
te_errno tapi_cfg_rx_rule_add(const char* ta, const char* if_name, int64_t location, tapi_cfg_rx_rule_flow flow_type);
te_errno tapi_cfg_rx_rule_rx_queue_set(const char* ta, const char* if_name, int64_t location, int64_t rxq);
te_errno tapi_cfg_rx_rule_rss_context_set(const char* ta, const char* if_name, int64_t location, int64_t context_id);
tapi_cfg_rx_rule_flow tapi_cfg_rx_rule_flow_by_socket(int af, rpc_socket_type sock_type);
te_errno tapi_cfg_rx_rule_flow_type_set(const char* ta, const char* if_name, int64_t location, tapi_cfg_rx_rule_flow flow_type);
TAPI_CFG_RX_RULE_FIELD_ACC(src_mac, struct sockaddr*);
TAPI_CFG_RX_RULE_FIELD_ACC(dst_mac, struct sockaddr*);
TAPI_CFG_RX_RULE_FIELD_ACC(ether_type, uint16_t);
TAPI_CFG_RX_RULE_FIELD_ACC(vlan_tpid, uint16_t);
TAPI_CFG_RX_RULE_FIELD_ACC(vlan_tci, uint16_t);
TAPI_CFG_RX_RULE_FIELD_ACC(data0, uint32_t);
TAPI_CFG_RX_RULE_FIELD_ACC(data1, uint32_t);
TAPI_CFG_RX_RULE_FIELD_ACC(src_l3_addr, struct sockaddr*);
TAPI_CFG_RX_RULE_FIELD_ACC(dst_l3_addr, struct sockaddr*);
TAPI_CFG_RX_RULE_FIELD_ACC(src_port, uint16_t);
TAPI_CFG_RX_RULE_FIELD_ACC(dst_port, uint16_t);
TAPI_CFG_RX_RULE_FIELD_ACC(tos_or_tclass, uint8_t);
TAPI_CFG_RX_RULE_FIELD_ACC(spi, uint32_t);
TAPI_CFG_RX_RULE_FIELD_ACC(l4_4_bytes, uint32_t);
TAPI_CFG_RX_RULE_FIELD_ACC(l4_proto, uint8_t);
te_errno tapi_cfg_rx_rule_fill_ip_addrs_ports(const char* ta, const char* if_name, int64_t location, int af, const struct sockaddr* src, const struct sockaddr* src_mask, const struct sockaddr* dst, const struct sockaddr* dst_mask);
te_errno tapi_cfg_rx_rule_commit(const char* ta, const char* if_name, int64_t location);
te_errno tapi_cfg_rx_rule_get_last_added(const char* ta, const char* if_name, int64_t* location);
te_errno tapi_cfg_rx_rule_del(const char* ta, const char* if_name, int64_t location);
te_errno tapi_cfg_rx_rule_flow_type_get(const char* ta, const char* if_name, int64_t location, tapi_cfg_rx_rule_flow* flow_type);
te_errno tapi_cfg_rx_rule_rx_queue_get(const char* ta, const char* if_name, int64_t location, int64_t* rxq);
te_errno tapi_cfg_rx_rule_rss_context_get(const char* ta, const char* if_name, int64_t location, int64_t* context_id);
te_errno tapi_cfg_rx_rule_spec_loc_get(const char* ta, const char* if_name, bool* value);
te_errno tapi_cfg_rx_rule_table_size_get(const char* ta, const char* if_name, uint32_t* size);
te_errno tapi_cfg_rx_rule_find_location(const char* ta, const char* if_name, unsigned int start, unsigned int end, int64_t* location);
te_errno tapi_cfg_socks_add(const char* ta, tapi_socks_id id);
te_errno tapi_cfg_socks_del(const char* ta, tapi_socks_id id);
te_errno tapi_cfg_socks_enable(const char* ta, tapi_socks_id id);
te_errno tapi_cfg_socks_disable(const char* ta, tapi_socks_id id);
te_errno tapi_cfg_socks_status_get(const char* ta, tapi_socks_id id, bool* value);
te_errno tapi_cfg_socks_status_set(const char* ta, tapi_socks_id id, bool value);
te_errno tapi_cfg_socks_impl_get(const char* ta, tapi_socks_id id, te_socks_impl* value);
te_errno tapi_cfg_socks_impl_set(const char* ta, tapi_socks_id id, te_socks_impl value);
te_errno tapi_cfg_socks_proto_add(const char* ta, tapi_socks_id id, tapi_socks_proto_id proto_id, int proto);
te_errno tapi_cfg_socks_proto_del(const char* ta, tapi_socks_id id, tapi_socks_proto_id proto_id);
te_errno tapi_cfg_socks_proto_get(const char* ta, tapi_socks_id id, tapi_socks_proto_id proto_id, int* value);
te_errno tapi_cfg_socks_proto_set(const char* ta, tapi_socks_id id, tapi_socks_proto_id proto_id, int value);
te_errno tapi_cfg_socks_interface_add(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, const char* value);
te_errno tapi_cfg_socks_interface_del(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id);
te_errno tapi_cfg_socks_interface_get(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, char** value);
te_errno tapi_cfg_socks_interface_set(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, const char* value);
te_errno tapi_cfg_socks_interface_port_get(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, uint16_t* value);
te_errno tapi_cfg_socks_interface_port_set(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, uint16_t value);
te_errno tapi_cfg_socks_interface_addr_family_get(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, int* value);
te_errno tapi_cfg_socks_interface_addr_family_set(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, int value);
te_errno tapi_cfg_socks_outbound_interface_get(const char* ta, tapi_socks_id id, char** value);
te_errno tapi_cfg_socks_outbound_interface_set(const char* ta, tapi_socks_id id, const char* value);
te_errno tapi_cfg_socks_cipher_get(const char* ta, tapi_socks_id id, char** value);
te_errno tapi_cfg_socks_cipher_set(const char* ta, tapi_socks_id id, const char* value);
te_errno tapi_cfg_socks_auth_get(const char* ta, tapi_socks_id id, char** value);
te_errno tapi_cfg_socks_auth_set(const char* ta, tapi_socks_id id, const char* value);
te_errno tapi_cfg_socks_user_add(const char* ta, tapi_socks_id id, tapi_socks_user_id user);
te_errno tapi_cfg_socks_user_del(const char* ta, tapi_socks_id id, tapi_socks_user_id user);
te_errno tapi_cfg_socks_user_next_hop_get(const char* ta, tapi_socks_id id, tapi_socks_user_id user, char** value);
te_errno tapi_cfg_socks_user_next_hop_set(const char* ta, tapi_socks_id id, tapi_socks_user_id user, const char* value);
te_errno tapi_cfg_socks_user_username_get(const char* ta, tapi_socks_id id, tapi_socks_user_id user, char** value);
te_errno tapi_cfg_socks_user_username_set(const char* ta, tapi_socks_id id, tapi_socks_user_id user, const char* value);
te_errno tapi_cfg_socks_user_password_get(const char* ta, tapi_socks_id id, tapi_socks_user_id user, char** value);
te_errno tapi_cfg_socks_user_password_set(const char* ta, tapi_socks_id id, tapi_socks_user_id user, const char* value);
te_errno tapi_cfg_stats_if_stats_get(const char* ta, const char* ifname, tapi_cfg_if_stats* stats);
te_errno tapi_cfg_stats_if_stats_print(const char* ta, const char* ifname, tapi_cfg_if_stats* stats);
te_errno tapi_cfg_stats_net_stats_get(const char* ta, tapi_cfg_net_stats* stats);
te_errno tapi_cfg_stats_net_stats_print(const char* ta, tapi_cfg_net_stats* stats);
te_errno tapi_cfg_sys_get_int(const char* ta, int* val, const char* fmt, ...);
te_errno te_errno tapi_cfg_sys_set_int(const char* ta, int val, int* old_val, const char* fmt, ...);
te_errno te_errno te_errno tapi_cfg_sys_get_uint64(const char* ta, uint64_t* val, const char* fmt, ...);
te_errno te_errno te_errno te_errno tapi_cfg_sys_set_uint64(const char* ta, uint64_t val, uint64_t* old_val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_get_str(const char* ta, char** val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_set_str(const char* ta, const char* val, char** old_val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_get_int(const char* ta, int* val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_set_int(const char* ta, int val, int* old_val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_get_uint64(const char* ta, uint64_t* val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_set_uint64(const char* ta, uint64_t val, uint64_t* old_val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_get_str(const char* ta, char** val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_set_str(const char* ta, const char* val, char** old_val, const char* fmt, ...);
te_errno tapi_cfg_tbf_get_rate(const char* ta, const char* if_name, uint32_t* rate);
te_errno tapi_cfg_tbf_set_rate(const char* ta, const char* if_name, uint32_t rate);
te_errno tapi_cfg_tbf_get_bucket(const char* ta, const char* if_name, uint32_t* bucket);
te_errno tapi_cfg_tbf_set_bucket(const char* ta, const char* if_name, uint32_t bucket);
te_errno tapi_cfg_tbf_get_cell(const char* ta, const char* if_name, uint32_t* cell);
te_errno tapi_cfg_tbf_set_cell(const char* ta, const char* if_name, uint32_t cell);
te_errno tapi_cfg_tbf_get_limit(const char* ta, const char* if_name, uint32_t* limit);
te_errno tapi_cfg_tbf_set_limit(const char* ta, const char* if_name, uint32_t limit);
te_errno tapi_cfg_tbf_get_latency(const char* ta, const char* if_name, uint32_t* latency_us);
te_errno tapi_cfg_tbf_set_latency(const char* ta, const char* if_name, uint32_t latency_us);
te_errno tapi_cfg_tbf_get_peakrate(const char* ta, const char* if_name, uint32_t* peakrate);
te_errno tapi_cfg_tbf_set_peakrate(const char* ta, const char* if_name, uint32_t peakrate);
te_errno tapi_cfg_tbf_get_mtu(const char* ta, const char* if_name, uint32_t* mtu);
te_errno tapi_cfg_tbf_set_mtu(const char* ta, const char* if_name, uint32_t mtu);
te_errno tapi_cfg_vm_add(const char* ta, const char* vm_name, const char* tmpl, bool start);
te_errno tapi_cfg_vm_del(const char* ta, const char* vm_name);
te_errno tapi_cfg_vm_start(const char* ta, const char* vm_name);
te_errno tapi_cfg_vm_stop(const char* ta, const char* vm_name);
te_errno tapi_cfg_vm_add_drive(const char* ta, const char* vm_name, const char* drive_name, const char* file, bool snapshot);
te_errno tapi_cfg_vm_pass_pci(const char* ta, const char* vm_name, const char* pci_pt_name, unsigned long vendor, unsigned long device, unsigned long instance);
te_errno tapi_cfg_vtund_create_tunnel(const char* ta_srv, const char* ta_clnt, const struct sockaddr* srv_addr, cfg_handle* ta_srv_if, cfg_handle* ta_clnt_if);
te_errno tapi_cfg_xen_get_path(char const* ta, char* path);
te_errno tapi_cfg_xen_set_path(char const* ta, char const* path);
te_errno tapi_cfg_xen_get_rcf_port(char const* ta, unsigned int* port);
te_errno tapi_cfg_xen_set_rcf_port(char const* ta, unsigned int port);
te_errno tapi_cfg_xen_get_rpc_br(char const* ta, char* br_name);
te_errno tapi_cfg_xen_set_rpc_br(char const* ta, char const* br_name);
te_errno tapi_cfg_xen_get_rpc_if(char const* ta, char* if_name);
te_errno tapi_cfg_xen_set_rpc_if(char const* ta, char const* if_name);
te_errno tapi_cfg_xen_get_base_mac_addr(char const* ta, uint8_t* mac);
te_errno tapi_cfg_xen_set_base_mac_addr(char const* ta, uint8_t const* mac);
te_errno tapi_cfg_xen_get_accel(char const* ta, bool* accel);
te_errno tapi_cfg_xen_set_accel(char const* ta, bool accel);
te_errno tapi_cfg_xen_set_init(char const* ta, bool init);
te_errno tapi_cfg_xen_create_dom_u(char const* ta, char const* dom_u);
te_errno tapi_cfg_xen_destroy_dom_u(char const* ta, char const* dom_u);
te_errno tapi_cfg_xen_dom_u_get_status(char const* ta, char const* dom_u, char* status);
te_errno tapi_cfg_xen_dom_u_set_status(char const* ta, char const* dom_u, char const* status);
te_errno tapi_cfg_xen_dom_u_get_memory_size(char const* ta, char const* dom_u, unsigned int* size);
te_errno tapi_cfg_xen_dom_u_set_memory_size(char const* ta, char const* dom_u, unsigned int size);
te_errno tapi_cfg_xen_dom_u_get_ip_addr(char const* ta, char const* dom_u, struct sockaddr* ip_addr);
te_errno tapi_cfg_xen_dom_u_set_ip_addr(char const* ta, char const* dom_u, struct sockaddr const* ip_addr);
te_errno tapi_cfg_xen_dom_u_get_mac_addr(char const* ta, char const* dom_u, uint8_t* mac);
te_errno tapi_cfg_xen_dom_u_set_mac_addr(char const* ta, char const* dom_u, uint8_t const* mac);
te_errno tapi_cfg_xen_dom_u_add_bridge(char const* ta, char const* dom_u, char const* bridge, char const* if_name);
te_errno tapi_cfg_xen_dom_u_del_bridge(char const* ta, char const* dom_u, char const* bridge);
te_errno tapi_cfg_xen_dom_u_bridge_get_if_name(char const* ta, char const* dom_u, char const* bridge, char* if_name);
te_errno tapi_cfg_xen_dom_u_bridge_set_if_name(char const* ta, char const* dom_u, char const* bridge, char const* if_name);
te_errno tapi_cfg_xen_dom_u_bridge_get_ip_addr(char const* ta, char const* dom_u, char const* bridge, struct sockaddr* ip_addr);
te_errno tapi_cfg_xen_dom_u_bridge_set_ip_addr(char const* ta, char const* dom_u, char const* bridge, struct sockaddr const* ip_addr);
te_errno tapi_cfg_xen_dom_u_bridge_get_mac_addr(char const* ta, char const* dom_u, char const* bridge, uint8_t* mac);
te_errno tapi_cfg_xen_dom_u_bridge_set_mac_addr(char const* ta, char const* dom_u, char const* bridge, uint8_t const* mac);
te_errno tapi_cfg_xen_dom_u_bridge_get_accel(char const* ta, char const* dom_u, char const* bridge, bool* accel);
te_errno tapi_cfg_xen_dom_u_bridge_set_accel(char const* ta, char const* dom_u, char const* bridge, bool accel);
te_errno tapi_cfg_xen_dom_u_migrate(char const* from_ta, char const* to_ta, char const* dom_u, char const* host, bool live);
char* tapi_file_make_name(te_string* dest);
char* tapi_file_make_custom_pathname(te_string* dest, const char* dirname, const char* suffix);
char* tapi_file_make_pathname(te_string* dest);
char* tapi_file_join_pathname(te_string* dest, const char* dirname, const char* path, const char* suffix);
char* tapi_file_resolve_ta_pathname(te_string* dest, const char* ta, tapi_cfg_base_ta_dir base_dir, const char* relname);
char* tapi_file_generate_name(void);
char* tapi_file_generate_pathname(void);
char* tapi_file_create_pattern(size_t len, char c);
char* tapi_file_create(size_t len, char* buf, bool random);
te_errno tapi_file_create_ta(const char* ta, const char* filename, const char* fmt, ...);
te_errno te_errno tapi_file_create_ta_r(const char* ta, const char* lfile, const char* rfile, const char* fmt, ...);
te_errno te_errno te_errno tapi_file_read_ta(const char* ta, const char* filename, char** pbuf);
te_errno tapi_file_append_ta(const char* ta, const char* filename, const char* fmt, ...);
te_errno te_errno tapi_file_copy_ta(const char* ta_src, const char* src, const char* ta_dst, const char* dst);
te_errno tapi_file_expand_kvpairs(const char* ta, const char* template, const char* posargs[TE_EXPAND_MAX_POS_ARGS], const te_kvpair_h* kvpairs, const char* filename_fmt, ...);
te_errno tapi_file_ta_unlink_fmt(const char* ta, const char* path_fmt, ...);
bool tapi_host_ns_enabled(void);
te_errno tapi_host_ns_get_host(const char* ta, char** host);
te_errno tapi_host_ns_agent_add(const char* host, const char* ta, const char* netns);
te_errno tapi_host_ns_agent_del(const char* ta);
te_errno tapi_host_ns_if_add(const char* ta, const char* ifname, const char* parent_ifname);
te_errno tapi_host_ns_if_del(const char* ta, const char* ifname, bool del_refs);
te_errno tapi_host_ns_if_parent_add(const char* ta, const char* ifname, const char* parent_ta, const char* parent_ifname);
te_errno tapi_host_ns_if_parent_del(const char* ta, const char* ifname, const char* parent_ta, const char* parent_ifname);
te_errno tapi_host_ns_if_change_ns(const char* ta, const char* ifname, const char* ns_name, const char* ns_ta);
te_errno tapi_host_ns_if_child_iter(const char* ta, const char* ifname, tapi_host_ns_if_cb_func cb, void* opaque);
te_errno tapi_host_ns_if_parent_iter(const char* ta, const char* ifname, tapi_host_ns_if_cb_func cb, void* opaque);
te_errno tapi_host_ns_if_ta_iter(const char* ta, tapi_host_ns_if_cb_func cb, void* opaque);
te_errno tapi_host_ns_if_host_iter(const char* host, tapi_host_ns_if_cb_func cb, void* opaque);
te_errno tapi_host_ns_agent_default(const char* ta, char** ta_default);
tapi_jmp_point* tapi_jmp_push(const char* file, unsigned int lineno);
int tapi_jmp_pop(const char* file, unsigned int lineno);
int tapi_jmp_do(int val, const char* file, unsigned int lineno);
bool tapi_jmp_stack_is_empty(void);
void* tapi_malloc(size_t size);
void* tapi_malloc_or_null(size_t size);
void* tapi_calloc(size_t nmemb, size_t size);
void* tapi_realloc(void* ptr, size_t size);
void* tapi_memdup(const void* ptr, size_t size);
char* tapi_strdup(const char* s);
char* tapi_strndup(const char* s, size_t size);
te_errno tapi_netns_add_rsrc(const char* ta, const char* ns_name);
te_errno tapi_netns_del_rsrc(const char* ta, const char* ns_name);
te_errno tapi_netns_add(const char* ta, const char* ns_name);
te_errno tapi_netns_del(const char* ta, const char* ns_name);
te_errno tapi_netns_if_set(const char* ta, const char* ns_name, const char* if_name);
te_errno tapi_netns_if_unset(const char* ta, const char* ns_name, const char* if_name);
te_errno tapi_netns_create_ns_with_net_channel(const char* ta, const char* ns_name, const char* veth1, const char* veth2, const char* ctl_if, int rcfport);
te_errno tapi_netns_add_ta(const char* host, const char* ns_name, const char* ta_name, const char* ta_type, int rcfport, const char* ta_conn, const char* ld_preload, bool ext_rcf_listener);
te_errno tapi_netns_create_ns_with_macvlan(const char* ta, const char* ns_name, const char* ctl_if, const char* macvlan_if, char* addr, size_t addr_len);
te_errno tapi_netns_destroy_ns_with_macvlan(const char* ta, const char* ns_name, const char* ctl_if, const char* macvlan_if);
te_errno tapi_netns_create_ns_with_ipvlan(const char* ta, const char* ns_name, const char* ctl_if, const char* ipvlan_if, char* addr, size_t addr_len);
te_errno tapi_netns_destroy_ns_with_ipvlan(const char* ta, const char* ns_name, const char* ctl_if, const char* ipvlan_if);
static void tapi_ntpd_enable(rcf_rpc_server* rpcs);
static void tapi_ntpd_disable(rcf_rpc_server* rpcs);
static bool tapi_ntpd_status(rcf_rpc_server* rpcs);
int tapi_cfg_net_route_flush(rcf_rpc_server* rpcs);
te_errno tapi_cfg_tcp_syncookies_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_tcp_syncookies_get(const char* ta, int* value);
te_errno tapi_cfg_tcp_timestamps_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_tcp_timestamps_get(const char* ta, int* value);
te_errno tapi_cfg_if_rp_filter_get(const char* ta, const char* ifname, int* rp_filter);
te_errno tapi_cfg_if_rp_filter_set(const char* ta, const char* ifname, int rp_filter, int* old_value);
te_errno tapi_cfg_if_all_rp_filter_get(const char* ta, int* rp_filter);
te_errno tapi_cfg_if_all_rp_filter_set(const char* ta, int rp_filter, int* old_value);
te_errno tapi_cfg_if_iface_ip4_fw_get(const char* ta, const char* ifname, int* iface_ip4_fw);
te_errno tapi_cfg_if_iface_ip4_fw_set(const char* ta, const char* ifname, int iface_ip4_fw, int* old_value);
te_errno tapi_cfg_if_arp_ignore_get(const char* ta, const char* ifname, int* arp_ignore);
te_errno tapi_cfg_if_arp_ignore_set(const char* ta, const char* ifname, int arp_ignore, int* old_value);
te_errno tapi_cfg_if_all_arp_ignore_get(const char* ta, int* arp_ignore);
te_errno tapi_cfg_if_all_arp_ignore_set(const char* ta, int arp_ignore, int* old_value);
te_errno tapi_cfg_tcp_keepalive_time_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_tcp_keepalive_time_get(const char* ta, int* value);
te_errno tapi_cfg_tcp_keepalive_probes_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_tcp_keepalive_probes_get(const char* ta, int* value);
te_errno tapi_cfg_tcp_keepalive_intvl_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_tcp_keepalive_intvl_get(const char* ta, int* value);
te_errno tapi_cfg_tcp_retries2_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_tcp_retries2_get(const char* ta, int* value);
te_errno tapi_cfg_tcp_orphan_retries_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_tcp_orphan_retries_get(const char* ta, int* value);
te_errno tapi_cfg_tcp_fin_timeout_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_tcp_fin_timeout_get(const char* ta, int* value);
te_errno tapi_cfg_tcp_synack_retries_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_tcp_synack_retries_get(const char* ta, int* value);
te_errno tapi_cfg_tcp_syn_retries_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_tcp_syn_retries_get(const char* ta, int* value);
te_errno tapi_cfg_core_busy_read_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_core_busy_read_get(const char* ta, int* value);
te_errno tapi_cfg_core_busy_poll_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_core_busy_poll_get(const char* ta, int* value);
te_errno tapi_cfg_core_somaxconn_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_core_somaxconn_get(const char* ta, int* value);
te_errno tapi_cfg_neigh_gc_thresh3_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_neigh_gc_thresh3_get(const char* ta, int* value);
te_errno tapi_cfg_igmp_max_memberships_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_igmp_max_memberships_get(const char* ta, int* value);
te_errno tapi_cfg_core_optmem_max_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_core_optmem_max_get(const char* ta, int* value);
te_errno tapi_cfg_tcp_max_syn_backlog_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_tcp_max_syn_backlog_get(const char* ta, int* value);
te_errno tapi_cfg_route_mtu_expires_set(const char* ta, int value, int* old_value);
te_errno tapi_cfg_route_mtu_expires_get(const char* ta, int* value);
te_errno tapi_reqs_modify(const char* reqs);
te_errno tapi_add_dynamic_arp(const char* ta_src, const char* ifname_src, const char* ta_dest, const char* ifname_dest, const struct sockaddr* addr_dest, const struct sockaddr* link_addr_dest);
te_errno tapi_add_static_arp(const char* ta_src, const char* ifname_src, const char* ta_dest, const char* ifname_dest, const struct sockaddr* addr_dest, const struct sockaddr* link_addr_dest);
te_errno tapi_update_arp(const char* ta_src, const char* ifname_src, const char* ta_dest, const char* ifname_dest, const struct sockaddr* addr_dest, const void* link_addr_dest, bool is_static);
te_errno tapi_remove_arp(const char* ta, const char* if_name, const struct sockaddr* net_addr);
te_errno tapi_route_gateway_init(tapi_route_gateway* gw, const char* iut_ta, const char* tst_ta, const char* gw_ta, const struct if_nameindex* iut_if, const struct if_nameindex* tst_if, const struct if_nameindex* gw_iut_if, const struct if_nameindex* gw_tst_if, const struct sockaddr* iut_addr, const struct sockaddr* tst_addr, const struct sockaddr* gw_iut_addr, const struct sockaddr* gw_tst_addr, const struct sockaddr* alien_link_addr);
te_errno tapi_route_gateway_configure(tapi_route_gateway* gw);
te_errno tapi_route_gateway_set_forwarding(tapi_route_gateway* gw, bool enabled);
te_errno tapi_route_gateway_break_gw_iut(tapi_route_gateway* gw);
te_errno tapi_route_gateway_repair_gw_iut(tapi_route_gateway* gw);
te_errno tapi_route_gateway_break_gw_tst(tapi_route_gateway* gw);
te_errno tapi_route_gateway_repair_gw_tst(tapi_route_gateway* gw);
te_errno tapi_route_gateway_break_iut_gw(tapi_route_gateway* gw);
te_errno tapi_route_gateway_repair_iut_gw(tapi_route_gateway* gw);
te_errno tapi_route_gateway_break_tst_gw(tapi_route_gateway* gw);
te_errno tapi_route_gateway_repair_tst_gw(tapi_route_gateway* gw);
te_errno tapi_route_gateway_down_up_ifaces(tapi_route_gateway* gw);
te_errno tapi_serial_tester_event_add(const char* name);
void tapi_serial_tester_event_del(const char* name);
te_errno tapi_serial_handler_ext_add(const char* ev_name, const char* h_name, int priority, const char* path);
te_errno tapi_serial_handler_int_add(const char* ev_name, const char* h_name, int priority, int signo);
void tapi_serial_handler_del(const char* ev_name, const char* h_name);
tapi_parser_id* tapi_serial_id_init(const char* agent, const char* c_name, const char* name);
void tapi_serial_id_cleanup(tapi_parser_id* id);
te_errno tapi_serial_parser_add(tapi_parser_id* id);
void tapi_serial_parser_del(tapi_parser_id* id);
te_errno tapi_serial_parser_enable(tapi_parser_id* id);
te_errno tapi_serial_parser_disable(tapi_parser_id* id);
te_errno tapi_serial_logging_enable(tapi_parser_id* id, const char* level);
te_errno tapi_serial_logging_disable(tapi_parser_id* id);
te_errno tapi_serial_parser_event_add(tapi_parser_id* id, const char* name, const char* t_name);
void tapi_serial_parser_event_del(tapi_parser_id* id, const char* name);
int tapi_serial_parser_pattern_add(tapi_parser_id* id, const char* e_name, const char* pattern);
void tapi_serial_parser_pattern_del(tapi_parser_id* id, const char* e_name, int pat_i);
te_errno tapi_serial_parser_reset(tapi_parser_id* id);
te_errno tapi_serial_parser_event_get_count(const tapi_parser_id* id, const char* e_name, int* count);
static void tapi_sfptpd_enable(const char* ta);
static void tapi_sfptpd_disable(const char* ta);
static bool tapi_sfptpd_status(const char* ta);
static te_errno tapi_sh_env_set(rcf_rpc_server* pco, const char* env_name, const char* env_value, bool force, bool restart);
static te_errno tapi_sh_env_get(rcf_rpc_server* pco, const char* env_name, char** val);
static te_errno tapi_sh_env_get_int(rcf_rpc_server* pco, const char* env_name, int* val);
static te_errno tapi_sh_env_set_int(rcf_rpc_server* pco, const char* env_name, int env_value, bool force, bool restart);
static te_errno tapi_sh_env_save_set(rcf_rpc_server* pco, const char* env_name, bool* existed, char** old_value, const char* new_value, bool restart);
static te_errno tapi_sh_env_unset(rcf_rpc_server* pco, const char* env_name, bool force, bool restart);
static te_errno tapi_sh_env_save_set_int(rcf_rpc_server* pco, const char* env_name, int env_value, bool restart, bool* existed, int* old_value);
static te_errno tapi_sh_env_rollback_int(rcf_rpc_server* pco, const char* env_name, bool existed, int env_value, bool restart);
static te_errno tapi_sh_env_rollback(rcf_rpc_server* pco, const char* env_name, bool existed, const char* env_value, bool restart);
static bool tapi_getenv_bool(const char* var_name);
static te_errno tapi_sh_env_ta_path_append(const char* ta, const char* dir);
int tapi_expand_path_all_ta(const char** dirs);
SLIST_HEAD(sniffl_h_t, tapi_sniff_list_s);
te_errno tapi_sniffer_common_snaplen_set(const char* ta, int snaplen);
tapi_sniffer_id* tapi_sniffer_add(const char* ta, const char* iface, const char* name, const char* filter, bool ofill);
te_errno tapi_sniffer_add_mult(const char* ta, const char* iface, const char* name, const char* filter, bool ofill, sniffl_h_t* snif_h);
te_errno tapi_sniffer_del(tapi_sniffer_id* id);
te_errno tapi_sniffer_stop(tapi_sniffer_id* id);
te_errno tapi_sniffer_start(tapi_sniffer_id* id);
te_errno tapi_sniffer_mark(const char* ta, tapi_sniffer_id* id, const char* description);
te_errno tapi_tags_add_tag(const char* tag, const char* value);
te_errno tapi_tags_add_linux_mm(const char* ta, const char* prefix);
te_errno tapi_tags_add_net_pci_tags(const char* ta, const char* if_name);
const char* test_get_opt_string_param(int argc, char** argv, const char* name);
te_optional_uint_t test_get_opt_uint_param(int argc, char** argv, const char* name);
te_optional_uintmax_t test_get_opt_uint64_param(int argc, char** argv, const char* name);
te_optional_double_t test_get_opt_double_param(int argc, char** argv, const char* name);
te_optional_double_t test_get_opt_value_unit_param(int argc, char** argv, const char* name);
te_optional_uintmax_t test_get_opt_value_bin_unit_param(int argc, char** argv, const char* name);
bool te_sigusr2_caught(void);
const char* test_find_param(int argc, char* argv[], const char* name);
const char* test_get_param(int argc, char* argv[], const char* name);
int test_map_param_value(const char* var_name, const struct param_map_entry* maps, const char* str_val, int* num_val);
uint8_t* test_get_octet_string_param(const char* str_val, size_t len);
int test_get_enum_param(int argc, char** argv, const char* name, const struct param_map_entry* maps);
const char* test_get_string_param(int argc, char** argv, const char* name);
char* test_get_filename_param(int argc, char** argv, const char* name);
int test_get_int_param(int argc, char** argv, const char* name);
unsigned int test_get_test_id(int argc, char** argv);
unsigned int test_get_uint_param(int argc, char** argv, const char* name);
int64_t test_get_int64_param(int argc, char** argv, const char* name);
uint64_t test_get_uint64_param(int argc, char** argv, const char* name);
double test_get_double_param(int argc, char** argv, const char* name);
char* test_get_default_string_param(const char* test_name, const char* param_name);
uint64_t test_get_default_uint64_param(const char* test_name, const char* param_name);
double test_get_default_double_param(const char* test_name, const char* param_name);
double test_get_value_unit_param(int argc, char** argv, const char* name);
uintmax_t test_get_value_bin_unit_param(int argc, char** argv, const char* name);
bool tapi_test_check_expected_result(const tapi_test_expected_result* expected, te_errno rc, const char* output);
bool tapi_test_check_expected_int_result(const tapi_test_expected_result* expected, te_errno rc, intmax_t ival);
tapi_test_expected_result test_get_expected_result_param(int argc, char** argv, const char* name);
const char* print_octet_string(const uint8_t* oct_string, size_t len);
int test_split_param_list(const char* list, char sep, char*** array_p);
te_errno tapi_asn_param_value_parse(char* pwd, char** s, const asn_type* type, asn_value** parsed_val, int* parsed_syms, char* ns);
te_errno tapi_asn_params_get(int argc, char** argv, const char* conf_prefix, const asn_type* conf_type, asn_value* conf_value);
te_errno tapi_test_args2kvpairs(int argc, char* argv[], te_kvpair_h* args);
void test_octet_strings2list(const char* str, unsigned int str_len, uint8_t*** oct_str_list, unsigned int* list_len);
void te_test_sig_handler(int signum);
static unsigned int test_sleep_scale(void);
void test_behaviour_get(test_behaviour* behaviour);
void te_test_tester_message(te_test_msg_type type, const char* fmt, ...);
void te_test_fail_state_update(const char* fmt, ...);
void void te_test_fail_substate_update(const char* fmt, ...);
void void const char* te_test_fail_state_get(void);
const char* te_test_fail_substate_get(void);
te_test_run_status tapi_test_run_status_get(void);
void tapi_test_run_status_set(te_test_run_status status);
char* tapi_bpf_build_bpf_obj_path(const char* ta, const char* bpf_prog_name);
te_errno tapi_bpf_obj_add(const char* ta, const char* fname, unsigned int* bpf_id);
te_errno tapi_bpf_obj_del(const char* ta, unsigned int bpf_id);
te_errno tapi_bpf_obj_load(const char* ta, unsigned int bpf_id);
te_errno tapi_bpf_obj_get_state(const char* ta, unsigned int bpf_id, tapi_bpf_state* bpf_state);
te_errno tapi_bpf_obj_unload(const char* ta, unsigned int bpf_id);
te_errno tapi_bpf_obj_get_type(const char* ta, unsigned int bpf_id, tapi_bpf_prog_type* type);
te_errno tapi_bpf_obj_set_type(const char* ta, unsigned int bpf_id, tapi_bpf_prog_type type);
te_errno tapi_bpf_prog_get_list(const char* ta, unsigned int bpf_id, char*** prog, unsigned int* prog_count);
te_errno tapi_bpf_prog_link(const char* ta, const char* ifname, unsigned int bpf_id, tapi_bpf_link_point link_type, const char* prog);
te_errno tapi_bpf_prog_unlink(const char* ta, const char* ifname, tapi_bpf_link_point link_type);
te_errno tapi_bpf_map_get_list(const char* ta, unsigned int bpf_id, char*** map, unsigned int* map_count);
te_errno tapi_bpf_map_get_type(const char* ta, unsigned int bpf_id, const char* map, tapi_bpf_map_type* type);
te_errno tapi_bpf_map_get_key_size(const char* ta, unsigned int bpf_id, const char* map, unsigned int* key_size);
te_errno tapi_bpf_map_get_val_size(const char* ta, unsigned int bpf_id, const char* map, unsigned int* val_size);
te_errno tapi_bpf_map_get_max_entries(const char* ta, unsigned int bpf_id, const char* map, unsigned int* max_entries);
te_errno tapi_bpf_map_get_writable_state(const char* ta, unsigned int bpf_id, const char* map, bool* is_writable);
te_errno tapi_bpf_map_set_writable(const char* ta, unsigned int bpf_id, const char* map);
te_errno tapi_bpf_map_unset_writable(const char* ta, unsigned int bpf_id, const char* map);
te_errno tapi_bpf_map_update_kvpair(const char* ta, unsigned int bpf_id, const char* map, const uint8_t* key, unsigned int key_size, const uint8_t* val, unsigned int val_size);
te_errno tapi_bpf_map_lookup_kvpair(const char* ta, unsigned int bpf_id, const char* map, const uint8_t* key, unsigned int key_size, uint8_t* val, unsigned int val_size);
te_errno tapi_bpf_map_delete_kvpair(const char* ta, unsigned int bpf_id, const char* map, const uint8_t* key, unsigned int key_size);
te_errno tapi_bpf_map_get_key_list(const char* ta, unsigned int bpf_id, const char* map, unsigned int* key_size, uint8_t*** key, unsigned int* count);
te_errno tapi_bpf_map_set_pin(const char* ta, unsigned int bpf_id, const char* map, const char* pin_path);
te_errno tapi_bpf_map_get_pin(const char* ta, unsigned int bpf_id, const char* map, char** pin_path);
te_errno tapi_bpf_perf_event_init(const char* ta, unsigned int bpf_id, const char* map, unsigned int event_size);
te_errno tapi_bpf_perf_event_deinit(const char* ta, unsigned int bpf_id, const char* map);
te_errno tapi_bpf_perf_get_events(const char* ta, unsigned int bpf_id, const char* map, unsigned int* num, uint8_t** data);
te_errno tapi_bpf_perf_map_get_list(const char* ta, unsigned int bpf_id, char*** map, unsigned int* map_count);
te_errno tapi_bpf_obj_init(const char* ta, const char* path, tapi_bpf_prog_type type, unsigned int* bpf_id);
te_errno tapi_bpf_obj_fini(const char* ta, unsigned int bpf_id);
te_errno tapi_bpf_prog_name_check(const char* ta, unsigned int bpf_id, const char* prog_name);
te_errno tapi_bpf_map_type_name_check(const char* ta, unsigned int bpf_id, const char* map_name, tapi_bpf_map_type map_type);
static te_errno tapi_bpf_map_name_check(const char* ta, unsigned int bpf_id, const char* map_name);
te_errno tapi_bpf_map_check_type(const char* ta, unsigned int bpf_id, const char* map_name, tapi_bpf_map_type exp_map_type);
te_errno tapi_bpf_ip_tcpudp_filter_from_sa(te_bpf_ip_tcpudp_filter* filter, int family, int protocol, const struct sockaddr* src_addr, const struct sockaddr* dst_addr);
te_errno tapi_bpf_rxq_stats_init(const char* ta, const char* if_name, const char* prog_dir, unsigned int* bpf_id);
te_errno tapi_bpf_rxq_stats_fini(const char* ta, const char* if_name, unsigned int bpf_id);
te_errno tapi_bpf_rxq_stats_get_id(const char* ta, const char* if_name, unsigned int* bpf_id);
te_errno tapi_bpf_rxq_stats_set_params(const char* ta, unsigned int bpf_id, int addr_family, const struct sockaddr* src_addr, const struct sockaddr* dst_addr, int protocol, bool enable);
te_errno tapi_bpf_rxq_stats_enable(const char* ta, unsigned int bpf_id, bool enable);
te_errno tapi_bpf_rxq_stats_clear(const char* ta, unsigned int bpf_id);
te_errno tapi_bpf_rxq_stats_reset(const char* ta, unsigned int bpf_id);
te_errno tapi_bpf_rxq_stats_read(const char* ta, unsigned int bpf_id, tapi_bpf_rxq_stats** stats_out, unsigned int* count_out);
void tapi_bpf_rxq_stats_print(const char* title, tapi_bpf_rxq_stats* stats, unsigned int count);
te_errno tapi_bpf_rxq_stats_check_single(const char* ta, unsigned int bpf_id, unsigned int exp_queue, unsigned int exp_pkts, rpc_socket_type sock_type, const char* vpref);
typedef LIST_HEAD(tapi_bpf_stim_ctx_list, tapi_bpf_stim_ctx);
void tapi_bpf_stim_init(rcf_rpc_server* pco, const char* ifname, unsigned int type, bool egress, tapi_bpf_stim_hdl** handle);
void tapi_bpf_stim_del(tapi_bpf_stim_hdl* handle);
te_errno tapi_bpf_stim_drop(tapi_bpf_stim_hdl* handle, unsigned int num);
te_errno tapi_bpf_stim_dup(tapi_bpf_stim_hdl* handle, unsigned int num);
te_errno tapi_bpf_stim_delay(tapi_bpf_stim_hdl* handle, unsigned int num);
int rpc_xsk_umem__create(rcf_rpc_server* rpcs, rpc_ptr umem_area, uint64_t size, tarpc_xsk_umem_config* config, rpc_ptr* umem);
int rpc_xsk_umem__delete(rcf_rpc_server* rpcs, rpc_ptr umem);
int rpc_xsk_socket__create(rcf_rpc_server* rpcs, const char* if_name, uint32_t queue_id, rpc_ptr umem, bool shared_umem, tarpc_xsk_socket_config* config, rpc_ptr* sock);
int rpc_xsk_socket__delete(rcf_rpc_server* rpcs, rpc_ptr sock);
int rpc_xsk_map_set(rcf_rpc_server* rpcs, int map_fd, unsigned int key, int fd);
ssize_t rpc_xsk_rx_fill_simple(rcf_rpc_server* rpcs, rpc_ptr umem, const char* if_name, uint32_t queue_id, size_t frames_cnt);
ssize_t rpc_xsk_receive_simple(rcf_rpc_server* rpcs, rpc_ptr sock, void* buf, size_t len);
int rpc_xsk_send_simple(rcf_rpc_server* rpcs, rpc_ptr sock, void* buf, size_t len);
int rpc_bpf_obj_get(rcf_rpc_server* rpcs, const char* path);
te_errno tapi_bpf_map_pin_get_fd(rcf_rpc_server* rpcs, unsigned int bpf_id, const char* map_name, int* fd);
char* tapi_dns_gen_filepath(const char* ta, const char* base_dir, const char* filename);
te_errno tapi_dns_unbound_create(tapi_job_factory_t* factory, const tapi_dns_unbound_opt* opt, tapi_dns_unbound_app** app);
te_errno tapi_dns_unbound_start(tapi_dns_unbound_app* app);
te_errno tapi_dns_unbound_wait(tapi_dns_unbound_app* app, int timeout_ms);
te_errno tapi_dns_unbound_kill(tapi_dns_unbound_app* app, int signum);
te_errno tapi_dns_unbound_stop(tapi_dns_unbound_app* app);
te_errno tapi_dns_unbound_destroy(tapi_dns_unbound_app* app);
te_errno tapi_dns_unbound_cfg_create(const char* ta, const tapi_dns_unbound_cfg_opt* opt, const char* base_dir, const char* filename, char** result_pathname);
void tapi_dns_unbound_cfg_destroy(const char* ta, const char* cfg_file);
te_errno tapi_dns_zone_file_create(const char* ta, tapi_dns_zone_file_rr* resource_records, size_t resource_records_n, const char* base_dir, const char* pathname, char** result_pathname);
te_errno tapi_dns_zone_file_destroy(const char* ta, const char* pathname);
void tapi_dnsperf_opt_query_add_a(tapi_dnsperf_opt* opt, const char* host);
void tapi_dnsperf_opt_query_add_aaaa(tapi_dnsperf_opt* opt, const char* host);
void tapi_dnsperf_opt_queries_free(tapi_dnsperf_opt* opt);
te_errno tapi_dnsperf_create(tapi_job_factory_t* factory, tapi_dnsperf_opt* opt, tapi_dnsperf_app** app);
te_errno tapi_dnsperf_start(const tapi_dnsperf_app* app);
te_errno tapi_dnsperf_wait(const tapi_dnsperf_app* app, int timeout_ms);
te_errno tapi_dnsperf_stop(const tapi_dnsperf_app* app);
te_errno tapi_dnsperf_kill(const tapi_dnsperf_app* app, int signum);
te_errno tapi_dnsperf_destroy(tapi_dnsperf_app* app);
te_errno tapi_dnsperf_get_report(tapi_dnsperf_app* app, tapi_dnsperf_report* report);
te_errno tapi_dnsperf_report_mi_log(const tapi_dnsperf_report* report);
void tapi_dnsperf_destroy_report(tapi_dnsperf_report* report);
te_errno tapi_dpdk_create_testpmd_job(rcf_rpc_server* rpcs, tapi_env* env, unsigned int n_fwd_cpus, const tapi_cpu_prop_t* prop, te_kvpair_h* test_args, tapi_dpdk_testpmd_job_t* testpmd_job);
te_errno tapi_dpdk_testpmd_is_opt_supported(rcf_rpc_server* rpcs, tapi_env* env, te_kvpair_h* opt, bool* opt_supported);
te_errno tapi_dpdk_testpmd_start(tapi_dpdk_testpmd_job_t* testpmd_job);
te_errno tapi_dpdk_testpmd_get_link_speed(tapi_dpdk_testpmd_job_t* testpmd_job, unsigned int* link_speed);
te_errno tapi_dpdk_testpmd_get_stats(tapi_dpdk_testpmd_job_t* testpmd_job, te_meas_stats_t* tx, te_meas_stats_t* rx);
te_errno tapi_dpdk_testpmd_destroy(tapi_dpdk_testpmd_job_t* testpmd_job);
bool tapi_dpdk_mtu_by_pkt_size(unsigned int packet_size, unsigned int* mtu);
bool tapi_dpdk_mbuf_size_by_pkt_size(unsigned int packet_size, unsigned int* mbuf_size);
void tapi_dpdk_append_argument(const char* argument, int* argc_p, char*** argv_out);
te_errno tapi_dpdk_build_eal_arguments(rcf_rpc_server* rpcs, tapi_env* env, unsigned int n_cpus, tapi_cpu_index_t* cpu_ids, const char* program_name, int* argc_out, char*** argv_out);
te_errno tapi_dpdk_grab_cpus(const char* ta, unsigned int n_cpus_preferred, unsigned int n_cpus_required, int numa_node, const tapi_cpu_prop_t* prop, unsigned int* n_cpus_grabbed, tapi_cpu_index_t* cpu_ids);
te_errno tapi_dpdk_grab_cpus_nonstrict_prop(const char* ta, unsigned int n_cpus_preferred, unsigned int n_cpus_required, int numa_node, const tapi_cpu_prop_t* prop, unsigned int* n_cpus_grabbed, tapi_cpu_index_t* cpu_ids);
const char* tapi_dpdk_get_vdev_eal_argument(int eal_argc, char** eal_argv);
te_errno tapi_dpdk_get_vdev_port_number(const char* vdev, unsigned int* port_number);
te_errno tapi_dpdk_attach_dbells_filter_rx(tapi_dpdk_testpmd_job_t* testpmd_job);
te_errno tapi_dpdk_attach_dbells_filter_tx(tapi_dpdk_testpmd_job_t* testpmd_job);
te_errno tapi_dpdk_add_rx_dbells_display(te_kvpair_h* test_params, const char* q_num);
te_errno tapi_dpdk_add_tx_dbells_display(te_kvpair_h* test_params, const char* q_num);
te_errno tapi_dpdk_stats_log_rx_dbells(const tapi_dpdk_testpmd_job_t* testpmd_job, const te_meas_stats_t* meas_stats_pps);
te_errno tapi_dpdk_stats_log_tx_dbells(const tapi_dpdk_testpmd_job_t* testpmd_job, const te_meas_stats_t* meas_stats_pps);
te_errno tapi_dpdk_attach_rx_pkts_bytes_filters(tapi_dpdk_testpmd_job_t* testpmd_job);
te_errno tapi_dpdk_get_last_rx_pkts_bytes(tapi_dpdk_testpmd_job_t* testpmd_job, unsigned long* pkts, unsigned long* bytes);
void tapi_dpdk_stats_pps_artifact(te_mi_logger* logger, int64_t pps, const char* prefix);
uint64_t tapi_dpdk_stats_calculate_l1_bitrate(uint64_t pps, unsigned int packet_size);
te_errno tapi_dpdk_stats_calculate_l1_link_usage(uint64_t l1_bitrate, unsigned int link_speed, double* l1_link_usage);
void tapi_dpdk_stats_l1_bitrate_artifact(te_mi_logger* logger, uint64_t l1_bitrate, const char* prefix);
void tapi_dpdk_stats_l1_link_usage_artifact(te_mi_logger* logger, double l1_link_usage, const char* prefix);
void tapi_dpdk_stats_cv_artifact(te_mi_logger* logger, double cv, const char* prefix);
te_errno tapi_dpdk_stats_summary_artifact(const te_meas_stats_t* meas_stats, const char* prefix);
void tapi_dpdk_stats_stab_artifact(te_mi_logger* logger, const te_meas_stats_t* meas_stats, const char* prefix);
te_errno tapi_dpdk_stats_log_rates(const char* tool, const te_meas_stats_t* meas_stats, unsigned int packet_size, unsigned int link_speed, const char* prefix);
te_errno tapi_dpdk_l2fwd_start(tapi_dpdk_l2fwd_job_t* l2fwd_job);
te_errno tapi_dpdk_l2fwd_destroy(tapi_dpdk_l2fwd_job_t* l2fwd_job);
te_errno tapi_dpdk_l2fwd_get_stats(tapi_dpdk_l2fwd_job_t* l2fwd_job, te_meas_stats_t* tx, te_meas_stats_t* rx);
te_errno tapi_dpdk_create_l2fwd_job(rcf_rpc_server* rpcs, tapi_env* env, unsigned int n_fwd_cpus, const tapi_cpu_prop_t* prop, te_kvpair_h* test_args, tapi_dpdk_l2fwd_job_t* l2fwd_job);
void tapi_rte_flow_add_ndn_action_queue(asn_value* ndn_actions, int action_index, uint16_t queue);
void tapi_rte_flow_add_ndn_action_drop(asn_value* ndn_actions, int action_index);
void tapi_rte_flow_add_ndn_action_count(asn_value* ndn_actions, int action_index, uint32_t counter_id);
void tapi_rte_flow_add_ndn_action_encap(asn_value* ndn_actions, int action_index, tarpc_rte_eth_tunnel_type type, const asn_value* encap_hdr);
void tapi_rte_flow_add_ndn_action_decap(asn_value* ndn_actions, int action_index, tarpc_rte_eth_tunnel_type type);
void tapi_rte_flow_add_ndn_action_of_pop_vlan(asn_value* ndn_actions, int action_index);
void tapi_rte_flow_add_ndn_action_of_push_vlan(asn_value* ndn_actions, int action_index, uint16_t ethertype);
void tapi_rte_flow_add_ndn_action_of_set_vlan_vid(asn_value* ndn_actions, int action_index, uint16_t vlan_vid);
void tapi_rte_flow_add_ndn_action_port(ndn_rte_flow_action_type_t type, uint32_t ethdev_port_id, asn_value* actions, int entry_idx);
void tapi_rte_flow_add_ndn_action_jump(asn_value* ndn_actions, int action_index, uint32_t group);
void tapi_rte_flow_add_ndn_action_dec_ttl(asn_value* ndn_actions, int action_index);
void tapi_rte_flow_add_ndn_item_port(ndn_rte_flow_item_type_t type, uint32_t ethdev_port_id, asn_value* items, int entry_idx);
rpc_rte_flow_p tapi_rte_flow_validate_and_create_rule(rcf_rpc_server* rpcs, uint16_t port_id, rpc_rte_flow_attr_p attr, rpc_rte_flow_item_p pattern, rpc_rte_flow_action_p actions);
void tapi_rte_flow_make_attr(rcf_rpc_server* rpcs, uint32_t group, uint32_t priority, bool ingress, bool egress, bool transfer, rpc_rte_flow_attr_p* attr);
void tapi_rte_flow_isolate(rcf_rpc_server* rpcs, uint16_t port_id, int set);
static const char* tapi_env_type_str(tapi_env_type type);
typedef STAILQ_HEAD(cfg_handle_tqh, cfg_handle_tqe);
typedef SLIST_HEAD(tapi_env_nets, tapi_env_net);
typedef SLIST_HEAD(tapi_env_processes, tapi_env_process);
typedef SLIST_HEAD(tapi_env_hosts, tapi_env_host);
typedef CIRCLEQ_HEAD(tapi_env_ifs, tapi_env_if);
typedef STAILQ_HEAD(tapi_env_ps_ifs, tapi_env_ps_if);
typedef STAILQ_HEAD(tapi_env_pcos, tapi_env_pco);
typedef CIRCLEQ_HEAD(tapi_env_addrs, tapi_env_addr);
typedef SLIST_HEAD(tapi_env_aliases, tapi_env_alias);
te_errno tapi_env_init(tapi_env* env);
te_errno tapi_env_get(const char* cfg, tapi_env* env);
te_errno tapi_env_get_rpcs_only(const char* cfg, tapi_env* env);
te_errno tapi_env_allocate_addr(tapi_env_net* net, int af, struct sockaddr** addr, socklen_t* addrlen);
te_errno tapi_env_free(tapi_env* env);
tapi_env_net* tapi_env_get_net(tapi_env* env, const char* name);
tapi_env_host* tapi_env_get_host(tapi_env* env, const char* name);
rcf_rpc_server* tapi_env_get_pco(tapi_env* env, const char* name);
const struct sockaddr* tapi_env_get_addr(tapi_env* env, const char* name, socklen_t* addrlen);
tapi_env_addr_type tapi_get_addr_type(tapi_env* env, const char* name);
const struct if_nameindex* tapi_env_get_if(tapi_env* env, const char* name);
const tapi_env_if* tapi_env_get_env_if(tapi_env* env, const char* name);
const struct if_nameindex* tapi_env_get_br(tapi_env* env, const char* name);
const struct if_nameindex* tapi_env_get_ph(tapi_env* env, const char* name);
te_errno tapi_env_get_net_host_addr(const tapi_env* env, const tapi_env_net* net, const tapi_env_host* host, sa_family_t af, tapi_cfg_net_assigned* assigned, struct sockaddr** addr, socklen_t* addrlen);
const tapi_env_pco* tapi_env_rpcs2pco(const tapi_env* env, const rcf_rpc_server* rpcs);
struct sockaddr** tapi_env_add_addresses(rcf_rpc_server* rpcs, tapi_env_net* net, int af, const struct if_nameindex* iface, int addr_num);
void tapi_env_foreach_if(tapi_env* env, tapi_env_foreach_if_fn* fn, void* opaque);
unsigned tapi_env_nets_count(tapi_env* env);
const cfg_net_node_t* tapi_env_get_if_net_node(const tapi_env_if* iface);
te_errno fio_app_start(tapi_fio_app* app);
te_errno fio_app_stop(tapi_fio_app* app);
te_errno fio_app_wait(tapi_fio_app* app, int16_t timeout_sec);
te_errno fio_app_receive_report(tapi_fio_app* app, char** report);
tapi_fio* tapi_fio_create(const tapi_fio_opts* options, tapi_job_factory_t* factory, const char* path);
void tapi_fio_destroy(tapi_fio* fio);
void tapi_fio_opts_init(tapi_fio_opts* options);
te_errno tapi_fio_start(tapi_fio* fio);
te_errno tapi_fio_wait(tapi_fio* fio, int16_t timeout_sec);
te_errno tapi_fio_stop(tapi_fio* fio);
te_errno tapi_fio_get_report(tapi_fio* fio, tapi_fio_report* report);
void tapi_fio_log_report(tapi_fio_report* report);
te_errno tapi_fio_mi_report(te_mi_logger* logger, const tapi_fio_report* report);
te_errno tapi_gtest_init(tapi_gtest* gtest, tapi_job_factory_t* factory);
te_errno tapi_gtest_start(tapi_gtest* gtest);
te_errno tapi_gtest_stop(tapi_gtest* gtest);
te_errno tapi_gtest_wait(tapi_gtest* gtest, int timeout_ms);
te_errno tapi_gtest_fini(tapi_gtest* gtest);
const char* tapi_job_factory_ta(const tapi_job_factory_t* factory);
te_errno tapi_job_factory_set_path(tapi_job_factory_t* factory);
void tapi_job_factory_destroy(tapi_job_factory_t* factory);
tapi_job_factory_t* tapi_job_get_factory(tapi_job_t* job);
te_errno tapi_job_create(tapi_job_factory_t* factory, const char* spawner, const char* program, const char** argv, const char** env, tapi_job_t** job);
te_errno tapi_job_create_named(tapi_job_factory_t* factory, const char* name, const char* spawner, const char* program, const char** argv, const char** env, tapi_job_t** job);
te_errno tapi_job_recreate(tapi_job_factory_t* factory, const void* identifier, tapi_job_t** job);
te_errno tapi_job_simple_create(tapi_job_factory_t* factory, tapi_job_simple_desc_t* desc);
te_errno tapi_job_start(tapi_job_t* job);
te_errno tapi_job_kill(tapi_job_t* job, int signo);
te_errno tapi_job_killpg(tapi_job_t* job, int signo);
unsigned int tapi_job_get_timeout(void);
te_errno tapi_job_wait(tapi_job_t* job, int timeout_ms, tapi_job_status_t* status);
bool tapi_job_is_running(tapi_job_t* job);
te_errno tapi_job_alloc_input_channels(tapi_job_t* job, unsigned int n_channels, tapi_job_channel_t* channels[n_channels]);
te_errno tapi_job_alloc_output_channels(tapi_job_t* job, unsigned int n_channels, tapi_job_channel_t* channels[n_channels]);
te_errno tapi_job_dealloc_channels(tapi_job_channel_set_t channels);
te_errno tapi_job_attach_filter(tapi_job_channel_set_t channels, const char* filter_name, bool readable, te_log_level log_level, tapi_job_channel_t** filter);
te_errno tapi_job_attach_simple_filter(const tapi_job_simple_desc_t* desc, tapi_job_simple_filter_t* filter);
te_errno tapi_job_filter_add_regexp(tapi_job_channel_t* filter, const char* re, unsigned int extract);
te_errno tapi_job_filter_add_channels(tapi_job_channel_t* filter, tapi_job_channel_set_t channels);
te_errno tapi_job_filter_remove_channels(tapi_job_channel_t* filter, tapi_job_channel_set_t channels);
te_errno tapi_job_send(tapi_job_channel_t* channel, const te_string* str);
void tapi_job_simple_send(tapi_job_channel_t* channel, const te_string* str);
te_errno tapi_job_poll(const tapi_job_channel_set_t wait_set, int timeout_ms);
void tapi_job_simple_poll(const tapi_job_channel_set_t wait_set, int timeout_ms);
te_errno tapi_job_receive(const tapi_job_channel_set_t filters, int timeout_ms, tapi_job_buffer_t* buffer);
te_errno tapi_job_receive_last(const tapi_job_channel_set_t filters, int timeout_ms, tapi_job_buffer_t* buffer);
te_errno tapi_job_receive_many(const tapi_job_channel_set_t filters, int timeout_ms, tapi_job_buffer_t** buffers, unsigned int* count);
void tapi_job_buffers_free(tapi_job_buffer_t* buffers, unsigned int count);
bool tapi_job_filters_have_data(const tapi_job_channel_set_t filters, int timeout_ms);
void tapi_job_simple_receive(const tapi_job_channel_set_t filters, int timeout_ms, tapi_job_buffer_t* buffer);
te_errno tapi_job_receive_single(tapi_job_channel_t* filter, te_string* val, int timeout_ms);
te_errno tapi_job_clear(const tapi_job_channel_set_t filters);
te_errno tapi_job_stop(tapi_job_t* job, int signo, int term_timeout_ms);
te_errno tapi_job_destroy(tapi_job_t* job, int term_timeout_ms);
te_errno tapi_job_set_workdir(tapi_job_t* job, const char* dir);
te_errno tapi_job_wrapper_add(tapi_job_t* job, const char* tool, const char** argv, tapi_job_wrapper_priority_t priority, tapi_job_wrapper_t** wrap);
te_errno tapi_job_wrapper_delete(tapi_job_wrapper_t* wrapper);
te_errno tapi_job_add_exec_param(tapi_job_t* job, tapi_job_exec_param* exec_param);
static te_errno tapi_job_add_sched_param(tapi_job_t* job, tapi_job_exec_param* exec_param);
te_errno tapi_job_set_autorestart(tapi_job_t* job, unsigned int value);
te_errno tapi_job_get_autorestart(tapi_job_t* job, unsigned int* value);
void tapi_job_set_tracing(tapi_job_t* job, bool trace);
te_errno tapi_job_factory_cfg_create(const char* ta, struct tapi_job_factory_t** factory);
te_errno tapi_job_factory_rpc_create(rcf_rpc_server* rpcs, struct tapi_job_factory_t** factory);
rcf_rpc_server* tapi_job_get_rpcs(const tapi_job_t* job);
unsigned int tapi_job_get_id(const tapi_job_t* job);
void tapi_job_set_id(tapi_job_t* job, unsigned int id);
const char* tapi_job_get_ta(const tapi_job_t* job);
const char* tapi_job_get_name(const tapi_job_t* job);
void tapi_job_set_name(tapi_job_t* job, const char* name);
bool tapi_job_get_silent_pass(const tapi_job_t* job);
te_errno tapi_job_opt_build_args(const char* path, const tapi_job_opt_bind* binds, const void* opt, te_vec* tool_args);
te_errno tapi_job_opt_append_strings(const char** items, te_vec* tool_args);
te_errno tapi_job_opt_append_args(const tapi_job_opt_bind* binds, const void* opt, te_vec* tool_args);
te_errno tapi_job_opt_create_uint_t(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_uint_t_hex(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_uint_t_octal(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_uint(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_uintmax_t(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_uint_omittable(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_double_t(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_string(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_bool(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_array(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_embed_array(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_struct(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_dummy(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_sockaddr_ptr(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_addr_port_ptr(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_sockport_ptr(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_sockaddr_subnet(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_enum(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_enum_bool(const void* value, const void* priv, te_vec* args);
te_errno tapi_job_opt_create_enum_bool3(const void* value, const void* priv, te_vec* args);
te_errno rpc_job_deallocate_channels(rcf_rpc_server* rpcs, unsigned int n_channels, unsigned int* channels);
te_errno rpc_job_attach_filter(rcf_rpc_server* rpcs, const char* filter_name, unsigned int n_channels, unsigned int* channels, bool readable, te_log_level log_level, unsigned int* filter);
te_errno rpc_job_filter_add_regexp(rcf_rpc_server* rpcs, unsigned int filter, const char* re, unsigned int extract);
te_errno rpc_job_filter_add_channels(rcf_rpc_server* rpcs, unsigned int filter, unsigned int n_channels, unsigned int* channels);
te_errno rpc_job_filter_remove_channels(rcf_rpc_server* rpcs, unsigned int filter, unsigned int n_channels, unsigned int* channels);
te_errno rpc_job_receive(rcf_rpc_server* rpcs, unsigned int n_filters, unsigned int* filters, int timeout_ms, tarpc_job_buffer* buffer);
te_errno rpc_job_receive_last(rcf_rpc_server* rpcs, unsigned int n_filters, unsigned int* filters, int timeout_ms, tarpc_job_buffer* buffer);
te_errno rpc_job_receive_many(rcf_rpc_server* rpcs, unsigned int n_filters, unsigned int* filters, int timeout_ms, tarpc_job_buffer** buffers, unsigned int* count);
void tarpc_job_buffers_free(tarpc_job_buffer* buffers, unsigned int count);
te_errno rpc_job_clear(rcf_rpc_server* rpcs, unsigned int n_filters, unsigned int* filters);
te_errno rpc_job_send(rcf_rpc_server* rpcs, unsigned int channel, const void* buf, size_t count);
te_errno rpc_job_poll(rcf_rpc_server* rpcs, unsigned int n_channels, unsigned int* channels, int timeout_ms);
bool tapi_media_dlna_cmp_with_local(const tapi_upnp_cd_container_node* dlna_file, const tapi_media_file* local_file);
static const char* tapi_media_file_get_metadata_title(const tapi_media_file_metadata* metadata);
te_errno tapi_media_file_get_from_local(const tapi_local_file* local_file, tapi_media_file** media_file);
void tapi_media_file_free(tapi_media_file* media_file);
tapi_media_player* tapi_media_player_create(const char* ta, tapi_media_player_client client, const char* player);
void tapi_media_player_destroy(tapi_media_player* player);
te_errno tapi_media_player_play(tapi_media_player* player, const char* source, const char* options);
te_errno tapi_media_player_stop(tapi_media_player* player);
te_errno tapi_media_player_get_errors(tapi_media_player* player);
bool tapi_media_player_check_errors(tapi_media_player* player);
void tapi_media_player_log_errors(const tapi_media_player* player);
void tapi_media_player_mplayer_init(tapi_media_player* player);
const char* tapi_nvme_transport_str(tapi_nvme_transport transport);
te_errno tapi_nvme_initiator_connect_opts(tapi_nvme_host_ctrl* host_ctrl, const tapi_nvme_target* target, const tapi_nvme_connect_opts* opts);
static te_errno tapi_nvme_initiator_connect(tapi_nvme_host_ctrl* host_ctrl, const tapi_nvme_target* target);
te_errno tapi_nvme_initiator_connect_all_opts(tapi_nvme_host_ctrl* host_ctrl, const tapi_nvme_target* target, const tapi_nvme_connect_opts* opts);
static te_errno tapi_nvme_initiator_connect_all(tapi_nvme_host_ctrl* host_ctrl, const tapi_nvme_target* target);
te_errno tapi_nvme_initiator_disconnect(tapi_nvme_host_ctrl* host_ctrl);
te_errno tapi_nvme_initiator_disconnect_match(rcf_rpc_server* rpcs, const char* regexp);
te_errno tapi_nvme_initiator_disconnect_all(rcf_rpc_server* rpcs);
te_errno tapi_nvme_initiator_list(tapi_nvme_host_ctrl* host_ctrl);
te_errno tapi_nvme_initiator_id_ctrl(tapi_nvme_host_ctrl* host_ctrl);
te_errno tapi_nvme_initiator_id_ns(tapi_nvme_host_ctrl* host_ctrl);
te_errno tapi_nvme_initiator_get_id_ns(tapi_nvme_host_ctrl* host_ctrl);
te_errno tapi_nvme_initiator_show_regs(tapi_nvme_host_ctrl* host_ctrl);
te_errno tapi_nvme_initiator_fw_log(tapi_nvme_host_ctrl* host_ctrl);
te_errno tapi_nvme_initiator_smart_log(tapi_nvme_host_ctrl* host_ctrl);
te_errno tapi_nvme_initiator_error_log(tapi_nvme_host_ctrl* host_ctrl);
te_errno tapi_nvme_initiator_get_feature(tapi_nvme_host_ctrl* host_ctrl, int feature);
te_errno tapi_nvme_initiator_flush(tapi_nvme_host_ctrl* host_ctrl, const char* namespace);
te_errno tapi_nvme_initiator_discover_from(tapi_nvme_host_ctrl* host_ctrl);
static void tapi_nvme_initiator_init(tapi_nvme_host_ctrl* host_ctrl);
te_errno tapi_nvme_target_init(tapi_nvme_target* target, void* opts);
te_errno tapi_nvme_target_setup(tapi_nvme_target* target);
void tapi_nvme_target_cleanup(tapi_nvme_target* target);
void tapi_nvme_target_fini(tapi_nvme_target* target);
te_errno tapi_nvme_target_format(tapi_nvme_target* target);
te_errno tapi_nvme_internal_file_append(rcf_rpc_server* rpcs, unsigned int timeout_sec, const char* string, const char* fmt, ...);
te_errno int tapi_nvme_internal_file_read(rcf_rpc_server* rpcs, char* buffer, size_t size, const char* fmt, ...);
te_errno int bool tapi_nvme_internal_isdir_exist(rcf_rpc_server* rpcs, const char* path);
bool tapi_nvme_internal_mkdir(rcf_rpc_server* rpcs, const char* fmt, ...);
bool bool tapi_nvme_internal_rmdir(rcf_rpc_server* rpcs, const char* fmt, ...);
te_errno tapi_nvme_internal_filterdir(rcf_rpc_server* rpcs, const char* path, const char* start_from, te_vec* result);
te_errno tapi_nvme_kern_target_init(struct tapi_nvme_target* target, void* opts);
te_errno tapi_nvme_kern_target_setup(struct tapi_nvme_target* target);
void tapi_nvme_kern_target_cleanup(struct tapi_nvme_target* target);
void tapi_nvme_kern_target_fini(struct tapi_nvme_target* target);
te_errno tapi_nvme_onvme_target_init(tapi_nvme_target* target, void* opts);
te_errno tapi_nvme_onvme_target_setup(tapi_nvme_target* target);
void tapi_nvme_onvme_target_cleanup(tapi_nvme_target* target);
void tapi_nvme_onvme_target_fini(tapi_nvme_target* target);
te_errno tapi_packetdrill_app_init(tapi_job_factory_t* factory, tapi_packetdrill_opts* opts, tapi_packetdrill_app** app);
void tapi_packetdrill_app_destroy(tapi_packetdrill_app* app);
te_errno tapi_packetdrill_app_start(tapi_packetdrill_app* app);
te_errno tapi_packetdrill_app_wait(tapi_packetdrill_app* app, int timeout_s);
void tapi_packetdrill_print_logs(tapi_packetdrill_app* app);
void iperf_server_init(tapi_perf_server* server);
void iperf_client_init(tapi_perf_client* client);
void iperf3_server_init(tapi_perf_server* server);
void iperf3_client_init(tapi_perf_client* client);
te_errno perf_app_create_job_from_args(tapi_job_factory_t* factory, te_vec* args, tapi_perf_app* app);
te_errno perf_server_create(tapi_perf_server* server, tapi_job_factory_t* factory);
te_errno perf_client_create(tapi_perf_client* client, tapi_job_factory_t* factory);
te_errno perf_app_start(tapi_perf_app* app);
te_errno perf_app_read_output(tapi_job_channel_t* out_filter, te_string* str);
te_errno perf_app_stop(tapi_perf_app* app);
te_errno perf_app_wait(tapi_perf_app* app, int16_t timeout);
te_errno perf_app_check_report(tapi_perf_app* app, tapi_perf_report* report, const char* tag);
void perf_app_dump_output(tapi_perf_app* app, const char* tag);
void perf_get_tool_input_tuple(const tapi_perf_server* server, const tapi_perf_client* client, te_string* buf);
void perf_get_tool_result_tuple(const tapi_perf_report* report, te_string* buf);
void tapi_perf_opts_init(tapi_perf_opts* opts);
tapi_perf_server* tapi_perf_server_create(tapi_perf_bench bench, const tapi_perf_opts* options, tapi_job_factory_t* factory);
void tapi_perf_server_destroy(tapi_perf_server* server);
te_errno tapi_perf_server_start_unreliable(tapi_perf_server* server);
te_errno tapi_perf_server_start(tapi_perf_server* server);
te_errno tapi_perf_server_stop(tapi_perf_server* server);
te_errno tapi_perf_server_get_report(tapi_perf_server* server, tapi_perf_report* report);
te_errno tapi_perf_server_get_specific_report(tapi_perf_server* server, tapi_perf_report_kind kind, tapi_perf_report* report);
te_errno tapi_perf_server_check_report(tapi_perf_server* server, tapi_perf_report* report, const char* tag);
te_errno tapi_perf_server_get_check_report(tapi_perf_server* server, const char* tag, tapi_perf_report* report);
te_errno tapi_perf_server_get_dump_check_report(tapi_perf_server* server, const char* tag, tapi_perf_report* report);
tapi_perf_client* tapi_perf_client_create(tapi_perf_bench bench, const tapi_perf_opts* options, tapi_job_factory_t* factory);
void tapi_perf_client_destroy(tapi_perf_client* client);
te_errno tapi_perf_client_start(tapi_perf_client* client);
te_errno tapi_perf_client_stop(tapi_perf_client* client);
te_errno tapi_perf_client_wait(tapi_perf_client* client, int16_t timeout);
te_errno tapi_perf_client_get_report(tapi_perf_client* client, tapi_perf_report* report);
te_errno tapi_perf_client_get_specific_report(tapi_perf_client* client, tapi_perf_report_kind kind, tapi_perf_report* report);
te_errno tapi_perf_client_check_report(tapi_perf_client* client, tapi_perf_report* report, const char* tag);
te_errno tapi_perf_client_get_check_report(tapi_perf_client* client, const char* tag, tapi_perf_report* report);
te_errno tapi_perf_client_get_dump_check_report(tapi_perf_client* client, const char* tag, tapi_perf_report* report);
const char* tapi_perf_error2str(tapi_perf_error error);
const char* tapi_perf_bench2str(tapi_perf_bench bench);
static const char* tapi_perf_server_get_name(const tapi_perf_server* server);
static const char* tapi_perf_client_get_name(const tapi_perf_client* client);
void tapi_perf_log_report(const tapi_perf_server* server, const tapi_perf_client* client, const tapi_perf_report* report, const char* test_params);
void tapi_perf_log_cumulative_report(const tapi_perf_server* server[], const tapi_perf_client* client[], const tapi_perf_report* report[], int number_of_instances, const char* test_params);
bool tapi_perf_opts_cmp(const tapi_perf_opts* opts_a, const tapi_perf_opts* opts_b);
static const char* tapi_radius_code2str(tapi_radius_code_t code);
static const char* tapi_radius_attr_type2str(tapi_radius_type_t type);
static const char* tapi_radius_acct_status2str(tapi_radius_acct_status_t status);
static const char* tapi_radius_term_cause2str(tapi_radius_term_cause_t cause);
void tapi_radius_dict_init();
const tapi_radius_attr_info_t* tapi_radius_dict_lookup(tapi_radius_attr_type_t type);
const tapi_radius_attr_info_t* tapi_radius_dict_lookup_by_name(const char* name);
void tapi_radius_attr_list_init(tapi_radius_attr_list_t* list);
te_errno tapi_radius_attr_list_push(tapi_radius_attr_list_t* list, const tapi_radius_attr_t* attr);
te_errno tapi_radius_attr_list_push_value(tapi_radius_attr_list_t* list, const char* name, ...);
void tapi_radius_attr_list_free(tapi_radius_attr_list_t* list);
te_errno tapi_radius_attr_list_copy(tapi_radius_attr_list_t* dst, const tapi_radius_attr_list_t* src);
const tapi_radius_attr_t* tapi_radius_attr_list_find(const tapi_radius_attr_list_t* list, tapi_radius_attr_type_t type);
te_errno tapi_radius_attr_list_to_string(const tapi_radius_attr_list_t* list, char** str);
te_errno tapi_radius_parse_packet(const uint8_t* data, size_t data_len, tapi_radius_packet_t* packet);
tapi_tad_trrecv_cb_data* tapi_radius_trrecv_cb_data(radius_callback callback, void* user_data);
te_errno tapi_radius_csap_create(const char* ta, int sid, const char* device, const in_addr_t net_addr, int port, csap_handle_t* csap);
te_errno tapi_radius_serv_enable(const char* ta_name);
te_errno tapi_radius_serv_disable(const char* ta_name);
te_errno tapi_radius_serv_set(const char* ta_name, const tapi_radius_serv_t* cfg);
te_errno tapi_radius_serv_add_client(const char* ta_name, const tapi_radius_clnt_t* cfg);
te_errno tapi_radius_serv_del_client(const char* ta_name, const struct in_addr* net_addr);
te_errno tapi_radius_serv_add_user(const char* ta_name, const char* user_name, bool acpt_user, const tapi_radius_attr_list_t* check_attrs, const tapi_radius_attr_list_t* acpt_attrs, const tapi_radius_attr_list_t* chlg_attrs);
te_errno tapi_radius_serv_set_user_attr(const char* ta_name, const char* user_name, tapi_radius_usr_list_t list_type, const tapi_radius_attr_list_t* attrs);
te_errno tapi_radius_serv_del_user(const char* ta_name, const char* user_name);
te_errno tapi_radius_add_auth(const char* ta_name, const tapi_auth_info_t* auth, const tapi_radius_attr_list_t* acpt_attrs, const tapi_radius_attr_list_t* chlg_attrs);
static te_errno tapi_radius_del_auth(const char* ta_name, const tapi_auth_info_t* auth);
static te_errno tapi_radius_disable_auth(const char* ta_name, tapi_auth_info_t* auth);
static te_errno tapi_supp_set(const char* ta_name, const char* if_name, int value);
te_errno tapi_supp_set_wifi_auth(const char* ta_name, const char* if_name, const tapi_auth_wifi_t* wifi);
te_errno tapi_supp_set_auth(const char* ta_name, const char* if_name, const tapi_auth_info_t* info);
te_errno tapi_supp_reset(const char* ta_name, const char* if_name);
RPCBITMAP2STR(tapi_iomux_event, IOMUX_EVENT_MAPPING_LIST);
tapi_iomux_type tapi_iomux_call_str2en(const char* iomux);
const char* tapi_iomux_call_en2str(tapi_iomux_type iomux_type);
short int tapi_iomux_evt_to_poll(tapi_iomux_evt iomux_evt_mask);
uint32_t tapi_iomux_evt_to_epoll(tapi_iomux_evt iomux_evt_mask);
tapi_iomux_evt tapi_iomux_poll_to_evt(short int poll_evt_mask);
tapi_iomux_evt tapi_iomux_epoll_to_evt(uint32_t epoll_evt_mask);
SLIST_HEAD(tapi_iomux_evts_list_h, tapi_iomux_evts_list);
tapi_iomux_handle* tapi_iomux_create(rcf_rpc_server* rpcs, tapi_iomux_type type);
void tapi_iomux_add(tapi_iomux_handle* iomux, int fd, tapi_iomux_evt evt);
void tapi_iomux_mod(tapi_iomux_handle* iomux, int fd, tapi_iomux_evt evt);
void tapi_iomux_del(tapi_iomux_handle* iomux, int fd);
void tapi_iomux_set_sigmask(tapi_iomux_handle* iomux, rpc_sigset_p sigmask);
int tapi_iomux_call(tapi_iomux_handle* iomux, int timeout, tapi_iomux_evt_fd** revts);
int tapi_iomux_pcall(tapi_iomux_handle* iomux, int timeout, rpc_sigset_p sigmask, tapi_iomux_evt_fd** revts);
void tapi_iomux_destroy(tapi_iomux_handle* iomux);
tapi_iomux_evt_fd* tapi_iomux_epoll_get_events(tapi_iomux_handle* iomux, struct rpc_epoll_event* events, int evts_num);
void tapi_network_setup(bool ipv6_supp);
te_errno tapi_neight_flush(rcf_rpc_server* rpcs, const char* ifname);
te_errno tapi_neight_flush_ta(rcf_rpc_server* rpcs);
int rpc_get_rw_ability(bool* answer, rcf_rpc_server* rpcs, int s, int timeout, char* type);
int tapi_check_pipe(rcf_rpc_server* rpcs, int* pipefds);
rpc_aiocb_p rpc_create_aiocb(rcf_rpc_server* rpcs);
void rpc_delete_aiocb(rcf_rpc_server* rpcs, rpc_aiocb_p cb);
void rpc_fill_aiocb(rcf_rpc_server* rpcs, rpc_aiocb_p cb, int fildes, rpc_lio_opcode opcode, int reqprio, rpc_ptr buf, size_t nbytes, const tarpc_sigevent* sigevent);
int rpc_aio_read(rcf_rpc_server* rpcs, rpc_aiocb_p cb);
int rpc_aio_write(rcf_rpc_server* rpcs, rpc_aiocb_p cb);
ssize_t rpc_aio_return(rcf_rpc_server* rpcs, rpc_aiocb_p cb);
int rpc_aio_error(rcf_rpc_server* rpcs, rpc_aiocb_p cb);
int rpc_aio_cancel(rcf_rpc_server* rpcs, int fd, rpc_aiocb_p cb);
int rpc_aio_fsync(rcf_rpc_server* rpcs, rpc_fcntl_flags op, rpc_aiocb_p cb);
int rpc_aio_suspend(rcf_rpc_server* rpcs, const rpc_aiocb_p* cblist, int n, const struct timespec* timeout);
int rpc_lio_listio(rcf_rpc_server* rpcs, rpc_lio_mode mode, const rpc_aiocb_p* cblist, int nent, const tarpc_sigevent* sigevent);
int rpc_create_and_bind_socket(rcf_rpc_server* rpc, rpc_socket_type sock_type, rpc_socket_proto proto, bool wild, bool set_reuse_addr, const struct sockaddr* addr);
int rpc_stream_server(rcf_rpc_server* srvr, rpc_socket_proto proto, bool srvr_wild, const struct sockaddr* srvr_addr);
int rpc_stream_client(rcf_rpc_server* clnt, rpc_socket_domain domain, rpc_socket_proto proto, const struct sockaddr* clnt_addr);
int rpc_stream_connection(rcf_rpc_server* srvr, rcf_rpc_server* clnt, rpc_socket_proto proto, const struct sockaddr* srvr_addr, const struct sockaddr* clnt_addr, int* srvr_s, int* clnt_s);
int rpc_dgram_connection_gen_wild(rcf_rpc_server* srvr, rcf_rpc_server* clnt, rpc_socket_proto proto, const struct sockaddr* srvr_addr, const struct sockaddr* clnt_addr, int* srvr_s, int* clnt_s, bool srvr_connect, bool clnt_connect, bool bind_wildcard);
static int rpc_dgram_connection_gen(rcf_rpc_server* srvr, rcf_rpc_server* clnt, rpc_socket_proto proto, const struct sockaddr* srvr_addr, const struct sockaddr* clnt_addr, int* srvr_s, int* clnt_s, bool srvr_connect, bool clnt_connect);
int rpc_dgram_connection(rcf_rpc_server* srvr, rcf_rpc_server* clnt, rpc_socket_proto proto, const struct sockaddr* srvr_addr, const struct sockaddr* clnt_addr, int* srvr_s, int* clnt_s);
int rpc_gen_connection_wild(rcf_rpc_server* srvr, rcf_rpc_server* clnt, rpc_socket_type sock_type, rpc_socket_proto proto, const struct sockaddr* srvr_addr, const struct sockaddr* clnt_addr, int* srvr_s, int* clnt_s, bool srvr_connect, bool bind_wildcard);
static int rpc_gen_connection(rcf_rpc_server* srvr, rcf_rpc_server* clnt, rpc_socket_type sock_type, rpc_socket_proto proto, const struct sockaddr* srvr_addr, const struct sockaddr* clnt_addr, int* srvr_s, int* clnt_s);
void rpc_struct_dirent_props(rcf_rpc_server* rpcs, size_t* props);
rpc_dir_p rpc_opendir(rcf_rpc_server* rpcs, const char* path);
int rpc_closedir(rcf_rpc_server* rpcs, rpc_dir_p dirp);
rpc_dirent* rpc_readdir(rcf_rpc_server* rpcs, rpc_dir_p dirp);
rpc_dlhandle rpc_dlopen(rcf_rpc_server* rpcs, const char* filename, int flags);
char* rpc_dlerror(rcf_rpc_server* rpcs);
rpc_dlsymaddr rpc_dlsym(rcf_rpc_server* rpcs, rpc_dlhandle handle, const char* symbol);
int rpc_dlsym_call(rcf_rpc_server* rpcs, rpc_dlhandle handle, const char* symbol);
int rpc_dlclose(rcf_rpc_server* rpcs, rpc_dlhandle handle);
unsigned int rpc_if_nametoindex(rcf_rpc_server* handle, const char* ifname);
char* rpc_if_indextoname(rcf_rpc_server* handle, unsigned int ifindex, char* ifname);
te_errno tapi_rpc_namespace_check(rcf_rpc_server* rpcs, rpc_ptr ptr, const char* ns, const char* function, int line);
const char* tapi_rpc_namespace_get(rcf_rpc_server* rpcs, rpc_ptr ptr);
te_errno msghdr_rpc2tarpc(const rpc_msghdr* rpc_msg, tarpc_msghdr* tarpc_msg, bool recv_call);
void tarpc_msghdr_free(tarpc_msghdr* msg);
te_errno msghdr_tarpc2rpc(const tarpc_msghdr* tarpc_msg, rpc_msghdr* rpc_msg);
te_errno mmsghdrs_rpc2tarpc(const struct rpc_mmsghdr* rpc_mmsgs, unsigned int num, tarpc_mmsghdr** tarpc_mmsgs, bool recv_call);
void tarpc_mmsghdrs_free(tarpc_mmsghdr* tarpc_mmsgs, unsigned int num);
te_errno mmsghdrs_tarpc2rpc(const tarpc_mmsghdr* tarpc_mmsgs, struct rpc_mmsghdr* rpc_mmsgs, unsigned int num);
static void tapi_rand_gen_set(tapi_rand_gen* arg, int min, int max, tarpc_bool once);
void tapi_pat_sender_init(tapi_pat_sender* p);
void tapi_pat_receiver_init(tapi_pat_receiver* p);
bool rpc_find_func(rcf_rpc_server* rpcs, const char* func_name);
int rpc_vlan_get_parent(rcf_rpc_server* rpcs, const char* vlan_ifname, char* parent_ifname);
int rpc_bond_get_slaves(rcf_rpc_server* rpcs, const char* bond_ifname, tqh_strings* slaves, int* slaves_num);
tarpc_ssize_t rpc_get_sizeof(rcf_rpc_server* rpcs, const char* type_name);
bool rpc_protocol_info_cmp(rcf_rpc_server* rpcs, const uint8_t* buf1, const uint8_t* buf2, tarpc_bool is_wide1, tarpc_bool is_wide2);
rpc_ptr rpc_get_addrof(rcf_rpc_server* rpcs, const char* name);
uint64_t rpc_get_var(rcf_rpc_server* rpcs, const char* name, tarpc_size_t size);
void rpc_set_var(rcf_rpc_server* rpcs, const char* name, tarpc_size_t size, uint64_t val);
int rpc_simple_sender(rcf_rpc_server* handle, int s, int size_min, int size_max, int size_rnd_once, int delay_min, int delay_max, int delay_rnd_once, int time2run, uint64_t* sent, int ignore_err);
int rpc_simple_receiver(rcf_rpc_server* handle, int s, uint32_t time2run, uint64_t* received);
int rpc_pattern_sender(rcf_rpc_server* rpcs, int s, tapi_pat_sender* args);
int rpc_pattern_receiver(rcf_rpc_server* rpcs, int s, tapi_pat_receiver* args);
int rpc_wait_readable(rcf_rpc_server* rpcs, int s, uint32_t timeout);
int rpc_recv_verify(rcf_rpc_server* handle, int s, const char* gen_data_fname, uint64_t start);
int rpc_iomux_flooder(rcf_rpc_server* handle, int* sndrs, int sndnum, int* rcvrs, int rcvnum, int bulkszs, int time2run, int time2wait, int iomux, uint64_t* tx_stat, uint64_t* rx_stat);
int rpc_send_flooder_iomux(rcf_rpc_server* rpcs, int sock, iomux_func iomux, tarpc_send_function send_func, bool msg_dontwait, int packet_size, int duration, uint64_t* packets, uint32_t* errors);
int rpc_iomux_echoer(rcf_rpc_server* handle, int* sockets, int socknum, int time2run, int iomux, uint64_t* tx_stat, uint64_t* rx_stat);
int rpc_iomux_splice(rcf_rpc_server* rpcs, int iomux, int fd_in, int fd_out, size_t len, int flags, int time2run);
ssize_t rpc_socket_to_file(rcf_rpc_server* handle, int sock, const char* path_name, long timeout);
int64_t rpc_copy_fd2fd(rcf_rpc_server* rpcs, int out_fd, int in_fd, int timeout, uint64_t count);
int rpc_ftp_open(rcf_rpc_server* handle, char* uri, bool rdonly, bool passive, int offset, int* sock);
int rpc_ftp_close(rcf_rpc_server* handle, int sock);
int rpc_overfill_buffers_data(rcf_rpc_server* rpcs, int sock, uint64_t* sent, iomux_func iomux, uint8_t** sent_data);
static int rpc_overfill_buffers_gen(rcf_rpc_server* rpcs, int sock, uint64_t* sent, iomux_func iomux);
static int rpc_overfill_buffers(rcf_rpc_server* rpcs, int sock, uint64_t* sent);
int rpc_drain_fd(rcf_rpc_server* rpcs, int fd, size_t size, int time2wait, uint64_t* read);
int rpc_drain_fd_duration(rcf_rpc_server* rpcs, int fd, size_t size, int time2wait, unsigned int duration, uint64_t* read);
int rpc_drain_fd_simple(rcf_rpc_server* rpcs, int fd, uint64_t* read);
int rpc_overfill_fd(rcf_rpc_server* rpcs, int write_end, uint64_t* sent);
int rpc_read_fd2te_dbuf_append(rcf_rpc_server* rpcs, int fd, int time2wait, size_t amount, te_dbuf* dbuf);
int rpc_read_fd2te_dbuf(rcf_rpc_server* rpcs, int fd, int time2wait, size_t amount, te_dbuf* dbuf);
int rpc_read_fd(rcf_rpc_server* rpcs, int fd, int time2wait, size_t amount, void** buf, size_t* read);
int rpc_read_fd2te_string_append(rcf_rpc_server* rpcs, int fd, int time2wait, size_t amount, te_string* testr);
int rpc_read_fd2te_string(rcf_rpc_server* rpcs, int fd, int time2wait, size_t amount, te_string* testr);
void rpc_vm_trasher(rcf_rpc_server* rpcs, bool start);
void rpc_set_buf_gen(rcf_rpc_server* rpcs, const uint8_t* src_buf, size_t len, rpc_ptr dst_buf, size_t dst_off);
static void rpc_set_buf(rcf_rpc_server* rpcs, const uint8_t* src_buf, size_t len, rpc_ptr dst_buf);
static void rpc_set_buf_off(rcf_rpc_server* rpcs, const uint8_t* src_buf, size_t len, rpc_ptr_off* dst_buf);
void rpc_set_buf_pattern_gen(rcf_rpc_server* rpcs, int pattern, size_t len, rpc_ptr dst_buf, size_t dst_off);
static void rpc_set_buf_pattern(rcf_rpc_server* rpcs, int pattern, size_t len, rpc_ptr dst_buf);
static void rpc_set_buf_pattern_off(rcf_rpc_server* rpcs, int pattern, size_t len, rpc_ptr_off* dst_buf);
void rpc_get_buf_gen(rcf_rpc_server* rpcs, rpc_ptr src_buf, size_t src_off, size_t len, uint8_t* dst_buf);
static void rpc_get_buf(rcf_rpc_server* rpcs, rpc_ptr src_buf, size_t len, uint8_t* dst_buf);
static void rpc_get_buf_off(rcf_rpc_server* rpcs, rpc_ptr_off* src_buf, size_t len, uint8_t* dst_buf);
void rpc_create_child_process_socket(const char* method, rcf_rpc_server* pco_father, int father_s, rpc_socket_domain domain, rpc_socket_type sock_type, rcf_rpc_server** pco_child, int* child_s);
te_errno tapi_sigaction_simple(rcf_rpc_server* rpcs, rpc_signum signum, const char* handler, struct rpc_struct_sigaction* oldact);
int rpc_mcast_join(rcf_rpc_server* rpcs, int s, const struct sockaddr* mcast_addr, int if_index, tarpc_joining_method how);
int rpc_mcast_leave(rcf_rpc_server* rpcs, int s, const struct sockaddr* mcast_addr, int if_index, tarpc_joining_method how);
int rpc_mcast_source_join(rcf_rpc_server* rpcs, int s, const struct sockaddr* mcast_addr, const struct sockaddr* source_addr, int if_index, tarpc_joining_method how);
int rpc_mcast_source_leave(rcf_rpc_server* rpcs, int s, const struct sockaddr* mcast_addr, const struct sockaddr* source_addr, int if_index, tarpc_joining_method how);
int rpc_common_mcast_join(rcf_rpc_server* rpcs, int s, const struct sockaddr* mcast_addr, const struct sockaddr* source_addr, int if_index, tarpc_joining_method how);
int rpc_common_mcast_leave(rcf_rpc_server* rpcs, int s, const struct sockaddr* mcast_addr, const struct sockaddr* source_addr, int if_index, tarpc_joining_method how);
int rpc_memcmp(rcf_rpc_server* rpcs, rpc_ptr_off* s1, rpc_ptr_off* s2, size_t n);
int rpc_iomux_create_state(rcf_rpc_server* rpcs, iomux_func iomux, tarpc_iomux_state* iomux_st);
int rpc_multiple_iomux_wait(rcf_rpc_server* rpcs, int fd, iomux_func iomux, tarpc_iomux_state iomux_st, int events, int count, int duration, int exp_rc, int* number, int* last_rc, int* zero_rc);
int rpc_iomux_close_state(rcf_rpc_server* rpcs, iomux_func iomux, tarpc_iomux_state iomux_st);
int rpc_multiple_iomux(rcf_rpc_server* rpcs, int fd, iomux_func iomux, int events, int count, int duration, int exp_rc, int* number, int* last_rc, int* zero_rc);
int rpc_raw2integer(rcf_rpc_server* rpcs, uint8_t* data, size_t len);
int rpc_integer2raw(rcf_rpc_server* rpcs, uint64_t number, uint8_t* data, size_t len);
int rpc_vfork_pipe_exec(rcf_rpc_server* rpcs, bool use_exec);
static bool tapi_interface_is_mine(const char* ta, const char* interface);
te_errno tapi_set_if_mtu_smart(const char* ta, const struct if_nameindex* interface, int mtu, int* old_mtu);
typedef LIST_HEAD(te_saved_mtus, te_saved_mtu);
void tapi_saved_mtus_free(te_saved_mtus* mtus);
te_errno tapi_saved_mtus2str(te_saved_mtus* mtus, char** str);
te_errno tapi_str2saved_mtus(const char* str, te_saved_mtus* mtus);
te_errno tapi_store_saved_mtus(const char* ta, const char* name, te_saved_mtus* mtus);
bool tapi_stored_mtus_exist(const char* ta, const char* name);
te_errno tapi_retrieve_saved_mtus(const char* ta, const char* name, te_saved_mtus* mtus);
te_errno tapi_set_if_mtu_smart2(const char* ta, const char* if_name, int mtu, te_saved_mtus* backup);
te_errno tapi_set_if_mtu_smart2_rollback(te_saved_mtus* backup);
bool tapi_interface_is_vlan(rcf_rpc_server* rpcs, const struct if_nameindex* interface);
te_errno tapi_interface_vlan_count(const char* ta, const char* if_name, size_t* num);
void rpc_release_rpc_ptr(rcf_rpc_server* rpcs, rpc_ptr ptr, char* ns_string);
int rpc_remove_dir_with_files(rcf_rpc_server* rpcs, const char* path);
te_errno rpc_te_file_check_executable(rcf_rpc_server* rpcs, const char* path);
rpc_ptr rpc_mmap(rcf_rpc_server* rpcs, uint64_t addr, uint64_t length, unsigned int prot, unsigned int flags, int fd, off_t offset);
int rpc_munmap(rcf_rpc_server* rpcs, rpc_ptr addr, uint64_t length);
int rpc_madvise(rcf_rpc_server* rpcs, rpc_ptr addr, uint64_t length, rpc_madv_value advise);
struct hostent* rpc_gethostbyname(rcf_rpc_server* handle, const char* name);
struct hostent* rpc_gethostbyaddr(rcf_rpc_server* handle, const char* addr, int len, rpc_socket_addr_family type);
int rpc_power_sw(rcf_rpc_server* rpcs, const char* type, const char* dev, int mask, const char* cmd);
char* rpc_signal(rcf_rpc_server* rpcs, rpc_signum signum, const char* handler);
char* rpc_bsd_signal(rcf_rpc_server* rpcs, rpc_signum signum, const char* handler);
char* rpc_sysv_signal(rcf_rpc_server* rpcs, rpc_signum signum, const char* handler);
char* rpc___sysv_signal(rcf_rpc_server* rpcs, rpc_signum signum, const char* handler);
int rpc_kill(rcf_rpc_server* rpcs, tarpc_pid_t pid, rpc_signum signum);
int rpc_pthread_kill(rcf_rpc_server* rpcs, tarpc_pthread_t tid, rpc_signum signum);
int rpc_tgkill(rcf_rpc_server* rpcs, tarpc_int tgid, tarpc_int tid, rpc_signum sig);
tarpc_pid_t rpc_waitpid(rcf_rpc_server* rpcs, tarpc_pid_t pid, rpc_wait_status* status, rpc_waitpid_opts options);
void rpc_sigaction_init(rcf_rpc_server* rpcs, struct rpc_struct_sigaction* sa);
void rpc_sigaction_release(rcf_rpc_server* rpcs, struct rpc_struct_sigaction* sa);
static void rpc_sigaction_reinit(rcf_rpc_server* rpcs, struct rpc_struct_sigaction* sa);
int rpc_sigaction(rcf_rpc_server* rpcs, rpc_signum signum, const struct rpc_struct_sigaction* act, struct rpc_struct_sigaction* oldact);
int rpc_sigaltstack(rcf_rpc_server* rpcs, tarpc_stack_t* ss, tarpc_stack_t* oss);
rpc_sigset_p rpc_sigset_new(rcf_rpc_server* rpcs);
void rpc_sigset_delete(rcf_rpc_server* rpcs, rpc_sigset_p set);
rpc_sigset_p rpc_sigreceived(rcf_rpc_server* rpcs);
int rpc_siginfo_received(rcf_rpc_server* rpcs, tarpc_siginfo_t* siginfo);
int rpc_sigset_cmp(rcf_rpc_server* rpcs, const rpc_sigset_p first_set, const rpc_sigset_p second_set);
int rpc_sigprocmask(rcf_rpc_server* rpcs, rpc_sighow how, const rpc_sigset_p set, rpc_sigset_p oldset);
int rpc_sigemptyset(rcf_rpc_server* rpcs, rpc_sigset_p set);
int rpc_sigfillset(rcf_rpc_server* rpcs, rpc_sigset_p set);
int rpc_sigaddset(rcf_rpc_server* rpcs, rpc_sigset_p set, rpc_signum signum);
int rpc_sigdelset(rcf_rpc_server* rpcs, rpc_sigset_p set, rpc_signum signum);
int rpc_sigismember(rcf_rpc_server* rpcs, const rpc_sigset_p set, rpc_signum signum);
int rpc_sigpending(rcf_rpc_server* rpcs, rpc_sigset_p set);
int rpc_sigsuspend(rcf_rpc_server* rpcs, const rpc_sigset_p set);
int rpc_ta_kill_death(rcf_rpc_server* rpcs, tarpc_pid_t pid);
int rpc_ta_kill_and_wait(rcf_rpc_server* rpcs, tarpc_pid_t pid, rpc_signum sig, unsigned int timeout_s);
int rpc_siginterrupt(rcf_rpc_server* rpcs, rpc_signum signum, int flag);
void rpc_signal_registrar_cleanup(rcf_rpc_server* rpcs);
static int socket_domain_by_af(int af);
static rpc_socket_domain rpc_socket_domain_by_af(int af);
static rpc_socket_domain rpc_socket_domain_by_addr(const struct sockaddr* addr);
int rpc_socket(rcf_rpc_server* rpcs, rpc_socket_domain domain, rpc_socket_type type, rpc_socket_proto protocol);
int rpc_shutdown(rcf_rpc_server* rpcs, int s, rpc_shut_how how);
ssize_t rpc_send(rcf_rpc_server* rpcs, int s, const void* buf, size_t len, rpc_send_recv_flags flags);
ssize_t rpc_sendto(rcf_rpc_server* rpcs, int s, const void* buf, size_t len, rpc_send_recv_flags flags, const struct sockaddr* to);
ssize_t rpc_sendto_raw(rcf_rpc_server* rpcs, int s, const void* buf, size_t len, rpc_send_recv_flags flags, const struct sockaddr* to, socklen_t tolen);
ssize_t rpc_recv_gen(rcf_rpc_server* rpcs, int s, void* buf, size_t len, rpc_send_recv_flags flags, size_t rbuflen);
static ssize_t rpc_recv(rcf_rpc_server* rpcs, int s, void* buf, size_t len, rpc_send_recv_flags flags);
ssize_t rpc_recvfrom_gen(rcf_rpc_server* rpcs, int s, void* buf, size_t len, rpc_send_recv_flags flags, struct sockaddr* from, socklen_t* fromlen, size_t rbuflen, socklen_t rfrombuflen);
static ssize_t rpc_recvfrom(rcf_rpc_server* rpcs, int s, void* buf, size_t len, rpc_send_recv_flags flags, struct sockaddr* from, socklen_t* fromlen);
const char* msghdr_rpc2str(const rpc_msghdr* rpc_msg, te_string* str);
const char* mmsghdrs_rpc2str(const struct rpc_mmsghdr* rpc_mmsgs, unsigned int num, te_string* str);
struct cmsghdr* rpc_cmsg_firsthdr(rpc_msghdr* rpc_msg);
struct cmsghdr* rpc_cmsg_nxthdr(rpc_msghdr* rpc_msg, struct cmsghdr* cmsg);
static int tapi_send_recv_flags_rand(void);
void tapi_rpc_msghdr_msg_flags_init_check(bool enable);
ssize_t rpc_sendmsg(rcf_rpc_server* rpcs, int s, const struct rpc_msghdr* msg, rpc_send_recv_flags flags);
ssize_t rpc_recvmsg(rcf_rpc_server* rpcs, int s, struct rpc_msghdr* msg, rpc_send_recv_flags flags);
ssize_t rpc_sendbuf_gen(rcf_rpc_server* rpcs, int s, rpc_ptr buf, size_t buf_off, size_t len, rpc_send_recv_flags flags);
static ssize_t rpc_sendbuf(rcf_rpc_server* rpcs, int s, rpc_ptr buf, size_t len, rpc_send_recv_flags flags);
static ssize_t rpc_sendbuf_off(rcf_rpc_server* rpcs, int s, rpc_ptr_off* buf, size_t len, rpc_send_recv_flags flags);
ssize_t rpc_send_msg_more(rcf_rpc_server* rpcs, int s, rpc_ptr buf, size_t first_len, size_t second_len);
ssize_t rpc_send_msg_more_ext(rcf_rpc_server* rpcs, int s, rpc_ptr buf, size_t first_len, size_t second_len, tarpc_send_function first_func, tarpc_send_function second_func, bool set_nodelay);
ssize_t rpc_send_one_byte_many(rcf_rpc_server* rpcs, int s, int duration);
tarpc_ssize_t rpc_recvbuf_gen(rcf_rpc_server* rpcs, int fd, rpc_ptr buf, size_t buf_off, size_t count, rpc_send_recv_flags flags);
static tarpc_ssize_t rpc_recvbuf(rcf_rpc_server* rpcs, int fd, rpc_ptr buf, size_t count, rpc_send_recv_flags flags);
static tarpc_ssize_t rpc_recvbuf_off(rcf_rpc_server* rpcs, int fd, rpc_ptr_off* buf, size_t count, rpc_send_recv_flags flags);
int rpc_cmsg_data_parse_ip_pktinfo(rcf_rpc_server* rpcs, uint8_t* data, uint32_t data_len, struct in_addr* ipi_spec_dst, struct in_addr* ipi_addr, int* ipi_ifindex);
int rpc_bind(rcf_rpc_server* rpcs, int s, const struct sockaddr* my_addr);
int rpc_bind_len(rcf_rpc_server* rpcs, int s, const struct sockaddr* my_addr, socklen_t addrlen);
int rpc_bind_raw(rcf_rpc_server* rpcs, int s, const struct sockaddr* my_addr, socklen_t addrlen);
int rpc_check_port_is_free(rcf_rpc_server* rpcs, uint16_t port);
int rpc_connect(rcf_rpc_server* rpcs, int s, const struct sockaddr* addr);
int rpc_connect_raw(rcf_rpc_server* rpcs, int s, const struct sockaddr* addr, socklen_t addrlen);
int rpc_listen(rcf_rpc_server* rpcs, int s, int backlog);
int rpc_accept_gen(rcf_rpc_server* rpcs, int s, struct sockaddr* addr, socklen_t* addrlen, socklen_t raddrlen);
int rpc_accept4_gen(rcf_rpc_server* rpcs, int s, struct sockaddr* addr, socklen_t* addrlen, socklen_t raddrlen, int flags);
static int rpc_accept(rcf_rpc_server* rpcs, int s, struct sockaddr* addr, socklen_t* addrlen);
static int rpc_accept4(rcf_rpc_server* rpcs, int s, struct sockaddr* addr, socklen_t* addrlen, int flags);
int rpc_getsockopt_gen(rcf_rpc_server* rpcs, int s, rpc_socklevel level, rpc_sockopt optname, void* optval, void* raw_optval, socklen_t* raw_optlen, socklen_t raw_roptlen);
static int rpc_getsockopt_raw(rcf_rpc_server* rpcs, int s, rpc_sockopt optname, void* raw_optval, socklen_t* raw_optlen);
static int rpc_getsockopt(rcf_rpc_server* rpcs, int s, rpc_sockopt optname, void* optval);
int rpc_setsockopt_gen(rcf_rpc_server* rpcs, int s, rpc_socklevel level, rpc_sockopt optname, const void* optval, const void* raw_optval, socklen_t raw_optlen, socklen_t raw_roptlen);
static int rpc_setsockopt_raw(rcf_rpc_server* rpcs, int s, rpc_sockopt optname, const void* raw_optval, socklen_t raw_optlen);
static int rpc_setsockopt(rcf_rpc_server* rpcs, int s, rpc_sockopt optname, const void* optval);
static int rpc_setsockopt_int(rcf_rpc_server* rpcs, int s, rpc_sockopt optname, int optval);
int rpc_setsockopt_check_int(rcf_rpc_server* rpcs, int s, rpc_sockopt optname, int optval);
int rpc_getsockname_gen(rcf_rpc_server* rpcs, int s, struct sockaddr* name, socklen_t* namelen, socklen_t rnamelen);
static int rpc_getsockname(rcf_rpc_server* rpcs, int s, struct sockaddr* name, socklen_t* namelen);
int rpc_getpeername_gen(rcf_rpc_server* rpcs, int s, struct sockaddr* name, socklen_t* namelen, socklen_t rnamelen);
static int rpc_getpeername(rcf_rpc_server* rpcs, int s, struct sockaddr* name, socklen_t* namelen);
int rpc_recvmmsg_alt(rcf_rpc_server* rpcs, int fd, struct rpc_mmsghdr* mmsg, unsigned int vlen, rpc_send_recv_flags flags, struct tarpc_timespec* timeout);
int rpc_sendmmsg_alt(rcf_rpc_server* rpcs, int fd, struct rpc_mmsghdr* mmsg, unsigned int vlen, rpc_send_recv_flags flags);
int rpc_socket_connect_close(rcf_rpc_server* rpcs, rpc_socket_domain domain, const struct sockaddr* addr, uint32_t time2run);
int rpc_socket_listen_close(rcf_rpc_server* rpcs, rpc_socket_domain domain, const struct sockaddr* addr, uint32_t time2run);
void tapi_rpc_provoke_arp_resolution(rcf_rpc_server* rpcs, const struct sockaddr* addr);
int rpc_fileno(rcf_rpc_server* rpcs, rpc_file_p f);
rpc_file_p rpc_fopen(rcf_rpc_server* rpcs, const char* path, const char* mode);
rpc_file_p rpc_fdopen(rcf_rpc_server* rpcs, int fd, const char* mode);
int rpc_fclose(rcf_rpc_server* rpcs, rpc_file_p file);
rpc_wait_status rpc_system(rcf_rpc_server* rpcs, const char* cmd);
rpc_wait_status rpc_system_ex(rcf_rpc_server* rpcs, const char* cmd, ...);
rpc_file_p rpc_popen(rcf_rpc_server* rpcs, const char* cmd, const char* mode);
int rpc_pclose(rcf_rpc_server* rpcs, rpc_file_p file);
rpc_wait_status rpc_shell_get_all(rcf_rpc_server* rpcs, char** pbuf, const char* cmd, tarpc_uid_t uid, ...);
rpc_wait_status rpc_shell_get_all2(rcf_rpc_server* rpcs, char** pbuf, const char* cmd, ...);
rpc_wait_status rpc_shell_get_all3(rcf_rpc_server* rpcs, char** pbuf, const char* cmd, ...);
tarpc_pid_t rpc_te_shell_cmd(rcf_rpc_server* rpcs, const char* cmd, tarpc_uid_t uid, int* in_fd, int* out_fd, int* err_fd, ...);
char* rpc_getenv(rcf_rpc_server* rpcs, const char* name);
static int rpc_getenv_int(rcf_rpc_server* rpcs, const char* name, int* val);
int rpc_setenv(rcf_rpc_server* rpcs, const char* name, const char* value, int overwrite);
int rpc_unsetenv(rcf_rpc_server* rpcs, const char* name);
const char* tarpc_timeval2str(const struct tarpc_timeval* tv);
const char* timespec2str(const struct timespec* tv);
const char* tarpc_timespec2str(const struct tarpc_timespec* tv);
const char* tarpc_hwtstamp_config2str(const tarpc_hwtstamp_config* hw_cfg);
int rpc_gettimeofday(rcf_rpc_server* rpcs, tarpc_timeval* tv, tarpc_timezone* tz);
int rpc_clock_gettime(rcf_rpc_server* rpcs, tarpc_clock_id_type id_type, int id, tarpc_timespec* ts);
int rpc_clock_settime(rcf_rpc_server* rpcs, tarpc_clock_id_type id_type, int id, const tarpc_timespec* ts);
int rpc_clock_adjtime(rcf_rpc_server* rpcs, tarpc_clock_id_type id_type, int id, tarpc_timex* params);
int rpc_open(rcf_rpc_server* rpcs, const char* path, rpc_fcntl_flags flags, rpc_file_mode_flags mode);
int rpc_open64(rcf_rpc_server* rpcs, const char* path, rpc_fcntl_flags flags, rpc_file_mode_flags mode);
int rpc_mkstemp(rcf_rpc_server* rpcs, const char* template, char** pathname);
int rpc_close(rcf_rpc_server* rpcs, int fd);
ssize_t rpc_write_at_offset(rcf_rpc_server* rpcs, int fd, char* buf, size_t buflen, off_t offset);
int rpc_dup(rcf_rpc_server* rpcs, int oldfd);
int rpc_dup2(rcf_rpc_server* rpcs, int oldfd, int newfd);
int rpc_dup3(rcf_rpc_server* rpcs, int oldfd, int newfd, int flags);
int rpc_write(rcf_rpc_server* rpcs, int fd, const void* buf, size_t count);
int rpc_pwrite(rcf_rpc_server* rpcs, int fd, const void* buf, size_t count, off_t offset);
int rpc_write_via_splice(rcf_rpc_server* rpcs, int fd, const void* buf, size_t count);
int rpc_write_and_close(rcf_rpc_server* rpcs, int fd, const void* buf, size_t count);
tarpc_ssize_t rpc_writebuf_gen(rcf_rpc_server* rpcs, int fd, rpc_ptr buf, size_t buf_off, size_t count);
static tarpc_ssize_t rpc_writebuf(rcf_rpc_server* rpcs, int fd, rpc_ptr buf, size_t count);
static tarpc_ssize_t rpc_writebuf_off(rcf_rpc_server* rpcs, int fd, rpc_ptr_off* buf, size_t count);
int rpc_read_gen(rcf_rpc_server* rpcs, int fd, void* buf, size_t count, size_t rbuflen);
int rpc_read_via_splice(rcf_rpc_server* rpcs, int fd, void* buf, size_t count);
static int rpc_read(rcf_rpc_server* rpcs, int fd, void* buf, size_t count);
int rpc_pread(rcf_rpc_server* rpcs, int fd, void* buf, size_t count, tarpc_off_t offset);
tarpc_ssize_t rpc_readbuf_gen(rcf_rpc_server* rpcs, int fd, rpc_ptr buf, size_t buf_off, size_t count);
static tarpc_ssize_t rpc_readbuf(rcf_rpc_server* rpcs, int fd, rpc_ptr buf, size_t count);
static tarpc_ssize_t rpc_readbuf_off(rcf_rpc_server* rpcs, int fd, rpc_ptr_off* buf, size_t count);
tarpc_off_t rpc_lseek(rcf_rpc_server* rpcs, int fd, tarpc_off_t pos, rpc_lseek_mode mode);
int rpc_truncate(rcf_rpc_server* rpcs, const char* path, tarpc_off_t length);
int rpc_ftruncate(rcf_rpc_server* rpcs, int fd, tarpc_off_t length);
int rpc_fsync(rcf_rpc_server* rpcs, int fd);
uint8_t* rpc_iovec_to_array(size_t len, const struct rpc_iovec* v, size_t cnt);
void te_iovec_rpc2tarpc(const rpc_iovec* rpc_iovs, tarpc_iovec* tarpc_iovs, size_t count);
te_errno te_iovec_rpc2str_append(te_string* str, const rpc_iovec* iovs, size_t count);
int rpc_iovec_cmp(size_t v1len, const struct rpc_iovec* v1, size_t v1cnt, size_t v2len, const struct rpc_iovec* v2, size_t v2cnt);
void rpc_iovec_cmp_strict(rpc_iovec* iov1, rpc_iovec* iov2, size_t iovcnt);
int rpc_writev(rcf_rpc_server* rpcs, int fd, const struct rpc_iovec* iov, size_t iovcnt);
int rpc_pwritev(rcf_rpc_server* rpcs, int fd, const struct rpc_iovec* iov, size_t iovcnt, tarpc_off_t offset);
int rpc_pwritev2(rcf_rpc_server* rpcs, int fd, const struct rpc_iovec* iov, size_t iovcnt, tarpc_off_t offset, rpc_preadv2_pwritev2_flags flags);
int rpc_readv_gen(rcf_rpc_server* rpcs, int fd, const struct rpc_iovec* iov, size_t iovcnt, size_t riovcnt);
static int rpc_readv(rcf_rpc_server* rpcs, int fd, const struct rpc_iovec* iov, size_t iovcnt);
int rpc_preadv(rcf_rpc_server* rpcs, int fd, const struct rpc_iovec* iov, size_t iovcnt, tarpc_off_t offset);
int rpc_preadv2(rcf_rpc_server* rpcs, int fd, const struct rpc_iovec* iov, size_t iovcnt, tarpc_off_t offset, rpc_preadv2_pwritev2_flags flags);
rpc_fd_set_p rpc_fd_set_new(rcf_rpc_server* rpcs);
void rpc_fd_set_delete(rcf_rpc_server* rpcs, rpc_fd_set_p set);
void rpc_do_fd_zero(rcf_rpc_server* rpcs, rpc_fd_set_p set);
void rpc_do_fd_set(rcf_rpc_server* rpcs, int fd, rpc_fd_set_p set);
void rpc_do_fd_clr(rcf_rpc_server* rpcs, int fd, rpc_fd_set_p set);
int rpc_do_fd_isset(rcf_rpc_server* rpcs, int fd, rpc_fd_set_p set);
int rpc_select(rcf_rpc_server* rpcs, int n, rpc_fd_set_p readfds, rpc_fd_set_p writefds, rpc_fd_set_p exceptfds, struct tarpc_timeval* timeout);
int rpc_pselect(rcf_rpc_server* rpcs, int n, rpc_fd_set_p readfds, rpc_fd_set_p writefds, rpc_fd_set_p exceptfds, struct tarpc_timespec* timeout, const rpc_sigset_p sigmask);
int rpc_epoll_create(rcf_rpc_server* rpcs, int size);
int rpc_epoll_create1(rcf_rpc_server* rpcs, int flags);
int rpc_epoll_ctl(rcf_rpc_server* rpcs, int epfd, int oper, int fd, struct rpc_epoll_event* event);
static int rpc_epoll_ctl_simple(rcf_rpc_server* rpcs, int epfd, int oper, int fd, uint32_t events);
int rpc_epoll_wait_gen(rcf_rpc_server* rpcs, int epfd, struct rpc_epoll_event* events, int rmaxev, int maxevents, int timeout);
static int rpc_epoll_wait(rcf_rpc_server* rpcs, int epfd, struct rpc_epoll_event* events, int maxevents, int timeout);
int rpc_epoll_pwait_gen(rcf_rpc_server* rpcs, int epfd, struct rpc_epoll_event* events, int rmaxev, int maxevents, int timeout, const rpc_sigset_p sigmask);
static int rpc_epoll_pwait(rcf_rpc_server* rpcs, int epfd, struct rpc_epoll_event* events, int maxevents, int timeout, const rpc_sigset_p sigmask);
int rpc_epoll_pwait2_gen(rcf_rpc_server* rpcs, int epfd, struct rpc_epoll_event* events, int rmaxev, int maxevents, struct tarpc_timespec* timeout, const rpc_sigset_p sigmask);
static int rpc_epoll_pwait2(rcf_rpc_server* rpcs, int epfd, struct rpc_epoll_event* events, int maxevents, struct tarpc_timespec* timeout, const rpc_sigset_p sigmask);
int rpc_poll_gen(rcf_rpc_server* rpcs, struct rpc_pollfd* ufds, unsigned int nfds, int timeout, unsigned int rnfds);
static int rpc_poll(rcf_rpc_server* rpcs, struct rpc_pollfd* ufds, unsigned int nfds, int timeout);
int rpc_ppoll_gen(rcf_rpc_server* rpcs, struct rpc_pollfd* ufds, unsigned int nfds, struct tarpc_timespec* timeout, const rpc_sigset_p sigmask, unsigned int rnfds);
static int rpc_ppoll(rcf_rpc_server* rpcs, struct rpc_pollfd* ufds, unsigned int nfds, struct tarpc_timespec* timeout, const rpc_sigset_p sigmask);
ssize_t rpc_sendfile(rcf_rpc_server* rpcs, int out_fd, int in_fd, tarpc_off_t* offset, size_t count, tarpc_bool force64);
ssize_t rpc_sendfile_via_splice(rcf_rpc_server* rpcs, int out_fd, int in_fd, tarpc_off_t* offset, size_t count);
ssize_t rpc_splice(rcf_rpc_server* rpcs, int fd_in, tarpc_off_t* off_in, int fd_out, tarpc_off_t* off_out, size_t len, int flags);
int rpc_ioctl(rcf_rpc_server* rpcs, int fd, rpc_ioctl_code request, ...);
int rpc_fcntl(rcf_rpc_server* rpcs, int fd, int cmd, ...);
int rpc_pipe(rcf_rpc_server* rpcs, int filedes[2]);
int rpc_pipe2(rcf_rpc_server* rpcs, int filedes[2], int flags);
int rpc_socketpair(rcf_rpc_server* rpcs, rpc_socket_domain domain, rpc_socket_type type, rpc_socket_proto protocol, int sv[2]);
void rpc_exit(rcf_rpc_server* rpcs, int status);
void rpc__exit(rcf_rpc_server* rpcs, int status);
pid_t rpc_getpid(rcf_rpc_server* rpcs);
tarpc_pthread_t rpc_pthread_self(rcf_rpc_server* rpcs);
int rpc_pthread_cancel(rcf_rpc_server* rpcs, tarpc_pthread_t tid);
int rpc_pthread_setcancelstate(rcf_rpc_server* rpcs, rpc_pthread_cancelstate state, rpc_pthread_cancelstate* oldstate);
int rpc_pthread_setcanceltype(rcf_rpc_server* rpcs, rpc_pthread_canceltype type, rpc_pthread_canceltype* oldtype);
int rpc_pthread_join(rcf_rpc_server* rpcs, tarpc_pthread_t tid, uint64_t* retval);
int rpc_gettid(rcf_rpc_server* rpcs);
tarpc_uid_t rpc_getuid(rcf_rpc_server* rpcs);
int rpc_setuid(rcf_rpc_server* rpcs, tarpc_uid_t uid);
int rpc_access(rcf_rpc_server* rpcs, const char* path, int mode);
struct passwd* rpc_getpwnam(rcf_rpc_server* rpcs, const char* name);
int rpc_uname(rcf_rpc_server* rpcs, struct utsname* buf);
tarpc_uid_t rpc_geteuid(rcf_rpc_server* rpcs);
int rpc_seteuid(rcf_rpc_server* rpcs, tarpc_uid_t uid);
rpc_ptr rpc_malloc(rcf_rpc_server* rpcs, size_t size);
void rpc_free(rcf_rpc_server* rpcs, rpc_ptr buf);
uint64_t rpc_get_addr_by_id(rcf_rpc_server* rpcs, rpc_ptr id);
static bool rpc_malloc_off(rcf_rpc_server* rpcs, size_t size, rpc_ptr_off** buf);
static void rpc_free_off(rcf_rpc_server* rpcs, rpc_ptr_off* buf);
rpc_ptr rpc_malloc_misaligned(rcf_rpc_server* rpcs, size_t alignment, size_t size, size_t offset);
int rpc_posix_memalign(rcf_rpc_server* rpcs, rpc_ptr* ptr, size_t alignment, size_t size);
int rpc_setrlimit(rcf_rpc_server* rpcs, int resource, const tarpc_rlimit* rlim);
int rpc_getrlimit(rcf_rpc_server* rpcs, int resource, tarpc_rlimit* rlim);
int64_t rpc_sysconf(rcf_rpc_server* rpcs, rpc_sysconf_name name);
int rpc_fstat(rcf_rpc_server* rpcs, int fd, rpc_stat* buf);
int rpc_fstat64(rcf_rpc_server* rpcs, int fd, rpc_stat* buf);
int rpc_stat_func(rcf_rpc_server* rpcs, const char* path, rpc_stat* buf);
int rpc_link(rcf_rpc_server* rpcs, const char* path1, const char* path2);
int rpc_symlink(rcf_rpc_server* rpcs, const char* path1, const char* path2);
ssize_t rpc_readlink(rcf_rpc_server* rpcs, const char* path, char* buf, size_t bufsize);
int rpc_unlink(rcf_rpc_server* rpcs, const char* path);
int rpc_mkdir(rcf_rpc_server* rpcs, const char* path, rpc_file_mode_flags mode);
int rpc_mkdirp(rcf_rpc_server* rpcs, const char* path, rpc_file_mode_flags mode);
int rpc_rmdir(rcf_rpc_server* rpcs, const char* path);
int rpc_rename(rcf_rpc_server* rpcs, const char* path_old, const char* path_new);
int rpc_fstatvfs(rcf_rpc_server* rpcs, int fd, tarpc_statvfs* buf);
int rpc_statvfs(rcf_rpc_server* rpcs, const char* path, tarpc_statvfs* buf);
int rpc_gethostname(rcf_rpc_server* rpcs, char* name, size_t len);
int rpc_chroot(rcf_rpc_server* rpcs, char* path);
int rpc_copy_ta_libs(rcf_rpc_server* rpcs, char* path);
int rpc_rm_ta_libs(rcf_rpc_server* rpcs, char* path);
int rpc_execve_gen(rcf_rpc_server* rpcs, const char* filename, char*const argv[], char*const envp[]);
void rpc_make_iov(rpc_iovec* iov, size_t iovcnt, size_t min, size_t max);
void rpc_release_iov(rpc_iovec* iov, size_t iovcnt);
void rpc_alloc_iov(rpc_iovec** iov, size_t iovcnt, size_t min, size_t max);
void rpc_free_iov(rpc_iovec* iov, size_t iovcnt);
uint8_t* rpc_iov_append2dbuf(const rpc_iovec* iov, size_t iovcnt, te_dbuf* buf);
uint8_t* rpc_iov2dbuf(const rpc_iovec* iov, size_t iovcnt, te_dbuf* buf);
size_t rpc_iov_data_len(const rpc_iovec* iov, size_t iovcnt);
te_errno tapi_rpc_read_fd_to_te_string(rcf_rpc_server* rpcs, int fd, te_string* testr);
te_errno tapi_rpc_append_fd_to_te_string(rcf_rpc_server* rpcs, int fd, te_string* testr);
int rpc_wsa_startup(rcf_rpc_server* rpcs);
int rpc_wsa_cleanup(rcf_rpc_server* rpcs);
int rpc_wsa_socket(rcf_rpc_server* rpcs, rpc_socket_domain domain, rpc_socket_type type, rpc_socket_proto protocol, uint8_t* info, int info_len, rpc_open_sock_flags flags);
int rpc_wsa_duplicate_socket(rcf_rpc_server* rpcs, int s, pid_t pid, uint8_t* info, int* info_len);
bool rpc_duplicate_handle(rcf_rpc_server* rpcs, pid_t src, int old_fd, pid_t tgt, int* new_fd);
bool rpc_connect_ex(rcf_rpc_server* rpcs, int s, const struct sockaddr* addr, rpc_ptr buf, ssize_t len_buf, size_t* bytes_sent, rpc_overlapped overlapped);
bool rpc_disconnect_ex(rcf_rpc_server* rpcs, int s, rpc_overlapped overlapped, int flags);
int rpc_wsa_accept(rcf_rpc_server* rpcs, int s, struct sockaddr* addr, socklen_t* addrlen, socklen_t raddrlen, accept_cond* cond, int cond_num);
bool rpc_accept_ex(rcf_rpc_server* rpcs, int s, int s_a, rpc_ptr buf, size_t len, size_t laddr_len, size_t raddr_len, size_t* bytes_received, rpc_overlapped overlapped);
static size_t rpc_accept_ex_buflen(rcf_rpc_server* rpcs, size_t datalen);
void rpc_get_accept_addr_gen(rcf_rpc_server* rpcs, int s, rpc_ptr buf, size_t len, size_t laddr_len, size_t raddr_len, struct sockaddr* laddr, size_t* l_sa_len, struct sockaddr* raddr, size_t* r_sa_len);
static void rpc_get_accept_addr(rcf_rpc_server* rpcs, int s, rpc_ptr buf, size_t len, struct sockaddr* laddr, struct sockaddr* raddr);
bool rpc_transmit_packets(rcf_rpc_server* rpcs, int s, tarpc_transmit_packets_element* data, ssize_t element_count, ssize_t send_size, rpc_overlapped overlapped, ssize_t flags);
bool rpc_transmit_file(rcf_rpc_server* rpcs, int s, int file, ssize_t len, ssize_t len_per_send, rpc_overlapped overlapped, void* head, ssize_t head_len, void* tail, ssize_t tail_len, ssize_t flags);
bool rpc_transmitfile_tabufs(rcf_rpc_server* rpcs, int s, int file, ssize_t len, ssize_t bytes_per_send, rpc_overlapped overlapped, rpc_ptr head, ssize_t head_len, rpc_ptr tail, ssize_t tail_len, ssize_t flags);
int rpc_create_file(rcf_rpc_server* rpcs, char* name, rpc_cf_access_right desired_access, rpc_cf_share_mode share_mode, rpc_ptr security_attributes, rpc_cf_creation_disposition creation_disposition, rpc_cf_flags_attributes flags_attributes, int template_file);
int rpc_closesocket(rcf_rpc_server* rpcs, int s);
bool rpc_cancel_io(rcf_rpc_server* rpcs, int fd);
bool rpc_has_overlapped_io_completed(rcf_rpc_server* rpcs, rpc_overlapped overlapped);
int rpc_create_io_completion_port(rcf_rpc_server* rpcs, int file_handle, int existing_completion_port, uint64_t completion_key, unsigned int number_of_concurrent_threads);
bool rpc_get_queued_completion_status(rcf_rpc_server* rpcs, int completion_port, size_t* number_of_bytes, uint64_t* completion_key, rpc_overlapped* overlapped, unsigned int milliseconds);
bool rpc_post_queued_completion_status(rcf_rpc_server* rpcs, int completion_port, unsigned int number_of_bytes, uint64_t completion_key, rpc_overlapped overlapped);
int rpc_get_current_process_id(rcf_rpc_server* rpcs);
void rpc_get_sys_info(rcf_rpc_server* rpcs, rpc_sys_info* sys_info);
ssize_t rpc_wsa_recv_ex(rcf_rpc_server* rpcs, int s, void* buf, size_t len, rpc_send_recv_flags* flags, size_t rbuflen);
rpc_wsaevent rpc_create_event(rcf_rpc_server* rpcs);
rpc_wsaevent rpc_create_event_with_bit(rcf_rpc_server* rpcs);
bool rpc_close_event(rcf_rpc_server* rpcs, rpc_wsaevent hevent);
bool rpc_reset_event(rcf_rpc_server* rpcs, rpc_wsaevent hevent);
bool rpc_set_event(rcf_rpc_server* rpcs, rpc_wsaevent hevent);
int rpc_wsa_address_to_string(rcf_rpc_server* rpcs, struct sockaddr* addr, socklen_t addrlen, uint8_t* info, int info_len, char* addrstr, ssize_t* addrstr_len);
int rpc_wsa_string_to_address(rcf_rpc_server* rpcs, char* addrstr, rpc_socket_domain address_family, uint8_t* info, int info_len, struct sockaddr* addr, socklen_t* addrlen);
int rpc_wsa_cancel_async_request(rcf_rpc_server* rpcs, rpc_handle async_task_handle);
int rpc_alloc_wsabuf(rcf_rpc_server* rpcs, size_t len, rpc_ptr* wsabuf, rpc_ptr* wsabuf_buf);
void rpc_free_wsabuf(rcf_rpc_server* rpcs, rpc_ptr wsabuf);
int rpc_wsa_connect(rcf_rpc_server* rpcs, int s, const struct sockaddr* addr, rpc_ptr caller_wsabuf, rpc_ptr callee_wsabuf, rpc_qos* sqos);
int rpc_wsa_ioctl(rcf_rpc_server* rpcs, int s, rpc_ioctl_code control_code, char* inbuf, unsigned int inbuf_len, char* outbuf, unsigned int outbuf_len, size_t* bytes_returned, rpc_overlapped overlapped, const char* callback);
bool rpc_get_wsa_ioctl_overlapped_result(rcf_rpc_server* rpcs, int s, rpc_overlapped overlapped, int* bytes, bool wait, rpc_send_recv_flags* flags, char* buf, rpc_ioctl_code control_code);
rpc_handle rpc_wsa_async_get_host_by_addr(rcf_rpc_server* rpcs, rpc_hwnd hwnd, unsigned int wmsg, char* addr, ssize_t addrlen, rpc_socket_type type, rpc_ptr buf, ssize_t buflen);
rpc_handle rpc_wsa_async_get_host_by_name(rcf_rpc_server* rpcs, rpc_hwnd hwnd, unsigned int wmsg, char* name, rpc_ptr buf, ssize_t buflen);
rpc_handle rpc_wsa_async_get_proto_by_name(rcf_rpc_server* rpcs, rpc_hwnd hwnd, unsigned int wmsg, char* name, rpc_ptr buf, ssize_t buflen);
rpc_handle rpc_wsa_async_get_proto_by_number(rcf_rpc_server* rpcs, rpc_hwnd hwnd, unsigned int wmsg, int number, rpc_ptr buf, ssize_t buflen);
rpc_handle rpc_wsa_async_get_serv_by_name(rcf_rpc_server* rpcs, rpc_hwnd hwnd, unsigned int wmsg, char* name, char* proto, rpc_ptr buf, ssize_t buflen);
rpc_handle rpc_wsa_async_get_serv_by_port(rcf_rpc_server* rpcs, rpc_hwnd hwnd, unsigned int wmsg, int port, char* proto, rpc_ptr buf, ssize_t buflen);
rpc_overlapped rpc_create_overlapped(rcf_rpc_server* rpcs, rpc_wsaevent hevent, unsigned int offset, unsigned int offset_high, ...);
void rpc_delete_overlapped(rcf_rpc_server* rpcs, rpc_overlapped overlapped);
int rpc_wsa_send(rcf_rpc_server* rpcs, int s, const struct rpc_iovec* iov, size_t iovcnt, rpc_send_recv_flags flags, ssize_t* bytes_sent, rpc_overlapped overlapped, const char* callback);
int rpc_wsa_recv(rcf_rpc_server* rpcs, int s, const struct rpc_iovec* iov, size_t iovcnt, size_t riovcnt, rpc_send_recv_flags* flags, ssize_t* bytes_received, rpc_overlapped overlapped, const char* callback);
int rpc_wsa_send_to(rcf_rpc_server* rpcs, int s, const struct rpc_iovec* iov, size_t iovcnt, rpc_send_recv_flags flags, ssize_t* bytes_sent, const struct sockaddr* to, rpc_overlapped overlapped, const char* callback);
int rpc_wsa_recv_from(rcf_rpc_server* rpcs, int s, const struct rpc_iovec* iov, size_t iovcnt, size_t riovcnt, rpc_send_recv_flags* flags, ssize_t* bytes_received, struct sockaddr* from, socklen_t* fromlen, rpc_overlapped overlapped, const char* callback);
int rpc_wsa_send_disconnect(rcf_rpc_server* rpcs, int s, const struct rpc_iovec* iov);
int rpc_wsa_recv_disconnect(rcf_rpc_server* rpcs, int s, const struct rpc_iovec* iov);
int rpc_wsa_recv_msg(rcf_rpc_server* rpcs, int s, struct rpc_msghdr* msg, ssize_t* bytes_received, rpc_overlapped overlapped, const char* callback);
bool rpc_wsa_get_overlapped_result(rcf_rpc_server* rpcs, int s, rpc_overlapped overlapped, size_t* bytes, bool wait, rpc_send_recv_flags* flags, char* buf, int buflen);
int rpc_completion_callback(rcf_rpc_server* rpcs, int* called, int* error, ssize_t* bytes, rpc_overlapped* overlapped);
static void rpc_cleanup_completion_callback(rcf_rpc_server* rpcs);
int rpc_wsa_event_select(rcf_rpc_server* rpcs, int s, rpc_wsaevent event_object, rpc_network_event event);
int rpc_enum_network_events(rcf_rpc_server* rpcs, int s, rpc_wsaevent event_object, struct tarpc_network_events* events);
static const char* wsa_wait_rpc2str(int code);
int rpc_wait_for_multiple_events(rcf_rpc_server* rpcs, int count, rpc_wsaevent* events, bool wait_all, uint32_t timeout, bool alertable);
rpc_hwnd rpc_create_window(rcf_rpc_server* rpcs);
void rpc_destroy_window(rcf_rpc_server* rpcs, rpc_hwnd hwnd);
int rpc_wsa_async_select(rcf_rpc_server* rpcs, int s, rpc_hwnd hwnd, rpc_network_event event);
int rpc_peek_message(rcf_rpc_server* rpcs, rpc_hwnd hwnd, int* s, rpc_network_event* event);
bool rpc_is_winsock2(rcf_rpc_server* rpcs);
int rpc_wsa_join_leaf(rcf_rpc_server* rpcs, int s, const struct sockaddr* addr, rpc_ptr caller_wsabuf, rpc_ptr callee_wsabuf, rpc_qos* sqos, rpc_join_leaf_flags flags);
bool rpc_read_file(rcf_rpc_server* rpcs, int fd, void* buf, size_t count, size_t* received, rpc_overlapped overlapped);
bool rpc_write_file(rcf_rpc_server* rpcs, int fd, void* buf, size_t count, size_t* sent, rpc_overlapped overlapped);
bool rpc_read_file_ex(rcf_rpc_server* rpcs, int fd, void* buf, size_t count, rpc_overlapped overlapped, const char* callback);
bool rpc_write_file_ex(rcf_rpc_server* rpcs, int fd, void* buf, size_t count, rpc_overlapped overlapped, const char* callback);
int rpc_overfill_buffers_ex(rcf_rpc_server* rpcs, int sock, uint64_t* sent, bool is_nonblocking);
static const char* wsa_name_convert(const char* name);
uint16_t tapi_get_random_port(void);
te_errno tapi_allocate_port(struct rcf_rpc_server* pco, uint16_t* p_port);
te_errno tapi_allocate_port_range(struct rcf_rpc_server* pco, uint16_t* p_port, int num);
te_errno tapi_allocate_port_htons(rcf_rpc_server* pco, uint16_t* p_port);
uint16_t tapi_get_port(rcf_rpc_server* rpcs);
static uint16_t tapi_get_port_htons(rcf_rpc_server* rpcs);
static te_errno tapi_sockaddr_clone(rcf_rpc_server* pco, const struct sockaddr* src, struct sockaddr_storage* dst);
static void tapi_sockaddr_clone_exact(const struct sockaddr* src, struct sockaddr_storage* dst);
struct sockaddr* tapi_sockaddr_clone_typed(const struct sockaddr* addr, tapi_address_type type);
te_errno tapi_allocate_set_port(rcf_rpc_server* rpcs, const struct sockaddr* addr);
static int tapi_sockaddr_cmp(const struct sockaddr* addr1, const struct sockaddr* addr2);
te_errno tapi_sockaddr_clone2(const struct sockaddr* src, struct sockaddr** dst);
rpc_tcp_state tapi_get_tcp_sock_state(struct rcf_rpc_server* pco, int s);
ssize_t tapi_sock_read_data(rcf_rpc_server* rpcs, int s, te_dbuf* read_data);
te_errno tapi_sock_raw_tcpv4_send(rcf_rpc_server* rpcs, rpc_iovec* iov, int iovlen, int ifindex, int raw_socket, bool remove_vlan_hdr);
int rpc_serial_open(rcf_rpc_server* rpcs, tapi_serial_handle* p_handle, const char* user, const char* console, const struct sockaddr* address);
int rpc_serial_close(tapi_serial_handle handle);
int rpc_serial_read(tapi_serial_handle handle, char* buffer, size_t* buffer_len, int timeout_ms);
int rpc_serial_force_rw(tapi_serial_handle handle);
int rpc_serial_spy(tapi_serial_handle handle);
int rpc_serial_send_str(tapi_serial_handle handle, const char* fmt, va_list vlist);
int rpc_serial_send_enter(tapi_serial_handle handle);
int rpc_serial_send_ctrl_c(tapi_serial_handle handle);
int rpc_serial_flush(tapi_serial_handle handle, size_t amount);
int rpc_serial_check_pattern(tapi_serial_handle handle, int* offset, const char* fmt, va_list vlist);
int rpc_serial_wait_pattern(tapi_serial_handle handle, int* offset, int timeout_ms, const char* fmt, va_list vlist);
te_errno tapi_serial_open_rpcs(rcf_rpc_server* rpcs, const char* console_name, tapi_serial_handle* p_handle);
te_errno tapi_serial_close(tapi_serial_handle handle);
te_errno tapi_serial_force_rw(tapi_serial_handle handle);
te_errno tapi_serial_spy(tapi_serial_handle handle);
te_errno tapi_serial_send_str(tapi_serial_handle handle, const char* fmt, ...);
te_errno te_errno tapi_serial_send_cmd(tapi_serial_handle handle, const char* fmt, ...);
te_errno te_errno te_errno tapi_serial_send_enter(tapi_serial_handle handle);
te_errno tapi_serial_send_ctrl_c(tapi_serial_handle handle);
te_errno tapi_serial_flush(tapi_serial_handle handle, size_t amount);
te_errno tapi_serial_read(tapi_serial_handle handle, char* buffer, size_t* buffer_len, int timeout_ms);
te_errno tapi_serial_check_pattern(tapi_serial_handle handle, int* offset, const char* fmt, ...);
te_errno te_errno tapi_serial_wait_pattern(tapi_serial_handle handle, int* offset, int timeout_ms, const char* fmt, ...);
static bool tapi_local_file_is_file(const tapi_local_file* file);
static bool tapi_local_file_is_dir(const tapi_local_file* file);
static const char* tapi_local_file_get_pathname(const tapi_local_file* file);
const char* tapi_local_file_get_name(const tapi_local_file* file);
bool tapi_local_file_cmp(const tapi_local_file* file1, const tapi_local_file* file2);
void tapi_local_file_free_entry(tapi_local_file* file);
void tapi_local_file_free(tapi_local_file* file);
SLIST_HEAD(tapi_local_file_list, tapi_local_file_le);
te_errno tapi_local_fs_traverse(const char* pathname, tapi_local_fs_traverse_cb cb_pre, tapi_local_fs_traverse_cb cb_post, void* user_data);
static te_errno tapi_local_fs_ls_root(tapi_local_file_list* files);
te_errno tapi_local_fs_ls(const char* pathname, tapi_local_file_list* files);
void tapi_local_fs_list_free(tapi_local_file_list* files);
te_errno tapi_local_fs_get_file_metadata(const char* pathname, const char* metaname, char** metadata);
char* tapi_local_fs_get_file_real_pathname(const tapi_local_file* file, const char* mapping_pfx);
void tapi_local_fs_ls_print(const char* pathname);
SLIST_HEAD(tapi_local_storage_device_list, tapi_local_storage_device_le);
static void tapi_local_storage_device_set_methods(tapi_local_storage_device* device, const tapi_local_storage_device_methods* methods);
static te_errno tapi_local_storage_device_insert(tapi_local_storage_device* device);
static te_errno tapi_local_storage_device_eject(tapi_local_storage_device* device);
te_errno tapi_local_storage_device_list_get(tapi_local_storage_device_list* devices);
void tapi_local_storage_device_list_free(tapi_local_storage_device_list* devices);
te_errno tapi_local_storage_device_get(const char* name, tapi_local_storage_device** device);
void tapi_local_storage_device_free(tapi_local_storage_device* device);
te_errno tapi_local_storage_device_init(const char* name, tapi_local_storage_device* device);
void tapi_local_storage_device_fini(tapi_local_storage_device* device);
te_errno tapi_storage_bootstrap(tapi_storage_client* client, const char* root, bool remove_root);
te_errno tapi_storage_setup(tapi_storage_client* client, const char* root);
static te_errno tapi_storage_client_connect(tapi_storage_client* client);
static te_errno tapi_storage_client_disconnect(tapi_storage_client* client);
static te_errno tapi_storage_client_pwd(tapi_storage_client* client, tapi_local_file* directory);
static te_errno tapi_storage_client_ls(tapi_storage_client* client, const char* path, tapi_local_file_list* files);
static te_errno tapi_storage_client_cd(tapi_storage_client* client, const char* remote_directory);
static te_errno tapi_storage_client_put(tapi_storage_client* client, const char* local_file, const char* remote_file);
static te_errno tapi_storage_client_get(tapi_storage_client* client, const char* remote_file, const char* local_file);
static te_errno tapi_storage_client_rm(tapi_storage_client* client, const char* filename, bool recursive);
static te_errno tapi_storage_client_mkdir(tapi_storage_client* client, const char* directory_name);
static te_errno tapi_storage_client_rmdir(tapi_storage_client* client, const char* directory_name);
te_errno tapi_storage_client_init(tapi_storage_service_type type, rcf_rpc_server* rpcs, const tapi_storage_client_methods* methods, tapi_storage_auth_params* auth, void* context, tapi_storage_client* client);
void tapi_storage_client_fini(tapi_storage_client* client);
te_errno tapi_storage_client_mput(tapi_storage_client* client, const tapi_local_file* local_file, const char* remote_file, bool recursive, bool force);
te_errno tapi_storage_client_mget(tapi_storage_client* client, const char* remote_file, const char* local_file, bool recursive);
te_errno tapi_storage_client_ftp_context_init(tapi_storage_client_ftp_context** context);
void tapi_storage_client_ftp_context_fini(tapi_storage_client_ftp_context* context);
te_errno tapi_storage_client_ftp_init(rcf_rpc_server* rpcs, const tapi_storage_client_methods* methods, tapi_storage_auth_params* auth, tapi_storage_client_ftp_context* context, tapi_storage_client* client);
void tapi_storage_client_ftp_fini(tapi_storage_client* client);
te_errno tapi_storage_auth_params_init(const struct sockaddr* server_addr, uint16_t port, const char* user, const char* password, tapi_storage_auth_params* auth_params);
void tapi_storage_auth_params_fini(tapi_storage_auth_params* auth_params);
te_errno tapi_storage_auth_params_copy(tapi_storage_auth_params* to, const tapi_storage_auth_params* from);
static te_errno tapi_storage_server_enable(tapi_storage_server* server);
static te_errno tapi_storage_server_disable(tapi_storage_server* server);
static bool tapi_storage_server_is_enabled(tapi_storage_server* server);
static te_errno tapi_storage_server_add_storage(tapi_storage_server* server, const char* storage_name);
static te_errno tapi_storage_server_add_share(tapi_storage_server* server, const char* storage, const char* path);
static te_errno tapi_storage_server_del_share(tapi_storage_server* server, const char* storage, const char* path);
static te_errno tapi_storage_server_get_share(tapi_storage_server* server, tapi_storage_share_list* share);
te_errno tapi_storage_server_init(tapi_storage_service_type type, rcf_rpc_server* rpcs, const tapi_storage_server_methods* methods, tapi_storage_auth_params* auth, void* context, tapi_storage_server* server);
void tapi_storage_server_fini(tapi_storage_server* server);
SLIST_HEAD(tapi_storage_share_list, tapi_storage_share_le);
void tapi_storage_share_list_free(tapi_storage_share_list* share);
te_errno tapi_arp_eth_csap_create(const char* ta_name, int sid, const char* device, unsigned int receive_mode, const uint8_t* remote_addr, const uint8_t* local_addr, const uint16_t* hw_type, const uint16_t* proto_type, const uint8_t* hw_size, const uint8_t* proto_size, csap_handle_t* arp_csap);
static te_errno tapi_arp_eth_csap_create_ip4(const char* ta_name, int sid, const char* device, unsigned int receive_mode, const uint8_t* remote_addr, const uint8_t* local_addr, csap_handle_t* arp_csap);
te_errno tapi_arp_add_csap_layer_eth(asn_value** csap_spec, const char* device, unsigned int receive_mode, const uint8_t* remote_addr, const uint8_t* local_addr);
te_errno tapi_arp_add_csap_layer(asn_value** csap_spec, const uint16_t* hw_type, const uint16_t* proto_type, const uint8_t* hw_size, const uint8_t* proto_size);
te_errno tapi_arp_add_csap_layer_eth_ip4(asn_value** csap_spec);
te_errno tapi_arp_add_pdu(asn_value** tmpl_or_ptrn, bool is_pattern, const uint16_t* hw_type, const uint16_t* proto_type, const uint8_t* hw_size, const uint8_t* proto_size, const uint16_t* opcode, size_t hw_addr_len, size_t proto_addr_len, const uint8_t* snd_hw_addr, const uint8_t* snd_proto_addr, const uint8_t* tgt_hw_addr, const uint8_t* tgt_proto_addr);
te_errno tapi_arp_add_pdu_eth_ip4(asn_value** tmpl_or_ptrn, bool is_pattern, const uint16_t* opcode, const uint8_t* snd_hw_addr, const uint8_t* snd_proto_addr, const uint8_t* tgt_hw_addr, const uint8_t* tgt_proto_addr);
te_errno tapi_arp_prepare_template(const tapi_arp_frame_t* frame, asn_value** templ);
tapi_tad_trrecv_cb_data* tapi_arp_trrecv_cb_data(tapi_arp_frame_callback callback, void* user_data);
te_errno tapi_arp_recv(const char* ta_name, int sid, csap_handle_t arp_csap, const asn_value* pattern, unsigned int timeout, tapi_arp_frame_t** frames, unsigned int* num);
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, bool* congestion, 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, bool is_pattern, const uint8_t* gfc, const uint16_t* vpi, const uint16_t* vci, const uint8_t* payload_type, 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, bool is_pattern, const uint8_t* cpcs_uu, const uint8_t* cpi);
int tapi_stp_plain_csap_create(const char* ta_name, int sid, const char* ifname, const uint8_t* own_mac_addr, const uint8_t* peer_mac_addr, csap_handle_t* stp_csap);
int tapi_stp_bpdu_send(const char* ta_name, int sid, csap_handle_t stp_csap, const asn_value* templ);
int tapi_cli_csap_local_create(const char* ta_name, int sid, const char* device, tapi_cli_prompt_t command_prompt_type, const char* command_prompt, tapi_cli_prompt_t login_prompt_type, const char* login_prompt, const char* login_name, tapi_cli_prompt_t password_prompt_type, const char* password_prompt, const char* password, csap_handle_t* cli_csap);
int tapi_cli_csap_remote_create(const char* ta_name, int sid, int type, const char* host, int port, tapi_cli_prompt_t command_prompt_type, const char* command_prompt, tapi_cli_prompt_t login_prompt_type, const char* login_prompt, const char* login_name, tapi_cli_prompt_t password_prompt_type, const char* password_prompt, const char* password, csap_handle_t* cli_csap);
int tapi_cli_csap_shell_create(const char* ta_name, int sid, const char* shell_args, tapi_cli_prompt_t command_prompt_type, const char* command_prompt, tapi_cli_prompt_t login_prompt_type, const char* login_prompt, const char* login_name, tapi_cli_prompt_t password_prompt_type, const char* password_prompt, const char* password, csap_handle_t* cli_csap);
int tapi_cli_csap_create(const char* ta_name, int sid, const char* buf, csap_handle_t* cli_csap);
int tapi_cli_send(const char* ta_name, int sid, csap_handle_t cli_csap, const char* command);
int tapi_cli_send_recv_with_prompts(const char* ta_name, int sid, csap_handle_t cli_csap, const char* command, char** msg, unsigned int timeout, tapi_cli_prompt_t cmd_prompt_type, const char* cmd_prompt, tapi_cli_prompt_t passwd_prompt_type, const char* passwd_prompt);
static int tapi_cli_send_recv(const char* ta_name, int sid, csap_handle_t cli_csap, const char* command, char** msg, unsigned int timeout);
static int tapi_cli_send_recv_with_prompt(const char* ta_name, int sid, csap_handle_t cli_csap, const char* command, char** msg, unsigned int timeout, tapi_cli_prompt_t cmd_prompt_type, const char* cmd_prompt);
int ndn_dhcpv4_packet_to_plain(const asn_value* pkt, struct dhcp_message** dhcp_msg);
int ndn_dhcpv4_plain_to_packet(const dhcp_message* dhcp_msg, asn_value** pkt);
struct dhcp_message* dhcpv4_message_create(dhcp_message_type msg_type);
struct dhcp_message* dhcpv4_bootp_message_create(uint8_t op);
void dhcpv4_message_destroy(struct dhcp_message*);
int tapi_dhcpv4_plain_csap_create(const char* ta_name, const char* iface, dhcp_csap_mode mode, csap_handle_t* dhcp_csap);
int tapi_dhcpv4_message_send(const char* ta_name, csap_handle_t dhcp_csap, const struct dhcp_message* dhcp_msg);
int dhcpv4_prepare_traffic_template(const dhcp_message* dhcp_msg, const char** templ_fname);
int dhcpv4_prepare_traffic_pattern(const dhcp_message* dhcp_msg, char** pattern_fname);
int dhcpv4_message_start_recv(const char* ta_name, csap_handle_t dhcp_csap, unsigned int timeout, dhcp_message_type msg_type);
struct dhcp_message* dhcpv4_message_capture(const char* ta_name, csap_handle_t dhcp_csap, unsigned int* timeout);
struct dhcp_message* tapi_dhcpv4_send_recv(const char* ta_name, csap_handle_t dhcp_csap, const struct dhcp_message* dhcp_msg, unsigned int* tv, const char** err_msg);
int tapi_dhcpv4_csap_get_ipaddr(const char* ta_name, csap_handle_t dhcp_csap, void* addr);
const struct dhcp_option* dhcpv4_message_get_option(const struct dhcp_message* dhcp_msg, uint8_t type);
const struct dhcp_option* dhcpv4_message_get_sub_option(const struct dhcp_option* opt, uint8_t type);
void dhcpv4_message_fill_reply_from_req(struct dhcp_message* dhcp_rep, const struct dhcp_message* dhcp_req);
struct dhcp_option* dhcpv4_option_create(uint8_t type, uint8_t len, uint8_t val_len, uint8_t* val);
int dhcpv4_option_add_subopt(struct dhcp_option* opt, uint8_t type, uint8_t len, uint8_t* val);
int dhcpv4_option_insert_subopt(struct dhcp_option* opt, struct dhcp_option* subopt);
int dhcpv4_message_add_option(struct dhcp_message* dhcp_msg, uint8_t type, uint8_t len, const void* val);
int dhcpv4_message_insert_option(struct dhcp_message* dhcp_msg, struct dhcp_option* opt);
bool dhcpv4_option55_has_code(const struct dhcp_option* opt, uint8_t type);
te_errno tapi_dhcp_request_ip_addr(char const* ta, char const* if_name, uint8_t const mac[ETHER_ADDR_LEN], struct sockaddr* ip_addr);
te_errno tapi_dhcp_release_ip_addr(char const* ta, char const* if_name, struct sockaddr const* ip_addr);
int tapi_dhcpv6_plain_csap_create(const char* ta_name, const char* iface, dhcp6_csap_mode mode, csap_handle_t* dhcp_csap);
int dhcpv6_prepare_traffic_template(const asn_value* dhcp6_msg, asn_value** templ_p);
int dhcpv6_prepare_traffic_pattern(const asn_value* dhcp_msg, asn_value** pattern_p);
te_errno tapi_eth_add_csap_layer(asn_value** csap_spec, const char* device, unsigned int recv_mode, const uint8_t* remote_addr, const uint8_t* local_addr, const uint16_t* ether_type, te_bool3 tagged, te_bool3 llc);
te_errno tapi_eth_add_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, const uint8_t* dst_addr, const uint8_t* src_addr, const uint16_t* ether_type, te_bool3 tagged, te_bool3 llc);
te_errno tapi_eth_pdu_length_type(asn_value* pdu, const uint16_t len_type);
te_errno tapi_eth_pdu_tag_header(asn_value* pdu, const uint8_t* priority, const uint16_t* vlan_id);
te_errno tapi_eth_pdu_llc_snap(asn_value* pdu);
te_errno tapi_eth_csap_create(const char* ta_name, int sid, const char* device, unsigned int receive_mode, const uint8_t* remote_addr, const uint8_t* local_addr, const uint16_t* len_type, csap_handle_t* eth_csap);
te_errno tapi_eth_gen_traffic_sniff_pattern(const char* ta_name, int sid, const char* if_name, asn_value* template, send_transform* transform, asn_value** pattern_out);
tapi_tad_trrecv_cb_data* tapi_eth_trrecv_cb_data(tapi_eth_frame_callback callback, void* user_data);
te_errno tapi_eth_set_csap_layer(asn_value* csap_spec, const char* device, unsigned int recv_mode, const uint8_t* remote_addr, const uint8_t* local_addr, const uint16_t* len_type);
te_errno tapi_eth_based_csap_create_by_tmpl(const char* ta_name, int sid, const char* device, unsigned int recv_mode, const asn_value* tmpl, csap_handle_t* eth_csap);
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, 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, 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);
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);
void tapi_ip4_to_mcast_mac(in_addr_t ip4_addr, uint8_t* eth_addr);
te_errno tapi_igmp_add_csap_layer(asn_value** csap_spec);
te_errno tapi_igmp2_add_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, tapi_igmp_msg_type type, int max_resp_time, in_addr_t group_addr);
te_errno tapi_igmp_ip4_eth_csap_create(const char* ta_name, int sid, const char* ifname, unsigned int receive_mode, const uint8_t* eth_src, in_addr_t src_addr, csap_handle_t* igmp_csap);
te_errno tapi_igmp_add_ip4_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, in_addr_t dst_addr, in_addr_t src_addr);
te_errno tapi_igmp_add_ip4_pdu_gen(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, in_addr_t dst_addr, in_addr_t src_addr, int ttl, int tos);
te_errno tapi_igmp_add_ip4_eth_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, in_addr_t dst_addr, in_addr_t src_addr, uint8_t* eth_src);
te_errno tapi_igmp_add_ip4_eth_pdu_gen(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, in_addr_t dst_addr, in_addr_t src_addr, uint8_t* eth_src, int ttl, int tos);
te_errno tapi_igmp1_ip4_eth_send_report(const char* ta_name, int session, csap_handle_t csap, in_addr_t group_addr, in_addr_t src_addr, uint8_t* eth_src);
te_errno tapi_igmp2_ip4_eth_send_report(const char* ta_name, int session, csap_handle_t csap, in_addr_t group_addr, in_addr_t src_addr, uint8_t* eth_src);
te_errno tapi_igmp2_ip4_eth_send_leave(const char* ta_name, int session, csap_handle_t csap, in_addr_t group_addr, in_addr_t src_addr, uint8_t* eth_src);
te_errno tapi_igmp2_ip4_eth_send_query(const char* ta_name, int session, csap_handle_t csap, int max_resp_time, in_addr_t group_addr, in_addr_t src_addr, bool skip_eth, uint8_t* eth_src);
te_errno tapi_igmp3_add_report_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, tapi_igmp3_group_list_t* group_list);
te_errno tapi_igmp3_ip4_eth_send_report(const char* ta_name, int session, csap_handle_t csap, tapi_igmp3_group_list_t* group_list, in_addr_t src_addr, uint8_t* eth_src);
uint8_t tapi_igmp3_max_response_time_to_code(unsigned max_resp_time);
unsigned tapi_igmp3_max_response_code_to_time(uint8_t max_resp_code);
uint8_t tapi_igmp3_qqi_to_qqic(unsigned qqi);
unsigned tapi_igmp3_qqic_to_qqi(uint8_t qqic);
te_errno tapi_igmp3_add_query_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, int max_resp_code, in_addr_t group_addr, int s_flag, int qrv, int qqic, tapi_igmp3_src_list_t* src_list);
te_errno tapi_igmp3_ip4_eth_send_query(const char* ta_name, int session, csap_handle_t csap, int max_resp_code, in_addr_t group_addr, int s_flag, int qrv, int qqic, tapi_igmp3_src_list_t* src_list, in_addr_t src_addr, bool skip_eth, uint8_t* eth_src);
te_errno tapi_igmp3_ip4_eth_send_query_default(const char* ta_name, int session, csap_handle_t csap, in_addr_t group_addr, tapi_igmp3_src_list_t* src_list, in_addr_t src_addr, bool skip_eth, uint8_t* eth_src);
te_errno tapi_igmp3_src_list_init(tapi_igmp3_src_list_t* src_list);
void tapi_igmp3_src_list_free(tapi_igmp3_src_list_t* src_list);
te_errno tapi_igmp3_src_list_add(tapi_igmp3_src_list_t* src_list, in_addr_t addr);
int tapi_igmp3_src_list_length(tapi_igmp3_src_list_t* src_list);
te_errno tapi_igmp3_src_list_gen_bin(tapi_igmp3_src_list_t* src_list, void* buf, int buf_size, int* offset);
int tapi_igmp3_group_record_length(tapi_igmp3_group_record_t* group_record);
te_errno tapi_igmp3_group_record_gen_bin(tapi_igmp3_group_record_t* group_record, void* buf, int buf_size, int* offset);
int tapi_igmp3_group_list_length(tapi_igmp3_group_list_t* group_list);
te_errno tapi_igmp3_group_list_gen_bin(tapi_igmp3_group_list_t* group_list, void* buf, int buf_size, int* offset);
te_errno tapi_igmp3_group_record_init(tapi_igmp3_group_record_t* group_record, int group_type, in_addr_t group_address, void* aux_data, int aux_data_len);
void tapi_igmp3_group_record_free(tapi_igmp3_group_record_t* group_record);
te_errno tapi_igmp3_group_record_add_source(tapi_igmp3_group_record_t* group_record, in_addr_t src_addr);
te_errno tapi_igmp3_group_list_init(tapi_igmp3_group_list_t* group_list);
void tapi_igmp3_group_list_free(tapi_igmp3_group_list_t* group_list);
te_errno tapi_igmp3_group_list_add(tapi_igmp3_group_list_t* group_list, tapi_igmp3_group_record_t* group_record);
tapi_igmp3_src_list_t* tapi_igmp3_src_list_new(tapi_igmp3_src_list_t* src_list, ...);
tapi_igmp3_group_record_t* tapi_igmp3_group_record_new(tapi_igmp3_group_record_t* group_record, int group_type, in_addr_t group_address, void* aux_data, int aux_data_len, ...);
tapi_igmp3_group_list_t* tapi_igmp3_group_list_new(tapi_igmp3_group_list_t* group_list, ...);
te_errno tapi_udp_ip_icmp_ip_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_eth, const uint8_t* rem_eth, const struct sockaddr* loc_saddr, const struct sockaddr* rem_saddr, const struct sockaddr* msg_loc_saddr, const struct sockaddr* msg_rem_saddr, int af, csap_handle_t* udp_csap);
te_errno tapi_tcp_ip_icmp_ip_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_eth, const uint8_t* rem_eth, const struct sockaddr* loc_saddr, const struct sockaddr* rem_saddr, const struct sockaddr* msg_loc_saddr, const struct sockaddr* msg_rem_saddr, int af, csap_handle_t* tcp_csap);
te_errno tapi_icmp4_add_csap_layer(asn_value** csap_spec);
te_errno tapi_icmp4_add_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, int type, int code);
te_errno tapi_ipproto_ip4_icmp_ip4_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* eth_src, const uint8_t* eth_dst, in_addr_t src_addr, in_addr_t dst_addr, in_addr_t msg_src_addr, in_addr_t msg_dst_addr, int msg_src_port, int msg_dst_port, int ip_proto, csap_handle_t* ip_proto_csap);
te_errno tapi_tcp_ip4_icmp_ip4_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* eth_src, const uint8_t* eth_dst, in_addr_t src_addr, in_addr_t dst_addr, in_addr_t msg_src_addr, in_addr_t msg_dst_addr, int msg_src_port, int msg_dst_port, csap_handle_t* tcp_csap);
te_errno tapi_udp_ip4_icmp_ip4_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* eth_src, const uint8_t* eth_dst, in_addr_t src_addr, in_addr_t dst_addr, in_addr_t msg_src_addr, in_addr_t msg_dst_addr, int msg_src_port, int msg_dst_port, csap_handle_t* udp_csap);
te_errno tapi_icmp_ip4_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* eth_src, const uint8_t* eth_dst, in_addr_t src_addr, in_addr_t dst_addr, csap_handle_t* icmp_csap);
te_errno tapi_icmp_ip4_csap_create(const char* ta_name, int sid, const char* ifname, in_addr_t src_addr, in_addr_t dst_addr, csap_handle_t* icmp_csap);
te_errno tapi_icmp_ip6_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_hwaddr, const uint8_t* rem_hwaddr, const uint8_t* loc_addr, const uint8_t* rem_addr, csap_handle_t* icmp_csap);
te_errno tapi_icmp6_add_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, int type, int code, icmp6_msg_body* body, icmp6_msg_option* optlist);
te_errno tapi_icmp6_add_csap_layer(asn_value** csap_spec);
te_errno tapi_ipproto_ip6_icmp_ip6_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_eth, const uint8_t* rem_eth, const uint8_t* loc_addr, const uint8_t* rem_addr, const struct sockaddr_in6* msg_loc_saddr, const struct sockaddr_in6* msg_rem_saddr, int ip_proto, csap_handle_t* ip_proto_csap);
te_errno tapi_udp_ip6_icmp_ip6_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_eth, const uint8_t* rem_eth, const uint8_t* loc_addr, const uint8_t* rem_addr, const struct sockaddr_in6* msg_loc_saddr, const struct sockaddr_in6* msg_rem_saddr, csap_handle_t* udp_csap);
te_errno tapi_tcp_ip6_icmp_ip6_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_eth, const uint8_t* rem_eth, const uint8_t* loc_addr, const uint8_t* rem_addr, const struct sockaddr_in6* msg_loc_saddr, const struct sockaddr_in6* msg_rem_saddr, csap_handle_t* tcp_csap);
te_errno tapi_ip4_add_csap_layer(asn_value** csap_spec, in_addr_t local_addr, in_addr_t remote_addr, int ip_proto, int ttl, int tos);
te_errno tapi_ip4_add_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, in_addr_t src_addr, in_addr_t dst_addr, int ip_proto, int ttl, int tos);
te_errno tapi_ip4_pdu_tmpl_fragments(asn_value** tmpl, asn_value** pdu, tapi_ip_frag_spec* fragments, unsigned int num_frags);
te_errno tapi_ip4_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_mac_addr, const uint8_t* rem_mac_addr, in_addr_t loc_ip4_addr, in_addr_t rem_ip4_addr, int ip_proto, csap_handle_t* ip4_csap);
te_errno tapi_ip4_csap_create(const char* ta_name, int sid, in_addr_t loc_ip4_addr, in_addr_t rem_ip4_addr, int ip_proto, csap_handle_t* ip4_csap);
tapi_tad_trrecv_cb_data* tapi_ip4_eth_trrecv_cb_data(ip4_callback callback, void* user_data);
te_errno tapi_ip4_template(tapi_ip_frag_spec* fragments, unsigned int num_frags, int ttl, int protocol, const uint8_t* payload, size_t pld_len, asn_value** result_value);
te_errno tapi_ip4_get_payload_len(asn_value* pdu, size_t* len);
tapi_tad_trrecv_cb_data* tapi_ip6_eth_trrecv_cb_data(ip6_callback callback, void* user_data);
te_errno tapi_ip6_add_csap_layer(asn_value** csap_spec, const uint8_t* local_addr, const uint8_t* remote_addr, int next_header);
te_errno tapi_ip6_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_mac_addr, const uint8_t* rem_mac_addr, const uint8_t* loc_ip6_addr, const uint8_t* rem_ip6_addr, int next_header, csap_handle_t* ip6_csap);
te_errno tapi_ip6_add_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, const uint8_t* src_addr, const uint8_t* dst_addr, int next_header, int hop_limit);
te_errno tapi_ip6_get_payload_len(asn_value* pdu, size_t* len);
te_errno tapi_ip6_pdu_tmpl_fragments(asn_value** tmpl, asn_value** pdu, tapi_ip_frag_spec* fragments, unsigned int num_frags);
void tapi_ip_frag_specs_init(tapi_ip_frag_spec* frags, unsigned int num);
te_errno tapi_ip_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_mac_addr, const uint8_t* rem_mac_addr, int af, const void* loc_ip_addr, const void* rem_ip_addr, int ip_proto, csap_handle_t* ip_csap);
te_errno tapi_tcp_udp_ip_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_mac_addr, const uint8_t* rem_mac_addr, int af, int ip_proto, const void* loc_ip_addr, const void* rem_ip_addr, int loc_port, int rem_port, csap_handle_t* csap);
te_errno tapi_ip_pdu_tmpl_fragments(asn_value** tmpl, asn_value** pdu, bool ipv4, tapi_ip_frag_spec* fragments, unsigned int num_frags);
te_errno tapi_tcp_server_csap_create(const char* ta_name, int sid, const struct sockaddr* sa, csap_handle_t* tcp_csap);
te_errno tapi_tcp_client_csap_create(const char* ta_name, int sid, const struct sockaddr* loc, const struct sockaddr* rem, csap_handle_t* tcp_csap);
te_errno tapi_tcp_socket_csap_create(const char* ta_name, int sid, int socket, csap_handle_t* tcp_csap);
te_errno tapi_tcp_server_recv(const char* ta_name, int sid, csap_handle_t tcp_csap, unsigned int timeout, int* socket);
te_errno tapi_socket_recv(const char* ta_name, int sid, csap_handle_t csap, unsigned int timeout, csap_handle_t forward, bool exact, uint8_t* buf, size_t* length);
te_errno tapi_socket_send(const char* ta_name, int sid, csap_handle_t csap, uint8_t* buf, size_t length);
te_errno tapi_socket_csap_create(const char* ta_name, int sid, int type, const struct sockaddr* loc, const struct sockaddr* rem, csap_handle_t* csap);
te_errno tapi_udp_csap_create(const char* ta_name, int sid, const struct sockaddr* loc, const struct sockaddr* rem, csap_handle_t* udp_csap);
te_errno tapi_tcp_add_csap_layer(asn_value** csap_spec, int local_port, int remote_port);
te_errno tapi_tcp_ip4_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_mac, const uint8_t* rem_mac, in_addr_t loc_addr, in_addr_t rem_addr, int loc_port, int rem_port, csap_handle_t* tcp_csap);
te_errno tapi_tcp_ip4_csap_create(const char* ta_name, int sid, const char* ifname, in_addr_t loc_addr, in_addr_t rem_addr, int loc_port, int rem_port, csap_handle_t* tcp_csap);
te_errno tapi_tcp_ip4_eth_recv_start(const char* ta_name, int sid, csap_handle_t csap, in_addr_t src_addr, in_addr_t dst_addr, int src_port, int dst_port, unsigned int timeout, unsigned int num, rcf_trrecv_mode mode);
te_errno tapi_tcp_ip4_pattern_unit(in_addr_t src_addr, in_addr_t dst_addr, int src_port, int dst_port, asn_value** result_value);
int ndn_tcp4_message_to_plain(asn_value* pkt, struct tcp4_message** tcp_msg);
tapi_tad_trrecv_cb_data* tapi_tcp_ip4_eth_trrecv_cb_data(tcp4_callback callback, void* user_data);
te_errno ndn_tcp_message_to_plain(asn_value* pkt, struct tcp_message_t** tcp_msg);
tapi_tad_trrecv_cb_data* tapi_tcp_ip_eth_trrecv_cb_data(tcp_callback callback, void* user_data);
te_errno tapi_tcp_make_msg(uint16_t src_port, uint16_t dst_port, tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool syn_flag, bool ack_flag, uint8_t* msg);
te_errno tapi_tcp_pdu(int src_port, int dst_port, tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool syn_flag, bool ack_flag, asn_value** pdu);
int tapi_tcp_template_gen(bool is_eth_pdu, bool force_ip6, tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool syn_flag, bool ack_flag, uint8_t* data, size_t pld_len, asn_value** tmpl);
int tapi_tcp_template(bool force_ip6, tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool syn_flag, bool ack_flag, uint8_t* data, size_t pld_len, asn_value** tmpl);
int tapi_tcp_pattern_gen(bool is_eth_pdu, tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool syn_flag, bool ack_flag, asn_value** pattern);
int tapi_tcp_pattern(tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool syn_flag, bool ack_flag, asn_value** pattern);
int tapi_tcp_ip_segment_pattern_gen(bool is_eth_layer, bool force_ip6, tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool urg_flag, bool ack_flag, bool psh_flag, bool rst_flag, bool syn_flag, bool fin_flag, asn_value** pattern);
int tapi_tcp_ip_pattern_gen(bool is_eth_layer, bool force_ip6, tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool syn_flag, bool ack_flag, asn_value** pattern);
int tapi_tcp_segment_pattern(tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool urg_flag, bool ack_flag, bool psh_flag, bool rst_flag, bool syn_flag, bool fin_flag, asn_value** pattern);
int tapi_tcp_ip_segment_pattern(bool force_ip6, tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool urg_flag, bool ack_flag, bool psh_flag, bool rst_flag, bool syn_flag, bool fin_flag, asn_value** pattern);
int tapi_tcp_segment_pdu(int src_port, int dst_port, tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool urg_flag, bool ack_flag, bool psh_flag, bool rst_flag, bool syn_flag, bool fin_flag, asn_value** pdu);
int tapi_tcp_ip_segment_template_gen(bool is_eth_layer, bool force_ip6, tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool urg_flag, bool ack_flag, bool psh_flag, bool rst_flag, bool syn_flag, bool fin_flag, uint8_t* data, size_t pld_len, asn_value** tmpl);
int tapi_tcp_ip_template_gen(bool is_eth_layer, bool force_ip6, tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool syn_flag, bool ack_flag, uint8_t* data, size_t pld_len, asn_value** tmpl);
int tapi_tcp_segment_template(tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool urg_flag, bool ack_flag, bool psh_flag, bool rst_flag, bool syn_flag, bool fin_flag, uint8_t* data, size_t pld_len, asn_value** tmpl);
int tapi_tcp_ip_segment_template(bool force_ip6, tapi_tcp_pos_t seqn, tapi_tcp_pos_t ackn, bool urg_flag, bool ack_flag, bool psh_flag, bool rst_flag, bool syn_flag, bool fin_flag, uint8_t* data, size_t pld_len, asn_value** tmpl);
te_errno tapi_tcp_create_conn(const char* agt, const struct sockaddr* local_addr, const struct sockaddr* remote_addr, const char* local_iface, const uint8_t* local_mac, const uint8_t* remote_mac, int window, tapi_tcp_handler_t* handler);
te_errno tapi_tcp_start_conn(tapi_tcp_handler_t handler, tapi_tcp_mode_t mode);
te_errno tapi_tcp_init_connection(const char* agt, tapi_tcp_mode_t mode, const struct sockaddr* local_addr, const struct sockaddr* remote_addr, const char* local_iface, const uint8_t* local_mac, const uint8_t* remote_mac, int window, tapi_tcp_handler_t* handler);
int tapi_tcp_init_connection_enc(const char* agt, tapi_tcp_mode_t mode, const struct sockaddr* local_addr, const struct sockaddr* remote_addr, const char* local_iface, const uint8_t* local_mac, const uint8_t* remote_mac, int window, bool enc_vlan, bool enc_snap, tapi_tcp_handler_t* handler);
int tapi_tcp_destroy_connection(tapi_tcp_handler_t handler);
int tapi_tcp_wait_open(tapi_tcp_handler_t handler, int timeout);
int tapi_tcp_wait_msg(tapi_tcp_handler_t handler, int timeout);
int tapi_tcp_send_fin(tapi_tcp_handler_t handler, int timeout);
int tapi_tcp_send_fin_ack(tapi_tcp_handler_t handler, int timeout);
int tapi_tcp_send_rst(tapi_tcp_handler_t handler);
int tapi_tcp_send_msg(tapi_tcp_handler_t handler, uint8_t* payload, size_t len, tapi_tcp_protocol_mode_t seq_mode, tapi_tcp_pos_t seqn, tapi_tcp_protocol_mode_t ack_mode, tapi_tcp_pos_t ackn, tapi_ip_frag_spec* frags, size_t frag_num);
int tapi_tcp_conn_template(tapi_tcp_handler_t handler, uint8_t* payload, size_t len, asn_value** tmpl);
int tapi_tcp_send_template(tapi_tcp_handler_t handler, const asn_value* template, rcf_call_mode_t blk_mode);
int tapi_tcp_recv_msg_gen(tapi_tcp_handler_t handler, int timeout, tapi_tcp_protocol_mode_t ack_mode, uint8_t* buffer, size_t* len, tapi_tcp_pos_t* seqn_got, tapi_tcp_pos_t* ackn_got, uint8_t* flags, bool no_unexp_seqn);
int tapi_tcp_recv_msg(tapi_tcp_handler_t handler, int timeout, tapi_tcp_protocol_mode_t ack_mode, uint8_t* buffer, size_t* len, tapi_tcp_pos_t* seqn_got, tapi_tcp_pos_t* ackn_got, uint8_t* flags);
int tapi_tcp_recv_data(tapi_tcp_handler_t handler, int time2wait, tapi_tcp_protocol_mode_t ack_mode, te_dbuf* data);
int tapi_tcp_send_ack(tapi_tcp_handler_t handler, tapi_tcp_pos_t ackn);
int tapi_tcp_ack_all(tapi_tcp_handler_t handler);
tapi_tcp_pos_t tapi_tcp_first_seqn_got(tapi_tcp_handler_t handler);
tapi_tcp_pos_t tapi_tcp_last_seqn_got(tapi_tcp_handler_t handler);
tapi_tcp_pos_t tapi_tcp_last_ackn_got(tapi_tcp_handler_t handler);
tapi_tcp_pos_t tapi_tcp_first_seqn_sent(tapi_tcp_handler_t handler);
tapi_tcp_pos_t tapi_tcp_last_seqn_sent(tapi_tcp_handler_t handler);
tapi_tcp_pos_t tapi_tcp_last_ackn_sent(tapi_tcp_handler_t handler);
size_t tapi_tcp_last_win_got(tapi_tcp_handler_t handler);
bool tapi_tcp_fin_got(tapi_tcp_handler_t handler);
bool tapi_tcp_rst_got(tapi_tcp_handler_t handler);
tapi_tcp_pos_t tapi_tcp_next_seqn(tapi_tcp_handler_t handler);
tapi_tcp_pos_t tapi_tcp_next_ackn(tapi_tcp_handler_t handler);
int tapi_tcp_update_sent_seq(tapi_tcp_handler_t handler, size_t new_sent_len);
int tapi_tcp_get_window(tapi_tcp_handler_t handler);
te_errno tapi_tcp_set_window(tapi_tcp_handler_t handler, int window);
int tapi_tcp_reset_hack_init(const char* ta_name, int session, const char* iface, bool dir_out, tapi_tcp_reset_hack_t* context);
int tapi_tcp_reset_hack_catch(const char* ta_name, int session, tapi_tcp_reset_hack_t* context);
int tapi_tcp_reset_hack_send(const char* ta_name, int session, tapi_tcp_reset_hack_t* context, size_t received, size_t sent);
int tapi_tcp_reset_hack_clear(const char* ta_name, int session, tapi_tcp_reset_hack_t* context);
te_errno tapi_tcp_ip6_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_mac, const uint8_t* rem_mac, const uint8_t* loc_addr, const uint8_t* rem_addr, int loc_port, int rem_port, csap_handle_t* tcp_csap);
csap_handle_t tapi_tcp_conn_snd_csap(tapi_tcp_handler_t handler);
csap_handle_t tapi_tcp_conn_rcv_csap(tapi_tcp_handler_t handler);
int tapi_tcp_update_sent_ack(tapi_tcp_handler_t handler, size_t ack);
int tapi_tcp_wait_packet(tapi_tcp_handler_t handler, int timeout);
int tapi_tcp_get_packets(tapi_tcp_handler_t handler);
te_errno tapi_tcp_conn_enable_ts(tapi_tcp_handler_t handler, bool enable, uint32_t start_value);
te_errno tapi_tcp_conn_get_ts(tapi_tcp_handler_t handler, bool* enabled, bool* dst_enabled, uint32_t* ts_value, uint32_t* last_ts_sent, uint32_t* last_ts_got, uint32_t* ts_to_echo, uint32_t* last_ts_echo_sent, uint32_t* last_ts_echo_got);
te_errno tapi_tcp_get_ts_opt(const asn_value* val, uint32_t* ts_value, uint32_t* ts_echo);
te_errno tapi_tcp_set_ts_opt(asn_value* val, uint32_t ts_value, uint32_t ts_echo);
int tapi_tcp_compare_seqn(uint32_t seqn1, uint32_t seqn2);
te_errno tapi_tcp_ip_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_mac, const uint8_t* rem_mac, int ip_family, const void* loc_addr, const void* rem_addr, int loc_port, int rem_port, csap_handle_t* tcp_csap);
te_errno tapi_tcp_get_hdrs_payload_len(asn_value* pkt, unsigned int* hdrs_len, unsigned int* pld_len);
te_errno tapi_udp_add_csap_layer(asn_value** csap_spec, int local_port, int remote_port);
te_errno tapi_udp_add_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, int src_port, int dst_port);
te_errno tapi_udp_ip4_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_mac, const uint8_t* rem_mac, in_addr_t loc_addr, in_addr_t rem_addr, int loc_port, int rem_port, csap_handle_t* udp_csap);
te_errno tapi_udp_ip4_csap_create(const char* ta_name, int sid, const char* ifname, in_addr_t loc_addr, in_addr_t rem_addr, int loc_port, int rem_port, csap_handle_t* udp_csap);
int ndn_udp4_dgram_to_plain(asn_value* pkt, struct udp4_datagram** udp_dgram);
tapi_tad_trrecv_cb_data* tapi_udp_ip4_eth_trrecv_cb_data(udp4_callback callback, void* user_data);
int tapi_udp_ip4_eth_recv_start(const char* ta_name, int sid, csap_handle_t csap, rcf_trrecv_mode mode);
te_errno tapi_udp_ip6_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_mac, const uint8_t* rem_mac, const uint8_t* loc_addr, const uint8_t* rem_addr, int loc_port, int rem_port, csap_handle_t* udp_csap);
te_errno tapi_udp_ip_eth_csap_create(const char* ta_name, int sid, const char* eth_dev, unsigned int receive_mode, const uint8_t* loc_mac, const uint8_t* rem_mac, int ip_family, const void* loc_addr, const void* rem_addr, int loc_port, int rem_port, csap_handle_t* udp_csap);
te_errno tapi_iscsi_tgt_csap_create(const char* ta_name, iscsi_digest_type hdr_dig, iscsi_digest_type data_dig, csap_handle_t* csap);
te_errno tapi_iscsi_ini_csap_create(const char* ta_name, int sid, csap_handle_t listen_csap, int timeout, iscsi_digest_type hdr_dig, iscsi_digest_type data_dig, csap_handle_t* csap);
te_errno tapi_iscsi_sock_csap_create(const char* ta_name, int socket, iscsi_digest_type hdr_dig, iscsi_digest_type data_dig, csap_handle_t* csap);
int tapi_iscsi_recv_pkt(const char* ta_name, int sid, csap_handle_t csap, int timeout, csap_handle_t forward_csap, iscsi_target_params_t* params, uint8_t* buffer, size_t* length);
int tapi_iscsi_start_poll_recv_pkt(unsigned n_csaps, rcf_trpoll_csap* csaps, int timeout);
int tapi_iscsi_recv_polled_pkt(rcf_trpoll_csap* the_csap, iscsi_target_params_t* params, uint8_t* buffer, size_t* length);
int tapi_iscsi_send_pkt(const char* ta_name, int sid, csap_handle_t csap, iscsi_target_params_t* params, uint8_t* buffer, size_t length);
int tapi_iscsi_send_pkt_last(const char* ta_name, int sid, csap_handle_t csap, uint8_t* buffer, size_t length);
int tapi_iscsi_forward_all(const char* ta_name, int session, csap_handle_t csap_rcv, csap_handle_t csap_fwd, unsigned int timeout, unsigned int* forwarded);
te_errno tapi_iscsi_exchange_until_silent(const char* ta, int session, csap_handle_t csap_a, csap_handle_t csap_b, unsigned int timeout);
te_errno tapi_iscsi_exchange_until_pattern(const char* ta, int session, csap_handle_t csap_a, csap_handle_t csap_b, asn_value* pattern, uint8_t* buffer, size_t* length, unsigned int timeout);
te_errno tapi_iscsi_exchange_until_stop(const char* ta, int session, csap_handle_t csap_a, csap_handle_t csap_b, unsigned int timeout);
te_errno tapi_iscsi_exchange_stop(const char* ta, int session, csap_handle_t csap_a, csap_handle_t csap_b);
te_errno tapi_iscsi_prepare_pattern_unit(iscsi_bit_spec_t i_bit, uint8_t opcode, iscsi_bit_spec_t f_bit, asn_value** pattern);
int tapi_iscsi_get_key_num(iscsi_segment_data segment_data);
char* tapi_iscsi_get_key_name(iscsi_segment_data segment_data, int key_index);
int tapi_iscsi_get_key_index_by_name(iscsi_segment_data segment_data, char* name);
iscsi_key_values tapi_iscsi_get_key_values(iscsi_segment_data segment_data, int key_index);
int tapi_iscsi_get_key_values_num(iscsi_key_values values);
int tapi_iscsi_get_key_value(iscsi_key_values values, int key_value_index, char** value);
int tapi_iscsi_add_new_key(iscsi_segment_data segment_data, char* name, int key_index);
iscsi_key_values tapi_iscsi_key_values_create(int num, ...);
int tapi_iscsi_set_key_values(iscsi_segment_data segment_data, int key_index, iscsi_key_values values);
void tapi_iscsi_free_key_values(iscsi_key_values values);
int tapi_iscsi_delete_key(iscsi_segment_data segment_data, int key_index);
iscsi_segment_data tapi_iscsi_keys_create(int num, ...);
int tapi_iscsi_find_key_and_value(iscsi_segment_data segment_data, const char* key_name, int num, ...);
int tapi_iscsi_return_key_value(iscsi_segment_data segment_data, const char* key_name, const char* buf, int buf_len);
int tapi_iscsi_change_key_values(iscsi_segment_data segment_data, char* key_name, tapi_iscsi_change_key_val_type change, int num, ...);
void tapi_iscsi_keys_data_free(iscsi_segment_data);
int tapi_iscsi_target_set_parameter(const char* ta, tapi_iscsi_parameter param, const char* value);
int tapi_iscsi_target_customize(const char* ta, int id, const char* key, const char* value);
int tapi_iscsi_target_customize_intval(const char* ta, int id, const char* key, int value);
int tapi_iscsi_target_cause_logout(const char* ta, int id, int timeout);
int tapi_iscsi_target_cause_renegotiate(const char* ta, int id, int timeout);
int tapi_iscsi_target_will_drop(const char* ta, int id, bool drop_all, int time2wait, int time2retain);
int tapi_iscsi_target_set_failure_state(const char* ta, int id, const char* status, const char* sense, const char* add_code);
int tapi_iscsi_initiator_advertize_set(const char* ta, iscsi_target_id target_id, iscsi_cid cid, tapi_iscsi_parameter param, bool advertize);
int tapi_iscsi_initiator_set_parameter(const char* ta, iscsi_target_id target_id, iscsi_cid cid, tapi_iscsi_parameter param, const char* value, bool advertize);
iscsi_target_id tapi_iscsi_initiator_add_target(const char* ta, const struct sockaddr* target_addr);
int tapi_iscsi_initiator_del_target(const char* ta, iscsi_target_id tgt_id);
iscsi_cid tapi_iscsi_initiator_conn_add(const char* ta, iscsi_target_id tgt_id);
iscsi_cid tapi_iscsi_initiator_conn_establish(const char* ta, iscsi_target_id tgt_id, iscsi_cid cid);
int tapi_iscsi_initiator_conn_del(const char* ta, iscsi_target_id tgt_id, iscsi_cid cid);
int tapi_iscsi_initiator_conn_down(const char* ta, iscsi_target_id tgt_id, iscsi_cid cid);
tapi_iscsi_parameter tapi_iscsi_get_param_map(const char* param);
int tapi_iscsi_find_key_values(iscsi_segment_data segment_data, const char* key_name, iscsi_key_values* key_array);
int tapi_iscsi_key_value_read(iscsi_key_values val_array, int val_index, char* buf, size_t* buf_len);
int tapi_iscsi_key_value_write(iscsi_key_values val_array, int val_index, const char* string);
static int tapi_iscsi_set_local_secret(const char* ta, const char* secret);
static int tapi_iscsi_set_local_name(const char* ta, const char* name);
static int tapi_iscsi_set_peer_secret(const char* ta, const char* secret);
static int tapi_iscsi_set_peer_name(const char* ta, const char* name);
static int tapi_iscsi_set_challenge_length(const char* ta, int len);
static int tapi_iscsi_set_encoding_format(const char* ta, int fmt);
static int tapi_iscsi_set_tgt_auth_req(const char* ta, int tgt_auth);
static int tapi_iscsi_set_security_negotiations_phase(const char* ta, int use);
iscsi_digest_type iscsi_digest_str2enum(const char* digest_type);
char* iscsi_digest_enum2str(iscsi_digest_type digest_type);
int tapi_iscsi_target_inform_new_test(const char* ta);
te_errno tapi_iscsi_target_mount(const char* ta);
te_errno tapi_iscsi_target_unmount(const char* ta);
te_errno tapi_iscsi_target_file_write(const char* ta, const char* fname, const void* data, size_t length, size_t multiply);
te_errno tapi_iscsi_target_file_read(const char* ta, const char* fname, void* data, size_t length);
te_errno tapi_iscsi_target_raw_write(const char* ta, off_t offset, const void* data, size_t length, size_t multiply);
te_errno tapi_iscsi_target_raw_read(const char* ta, off_t offset, void* data, size_t length);
te_errno tapi_iscsi_io_prepare(const char* ta, iscsi_target_id id, bool use_signal, bool use_fs, size_t bufsize, iscsi_io_handle_t** ioh);
te_errno tapi_iscsi_io_reset(iscsi_io_handle_t* ioh);
te_errno tapi_iscsi_io_finish(iscsi_io_handle_t* ioh);
bool tapi_iscsi_io_enable_signal(iscsi_io_handle_t* ioh, bool enable);
te_errno tapi_iscsi_io_get_status(iscsi_io_handle_t* ioh, iscsi_io_taskid taskid);
bool tapi_iscsi_io_is_complete(iscsi_io_handle_t* ioh, iscsi_io_taskid taskid);
bool tapi_iscsi_initiator_is_device_ready(const char* ta, iscsi_target_id id);
te_errno tapi_iscsi_initiator_mount(iscsi_io_handle_t* ioh, iscsi_io_taskid* taskid);
te_errno tapi_iscsi_initiator_unmount(iscsi_io_handle_t* ioh, iscsi_io_taskid* taskid);
te_errno tapi_iscsi_initiator_open(iscsi_io_handle_t* ioh, iscsi_io_taskid* taskid, const char* fname, int mode);
te_errno tapi_iscsi_initiator_close(iscsi_io_handle_t* ioh, iscsi_io_taskid* taskid);
te_errno tapi_iscsi_initiator_noop(iscsi_io_handle_t* ioh, iscsi_io_taskid* taskid);
te_errno tapi_iscsi_initiator_fsync(iscsi_io_handle_t* ioh, iscsi_io_taskid* taskid);
te_errno tapi_iscsi_initiator_seek(iscsi_io_handle_t* ioh, iscsi_io_taskid* taskid, off_t pos);
te_errno tapi_iscsi_initiator_write(iscsi_io_handle_t* ioh, iscsi_io_taskid* taskid, void* data, size_t length);
te_errno tapi_iscsi_initiator_read(iscsi_io_handle_t* ioh, iscsi_io_taskid* taskid, void* data, size_t length);
te_errno tapi_iscsi_initiator_write_file(iscsi_io_handle_t* ioh, iscsi_io_taskid* taskid, const char* fname);
te_errno tapi_iscsi_initiator_read_file(iscsi_io_handle_t* ioh, iscsi_io_taskid* taskid, const char* fname);
int tapi_pcap_add_csap_layer(asn_value** csap_spec, const char* ifname, unsigned int iftype, unsigned int recv_mode);
int tapi_pcap_csap_create(const char* ta_name, int sid, const char* ifname, unsigned int iftype, unsigned int recv_mode, csap_handle_t* pcap_csap);
tapi_tad_trrecv_cb_data* tapi_pcap_trrecv_cb_data(tapi_pcap_recv_callback callback, void* user_data);
int tapi_pcap_pattern_add(const char* filter, const int filter_id, asn_value** pattern);
te_errno tapi_ppp_add_csap_layer(asn_value** csap_spec, uint16_t protocol);
te_errno tapi_ppp_add_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, uint16_t protocol);
te_errno tapi_pppoe_add_csap_layer(asn_value** csap_spec, uint8_t version, uint8_t type, uint8_t code, uint16_t session_id, uint16_t length);
te_errno tapi_pppoe_add_pdu(asn_value** tmpl_or_ptrn, asn_value** pdu, bool is_pattern, uint8_t version, uint8_t type, uint8_t code, uint16_t session_id, uint16_t length);
int tapi_snmp_cat_oid(tapi_snmp_oid_t* base, const tapi_snmp_oid_t* suffix);
int tapi_snmp_is_sub_oid(const tapi_snmp_oid_t* tree, const tapi_snmp_oid_t* node);
void tapi_snmp_free_varbind(tapi_snmp_varbind_t* varbind);
void tapi_snmp_free_message(tapi_snmp_message_t* snmp_message);
tapi_snmp_oct_string_t* tapi_snmp_mk_oct_string(uint8_t* data, size_t data_len);
void tapi_snmp_free_oct_string(tapi_snmp_oct_string_t* oct_string);
int tapi_snmp_packet_to_plain(asn_value* pkt, tapi_snmp_message_t* snmp_message);
te_errno tapi_snmp_csap_create(const char* ta, int sid, const char* snmp_agent, const char* community, tapi_snmp_version_t snmp_version, csap_handle_t* csap_id);
te_errno tapi_snmp_gen_csap_create(const char* ta, int sid, const char* snmp_agent, tapi_snmp_security_t* security, tapi_snmp_version_t snmp_version, uint16_t rem_port, uint16_t loc_port, int timeout, csap_handle_t* csap_id);
int tapi_snmp_set_vbs(const char* ta, int sid, int csap_id, const tapi_snmp_varbind_t* var_binds, size_t num_vars, int* errstat, int* errindex);
int tapi_snmp_set(const char* ta, int sid, int csap_id, int* errstat, int* errindex, ...);
int tapi_snmp_set_row(const char* ta, int sid, int csap_id, int* errstat, int* errindex, const tapi_snmp_oid_t* common_index, ...);
int tapi_snmp_get_row(const char* ta, int sid, int csap_id, int* errstatus, int* errindex, const tapi_snmp_oid_t* common_index, ...);
int tapi_snmp_set_integer(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, int value, int* errstat);
int tapi_snmp_set_unsigned(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, unsigned int value, int* errstat);
int tapi_snmp_set_octetstring(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, const uint8_t* value, size_t size, int* errstat);
int tapi_snmp_set_string(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, const char* value, int* errstat);
int tapi_snmp_get(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, tapi_snmp_get_type_t next, tapi_snmp_varbind_t* varbind, int* errstatus);
int tapi_snmp_getbulk(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* v_oid, int* num, tapi_snmp_varbind_t* varbind, int* errstatus);
int tapi_snmp_walk(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, void* userdata, walk_callback callback);
int tapi_snmp_get_ipaddr(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, void* addr, int* errstat);
int tapi_snmp_get_date_and_time(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, time_t* val, int* offset_from_utc, int* errstat);
int tapi_snmp_get_integer(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, int* val, int* errstat);
static unsigned int tapi_snmp_get_unsigned(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, unsigned int* val, int* errstat);
int tapi_snmp_get_string(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, char* buf, size_t buf_size, int* errstat);
int tapi_snmp_get_oct_string(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, void* buf, size_t* buf_size, int* errstat);
int tapi_snmp_get_objid(const char* ta, int sid, int csap_id, const tapi_snmp_oid_t* oid, tapi_snmp_oid_t* ret_oid, int* errstat);
int tapi_snmp_get_table(const char* ta, int sid, int csap_id, tapi_snmp_oid_t* table_oid, int* num, void** result);
int tapi_snmp_get_table_rows(const char* ta, int sid, int csap_id, tapi_snmp_oid_t* table_entry, int num, tapi_snmp_oid_t* suffix, void** result);
int tapi_snmp_get_table_dimension(tapi_snmp_oid_t* table_oid, int* dimension);
int tapi_snmp_make_table_index(tapi_snmp_oid_t* tbl, tapi_snmp_oid_t* index, ...);
int tapi_snmp_get_table_columns(tapi_snmp_oid_t* table_oid, tapi_snmp_var_access** columns);
int tapi_snmp_load_mib_with_path(const char* dir_path, const char* mib_file);
int tapi_snmp_load_cfg_mibs(const char* dir_path);
static void tapi_snmp_zero_oid(tapi_snmp_oid_t* oid);
void tapi_snmp_append_oid(tapi_snmp_oid_t* oid, int n, ...);
int tapi_snmp_make_oid(const char* oid_str, tapi_snmp_oid_t* oid);
int tapi_snmp_find_vb(const tapi_snmp_varbind_t* var_binds, size_t num, const tapi_snmp_oid_t* oid, const tapi_snmp_varbind_t** vb, size_t* pos);
static int tapi_snmp_find_vb_str(const tapi_snmp_varbind_t* var_binds, size_t num, const char* oid, const tapi_snmp_varbind_t** vb, size_t* pos);
int tapi_snmp_get_syntax(tapi_snmp_oid_t* oid, tapi_snmp_vartypes_t* syntax);
void tapi_snmp_trap_handler(const char* fn, void* user_param);
int tapi_snmp_make_instance(const char* oid_str, tapi_snmp_oid_t* oid, ...);
int tapi_snmp_make_vb(tapi_snmp_varbind_t* vb, const char* oid_str, const char* type, const char* value, ...);
int tapi_snmp_cmp_vb(const tapi_snmp_varbind_t* vb1, const tapi_snmp_varbind_t* vb2, tapi_snmp_vb_cmp_type cmp_type);
int tapi_snmp_cmp_oid(const tapi_snmp_oid_t* oid1, const tapi_snmp_oid_t* oid2);
const char* print_oid(const tapi_snmp_oid_t* oid);
const char* tapi_snmp_print_oct_str(const void* data, size_t len);
const char* snmp_error_h2str(int error_val);
const char* snmp_obj_type_h2str(enum snmp_obj_type obj_type);
const char* tapi_snmp_obj_status_h2str(enum tapi_snmp_mib_status obj_status);
const char* tapi_snmp_truth_value_h2str(enum tapi_snmp_truth_value val);
const char* tapi_snmp_val_type_h2str(enum tapi_snmp_vartypes_t type);
const char* tapi_snmp_gen_trap_h2str(enum tapi_snmp_gen_trap_t type);
tapi_snmp_gen_trap_t tapi_snmp_gen_trap_by_name(const char* trap_name);
te_errno tapi_tad_init_asn_value(asn_value** value, const asn_type* type);
te_errno tapi_tad_csap_add_layer(asn_value** csap_spec, const asn_type* layer_type, const char* layer_choice, asn_value** layer_spec);
te_errno tapi_tad_tmpl_ptrn_add_layer(asn_value** obj_spec, bool is_pattern, const asn_type* pdu_type, const char* pdu_choice, asn_value** pdu_spec);
te_errno tapi_tad_new_ptrn_unit(asn_value** obj_spec, asn_value** unit_spec);
te_errno tapi_tad_tmpl_ptrn_set_payload_plain(asn_value** obj_spec, bool is_pattern, const void* payload, size_t length);
te_errno tapi_pdus_free_fields_by_du_tag(asn_value* pdus, asn_tag_value du_tag);
te_errno tapi_tad_pdus_relist_outer_inner(asn_value* pdu_seq, unsigned int* nb_pdus_o_out, asn_value*** pdus_o_out, unsigned int* nb_pdus_i_out, asn_value*** pdus_i_out);
te_errno tapi_tad_tmpl_relist_outer_inner_pdus(asn_value* tmpl, unsigned int* nb_pdus_o_out, asn_value*** pdus_o_out, unsigned int* nb_pdus_i_out, asn_value*** pdus_i_out);
asn_value* tapi_tad_mk_pattern_from_template(asn_value* template);
te_errno tapi_tad_packets_to_pattern(asn_value** packets, unsigned int n_packets, send_transform* transform, asn_value** pattern_out);
te_errno tapi_tad_concat_patterns(asn_value* dst, asn_value* src);
te_errno tapi_tad_aggregate_patterns(asn_value** patterns, unsigned int nb_patterns, asn_value** pattern_out);
te_errno tapi_ndn_subst_env(asn_value* value, te_kvpair_h* params, struct tapi_env* env);
te_errno tapi_ndn_tmpl_classify(const asn_value* tmpl, te_tad_protocols_t hdrs[TAPI_NDN_NLEVELS]);
te_errno tapi_ndn_tmpl_set_ip_cksum(asn_value* tmpl, uint16_t cksum, tapi_ndn_level_t level);
te_errno tapi_ndn_tmpl_set_udp_cksum(asn_value* tmpl, uint16_t cksum, tapi_ndn_level_t level);
te_errno tapi_ndn_tmpl_set_tcp_cksum(asn_value* tmpl, uint16_t cksum);
te_errno tapi_ndn_tmpl_set_tcp_flags(asn_value* tmpl, uint8_t flags);
te_errno tapi_ndn_tmpl_set_payload_len(asn_value* tmpl, unsigned int payload_len);
te_errno tapi_ndn_pkt_inject_vlan_tag(asn_value* pkt, uint16_t vlan_tci);
te_errno tapi_ndn_pdus_inject_vlan_tags(asn_value* pdus, const uint16_t* vid, const uint16_t* prio, const uint16_t* cfi, size_t n_tags);
te_errno tapi_ndn_pdus_remove_vlan_tags(asn_value* pdus, size_t n_tags);
te_errno tapi_ndn_eth_read_vlan_tci(const asn_value* eth, size_t* n_tags, uint16_t* vid, uint16_t* prio, uint16_t* cfi);
te_errno tapi_ndn_pkt_demand_correct_ip_cksum(asn_value* pkt, tapi_ndn_level_t level);
te_errno tapi_ndn_pkt_demand_correct_udp_cksum(asn_value* pkt, bool can_be_zero, tapi_ndn_level_t level);
te_errno tapi_ndn_pkt_demand_correct_tcp_cksum(asn_value* pkt);
te_errno tapi_ndn_superframe_gso(asn_value* superframe, size_t seg_payload_len, const struct tapi_ndn_gso_conf* gso_conf, asn_value*** pkts_out, unsigned int* nb_pkts_out);
te_errno tapi_ndn_tso_pkts_edit(asn_value** pkts, unsigned int nb_pkts);
te_errno tapi_ndn_gso_pkts_ip_len_edit(asn_value** pkts, unsigned int nb_pkts, te_tad_protocols_t ip_te_proto, tapi_ndn_level_t level);
te_errno tapi_ndn_gso_pkts_ip_id_edit(asn_value** pkts, unsigned int nb_pkts, tapi_ndn_level_t level);
te_errno tapi_ndn_gso_pkts_udp_len_edit(asn_value** pkts, unsigned int nb_pkts, tapi_ndn_level_t level);
te_errno tapi_ndn_pkts_to_ptrn(asn_value** pkts, unsigned int nb_pkts, asn_value** ptrn_out);
te_errno tapi_eth_transform_ptrn_on_rx(receive_transform* rx_transform, asn_value** ptrn);
int tapi_csap_get_status(const char* ta_name, int ta_sid, csap_handle_t csap_id, tad_csap_status_t* status);
int tapi_csap_get_total_bytes(const char* ta_name, int ta_sid, csap_handle_t csap_id, unsigned long long int* p_bytes);
int tapi_csap_get_duration(const char* ta_name, int ta_sid, csap_handle_t csap_id, struct timeval* p_dur);
int tapi_csap_param_get_llint(const char* ta_name, int ta_sid, csap_handle_t csap_id, const char* param_name, int64_t* p_llint);
int tapi_csap_param_get_timestamp(const char* ta_name, int ta_sid, csap_handle_t csap_id, const char* param_name, struct timeval* p_timestamp);
int tapi_tad_csap_create(const char* ta_name, int session, const char* stack_id, const asn_value* csap_spec, csap_handle_t* handle);
te_errno tapi_tad_csap_destroy(const char* ta_name, int session, csap_handle_t handle);
int tapi_tad_trsend_start(const char* ta_name, int session, csap_handle_t csap, const asn_value* templ, rcf_call_mode_t blk_mode);
te_errno tapi_tad_trrecv_start(const char* ta_name, int session, csap_handle_t handle, const asn_value* pattern, unsigned int timeout, unsigned int num, unsigned int mode);
tapi_tad_trrecv_cb_data* tapi_tad_trrecv_make_cb_data(tapi_tad_trrecv_cb callback, void* user_data);
te_errno tapi_tad_trrecv_wait(const char* ta_name, int session, csap_handle_t handle, tapi_tad_trrecv_cb_data* cb_data, unsigned int* num);
te_errno tapi_tad_trrecv_stop(const char* ta_name, int session, csap_handle_t handle, tapi_tad_trrecv_cb_data* cb_data, unsigned int* num);
te_errno tapi_tad_trrecv_get(const char* ta_name, int session, csap_handle_t handle, tapi_tad_trrecv_cb_data* cb_data, unsigned int* num);
int tapi_tad_add_iterator_for(asn_value* templ, int begin, int end, int step);
int tapi_tad_add_iterator_ints(asn_value* templ, int* array, size_t length);
int tapi_tad_forward_all(const char* ta_name, int session, csap_handle_t csap_rcv, csap_handle_t csap_fwd, asn_value* pattern, unsigned int timeout, unsigned int* forwarded);
te_errno tapi_tad_socket_add_csap_layer(asn_value** csap_spec, int fd);
te_errno tapi_tad_csap_get_no_match_pkts(const char* ta_name, int session, csap_handle_t csap_id, unsigned int* val);
te_errno tapi_tad_csap_destroy_all(int session);
te_errno tapi_tad_get_pkt_rx_ts(asn_value* pkt, struct timeval* tv);
static int tsa_iut_sock(tsa_session* ss);
static int tsa_tst_sock(tsa_session* ss);
static rpc_tcp_state tsa_state_cur(tsa_session* ss);
static void tsa_state_cur_set(tsa_session* ss, rpc_tcp_state state);
static rpc_tcp_state tsa_state_to(tsa_session* ss);
static rpc_tcp_state tsa_state_from(tsa_session* ss);
static const char* tsa_rem_path(tsa_session* ss);
static bool tsa_timeout_used(tsa_session* ss);
static int tsa_elapsed_time(tsa_session* ss);
te_errno tsa_state_init(tsa_session* ss, tsa_tst_type tst_type);
te_errno tsa_iut_set(tsa_session* ss, rcf_rpc_server* pco_iut, const struct if_nameindex* iut_if, const struct sockaddr* iut_addr);
te_errno tsa_tst_set(tsa_session* ss, rcf_rpc_server* pco_tst, const struct if_nameindex* tst_if, const struct sockaddr* tst_addr, const void* fake_link_addr);
te_errno tsa_gw_set(tsa_session* ss, rcf_rpc_server* pco_gw, const struct sockaddr* gw_iut_addr, const struct sockaddr* gw_tst_addr, const struct if_nameindex* gw_iut_if, const struct if_nameindex* gw_tst_if, const void* alien_link_addr);
void tsa_gw_preconf(tsa_session* ss, bool preconfigured);
te_errno tsa_break_tst_iut_conn(tsa_session* ss);
te_errno tsa_break_iut_tst_conn(tsa_session* ss);
te_errno tsa_repair_tst_iut_conn(tsa_session* ss);
te_errno tsa_repair_iut_tst_conn(tsa_session* ss);
te_errno tsa_do_tcp_move(tsa_session* ss, rpc_tcp_state state_from, rpc_tcp_state state_to, uint32_t flags);
te_errno tsa_do_moves(tsa_session* ss, rpc_tcp_state stop_state, uint32_t flags, ...);
te_errno tsa_do_moves_str(tsa_session* ss, rpc_tcp_state init_state, rpc_tcp_state stop_state, uint32_t flags, const char* s);
te_errno tsa_create_session(tsa_session* ss, uint32_t flags);
te_errno tsa_destroy_session(tsa_session* ss);
te_errno tsa_set_start_tcp_state(tsa_session* ss, rpc_tcp_state state, rpc_tcp_state stop_state, uint32_t flags);
te_errno tsa_update_cur_state(tsa_session* ss);
te_errno tsa_tst_send_rst(tsa_session* ss);
void tsa_packet_handler(const char* packet, void* user_param);
void tsa_print_packet_stats(tsa_packets_counter* ctx);
te_errno iut_wait_change_gen(tsa_session* ss, int timeout);
te_errno iut_wait_change(tsa_session* ss);
void wait_connectivity_changes(tsa_session* ss);
te_errno tsa_sock_create(tsa_session* ss, int rpc_selector);
void tsa_set_sock_handlers(tsa_handlers* handlers);
void tsa_set_csap_handlers(tsa_handlers* handlers);
te_errno tapi_bttrack_create(tapi_job_factory_t* factory, const char* ip, tapi_bttrack_opt* opt, tapi_bttrack_app** app);
te_errno tapi_bttrack_start(tapi_bttrack_app* app);
te_errno tapi_bttrack_wait(tapi_bttrack_app* app, int timeout_ms);
te_errno tapi_bttrack_kill(tapi_bttrack_app* app, int signum);
te_errno tapi_bttrack_stop(tapi_bttrack_app* app);
te_errno tapi_bttrack_destroy(tapi_bttrack_app* app);
te_errno tapi_ctorrent_create_metainfo_file(tapi_job_factory_t* factory, tapi_bttrack_app* tracker, const char* metainfo_file, const char* target, int timeout_ms);
te_errno tapi_ctorrent_create_app(tapi_job_factory_t* factory, tapi_ctorrent_opt* opt, tapi_ctorrent_app** app);
te_errno tapi_ctorrent_start(tapi_ctorrent_app* app);
te_errno tapi_ctorrent_kill(tapi_ctorrent_app* app, int signum);
te_errno tapi_ctorrent_stop(tapi_ctorrent_app* app, int timeout_ms);
te_errno tapi_ctorrent_destroy(tapi_ctorrent_app* app, int timeout_ms);
te_errno tapi_ctorrent_check_completion(tapi_ctorrent_app* app, int receive_timeout_ms, bool* completed);
te_errno tapi_ctorrent_wait_completion(tapi_ctorrent_app* app, int receive_timeout_ms);
te_errno tapi_ethtool(tapi_job_factory_t* factory, const tapi_ethtool_opt* opt, tapi_ethtool_report* report);
te_errno tapi_ethtool_get_stat(tapi_ethtool_report* report, const char* name, long int* value);
void tapi_ethtool_destroy_report(tapi_ethtool_report* report);
te_errno tapi_haproxy_create(tapi_job_factory_t* factory, const tapi_haproxy_opt* opt, tapi_haproxy_app** app);
te_errno tapi_haproxy_start(tapi_haproxy_app* app);
te_errno tapi_haproxy_wait(tapi_haproxy_app* app, int timeout_ms);
te_errno tapi_haproxy_kill(tapi_haproxy_app* app, int signo);
te_errno tapi_haproxy_destroy(tapi_haproxy_app* app);
te_errno tapi_haproxy_cfg_create(const char* ta, const tapi_haproxy_cfg_opt* opt, char** result_pathname);
void tapi_haproxy_cfg_destroy(const char* ta, const char* cfg_file);
te_errno tapi_memaslap_create(tapi_job_factory_t* factory, tapi_memaslap_opt* opt, tapi_memaslap_app** app);
te_errno tapi_memaslap_start(const tapi_memaslap_app* app);
te_errno tapi_memaslap_wait(const tapi_memaslap_app* app, int timeout_ms);
te_errno tapi_memaslap_stop(const tapi_memaslap_app* app);
te_errno tapi_memaslap_kill(const tapi_memaslap_app* app, int signum);
te_errno tapi_memaslap_destroy(tapi_memaslap_app* app);
te_errno tapi_memaslap_get_report(tapi_memaslap_app* app, tapi_memaslap_report* report);
te_errno tapi_memaslap_report_mi_log(const tapi_memaslap_report* report);
te_errno tapi_memaslap_destroy_report(tapi_memaslap_report* report);
te_errno tapi_memcached_create(tapi_job_factory_t* factory, const tapi_memcached_opt* opt, tapi_memcached_app** app);
te_errno tapi_memcached_start(const tapi_memcached_app* app);
te_errno tapi_memcached_wait(const tapi_memcached_app* app, int timeout_ms);
te_errno tapi_memcached_stop(const tapi_memcached_app* app);
te_errno tapi_memcached_kill(const tapi_memcached_app* app, int signum);
te_errno tapi_memcached_destroy(tapi_memcached_app* app);
te_errno tapi_memtier_create(tapi_job_factory_t* factory, const tapi_memtier_opt* opt, tapi_memtier_app** app);
te_errno tapi_memtier_start(const tapi_memtier_app* app);
te_errno tapi_memtier_wait(const tapi_memtier_app* app, int timeout_ms);
te_errno tapi_memtier_stop(const tapi_memtier_app* app);
te_errno tapi_memtier_kill(const tapi_memtier_app* app, int signum);
te_errno tapi_memtier_destroy(tapi_memtier_app* app);
te_errno tapi_memtier_get_report(tapi_memtier_app* app, tapi_memtier_report* report);
te_errno tapi_memtier_report_mi_log(const tapi_memtier_report* report);
void tapi_memtier_destroy_report(tapi_memtier_report* report);
te_errno tapi_mke2fs_create(tapi_job_factory_t* factory, const tapi_mke2fs_opt* opt, tapi_mke2fs_app** app);
te_errno tapi_mke2fs_start(tapi_mke2fs_app* app);
te_errno tapi_mke2fs_wait(tapi_mke2fs_app* app, int timeout_ms);
te_errno tapi_mke2fs_kill(tapi_mke2fs_app* app, int signum);
te_errno tapi_mke2fs_stop(tapi_mke2fs_app* app);
te_errno tapi_mke2fs_destroy(tapi_mke2fs_app* app);
te_errno tapi_mke2fs_check_journal(tapi_mke2fs_app* app);
te_errno tapi_mke2fs_do(tapi_job_factory_t* factory, const tapi_mke2fs_opt* opt, tapi_mke2fs_app** app, int timeout_ms);
te_errno tapi_netperf_create_client(tapi_job_factory_t* factory, const tapi_netperf_opt* opt, tapi_netperf_app_client_t** app);
te_errno tapi_netperf_create_server(tapi_job_factory_t* factory, const tapi_netperf_opt* opt, tapi_netperf_app_server_t** app_server);
te_errno tapi_netperf_create(tapi_job_factory_t* client_factory, tapi_job_factory_t* server_factory, const tapi_netperf_opt* opt, tapi_netperf_app_client_t** client, tapi_netperf_app_server_t** server);
te_errno tapi_netperf_start_client(tapi_netperf_app_client_t* app);
te_errno tapi_netperf_start_server(tapi_netperf_app_server_t* app);
te_errno tapi_netperf_start(tapi_netperf_app_client_t* client, tapi_netperf_app_server_t* server);
te_errno tapi_netperf_wait_client(tapi_netperf_app_client_t* app, int timeout_ms);
te_errno tapi_netperf_wait_server(tapi_netperf_app_server_t* app, int timeout_ms);
te_errno tapi_netperf_get_report(tapi_netperf_app_client_t* app, tapi_netperf_report* report);
te_errno tapi_netperf_kill_client(tapi_netperf_app_client_t* app, int signo);
te_errno tapi_netperf_kill_server(tapi_netperf_app_server_t* app, int signo);
te_errno tapi_netperf_kill(tapi_netperf_app_client_t* client, tapi_netperf_app_server_t* server, int signo);
te_errno tapi_netperf_destroy_client(tapi_netperf_app_client_t* app);
te_errno tapi_netperf_destroy_server(tapi_netperf_app_server_t* app);
te_errno tapi_netperf_mi_report(const tapi_netperf_report* report);
te_errno tapi_netperf_client_wrapper_add(tapi_netperf_app_client_t* app, const char* tool, const char** argv, tapi_job_wrapper_priority_t priority, tapi_job_wrapper_t** wrap);
te_errno tapi_netperf_client_add_sched_param(tapi_netperf_app_client_t* app, tapi_job_sched_param* sched_param);
te_errno tapi_nptcp_create(tapi_job_factory_t* factory_receiver, tapi_job_factory_t* factory_transmitter, const tapi_nptcp_opt* opt_receiver, const tapi_nptcp_opt* opt_transmitter, tapi_nptcp_app** app);
te_errno tapi_nptcp_start(tapi_nptcp_app* app);
te_errno tapi_nptcp_wait(tapi_nptcp_app* app, int timeout_ms);
te_errno tapi_nptcp_wait_receiver(tapi_nptcp_app* app, int timeout_ms);
te_errno tapi_nptcp_wait_transmitter(tapi_nptcp_app* app, int timeout_ms);
te_errno tapi_nptcp_get_report(tapi_nptcp_app* app, te_vec* report);
te_errno tapi_nptcp_kill_receiver(tapi_nptcp_app* app, int signum);
te_errno tapi_nptcp_kill_transmitter(tapi_nptcp_app* app, int signum);
te_errno tapi_nptcp_stop(tapi_nptcp_app* app);
te_errno tapi_nptcp_destroy(tapi_nptcp_app* app);
void tapi_nptcp_report_mi_log(te_mi_logger* logger, te_vec* report);
te_errno tapi_ping_create(tapi_job_factory_t* factory, const tapi_ping_opt* opt, tapi_ping_app** app);
te_errno tapi_ping_start(tapi_ping_app* app);
te_errno tapi_ping_wait(tapi_ping_app* app, int timeout_ms);
te_errno tapi_ping_kill(tapi_ping_app* app, int signum);
te_errno tapi_ping_stop(tapi_ping_app* app);
te_errno tapi_ping_destroy(tapi_ping_app* app);
te_errno tapi_ping_get_report(tapi_ping_app* app, tapi_ping_report* report);
void tapi_ping_report_mi_log(te_mi_logger* logger, tapi_ping_report* report);
typedef SLIST_HEAD(tapi_redis_benchmark_report, tapi_redis_benchmark_stat);
te_errno tapi_redis_benchmark_create(tapi_job_factory_t* factory, const tapi_redis_benchmark_opt* opt, tapi_redis_benchmark_app** app);
te_errno tapi_redis_benchmark_start(const tapi_redis_benchmark_app* app);
te_errno tapi_redis_benchmark_wait(const tapi_redis_benchmark_app* app, int timeout_ms);
te_errno tapi_redis_benchmark_stop(const tapi_redis_benchmark_app* app);
te_errno tapi_redis_benchmark_kill(const tapi_redis_benchmark_app* app, int signum);
te_errno tapi_redis_benchmark_destroy(tapi_redis_benchmark_app* app);
void tapi_redis_benchmark_destroy_report(tapi_redis_benchmark_report* entry);
te_errno tapi_redis_benchmark_get_report(tapi_redis_benchmark_app* app, tapi_redis_benchmark_report* report);
tapi_redis_benchmark_stat* tapi_redis_benchmark_report_get_stat(tapi_redis_benchmark_report* report, const char* test_name);
te_errno tapi_redis_benchmark_report_mi_log(te_mi_logger* logger, tapi_redis_benchmark_report* report);
te_errno tapi_redis_srv_create(tapi_job_factory_t* factory, tapi_redis_srv_opt* opt, tapi_redis_srv_app** app);
te_errno tapi_redis_srv_start(const tapi_redis_srv_app* app);
te_errno tapi_redis_srv_wait(const tapi_redis_srv_app* app, int timeout_ms);
te_errno tapi_redis_srv_stop(const tapi_redis_srv_app* app);
te_errno tapi_redis_srv_kill(const tapi_redis_srv_app* app, int signum);
te_errno tapi_redis_srv_destroy(tapi_redis_srv_app* app);
te_errno tapi_sfnt_pp_create_client(tapi_job_factory_t* factory, const tapi_sfnt_pp_opt* opt, tapi_sfnt_pp_app_client_t** app);
te_errno tapi_sfnt_pp_create_server(tapi_job_factory_t* factory, const tapi_sfnt_pp_opt* opt, tapi_sfnt_pp_app_server_t** app);
te_errno tapi_sfnt_pp_create(tapi_job_factory_t* client_factory, tapi_job_factory_t* server_factory, const tapi_sfnt_pp_opt* opt, tapi_sfnt_pp_app_client_t** client, tapi_sfnt_pp_app_server_t** server);
te_errno tapi_sfnt_pp_start_client(tapi_sfnt_pp_app_client_t* app);
te_errno tapi_sfnt_pp_start_server(tapi_sfnt_pp_app_server_t* app);
te_errno tapi_sfnt_pp_start(tapi_sfnt_pp_app_client_t* client, tapi_sfnt_pp_app_server_t* server);
te_errno tapi_sfnt_pp_wait_client(tapi_sfnt_pp_app_client_t* app, int timeout_ms);
te_errno tapi_sfnt_pp_wait_server(tapi_sfnt_pp_app_server_t* app, int timeout_ms);
te_errno tapi_sfnt_pp_get_report(tapi_sfnt_pp_app_client_t* app, tapi_sfnt_pp_report** report);
te_errno tapi_sfnt_pp_kill_client(tapi_sfnt_pp_app_client_t* app, int signo);
te_errno tapi_sfnt_pp_kill_server(tapi_sfnt_pp_app_server_t* app, int signo);
te_errno tapi_sfnt_pp_destroy_client(tapi_sfnt_pp_app_client_t* app);
te_errno tapi_sfnt_pp_destroy_server(tapi_sfnt_pp_app_server_t* app);
te_errno tapi_sfnt_pp_mi_report(const tapi_sfnt_pp_report* report);
te_errno tapi_sfnt_pp_client_wrapper_add(tapi_sfnt_pp_app_client_t* app, const char* tool, const char** argv, tapi_job_wrapper_priority_t priority, tapi_job_wrapper_t** wrap);
te_errno tapi_sfnt_pp_client_add_sched_param(tapi_sfnt_pp_app_client_t* app, tapi_job_sched_param* sched_param);
te_errno tapi_ssh_create_client(tapi_job_factory_t* factory, const tapi_ssh_client_opt* opt, tapi_ssh_t** client_app);
te_errno tapi_ssh_create_server(tapi_job_factory_t* factory, const tapi_ssh_server_opt* opt, tapi_ssh_t** server_app);
te_errno tapi_ssh_start_app(tapi_ssh_t* app);
te_errno tapi_ssh_wait_app(tapi_ssh_t* app, int timeout_ms);
te_errno tapi_ssh_kill_app(tapi_ssh_t* app, int signo);
te_errno tapi_ssh_destroy_app(tapi_ssh_t* app);
te_errno tapi_ssh_client_wrapper_add(tapi_ssh_t* app, const char* tool, const char** argv, tapi_job_wrapper_priority_t priority, tapi_job_wrapper_t** wrap);
te_errno tapi_stress_create(tapi_job_factory_t* factory, const tapi_stress_opt* opt, struct tapi_stress_app** app);
te_errno tapi_stress_start(struct tapi_stress_app* app);
te_errno tapi_stress_stop(struct tapi_stress_app* app, int timeout_ms);
void tapi_stress_destroy(struct tapi_stress_app* app);
te_errno tapi_trex_create(tapi_job_factory_t* factory, const tapi_trex_opt* opt, tapi_trex_app** app);
te_errno tapi_trex_start(const tapi_trex_app* app);
te_errno tapi_trex_wait(const tapi_trex_app* app, int timeout_ms);
te_errno tapi_trex_stop(const tapi_trex_app* app);
te_errno tapi_trex_kill(const tapi_trex_app* app, int signum);
te_errno tapi_trex_destroy(const char* ta, tapi_trex_app* app, tapi_trex_opt* opt);
te_errno tapi_trex_get_report(tapi_trex_app* app, tapi_trex_report* report);
te_errno tapi_trex_report_mi_log(const tapi_trex_report* report);
te_errno tapi_trex_destroy_report(tapi_trex_report* report);
void tapi_trex_port_stat_param_series_get(tapi_trex_report* report, tapi_trex_port_stat_enum param, unsigned int index, bool absolute_value, bool by_time, double** vals, unsigned int* n_vals);
static void tapi_trex_port_stat_time_series_get(tapi_trex_report* report, double** vals, unsigned int* n_vals);
static void tapi_trex_port_stat_param_series_by_time_get(tapi_trex_report* report, tapi_trex_port_stat_enum param, unsigned int index, double** vals, unsigned int* n_vals);
te_errno tapi_trex_port_stat_data_get(tapi_trex_report* report, tapi_trex_port_stat_enum param, unsigned int index, double time_start, double time_end, double* min, double* avg, double* median, double* max);
tapi_trex_interface* tapi_trex_interface_init_oid(bool use_kernel_interface, const char* oid_fmt, ...);
void tapi_trex_interface_free(tapi_trex_interface* interface);
te_errno tapi_wrk_create(tapi_job_factory_t* factory, const tapi_wrk_opt* opt, tapi_wrk_app** app);
te_errno tapi_wrk_start(tapi_wrk_app* app);
te_errno tapi_wrk_wait(tapi_wrk_app* app, int timeout_ms);
te_errno tapi_wrk_get_report(tapi_wrk_app* app, tapi_wrk_report* report);
te_errno tapi_wrk_kill(tapi_wrk_app* app, int signo);
te_errno tapi_wrk_destroy(tapi_wrk_app* app);
void tapi_wrk_report_mi_log(te_mi_logger* logger, const tapi_wrk_report* report);
char* tapi_upnp_get_st_uuid(const char* uuid);
char* tapi_upnp_get_st_device_type(const char* domain, const char* device_type);
char* tapi_upnp_get_st_service_type(const char* domain, const char* service_type);
static char* tapi_upnp_get_st_upnp_forum_device_type(const char* device_type);
static char* tapi_upnp_get_st_upnp_forum_service_type(const char* service_type);
void tapi_upnp_cd_tree_dfs(tapi_upnp_cd_container_node* container, cd_handler presearch, cd_handler postsearch, void* user_data);
static tapi_upnp_cd_container_node* tapi_upnp_cd_get_parent(const tapi_upnp_cd_container_node* container);
te_errno tapi_upnp_cd_get_root(rcf_rpc_server* rpcs, const tapi_upnp_service_info* service, tapi_upnp_cd_container_node* container);
te_errno tapi_upnp_cd_get_children(rcf_rpc_server* rpcs, const tapi_upnp_service_info* service, tapi_upnp_cd_container_node* container);
te_errno tapi_upnp_cd_get_tree(rcf_rpc_server* rpcs, const tapi_upnp_service_info* service, const char* path_filter, tapi_upnp_cd_container_node* container);
void tapi_upnp_cd_remove_container(tapi_upnp_cd_container_node* container);
void tapi_upnp_cd_remove_tree(tapi_upnp_cd_container_node* root);
void tapi_upnp_print_content_directory(const tapi_upnp_cd_container_node* container);
size_t tapi_upnp_cd_get_objects_count(const tapi_upnp_cd_container_node* container, tapi_upnp_cd_object_type type);
te_errno tapi_upnp_cp_start(const char* ta, const char* target, const char* iface);
te_errno tapi_upnp_cp_stop(const char* ta);
bool tapi_upnp_cp_started(const char* ta);
te_errno rpc_upnp_cp_connect(rcf_rpc_server* rpcs);
te_errno rpc_upnp_cp_disconnect(rcf_rpc_server* rpcs);
te_errno rpc_upnp_cp_action(rcf_rpc_server* rpcs, const void* request, size_t request_len, void** reply, size_t* reply_len);
SLIST_HEAD(tapi_upnp_devices, tapi_upnp_device_info);
const char* tapi_upnp_get_device_property(const tapi_upnp_device_info* device, te_upnp_device_property_idx property_idx);
static const char* tapi_upnp_get_device_udn(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_type(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_location(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_friendly_name(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_manufacturer(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_manufacturer_url(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_model_description(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_model_name(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_model_number(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_model_url(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_serial_number(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_upc(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_icon_url(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_presentation_url(const tapi_upnp_device_info* device);
te_errno tapi_upnp_get_device_info(rcf_rpc_server* rpcs, const char* name, tapi_upnp_devices* devices);
void tapi_upnp_free_device_info(tapi_upnp_devices* devices);
void tapi_upnp_print_device_info(const tapi_upnp_devices* devices);
SLIST_HEAD(tapi_upnp_media_uri, tapi_upnp_resources_uri_node);
te_errno tapi_upnp_resources_get_media_uri(tapi_upnp_cd_container_node* container, tapi_upnp_cd_resource_type type, tapi_upnp_media_uri* media);
void tapi_upnp_resources_free_media_uri(tapi_upnp_media_uri* media);
void tapi_upnp_print_resource_info(const tapi_upnp_cd_resource* res);
SLIST_HEAD(tapi_upnp_state_variables, tapi_upnp_state_variable);
SLIST_HEAD(tapi_upnp_action_arguments, tapi_upnp_argument);
SLIST_HEAD(tapi_upnp_actions, tapi_upnp_action);
SLIST_HEAD(tapi_upnp_services, tapi_upnp_service_info);
const char* tapi_upnp_get_state_variable_property_string(const tapi_upnp_state_variable* variable, te_upnp_state_variable_property_idx property_idx);
te_errno tapi_upnp_get_state_variable_property_boolean(const tapi_upnp_state_variable* variable, te_upnp_state_variable_property_idx property_idx, bool* value);
static const char* tapi_upnp_get_state_variable_name(const tapi_upnp_state_variable* variable);
static const char* tapi_upnp_get_state_variable_type(const tapi_upnp_state_variable* variable);
static te_errno tapi_upnp_get_state_variable_send_events(const tapi_upnp_state_variable* variable, bool* value);
static const char* tapi_upnp_get_state_variable_default_value(const tapi_upnp_state_variable* variable);
static const char* tapi_upnp_get_state_variable_minimum(const tapi_upnp_state_variable* variable);
static const char* tapi_upnp_get_state_variable_maximum(const tapi_upnp_state_variable* variable);
static const char* tapi_upnp_get_state_variable_step(const tapi_upnp_state_variable* variable);
const tapi_upnp_sv_allowed_values* tapi_upnp_get_state_variable_allowed(const tapi_upnp_state_variable* variable);
const char* tapi_upnp_get_service_property_string(const tapi_upnp_service_info* service, te_upnp_service_property_idx property_idx);
static const char* tapi_upnp_get_service_id(const tapi_upnp_service_info* service);
static const char* tapi_upnp_get_service_udn(const tapi_upnp_service_info* service);
static const char* tapi_upnp_get_service_type(const tapi_upnp_service_info* service);
static const char* tapi_upnp_get_service_location(const tapi_upnp_service_info* service);
static const char* tapi_upnp_get_service_scpd_url(const tapi_upnp_service_info* service);
static const char* tapi_upnp_get_service_control_url(const tapi_upnp_service_info* service);
static const char* tapi_upnp_get_service_event_subscription_url(const tapi_upnp_service_info* service);
static const char* tapi_upnp_get_argument_name(const tapi_upnp_argument* argument);
static te_upnp_arg_direction tapi_upnp_get_argument_direction(const tapi_upnp_argument* argument);
static const tapi_upnp_state_variable* tapi_upnp_get_argument_variable(const tapi_upnp_argument* argument);
static const char* tapi_upnp_get_argument_value(const tapi_upnp_argument* argument);
te_errno tapi_upnp_set_argument_value(tapi_upnp_argument* argument, const char* value);
te_errno tapi_upnp_get_service_info(rcf_rpc_server* rpcs, tapi_upnp_device_info* device, const char* service_id, tapi_upnp_services* services);
void tapi_upnp_free_service_info(tapi_upnp_services* services);
te_errno tapi_upnp_invoke_action(rcf_rpc_server* rpcs, const tapi_upnp_service_info* service, tapi_upnp_action* action);
void tapi_upnp_print_service_info(const tapi_upnp_services* services);
te_errno tapi_wpa_cli(rcf_rpc_server* rpcs, const char* ifname, const char* command[], int timeout_ms);
void tapi_wpa_supplicant_security_init_simple(tapi_wifi_policy policy, const char* passphrase, tapi_wpa_supplicant_security* security);
void tapi_wpa_supplicant_security_init(tapi_wifi_policy policy, tapi_wifi_key_mgmt key_mgmt, tapi_wifi_cipher pairwise_cipher, tapi_wifi_cipher group_cipher, tapi_wifi_pmf pmf, tapi_wifi_pmf ieee80211w, const char* passphrase, tapi_wpa_supplicant_security* security);
void tapi_wpa_supplicant_security_clone(tapi_wpa_supplicant_security* to, const tapi_wpa_supplicant_security* from);
void tapi_wpa_supplicant_security_free(tapi_wpa_supplicant_security* security);
te_errno tapi_wpa_supplicant_configure(const char* ta, const char* ifname, const uint8_t* bssid, const char* ssid, tapi_wpa_supplicant_security* security, bool scan_ssid, const char* opts_fmt, ...);
te_errno te_errno tapi_wpa_supplicant_configure_va(const char* ta, const char* ifname, const uint8_t* bssid, const char* ssid, tapi_wpa_supplicant_security* security, bool scan_ssid, const char* opts_fmt, va_list ap);
te_errno tapi_wpa_supplicant_reset(const char* ta, const char* ifname);
te_errno tapi_wpa_supplicant_start(const char* ta, const char* ifname);
te_errno tapi_wpa_supplicant_stop(const char* ta, const char* ifname);
te_errno tapi_wpa_supplicant_get_status(const char* ta, const char* ifname, tapi_wpa_supplicant_status* status);
void te_log_bufs_cleanup(void);
te_string* te_log_str_alloc(void);
te_errno te_args2te_str(te_string* str, int argc, const char** argv);
te_errno te_bit_mask2te_str(te_string* str, unsigned long long bit_mask, const te_bit2str* map);
te_errno te_extended_bit_mask2te_str(te_string* str, unsigned long long bit_mask, const te_bit2str* bm, const te_flag2str* fm);
te_log_buf* te_log_buf_alloc(void);
int te_log_buf_append(te_log_buf* buf, const char* fmt, ...);
const char* te_log_buf_get(te_log_buf* buf);
void te_log_buf_free(te_log_buf* buf);
const char* te_args2log_buf(te_log_buf* buf, int argc, const char** argv);
const char* te_bit_mask2log_buf(te_log_buf* buf, unsigned long long bit_mask, const struct te_log_buf_bit2str* map);
const char* te_extended_bit_mask2log_buf(te_log_buf* buf, unsigned long long bit_mask, const struct te_log_buf_bit2str* bm, const struct te_log_buf_flag2str* fm);
const char* te_ether_addr2log_buf(te_log_buf* buf, const uint8_t* mac_addr);
static bool te_alloc_adjust_extent(size_t total_length, size_t offset, size_t* extent);
void* te_alloc_internal(size_t size, bool initialize, const char* filename, int line);
void* te_realloc_internal(void* oldptr, size_t newsize, const char* filename, int line);
static bool te_is_valid_alloc(size_t nmemb, size_t size);
void* te_memdup_internal(const void* src, bool zero_terminated, size_t maxsize, const char* filename, int line);
te_errno te_compile_buf_pattern(const char* spec, uint8_t* storage, size_t max_size, te_buf_pattern* pattern);
void te_fill_pattern_buf(void* buf, size_t len, const te_buf_pattern* pattern);
void* te_make_pattern_buf(size_t min, size_t max, size_t* p_len, const te_buf_pattern* pattern);
te_errno te_fill_spec_buf(void* buf, size_t len, const char* spec);
void* te_make_spec_buf(size_t min, size_t max, size_t* p_len, const char* spec);
static void te_fill_buf(void* buf, size_t len);
static void* te_make_buf(size_t min, size_t max, size_t* p_len);
static void* te_make_buf_by_len(size_t len);
static void* te_make_buf_min(size_t min, size_t* p_len);
static void te_fill_printable_buf(void* buf, size_t len);
static char* te_make_printable_buf(size_t min, size_t max, size_t* p_len);
static char* te_make_printable_buf_by_len(size_t len);
void* te_calloc_fill(size_t num, size_t size, int byte);
bool te_compare_bufs(const void* exp_buf, size_t exp_len, unsigned int n_copies, const void* actual_buf, size_t actual_len, unsigned int log_level);
static void te_dbuf_reset(te_dbuf* dbuf);
te_errno te_dbuf_append(te_dbuf* dbuf, const void* data, size_t data_len);
te_errno te_dbuf_expand(te_dbuf* dbuf, size_t n);
void te_dbuf_cut(te_dbuf* dbuf, size_t start_index, size_t count);
void te_dbuf_free(te_dbuf* dbuf);
void te_dbuf_print(const te_dbuf* dbuf);
int te_enum_map_from_str(const te_enum_map map[], const char* name, int unknown_val);
const char* te_enum_map_from_any_value(const te_enum_map map[], int value, const char* unknown);
static const char* te_enum_map_from_value(const te_enum_map map[], int value);
int te_enum_parse_longest_match(const te_enum_map map[], int defval, bool exact_match, const char* str, char** next);
void te_enum_map_fill_by_conversion(te_enum_map map[], int minval, int maxval, const char*(*)(int val) val2str);
pid_t te_exec_child(const char* file, char*const argv[], char*const envp[], uid_t uid, int* in_fd, int* out_fd, int* err_fd, const te_exec_param* exec_param);
te_errno te_string_expand_parameters(const char* src, te_expand_param_func expand_param, const void* ctx, te_string* dest);
te_errno te_string_expand_env_vars(const char* src, const char* posargs[TE_EXPAND_MAX_POS_ARGS], te_string* dest);
te_errno te_string_expand_kvpairs(const char* src, const char* posargs[TE_EXPAND_MAX_POS_ARGS], const te_kvpair_h* kvpairs, te_string* dest);
te_errno te_expand_parameters(const char* src, const char** posargs, te_param_value_getter get_param_value, const void* params_ctx, char** retval);
static te_errno te_expand_env_vars(const char* src, const char** posargs, char** retval);
static te_errno te_expand_kvpairs(const char* src, const char** posargs, const te_kvpair_h* kvpairs, char** retval);
char* te_basename(const char* pathname);
char* te_readlink_fmt(const char* path_fmt, ...);
char char* te_dirname(const char* pathname);
char* te_file_join_filename(te_string* dest, const char* dirname, const char* path, const char* suffix);
int te_file_create_unique_fd_va(char** filename, const char* prefix_format, const char* suffix, va_list ap);
int te_file_create_unique_fd(char** filename, const char* prefix_format, const char* suffix, ...);
int char* te_file_create_unique(const char* prefix_format, const char* suffix, ...);
int char FILE* te_fopen_fmt(const char* mode, const char* path_fmt, ...);
int char FILE pid_t te_file_read_pid(const char* pid_path);
te_errno te_file_resolve_pathname_vec(const char* filename, const te_vec* pathvec, int mode, char** resolved);
te_errno te_file_resolve_pathname(const char* filename, const char* path, int mode, const char* basename, char** resolved);
te_errno te_file_check_executable(const char* path);
te_errno te_access_fmt(int mode, const char* fmt, ...);
te_errno te_errno te_unlink_fmt(const char* fmt, ...);
te_errno te_errno te_errno te_file_read_string(te_string* dest, bool binary, size_t maxsize, const char* path_fmt, ...);
te_errno te_errno te_errno te_errno te_file_write_string(const te_string* src, size_t fitlen, int flags, mode_t mode, const char* path_fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_file_read_text(const char* path, char* buffer, size_t bufsize);
te_errno te_file_scandir(const char* dirname, te_file_scandir_callback* callback, void* data, const char* pattern_fmt, ...);
te_errno char* te_file_extract_glob(const char* filename, const char* pattern, bool basename);
te_errno te_log_vprintf_old(struct te_log_out_params* param, const char* fmt, va_list ap);
void te_hex_diff_dump(const void* expected, size_t exp_len, const void* actual, size_t actual_len, size_t offset, te_string* dest);
void te_hex_diff_log(const void* expected, size_t exp_len, const void* actual, size_t actual_len, size_t offset, const char* file, int line, unsigned int level, const char* entity, const char* user);
te_errno te_intset_generic_parse(const te_intset_ops* ops, int minval, int maxval, const char* str, void* val);
char* te_intset_generic2string(const te_intset_ops* ops, int minval, int maxval, const void* val);
bool te_intset_generic_is_subset(const te_intset_ops* ops, int minval, int maxval, const void* subset, const void* superset);
void te_intset_generic_add_range(const te_intset_ops* ops, void* val, int first, int last);
void te_intset_generic_remove_range(const te_intset_ops* ops, void* val, int first, int last);
static te_errno te_bits_parse(const char* str, uint64_t* val);
static char* te_bits2string(uint64_t val);
static void te_charset_clear(te_charset* cset);
static void te_charset_add_range(te_charset* cset, uint8_t minbyte, uint8_t maxbyte);
static void te_charset_remove_range(te_charset* cset, uint8_t minbyte, uint8_t maxbyte);
static bool te_charset_check(const te_charset* cset, uint8_t byte);
void te_charset_add_from_string(te_charset* cset, const char* str);
void te_charset_get_bytes(const te_charset* cset, uint8_t buf[static UINT8_MAX+1]);
bool te_charset_check_bytes(const te_charset* cset, size_t len, const uint8_t* bytes);
static te_errno te_fdset_parse(const char* str, fd_set* fdset);
static char* te_fdset2string(int nfds, const fd_set* fdset);
static bool te_fdset_is_subset(int nfds, const fd_set* sub, const fd_set* super);
te_errno te_ipstack_calc_l4_cksum(const struct sockaddr* ip_dst_addr, const struct sockaddr* ip_src_addr, const uint8_t next_hdr, const uint8_t* datagram, const size_t datagram_len, uint16_t* cksum_out);
te_errno te_ipstack_prepare_raw_tcpv4_packet(uint8_t* raw_packet, ssize_t* total_size, bool remove_vlan_hdr, struct sockaddr_ll* sadr_ll);
te_errno te_ipstack_mirror_udp_packet(uint8_t* pkt, size_t len);
static int iscsi_logout_resp_str2int(const char* resp);
void te_json_add_simple(te_json_ctx_t* ctx, const char* fmt, ...);
static void static void te_json_add_null(te_json_ctx_t* ctx);
static void te_json_add_bool(te_json_ctx_t* ctx, bool val);
static void te_json_add_integer(te_json_ctx_t* ctx, intmax_t val);
static void te_json_add_float(te_json_ctx_t* ctx, double val, int precision);
void te_json_add_string(te_json_ctx_t* ctx, const char* fmt, ...);
void void te_json_start_string(te_json_ctx_t* ctx);
void te_json_append_string(te_json_ctx_t* ctx, const char* fmt, ...);
void void te_json_append_string_va(te_json_ctx_t* ctx, const char* fmt, va_list args);
void te_json_start_raw(te_json_ctx_t* ctx);
void te_json_append_raw(te_json_ctx_t* ctx, const char* value, size_t len);
void te_json_start_array(te_json_ctx_t* ctx);
void te_json_start_object(te_json_ctx_t* ctx);
void te_json_end(te_json_ctx_t* ctx);
void te_json_add_key(te_json_ctx_t* ctx, const char* key);
static void te_json_add_key_str(te_json_ctx_t* ctx, const char* key, const char* val);
static void te_json_add_key_enum(te_json_ctx_t* ctx, const te_enum_map* map, const char* key, int val);
void te_json_add_array_str(te_json_ctx_t* ctx, bool skip_null, size_t n_strs, const char* strs[n_strs]);
void te_json_add_kvpair(te_json_ctx_t* ctx, const te_kvpair_h* head);
int map_name_to_level(const char* name);
int te_get_host_addrs(const char* host_name, struct sockaddr_in* host_ipv4, bool* ipv4_found, struct sockaddr_in6* host_ipv6, bool* ipv6_found);
int log_serial(void* ready, int argc, char* argv[]);
void te_kernel_log_set_system_func(void* p);
int te_open_conserver(const char* conserver);
typedef TAILQ_HEAD(te_kvpair_h, te_kvpair);
void te_kvpair_init(te_kvpair_h* head);
void te_kvpair_fini(te_kvpair_h* head);
void te_kvpair_push(te_kvpair_h* head, const char* key, const char* value_fmt, ...);
void void te_kvpair_push_va(te_kvpair_h* head, const char* key, const char* value_fmt, va_list ap);
te_errno te_kvpair_add(te_kvpair_h* head, const char* key, const char* value_fmt, ...);
te_errno te_errno te_kvpair_add_va(te_kvpair_h* head, const char* key, const char* value_fmt, va_list ap);
te_errno te_kvpairs_del(te_kvpair_h* head, const char* key);
te_errno te_kvpairs_del_all(te_kvpair_h* head, const char* key);
void te_kvpairs_copy(te_kvpair_h* dest, const te_kvpair_h* src);
void te_kvpairs_copy_key(te_kvpair_h* dest, const te_kvpair_h* src, const char* key);
const char* te_kvpairs_get_nth(const te_kvpair_h* head, const char* key, unsigned int index);
static const char* te_kvpairs_get(const te_kvpair_h* head, const char* key);
te_errno te_kvpairs_get_all(const te_kvpair_h* head, const char* key, te_vec* result);
unsigned int te_kvpairs_count(const te_kvpair_h* head, const char* key);
bool te_kvpairs_has_kv(const te_kvpair_h* head, const char* key, const char* value);
bool te_kvpairs_is_submap(const te_kvpair_h* submap, const te_kvpair_h* supermap);
te_errno te_kvpairs_foreach(const te_kvpair_h* head, te_kvpairs_iter_fn* callback, const char* key, void* user);
te_errno te_kvpair_to_str_gen(const te_kvpair_h* head, const char* delim, te_string* str);
te_errno te_kvpair_to_str(const te_kvpair_h* head, te_string* str);
void te_kvpair_keys_to_str(const te_kvpair_h* head, const char* delim, te_string* str);
void te_kvpair_to_uri_query(const te_kvpair_h* head, te_string* str);
te_errno te_kvpair_from_str(const char* str, te_kvpair_h* head);
te_errno te_log_vprintf(te_log_msg_out* out, const char* fmt, va_list ap);
te_errno te_log_message_raw_va(te_log_msg_raw_data* data, te_log_ts_sec ts_sec, te_log_ts_usec ts_usec, te_log_level level, te_log_id log_id, const char* entity, const char* user, const char* fmt, va_list ap);
te_errno te_log_message_split(const char* file, unsigned int line, unsigned int level, const char* entity, const char* user, const char* fmt, ...);
void te_log_stack_init_here(const char* top);
void te_log_stack_push_under(const char* user, const char* fmt, ...);
char* te_log_stack_pop(void);
void te_log_stack_dump(te_log_level log_level);
void te_log_stack_maybe_reset(const char* here);
static void te_meas_stats_update_mean_and_tss(te_meas_stats_data_t* data, double new_datapoint);
static double te_meas_stats_get_var(const te_meas_stats_data_t* data);
static double te_meas_stats_get_deviation(const te_meas_stats_data_t* data);
static void te_meas_stats_update_cv(te_meas_stats_data_t* data);
static bool te_meas_stats_stab_is_stable(const te_meas_stats_stab_t* stab, const te_meas_stats_data_t* data);
static bool te_meas_stats_is_datapoint_correct(double datapoint, double mean, double deviation, double deviation_coeff);
static unsigned int te_meas_stats_sturges_rule(unsigned int num_datapoints);
static double te_meas_stats_value_deviation(double x, double y);
te_errno te_meas_stats_data_init(te_meas_stats_data_t* data, unsigned int max_num_datapoints);
void te_meas_stats_data_free(te_meas_stats_data_t* data);
te_errno te_meas_stats_stab_init(te_meas_stats_stab_t* stab, te_meas_stats_data_t* data, unsigned int min_num_datapoints, double req_cv, unsigned int allowed_skips, double deviation_coeff);
void te_meas_stats_stab_free(te_meas_stats_stab_t* stab);
te_errno te_meas_stats_init(te_meas_stats_t* meas_stats, unsigned int max_num_datapoints, int flags, unsigned int min_num_datapoints, double req_cv, unsigned int allowed_skips, double deviation_coeff);
void te_meas_stats_free(te_meas_stats_t* meas_stats);
void te_meas_stats_summary_free(te_meas_stats_summary_t* summary);
te_meas_stats_update_code te_meas_stats_stab_update(te_meas_stats_stab_t* stab, te_meas_stats_data_t* data, double new_datapoint);
te_meas_stats_update_code te_meas_stats_update(te_meas_stats_t* meas_stats, double new_datapoint);
void te_mi_logger_add_comment(te_mi_logger* logger, te_errno* retval, const char* name, const char* value_fmt, ...);
void void te_mi_logger_reset(te_mi_logger* logger);
te_errno te_mi_logger_flush(te_mi_logger* logger);
void te_mi_logger_destroy(te_mi_logger* logger);
te_errno te_mi_logger_meas_create(const char* tool, te_mi_logger** logger);
te_errno te_mi_log_meas(const char* tool, const te_mi_meas* measurements, const te_mi_log_kvpair* keys, const te_mi_log_kvpair* comments);
void te_mi_logger_add_meas(te_mi_logger* logger, te_errno* retval, te_mi_meas_type type, const char* name, te_mi_meas_aggr aggr, double val, te_mi_meas_multiplier multiplier);
void te_mi_logger_add_meas_obj(te_mi_logger* logger, te_errno* retval, const te_mi_meas* meas);
void te_mi_logger_add_meas_vec(te_mi_logger* logger, te_errno* retval, const te_mi_meas* measurements);
void te_mi_logger_add_meas_key(te_mi_logger* logger, te_errno* retval, const char* key, const char* value_fmt, ...);
void te_mi_logger_add_meas_view(te_mi_logger* logger, te_errno* retval, te_mi_meas_view_type type, const char* name, const char* title);
void te_mi_logger_meas_graph_axis_add(te_mi_logger* logger, te_errno* retval, te_mi_meas_view_type view_type, const char* view_name, te_mi_graph_axis axis, te_mi_meas_type meas_type, const char* meas_name);
static void te_mi_logger_meas_graph_axis_add_name(te_mi_logger* logger, te_errno* retval, te_mi_meas_view_type view_type, const char* view_name, te_mi_graph_axis axis, const char* meas_name);
static void te_mi_logger_meas_graph_axis_add_type(te_mi_logger* logger, te_errno* retval, te_mi_meas_view_type view_type, const char* view_name, te_mi_graph_axis axis, te_mi_meas_type meas_type);
void te_mi_logger_meas_point_add(te_mi_logger* logger, te_errno* retval, const char* view_name, te_mi_meas_type meas_type, const char* meas_name, te_mi_meas_aggr meas_aggr);
uintmax_t te_scalar_type_max(te_scalar_type type);
intmax_t te_scalar_type_min(te_scalar_type type);
size_t te_scalar_type_sizeof(te_scalar_type type);
bool te_scalar_type_is_signed(te_scalar_type type);
te_errno te_scalar_type_fit_size(bool is_signed, size_t size, te_scalar_type* type);
te_errno te_scalar_dynamic_cast(te_scalar_type src_type, const void* src, te_scalar_type dst_type, void* dst);
te_errno te_double2int_safe(long double val, intmax_t lim, intmax_t* result);
te_errno te_double2uint_safe(long double val, uintmax_t max, uintmax_t* result);
const char* te_pci_class_id2str(unsigned int class);
unsigned int te_pci_class_str2id(const char* label);
const char* te_pci_subclass_id2str(unsigned int subclass);
unsigned int te_pci_subclass_str2id(const char* label);
const char* te_pci_progintf_id2str(unsigned int progintf);
unsigned int te_pci_progintf_str2id(const char* label);
static unsigned int te_pci_subclass2class(unsigned int subclass);
static unsigned int te_pci_subclass_default(unsigned int class);
static unsigned int te_pci_progintf2subclass(unsigned int progintf);
static unsigned int te_pci_progintf_default(unsigned int subclass);
static unsigned int te_pci_progintf2class(unsigned int progintf);
int te_rand_range_exclude(int min, int max, int exclude);
te_errno te_ring_put(te_ring* ring, const void* element);
te_errno te_ring_get(te_ring* ring, void* element);
const void* te_ring_peek(const te_ring* ring);
size_t te_ring_copy(const te_ring* ring, size_t count, te_vec* dest);
size_t te_ring_put_many(te_ring* ring, size_t count, const void* elements);
size_t te_ring_get_many(te_ring* ring, size_t count, te_vec* dest);
void te_ring_resize(te_ring* ring, size_t new_ring_size);
void te_ring_free(te_ring* ring);
te_errno ta_unix_serial_console_init(void);
te_errno ta_unix_serial_console_cleanup(void);
SLIST_HEAD(serial_pattern_h_t, serial_pattern_t);
SLIST_HEAD(serial_event_h_t, serial_event_t);
te_errno ta_unix_serial_parser_init(void);
te_errno ta_unix_serial_parser_cleanup(void);
int te_serial_parser(serial_parser_t* parser);
int te_serial_parser_connect(serial_parser_t* parser);
pid_t te_shell_cmd(const char* cmd, uid_t uid, int* in_fd, int* out_fd, int* err_fd);
int map_name_to_signo(const char* name);
char* map_signo_to_name(int signo);
static void te_sleep(unsigned int to_sleep);
static void te_motivated_usleep(unsigned int to_sleep, const char* why);
static void te_motivated_msleep(unsigned int to_sleep, const char* why);
static void te_motivated_sleep(unsigned int to_sleep, const char* why);
static void te_msleep(unsigned int to_sleep);
static void te_usleep(unsigned int to_sleep);
static bool te_sockaddr_is_af_supported(int af);
void te_sockaddr_clear_port(struct sockaddr* addr);
uint16_t* te_sockaddr_get_port_ptr(const struct sockaddr* addr);
static uint16_t te_sockaddr_get_port(const struct sockaddr* addr);
void te_sockaddr_set_port(struct sockaddr* addr, uint16_t port);
void* te_sockaddr_get_netaddr(const struct sockaddr* addr);
const char* te_sockaddr_get_ipstr(const struct sockaddr* addr);
char* te_ip2str(const struct sockaddr* addr);
te_errno te_ip_addr2te_str(te_string* str, const void* ip_addr, int af);
te_errno te_mac_addr2te_str(te_string* str, const uint8_t* mac_addr);
int te_sockaddr_set_netaddr(struct sockaddr* addr, const void* net_addr);
void te_sockaddr_set_wildcard(struct sockaddr* addr);
void te_sockaddr_set_loopback(struct sockaddr* addr);
void te_sockaddr_set_multicast(struct sockaddr* addr);
bool te_sockaddr_is_wildcard(const struct sockaddr* addr);
bool te_sockaddr_is_multicast(const struct sockaddr* addr);
size_t te_sockaddr_get_size_by_af(int af);
size_t te_sockaddr_get_size(const struct sockaddr* addr);
te_errno te_sockaddr_mask_by_prefix(struct sockaddr* mask, socklen_t masklen, int af, unsigned int prefix);
te_errno te_sockaddr_cleanup_to_prefix(struct sockaddr* addr, unsigned int prefix);
int te_sockaddrcmp(const struct sockaddr* a1, socklen_t a1len, const struct sockaddr* a2, socklen_t a2len);
int te_sockaddrcmp_no_ports(const struct sockaddr* a1, socklen_t a1len, const struct sockaddr* a2, socklen_t a2len);
int te_sockaddrncmp(const struct sockaddr* a1, socklen_t a1len, const struct sockaddr* a2, socklen_t a2len);
te_errno te_sockaddr2str_buf(const struct sockaddr* sa, char* buf, size_t len);
const char* te_sockaddr2str(const struct sockaddr* sa);
te_errno te_sockaddr_h2str_buf(const struct sockaddr* sa, char* buf, size_t len);
te_errno te_sockaddr_h2str(const struct sockaddr* sa, char** string);
te_errno te_sockaddr_str2h(const char* string, struct sockaddr* sa);
size_t te_netaddr_get_size(int af);
size_t te_netaddr_get_bitsize(int af);
te_errno te_netaddr2te_str(const struct sockaddr* sa, te_string* str);
void te_mreq_set_mr_multiaddr(int af, void* mreq, const void* addr);
void te_mreq_set_mr_interface(int af, void* mreq, const void* addr);
void te_mreq_set_mr_ifindex(int af, void* mreq, int ifindex);
te_errno te_sockaddr_netaddr_from_string(const char* addr_str, struct sockaddr* addr);
const char* te_sockaddr_netaddr_to_string(int af, const void* net_addr);
te_errno te_sockaddr_ip4_to_ip6_mapped(struct sockaddr* addr);
te_errno te_stopwatch_start(te_stopwatch_t* stopwatch);
te_errno te_stopwatch_stop(te_stopwatch_t* stopwatch, struct timeval* lap);
static bool te_str_is_null_or_empty(const char* str);
static const char* te_str_empty_if_null(const char* str);
bool te_str_is_equal_nospace(const char* str1, const char* str2);
char* te_str_upper(const char* src);
char* te_str_lower(const char* src);
char* te_str_concat(const char* first, const char* second);
size_t te_strlcpy(char* dst, const char* src, size_t size);
size_t te_strlcat(char* dst, const char* src, size_t size);
te_errno te_strlcpy_safe(char* dst, const char* src, size_t size);
char* te_strlcpy_verbose(const char* id, char* dst, const char* src, size_t size);
char* te_snprintf_verbose(const char* id, char* dst, size_t size, const char* fmt, ...);
te_errno te_vsnprintf(char* dst, size_t size, const char* fmt, va_list ap);
te_errno te_snprintf(char* dst, size_t size, const char* fmt, ...);
te_errno char* te_str_strip_spaces(const char* str);
static const char* te_str_strip_prefix(const char* str, const char* prefix);
size_t te_str_common_prefix(const char* str1, const char* str2);
te_errno te_strpbrk_balanced(const char* str, char opening, char closing, char escape, const char* seps, const char** result);
te_errno te_strpbrk_rev_balanced(const char* str, char opening, char closing, char escape, const char* seps, const char** result);
te_errno te_strtoumax(const char* str, int base, uintmax_t* value);
te_errno te_strtou_size(const char* str, int base, void* value, size_t size);
te_errno te_strtoi_size(const char* str, int base, void* value, size_t size);
te_errno te_strtoimax(const char* str, int base, intmax_t* value);
te_errno te_str_to_uint64(const char* str, int base, uint64_t* value);
te_errno te_strtoul(const char* str, int base, unsigned long int* value);
te_errno te_strtoi(const char* str, int base, int* value);
te_errno te_strtoui(const char* str, int base, unsigned int* value);
te_errno te_strtol_raw(const char* input, char** endptr, int base, long int* result);
te_errno te_strtol_raw_silent(const char* str, char** endptr, int base, long int* result);
te_errno te_strtol_silent(const char* input, int base, long int* result);
te_errno te_strtol(const char* input, int base, long int* result);
te_errno te_strtol_bool(const char* input, bool* bresult);
te_errno te_strtoi_range_raw(const char* input, int minval, int maxval, char** endptr, int base, int* result);
te_errno te_strtod_raw(const char* str, char** endptr, double* result);
te_errno te_strtod(const char* str, double* result);
te_errno te_str_hex_raw2str(const uint8_t* data, size_t data_len, te_string* str);
te_errno te_str_hex_str2raw(const char* str, uint8_t* data, size_t data_len);
te_errno te_str_find_index(const char* str, const char** str_array, unsigned int str_array_len, unsigned int* index);
char** te_str_make_array(const char* fst, ...);
void te_str_free_array(char** str);
te_errno te_str_compare_versions(const char* v1, const char* v2, int* res);
static void te_string_reset(te_string* str);
static void te_string_move(char** dest, te_string* src);
te_errno te_string_reserve(te_string* str, size_t size);
static const char* te_string_value(const te_string* str);
te_errno te_string_append(te_string* str, const char* fmt, ...);
te_errno te_string_append_va(te_string* str, const char* fmt, va_list ap);
te_errno te_string_append_chk(te_string* str, const char* fmt, ...);
te_errno te_string_append_va_chk(te_string* str, const char* fmt, va_list ap);
te_errno te_string_append_buf(te_string* str, const char* buf, size_t len);
te_errno te_string_append_shell_args_as_is(te_string* str, ...);
te_errno te_string_append_shell_arg_as_is(te_string* str, const char* arg);
void te_string_append_escape_uri(te_string* str, te_string_uri_escape_mode mode, const char* arg);
te_errno te_string_join_vec(te_string* str, const te_vec* strvec, const char* sep);
void te_string_join_uri_path(te_string* str, const te_vec* strvec);
void te_string_build_uri(te_string* str, const char* scheme, const char* userinfo, const char* host, uint16_t port, const char* path, const char* query, const char* frag);
void te_string_generic_escape(te_string* str, const char* input, const char* esctable[static UINT8_MAX+1], te_string_generic_escape_fn* ctrl_esc, te_string_generic_escape_fn* nonascii_esc);
void te_string_encode_base64(te_string* str, size_t len, const uint8_t bytes[len], bool url_safe);
te_errno te_string_decode_base64(te_string* str, const char* base64str);
char* te_string_fmt_va(const char* fmt, va_list ap);
char* te_string_fmt(const char* fmt, ...);
char void te_string_cut(te_string* str, size_t len);
void te_string_cut_beginning(te_string* str, size_t len);
void te_string_chop(te_string* str, const char* trail);
void te_string_add_centered(te_string* str, const char* src, size_t padlen, char padchar);
te_errno te_string_process_lines(te_string* buffer, bool complete_lines, te_string_line_handler_fn* callback, void* user_data);
void te_string_free(te_string* str);
char* raw2string(const uint8_t* data, size_t size);
static bool te_substring_is_valid(const te_substring_t* substr);
void te_substring_find(te_substring_t* substr, const char* str);
te_errno te_substring_replace(te_substring_t* substr, const char* str);
void te_substring_advance(te_substring_t* substr);
void te_substring_limit(te_substring_t* substr, const te_substring_t* limit);
te_errno te_string_replace_all_substrings(te_string* str, const char* new, const char* old);
te_errno te_string_replace_substring(te_string* str, const char* new, const char* old);
char* te_time_current_date2str(void);
te_errno te_gettimeofday(struct timeval* tv, struct timezone* tz);
void te_timersub(const struct timeval* a, const struct timeval* b, struct timeval* res);
te_errno te_timer_start(te_timer_t* timer, unsigned int timeout_s);
te_errno te_timer_restart(te_timer_t* timer, unsigned int timeout_s);
te_errno te_timer_stop(te_timer_t* timer);
te_errno te_timer_expired(te_timer_t* timer);
uint32_t te_toeplitz_hash_data(const te_toeplitz_hash_cache* toeplitz_hash_cache, const uint8_t* input, unsigned int pos, unsigned int datalen);
uint32_t te_toeplitz_hash(const te_toeplitz_hash_cache* toeplitz_hash_cache, unsigned int addr_size, const uint8_t* src_addr, uint16_t src_port, const uint8_t* dst_addr, uint16_t dst_port);
te_errno te_toeplitz_hash_sa(const te_toeplitz_hash_cache* toeplitz_hash_cache, const struct sockaddr* src_addr, const struct sockaddr* dst_addr, te_toeplitz_hash_variant hash_var, uint32_t* hash_out);
uint32_t te_toeplitz_hash_sym_or_xor(const te_toeplitz_hash_cache* toeplitz_hash_cache, unsigned int addr_size, const uint8_t* src_addr, uint16_t src_port, const uint8_t* dst_addr, uint16_t dst_port);
void te_toeplitz_hash_fini(te_toeplitz_hash_cache* toeplitz_hash_cache);
te_toeplitz_hash_cache* te_toeplitz_cache_init(const uint8_t* key);
te_toeplitz_hash_cache* te_toeplitz_cache_init_size(const uint8_t* key, size_t key_size);
te_errno te_tree_get_int_attr(const te_tree* tree, const char* attr, intmax_t* result);
te_errno te_tree_get_float_attr(const te_tree* tree, const char* attr, double* result);
te_errno te_tree_get_bool_attr(const te_tree* tree, const char* attr, bool* result);
te_tree* te_tree_alloc(void);
void te_tree_free(te_tree* tree);
te_errno te_tree_add_attr_va(te_tree* tree, const char* attr, const char* value_fmt, va_list va);
te_errno te_tree_add_attr(te_tree* tree, const char* attr, const char* value_fmt, ...);
te_errno te_tree_add_attrs(te_tree* tree, const te_kvpair_h* attrs);
void te_tree_add_child(te_tree* tree, te_tree* child);
void te_tree_add_kvpair_children(te_tree* tree, const te_kvpair_h* kvpair);
te_tree* te_tree_make_typed(const char* name, const char* type, ...);
const char* te_tree_get_attr(const te_tree* tree, const char* attr);
const char* te_tree_get_type(const te_tree* tree);
bool te_tree_has_attr(const te_tree* tree, const char* attr, const char* value);
bool te_tree_has_attrs(const te_tree* tree, const te_kvpair_h* attrs);
const te_kvpair_h* te_tree_attrs(const te_tree* tree);
const te_tree* te_tree_parent(const te_tree* tree);
const te_tree* te_tree_root(const te_tree* tree);
unsigned int te_tree_level(const te_tree* tree);
const te_tree* te_tree_first_child(const te_tree* tree);
const te_tree* te_tree_last_child(const te_tree* tree);
unsigned int te_tree_count_children(const te_tree* tree);
const te_tree* te_tree_next(const te_tree* tree);
const te_tree* te_tree_prev(const te_tree* tree);
unsigned int te_tree_position(const te_tree* tree);
const te_tree* te_tree_leftmost_leaf(const te_tree* tree);
const te_tree* te_tree_rightmost_leaf(const te_tree* tree);
const te_tree* te_tree_left(const te_tree* tree);
const te_tree* te_tree_right(const te_tree* tree);
const te_tree* te_tree_left_leaf(const te_tree* tree);
const te_tree* te_tree_right_leaf(const te_tree* tree);
const te_tree* te_tree_nth_child(const te_tree* tree, unsigned int nth);
const te_tree* te_tree_child_by_attr(const te_tree* tree, const char* attr, const char* value);
const te_tree* te_tree_child_by_attrs(const te_tree* tree, const te_kvpair_h* attrs);
te_errno te_tree_traverse(const te_tree* tree, unsigned int minlevel, unsigned int maxlevel, te_tree_traverse_fn* pre_cb, te_tree_traverse_fn* post_cb, void* data);
te_tree* te_tree_map(const te_tree* tree, te_tree_map_fn* fn, void* data);
bool te_tree_validate_types(const te_tree* tree, bool allow_unknown, const te_tree** bad_node);
const char* te_unit_prefix2str(te_unit_prefix unit);
te_unit te_unit_pack(double value);
double te_unit_unpack(te_unit value);
te_unit te_unit_bin_pack(double value);
double te_unit_bin_unpack(te_unit value);
te_errno te_unit_from_string(const char* str, te_unit* value);
te_errno te_unit_list_value_from_string(const char* str, const te_unit_list* type, double* value);
void te_vec_set_destroy_fn_safe(te_vec* vec, te_vec_item_destroy_fn* destroy);
static size_t te_vec_size(const te_vec* vec);
static const void* te_vec_get_immutable(const te_vec* vec, size_t index);
static void* te_vec_get_mutable(te_vec* vec, size_t index);
static const void* te_vec_get_safe_immutable(const te_vec* vec, size_t index, size_t element_size);
static void* te_vec_get_safe_mutable(te_vec* vec, size_t index, size_t element_size);
te_errno te_vec_append(te_vec* vec, const void* element);
te_errno te_vec_append_vec(te_vec* vec, const te_vec* other);
te_errno te_vec_append_array(te_vec* vec, const void* elements, size_t count);
te_errno te_vec_append_str_fmt(te_vec* vec, const char* fmt, ...);
te_errno void* te_vec_replace(te_vec* vec, size_t index, const void* new_val);
void te_vec_transfer(te_vec* vec, size_t index, void* dest);
size_t te_vec_transfer_append(te_vec* vec, size_t start_index, size_t count, te_vec* dest_vec);
void te_vec_remove(te_vec* vec, size_t start_index, size_t count);
static void te_vec_remove_index(te_vec* vec, size_t index);
static te_errno te_vec_append_array_safe(te_vec* vec, const void* elements, size_t count, size_t element_size);
void te_vec_reset(te_vec* vec);
void te_vec_free(te_vec* vec);
void te_vec_deep_free(te_vec* vec);
te_errno te_vec_append_strarray(te_vec* vec, const char** elements);
static size_t te_vec_get_index(const te_vec* vec, const void* ptr);
te_errno te_vec_split_string(const char* str, te_vec* strvec, char sep, bool empty_is_none);
void te_vec_sort(te_vec* vec, int(*)(const void*elt1, const void*elt2) compar);
bool te_vec_search(const te_vec* vec, const void* key, int(*)(const void*key, const void*elt) compar, unsigned int* minpos, unsigned int* maxpos);
static const char* te_yaml_scalar_value(const yaml_node_t* node);
static bool te_yaml_value_is_true(const char* value);
typedef TAILQ_HEAD(tqh_strings, tqe_string);
void tq_strings_free(tqh_strings* head, void(*)(void*) value_free);
bool tq_strings_equal(const tqh_strings* s1, const tqh_strings* s2);
te_errno tq_strings_add_uniq_gen(tqh_strings* list, const char* value, bool duplicate);
te_errno tq_strings_add_uniq(tqh_strings* list, const char* value);
te_errno tq_strings_add_uniq_dup(tqh_strings* list, const char* value);
te_errno tq_strings_move(tqh_strings* dst, tqh_strings* src);
te_errno tq_strings_copy(tqh_strings* dst, const tqh_strings* src);
te_errno tq_strings_shallow_copy(tqh_strings* dst, const tqh_strings* src);
typedef TAILQ_HEAD(trc_test_iter_args_head, trc_test_iter_arg);
typedef TAILQ_HEAD(trc_exp_result_entry_head, trc_exp_result_entry);
te_errno trc_db_init(te_trc_db** p_trc_db);
te_errno trc_db_open(const char* location, te_trc_db** db);
te_errno trc_db_open_ext(const char* location, te_trc_db** db, int flags);
void trc_db_close(te_trc_db* trc_db);
te_trc_db_walker* trc_db_new_walker(te_trc_db* trc_db);
te_trc_db_walker* trc_db_walker_copy(const te_trc_db_walker* walker);
void trc_db_free_walker(te_trc_db_walker* walker);
bool trc_db_walker_is_iter(const te_trc_db_walker* walker);
bool trc_db_walker_step_test(te_trc_db_walker* walker, const char* test_name, bool force);
bool trc_db_walker_step_iter(te_trc_db_walker* walker, unsigned int n_args, trc_report_argument* args, uint32_t flags, unsigned int db_uid, func_args_match_ptr func_args_match);
void trc_db_walker_step_back(te_trc_db_walker* walker);
trc_db_walker_motion trc_db_walker_move(te_trc_db_walker* walker);
const trc_exp_result* trc_db_walker_get_exp_result(const te_trc_db_walker* walker, const tqh_strings* tags);
bool te_test_results_equal(const te_test_result* lhv, const te_test_result* rhv);
const trc_exp_result_entry* trc_is_result_expected(const trc_exp_result* expected, const te_test_result* obtained);
bool trc_is_exp_result_skipped(const trc_exp_result* result);
unsigned int trc_db_new_user(te_trc_db* db);
void trc_db_free_user(te_trc_db* db, unsigned int user_id);
void* trc_db_walker_get_user_data(const te_trc_db_walker* walker, unsigned int user_id);
void* trc_db_walker_get_parent_user_data(const te_trc_db_walker* walker, unsigned int user_id);
te_errno trc_db_walker_set_user_data(const te_trc_db_walker* walker, unsigned int user_id, void* user_data);
te_errno trc_db_walker_set_prop_ud(const te_trc_db_walker* walker, unsigned int user_id, void* user_data, void*(*)(void*, bool) data_gen);
void trc_db_walker_free_user_data(te_trc_db_walker* walker, unsigned int user_id, void(*)(void*) user_free);
te_errno trc_db_free_user_data(te_trc_db* db, unsigned int user_id, void(*)(void*) test_free, void(*)(void*) iter_free);
int trc_db_strcmp_tokens(const char* s1, const char* s2);
int trc_db_strcmp_normspace(const char* s1, const char* s2);
static te_errno trc_add_tag(tqh_strings* tags, const char* name);
typedef LIST_HEAD(trc_user_data);
typedef STAILQ_HEAD(trc_exp_results, trc_exp_result);
typedef TAILQ_HEAD(trc_files, trc_file);
void trc_db_test_update_path(trc_test* test);
trc_test* trc_db_new_test(trc_tests* tests, trc_test_iter* parent, const char* name);
trc_test_iter* trc_db_new_test_iter(trc_test* test, unsigned int n_args, trc_report_argument* args, trc_test_iter* insert_before);
void* trc_db_get_test_by_path(te_trc_db* db, char* path);
trc_exp_result_entry* trc_exp_result_entry_dup(trc_exp_result_entry* rentry);
trc_exp_result* trc_exp_result_dup(trc_exp_result* result);
const trc_exp_result* exp_defaults_get(te_test_status status);
trc_exp_results* trc_exp_results_dup(trc_exp_results* results);
void trc_exp_results_cpy(trc_exp_results* dest, trc_exp_results* src);
void trc_db_test_iter_res_cpy(trc_test_iter* dest, trc_test_iter* src);
void trc_db_test_iter_res_split(trc_test_iter* itr);
te_errno trc_verdict_to_xml(char* v, xmlNodePtr result_node);
te_errno trc_exp_result_entry_to_xml(trc_exp_result_entry* res_entry, xmlNodePtr results_node);
te_errno trc_exp_result_to_xml(trc_exp_result* exp_result, xmlNodePtr result_node, bool is_default);
te_errno trc_exp_results_to_xml(trc_exp_results* exp_results, xmlNodePtr node, bool insert_after);
te_errno get_expected_verdict(xmlNodePtr node, char** verdict);
te_errno get_expected_rentry(xmlNodePtr node, trc_exp_result_entry* rentry);
te_errno get_expected_result(xmlNodePtr node, trc_exp_result* result, bool tags_tolerate);
te_errno get_expected_results(xmlNodePtr* node, trc_exp_results* results);
te_errno get_test_args(xmlNodePtr* node, trc_test_iter_args* args);
te_errno trc_db_get_text_content(xmlNodePtr node, char** content);
te_errno trc_db_save(te_trc_db* db, const char* filename, int flags, int uid, bool(*)(void*, bool) to_save, char*(*)(void*, bool) set_user_attr, char* cmd);
void trc_db_free(te_trc_db* db);
void trc_remove_exp_results(te_trc_db* db);
void trc_free_trc_test(trc_test* test);
void trc_free_trc_tests(trc_tests* tests);
void trc_free_test_iter(trc_test_iter* iter);
void trc_free_test_iter_args_head(trc_test_iter_args_head* head);
void trc_free_test_iter_args(trc_test_iter_args* args);
void trc_test_iter_args_init(trc_test_iter_args* args);
te_errno trc_test_iter_args_copy(trc_test_iter_args* dst, trc_test_iter_args* src);
trc_test_iter_args* trc_test_iter_args_dup(trc_test_iter_args* args);
void trc_exp_result_entry_free(trc_exp_result_entry* rentry);
void trc_exp_result_free(trc_exp_result* result);
void trc_exp_results_free(trc_exp_results* results);
void trc_db_test_delete_wilds(trc_test* test);
void trc_db_walker_go_to_test(te_trc_db_walker* walker, trc_test* test);
trc_test* trc_db_walker_get_test(const te_trc_db_walker* walker);
trc_test_iter* trc_db_walker_get_iter(const te_trc_db_walker* walker);
trc_users_data* trc_db_walker_users_data(const te_trc_db_walker* walker);
trc_users_data* trc_db_walker_parent_users_data(const te_trc_db_walker* walker);
void* trc_db_test_get_user_data(const trc_test* test, unsigned int user_id);
void* trc_db_iter_get_user_data(const trc_test_iter* iter, unsigned int user_id);
te_errno trc_db_set_user_data(void* db_item, bool is_iter, unsigned int user_id, void* user_data);
te_errno trc_db_iter_set_user_data(trc_test_iter* iter, unsigned int user_id, void* user_data);
te_errno trc_db_test_set_user_data(trc_test* test, unsigned int user_id, void* user_data);
int test_iter_args_match(const trc_test_iter_args* db_args, unsigned int n_args, trc_report_argument* args, bool is_strict);
const trc_exp_result* trc_db_iter_get_exp_result(const trc_test_iter* iter, const tqh_strings* tags, bool last_match);
te_errno ta_unix_conf_upnp_cp_init(void);
te_errno ta_unix_conf_upnp_cp_release(void);
void ta_unix_conf_upnp_cp_set_socket_name(const char* ta_path);
const char* ta_unix_conf_upnp_cp_get_socket_name(void);
int te_upnp_cp(int argc, char* argv[]);
rgt_attrs_t* rgt_tmpls_attrs_new(const char** xml_attrs);
void rgt_tmpls_attrs_free(rgt_attrs_t* attrs);
rgt_attrs_t* rgt_tmpls_attrs_save(rgt_attrs_t* attrs);
void rgt_tmpls_attrs_saved_free(rgt_attrs_t* attrs);
void rgt_tmpls_attrs_add_fstr(rgt_attrs_t* attrs, const char* name, const char* fmt_str, ...);
void rgt_tmpls_attrs_set_fstr(rgt_attrs_t* attrs, const char* name, const char* fmt_str, ...);
void rgt_tmpls_attrs_add_uint32(rgt_attrs_t* attrs, const char* name, uint32_t val);
void rgt_tmpls_attrs_set_uint32(rgt_attrs_t* attrs, const char* name, uint32_t val);
const char* rgt_tmpls_xml_attrs_get(const char** attrs, const char* name);
int rgt_resource_files_prefix_get(const char* util_path, const char* argv0, size_t size, char* prefix);
int rgt_tmpls_parse(const char** files, const char* prefix, rgt_tmpl_t* tmpls, size_t tmpl_num);
void rgt_tmpls_free(rgt_tmpl_t* tmpls, size_t tmpl_num);
int rgt_tmpls_output(FILE* out_fd, rgt_tmpl_t* tmpl, const rgt_attrs_t* attrs);
int rgt_tmpls_output_str(te_string* str, rgt_tmpl_t* tmpl, const rgt_attrs_t* attrs);
void rgt_attr_settings_init(const char* sep, int length);
te_errno rgt_which(const char* command, size_t size, char* location);
int rgt_filter_init(const char* fltr_fname);
void rgt_filter_destroy(void);
enum node_fltr_mode rgt_filter_check_message(const char* entity, const char* user, te_log_level level, const uint32_t* timestamp, uint32_t* flags);
enum node_fltr_mode rgt_filter_check_branch(const char* path);
enum node_fltr_mode rgt_filter_check_duration(const char* node_type, uint32_t* start_ts, uint32_t* end_ts);
void flow_tree_init(void);
void flow_tree_destroy(void);
void* flow_tree_add_node(node_id_t parent_id, node_id_t node_id, node_type_t new_node_type, char* node_name, uint32_t* timestamp, void* user_data, int* err_code);
void* flow_tree_close_node(node_id_t parent_id, node_id_t node_id, uint32_t* timestamp, int* err_code);
te_errno flow_tree_get_close_node(node_id_t* id, node_id_t* parent_id);
enum node_fltr_mode flow_tree_filter_message(log_msg* msg);
void flow_tree_attach_message(log_msg* msg);
void flow_tree_trace(void);
void index_mode_init(f_process_ctrl_log_msg ctrl_proc[CTRL_EVT_LAST][NT_LAST], f_process_reg_log_msg* reg_proc, f_process_log_root root_proc[CTRL_EVT_LAST]);
size_t universal_read(FILE* fd, void* buf, size_t count, rgt_io_mode_t io_mode, const char* rawlog_fname);
void write_xml_string(struct obstack* obstk, const char* str, bool attr_val);
void junit_mode_init(f_process_ctrl_log_msg ctrl_proc[CTRL_EVT_LAST][NT_LAST], f_process_reg_log_msg* reg_proc, f_process_log_root root_proc[CTRL_EVT_LAST]);
void live_mode_init(f_process_ctrl_log_msg ctrl_proc[CTRL_EVT_LAST][NT_LAST], f_process_reg_log_msg* reg_proc, f_process_log_root root_proc[CTRL_EVT_LAST]);
f_fetch_log_msg rgt_define_rlf_format(rgt_gen_ctx_t* ctx, char** err);
int fetch_log_msg_v1(struct log_msg** msg, rgt_gen_ctx_t* ctx);
static const char* result_status2str(result_status_t status);
static const char* node_type2str(node_type_t node_type);
int rgt_process_tester_control_message(log_msg* msg);
void rgt_process_regular_message(log_msg* msg);
void rgt_emulate_accurate_close(uint32_t* latest_ts);
void rgt_process_event(node_type_t type, enum event_type evt, node_info_t* node);
void log_msg_init_arg(log_msg* msg);
msg_arg* get_next_arg(log_msg* msg);
log_msg* alloc_log_msg(void);
void free_log_msg(log_msg* msg);
void rgt_expand_log_msg(log_msg* msg);
log_msg_ptr* log_msg_ref(log_msg* msg);
log_msg* log_msg_read(log_msg_ptr* ptr);
struct obstack* obstack_initialize(void);
void obstack_destroy(struct obstack* obstk);
void initialize_log_msg_pool(void);
void destroy_log_msg_pool(void);
log_msg* alloc_log_msg(void);
void free_log_msg(log_msg* msg);
log_msg_ptr* alloc_log_msg_ptr(void);
void free_log_msg_ptr(log_msg_ptr* msg_ptr);
void initialize_node_info_pool(void);
void destroy_node_info_pool(void);
node_info_t* alloc_node_info(void);
void free_node_info(node_info_t* node);
void* node_info_obstack_alloc(int size);
void* node_info_obstack_copy0(const void* address, int size);
void* node_info_obstack_copy(const void* address, int size);
void postponed_mode_init(f_process_ctrl_log_msg ctrl_proc[CTRL_EVT_LAST][NT_LAST], f_process_reg_log_msg* reg_proc, f_process_log_root root_proc[CTRL_EVT_LAST]);
void msg_queue_foreach(msg_queue* q, GFunc cb, void* user_data);
bool msg_queue_is_empty(msg_queue* q);
void te_rgt_parse_mi_message(const char* json_buf, size_t buf_len, te_rgt_mi* mi);
void te_rgt_mi_clean(te_rgt_mi* mi);
const char* te_rgt_mi_meas_param_name(te_rgt_mi_meas_param* param);
const char* rgt_node2str(rgt_node_t node_type);
void usage(poptContext optCon, int exitcode, char* error, char* addl);
void rgt_process_cmdline(rgt_gen_ctx_t* ctx, poptContext con, int val);
RGT_EXTERN_FUNC(proc_document_start);
RGT_EXTERN_FUNC(proc_document_end);
RGT_EXTERN_FUNC(proc_session_start);
RGT_EXTERN_FUNC(proc_session_end);
RGT_EXTERN_FUNC(proc_pkg_start);
RGT_EXTERN_FUNC(proc_pkg_end);
RGT_EXTERN_FUNC(proc_test_start);
RGT_EXTERN_FUNC(proc_test_end);
RGT_EXTERN_FUNC(proc_branch_start);
RGT_EXTERN_FUNC(proc_branch_end);
RGT_EXTERN_FUNC(proc_logs_start);
RGT_EXTERN_FUNC(proc_logs_end);
RGT_EXTERN_FUNC(proc_log_msg_start);
RGT_EXTERN_FUNC(proc_log_msg_end);
RGT_EXTERN_FUNC(proc_meta_start);
RGT_EXTERN_FUNC(proc_meta_end);
RGT_EXTERN_FUNC(proc_meta_params_start);
RGT_EXTERN_FUNC(proc_meta_params_end);
RGT_EXTERN_FUNC(proc_meta_param_start);
RGT_EXTERN_FUNC(proc_meta_param_end);
RGT_EXTERN_FUNC(proc_meta_start_ts_start);
RGT_EXTERN_FUNC(proc_meta_start_ts_end);
RGT_EXTERN_FUNC(proc_meta_end_ts_start);
RGT_EXTERN_FUNC(proc_meta_end_ts_end);
RGT_EXTERN_FUNC(proc_meta_duration_start);
RGT_EXTERN_FUNC(proc_meta_duration_end);
RGT_EXTERN_FUNC(proc_meta_objective_start);
RGT_EXTERN_FUNC(proc_meta_objective_end);
RGT_EXTERN_FUNC(proc_meta_authors_start);
RGT_EXTERN_FUNC(proc_meta_authors_end);
RGT_EXTERN_FUNC(proc_meta_author_start);
RGT_EXTERN_FUNC(proc_meta_author_end);
RGT_EXTERN_FUNC(proc_meta_verdicts_start);
RGT_EXTERN_FUNC(proc_meta_verdicts_end);
RGT_EXTERN_FUNC(proc_meta_verdict_start);
RGT_EXTERN_FUNC(proc_meta_verdict_end);
RGT_EXTERN_FUNC(proc_meta_artifacts_start);
RGT_EXTERN_FUNC(proc_meta_artifacts_end);
RGT_EXTERN_FUNC(proc_meta_artifact_start);
RGT_EXTERN_FUNC(proc_meta_artifact_end);
RGT_EXTERN_FUNC(proc_meta_page_start);
RGT_EXTERN_FUNC(proc_meta_page_end);
RGT_EXTERN_FUNC(proc_mem_dump_start);
RGT_EXTERN_FUNC(proc_mem_dump_end);
RGT_EXTERN_FUNC(proc_mem_row_start);
RGT_EXTERN_FUNC(proc_mem_row_end);
RGT_EXTERN_FUNC(proc_mem_elem_start);
RGT_EXTERN_FUNC(proc_mem_elem_end);
RGT_EXTERN_FUNC(proc_log_msg_br);
RGT_EXTERN_FUNC(proc_log_msg_file_start);
RGT_EXTERN_FUNC(proc_log_msg_file_end);
RGT_EXTERN_FUNC(proc_log_packet_start);
RGT_EXTERN_FUNC(proc_log_packet_end);
RGT_EXTERN_FUNC(proc_log_packet_proto_start);
RGT_EXTERN_FUNC(proc_log_packet_proto_end);
RGT_EXTERN_FUNC(proc_log_packet_field_start);
void proc_chars(rgt_gen_ctx_t* ctx, rgt_depth_ctx_t* depth_ctx, const rgt_xmlChar* ch, size_t len);
bool proc_expand_entities(void);
int rgt_xml2fmt_files_get_idx(const char* short_name);
void* rgt_xml2fmt_alloc_depth_data(rgt_depth_data_storage* storage, uint32_t depth, bool* reused);
void rgt_xml2fmt_free_depth_data(rgt_depth_data_storage* storage, rgt_xml2fmt_free_depth_data_cb* cb);
void rgt_xml2multi_opts_free(rgt_xml2multi_opts* opts);
void rgt_xml2multi_process_cmdline(rgt_xml2multi_opts* opts, poptContext con, int val);
bool rgt_xml2multi_match_node(rgt_xml2multi_opts* opts, const char* tin, const char* node_id, uint32_t depth, uint32_t seq);
void rgt_xml2multi_fname(char* fname, size_t len, rgt_xml2multi_opts* opts, rgt_gen_ctx_t* ctx, rgt_depth_ctx_t* depth_ctx, const char* tin, const char* node_id, const char* extension);
void rgt_xml2multi_setup_outdir(rgt_gen_ctx_t* ctx, rgt_xml2multi_opts* opts, bool shared_files);
int rgt_load_caps_idx(const char* split_log_path, rgt_cap_idx_rec** idx_out, unsigned int* idx_len_out, FILE** f_heads_out);
int rgt_parse_frag_rec(const char* s, rgt_frag_rec* rec);
int rgt_read_cap_prefix(FILE* f, uint32_t* file_id, uint64_t* pkt_offset, uint32_t* len);
int file2file(FILE* out_f, FILE* in_f, off_t out_offset, off_t in_offset, off_t length);
static void usage(poptContext optCon, int exitcode, char* error, char* addl);
void problem_free(problem* p);
te_errno get_fss_solution(problem* p, alg_type at);
te_errno trc_log_parse_process_log(trc_log_parse_ctx* ctx);
te_errno te_test_str2status(const char* str, te_test_status* status);
typedef TAILQ_HEAD(trc_re_match_substs, trc_re_match_subst);
typedef TAILQ_HEAD(trc_re_substs, trc_re_subst);
typedef TAILQ_HEAD(trc_re_namespaces, trc_re_namespace);
void trc_re_substs_free(trc_re_substs* substs);
te_errno trc_re_substs_read(const char* file, trc_re_substs* substs);
te_errno trc_re_namespaces_read(const char* file, trc_re_namespaces* namespaces);
void trc_re_substs_exec_start(const trc_re_substs* substs, const char* str, FILE* f);
void trc_re_key_substs(const char* name, const char* key, FILE* f);
ssize_t trc_re_substs_exec_buf_start(const trc_re_substs* substs, const char* str, char* buf, ssize_t buf_size);
char* trc_re_key_substs_buf(const char* name, const char* key);
te_errno trc_key_substs_read(const char* file);
void trc_key_substs_free(void);
typedef CIRCLEQ_HEAD(trc_diff_keys_stats, trc_diff_key_stats);
typedef TAILQ_HEAD(trc_diff_sets, trc_diff_set);
typedef TAILQ_HEAD(trc_diff_stats_counter_list_head, trc_diff_stats_counter_list_entry);
typedef TAILQ_HEAD(trc_diff_result, trc_diff_entry);
char* trc_diff_iter_hash_get(const trc_test_iter* test_iter, int db_uid);
trc_diff_set* trc_diff_find_set(trc_diff_sets* sets, unsigned int id, bool create);
te_errno trc_diff_set_name(trc_diff_sets* sets, unsigned int id, const char* name);
te_errno trc_diff_set_log(trc_diff_sets* sets, unsigned int id, const char* log);
te_errno trc_diff_set_url(trc_diff_sets* sets, unsigned int id, const char* url);
te_errno trc_diff_show_keys(trc_diff_sets* sets, unsigned int id);
te_errno trc_diff_add_tag(trc_diff_sets* sets, unsigned int id, const char* tag);
te_errno trc_diff_add_ignore(trc_diff_sets* sets, unsigned int id, const char* ignore);
void trc_diff_free_sets(trc_diff_sets* sets);
trc_diff_ctx* trc_diff_ctx_new(void);
void trc_diff_ctx_free(trc_diff_ctx* ctx);
bool trc_diff_is_exp_result_equal(const trc_exp_result* lhv, const trc_exp_result* rhv);
te_errno trc_diff_do(trc_diff_ctx* ctx);
te_errno trc_diff_report_to_html(trc_diff_ctx* ctx, const char* filename, const char* header, const char* title);
te_errno trc_diff_process_logs(trc_diff_ctx* ctx);
te_errno trc_diff_filter_logs(trc_diff_ctx* ctx);
te_errno te_test_result_to_html(FILE* f, const te_test_result* result);
te_errno trc_test_result_to_html(FILE* f, const trc_exp_result_entry* result);
te_errno trc_exp_result_to_html(FILE* f, const trc_exp_result* result, unsigned int flags, tqh_strings* tags);
te_errno trc_test_iter_args_to_html(FILE* f, const trc_test_iter_args* args, unsigned int flags);
te_errno trc_report_iter_args_to_html(FILE* f, const trc_report_argument* args, unsigned int args_n, unsigned int max_len, unsigned int flags);
te_errno trc_include_external_html(FILE* f, const char* src);
static unsigned int get_stats_by_status(const trc_report_stats* s, te_test_status status);
int trc_report_key_read_cb(void* ctx, char* buffer, int len);
int trc_report_key_close_cb(void* ctx);
void trc_report_init_ctx(trc_report_ctx* ctx);
te_errno trc_report_process_log(trc_report_ctx* ctx, const char* log);
te_errno trc_report_collect_stats(trc_report_ctx* ctx);
te_errno trc_report_to_html(trc_report_ctx* ctx, const char* filename, const char* title, FILE* header, unsigned int flags);
void trc_report_free_test_iter_data(trc_report_test_iter_data* data);
te_errno trc_report_to_perl(trc_report_ctx* gctx, const char* filename);
const char* trc_report_get_iter_id(const trc_report_test_iter_entry* iter);
te_errno trc_tags_str_to_list(tqh_strings* tags, char* tags_str);
te_errno trc_tags_json_to_list(tqh_strings* parsed_tags, char* json_buf);
te_errno trc_tools_filter_db(te_trc_db* db, unsigned int* db_uids, int db_uids_size, tqh_strings* tests_include, tqh_strings* tests_exclude);
te_errno trc_tools_cut_db(te_trc_db* db, unsigned int db_uid, const char* path_pattern, bool inverse);
te_errno trc_tools_merge_db(te_trc_db* db, int dst_uid, int src_uid1, int src_uid2);
te_errno trc_report_merge(trc_report_ctx* ctx, const char* filename);
int trc_tools_file_to_file(FILE* dst, FILE* src);
typedef TAILQ_HEAD(trc_update_tags_logs, trc_update_tag_logs);
typedef SLIST_HEAD(trc_update_wilds_list, trc_update_wilds_list_entry);
typedef TAILQ_HEAD(trc_update_rules, trc_update_rule);
typedef SLIST_HEAD(trc_update_args_groups, trc_update_args_group);
typedef TAILQ_HEAD(trc_update_test_entries, trc_update_test_entry);
typedef TAILQ_HEAD(trc_update_tests_groups, trc_update_tests_group);
void trc_update_init_ctx(trc_update_ctx* ctx_p);
void trc_update_free_ctx(trc_update_ctx* ctx_p);
void tag_logs_init(trc_update_tag_logs* tag_logs);
void trc_update_tag_logs_free(trc_update_tag_logs* tag_logs);
void trc_update_tags_logs_free(trc_update_tags_logs* tags_logs);
void trc_update_tags_logs_remove_empty(trc_update_tags_logs* tags_logs);
void trc_update_init_test_iter_data(trc_update_test_iter_data* data);
void trc_update_free_test_iter_data(trc_update_test_iter_data* data);
void trc_update_wilds_list_entry_free(trc_update_wilds_list_entry* entry);
void trc_update_wilds_list_free(trc_update_wilds_list* list);
void trc_update_rule_free(trc_update_rule* rule);
void trc_update_rules_free(trc_update_rules* rules);
int te_test_result_cmp(te_test_result* p, te_test_result* q);
int trc_update_rentry_cmp(trc_exp_result_entry* p, trc_exp_result_entry* q);
int trc_update_result_cmp_gen(trc_exp_result* p, trc_exp_result* q, bool tags_cmp);
int trc_update_result_cmp(trc_exp_result* p, trc_exp_result* q);
int trc_update_result_cmp_no_tags(trc_exp_result* p, trc_exp_result* q);
int trc_update_results_cmp(trc_exp_results* p, trc_exp_results* q);
int trc_update_rules_cmp(trc_update_rule* p, trc_update_rule* q);
te_errno trc_update_ins_rule(trc_update_rule* rule, trc_update_rules* rules, int(*)(trc_update_rule*, trc_update_rule*) rules_cmp);
void trc_update_test_entry_free(trc_update_test_entry* test_entry);
void trc_update_test_entries_free(trc_update_test_entries* tests);
void trc_update_tests_group_free(trc_update_tests_group* group);
void trc_update_tests_groups_free(trc_update_tests_groups* groups);
void trc_update_args_group_free(trc_update_args_group* args_group);
void trc_update_args_groups_free(trc_update_args_groups* args_groups);
trc_test_iter_args* trc_update_args_wild_dup(trc_test_iter_args* args);
bool trc_update_is_to_save(void* data, bool is_iter);
char* trc_update_set_user_attr(void* data, bool is_iter);
te_errno trc_update_process_iter(trc_update_ctx* ctx, te_trc_db_walker* db_walker, trc_test_iter* iter, trc_report_test_iter_entry* entry);
te_errno trc_update_process_logs(trc_update_ctx* gctx);

// macros

#define AAL5_TRAILER_LEN
#define ACCESS_MODE_FLAGS_MAPPING_LIST
#define ACCT_STATUS2STR(status_)
#define ADDR_FAMILY_MAPPING_LIST
#define ADD_TV(res, ts1, ts2)
#define ADJ_MODE_MAPPING_LIST
#define ADVAUTONOMOUS_DFLT
#define ADVONLINK_DFLT
#define ADVSENDADVERT_DFLT
#define AGENT_REBOOT
#define AIO_WRONG_CALLBACK
#define AI_ALL_FLAGS
#define AI_INVALID
#define ARP_FL_MAPPING_LIST
#define ASN_FALSE
#define ASN_SYN_ARRAY
#define ASN_SYN_NAMED
#define ASN_SYN_ORDER
#define ASN_TAG_CONST
#define ASN_TAG_INVALID
#define ASN_TAG_USER
#define ASN_TRUE
#define ATM_CELL_LEN
#define ATM_HEADER_LEN
#define ATM_PAYLOAD_LEN
#define ATTR_TYPE2STR(type_)
#define A_BIT
#define BINARY_ATTACHMENT
#define BITS_PER_BYTE
#define BIT_MAP_ENTRY(entry_val_)
#define BOOL3_MAPPING_LIST
#define BOOL_MAPPING_LIST
#define BPS_FLD_CONST(_val)
#define BPS_FLD_CONST_DEF(_tag, _val)
#define BPS_FLD_NO_DEF(_x)
#define BPS_FLD_SIMPLE(_x)
#define BRO_BIT
#define BRU_BIT
#define BUF_SIZE_MAPPING_LIST
#define CAUSE2STR(name_)
#define CFG_BACKUP_CREATE
#define CFG_BACKUP_RELEASE
#define CFG_BACKUP_RESTORE
#define CFG_BACKUP_RESTORE_NOHISTORY
#define CFG_BACKUP_VERIFY
#define CFG_BLOCK_SPACE
#define CFG_BLOCK_TAIL
#define CFG_BPDU_TC_ACK_FLAG
#define CFG_BPDU_TC_FLAG
#define CFG_BROTHER
#define CFG_BUF_LEN
#define CFG_CHECK_NO_LOCAL_SEQ_BREAK(_cmd, _cfg_msg)
#define CFG_CHECK_NO_LOCAL_SEQ_EXP(_cmd, _cfg_msg, _ret_exp)
#define CFG_CHECK_NO_LOCAL_SEQ_RC(_cmd, _cfg_msg)
#define CFG_DEP_INITIALIZER
#define CFG_FATHER
#define CFG_GET_INST(_handle)
#define CFG_GET_OBJ(_handle)
#define CFG_HANDLE_INVALID
#define CFG_HANDLE_MAX_INDEX
#define CFG_INST_HANDLE_TO_INDEX(_handle)
#define CFG_INST_HANDLE_VALID(_handle)
#define CFG_INST_NAME_MAX
#define CFG_IS_INST(_handle)
#define CFG_IVP(x)
#define CFG_MAX_INST_VALUE
#define CFG_MSG_FIELDS
#define CFG_NEW_INST_HANDLE(_hndl, _idx)
#define CFG_OBJ_HANDLE_VALID(_handle)
#define CFG_OBJ_OID_LITERAL(...)
#define CFG_OID_GET_INST_NAME(_p, _i)
#define CFG_OID_LEN_MAX
#define CFG_OID_MAX
#define CFG_OID_RULE(_match_prefix, _action, ...)
#define CFG_OID_RULE_END
#define CFG_PRIMARY_TYPES_NUM
#define CFG_RCF_PREFIX
#define CFG_READ_CREATE
#define CFG_READ_ONLY
#define CFG_READ_WRITE
#define CFG_SON
#define CFG_SUBID_MAX
#define CFG_TA_PREFIX
#define CFG_VAL(_t, _v)
#define CFG_WAIT_CHANGES
#define CHECK_ADDR_FAKE(addr_, fake_)
#define CHECK_ARG_SINGLE_PTR(_in_or_out, _arg)
#define CHECK_BUFS_EQUAL(buf1_, buf2_, buf_len_)
#define CHECK_ERROR_CLEANUP(rc_, msg_...)
#define CHECK_FCLOSE(_f)
#define CHECK_FOPEN(_f, _path, _mode)
#define CHECK_FOPEN_FMT(_f, _mode, _path_fmt...)
#define CHECK_FREAD(_ptr, _size, _nmemb, _f)
#define CHECK_FWRITE(_ptr, _size, _nmemb, _f)
#define CHECK_LENGTH(expr_, exp_length_)
#define CHECK_NOT_NULL(_expr)
#define CHECK_NOT_NULL(expr_)
#define CHECK_NZ_RETURN(expr_)
#define CHECK_OS_NOT_NULL(_expr)
#define CHECK_OS_RC(_expr)
#define CHECK_RC(_expr)
#define CHECK_RC(expr_)
#define CHECK_RC_ARTIFACT(expr_, artifact_...)
#define CHECK_RC_VERDICT(expr_, verdict_...)
#define CHECK_RETVAL_VAR(_func, _var, _cond, _error_val)
#define CHECK_RETVAL_VAR_ERR_COND(_func, _var, _cond, _error_val, _err_cond)
#define CHECK_RETVAL_VAR_IS_BOOL(_func, _var)
#define CHECK_RETVAL_VAR_IS_GTE_MINUS_ONE(_func, _var)
#define CHECK_RETVAL_VAR_IS_ZERO_OR_MINUS_ONE(_func, _var)
#define CHECK_RETVAL_VAR_IS_ZERO_OR_NEGATIVE(_func, _var)
#define CHECK_RETVAL_VAR_IS_ZERO_OR_NEG_ERRNO(_func, _var)
#define CHECK_RETVAL_VAR_RPC_PTR(_func, _var)
#define CHECK_RPC_ERRNO(rpcs_, exp_errno_, err_msg_, args_...)
#define CHECK_RPC_ERRNO_NOEXIT(rpcs_, exp_errno_, failed_, err_msg_, args_...)
#define CHECK_TE_RC(_expr)
#define CIRCLEQ_EMPTY(head)
#define CIRCLEQ_END(head)
#define CIRCLEQ_ENTRY(type)
#define CIRCLEQ_FIRST(head)
#define CIRCLEQ_FOREACH(var, head, field)
#define CIRCLEQ_FOREACH_REVERSE(var, head, field)
#define CIRCLEQ_HEAD(name, type)
#define CIRCLEQ_HEAD_INITIALIZER(head)
#define CIRCLEQ_INIT(head)
#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field)
#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field)
#define CIRCLEQ_INSERT_HEAD(head, elm, field)
#define CIRCLEQ_INSERT_TAIL(head, elm, field)
#define CIRCLEQ_LAST(head)
#define CIRCLEQ_NEXT(elm, field)
#define CIRCLEQ_PREV(elm, field)
#define CIRCLEQ_REMOVE(head, elm, field)
#define CIRCLEQ_REPLACE(head, elm, elm2, field)
#define CKSUM_CMP_CORRECT
#define CLEANUP_CHECK_RC(expr_)
#define CLEANUP_RPC_CLOSE(rpcs_, sockd_)
#define CLEANUP_RPC_DELETE_AIOCB(_rpcs, _cb)
#define CLEANUP_RPC_FREE(_rpcs, _ptr)
#define CLEANUP_RPC_FTP_CLOSE(rpcs_, sockd_)
#define CLEANUP_RPC_SIGACTION(rpcs_, signum_, action_, old_handler_)
#define CLEANUP_TEST_FAIL(fmt...)
#define CLIENTS_BLOCK_HEAD
#define CLI_CSAP_DEFAULT_TIMEOUT
#define CLI_CSAP_STATUS_REPLY_WAITING
#define CLI_MAX_PROMPTS
#define CMD_STR_INVAL
#define CMD_STR_RESTART
#define CMD_STR_TURN_OFF
#define CMD_STR_TURN_ON
#define CMD_STR_UNSPEC
#define CMSG_NEXT(c)
#define CMSG_REMAINED_LEN(c, p, len)
#define CMSG_TOTAL_LEN(c)
#define CNTR_BIN2STR(val_)
#define CNTR_MSG_PACKAGE
#define CNTR_MSG_PACKAGE_JSON
#define CNTR_MSG_SESSION
#define CNTR_MSG_SESSION_JSON
#define CNTR_MSG_TEST
#define CNTR_MSG_TEST_JSON
#define CODE2STR(code_)
#define COLD_REBOOT
#define CONFIGURATOR_IPC
#define CONFIGURATOR_SERVER
#define CONNREC_NOT_SUPPORTED
#define CONN_HIT_EOF
#define CONN_LOGGED_OUT
#define CONSOLE_LIST_SIZE
#define CONST_CHAR2XML
#define CONST_SA(_p)
#define CONST_SIN(_p)
#define CONST_SIN6(_p)
#define CONST_SS(_p)
#define CONST_STRING_LENGTH(str_)
#define CONST_SUN(_p)
#define COPY_ARG(_a)
#define COPY_ARG(_a)
#define COPY_ARG_ADDR(_a)
#define COPY_ARG_ADDR(_a)
#define COPY_ARG_NOTNULL(_a)
#define CSAP_LOCK(csap_inst_)
#define CSAP_LOG_ARGS(_csap)
#define CSAP_LOG_FMT
#define CSAP_PARAM_FIRST_PACKET_TIME
#define CSAP_PARAM_LAST_PACKET_TIME
#define CSAP_PARAM_NO_MATCH_PKTS
#define CSAP_PARAM_STATUS
#define CSAP_PARAM_TOTAL_BYTES
#define CSAP_PARAM_TOTAL_RECEIVED
#define CSAP_PARAM_TOTAL_SENT
#define CSAP_SUPPORT_NO_RW
#define CSAP_TRYLOCK(csap_inst_, rc_)
#define CSAP_UNLOCK(csap_inst_)
#define CSG
#define CSG1
#define CSG2
#define CSG3
#define CSG_SHIFT
#define CS_SUBSTITUTION_DELIMITER
#define CVT_INTEGER
#define C_ASSERT(x)
#define C_BIT
#define DATACK_SNACK_ENABLE
#define DATA_SNACK_ENABLE
#define DEFAULT_ETH_TYPE
#define DEFAULT_VLAN_NAME
#define DEFINE_RPC_STRUCT_SIGACTION(sa_)
#define DEF_STR_LEN
#define DELAY_DISCR_MAX
#define DEV_TYPE_STR_DIGISPARK
#define DEV_TYPE_STR_INVAL
#define DEV_TYPE_STR_PARPORT
#define DEV_TYPE_STR_TTY
#define DEV_TYPE_STR_UNSPEC
#define DHCP6_CLIENT_PORT
#define DHCP6_SERVER_PORT
#define DHCPV4_HDR_CHADDR_SIZE
#define DHCPV4_HDR_FILE_SIZE
#define DHCPV4_HDR_SNAME_SIZE
#define DHCP_CLIENT_PORT
#define DHCP_HW_TYPE_ETHERNET_10MB
#define DHCP_OP_CODE_BOOTREPLY
#define DHCP_OP_CODE_BOOTREQUEST
#define DHCP_SERVER_PORT
#define DIRENT_FLAGS_MAPPING_LIST
#define DLOPEN_FLAGS_MAPPING_LIST
#define DOMAIN_MAPPING_LIST
#define ENDDEF(_name)
#define ENTRY(_fs...)
#define EPOLL_EVENT_MAPPING_LIST
#define EPOLL_FLAG_MAPPING_LIST
#define ERR2STR(name_)
#define ERRNO_MAPPING_LIST
#define ERROR(_fs...)
#define ERROR(_fmt, _args...)
#define ERROR_ARTIFACT(_fmt...)
#define ERROR_ASN_INIT_VALUE(_type)
#define ERROR_CLEANUP(rc_, err_, format_, args_...)
#define ERROR_CLEANUP(_fmt, _args...)
#define ERROR_UNSPEC
#define ERROR_USAGE_RETURN(_fmt, _args...)
#define ERROR_VERDICT(fmt...)
#define ESUCCESS
#define ETHDEV_STATE_MAPPING_LIST
#define ETHERTYPE_ARP
#define ETHERTYPE_IP
#define ETHER_ADDR_LEN
#define ETHER_ADDR_LEN
#define ETHER_CRC_LEN
#define ETHER_DATA_LEN
#define ETHER_HDR_LEN
#define ETHER_MIN_LEN
#define ETHER_TYPE_LEN
#define ETHTOOL_FLAGS_MAPPING_LIST
#define ETHTOOL_RESET_FLAGS_MAPPING_LIST
#define ETH_COMPLETE_FREE
#define ETH_TAGGED_TYPE_LEN
#define ETH_TAG_EXC_LEN
#define EXIT(_fs...)
#define FALSE
#define FCNTL_FLAGS_MAPPING_LIST
#define FCNTL_FLAGS_MAPPING_LIST_AUX
#define FILE_MODE_FLAGS_MAPPING_LIST
#define FILTER_TYPE_MAPPING_LIST
#define FIO_DEFAULT_NAME
#define FLAG_BROADCAST
#define FLOW_TREE_ROOT_ID
#define FMT_TRACE(fmt, _args...)
#define FREE_AND_CLEAN(ptr_)
#define F_BIT
#define F_ENTRY(_fs...)
#define F_ERROR(_fs...)
#define F_EXIT(_fs...)
#define F_INFO(_fs...)
#define F_RING(_fs...)
#define F_UNKNOWN
#define F_VERB(_fs...)
#define F_WARN(_fs...)
#define GEN_CONNECTION(srvr_, clnt_, sock_type_, proto_, srvr_addr_, clnt_addr_, srvr_s_, clnt_s_)
#define GEN_CONNECTION_WILD(srvr_, clnt_, sock_type_, proto_, srvr_addr_, clnt_addr_, srvr_s_, clnt_s_, bind_wildcard_)
#define GEN_DGRAM_CONN(srvr_, clnt_, proto_, srvr_addr_, clnt_addr_, srvr_s_, clnt_s_, srvr_connect_, clnt_connect_)
#define GEN_DGRAM_CONN_WILD(srvr_, clnt_, proto_, srvr_addr_, clnt_addr_, srvr_s_, clnt_s_, srvr_connect_, clnt_connect_, bind_wildcard_)
#define GOT_ACTIVITY
#define H2RPC(name_)
#define HAVE_STDARG_H
#define HAVE_STDIO_H
#define HAVE_STDLIB_H
#define HAVE_STRING_H
#define HOST_REBOOT
#define HWTSTAMP_INSTR_MAPPING_LIST
#define IFNAME_TO_INDEX(_name, _index)
#define IF_CFG_HEAD
#define IF_CFG_TAIL
#define IF_FL_MAPPING_LIST
#define IF_NAMESIZE
#define IGMP1_SEND_JOIN(_pco, _csap, _group_addr, _src_addr, _src_mac)
#define IGMP2_SEND_JOIN(_pco, _csap, _group_addr, _src_addr, _src_mac)
#define IGMP2_SEND_LEAVE(_pco, _csap, _group_addr, _src_addr, _src_mac)
#define IGMP2_SEND_QUERY(_pco, _csap, _group_addr, _src_addr, _skip_eth, _src_mac)
#define IGMP3_GROUP_LIST(...)
#define IGMP3_GROUP_RECORD(_group_type, _group_address, ...)
#define IGMP3_SEND_ALLOW(_pco, _csap, _group_addr, _src_addr, _src_mac, _addr1...)
#define IGMP3_SEND_BLOCK(_pco, _csap, _group_addr, _src_addr, _src_mac, _addr1...)
#define IGMP3_SEND_IS_EXCLUDE(_pco, _csap, _group_addr, _src_addr, _src_mac, ...)
#define IGMP3_SEND_IS_INCLUDE(_pco, _csap, _group_addr, _src_addr, _src_mac, ...)
#define IGMP3_SEND_JOIN(_pco, _csap, _group_addr, _src_addr, _src_mac)
#define IGMP3_SEND_LEAVE(_pco, _csap, _group_addr, _src_addr, _src_mac)
#define IGMP3_SEND_QUERY(_pco, _csap, _group_addr, _src_addr, _skip_eth, _src_mac, ...)
#define IGMP3_SEND_REPORT(_pco, _csap, _group_list, _src_addr, _src_mac)
#define IGMP3_SEND_SINGLE_REPORT(_pco, _csap, _group_type, _group_addr, _src_addr, _src_mac, ...)
#define IGMP3_SEND_TO_EXCLUDE(_pco, _csap, _group_addr, _src_addr, _src_mac, ...)
#define IGMP3_SEND_TO_INCLUDE(_pco, _csap, _group_addr, _src_addr, _src_mac, ...)
#define IGMP3_SRC_LIST(...)
#define IGNOREIFMISSING_DFLT
#define INDENT
#define INFINITE_LOOP_BEGIN(name_)
#define INFINITE_LOOP_BREAK(name_, timeout_)
#define INFO(_fs...)
#define INIT_CHECKED_ARG(_real_arg, _len, _len_visible)
#define INIT_CHECKED_ARG(_real_arg, _len, _len_visible)
#define INIT_CHECKED_ARG_GEN(_list, _real_arg, _len, _len_visible)
#define INTERMEDIATE_ANSWER
#define IN_AIOCB
#define IN_CALLBACK
#define IN_FDSET
#define IN_FDSET
#define IN_FDSET_NS(_ns)
#define IN_FILE_CALLBACK
#define IN_HEVENT
#define IN_HWND
#define IN_OVERLAPPED
#define IN_SIGSET
#define IOCTL_REQ_MAPPING_LIST
#define IOMUX_EVENT_MAPPING_LIST
#define IOMUX_MAX_POLLED_FDS
#define IOMUX_RETURN_ITERATOR_END
#define IOMUX_RETURN_ITERATOR_START
#define IP4_HDR_DST_OFFSET
#define IP4_HDR_H_CKSUM_DU_INDEX
#define IP4_HDR_SRC_OFFSET
#define IP4_HDR_TOTAL_LEN_OFFSET
#define IP4_VERSION
#define IP6_ADDR_LEN
#define IP6_HDR_DST_OFFSET
#define IP6_HDR_SIN6_ADDR_LEN
#define IP6_HDR_SRC_OFFSET
#define IP6_PSEUDO_HDR_LEN
#define IP6_VERSION
#define IPC_RETRY
#define IPC_SEGMENT_SIZE
#define IPC_SLEEP
#define IPC_TCP_CLIENT_BUFFER_SIZE
#define IPC_TCP_SERVER_BUFFER_SIZE
#define IPV6_ADDR_LEN
#define IP_HDR_VERSION_LEN
#define IP_HDR_VERSION_SHIFT
#define ISCSI_AGENT_TYPE
#define ISCSI_ALL_CONNECTIONS
#define ISCSI_AUTH_METHOD_LENGTH
#define ISCSI_BHS_LENGTH
#define ISCSI_BOOLEAN_LENGTH
#define ISCSI_DEFAULT_CHALLENGE_LENGTH
#define ISCSI_DEFAULT_CHAP
#define ISCSI_DEFAULT_DATA_DIGEST
#define ISCSI_DEFAULT_DATA_PDU_IN_ORDER
#define ISCSI_DEFAULT_DATA_SEQUENCE_IN_ORDER
#define ISCSI_DEFAULT_ERROR_RECOVERY_LEVEL
#define ISCSI_DEFAULT_FIRST_BURST_LENGTH
#define ISCSI_DEFAULT_HEADER_DIGEST
#define ISCSI_DEFAULT_HOST_BUS_ADAPTER
#define ISCSI_DEFAULT_IMMEDIATE_DATA
#define ISCSI_DEFAULT_INITIAL_R2T
#define ISCSI_DEFAULT_INITIATOR_ALIAS
#define ISCSI_DEFAULT_INITIATOR_NAME
#define ISCSI_DEFAULT_ISCSI_DEFAULT_TIME2RETAIN
#define ISCSI_DEFAULT_ISCSI_DEFAULT_TIME2WAIT
#define ISCSI_DEFAULT_LUN_NUMBER
#define ISCSI_DEFAULT_MAX_BURST_LENGTH
#define ISCSI_DEFAULT_MAX_CONNECTIONS
#define ISCSI_DEFAULT_MAX_OUTSTANDING_R2T
#define ISCSI_DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH
#define ISCSI_DEFAULT_RETRY_ATTEMPTS
#define ISCSI_DEFAULT_RETRY_TIMEOUT
#define ISCSI_DEFAULT_SESSION_TYPE
#define ISCSI_DEFAULT_TARGET_NAME
#define ISCSI_DIGEST_LENGTH
#define ISCSI_END_PARAM_TABLE
#define ISCSI_HDR_LEN
#define ISCSI_INITIATOR_SET_ADVERTIZE(_ta_, _target_id_, _cid_, _param_name_, _value_)
#define ISCSI_INITIATOR_SET_NOT_ADVERTIZE(_ta_, _target_id_, _cid_, _param_name_, _value_)
#define ISCSI_IO_SIGNAL
#define ISCSI_MAX_ADDR_LENGTH
#define ISCSI_MAX_CID_LIST_LENGTH
#define ISCSI_MAX_CMD_SIZE
#define ISCSI_MAX_CONNECTIONS_NUMBER
#define ISCSI_MAX_DEVICE_NAME_LEN
#define ISCSI_MAX_NAME_LENGTH
#define ISCSI_MAX_TARGETS_NUMBER
#define ISCSI_OPCODE
#define ISCSI_SCSI_BLOCKSIZE
#define ISCSI_SECURITY_VALUE_LENGTH
#define ISCSI_SESSION_ID_LENGTH
#define ISCSI_SESSION_TYPE_LENGTH
#define ISCSI_TARGET_DEFAULT_PORT
#define ISCSI_TARGET_SET_PARAM(ta_, param_id_, value_)
#define ISCSI_TARGET_SET_PARAM_BY_NAME(_ta_, _param_name_, _value_)
#define ISCSI_WIN32_REPORT_ERROR()
#define IS_ZERO(ts)
#define ITEM(_key, _value)
#define I_BIT
#define JOIN_LEAF_FLAGS_MAPPING_LIST
#define JSON_ARRAY_APPEND(_arr, _val, _rc, _lbl)
#define JSON_ARRAY_APPEND_NEW(_arr, _val, _rc, _lbl)
#define JSON_ARRAY_CREATE(_arr, _rc, _lbl)
#define JSON_ENCODING_FLAGS
#define JSON_OBJECT_CREATE(_obj, _rc, _lbl)
#define JSON_OBJECT_SET(_obj, _key, _val, _rc, _lbl)
#define JSON_OBJECT_SET_NEW(_obj, _key, _val, _rc, _lbl)
#define KTRC(x...)
#define LARG0(a, args...)
#define LARG1(a, args...)
#define LARG10(a, args...)
#define LARG11(a, args...)
#define LARG12(a, args...)
#define LARG2(a, args...)
#define LARG3(a, args...)
#define LARG4(a, args...)
#define LARG5(a, args...)
#define LARG6(a, args...)
#define LARG7(a, args...)
#define LARG8(a, args...)
#define LARG9(a, args...)
#define LGRF_MESSAGE(_lvl, _lgruser, _fs, _args...)
#define LGR_16_PUT(val_, buf_)
#define LGR_16_TO_NET(_val, _res)
#define LGR_32_TO_NET(_val, _res)
#define LGR_FLUSH
#define LGR_FLUSH_TA_MSG_MAX
#define LGR_GET_ARG(_hdr, _narg)
#define LGR_GET_ELEMENTS_FIELD(_rb, _pos)
#define LGR_GET_MARK_FIELD(_rb, _pos)
#define LGR_GET_MESSAGE_ADDR(_rb, _pos)
#define LGR_GET_MESSAGE_ARRAY(_rb, _pos)
#define LGR_GET_SEQUENCE_FIELD(_rb, _pos)
#define LGR_LOCK(lock)
#define LGR_MAX_BIG_MESSAGES
#define LGR_MAX_NAME
#define LGR_MESSAGE(_lvl, _lgruser, _fs...)
#define LGR_RB_BIG_MESSAGE_LEN
#define LGR_RB_CORRECTION(_val, _res)
#define LGR_RB_ELEMENT_LEN
#define LGR_RB_HEAD(_rb)
#define LGR_RB_TAIL(_rb)
#define LGR_RB_UNUSED(_rb)
#define LGR_SET_ARG(_hdr, _narg, _val)
#define LGR_SET_ELEMENTS_FIELD(_rb, _pos, _val)
#define LGR_SET_MARK_FIELD(_rb, _pos, _val)
#define LGR_SET_SEQUENCE_FIELD(_rb, _pos, _val)
#define LGR_SHUTDOWN
#define LGR_SRV_FOR_TA_PREFIX
#define LGR_SRV_NAME
#define LGR_SRV_SNIFFER_MARK
#define LGR_TANAMES_LEN
#define LGR_TA_POLL_DEF
#define LGR_TOTAL_RB_BYTES
#define LGR_TOTAL_RB_EL
#define LGR_UNLOCK(lock)
#define LIBGUPNP_DIDLLITE_CONTAINER_BUG
#define LIST_EMPTY(head)
#define LIST_ENTRY(type)
#define LIST_FIRST(head)
#define LIST_FOREACH(var, head, field)
#define LIST_FOREACH_SAFE(var, head, field, tvar)
#define LIST_HEAD(name, type)
#define LIST_HEAD_INITIALIZER(head)
#define LIST_INIT(head)
#define LIST_INSERT_AFTER(listelm, elm, field)
#define LIST_INSERT_BEFORE(listelm, elm, field)
#define LIST_INSERT_HEAD(head, elm, field)
#define LIST_NEXT(elm, field)
#define LIST_REMOVE(elm, field)
#define LOGFORK_MAXLEN
#define LOGFORK_MAXUSER
#define LOGF_ENTRY(_us, _fs...)
#define LOGF_ERROR(_us, _fs...)
#define LOGF_EXIT(_us, _fs...)
#define LOGF_INFO(_us, _fs...)
#define LOGF_RING(_us, _fs...)
#define LOGF_SUPENTRY(_us, _fs, _args...)
#define LOGF_SUPEXIT(_us, _fs, _args...)
#define LOGF_VERB(_us, _fs...)
#define LOGF_WARN(_us, _fs...)
#define LOGGER_IPC
#define LOGIC_EXPR_RES_INIT
#define LOG_HEX_DIFF_DUMP(_lvl, _expected, _actual, _len)
#define LOG_HEX_DIFF_DUMP_AT(_lvl, _expected, _explen, _actual, _actlen, _offset)
#define LOG_LEVEL_ALL
#define LOG_MAX_FILTERS
#define LOG_MAX_FILTER_RULES
#define LOG_MAX_FILTER_RULE_NAME
#define LOG_MAX_LISTENERS
#define LOG_MAX_LISTENER_DUMP_LEN
#define LOG_MAX_LISTENER_NAME
#define LOG_MAX_LISTENER_RUNID
#define LOG_MAX_LISTENER_URL
#define LOG_MSG(_lvl, _fs...)
#define LOG_PRINT(_fmt, ...)
#define MACRO_ERROR_EXIT
#define MACRO_TEST_ERROR
#define MAKE_CALL(_code)
#define MAKE_CALL(x)
#define MAPPING_LIST_ENTRY(entry_val_)
#define MAP_FLAGS_MAPPING_LIST
#define MASK2PREFIX(mask, prefix)
#define MASK2PREFIX(mask, prefix)
#define MAX(_x, _y)
#define MAXBUFSIZE
#define MAXRTRADVINTERVAL_DFLT
#define MAX_CHANGE_TIMEOUT
#define MAX_LABLE_LEN
#define MAX_OID_LEN
#define MAX_TEXT_LEN
#define MEMBER(scalar_type_, ...)
#define MIN(_x, _y)
#define MI_ARTIFACT(_fmt...)
#define MOD2STR(name_)
#define MSGHDR_MSG_FLAGS_INIT(_msg, _msg_set)
#define MSLEEP(_to_sleep)
#define NDN_ARP_HW_SIZE_MAX
#define NDN_ARP_PROTO_SIZE_MAX
#define NDN_BASE_BOOLEAN
#define NDN_BASE_LINK
#define NDN_BASE_OCTETS
#define NDN_BASE_RO_BOOLEAN
#define NDN_BASE_RO_LINK
#define NDN_BASE_RO_OCTETS
#define NDN_BASE_RO_S16
#define NDN_BASE_RO_S32
#define NDN_BASE_RO_S64
#define NDN_BASE_RO_S8
#define NDN_BASE_RO_STRING
#define NDN_BASE_RO_U16
#define NDN_BASE_RO_U32
#define NDN_BASE_RO_U64
#define NDN_BASE_RO_U8
#define NDN_BASE_S16
#define NDN_BASE_S32
#define NDN_BASE_S64
#define NDN_BASE_S8
#define NDN_BASE_STRING
#define NDN_BASE_U16
#define NDN_BASE_U32
#define NDN_BASE_U64
#define NDN_BASE_U8
#define NDN_DATA_UNIT_TYPE(id, asn_t, asn_bt_txt_id)
#define NDN_DATA_UNIT_WITH_RANGE_TYPE(id, asn_t, asn_bt_txt_id)
#define NDN_ETH_VLAN_TCI_MASK_CFI
#define NDN_ETH_VLAN_TCI_MASK_ID
#define NDN_ETH_VLAN_TCI_MASK_PRIO
#define NDN_RTE_FLOW_FIELD_NAME_MAX_LEN
#define NDN_RTE_FLOW_IPV4_FLAG_DONT_FRAG_FIELD_OFST
#define NDN_RTE_FLOW_IPV4_FLAG_FIELD_LEN
#define NDN_RTE_FLOW_IPV4_FLAG_MORE_FRAG_FIELD_OFST
#define NDN_RTE_FLOW_IPV4_FRAG_OFST_FIELD_LEN
#define NDN_RTE_FLOW_IPV4_FRAG_OFST_FIELD_OFFSET
#define NDN_SNMP_SEC_MODEL_DEFAULT
#define NEED_TX_WAKEUP
#define NEG_ERRNO_ARGS(_val)
#define NEG_ERRNO_FMT
#define NEIGH_STATE2STR(_state)
#define NETCONF_ASSERT(expr)
#define NETCONF_DEVLINK_PARAM_CMODES
#define NETCONF_HANDLE_INVALID
#define NETCONF_MAX_MXBUF_LEN
#define NETCONF_MAX_REQ_LEN
#define NETCONF_NLMSG_TAIL(_msg)
#define NETCONF_PREFIX_UNSPEC
#define NETCONF_RCV_BUF_LEN
#define NETCONF_RTM_F_CLONED
#define NETCONF_SOCK_RCVBUF
#define NETCONF_SOCK_SNDBUF
#define NETW_EVENT_FLAGS_MAPPING_LIST
#define NODE_TYPE_CASE(val_)
#define NSG
#define NSG1
#define NSG2
#define NSG3
#define NULL
#define NULL
#define OFFER_0
#define OFFER_DATA_DIGEST
#define OFFER_DATA_PDU_IN_ORDER
#define OFFER_DATA_SEQUENCE_IN_ORDER
#define OFFER_DEFAULT_TIME2RETAIN
#define OFFER_DEFAULT_TIME2WAIT
#define OFFER_ERROR_RECOVERY_LEVEL
#define OFFER_FIRST_BURST_LENGTH
#define OFFER_HEADER_DIGEST
#define OFFER_IMMEDIATE_DATA
#define OFFER_INITIAL_R2T
#define OFFER_MAX_BURST_LENGTH
#define OFFER_MAX_CONNECTIONS
#define OFFER_MAX_OUTSTANDING_R2T
#define OFFER_MAX_RECV_DATA_SEGMENT_LENGTH
#define OFF_T_MAX
#define OLD_X_BIT
#define OPEN_BACKUP(_index, _f)
#define OPEN_CONFIG(_index, _f)
#define OPEN_SOCK_FLAGS_MAPPING_LIST
#define OPTNAME_IF_ADVCURHOPLIMIT
#define OPTNAME_IF_ADVDEFAULTLIFETIME
#define OPTNAME_IF_ADVDEFAULTPREFERENCE
#define OPTNAME_IF_ADVHOMEAGENTFLAG
#define OPTNAME_IF_ADVHOMEAGENTINFO
#define OPTNAME_IF_ADVINTERVALOPT
#define OPTNAME_IF_ADVLINKMTU
#define OPTNAME_IF_ADVMANAGEDFLAG
#define OPTNAME_IF_ADVMOBRTRSUPPORTFLAG
#define OPTNAME_IF_ADVREACHABLETIME
#define OPTNAME_IF_ADVRETRANSTIMER
#define OPTNAME_IF_ADVSENDADVERT
#define OPTNAME_IF_ADVSOURCELLADDRESS
#define OPTNAME_IF_HOMEAGENTLIFETIME
#define OPTNAME_IF_HOMEAGENTPREFERENCE
#define OPTNAME_IF_IGNOREIFMISSING
#define OPTNAME_IF_MAXRTRADVINTERVAL
#define OPTNAME_IF_MINDELAYBETWEENRAS
#define OPTNAME_IF_MINRTRADVINTERVAL
#define OPTNAME_IF_UNICASTONLY
#define OPTNAME_PREFIX_ADVAUTONOMOUS
#define OPTNAME_PREFIX_ADVONLINK
#define OPTNAME_PREFIX_ADVPREFERREDLIFETIME
#define OPTNAME_PREFIX_ADVROUTERADDR
#define OPTNAME_PREFIX_ADVVALIDLIFETIME
#define OPTNAME_PREFIX_BASE6TO4INTERFACE
#define OPTNAME_RDNSS_ADVRDNSSLIFETIME
#define OPTNAME_RDNSS_ADVRDNSSOPEN
#define OPTNAME_RDNSS_ADVRDNSSPREFERENCE
#define OPTNAME_ROUTE_ADVROUTELIFETIME
#define OPTNAME_ROUTE_ADVROUTEPREFERENCE
#define O_BIT
#define PARAMETERS_ARGV
#define PARSER_LIST_SIZE
#define PATH_MAX
#define PATH_MAX
#define PCAP_LINKTYPE_DEFAULT
#define PCAP_RECV_MODE_ALL
#define PCAP_RECV_MODE_DEF
#define PDU_CONTAINS_KEY(segment_data_, key_name_)
#define PDU_CONTAINS_KEY_VALUE_PAIR(segment_data_, key_name_, key_value_)
#define PF_INVALID
#define POLL_EVENT_MAPPING_LIST
#define PREADV2_PWRITEV2_FLAGS_MAPPING_LIST
#define PREFERENCE_NAME_HIGH
#define PREFERENCE_NAME_LOW
#define PREFERENCE_NAME_MEDIUM
#define PREFIX2MASK(prefix)
#define PREFIX_BLOCK_HEAD
#define PREPARE_ADDR(_name, _value, _wlen)
#define PREPARE_ADDR(_name, _value, _wlen)
#define PREPARE_ADDR_GEN(_name, _value, _wlen, _is_local, _do_register)
#define PREPARE_ADDR_GEN_DO_REGISTER_false(_name, _len, _wlen)
#define PREPARE_ADDR_GEN_DO_REGISTER_true(_name, _len, _wlen)
#define PREPARE_ADDR_GEN_IS_LOCAL_COPY_false(_name)
#define PREPARE_ADDR_GEN_IS_LOCAL_COPY_true(_name)
#define PREPARE_ADDR_GEN_IS_LOCAL_DEFS_false(_name)
#define PREPARE_ADDR_GEN_IS_LOCAL_DEFS_true(_name)
#define PREPARE_ADDR_GEN_IS_LOCAL_VAR_false(_name)
#define PREPARE_ADDR_GEN_IS_LOCAL_VAR_true(_name)
#define PROMPT_VAL_MAX
#define PROTOCOL_MAPPING_LIST
#define PROT_FLAGS_MAPPING_LIST
#define PTR_VAL(_param)
#define QEL_DELETE(x)
#define QEL_INSERT(list, new)
#define QMD_LIST_CHECK_HEAD(head, field)
#define QMD_LIST_CHECK_NEXT(elm, field)
#define QMD_LIST_CHECK_PREV(elm, field)
#define QMD_TAILQ_CHECK_HEAD(head, field)
#define QMD_TAILQ_CHECK_NEXT(elm, field)
#define QMD_TAILQ_CHECK_PREV(elm, field)
#define QMD_TAILQ_CHECK_TAIL(head, headname)
#define QMD_TRACE_ELEM(elem)
#define QMD_TRACE_HEAD(head)
#define RCF_ACK_HOST_REBOOT_TIMEOUT
#define RCF_CH_LOCK
#define RCF_CH_UNLOCK
#define RCF_CMD_TIMEOUT
#define RCF_CMD_TIMEOUT_HUGE
#define RCF_COLD_REBOOT_TIMEOUT
#define RCF_CONFSET_TIMEOUT
#define RCF_HOST_REBOOT_TIMEOUT
#define RCF_IPC
#define RCF_LOG_FLUSHED_TIMEOUT
#define RCF_MAX_ID
#define RCF_MAX_LEN
#define RCF_MAX_NAME
#define RCF_MAX_PARAMS
#define RCF_MAX_PATH
#define RCF_MAX_TYPE_NAME
#define RCF_MAX_VAL
#define RCF_PCH_CFG_NODE_COLLECTION(_name, _subid, _son, _brother, _f_add, _f_del, _f_list, _f_commit)
#define RCF_PCH_CFG_NODE_NA(_name, _subid, _son, _brother)
#define RCF_PCH_CFG_NODE_NA_COMMIT(_name, _subid, _son, _brother, _f_commit)
#define RCF_PCH_CFG_NODE_RO(_name, _subid, _son, _brother, _f_get)
#define RCF_PCH_CFG_NODE_RO_COLLECTION(_name, _subid, _son, _brother, _f_get, _f_list)
#define RCF_PCH_CFG_NODE_RW(_name, _subid, _son, _brother, _f_get, _f_set)
#define RCF_PCH_CFG_NODE_RWC(_name, _subid, _son, _brother, _f_get, _f_set, _commit)
#define RCF_PCH_CFG_NODE_RWC_COLLECTION(_name, _subid, _son, _brother, _f_get, _f_set, _f_add, _f_del, _f_list, _commit)
#define RCF_PCH_CFG_NODE_RW_COLLECTION(_name, _subid, _son, _brother, _f_get, _f_set, _f_add, _f_del, _f_list, _f_commit)
#define RCF_PCH_CFG_NODE_RW_COLLECTION_WITH_SUBST(_name, _subid, _son, _brother, _f_get, _f_set, _f_add, _f_del, _f_list, _f_commit, _subst)
#define RCF_PCH_CFG_NODE_RW_WITH_SUBST(_name, _subid, _son, _brother, _f_get, _f_set, _subst)
#define RCF_PCH_CFG_SUBST_SET(...)
#define RCF_PCH_LOG_BULK
#define RCF_PCH_MAX_ID_LEN
#define RCF_PCH_MEM_INDEX_ALLOC(_mem, _ns)
#define RCF_PCH_MEM_INDEX_FREE(_id, _ns)
#define RCF_PCH_MEM_INDEX_FREE_MEM(_mem, _ns)
#define RCF_PCH_MEM_INDEX_MEM_TO_PTR(_id, _ns)
#define RCF_PCH_MEM_INDEX_PTR_TO_MEM(_mem, _ns)
#define RCF_PCH_MEM_INDEX_TO_PTR_RPC(_mem, _id, _ns, _rc)
#define RCF_PCH_MEM_NS_CREATE_IF_NEEDED(_ns_id, _ns_str)
#define RCF_PCH_MEM_NS_CREATE_IF_NEEDED_RETURN(_ns_id, _ns_str, _rc)
#define RCF_RPC_BUF_LEN
#define RCF_RPC_DEFAULT_TIMEOUT
#define RCF_RPC_HUGE_BUF_LEN
#define RCF_RPC_MAX_ACCEPT_CONDS
#define RCF_RPC_MAX_BUF
#define RCF_RPC_MAX_CMSGHDR
#define RCF_RPC_MAX_FUNC_NAME
#define RCF_RPC_MAX_IOVEC
#define RCF_RPC_MAX_MSGHDR
#define RCF_RPC_MAX_NAME
#define RCF_RPC_NAME_LEN
#define RCF_RPC_SERVER_GET_EXEC
#define RCF_RPC_SERVER_GET_EXISTING
#define RCF_RPC_SERVER_GET_INHERIT
#define RCF_RPC_SERVER_GET_NET_INIT
#define RCF_RPC_SERVER_GET_REGISTER
#define RCF_RPC_SERVER_GET_REUSE
#define RCF_RPC_SERVER_GET_THREAD
#define RCF_RPC_UNSPEC_TIMEOUT
#define RCF_SELECT_TIMEOUT
#define RCF_SERVER
#define RCF_SHUTDOWN_TIMEOUT
#define RCF_TALIB_METHODS_DEFINE(talib_prefix_)
#define RCF_TA_GET_LOG_SID
#define RCF_TRRECV_REPORT_MASK
#define RDNSS_BLOCK_HEAD
#define READ_PACKET_FIELD(rc_, pdu_, dgr_, dir_, field_)
#define READ_TYPE_CMND
#define REGISTER_ARTIFACT(_level, _fmt...)
#define REPLY_BIT
#define RES_STATUS_CASE(val_)
#define RETVAL_BOOL(_func, _retval)
#define RETVAL_ECORRUPTED
#define RETVAL_INT(_func, _retval)
#define RETVAL_INT64(_func, _retval)
#define RETVAL_INT_CHECK_WAIT_STATUS(_func, _retval, _status)
#define RETVAL_PTR(_func, _retval)
#define RETVAL_PTR64(_func, _retval)
#define RETVAL_RPC_PTR(_func, _retval)
#define RETVAL_RPC_PTR_OR_NULL(_func, _retval)
#define RETVAL_TE_ERRNO(_func, _retval)
#define RETVAL_VOID(_func)
#define RETVAL_WAIT_STATUS(_func, _retval)
#define RETVAL_ZERO_INT(_func, _retval)
#define RGT_CLEANUP_JUMP
#define RGT_DEF_DUMMY_FUNC(name_)
#define RGT_DEF_FUNC(name_)
#define RGT_DEPTH_DATA_STORAGE_INIT(_size)
#define RGT_ERROR
#define RGT_ERROR_FAIL
#define RGT_ERROR_INIT
#define RGT_ERROR_JUMP
#define RGT_ERROR_OK
#define RGT_ERROR_SECTION
#define RGT_ERROR_SET
#define RGT_ERROR_VAL
#define RGT_EXTERN_FUNC(name_)
#define RGT_FUNC_UNUSED_PRMS()
#define RGT_MSG_FLG_ARTIFACT
#define RGT_MSG_FLG_NORMAL
#define RGT_MSG_FLG_VERDICT
#define RGT_NODE_ID_PREFIX
#define RGT_NODE_ID_PREFIX
#define RGT_OP_MODE_DEFAULT_STR
#define RGT_OP_MODE_INDEX_STR
#define RGT_OP_MODE_JUNIT_STR
#define RGT_OP_MODE_LIVE_STR
#define RGT_OP_MODE_POSTPONED_STR
#define RGT_PROCESS_CMDLINE_DUMMY()
#define RGT_RLF_V1
#define RGT_TMPLS_VAR_DELIMETER
#define RGT_UINT16_SWAP(val)
#define RGT_UINT32_SWAP(val)
#define RGT_XML2CHAR(x_)
#define RGT_XML2MULTI_OPTS_INIT
#define RING(_fs...)
#define RING_ARTIFACT(_fmt...)
#define RING_VERDICT(fmt...)
#define ROOT_NODE_DEPTH
#define ROOT_NODE_SEQ
#define ROUTE_BLOCK_HEAD
#define RPC2H(name_)
#define RPC2STR(name_)
#define RPCBITMAP2STR(bitmap_name_, mapping_list_)
#define RPCSERVER_PLUGIN_AWAIT_DYNAMIC_LIBRARY(_timeout)
#define RPCSERVER_PLUGIN_AWAIT_RPC_CALL(_list, _timeout)
#define RPCWSA2H(name_)
#define RPC_AF_ETHER
#define RPC_AF_INET
#define RPC_AF_INET6
#define RPC_AF_LOCAL
#define RPC_AF_PACKET
#define RPC_AF_UNIX
#define RPC_AF_UNKNOWN
#define RPC_AF_UNSPEC
#define RPC_ARP_FLAGS_ALL
#define RPC_AWAITING_ERROR(_rpcs)
#define RPC_AWAIT_ERROR(_rpcs)
#define RPC_AWAIT_IUT_ERROR(_rpcs)
#define RPC_BIT_MAP_ENTRY(entry_val_)
#define RPC_CHECK_READABILITY(rpcs_, sockd_, should_be_readable_)
#define RPC_CHECK_WRITABILITY(rpcs_, sockd_, should_be_writable_)
#define RPC_CLOSE(rpcs_, fd_)
#define RPC_CMSG_FIRSTHDR(_rpc_msg)
#define RPC_CMSG_NXTHDR(_rpc_msg, _cmsg)
#define RPC_DIRENT_HAVE_D_INO
#define RPC_DIRENT_HAVE_D_NAMLEN
#define RPC_DIRENT_HAVE_D_OFF
#define RPC_DIRENT_HAVE_D_TYPE
#define RPC_DLHANDLE_NULL
#define RPC_DLSYM_NULL
#define RPC_DONT_AWAIT_ERROR(_rpcs)
#define RPC_DONT_AWAIT_IUT_ERROR(_rpcs)
#define RPC_EPOLL_ALL
#define RPC_EPOLL_CTL_ADD
#define RPC_EPOLL_CTL_DEL
#define RPC_EPOLL_CTL_MOD
#define RPC_EPOLL_FLAGS_ALL
#define RPC_ERRNO
#define RPC_ERRNO
#define RPC_ERRNO(_rpcs)
#define RPC_ERROR_ARGS(_rpcs)
#define RPC_ERROR_FMT
#define RPC_ERROR_MAX_LEN
#define RPC_ERROR_MSG(_rpcs)
#define RPC_FD_MAX_EVENTS
#define RPC_FUNC_WITH_EXACT_RETVAL(rpcs_, retval_, expect_, func_, args_...)
#define RPC_FUNC_WITH_PTR_RETVAL(rpcs_, retval_, func_, args_...)
#define RPC_FUNC_WITH_PTR_RETVAL0(rpcs_, retval_, func_)
#define RPC_FUNC_ZERO_RETVAL(rpcs_, func_, args_...)
#define RPC_GET_READABILITY(answer_, rpcs_, sockd_, timeout_)
#define RPC_GET_WRITABILITY(answer_, rpcs_, sockd_, timeout_)
#define RPC_IF_FLAGS_ALL
#define RPC_IS_CALL_OK(_rpcs)
#define RPC_IS_ERRNO_RPC(_errno)
#define RPC_MSG_ALL
#define RPC_NAME(rpcs_)
#define RPC_NULL
#define RPC_OPTLEN_AUTO
#define RPC_O_ACCMODE
#define RPC_PATTERN_GEN
#define RPC_PATTERN_GEN_LCG
#define RPC_PCH_MEM_WITH_NAMESPACE(_ns_id, _ns_str, _actions)
#define RPC_POLL_ALL
#define RPC_POLL_NFDS_MAX
#define RPC_PTR_FMT
#define RPC_PTR_ID_GET_INDEX(_id)
#define RPC_PTR_ID_GET_NS(_id)
#define RPC_PTR_ID_INDEX_BITCOUNT
#define RPC_PTR_ID_INDEX_LIMIT
#define RPC_PTR_ID_INDEX_MASK
#define RPC_PTR_ID_MAKE(_ns, _index)
#define RPC_PTR_ID_NS_BITCOUNT
#define RPC_PTR_ID_NS_INVALID
#define RPC_PTR_ID_TO_MEM
#define RPC_PTR_MEM_TO_ID
#define RPC_PTR_OFF_DEC(ptr_, off_)
#define RPC_PTR_OFF_GET_BASE(ptr_)
#define RPC_PTR_OFF_GET_OFFSET(ptr_)
#define RPC_PTR_OFF_INC(ptr_, off_)
#define RPC_PTR_OFF_IS_NULL(ptr_)
#define RPC_PTR_VAL(_val)
#define RPC_RSS_HASH_KEY_LEN_DEF
#define RPC_RTE_EPOLL_PER_THREAD
#define RPC_RTE_ETH_NAME_MAX_LEN
#define RPC_RTE_RETA_GROUP_SIZE
#define RPC_SA_FLAGS_ALL
#define RPC_SEND(sent_, rpcs_, sockd_, buf_, len_, flags_)
#define RPC_SENDTO(sent_, rpcs_, sockd_, buf_, len_, flags_, addr_)
#define RPC_SHELL_CMDLINE_MAX
#define RPC_SHUTDOWN_HOW
#define RPC_SIG_ERR
#define RPC_SOCKET_TO_FILE(recv_, rpcs_, sockd_, file_name_, timeout_)
#define RPC_STDERR_FILENO
#define RPC_STDIN_FILENO
#define RPC_STDOUT_FILENO
#define RPC_TCPI_OPT_ALL
#define RPC_TYPE_NS_FD_SET
#define RPC_TYPE_NS_GENERIC
#define RPC_TYPE_NS_IOMUX_STATE
#define RPC_TYPE_NS_RTE_FLOW
#define RPC_TYPE_NS_RTE_MBUF
#define RPC_TYPE_NS_RTE_MEMPOOL
#define RPC_TYPE_NS_RTE_RING
#define RPC_TYPE_NS_XSK_SOCKET
#define RPC_TYPE_NS_XSK_UMEM
#define RPC_UNKNOWN_ADDR
#define RPC_WRITE(sent_, rpcs_, sockd_, buf_, len_)
#define RPC_WSA_IOCTL_OUTBUF_MAX
#define RPC_XDP_BIND_COPY
#define RPC_XDP_BIND_SHARED_UMEM
#define RPC_XDP_BIND_USE_NEED_WAKEUP
#define RPC_XDP_BIND_ZEROCOPY
#define RX_XFRM_EFFECT_OUTER_VLAN_TCI
#define RX_XFRM_EFFECT_VLAN_TCI
#define RX_XFRM_HW_OFFL_QINQ_STRIP
#define RX_XFRM_HW_OFFL_VLAN_STRIP
#define R_BIT
#define SA(_p)
#define SA(_p)
#define SAM_STAT_ACA_ACTIVE
#define SAM_STAT_BUSY
#define SAM_STAT_CHECK_CONDITION
#define SAM_STAT_COMMAND_TERMINATED
#define SAM_STAT_CONDITION_MET
#define SAM_STAT_GOOD
#define SAM_STAT_INTERMEDIATE
#define SAM_STAT_INTERMEDIATE_CONDITION_MET
#define SAM_STAT_RESERVATION_CONFLICT
#define SAM_STAT_TASK_ABORTED
#define SAM_STAT_TASK_SET_FULL
#define SA_COMMON_LEN
#define SA_DATA_MAX_LEN
#define SA_FLAGS_MAPPING_LIST
#define SEND_ANSWER(_fmt...)
#define SEND_COND_HW_OFFL_IP_CKSUM
#define SEND_COND_HW_OFFL_L4_CKSUM
#define SEND_COND_HW_OFFL_OUTER_IP_CKSUM
#define SEND_COND_HW_OFFL_TSO
#define SEND_COND_HW_OFFL_VLAN
#define SEND_NO_REPLY_TO_ASYNC_LOGOUT
#define SEND_NO_REPLY_TO_NOP_PING
#define SEND_RECV_FLAGS_MAPPING_LIST
#define SERVICETYPE_BESTEFFORT
#define SERVICETYPE_CONTROLLEDLOAD
#define SERVICETYPE_GENERAL_INFORMATION
#define SERVICETYPE_GUARANTEED
#define SERVICETYPE_NETWORK_CONTROL
#define SERVICETYPE_NETWORK_UNAVAILABLE
#define SERVICETYPE_NOCHANGE
#define SERVICETYPE_NONCONFORMING
#define SERVICETYPE_NOTRAFFIC
#define SERVICETYPE_QUALITATIVE
#define SERVICE_NO_QOS_SIGNALING
#define SERVICE_NO_TRAFFIC_CONTROL
#define SHUT_HOW_MAPPING_LIST
#define SIGNUM_MAPPING_LIST
#define SIG_LIBC_PROTECTED
#define SIN(_p)
#define SIN6(_p)
#define SKIP_SPACES(_ptr)
#define SLEEP(_to_sleep)
#define SLEEP_MSEC
#define SLIST_EMPTY(head)
#define SLIST_ENTRY(type)
#define SLIST_FIRST(head)
#define SLIST_FOREACH(var, head, field)
#define SLIST_FOREACH_PREVPTR(var, varp, head, field)
#define SLIST_FOREACH_SAFE(var, head, field, tvar)
#define SLIST_HEAD(name, type)
#define SLIST_HEAD_INITIALIZER(head)
#define SLIST_INIT(head)
#define SLIST_INSERT_AFTER(slistelm, elm, field)
#define SLIST_INSERT_HEAD(head, elm, field)
#define SLIST_NEXT(elm, field)
#define SLIST_REMOVE(head, elm, type, field)
#define SLIST_REMOVE_HEAD(head, field)
#define SNACK
#define SNIFFER_MARK_H_INIT(_proto, _msglen)
#define SNIFFER_MIN_MARK_SIZE
#define SNIFFER_TS_CPY(_dest, _src)
#define SNIF_MARK_PSIZE
#define SNIF_PCAP_HSIZE
#define SNMP_CSAP_CREATE(ta_, sid_, snmp_agent_, community_, snmp_version_, csap_id_)
#define SNMP_CSAP_DEF_AGENT
#define SNMP_CSAP_DEF_COMMUNITY
#define SNMP_CSAP_DEF_LOCPORT
#define SNMP_CSAP_DEF_REMPORT
#define SNMP_CSAP_DEF_REPEATS
#define SNMP_CSAP_DEF_TIMEOUT
#define SNMP_CSAP_DEF_VERSION
#define SNMP_GET_TABLE_ROWS(ta_, sid_, csap_id_, label_, num_, suffixes_, result_)
#define SNMP_LOAD_MIB(mib_file_)
#define SNMP_LOAD_MIB_WITH_PATH(dir_path_, mib_file_)
#define SNMP_MAKE_INSTANCE(label_, oid_, indeces_...)
#define SNMP_MAKE_OID(label_, oid_)
#define SNMP_MAKE_TBL_INDEX(label_, index_...)
#define SOCKADDR_H2STR_SBUF(_addr, _buf)
#define SOCKET_FLAGS_MAPPING_LIST
#define SOCKLEVEL_MAPPING_LIST
#define SOCKOPT_MAPPING_LIST
#define SOCK_TYPE_MAPPING_LIST
#define SPLICE_FLAGS_MAPPING_LIST
#define SS(_p)
#define SS_FLAGS_MAPPING_LIST
#define STAILQ_CONCAT(head1, head2)
#define STAILQ_EMPTY(head)
#define STAILQ_ENTRY(type)
#define STAILQ_FIRST(head)
#define STAILQ_FOREACH(var, head, field)
#define STAILQ_FOREACH_SAFE(var, head, field, tvar)
#define STAILQ_HEAD(name, type)
#define STAILQ_HEAD_INITIALIZER(head)
#define STAILQ_INIT(head)
#define STAILQ_INSERT_AFTER(head, tqelm, elm, field)
#define STAILQ_INSERT_HEAD(head, elm, field)
#define STAILQ_INSERT_TAIL(head, elm, field)
#define STAILQ_LAST(head, type, field)
#define STAILQ_NEXT(elm, field)
#define STAILQ_REMOVE(head, elm, type, field)
#define STAILQ_REMOVE_HEAD(head, field)
#define STARTDEF(_name)
#define STATUS_SNACK_ENABLE
#define STDC_HEADERS
#define STEP_ITER_MATCH_FLAGS
#define STP_BPDU_CFG_TYPE
#define STP_BPDU_TCN_TYPE
#define SUB_TV(res, ts1, ts2)
#define SUN(_p)
#define SUN_NAME(_p)
#define SWAP_PTRS(_p1, _p2)
#define SYS_recvmmsg
#define SYS_sendmmsg
#define S_BIT
#define TADF_SENDQ_LIST_SIZE_MAX
#define TAD_ARG_SIMPLE_FOR_BEGIN_DEF
#define TAD_ARG_SIMPLE_FOR_STEP_DEF
#define TAD_CKSUM_STR_VAL_CORRECT
#define TAD_CKSUM_STR_VAL_CORRECT_OR_ZERO
#define TAD_CKSUM_STR_VAL_INCORRECT
#define TAD_ETH_RECV_ALL
#define TAD_ETH_RECV_DEF
#define TAD_ETH_RECV_NO
#define TAD_ETH_SAP_IFNAME_SIZE
#define TAD_IP4_HDR_LEN
#define TAD_IP6_HDR_LEN
#define TAD_PKT_FOR_EACH_PKT_FWD(_head, _pkt)
#define TAD_PKT_FOR_EACH_PKT_REV(_head, _pkt)
#define TAD_PKT_FOR_EACH_SEG_FWD(_head, _seg)
#define TAD_SA2ARGS(_loc, _rem)
#define TAD_TCP_HDR_LEN
#define TAD_TIMEOUT_DEF
#define TAD_TIMEOUT_INF
#define TAD_UDP_HDR_LEN
#define TAD_VLAN_TAG_LEN
#define TAILQ_CONCAT(head1, head2, field)
#define TAILQ_EMPTY(head)
#define TAILQ_ENTRY(type)
#define TAILQ_FIRST(head)
#define TAILQ_FOREACH(var, head, field)
#define TAILQ_FOREACH_REVERSE(var, head, headname, field)
#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar)
#define TAILQ_FOREACH_SAFE(var, head, field, tvar)
#define TAILQ_HEAD(name, type)
#define TAILQ_HEAD_INITIALIZER(head)
#define TAILQ_INIT(head)
#define TAILQ_INSERT_AFTER(head, listelm, elm, field)
#define TAILQ_INSERT_BEFORE(listelm, elm, field)
#define TAILQ_INSERT_HEAD(head, elm, field)
#define TAILQ_INSERT_TAIL(head, elm, field)
#define TAILQ_LAST(head, headname)
#define TAILQ_NEXT(elm, field)
#define TAILQ_PREV(elm, headname, field)
#define TAILQ_REMOVE(head, elm, field)
#define TAPI_ADDRESS_TYPE
#define TAPI_ARP_FILL_ETH_HDR(arp_frame_, src_mac_, dst_mac_)
#define TAPI_ARP_FILL_HDR(arp_frame_, op_, snd_hw_, snd_proto_, tgt_hw_, tgt_proto_)
#define TAPI_AUTH_CIPHER_CCMP
#define TAPI_AUTH_CIPHER_NONE
#define TAPI_AUTH_CIPHER_TKIP
#define TAPI_AUTH_CIPHER_WEP
#define TAPI_AUTH_CIPHER_WEP104
#define TAPI_AUTH_CIPHER_WEP40
#define TAPI_BPF_RXQ_STATS_XSK_MAP
#define TAPI_BPF_STIM_STIMULUS
#define TAPI_CACHE_ALL
#define TAPI_CACHE_ROOT_INST
#define TAPI_CACHE_ROOT_OID
#define TAPI_CFG_CPU_NCORES_FACTOR
#define TAPI_CFG_CPU_NPROC_FACTOR
#define TAPI_CFG_IF_FC_INIT
#define TAPI_CFG_IF_RSS_HFUNC_NAME_LEN
#define TAPI_CFG_IPTABLES_CMD_LEN_MAX
#define TAPI_CFG_IPVLAN_FLAG_BRIDGE
#define TAPI_CFG_IPVLAN_FLAG_DEFAULT
#define TAPI_CFG_IPVLAN_FLAG_PRIVATE
#define TAPI_CFG_IPVLAN_FLAG_VEPA
#define TAPI_CFG_IPVLAN_MODE_DEFAULT
#define TAPI_CFG_IPVLAN_MODE_L2
#define TAPI_CFG_IPVLAN_MODE_L3
#define TAPI_CFG_IPVLAN_MODE_L3S
#define TAPI_CFG_LINK_PREFIX
#define TAPI_CFG_MACVLAN_MODE_BRIDGE
#define TAPI_CFG_MACVLAN_MODE_PASSTHRU
#define TAPI_CFG_MACVLAN_MODE_PRIVATE
#define TAPI_CFG_MACVLAN_MODE_VEPA
#define TAPI_CFG_NETEM_MAX_PARAM_LEN
#define TAPI_CFG_QDISC_PARAM_FMT
#define TAPI_CFG_RX_RULE_FIELD_ACC(field_, type_)
#define TAPI_CLI_CSAP_CREATE_SERIAL(ta_name, sid, device, user, pwd, cprompt, cli_csap)
#define TAPI_CLI_CSAP_CREATE_SHELL(ta_name, sid, shell_args, cprompt, lprompt, user, pprompt, pwd, cli_csap)
#define TAPI_CLI_CSAP_CREATE_SSH(ta_name, sid, host, user, pwd, cprompt, cli_csap)
#define TAPI_CLI_CSAP_CREATE_TELNET(ta_name, sid, host, user, pwd, cprompt, cli_csap)
#define TAPI_CLI_SSH_PORT_DFLT
#define TAPI_CLI_TELNET_PORT_DFLT
#define TAPI_CPU_ID_UNSPEC
#define TAPI_DECLARE_ROUTE_GATEWAY_PARAMS
#define TAPI_DPDK_L2FWD_NAME
#define TAPI_DPDK_L2FWD_RECEIVE_TIMEOUT_MS
#define TAPI_DPDK_L2FWD_TERM_TIMEOUT_MS
#define TAPI_DPDK_STATS_GATHERED_RING(title, N, fmt_str, ...)
#define TAPI_DPDK_TESTPMD_ARG_PREFIX
#define TAPI_DPDK_TESTPMD_COMMAND_PREFIX
#define TAPI_DPDK_TESTPMD_NAME
#define TAPI_DPDK_TESTPMD_RECEIVE_TIMEOUT_MS
#define TAPI_DPDK_TESTPMD_TERM_TIMEOUT_MS
#define TAPI_DPDK_TESTPMD_TSO_MSS_HDRS_LEN
#define TAPI_ETHTOOL_MAX_STR
#define TAPI_FIO_IOENGINE_MAPPING_LIST
#define TAPI_FIO_MAX_NUMJOBS
#define TAPI_FIO_MAX_REPORT
#define TAPI_FIO_OPTS_DEFAULTS
#define TAPI_FIO_RWTYPE_MAPPING_LIST
#define TAPI_FIO_TIMEOUT_DEFAULT
#define TAPI_FLOW_RECV_COUNT_MAX
#define TAPI_FLOW_RECV_TIMEOUT
#define TAPI_GET_ROUTE_GATEWAY_PARAMS
#define TAPI_GTEST_DEFAULTS
#define TAPI_GTEST_IMPL_DEFAULTS
#define TAPI_HAPROXY_CONF_DEFAULT_TIMEOUT_MS
#define TAPI_HAPROXY_CONF_FILENAME_SUFFIX
#define TAPI_HAPROXY_PATH
#define TAPI_HAPROXY_TERM_TIMEOUT_MS
#define TAPI_IGMP1_TYPE_REPORT
#define TAPI_IGMP2_TYPE_LEAVE
#define TAPI_IGMP2_TYPE_REPORT
#define TAPI_IGMP3_GROUP_LIST_SIZE_MAX
#define TAPI_IGMP3_GROUP_RECORD_HDR_LEN
#define TAPI_IGMP3_IP4_TOS_DEFAULT
#define TAPI_IGMP3_QUERY_MAX_RESP_TIME_MAX_S
#define TAPI_IGMP3_QUERY_QQI_DEFAULT_S
#define TAPI_IGMP3_QUERY_QQI_MAX_S
#define TAPI_IGMP3_QUERY_QRV_DEFAULT
#define TAPI_IGMP3_QUERY_S_DEFAULT
#define TAPI_IGMP3_SRC_LIST_SIZE_MAX
#define TAPI_IGMP3_TYPE_REPORT
#define TAPI_IGMP_IP4_TOS_DEFAULT
#define TAPI_IGMP_IP4_TTL_DEFAULT
#define TAPI_IGMP_QUERY_MAX_RESP_TIME_DEFAULT_S
#define TAPI_IGMP_TYPE_QUERY
#define TAPI_INIT_ROUTE_GATEWAY(gw_)
#define TAPI_IOMUX_MAPPING_LIST
#define TAPI_IOMUX_MAX
#define TAPI_IOMUX_MIN
#define TAPI_IPV6_VERSION
#define TAPI_IPV6_VERSION_MASK
#define TAPI_ISCSI_KEY_INVALID
#define TAPI_JMP_DO(_val)
#define TAPI_JMP_POP
#define TAPI_JOB_BUFFER_INIT
#define TAPI_JOB_CHANNEL_SET(...)
#define TAPI_JOB_CHECK_STATUS(_status)
#define TAPI_JOB_OPT_ADDR_PORT_PTR(_prefix, _concat_prefix, _struct, _field)
#define TAPI_JOB_OPT_ADDR_PORT_PTR_TYPE
#define TAPI_JOB_OPT_ARRAY(_struct, _lenfield, _arrfield, ...)
#define TAPI_JOB_OPT_ARRAY_GEN(func_, prefix_, concat_prefix_, sep_, suffix_, struct_, lenfield_, arrfield_, is_ptr_, ...)
#define TAPI_JOB_OPT_ARRAY_PTR(struct_, lenfield_, arrfield_, ...)
#define TAPI_JOB_OPT_BOOL(_prefix, _struct, _field)
#define TAPI_JOB_OPT_BOOL_TYPE
#define TAPI_JOB_OPT_CONTENT(optname_, ...)
#define TAPI_JOB_OPT_DOUBLE(_prefix, _concat_prefix, _suffix, _struct, _field)
#define TAPI_JOB_OPT_DOUBLE_TYPE
#define TAPI_JOB_OPT_DOUBLE_UNDEF
#define TAPI_JOB_OPT_DOUBLE_VAL(_x)
#define TAPI_JOB_OPT_DUMMY(_prefix)
#define TAPI_JOB_OPT_EMBED_ARRAY(_prefix, _concat_prefix, _sep, _suffix, _struct, _lenfield, _arrfield, ...)
#define TAPI_JOB_OPT_EMBED_ARRAY_PTR(prefix_, concat_prefix_, sep_, suffix_, struct_, lenfield_, arrfield_, ...)
#define TAPI_JOB_OPT_ENUM(_prefix, _concat_prefix, _struct, _field, _map)
#define TAPI_JOB_OPT_ENUM_BOOL(_prefix, _concat_prefix, _struct, _field, _map)
#define TAPI_JOB_OPT_ENUM_BOOL3(_prefix, _concat_prefix, _struct, _field, _map)
#define TAPI_JOB_OPT_ENUM_UNDEF
#define TAPI_JOB_OPT_OFFSETOF_CHK_SIZE(_struct, _field, _exptype)
#define TAPI_JOB_OPT_OMIT_UINT
#define TAPI_JOB_OPT_QUOTED_STRING(prefix_, quotation_mark_, struct_, field_)
#define TAPI_JOB_OPT_QUOTED_STRING_TYPE
#define TAPI_JOB_OPT_SET(...)
#define TAPI_JOB_OPT_SOCKADDR_PTR(_prefix, _concat_prefix, _struct, _field)
#define TAPI_JOB_OPT_SOCKADDR_PTR_TYPE
#define TAPI_JOB_OPT_SOCKADDR_SUBNET(prefix_, concat_prefix_, struct_, field_)
#define TAPI_JOB_OPT_SOCKADDR_SUBNET_TYPE
#define TAPI_JOB_OPT_SOCKPORT_PTR(_prefix, _concat_prefix, _struct, _field)
#define TAPI_JOB_OPT_SOCKPORT_PTR_TYPE
#define TAPI_JOB_OPT_STRING(_prefix, _concat_prefix, _struct, _field)
#define TAPI_JOB_OPT_STRING_TYPE
#define TAPI_JOB_OPT_STRUCT(_prefix, _concat_prefix, _sep, _suffix, ...)
#define TAPI_JOB_OPT_UINT(_prefix, _concat_prefix, _suffix, _struct, _field)
#define TAPI_JOB_OPT_UINTMAX_T(_prefix, _concat_prefix, _suffix, _struct, _field)
#define TAPI_JOB_OPT_UINTMAX_T_TYPE
#define TAPI_JOB_OPT_UINTMAX_UNDEF
#define TAPI_JOB_OPT_UINTMAX_VAL(_x)
#define TAPI_JOB_OPT_UINT_OMITTABLE(_prefix, _concat_prefix, _suffix, _struct, _field)
#define TAPI_JOB_OPT_UINT_OMITTABLE_TYPE
#define TAPI_JOB_OPT_UINT_T(_prefix, _concat_prefix, _suffix, _struct, _field)
#define TAPI_JOB_OPT_UINT_TYPE
#define TAPI_JOB_OPT_UINT_T_HEX(_prefix, _concat_prefix, _suffix, _struct, _field)
#define TAPI_JOB_OPT_UINT_T_HEX_TYPE
#define TAPI_JOB_OPT_UINT_T_OCTAL(_prefix, _concat_prefix, _suffix, _struct, _field)
#define TAPI_JOB_OPT_UINT_T_OCTAL_TYPE
#define TAPI_JOB_OPT_UINT_T_TYPE
#define TAPI_JOB_OPT_UINT_UNDEF
#define TAPI_JOB_OPT_UINT_VAL(_x)
#define TAPI_JOB_SIMPLE_FILTERS(...)
#define TAPI_LOCAL_FS_FOREACH(var_, head_, file_)
#define TAPI_LOCAL_FS_FOREACH_DIR(var_, head_, dir_)
#define TAPI_LOCAL_FS_FOREACH_FILE(var_, head_, file_)
#define TAPI_LOCAL_FS_FOREACH_RECURSIVE(pathname_, cb_func_, user_data_)
#define TAPI_LOCAL_FS_ROOT
#define TAPI_MCAST_ADDR_ALL_HOSTS
#define TAPI_MCAST_ADDR_ALL_MCR
#define TAPI_MCAST_ADDR_ALL_ROUTERS
#define TAPI_MEMASLAP_SERVERS_MAX
#define TAPI_NETIF_MSG_ALL
#define TAPI_NVME_CONNECT_OPTS_DEFAULTS
#define TAPI_NVME_HOST_CTRL_DEFAULTS
#define TAPI_NVME_INTERNAL_DEF_TIMEOUT
#define TAPI_NVME_INTERNAL_MODE
#define TAPI_NVME_KERN_METHODS_DEFAULTS
#define TAPI_NVME_KERN_TARGET
#define TAPI_NVME_ONVME_TARGET
#define TAPI_NVME_ONVME_TARGET_METHODS
#define TAPI_NVME_ONVME_TARGET_OPTS_DEFAULTS
#define TAPI_NVME_ONVME_TARGET_PROC_DEFAULTS
#define TAPI_NVME_TARGET_DEFAULTS
#define TAPI_NVME_TARGET_METHODS_DEFAULTS
#define TAPI_NVME_TRANSPORT_MAPPING_LIST
#define TAPI_ON_JMP(x)
#define TAPI_ON_JMP_DO_SAFE_RC
#define TAPI_ON_JMP_DO_SAFE_VOID
#define TAPI_OPENVPN_ACCESSOR(name_, prop_, c_type_, cfg_type_)
#define TAPI_OVS_OTHER_CFG
#define TAPI_PERF_BENCH_MAPPING_LIST
#define TAPI_PERF_INTERVAL_DISABLED
#define TAPI_PERF_TIMEOUT_DEFAULT
#define TAPI_RADIUS_ACCT_PORT
#define TAPI_RADIUS_ATTR_MIN_LEN
#define TAPI_RADIUS_AUTH_LEN
#define TAPI_RADIUS_AUTH_PORT
#define TAPI_RADIUS_PACKET_MAX_LEN
#define TAPI_RADIUS_PACKET_MIN_LEN
#define TAPI_READ_BUF_SIZE
#define TAPI_REDIS_BENCHMARK_RECEIVE_TIMEOUT_MS
#define TAPI_REDIS_BENCHMARK_TIMEOUT_MS
#define TAPI_REDIS_SRV_TIMEOUT_MS
#define TAPI_RPC_BUF_RAND
#define TAPI_RPC_CHECK_OUT_ARG_SINGLE_PTR(_func, _arg)
#define TAPI_RPC_COPY_OUT_ARG_IF_PTR_NOT_NULL(_arg)
#define TAPI_RPC_JOB_BIG_TIMEOUT_MS
#define TAPI_RPC_JUMP_VERDICT(_func, _rpcs)
#define TAPI_RPC_LOG(rpcs, func, in_format, out_format, _x...)
#define TAPI_RPC_LOG_ARG_TO_STR(_in_or_out, _arg, _log_buf, _func_arg_to_str)
#define TAPI_RPC_NAMESPACE_CHECK(_rpcs, _ptr, _ns)
#define TAPI_RPC_NAMESPACE_CHECK_JUMP(_rpcs, _ptr, _ns)
#define TAPI_RPC_OUT(_func, _res)
#define TAPI_RPC_SET_IN_ARG_IF_PTR_NOT_NULL(_arg)
#define TAPI_RPC_TIMEOUT_EXTRA_SEC
#define TAPI_RTE_MBUF_CKSUM_BITS
#define TAPI_RTE_MBUF_CKSUM_L3_OFF
#define TAPI_RTE_MBUF_CKSUM_L4_OFF
#define TAPI_RTE_VERSION_NUM(a, b, c, d)
#define TAPI_RT_GW
#define TAPI_RT_IF
#define TAPI_RT_METRIC
#define TAPI_RT_SRC
#define TAPI_RT_TABLE
#define TAPI_RT_TABLE_LOCAL
#define TAPI_RT_TABLE_MAIN
#define TAPI_RT_TOS
#define TAPI_SERIAL_DEFAULT_USER
#define TAPI_SFNT_PP_MUXER_MAP_LIST
#define TAPI_SNMP_APPEND_OID_SUBID(oid_, subid_)
#define TAPI_SNMP_CHECK_INTEGER(ta, sid, csap_id, name, value, err_stat, sub_id...)
#define TAPI_SNMP_CREATE_OID(oid_, len_, sub_ids_...)
#define TAPI_SNMP_GET(ta, sid, csap_id, name, next, vb, err_stat, sub_id...)
#define TAPI_SNMP_GET_INTEGER(ta, sid, csap_id, name, value, err_stat, sub_id...)
#define TAPI_SNMP_GET_OCTETSTRING(ta, sid, csap_id, name, value, size, err_stat, sub_id...)
#define TAPI_SNMP_GET_SUBTABLE(tbl_, tbl_size_, index_prefix_, sub_tbl_, sub_tbl_size_)
#define TAPI_SNMP_GET_SYNTAX(label_, syntax_)
#define TAPI_SNMP_GET_TABLE(ta_, sid_, csap_id_, label_, num_, result_)
#define TAPI_SNMP_GET_TABLE_COLUMNS(label_, columns_)
#define TAPI_SNMP_GET_TABLE_DIMENSION(label_, dimension_)
#define TAPI_SNMP_GET_UNSIGNED(ta, sid, csap_id, name, value, err_stat, sub_id...)
#define TAPI_SNMP_MAKE_OID(label_, oid_)
#define TAPI_SNMP_MAKE_VB(vb_, oid_, type_, value_...)
#define TAPI_SNMP_OID_ZERO(oid_)
#define TAPI_SNMP_SET(ta, sid, csap_id, err_stat, err_index, values...)
#define TAPI_SNMP_SET_INTEGER(ta, sid, csap_id, name, value, err_stat, sub_id...)
#define TAPI_SNMP_SET_OCTETSTRING(ta, sid, csap_id, name, value, length, err_stat, sub_id...)
#define TAPI_SNMP_SET_ROW(ta, sid, csap_id, err_stat, err_index, index, values...)
#define TAPI_SNMP_SET_STRING(ta, sid, csap_id, name, value, err_stat, sub_id...)
#define TAPI_SNMP_SET_UNSIGNED(ta, sid, csap_id, name, value, err_stat, sub_id...)
#define TAPI_SNMP_TRAP_PORT
#define TAPI_SNMP_WALK(ta, sid, csap_id, name, userdata, callback)
#define TAPI_SOCK_SEND_FUNC_LIST
#define TAPI_SSH_APP_WAIT_TIME_MS
#define TAPI_SSH_NB_CHANNELS
#define TAPI_STORAGE_AUTH_INIT
#define TAPI_STORAGE_CLIENT_INIT
#define TAPI_STORAGE_SERVER_INIT
#define TAPI_STRESS_DEFAULT_TERM_TIMEOUT_MS
#define TAPI_TCP_DEF_WINDOW
#define TAPI_TCP_ZERO_WINDOW
#define TAPI_TREX_CLIENT(...)
#define TAPI_TREX_CLIENTS(...)
#define TAPI_TREX_DEFAULT_CLIENT_HTTP_PAYLOAD
#define TAPI_TREX_DEFAULT_SERVER_HTTP_PAYLOAD
#define TAPI_TREX_LINUX_IFACE(ta_, iface_)
#define TAPI_TREX_PCI_BY_BDF(ta_, addr_)
#define TAPI_TREX_PCI_BY_IFACE(ta_, iface_)
#define TAPI_TREX_SERVER(...)
#define TAPI_TREX_SERVERS(...)
#define TAPI_UPNP_ST_ALL_RESOURCES
#define TAPI_UPNP_ST_ALL_ROOT_DEVICES
#define TAPI_UPNP_ST_CONTENT_DIRECTORY
#define TAPI_WAIT_NETWORK
#define TAPI_WAIT_NETWORK_DELAY
#define TAPI_WIFI_CIPHER_MAPPING_LIST
#define TAPI_WIFI_POLICY_MAPPING_LIST
#define TAPI_WRK_HEADERS_MAX
#define TAPI_WRK_LATENCY_DISTR_ENTRIES
#define TAPI_WRK_SCRIPT_ARGS_MAX
#define TARPC_CHECK_RC(expr_)
#define TARPC_CHECK_RC(expr_)
#define TARPC_ENSURE_NOT_NULL(_inname)
#define TARPC_FIND_FUNC_RETURN(_libflags, _fname, _fp)
#define TARPC_FUNC(_func, _copy_args, _actions)
#define TARPC_FUNC(_func, _copy_args, _actions)
#define TARPC_FUNC_COMMON(_safe, _static, _func, _copy_args, _actions)
#define TARPC_FUNC_DECL_SAFE(_func)
#define TARPC_FUNC_DECL_STANDALONE(_func)
#define TARPC_FUNC_DECL_UNSAFE(_func)
#define TARPC_FUNC_DYNAMIC_UNSAFE(_func, _copy_args, _actions)
#define TARPC_FUNC_INIT_DYNAMIC(_func)
#define TARPC_FUNC_INIT_STANDALONE(_func)
#define TARPC_FUNC_INIT_STATIC(_func)
#define TARPC_FUNC_STANDALONE(_func, _copy_args, _actions)
#define TARPC_FUNC_STATIC(_func, _copy_args, _actions)
#define TARPC_FUNC_STATIC_UNSAFE(_func, _copy_args, _actions)
#define TARPC_FUNC_UNUSED_SAFE
#define TARPC_FUNC_UNUSED_STANDALONE
#define TARPC_FUNC_UNUSED_UNSAFE
#define TARPC_LCG_LEN(_len)
#define TARPC_LCG_MAX_OFFSET
#define TARPC_PAT_GEN_ARG_FMT
#define TARPC_PAT_GEN_ARG_VAL(_gen_arg)
#define TARPC_RTE_MBUF_F_RX_IP_CKSUM_BAD
#define TARPC_RTE_MBUF_F_RX_IP_CKSUM_GOOD
#define TARPC_RTE_MBUF_F_RX_IP_CKSUM_MASK
#define TARPC_RTE_MBUF_F_RX_IP_CKSUM_NONE
#define TARPC_RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN
#define TARPC_RTE_MBUF_F_RX_L4_CKSUM_BAD
#define TARPC_RTE_MBUF_F_RX_L4_CKSUM_GOOD
#define TARPC_RTE_MBUF_F_RX_L4_CKSUM_MASK
#define TARPC_RTE_MBUF_F_RX_L4_CKSUM_NONE
#define TARPC_RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN
#define TARPC_SYSCALL_WRAPPER(_name, _rettype, _args, ...)
#define TA_CHECKING
#define TA_DEAD
#define TA_DOWN
#define TA_ETHTOOL_LMODE_MASKS
#define TA_ETHTOOL_LMODE_MASK_WORDS_MAX
#define TA_FAKE
#define TA_JOB_BUFFER_INIT
#define TA_LOCAL
#define TA_LOG_ARGS_MAX
#define TA_LOG_FORCE_NEW
#define TA_NO_HKEY_CHK
#define TA_OBJ_TYPE_BLACKHOLE
#define TA_OBJ_TYPE_IF_COALESCE
#define TA_OBJ_TYPE_IF_LINK_SETS
#define TA_OBJ_TYPE_IF_PAUSE
#define TA_OBJ_TYPE_IF_PFLAGS
#define TA_OBJ_TYPE_IF_RSSH
#define TA_OBJ_TYPE_IF_RX_CLS_RULE
#define TA_OBJ_TYPE_IF_RX_CLS_RULES
#define TA_OBJ_TYPE_IF_STRINGS
#define TA_OBJ_TYPE_ROUTE
#define TA_OBJ_TYPE_SNIFFER
#define TA_PROXY
#define TA_REBOOTABLE
#define TA_REBOOTING
#define TA_RT_INFO_FLG_GW
#define TA_RT_INFO_FLG_HOPLIMIT
#define TA_RT_INFO_FLG_IF
#define TA_RT_INFO_FLG_IRTT
#define TA_RT_INFO_FLG_METRIC
#define TA_RT_INFO_FLG_MTU
#define TA_RT_INFO_FLG_MULTIPATH
#define TA_RT_INFO_FLG_SRC
#define TA_RT_INFO_FLG_TABLE
#define TA_RT_INFO_FLG_TOS
#define TA_RT_INFO_FLG_WIN
#define TA_RT_NEXTHOP_FLG_GW
#define TA_RT_NEXTHOP_FLG_OIF
#define TA_UNRECOVER
#define TCPI_OPTS_MAPPING_LIST
#define TCPI_OPT_ECN
#define TCPI_OPT_ECN_SEEN
#define TCPI_OPT_SACK
#define TCPI_OPT_TIMESTAMPS
#define TCPI_OPT_UNKNOWN
#define TCPI_OPT_WSCALE
#define TCP_ACK_FLAG
#define TCP_CA_STATE_MAPPING_LIST
#define TCP_CWR_FLAG
#define TCP_ECE_FLAG
#define TCP_FIN_FLAG
#define TCP_HDR_CKSUM_DU_INDEX
#define TCP_PSH_FLAG
#define TCP_RST_FLAG
#define TCP_STATE_MAPPING_LIST
#define TCP_SYN_FLAG
#define TCP_URG_FLAG
#define TESTER_ASSEMBLE_PLAN
#define TESTER_BREAK_SESSION
#define TESTER_CFG_WALK_FORCE_EXCEPTION
#define TESTER_CFG_WALK_OUTPUT_PARAMS
#define TESTER_CFG_WALK_SERVICE
#define TESTER_CFG_WALK_SKIP_REPEAT
#define TESTER_CMD_MONITOR_NAME_LEN
#define TESTER_FAIL_ON_LEAK
#define TESTER_FAKE
#define TESTER_FORCE_RUN
#define TESTER_GDB
#define TESTER_HANDDOWN_DEF
#define TESTER_INLOGUE
#define TESTER_INTERACTIVE
#define TESTER_IPC
#define TESTER_IPC_SERVER_ENV
#define TESTER_LOG_IGNORE_RUN_NAME
#define TESTER_LOG_REQS_LIST
#define TESTER_MIX_ARGS
#define TESTER_MIX_ITERS
#define TESTER_MIX_SESSIONS
#define TESTER_MIX_TESTS
#define TESTER_MIX_VALUES
#define TESTER_NO_BUILD
#define TESTER_NO_CFG_TRACK
#define TESTER_NO_CS
#define TESTER_NO_LOGUES
#define TESTER_NO_RUN
#define TESTER_NO_SIMULT
#define TESTER_NO_TRC
#define TESTER_ONLY_REQ_LOGUES
#define TESTER_OUT_EXP
#define TESTER_OUT_TEST_PARAMS
#define TESTER_OUT_TIN
#define TESTER_PRERUN
#define TESTER_QUIET_SKIP
#define TESTER_RUN
#define TESTER_RUNPATH
#define TESTER_RUN_UNTIL_VERDICT
#define TESTER_RUN_WHILE_EXPECTED
#define TESTER_RUN_WHILE_FAILED
#define TESTER_RUN_WHILE_PASSED
#define TESTER_RUN_WHILE_UNEXPECTED
#define TESTER_SHUTDOWN
#define TESTER_TIMEOUT_DEF
#define TESTER_TRACK_CONF_DEF
#define TESTER_TRACK_CONF_UNSPEC
#define TESTER_VALGRIND
#define TESTER_VERBOSE
#define TESTER_VERB_SKIP
#define TESTER_VVERB
#define TEST_ARG_ENV_PREFIX
#define TEST_ARG_ENV_PREFIX
#define TEST_ARG_VAR_PREFIX
#define TEST_ARG_VAR_PREFIX
#define TEST_ARTIFACT(_fmt...)
#define TEST_BEHAVIOUR(name_)
#define TEST_BEHAVIOUR_DEF
#define TEST_DEFAULT_DOUBLE_PARAM(var_name_)
#define TEST_DEFAULT_UINT64_PARAM(var_name_)
#define TEST_DOUBLE_PARAM(var_name_)
#define TEST_END
#define TEST_END_ENV
#define TEST_END_SPECIFIC
#define TEST_ENUM_PARAM(var_name_, maps_...)
#define TEST_EXPECTED_RESULT_PARAM(var_name_)
#define TEST_FAIL(fmt...)
#define TEST_FILENAME_PARAM(var_name_)
#define TEST_FIO_IOENGINE_PARAM(var_name_)
#define TEST_FIO_NUMJOBS_PARAM(var_name_)
#define TEST_FIO_RWTYPE_PARAM(var_name_)
#define TEST_GET_ADDR(pco_, addr_)
#define TEST_GET_ADDR_FAMILY(var_name_)
#define TEST_GET_ADDR_NO_PORT(addr_)
#define TEST_GET_ADDR_REUSE_PORT(pco_, src_, addr_)
#define TEST_GET_BIT_MASK_PARAM(var_name_, maps_...)
#define TEST_GET_BOOL3_PARAM(var_name_)
#define TEST_GET_BOOL_PARAM(var_name_)
#define TEST_GET_BR(if_, br_)
#define TEST_GET_BUFF_SIZE(var_name_)
#define TEST_GET_CT_STIMULUS_PARAM(_var_name)
#define TEST_GET_DEFAULT_DOUBLE_PARAM(var_name_)
#define TEST_GET_DEFAULT_UINT64_PARAM(var_name_)
#define TEST_GET_DOMAIN(var_name_)
#define TEST_GET_DOUBLE_PARAM(var_name_)
#define TEST_GET_ENUM_PARAM(var_name_, maps_...)
#define TEST_GET_ENV_IF(env_if_)
#define TEST_GET_ERRNO_PARAM(var_name_)
#define TEST_GET_ETHDEV_STATE(var_name_)
#define TEST_GET_EXPECTED_RESULT_PARAM(var_name_)
#define TEST_GET_FILENAME_PARAM(var_name_)
#define TEST_GET_FILTER_TYPE(var_name_)
#define TEST_GET_FIO_IOENGINE_PARAM(var_name_)
#define TEST_GET_FIO_NUMJOBS_PARAM(var_name_)
#define TEST_GET_FIO_RWTYPE_PARAM(var_name_)
#define TEST_GET_FLOW_CONFIG(_flow, _do_preprocess)
#define TEST_GET_GTEST_PARAM(_gtest)
#define TEST_GET_HOST(host_)
#define TEST_GET_IF(if_)
#define TEST_GET_INT64_PARAM(var_name_)
#define TEST_GET_INT_LIST_PARAM(var_name_, var_len_)
#define TEST_GET_INT_PARAM(var_name_)
#define TEST_GET_IOCTL_REQ(var_name_)
#define TEST_GET_IP4_PARAM(var_name_)
#define TEST_GET_LINK_ADDR(addr_)
#define TEST_GET_NDN_RTE_FLOW_ACTIONS(_var_name)
#define TEST_GET_NDN_RTE_FLOW_ATTR(_var_name)
#define TEST_GET_NDN_RTE_FLOW_PATTERN(_var_name)
#define TEST_GET_NDN_RTE_FLOW_RULE(_var_name)
#define TEST_GET_NDN_RTE_FLOW_RULE_GENERIC(_var_name, _rte_flow_ndn_type)
#define TEST_GET_NDN_TRAFFIC_TEMPLATE(_var_name)
#define TEST_GET_NET(net_)
#define TEST_GET_OCTET_STRING_LIST_PARAM(var_name_, var_list_len_, var_str_len_)
#define TEST_GET_OCTET_STRING_PARAM(var_name_, var_len_)
#define TEST_GET_OPT_DOUBLE_PARAM(var_name_)
#define TEST_GET_OPT_STRING_PARAM(var_name_)
#define TEST_GET_OPT_UINT64_PARAM(var_name_)
#define TEST_GET_OPT_UINT_PARAM(var_name_)
#define TEST_GET_OPT_VALUE_BIN_UNIT_PARAM(var_name_)
#define TEST_GET_OPT_VALUE_UNIT_PARAM(var_name_)
#define TEST_GET_PCO(rpcs_)
#define TEST_GET_PERF_BENCH(var_name_)
#define TEST_GET_PH(if_, ph_)
#define TEST_GET_POLL_EVT(var_name_)
#define TEST_GET_PROTOCOL(var_name_)
#define TEST_GET_RPCS(_ta, _name, _rpcs)
#define TEST_GET_RPCS_SAFE(_ta, _name, _rpcs)
#define TEST_GET_SFNT_PP_MUXER(var_name_)
#define TEST_GET_SHUT_HOW(var_name_)
#define TEST_GET_SIGNUM(var_name_)
#define TEST_GET_SOCKLEVEL(var_name_)
#define TEST_GET_SOCKOPT(var_name_)
#define TEST_GET_SOCK_SEND_FUNC(_var_name)
#define TEST_GET_SOCK_TYPE(var_name_)
#define TEST_GET_STRING_LIST_PARAM(var_name_, var_len_)
#define TEST_GET_STRING_PARAM(var_name_)
#define TEST_GET_TAG_ADDR(_addr, _tag)
#define TEST_GET_TCP_STATE(var_name_)
#define TEST_GET_TE_INTERFACE_KIND_PARAM(_var_name)
#define TEST_GET_TE_IOMUX_FUNC(var_name_)
#define TEST_GET_TSA_TST_TYPE_PARAM(var_)
#define TEST_GET_TST_IF(_if, _tag)
#define TEST_GET_TUNNEL_TYPE(var_name_)
#define TEST_GET_TYPED_ADDR(_base_addr, _type_arg, _res_addr)
#define TEST_GET_UINT64_PARAM(var_name_)
#define TEST_GET_UINT_PARAM(_parameter)
#define TEST_GET_VALUE_BIN_UNIT_PARAM(var_name_)
#define TEST_GET_VALUE_UNIT_PARAM(var_name_)
#define TEST_GET_WIFI_CIPHER_PARAM(var_name_)
#define TEST_GET_WIFI_POLICY_PARAM(var_name_)
#define TEST_GTEST_PARAM(_gtest)
#define TEST_HAS_PARAM(var_name_)
#define TEST_INHERITED_EXCEPTION
#define TEST_INHERITED_KEEPALIVE
#define TEST_INT64_PARAM(var_name_)
#define TEST_INT_PARAM(var_name_)
#define TEST_LIST_PARAM_SEPARATOR
#define TEST_OBJECTIVE(fmt...)
#define TEST_ON_JMP_DO
#define TEST_ON_JMP_DO_IF_FAILURE
#define TEST_ON_JMP_DO_IF_SUCCESS
#define TEST_ON_JMP_DO_SPECIFIC
#define TEST_OPT_DOUBLE_PARAM(var_name_)
#define TEST_OPT_STRING_PARAM(var_name_)
#define TEST_OPT_UINT64_PARAM(var_name_)
#define TEST_OPT_UINT_PARAM(var_name_)
#define TEST_OPT_VALUE_BIN_UNIT_PARAM(var_name_)
#define TEST_OPT_VALUE_UNIT_PARAM(var_name_)
#define TEST_SKIP(...)
#define TEST_START
#define TEST_START_ENV
#define TEST_START_ENV_VARS
#define TEST_START_SPECIFIC
#define TEST_START_VARS
#define TEST_STEP(_fs...)
#define TEST_STEP_NEXT(_fs...)
#define TEST_STEP_POP(_fs...)
#define TEST_STEP_POP_INFO(_fs...)
#define TEST_STEP_PUSH(_fs...)
#define TEST_STEP_PUSH_INFO(_fs...)
#define TEST_STEP_RESET()
#define TEST_STOP
#define TEST_STRING_PARAM(var_name_)
#define TEST_SUBSTEP(_fs...)
#define TEST_SUCCESS
#define TEST_TE_INTERFACE_KIND_PARAM(_name)
#define TEST_UINT64_PARAM(var_name_)
#define TEST_UINT_PARAM(var_name_)
#define TEST_VALUE_BIN_UNIT_PARAM(var_name_)
#define TEST_VALUE_UNIT_PARAM(var_name_)
#define TEST_VERDICT(fmt...)
#define TEST_WIFI_CIPHER_PARAM(var_name_)
#define TEST_WIFI_POLICY_PARAM(var_name_)
#define TEXT_FUDGE_LEN
#define TE_AF_ETHER
#define TE_AF_TARPC_SA
#define TE_ALIGN(_v, _a)
#define TE_ALIGN_MASK(_v, _m)
#define TE_ALLOC(size_)
#define TE_ALLOC_UNINITIALIZED(size_)
#define TE_ARRAY_LEN(array_)
#define TE_ARRAY_LEN_UNSAFE(array_)
#define TE_ASSERT_ARRAY(obj_)
#define TE_BITSIZE(_typeobj)
#define TE_BPF_CHECK_RC(_expr)
#define TE_BPF_MAP_DEF(_name, _type, _max_entries, _key_type, _value_type)
#define TE_BPF_U8
#define TE_BPF_U8
#define TE_CAST_TYPEOF(obj_)
#define TE_CAST_TYPEOF_PTR(obj_, src_)
#define TE_CFG_TRC_TAGS_FMT
#define TE_CFG_TRC_TAGS_FMT
#define TE_CHARSET_INIT
#define TE_COMM_NET_ENGINE_KEEPCNT
#define TE_COMM_NET_ENGINE_KEEPIDLE
#define TE_COMM_NET_ENGINE_KEEPINTVL
#define TE_COMPILE_TIME_ASSERT(x)
#define TE_COMPILE_TIME_ASSERT_EXPR(x)
#define TE_CONCAT(_a, _b)
#define TE_CONF_OBJ_INIT(_base_type, _methods_value, _field, _flag_value, _options_value)
#define TE_CONST_PTR_CAST(type_, ptr_)
#define TE_COPYRIGHT
#define TE_DBUF_DEFAULT_GROW_FACTOR
#define TE_DBUF_INIT(grow_factor_)
#define TE_DEPRECATED
#define TE_DIV_ROUND_UP(_n, _d)
#define TE_DO_IF_LOG_LEVEL(_lvl, ...)
#define TE_ENUM_MAP_ACTION(ftype_)
#define TE_ENUM_MAP_END
#define TE_ERRNO_LOG_UNKNOWN_OS_ERRNO
#define TE_ERRNO_LOG_UNKNOWN_OS_ERRNO
#define TE_ETHTOOL_UNKNOWN
#define TE_EXEC_CHILD_DEV_NULL_FD
#define TE_EXIT_ERROR
#define TE_EXIT_NOT_FOUND
#define TE_EXIT_SIGINT
#define TE_EXIT_SIGUSR2
#define TE_EXIT_SKIP
#define TE_EXPAND_MAX_POS_ARGS
#define TE_EXTRACT_BITS(v_, start_, len_)
#define TE_FATAL_ERROR(_fmt, ...)
#define TE_FILL_SPEC_ASCII
#define TE_FILL_SPEC_BINARY
#define TE_FILL_SPEC_C_ID
#define TE_FILL_SPEC_DECIMAL
#define TE_FILL_SPEC_FILENAME
#define TE_FILL_SPEC_HEX
#define TE_FILL_SPEC_HEX_LCASE
#define TE_FILL_SPEC_JSON_STR
#define TE_FILL_SPEC_PRINTABLE
#define TE_FILL_SPEC_TEXT
#define TE_FILL_SPEC_URI_CHUNK
#define TE_FILL_SPEC_WORD
#define TE_FILL_SPEC_XML_NAME
#define TE_FILL_SPEC_XML_TEXT
#define TE_FUNC_CAST(_func_type, _func_ptr)
#define TE_HAS_RELIABLE_TYPEOF
#define TE_INTERFACE_KIND_MAPPING_LIST
#define TE_IOCTL_AF_ETHER2LOCAL(_family)
#define TE_IOCTL_AF_LOCAL2ETHER(_family)
#define TE_IOCTL_UNKNOWN
#define TE_IPC_AF_UNIX
#define TE_IPV6_MAX_EXT_HEADERS
#define TE_IP_RULE_FLAG(_flag)
#define TE_IP_RULE_FLAG_DST
#define TE_IP_RULE_FLAG_DSTLEN
#define TE_IP_RULE_FLAG_FAMILY
#define TE_IP_RULE_FLAG_FLOW
#define TE_IP_RULE_FLAG_FWMARK
#define TE_IP_RULE_FLAG_FWMASK
#define TE_IP_RULE_FLAG_GOTO
#define TE_IP_RULE_FLAG_IIFNAME
#define TE_IP_RULE_FLAG_INVERT
#define TE_IP_RULE_FLAG_NONE
#define TE_IP_RULE_FLAG_OIFNAME
#define TE_IP_RULE_FLAG_PRIORITY
#define TE_IP_RULE_FLAG_SRC
#define TE_IP_RULE_FLAG_SRCLEN
#define TE_IP_RULE_FLAG_TABLE
#define TE_IP_RULE_FLAG_TOS
#define TE_IP_RULE_FLAG_TYPE
#define TE_IS_ZERO_FUNC(_n)
#define TE_KVPAIR_STR_DELIMITER
#define TE_LGR_ENTITY
#define TE_LGR_USER
#define TE_LGR_USER
#define TE_LGR_USER
#define TE_LGR_USER
#define TE_LIKE_PRINTF(fmtarg_, va_)
#define TE_LIKE_VPRINTF(fmtarg_)
#define TE_LL_CASE(lvl_)
#define TE_LL_CONTROL
#define TE_LL_CONTROL_STR
#define TE_LL_ENTRY_EXIT
#define TE_LL_ENTRY_EXIT_STR
#define TE_LL_ERROR
#define TE_LL_ERROR_STR
#define TE_LL_INFO
#define TE_LL_INFO_STR
#define TE_LL_MI
#define TE_LL_MI_STR
#define TE_LL_PACKET
#define TE_LL_PACKET_STR
#define TE_LL_RING
#define TE_LL_RING_STR
#define TE_LL_VERB
#define TE_LL_VERB_STR
#define TE_LL_WARN
#define TE_LL_WARN_STR
#define TE_LOG(_level, _entity, _user, _fs...)
#define TE_LOG_ARTIFACT_USER
#define TE_LOG_CMSG_ENTITY_TESTER
#define TE_LOG_CMSG_USER
#define TE_LOG_ENTRY(_us, _fs...)
#define TE_LOG_ERROR(_us, _fs...)
#define TE_LOG_EXEC_PLAN_USER
#define TE_LOG_EXIT(_us, _fs...)
#define TE_LOG_FIELD_MAX
#define TE_LOG_ID_UNDEFINED
#define TE_LOG_INFO(_us, _fs...)
#define TE_LOG_LEVEL
#define TE_LOG_LEVELS_MANDATORY
#define TE_LOG_MSG_COMMON_HDR_SZ
#define TE_LOG_ONCE(_log_fn, _fs...)
#define TE_LOG_PROC_INFO_USER
#define TE_LOG_RAW_EOR_LEN
#define TE_LOG_RING(_us, _fs...)
#define TE_LOG_TRC_TAGS_USER
#define TE_LOG_VERB(_us, _fs...)
#define TE_LOG_VERDICT_USER
#define TE_LOG_VERSION
#define TE_LOG_WARN(_us, _fs...)
#define TE_MAX_IP_ADDR_LEN
#define TE_MAX_SCALE
#define TE_MEAS_STATS_CONTINUE(meas_stats)
#define TE_MEAS_STATS_DEFAULT_DEVIATION_COEFF
#define TE_MEAS_STATS_UPDATE_FAILED(uc)
#define TE_MEMDUP(src_, size_)
#define TE_MIN_ERRNO
#define TE_MIN_ETH_TYPE
#define TE_MI_COMMENTS(...)
#define TE_MI_GRAPH_AUTO_SEQNO
#define TE_MI_LOG_KVPAIRS(...)
#define TE_MI_MEAS(_type, _name, _aggr, _val, _multiplier)
#define TE_MI_MEAS_KEYS(...)
#define TE_MI_MEAS_V(...)
#define TE_MS2NS(_ms)
#define TE_MS2SEC(_ms)
#define TE_MS2US(_ms)
#define TE_NS2MS(_ns)
#define TE_NS2SEC(_ns)
#define TE_NS2TS(_ns, _p_tv)
#define TE_NS2US(_ns)
#define TE_OFFSET_OF(_s, _f)
#define TE_OPTIONAL_DOUBLE_UNDEF
#define TE_OPTIONAL_DOUBLE_VAL(_x)
#define TE_OPTIONAL_UINTMAX_UNDEF
#define TE_OPTIONAL_UINTMAX_VAL(_x)
#define TE_OPTIONAL_UINT_UNDEF
#define TE_OPTIONAL_UINT_VAL(_x)
#define TE_OS_RC(_mod_id, _error)
#define TE_PF_ETHER
#define TE_PHY_AUTONEG_OFF
#define TE_PHY_AUTONEG_ON
#define TE_PHY_AUTONEG_UNKNOWN
#define TE_PHY_DUPLEX_FULL
#define TE_PHY_DUPLEX_HALF
#define TE_PHY_DUPLEX_STRING_FULL
#define TE_PHY_DUPLEX_STRING_HALF
#define TE_PHY_DUPLEX_STRING_UNKNOWN
#define TE_PHY_DUPLEX_UNKNOWN
#define TE_PHY_PAUSE_NONE
#define TE_PHY_PAUSE_SYMMETRIC
#define TE_PHY_PAUSE_SYMMETRIC_RX_ONLY
#define TE_PHY_PAUSE_TX_ONLY
#define TE_PHY_PAUSE_UNKNOWN
#define TE_PHY_SLEEP_TIME
#define TE_PHY_SPEED_10
#define TE_PHY_SPEED_100
#define TE_PHY_SPEED_1000
#define TE_PHY_SPEED_10000
#define TE_PHY_SPEED_100000
#define TE_PHY_SPEED_14000
#define TE_PHY_SPEED_20000
#define TE_PHY_SPEED_200000
#define TE_PHY_SPEED_2500
#define TE_PHY_SPEED_25000
#define TE_PHY_SPEED_40000
#define TE_PHY_SPEED_400000
#define TE_PHY_SPEED_5000
#define TE_PHY_SPEED_50000
#define TE_PHY_SPEED_56000
#define TE_PHY_SPEED_STRING_10
#define TE_PHY_SPEED_STRING_100
#define TE_PHY_SPEED_STRING_1000
#define TE_PHY_SPEED_STRING_10000
#define TE_PHY_SPEED_UNKNOWN
#define TE_PHY_STATE_DOWN
#define TE_PHY_STATE_UNKNOWN
#define TE_PHY_STATE_UP
#define TE_PRINTF_MAC_FMT
#define TE_PRINTF_MAC_VAL(_mac)
#define TE_PRINTF_SIZE_T
#define TE_PRINTF_SOCKLEN_T
#define TE_PRINTF_TESTER_FLAGS
#define TE_PRINTF_TS_FMT
#define TE_PRINTF_TS_VAL(_ts)
#define TE_PROTO_CONFADD
#define TE_PROTO_CONFDEL
#define TE_PROTO_CONFGET
#define TE_PROTO_CONFGRP_END
#define TE_PROTO_CONFGRP_START
#define TE_PROTO_CONFSET
#define TE_PROTO_CSAP_CREATE
#define TE_PROTO_CSAP_DESTROY
#define TE_PROTO_CSAP_PARAM
#define TE_PROTO_EXECUTE
#define TE_PROTO_FDEL
#define TE_PROTO_FGET
#define TE_PROTO_FPUT
#define TE_PROTO_FUNC
#define TE_PROTO_GET_LOG
#define TE_PROTO_GET_SNIFFERS
#define TE_PROTO_GET_SNIF_DUMP
#define TE_PROTO_KILL
#define TE_PROTO_OVERHEAD
#define TE_PROTO_PROCESS
#define TE_PROTO_REBOOT
#define TE_PROTO_RPC
#define TE_PROTO_SHUTDOWN
#define TE_PROTO_THREAD
#define TE_PROTO_TRPOLL
#define TE_PROTO_TRPOLL_CANCEL
#define TE_PROTO_TRRECV_GET
#define TE_PROTO_TRRECV_START
#define TE_PROTO_TRRECV_STOP
#define TE_PROTO_TRRECV_WAIT
#define TE_PROTO_TRSEND_RECV
#define TE_PROTO_TRSEND_START
#define TE_PROTO_TRSEND_STOP
#define TE_PROTO_VREAD
#define TE_PROTO_VWRITE
#define TE_RADVD_CONF_FILENAME
#define TE_RADVD_EMPTY_CFG
#define TE_RADVD_EXECUTABLE_FILENAME
#define TE_RADVD_FIND_CMD
#define TE_RADVD_PID_FILENAME
#define TE_RADVD_RESTART_CMD
#define TE_RADVD_START_CMD
#define TE_RADVD_STOP_CMD
#define TE_RADVD_USERNAME
#define TE_RC(_mod_id, _error)
#define TE_RC_GET_ERROR(_rc)
#define TE_RC_GET_MODULE(_rc)
#define TE_RC_MODULE_SHIFT
#define TE_RC_UPDATE(_rc, _rc_new)
#define TE_RC_UPSTREAM(_mod_id, _rc)
#define TE_REALLOC(ptr_, newsize_)
#define TE_REQUIRE_SENTINEL
#define TE_RGT_MI_GRAPH_AXIS_AUTO_SEQNO
#define TE_RGT_MI_MAX_ERR_LEN
#define TE_RGT_MI_MEAS_VALUE_INIT
#define TE_RING_INIT(type_, destroy_, ring_size_)
#define TE_RING_INIT_AUTOPTR(type_, ring_size_)
#define TE_RPC_CONVERT_NEGATIVE_ERR(_retval)
#define TE_SCALAR_TYPE_LIST(HANDLER_)
#define TE_SEC2MS(_sec)
#define TE_SEC2NS(_sec)
#define TE_SEC2US(_sec)
#define TE_SERIAL_INTERVAL
#define TE_SERIAL_LLEVEL
#define TE_SERIAL_MAX_NAME
#define TE_SERIAL_MAX_NAME
#define TE_SERIAL_MAX_PATH
#define TE_SERIAL_MAX_PATT
#define TE_SERIAL_PARSER_PORT
#define TE_SERIAL_PARSER_USER
#define TE_SERIAL_PORT
#define TE_SERIAL_USER
#define TE_SIZEOF_FIELD(type, field)
#define TE_SNPRINTF(_dst, _size, _fmt...)
#define TE_SOCKADDR_STR_LEN
#define TE_SPRINTF(_buf, _fmt...)
#define TE_STOPWATCH_INIT
#define TE_STRDUP(src_)
#define TE_STRING_BUF_INIT(buf_)
#define TE_STRING_EXT_BUF_INIT(buf_, size_)
#define TE_STRING_GROW_FACTOR
#define TE_STRING_GROW_FACTOR_EXP_LIMIT
#define TE_STRING_INIT
#define TE_STRING_INIT_LEN
#define TE_STRING_INIT_RESERVE(reserved_size_)
#define TE_STRING_INIT_RESERVE_FREE(reserved_size_, free_func_)
#define TE_STRING_INIT_STATIC(_size)
#define TE_STRLCPY(_dst, _src, _size)
#define TE_STRNDUP(src_, maxsize_)
#define TE_STR_HEX_DELIMITER
#define TE_SUBSTRING_INIT(_base)
#define TE_TAD_PPPOE_HDR_LEN
#define TE_TAD_PPP_HDR_LEN
#define TE_TEST_ID_INIT
#define TE_TEST_ID_ROOT_PROLOGUE
#define TE_TEST_OBJECTIVE_ID
#define TE_TEST_OBJECTIVE_ID
#define TE_TEST_STATUS_TO_STR(_status)
#define TE_TIMER_INIT
#define TE_TIN_INVALID
#define TE_TIN_INVALID
#define TE_TMP_BKP_SUFFIX
#define TE_TMP_FILE_SUFFIX
#define TE_TMP_PATH
#define TE_TREE_ATTR_NAME
#define TE_TREE_ATTR_TYPE
#define TE_TREE_ATTR_TYPE_ANNOTATION
#define TE_TREE_ATTR_TYPE_ARRAY
#define TE_TREE_ATTR_TYPE_AUTO
#define TE_TREE_ATTR_TYPE_BOOL
#define TE_TREE_ATTR_TYPE_DICT
#define TE_TREE_ATTR_TYPE_FLOAT
#define TE_TREE_ATTR_TYPE_INT
#define TE_TREE_ATTR_TYPE_NULL
#define TE_TREE_ATTR_TYPE_STRING
#define TE_TREE_ATTR_VALUE
#define TE_TYPEOF(obj_)
#define TE_TYPE_ALTERNATIVE(obj_, type1_, expr1_, type2_, expr2_)
#define TE_TYPE_ASSERT(type_, obj_)
#define TE_UNITS_BIN_G2U(_val)
#define TE_UNITS_BIN_K2U(_val)
#define TE_UNITS_BIN_M2U(_val)
#define TE_UNITS_BIN_U2G(_val)
#define TE_UNITS_BIN_U2K(_val)
#define TE_UNITS_BIN_U2M(_val)
#define TE_UNITS_DEC_G2U(_val)
#define TE_UNITS_DEC_K2U(_val)
#define TE_UNITS_DEC_M2U(_val)
#define TE_UNITS_DEC_U2G(_val)
#define TE_UNITS_DEC_U2K(_val)
#define TE_UNITS_DEC_U2M(_val)
#define TE_US2MS(_us)
#define TE_US2NS(_us)
#define TE_US2SEC(_us)
#define TE_US2TV(_us, _p_tv)
#define TE_USER_PREFIX
#define TE_USER_STEP
#define TE_USER_STEP_NEXT
#define TE_USER_STEP_POP
#define TE_USER_STEP_PUSH
#define TE_USER_STEP_RESET
#define TE_USER_SUBSTEP
#define TE_USE_SPECIFIC_ASPRINTF
#define TE_VA_HEAD(first, ...)
#define TE_VA_TAIL(first, ...)
#define TE_VEC_APPEND(te_vec_, val_)
#define TE_VEC_APPEND_ARRAY(te_vec_, elements_, count_)
#define TE_VEC_APPEND_RVALUE(te_vec_, type_, val_)
#define TE_VEC_FOREACH(te_vec_, elem_)
#define TE_VEC_GET(type_, te_vec_, index_)
#define TE_VEC_INIT(type_)
#define TE_VEC_INIT_AUTOPTR(type_)
#define TE_VEC_INIT_COMPLETE(type_, grow_factor_, destroy_)
#define TE_VEC_INIT_DESTROY(type_, destroy_)
#define TE_VEC_INIT_GROW_FACTOR(type_, grow_factor_)
#define TE_VEC_INIT_LIKE(other_)
#define TE_XDP_EQ_FUNC(_n)
#define TE_XDP_EQ_OR_ZERO_FUNC(_n)
#define TE_XDP_FRAME_INIT(_ctx)
#define THROW_EXCEPTION
#define TIME2RETAIN
#define TIME2WAIT
#define TIMESTAMP_CMP(ts1, ts2)
#define TIMESTAMP_SUB(res_ts, ts2, ts1)
#define TIMEVAL_SUB(_tv1, _tv2)
#define TIMEX_STATUS_MAPPING_LIST
#define TMPL_NB_IP_PDUS_MAX
#define TRACE(str)
#define TRACEBUF
#define TRANSMIT_FILE_FLAGS_MAPPING_LIST
#define TRASHIT(x)
#define TRC_DIFF_FLAGS_BRIEF
#define TRC_DIFF_FLAGS_NO_DETAILS
#define TRC_DIFF_FLAGS_NO_POPUPS
#define TRC_DIFF_IDS
#define TRC_DIFF_INHERIT
#define TRC_DIFF_INHERITED
#define TRC_REPORT_ITER_ID_LEN
#define TRC_REPORT_KEYS_MASK
#define TRC_RE_KEY_SCRIPT
#define TRC_RE_KEY_TABLE_HREF
#define TRC_RE_KEY_TAGS
#define TRC_RE_KEY_URL
#define TRC_STATS_NOT_RUN(s)
#define TRC_STATS_RUN(s)
#define TRC_STATS_RUN_UNEXP(s)
#define TRC_STATS_SPEC(s)
#define TRC_STATS_UNEXP(s)
#define TRC_UPDATE_RTYPES
#define TRUE
#define TR_MISMATCH
#define TR_NO_PAYLOAD
#define TR_POSTPONED
#define TR_RESULTS
#define TR_SEQ_MATCH
#define TSA_BACKLOG_DEF
#define TSA_ESTOP
#define TSA_SESSION_INITIALIZER
#define TUNNEL_TYPE_MAPPING_LIST
#define TV_RADIX
#define TX_TIMER_OFF
#define TYPE_NAMESIZE
#define T_BIT
#define UDP_HDR_CKSUM_DU_INDEX
#define UDP_HDR_P_LEN_DU_INDEX
#define UINT32_MAX
#define UNIX_PATH_MAX
#define UNIX_SERVICE_MAX
#define UNUSED(_x)
#define UPNP_DEBUG
#define USAGE_ERROR_JUMP(_opt_con, _fmt...)
#define USE_BASE64
#define USE_DATADIGEST
#define USE_FLAT_SPACE_LUN
#define USE_FULL_REPLIES
#define USE_HEADERDIGEST
#define USE_ONE_KEY_PER_TEXT
#define USE_OPERATIONAL_PHASE
#define USE_REFLECT_XKEYS
#define USE_SECURITY_PHASE
#define USE_TARGET_CONFIRMATION
#define USLEEP(_to_sleep)
#define U_BIT
#define VERB(_fs...)
#define VSLEEP(_to_sleep, _msg)
#define WAIT_START(msec_start)
#define WARN(_fs...)
#define WARN_ARTIFACT(_fmt...)
#define WARN_VERDICT(fmt...)
#define WORD_32BIT
#define WORD_4BYTE
#define WRITE_TYPE_CMND
#define WSAID_ACCEPTEX
#define WSAID_CONNECTEX
#define WSAID_DISCONNECTEX
#define WSAID_GETACCEPTEXSOCKADDRS
#define WSAID_TRANSMITFILE
#define WSAID_TRANSMITPACKETS
#define WSAID_WSARECVMSG
#define WSP_IPPROTO_TCP
#define WSP_IPPROTO_UDP
#define W_BIT
#define XDP_BIND_FLAGS_MAPPING_LIST
#define XINETD_ETC_DIR
#define XML2CHAR(p)
#define XML2MULTI_COMMON_OPTS
#define XML2MULTI_HTML_SPECIFIC_OPTS
#define XSK_LIBXDP_FLAGS_MAPPING_LIST
#define _LOG_ENTRY(_us, _fs, _args...)
#define _LOG_EXIT(_us, _fs, _args...)
#define _MSTCPIP_H
#define _MSWSOCK_H
#define _NETINET_IN_H
#define _PTHREAD_H
#define _SCHED_H
#define _SIGNAL_H_
#define _STDARG_H
#define _STDIO_H
#define _STDIO_H_
#define _STDLIB_H
#define _STDLIB_H_
#define _STRING_H
#define _STRING_H_
#define _SYS_SOCKET_H
#define _SYS_TYPES_H
#define _WINERROR_H
#define _WINSOCK2_H
#define _WS2TCPIP_H
#define __CONCAT(_a, _b)
#define __ERRNO_H__
#define __RPC_STRUCT_SIGACTION_INITIALIZER
#define __TE_CONFIG_H__
#define __TE_CONFIG_INTERNAL_H__
#define __add_name
#define __const
#define __lgr_user
#define __log_level
#define __log_msg
#define __log_sec
#define __log_usec
#define assert(x)
#define assert(_x)
#define cfg_get_instance_addr_fmt
#define cfg_get_instance_addr_sync_fmt
#define cfg_get_instance_double_fmt
#define cfg_get_instance_double_sync_fmt
#define cfg_get_instance_int_fmt
#define cfg_get_instance_int_sync_fmt
#define cfg_get_instance_string_fmt
#define cfg_get_instance_string_sync_fmt
#define cfg_get_instance_uint64_fmt
#define cfg_get_instance_uint64_sync_fmt
#define dhcpv4_message_get_chaddr(msg_)
#define dhcpv4_message_get_ciaddr(msg_)
#define dhcpv4_message_get_field(msg_, field_)
#define dhcpv4_message_get_flags(msg_)
#define dhcpv4_message_get_giaddr(msg_)
#define dhcpv4_message_get_hlen(msg_)
#define dhcpv4_message_get_htype(msg_)
#define dhcpv4_message_get_op(msg_)
#define dhcpv4_message_get_siaddr(msg_)
#define dhcpv4_message_get_xid(msg_)
#define dhcpv4_message_get_yiaddr(msg_)
#define dhcpv4_message_set_array_field(msg_, field_, value_)
#define dhcpv4_message_set_chaddr(msg_, value_)
#define dhcpv4_message_set_ciaddr(msg_, value_)
#define dhcpv4_message_set_file(msg_, value_)
#define dhcpv4_message_set_flags(msg_, value_)
#define dhcpv4_message_set_giaddr(msg_, value_)
#define dhcpv4_message_set_hlen(msg_, value_)
#define dhcpv4_message_set_hops(msg_, value_)
#define dhcpv4_message_set_htype(msg_, value_)
#define dhcpv4_message_set_op(msg_, value_)
#define dhcpv4_message_set_secs(msg_, value_)
#define dhcpv4_message_set_siaddr(msg_, value_)
#define dhcpv4_message_set_simple_field(msg_, field_, value_)
#define dhcpv4_message_set_sname(msg_, value_)
#define dhcpv4_message_set_xid(msg_, value_)
#define dhcpv4_message_set_yiaddr(msg_, value_)
#define ifTable_ifIndex
#define ifTable_ifIndex
#define inline
#define ntohl(x)
#define ntohs(x)
#define rcf_pch_mem_alloc(_mem)
#define rcf_pch_mem_free(_id)
#define rcf_pch_mem_free_mem(_mem)
#define rcf_pch_mem_get(_id)
#define rcf_pch_mem_get_id(_mem)
#define snprintf
#define tad_tv_zero
#define tapi_snmp_load_mib(mib_file_)
#define te_log_stack_init()
#define te_log_stack_push(_fs...)
#define te_log_stack_reset()
#define te_trc_db
#define te_vec_get(vec_, index_)
#define te_vec_get_safe(vec_, index_, element_size_)
#define va_copy(_dest, _src)
#define vsnprintf
#define xmlxdr_enum

Detailed Documentation

Enum Values

RCF_SID_GET_LOG

Session used for Log gathering

RCF_SID_TACHECK

Session used for TA check

RCF_SID_UNUSED

Unused SID, must be the last in the enum

CRC32_INIT

Init CRC32 value

CSAP_STATE_IDLE

CSAP is idle

CSAP_STATE_SEND

CSAP is sending or idle after the send operation

CSAP_STATE_RECV

CSAP is receiving or idle after the receive operation

CSAP_STATE_DONE

Processing has been finished

CSAP_STATE_SEND_DONE

Send has been finished

CSAP_STATE_RECV_DONE

Receive has been finished

CSAP_STATE_COMPLETE

Receive operation complete

CSAP_STATE_RECV_SEQ_MATCH

Pattern sequence matching

CSAP_STATE_RECV_MISMATCH

Store mismatch packets to get from test later

CSAP_STATE_PACKETS_NO_PAYLOAD

Do not report payload of received packets

CSAP_STATE_RESULTS

Receive results are required

CSAP_STATE_FOREGROUND

RCF answer is pending

CSAP_STATE_WAIT

User request to wait for end of processing

CSAP_STATE_STOP

User request to stop

CSAP_STATE_DESTROY

CSAP is being destroyed

CSAP_INVALID_HANDLE

Constant for invalid CSAP handle

CFG_REGISTER

Register object: IN: OID, description; OUT: handle

CFG_UNREGISTER

Unregister object: IN: OID.

CFG_FIND

Find handle by OID: IN: OID; OUT: handle

CFG_GET_DESCR

Get description by handle: IN: handle; OUT: description

CFG_GET_OID

Get OID: IN: handle OUT: OID

CFG_GET_ID

Get sub-identifier or object instance name

CFG_PATTERN

Find by pattern: IN: pattern; OUT: array of handles

CFG_FAMILY

Get son, father or brother: IN: handle, member name; OUT: handle

CFG_ADD

Add instance: IN: OID, value; OUT: handle

CFG_DEL

Delete instance: IN: handle, children flag

CFG_SET

Set instance: IN: handle, value

CFG_COMMIT

Commit Configurator database changes to Test Agent(s): IN: subtree OID

CFG_GET

Get value: IN: handle, sync flag; OUT: value

CFG_COPY

Copy subtree: IN: source handle, destination handle

CFG_SYNC

Synchronize: IN: OID, subtree flag

CFG_REBOOT

Reboot TA: IN: TA name, restore flag

CFG_BACKUP

Create/verify/restore backup: IN: op, file name (for verify restore); OUT: file name (for create)

CFG_CONFIG

Create configuration file: IN: file name, history flag

CFG_CONF_TOUCH

Update conf_delay after touching the instance by non-CS means

CFG_CONF_DELAY

Sleep conf_delay

CFG_SHUTDOWN

Shutdown the Configurator

CFG_ADD_DEPENDENCY

Add a dependency

CFG_TREE_PRINT

Print a tree of obj|ins from a prefix

CFG_PROCESS_HISTORY

Process history configuration file IN: file name, key-value pairs to substitute

TSA_IUT

Open socket on the IUT side when calling tsa_sock_create().

TSA_TST

Open socket on the TST side when calling tsa_sock_create().

ITER_NO_MATCH

No matching

ITER_EXACT_MATCH

Exact matching of all arguments values

ITER_WILD_MATCH

Matching to a wildcard record in TRC

Typedefs

typedef bool (*include_callback_func)(
    const char *name,
    void *data
    )

Type of callback which may be passed to get_dir_list(). It is used to check whether a given item should be included in the list.

typedef enum ta_ethtool_cmd ta_ethtool_cmd

Ethtool command type

typedef union ta_ethtool_lsets_data ta_ethtool_lsets_data

Link settings data

typedef struct ta_ethtool_lsets ta_ethtool_lsets

Generic structure to store link settings

typedef enum ta_ethtool_lsets_field ta_ethtool_lsets_field

Link settings field IDs

typedef enum ta_ethtool_link_mode ta_ethtool_link_mode

Ethtool command independent IDs for all known link modes.

When adding a new link mode, you also need to update lists in agent/unix/meson.build, agent/unix/configure.ac and conf_ethtool.c.

typedef struct ta_ethtool_strings ta_ethtool_strings

Set of strings returned by ETHTOOL_GSTRINGS

typedef struct te_dhcp_option te_dhcp_option

Definitions of types for DHCP configuring

typedef struct te_dhcp_space_opt te_dhcp_space_opt

Definitions for option spaces for DHCP configuring

typedef struct te_dhcp_server_cfg te_dhcp_server_cfg

DHCP server configuration

typedef enum nginx_cpu_aff_mode nginx_cpu_aff_mode

Worker processes CPU affinity modes

typedef enum nginx_server_tokens_mode nginx_server_tokens_mode

Nginx server response presentation mode

typedef struct nginx_http_listen_entry nginx_http_listen_entry

HTTP server listening socket entry

typedef struct nginx_http_us_server nginx_http_us_server

HTTP upstream group server

typedef struct nginx_http_upstream nginx_http_upstream

HTTP upstream servers group

typedef struct nginx_ssl_entry nginx_ssl_entry

SSL settings entry

typedef struct nginx_http_header nginx_http_header

HTTP header

typedef struct nginx_http_loc nginx_http_loc

HTTP location settings

typedef struct nginx_http_client nginx_http_client

HTTP client requests handling settings

typedef struct nginx_http_proxy nginx_http_proxy

HTTP proxy settings

typedef struct nginx_http_file_cache nginx_http_file_cache

HTTP server file caching settings

typedef struct nginx_http_server nginx_http_server

HTTP server settings

typedef struct nginx_inst nginx_inst

Nginx daemon instance

typedef struct cmd_monitor_t cmd_monitor_t

Structure defining command monitor

typedef BOOL(__stdcall* LPFN_CONNECTEX)(
    SOCKET s,
    const struct sockaddr *name,
    int namelen,
    PVOID lpSendBuffer,
    DWORD dwSendDataLength,
    LPDWORD lpdwBytesSent,
    LPOVERLAPPED lpOverlapped
    )

Function prototypes for Microsoft extended functions from Windows Sockets 2

typedef struct rpc_overlapped rpc_overlapped

Overlapped object with additional parameters - memory associated with overlapped information

typedef struct checked_arg checked_arg

Structure for checking of variable-length arguments safity

typedef struct cfg_dependency cfg_dependency

Configurator dependency item

typedef struct cfg_instance cfg_instance

Configurator object instance

typedef struct refcnt_buffer refcnt_buffer

A memory buffer that keeps track of references to its contents

typedef struct msg_buffer msg_buffer

Buffer structure for log messages

typedef enum cfg_file_type cfg_file_type

Configuration file format

typedef enum overfill_type overfill_type

Overfill type constants

typedef struct snif_polling_sets_t snif_polling_sets_t

Capture logs polling variables

typedef struct ta_inst ta_inst

Node of the TA single linked list

typedef enum listener_state listener_state

Listener operation state

typedef struct log_listener_conf log_listener_conf

Listener configuration supplied through command-line options

typedef struct log_listener log_listener

Log message listener

typedef struct msg_queue msg_queue

Thread safe message queue for communication between Logger threads and listener server thread.

typedef te_errno (*streaming_handler)(
    const log_msg_view *view,
    refcnt_buffer *str
    )

Handler function that transforms a log message into a message that will be sent to the listeners.

typedef struct streaming_rule streaming_rule

Rule that describes how a message should be processed

typedef struct streaming_action streaming_action

Action that needs to be done for messages of a certain type

typedef struct streaming_filter streaming_filter

Message filter with a set of streaming actions

typedef te_errno (*userreq_callback)(
    ta *agent,
    usrreq *req
    )

The prototype of the function that is called when receiving a response from the agent.

Parameters:

agent

Test Agent

req

Request

Returns:

Status code

typedef struct ta_initial_task ta_initial_task

A description for a task/thread to be executed at TA startup

typedef enum ta_reboot_state ta_reboot_state

State of the reboot

+———- + +———- + +———- + | | (1) | | (2) | | | IDLE |->| LOG_FLUSH |->| WAITING |- + | | | | | | | +———- + +———- + +———- + | | +——————————————————- + | | +———- + +———- + | (3) | | (4) | | (5) +->| WAITING_ACK |->| REBOOTING |-> goto IDLE | | | | +———- + +———- +

(1),(2),(3),(4) - Event for switching to the next state

  • IDLE - The normal state of the agent

      • An user requested to reboot TA

  • LOG_FLUSH - RCF is waiting for a response (10 second) to the GET_LOG last command

      • RCF received an answer from the agent to the GET_LOG last command

  • WAITING - RCF is forming a request to reboot the TA and sending it

      • RCF sent a reboot request to TA

  • WAITING_ACK - RCF is waiting for confirmation (10 second) of receiving a reboot request from the TA

      • RCF received confirmation from the TA

  • REBOOTING - RCF is waiting for the reboot to finish using the specified timeout. If the waiting time has expired, the RCF marks the agent unrecoverable dead. Either switch to the next reboot type if it allowed

      • RCF is initializing the TA process

In case of TA process reboot, RCF goes from state LOG_FLUSH to (5) immediately.

typedef enum ta_reboot_type ta_reboot_type

Type of the reboot

typedef struct ta_reboot_context ta_reboot_context

Contextual information for rebooting the agent

typedef struct ta_check ta_check

TA check initiator data.

typedef enum test_path_type test_path_type

Types of test paths.

Enum items have to be in the same order as corresponding options TESTER_OPT_*.

typedef enum test_path_match test_path_match

Style of the test path matching

typedef struct test_path_arg test_path_arg

Test argument with set of values

typedef struct test_path_item test_path_item

Element of the test path

typedef struct test_path test_path

Test path

typedef struct tester_global tester_global

Tester global context

typedef struct test_suite_info test_suite_info

Information about Test Suite

typedef struct cmd_monitor_descr cmd_monitor_descr

Command monitor description

typedef struct person_info person_info

Information about person (maintainer or author)

typedef struct test_option test_option

Option from the Tester configuration file

typedef struct test_entity_value test_entity_value

Value of the variable or argument

typedef struct test_entity_values test_entity_values

List of value of the variable or argument

typedef struct test_value_type test_value_type

Description of value’s type

typedef enum tester_handdown tester_handdown

Types of service executables handdown

typedef enum tester_track_conf_flags tester_track_conf_flags

Flags describing how Tester tracks configuration changes.

typedef struct test_attrs test_attrs

Attributes of any test (script, session)

typedef struct test_script test_script

Test script

typedef struct test_var_arg test_var_arg

Test session variable

typedef struct run_item run_item

Unified run item

typedef struct test_info test_info

Information about test script

typedef struct test_package test_package

Test package

typedef struct test_var_arg_list test_var_arg_list

Information about run item variable/argument list.

typedef struct tester_cfg tester_cfg

Tester configuration file

typedef struct tester_cfgs tester_cfgs

Head of Tester configuration files list

typedef te_errno (*test_var_arg_enum_cb)(
    const test_var_arg *va,
    void *opaque
    )

Prototype of the function to be called for each argument of the run item.

Parameters:

va

Inherited variable or argument

opaque

Opaque data

Returns:

Status code.

typedef te_errno (*test_entity_value_enum_cb)(
    const test_entity_value *value,
    void *opaque
    )

Prototype of the function to be called for each singleton value of the variable/argument.

Parameters:

value

Singleton value (plain or external)

opaque

Opaque data

Returns:

Status code.

typedef te_errno (*test_entity_value_enum_error_cb)(
    const test_entity_value *value,
    te_errno status,
    void *opaque
    )

Recovery callback to be used in the case of failure.

Parameters:

status

Status code

opaque

Recovery opaque data

Returns:

Status code.

typedef enum tester_cfg_walk_ctl tester_cfg_walk_ctl

Controls of Tester configuration traverse.

typedef struct tester_cfg_walk tester_cfg_walk

Functions to be called when traversing Tester configuration.

typedef enum run_item_type run_item_type

Types of run items

typedef enum run_item_role run_item_role

Run item role values

typedef int test_id

Test ID

typedef uint64_t tester_flags

Flags of the Tester global context

typedef struct test_requirement test_requirement

Element of the list of requirements

typedef enum tester_test_status tester_test_status

Statuses of test execution inside Tester.

Order of values is not arbitrary here, bigger values are considered as having higher priority when determining test group’s result, see tester_group_status(), run_verify_cfg_backup().

typedef struct tester_test_result tester_test_result

Result of the test execution.

typedef struct tester_test_results tester_test_results

List of results of tests which are in progress.

typedef struct tester_test_msg_listener tester_test_msg_listener

Test messages listener control data.

typedef struct test_iter_arg test_iter_arg

Test argument with specified value.

typedef struct testing_act testing_act

Act of the testing scenario

typedef void() te_log_message_f(
    const char *file,
    unsigned int line,
    te_log_ts_sec sec,
    te_log_ts_usec usec,
    unsigned int level,
    const char *entity,
    const char *user,
    const char *fmt,
    va_list ap
    )

Logging backend function.

Parameters:

file

Name of the file with the log message

line

Line in the file with the log message

sec

Timestamp seconds

usec

Timestamp microseconds

level

Log level

entity

Entity name whose user generates this message

user

Arbitrary “user name”

fmt

Log message format string. This string should contain conversion specifiers if some arguments follows

ap

Arguments passed into the function according to log message format string

typedef enum rcf_execute_mode rcf_execute_mode

The ways a function may be called on TA

typedef struct rcf_msg rcf_msg

Definition of the RCF internal protocol message format

typedef struct rcf_params rcf_params

Parameters generated by rcf_make_params function

typedef struct rcf_tce_conf rcf_tce_conf_t

See the definition in the rcf_tce_conf.h file.

typedef struct rcf_talib_param rcf_talib_param

Parameters for RCF/ controllers

typedef te_errno (*rcf_talib_start)(
    const char *ta_name,
    const char *ta_type,
    const rcf_talib_param *param,
    const te_kvpair_h *conf,
    rcf_talib_handle *handle,
    unsigned int *flags
    )

Start the Test Agent. Note that it’s not necessary to restart the proxy Test Agents after rebooting of the NUT, which it serves.

Parameters:

ta_name

Test Agent name

ta_type

Test Agent type (Test Agent executable is equal to ta_type and is located in TE_INSTALL/agents/bin)

param

Parameters for RCF/ controllers.

conf

TA-specific configuration list of kv_pairs

handle

location for TA handle

flags

IN/OUT location of TA flags; these location is shared between RCF and library

Returns:

Error code.

typedef te_errno (*rcf_talib_finish)(
    rcf_talib_handle handle,
    const char *parms
    )

Kill all processes related to TA on the station where it is run. Reboot station which TA is running on (if it’s allowed). Handle should not be freed.

Parameters:

handle

TA handle location, may already contain memory pointer in the case of TA restart

parms

library-specific parameters

Returns:

Error code.

typedef te_errno (*rcf_talib_connect)(
    rcf_talib_handle handle,
    fd_set *select_set,
    struct timeval *select_tm
    )

Establish connection with the Test Agent. Note that it’s not necessary to perform real reconnect to proxy Test Agents after rebooting of the NUT, which it serves.

Parameters:

handle

TA handle

select_set

FD_SET to be updated with the TA connection file descriptor (for Test Agents supporting listening mode) (IN/OUT)

select_tm

timeout value for the select to be updated with TA polling interval (for Test Agents supporting polling mode only) (IN/OUT)

Returns:

Error code.

typedef te_errno (*rcf_talib_transmit)(
    rcf_talib_handle handle,
    const void *data,
    size_t len
    )

Transmit data to the Test Agent.

Parameters:

handle

TA handle

data

data to be transmitted

len

data length

Returns:

Error code.

typedef bool (*rcf_talib_is_ready)(rcf_talib_handle handle)

Check pending data on the Test Agent connection.

Parameters:

handle

TA handle

Returns:

true, if data are pending; false otherwise

typedef te_errno (*rcf_talib_receive)(
    rcf_talib_handle handle,
    char *buf,
    size_t *len,
    char **pba
    )

Receive one command (possibly with attachment) from the Test Agent or its part.

Parameters:

handle

TA handle

buf

location for received data

len

should be filled by the caller to length of the buffer; is filled by the routine to length of received data

pba

location for address of first byte after answer end marker (is set only if binary attachment presents)

0

success

TE_ESMALLBUF

Buffer is too small for the command. The part of the command is written to the buffer. Other part(s) of the message can be read by the subsequent routine calls. ETSMALLBUF is returned until last part of the message is read.

TE_EPENDING

Attachment is too big to fit into the buffer. The command and a part of the attachment is written to the buffer. Other part(s) can be read by the subsequent routine calls. TE_EPENDING is returned until last part of the message is read.

other

OS errno

Returns:

Error code.

typedef te_errno (*rcf_talib_close)(
    rcf_talib_handle handle,
    fd_set *select_set
    )

Close interactions with TA.

Parameters:

handle

TA handle

select_set

FD_SET to be updated with the TA connection file descriptor (for Test Agents supporting listening mode) (IN/OUT)

Returns:

Error code.

typedef void* rcf_talib_handle

Handle returned by the “start” method and used to control the TA

typedef struct rcf_tce_comp_conf rcf_tce_comp_conf_t

The TCE configuration of a TA component.

typedef struct rcf_tce_type_conf rcf_tce_type_conf_t

The TCE configuration of a TA type.

typedef struct rcf_tce_local_conf rcf_tce_local_conf_t

The TCE configuration of the TE engine.

typedef struct rcf_tce_conf rcf_tce_conf_t

The TCE configuration.

typedef unsigned int csap_handle_t

Type for CSAP handle, should have semantic unsigned integer, because TAD Users Guide specify CSAP ID as positive integer, and zero used as mark of invalid/uninitialized CSAP handle.

typedef int (*tad_stream_callback)(
    uint64_t offset,
    uint32_t length,
    uint8_t *buffer
    )

Callback type for methods generating fully determined stream of data, depending only from length and offset.

Parameters:

offset

offset in stream of first byte in buffer

length

length of buffer

buffer

location for generated data (OUT)

Returns:

status code

typedef struct te_bpf_ip_tcpudp_filter te_bpf_ip_tcpudp_filter

Parameters of IPv4/IPv6 TCP/UDP filter.

Note: here uint8 is used everywhere to avoid issues with padding and ensure that structure filled on Test Engine host is interpreted correctly on TA.

typedef struct te_bpf_rxq_stats_params te_bpf_rxq_stats_params

Parameters for rxq_stats BPF program.

typedef struct te_optional_uint_t te_optional_uint_t

Unsigned integer which can be left undefined

typedef struct te_optional_uintmax_t te_optional_uintmax_t

Unsigned long integer which can be left undefined

typedef struct te_optional_double_t te_optional_double_t

Double which can be left undefined

typedef bool te_bool

Legacy TE boolean type.

Deprecated Use normal ISO C bool.

typedef enum te_bool3 te_bool3

Ternary (tree-valued, trivalent) logic base type

typedef void (*te_void_func)(void)

Void function pointer. Can be casted to any other function pointer type without cast-function-type warning.

typedef int32_t te_errno

Type for TE error numbers

typedef uint16_t te_log_nfl

Type to store Next-Field-Length in raw log

typedef uint8_t te_log_version

Type to store TE log version in raw log

typedef uint32_t te_log_ts_sec

Type to store timestamp seconds in raw log

typedef uint32_t te_log_ts_usec

Type to store timestamp microseconds in raw log

typedef uint16_t te_log_level

Type to store log level in raw log

typedef uint32_t te_log_id

Type to store log ID in raw log. Currently this field is used for detecting the test-owner of the log message.

typedef uint32_t te_log_seqno

Type to store TE log sequence numbers in raw log

typedef struct sniffer_id sniffer_id

Sniffer identifier

typedef struct te_pcap_pkthdr te_pcap_pkthdr

PCAP packet header

typedef enum te_test_status te_test_status

Statuses of test execution visible for the world.

Order of statuses is important and used by TE modules.

typedef struct te_test_verdict te_test_verdict

Verdict generated by the test during execution.

typedef struct te_test_result te_test_result

Test result representation: status plus verdicts.

typedef enum trc_verdict trc_verdict

Verdicts generated by Testing Results Comparator

typedef enum upnp_cp_request_type te_upnp_cp_request_type

Request Type. It is used in requests for UPnP Control Point from TEN over RPC.

typedef enum te_test_msg_type te_test_msg_type

Types of messages which tests send to Tester.

typedef struct tester_test_msg_hdr tester_test_msg_hdr

Representation of the message header passed from tests to Tester. Message body is passed just after the header.

typedef enum agent_key_manager agent_key_manager

Supported key managers

typedef struct rcf_symbol_entry rcf_symbol_entry

Manual symbol table entry

typedef struct asn_named_entry_t asn_named_entry_t

Element of array, specifying named subvalue in complex ASN.1 value.

typedef struct asn_enum_entry_t asn_enum_entry_t

Element of array, specifying named integer value in enumerated type.

typedef struct asn_type asn_type

Type: ASN_type

Instances of this type shouldn’t be dynamically created, they may be only statically defined in special modules. Such modules may be either written manually or generated by a special tool.

typedef uint16_t asn_tag_value

Value of the ASN.1 tag

typedef struct asn_tag_t asn_tag_t

ASN.1 tag

typedef struct asn_value asn_value

C type for presentation of ASN.1 value.

typedef te_errno (*walk_method)(
    asn_value *value,
    void *user_ptr
    )

Typedef for user method to be called during walk over ASN.1 value tree.

typedef enum te_ip_type te_ip_type

Routing types

typedef enum te_ip_table_id_t te_ip_table_id

Routing table IDs

typedef struct te_conf_ip_rule te_conf_ip_rule

Context of ip rule

typedef enum te_conf_obj_compare_result te_conf_obj_compare_result

Constants to explain result of the comparison

typedef te_errno (*te_conf_obj_func_to_str)(
    te_string *str,
    const char *name,
    const void *arg
    )

Transform a specific structure to a structure te_string

Parameters:

str

String with data

name

Field name

arg

Pointer to a value of specific structure

Returns:

Status code

typedef te_errno (*te_conf_obj_func_from_str)(
    const char *value,
    void *arg,
    const void *options
    )

Transform a string char * to a specific structure

Parameters:

value

Input value

arg

Pointer to a value of specific structure

options

User options (field opts from structure te_conf_obj)

Returns:

Status code

typedef int (*te_conf_obj_func_compare)(
    const void *a,
    const void *b
    )

Compare two specific structures

Parameters:

a

First structure

b

Second structure

==0

Values are not equal

!=0

Values are equal

Returns:

Result of the comparison

typedef struct te_conf_obj_methods te_conf_obj_methods

Methods for interaction with configurator objects of a specific type

typedef struct te_conf_obj te_conf_obj

Context for an interaction with a field of a complex object

typedef struct cfg_object_subid cfg_object_subid

Object identifier element

typedef struct cfg_inst_subid cfg_inst_subid

Object instance identifier element

typedef struct cfg_oid cfg_oid

Object identifier

typedef te_errno cfg_oid_action(
    const char *inst_oid,
    const cfg_oid *parsed_oid,
    void *ctx
    )

Function type for actions for cfg_oid_rule

Parameters:

inst_oid

Instance OID as passed to cfg_oid_dispatch()

parsed_oid

Instance OID represented as cfg_oid

ctx

User data as passed to cfg_oid_dispatch()

Returns:

Status code

typedef struct cfg_oid_rule cfg_oid_rule

A rule entry for cfg_oid_dispatch()

typedef struct cfg_msg cfg_msg

Generic Configurator message structure

typedef struct cfg_register_msg cfg_register_msg

CFG_REGISTER message content

typedef struct cfg_unregister_msg cfg_unregister_msg

CFG_UNREGISTER message content

typedef struct cfg_find_msg cfg_find_msg

CFG_FIND message content

typedef struct cfg_get_descr_msg cfg_get_descr_msg

CFG_GET_DESCR message content

typedef struct cfg_get_oid_msg cfg_get_oid_msg

CFG_GET_OID message content

typedef struct cfg_get_id_msg cfg_get_id_msg

CFG_GET_ID message content

typedef struct cfg_pattern_msg cfg_pattern_msg

CFG_PATTERN message content

typedef struct cfg_family_msg cfg_family_msg

CFG_FAMILY message content

typedef struct cfg_add_msg cfg_add_msg

CFG_ADD message content

typedef struct cfg_del_msg cfg_del_msg

CFG_DEL message content

typedef struct cfg_set_msg cfg_set_msg

CFG_SET message content

typedef struct cfg_commit_msg cfg_commit_msg

CFG_COMMIT message content

typedef struct cfg_get_msg cfg_get_msg

CFG_GET message content

typedef struct cfg_copy_msg cfg_copy_msg

CFG_COPY message content

typedef struct cfg_sync_msg cfg_sync_msg

CFG_SYNC message content

typedef struct cfg_reboot_msg cfg_reboot_msg

CFG_REBOOT message content

typedef struct cfg_backup_msg cfg_backup_msg

CFG_BACKUP message content

typedef struct cfg_config_msg cfg_config_msg

CFG_CONFIG message content

typedef struct cfg_conf_touch_msg cfg_conf_touch_msg

CFG_CONF_TOUCH message content

typedef struct cfg_add_dependency_msg cfg_add_dependency_msg

CFG_ADD_DEPENDENCY message content

typedef struct cfg_shutdown_msg cfg_shutdown_msg

CFG_SHUTDOWN message content

typedef struct cfg_tree_print_msg cfg_tree_print_msg

CFG_TREE_PRINT message content

typedef struct cfg_process_history_msg cfg_process_history_msg

CFG_PROCESS_HISTORY message content

typedef union cfg_inst_val cfg_inst_val

Object instance value

typedef struct cfg_primary_type cfg_primary_type

Primary type structure

typedef struct iscsi_connection_req iscsi_connection_req

Asynchronous connection status change request.

typedef te_errno (*iscsi_initiator_control_t)(iscsi_connection_req *req)

Function type for iSCSI initiator controlling routines (i.e. responsible for configuring an Initiator, starting and closing connections)

typedef struct iscsi_tgt_chap_data iscsi_tgt_chap_data_t

Security related data. This structure is per target structure. The current supported security protocol is CHAP.

typedef struct iscsi_connection_data iscsi_connection_data_t

Parameters of an iSCSI connection, including its iSCSI operational and security parameters, its status (DOWN, UP etc) and a SCSI device name associated with that connection.

typedef struct iscsi_target_data iscsi_target_data_t

Per target data of the Initiator. Most of the fields correspond to operational parameters with the same name. See RFC3260 for allowed values.

typedef struct iscsi_initiator_data iscsi_initiator_data_t

Initiator data structure. Contains general information about the Initiator and per target data.

typedef char* (*iscsi_param_formatter_t)(void *)

A function type for callbacks formatting iSCSI parameter values.

typedef bool (*iscsi_param_predicate_t)(
    iscsi_target_data_t *,
    iscsi_connection_data_t *,
    iscsi_tgt_chap_data_t *
    )

A function type for predicates determining whether a given parameter need to be configured

typedef struct iscsi_target_param_descr_t iscsi_target_param_descr_t

Generic parameter description for iscsi_write_param()

typedef struct log_branch_filter_rule log_branch_filter_rule

Branch filtering relies on a list of (path, result) pairs. If the path is not mentioned in the list, “default” will be returned.

typedef struct log_duration_filter_rule log_duration_filter_rule

Filtering by duration is represented with a set of rules for each kind of node (package, session, test).

These rules have a form of (interval, result) pairs.

typedef enum log_filter_result log_filter_result

Possible verdicts

typedef struct log_user_filter log_user_filter

User filter

typedef struct log_entity_filter log_entity_filter

Entity filter

typedef struct log_msg_filter log_msg_filter

Message filter

typedef struct log_msg_view log_msg_view

View structure for log messages.

typedef enum logfork_msg_type logfork_msg_type

Type of a logfork message

typedef struct logfork_msg logfork_msg

Common information in the message

typedef long ta_log_arg

Type of argument native for a stack

typedef void (*te_log_message_tx_f)(
    const void *msg,
    size_t len
    )

Log message transport

typedef enum logic_expr_type logic_expr_type

Types of expression elements,

typedef struct logic_expr logic_expr

Element of the requirements expression

typedef te_errno() logic_expr_get_val(
    const logic_expr *parsed,
    void *cookie,
    logic_expr_res *res
    )

Evaluate simple value node of logical expression.

Parameters:

parsed

Simple value node

cookie

Callback opaque data

res

Result

Returns:

Status code

typedef struct ndn_arp_header_plain ndn_arp_header_plain

Structure that represents ARP header (see RFC 826)

typedef enum ndn_atm_type ndn_atm_type

ATM cell header format

typedef struct ndn_stp_cfg_bpdu_t ndn_stp_cfg_bpdu_t

Structure represents Configuration BPDU

typedef struct ndn_stp_bpdu_t ndn_stp_bpdu_t

Structure represents STP BPDU

typedef enum netconf_link_type netconf_link_type

Types of network devices

typedef enum netconf_net_addr_flag netconf_net_addr_flag

Flags of network address

typedef enum netconf_route_type netconf_route_type

Types of route entry

typedef enum netconf_route_prot netconf_route_prot

Protocols of route entry

typedef enum netconf_route_scope netconf_route_scope

Scopes of route entry

typedef enum netconf_route_table netconf_route_table

Routing table ids

typedef enum netconf_neigh_state netconf_neigh_state

States of neighbour entry

typedef enum netconf_neigh_flags netconf_neigh_flags

Neighbor entry flags

typedef struct netconf_link netconf_link

Network device

typedef struct netconf_net_addr netconf_net_addr

Network address (IPv4 or IPv6) on a device

typedef struct netconf_route_nexthop netconf_route_nexthop

Nexthop of a multipath route.

typedef struct netconf_route netconf_route

Routing table entry

typedef struct netconf_neigh netconf_neigh

Neighbour table entry (ARP or NDISC cache)

typedef struct netconf_macvlan netconf_macvlan

MAC VLAN network interface

typedef struct netconf_ipvlan netconf_ipvlan

IP VLAN network interface

typedef struct netconf_vlan netconf_vlan

VLAN network interface

typedef struct netconf_veth netconf_veth

Virtual Ethernet network interface

typedef struct netconf_udp_tunnel netconf_udp_tunnel

Generic UDP Tunnel interface

typedef struct netconf_geneve netconf_geneve

Geneve network interface

typedef struct netconf_vxlan netconf_vxlan

VXLAN network interface

typedef struct netconf_bridge netconf_bridge

Bridge network interface

typedef struct netconf_bridge_port netconf_bridge_port

Bridge port network interface

typedef struct netconf_devlink_info netconf_devlink_info

Information about device from devlink

typedef enum netconf_nla_type netconf_nla_type

Parameter types from DEVLINK_ATTR_PARAM_TYPE.

These must have the same values as NLA_* constants defined in include/net/netlink.h in Linux kernel sources. I have no idea why they are not defined in any header which can be included from here or why netlink_attribute_type enum in include/linux/netlink.h differs from the list defined in kernel sources.

typedef union netconf_devlink_param_value_data netconf_devlink_param_value_data

Device parameter value data

typedef struct netconf_devlink_param_value netconf_devlink_param_value

Device parameter value

typedef enum netconf_devlink_param_cmode netconf_devlink_param_cmode

Configuration mode for device parameter value

typedef struct netconf_devlink_param netconf_devlink_param

Information about device parameter obtained from devlink

typedef struct netconf_devlink_eswitch netconf_devlink_eswitch

Information about device eswitch obtained from devlink

typedef enum netconf_node_type netconf_node_type

Type of nodes in the list

typedef struct netconf_node netconf_node

Information node of the list

typedef struct netconf_list netconf_list

List of network information nodes

typedef enum netconf_cmd netconf_cmd

Command to modifying functions

typedef bool (*netconf_node_filter_t)(
    netconf_node *node,
    void *user_data
    )

Filter callback

typedef struct netconf_handle_s* netconf_handle

Netconf session handle

typedef bool (*netconf_veth_list_filter_func)(
    const char *ifname,
    void *data
    )

Type of callback function to pass to netconf_veth_list(). It is used to decide if the interface should be included to the list.

Parameters:

ifname

The interface name

data

Opaque data

Returns:

true to include interface to the list.

typedef bool (*netconf_udp_tunnel_list_filter_func)(
    const char *ifname,
    void *data
    )

Type of callback function to pass to netconf_udp_tunnel_list(). It is used to decide if the interface should be included to the list.

Parameters:

ifname

The interface name

data

Opaque data

Returns:

true to include interface to the list.

typedef bool (*netconf_bridge_list_filter_func)(
    const char *ifname,
    void *data
    )

Type of callback function to pass to netconf_bridge_list(). It is used to decide if the interface should be included to the list.

Parameters:

ifname

The interface name

data

Opaque data

Returns:

true to include interface to the list.

typedef bool (*netconf_port_list_filter_func)(
    const char *ifname,
    void *data
    )

Type of callback function to pass to netconf_port_list(). It is used to decide if the interface should be included to the list.

Parameters:

ifname

The interface name

data

Opaque data

Returns:

true to include interface to the list.

typedef int() netconf_recv_cb_t(
    struct nlmsghdr *h,
    netconf_list *list,
    void *cookie
    )

Callback in dump requests

typedef te_errno (*netconf_attr_cb)(
    struct nlattr *na,
    void *cb_data
    )

Generic callback for attribute processing

typedef int (*rcf_pch_rpc_call)(
    struct rpcserver *rpcs,
    char *name,
    void *in,
    void *out
    )

Function definition which helps to call the RPC functions

typedef struct ta_cfg_obj_attr ta_cfg_obj_attr_t

Object attribute data structure

typedef enum ta_cfg_obj_action ta_cfg_obj_action_e

Action that should be performed with the object.

typedef void() ta_cfg_obj_data_free(void *data)

Type of the function used to free user-provided data

typedef struct ta_cfg_obj ta_cfg_obj_t

Object data structure, which is inserted into collection

typedef te_errno (*ta_obj_cb)(ta_cfg_obj_t *obj)

Prototype for callback function used to fill created object attributes()

typedef enum ta_route_type ta_route_type

System-independent route types

typedef struct ta_rt_nexthop_t ta_rt_nexthop_t

Nexthop of a multipath route.

typedef struct ta_rt_info_t ta_rt_info_t

Structure that keeps system independent representation of the route

typedef enum rpc_lio_opcode rpc_lio_opcode

TA-independent operation code for lio_listio function

typedef enum rpc_lio_mode rpc_lio_mode

TA-independent modes for lio_listio function

typedef enum rpc_aio_cancel_retval rpc_aio_cancel_retval

TA-independent return values for aio_cancel function

typedef enum rpc_xsk_libxdp_flags rpc_xsk_libxdp_flags

Libxdp flags which can be specified when creating AF_XDP socket

typedef enum rpc_d_type rpc_d_type

All known file control flags.

typedef enum rpc_dlopen_flags rpc_dlopen_flags

All known dlopen mode flags.

typedef enum rpc_fcntl_flags rpc_fcntl_flags

All known file control flags.

typedef enum rpc_lseek_mode rpc_lseek_mode

Seek modes

typedef enum rpc_splice_flags rpc_splice_flags

Splice flags

typedef enum rpc_hwtstamp_tx_types rpc_hwtstamp_tx_types

RPC constants corresponding to values defined in hwtstamp_tx_types enum from linux/net_tstamp.h. See descriptions there.

typedef enum rpc_hwtstamp_rx_filters rpc_hwtstamp_rx_filters

RPC constants corresponding to values defined in hwtstamp_rx_filters enum from linux/net_tstamp.h. See descriptions there.

typedef enum rpc_ai_flags rpc_ai_flags

TA-independent addrinfo flags

typedef enum rpc_pthread_cancelstate rpc_pthread_cancelstate

Thread cancelability states.

typedef enum rpc_pthread_canceltype rpc_pthread_canceltype

Thread cancelability types.

typedef enum rpc_signum rpc_signum

TA-independent signal constants

typedef enum rpc_si_code rpc_si_code

TA-independent values of signal code

typedef enum rpc_sigev_notify rpc_sigev_notify

TA-independent sigevent notification types

typedef enum rpc_sa_flags rpc_sa_flags

TA-independent sigaction() flags.

typedef enum rpc_ss_flags rpc_ss_flags

TA-independent sigaltstack() flags.

typedef enum rpc_prot_flags rpc_prot_flags

TA-independent memory protection flags for mmap().

typedef enum rpc_map_flags rpc_map_flags

TA-independent flags for mmap().

typedef enum rpc_madv_value rpc_madv_value

Value passed to rpc_madvise()

typedef enum rpc_rlimit_resource rpc_rlimit_resource

TA-independent rlimit resource types.

typedef struct rpc_onload_scm_timestamping_stream rpc_onload_scm_timestamping_stream

Onload specific structure for TX HW timestamps.

typedef struct rpc_scm_timestamping rpc_scm_timestamping

Packet transmission timestamps

typedef enum rpc_scm_tstamp rpc_scm_tstamp

The type of softawre timestamp which is passed in sock_extended_err ee_info.

typedef enum rpc_socket_domain rpc_socket_domain

TA-independent protocol families.

typedef enum rpc_socket_type rpc_socket_type

TA-independent types of sockets (the communication semantics).

typedef enum rpc_socket_flags rpc_socket_flags

TA-independent flags SOCK_NONBLOCK and SOCK_CLOEXEC for socket() and accept4()

typedef enum rpc_socket_proto rpc_socket_proto

TA-independent constants for IP protocols.

typedef enum rpc_shut_how rpc_shut_how

TA-independent types of socket shut down.

typedef enum rpc_send_recv_flags rpc_send_recv_flags

TA-independent send/receive flags.

typedef enum rpc_mtu_discover_arg rpc_mtu_discover_arg

TA-independent names of path MTU discovery arguments.

typedef enum rpc_sockopt rpc_sockopt

TA-independent names of socket options. After updating this list, please update SOCKOPT_MAPPING_LIST in the same way.

typedef enum rpc_tcp_state rpc_tcp_state

TA-independent names of TCP socket states.

typedef enum rpc_tcp_ca_state rpc_tcp_ca_state

TA-independent names of TCP congestion states.

typedef enum rpc_socklevel rpc_socklevel

TA-independent socket options levels

typedef enum rpc_ioctl_code rpc_ioctl_code

TA-independent IOCTL codes

typedef enum rpc_ethtool_flags rpc_ethtool_flags

TA-independent ethtool flags.

typedef enum rpc_ethtool_reset_flags rpc_ethtool_reset_flags

TA-independent ethtool reset flags.

typedef enum rpc_ethtool_cmd rpc_ethtool_cmd

TA-independent ethtool commands.

typedef enum rpc_eth_proto rpc_eth_proto

TA-independent ethernet protocols.

typedef enum rpc_arp_hardware rpc_arp_hardware

TA-independent ARP hardware identifiers.

typedef enum rpc_packet_type rpc_packet_type

TA-independent packet types.

typedef enum rpc_file_mode_flags rpc_file_mode_flags

All known file mode flags.

typedef enum rpc_sysinfo_command rpc_sysinfo_command

TA-independent sysinfo() commands

typedef enum rpc_clock_id rpc_clock_id

IDs of various system clocks

typedef enum rpc_adj_mode rpc_adj_mode

Mode flags in timex structure (see man clock_adjtime)

typedef enum rpc_timex_status rpc_timex_status

Status flags in timex structure (see man clock_adjtime)

typedef enum rpc_waitpid_opts rpc_waitpid_opts

TA-independent waitpid options.

typedef enum rpc_wait_status_flag rpc_wait_status_flag

Flags to be used in TA-independent status structure for wait functions.

typedef struct rpc_wait_status rpc_wait_status

TA-independent status structure to be used for wait functions.

typedef enum rpc_sysconf_name rpc_sysconf_name

TA-independent sysconf() names.

typedef struct rpc_ptr_off rpc_ptr_off

Pointer to the memory area

typedef uint32_t rpc_ptr_id_index

An identifier corresponding to memory address

It is related to the definition of the pointer type tarpc_ptr in include/tarpc.x.m4

typedef uint32_t rpc_ptr_id_namespace

An identifier corresponding to namespace of memory pointers group

typedef enum rpc_network_event rpc_network_event

TA-independent network event flags.

typedef enum rpc_network_event_bit rpc_network_event_bit

network event flag bits.

typedef enum rpc_transmit_file_flags rpc_transmit_file_flags

TA-independent TransmitFile() flags.

typedef enum rpc_servicetype_flags rpc_servicetype_flags

TA-independent Win32 SERVICETYPE flags.

typedef enum rpc_cf_access_right rpc_cf_access_right

TA-independent definitions for Windows CreateFile(). Attention: these flags are the most frequently used, there are in Windows much more flags for CreateFile().

typedef enum rpc_open_sock_flags rpc_open_sock_flags

TA-independent flags for WSASocket()

typedef enum rpc_join_leaf_flags rpc_join_leaf_flags

TA-independent flags for WSAJoinLeaf()

typedef union iomux_funcs iomux_funcs

Pointers to a multiplexer functions.

TODO: iomux_funcs should include iomux type, making arg list for all the functions shorter.

typedef union iomux_state iomux_state

A multiplexer context.

typedef union iomux_return iomux_return

Return events of a multiplexer.

typedef int iomux_return_iterator

Iterator for iomux_return structure.

typedef rpc_ptr rcf_pch_mem_id

Library for registering/unregistering of memory addresses An identifier corresponding to memory address

Deprecated Type to maintain backward compatibility

typedef int (*api_func)(
    int param,
    ...
    )

Type of RPC call function where

  • the first argument is of integer type;

  • return value is an integer.

typedef int (*api_func_ptr)(
    void *param,
    ...
    )

Type of RPC call function where

  • the first argument is of pointer type;

  • return value is an integer.

typedef int (*api_func_void)(void)

Type of RPC call function where

  • there is no arguments;

  • return value is an integer.

typedef void* (*api_func_ret_ptr)(
    int param,
    ...
    )

Type of RPC call function where

  • the first argument is of integer type;

  • return value is a pointer.

typedef void* (*api_func_ptr_ret_ptr)(
    void *param,
    ...
    )

Type of RPC call function where

  • the first argument is of pointer type;

  • return value is a pointer.

typedef void* (*api_func_void_ret_ptr)(void)

Type of RPC call function where

  • there is no arguments;

  • return value is a pointer.

typedef int64_t (*api_func_ret_int64)(
    int param,
    ...
    )

Type of RPC call function where

  • the first argument is of integer type;

  • return value is an integer64.

typedef struct checked_arg checked_arg

Structure for checking of variable-length arguments safety

typedef struct te_rpc_error_data te_rpc_error_data

Structure for storing data about error occurred during RPC call.

typedef void rpc_wrapper_func(struct rpc_call_data *call)

Type of functions implementing an RPC wrapper around real code This is a function type, not a function pointer

typedef bool rpc_copy_func(
    void *in,
    void *out
    )

Type of functions doing input-to-output copying for RPC calls. This is a function type, not a function pointer

typedef bool_t (*rpc_generic_xdr_out)(
    XDR *,
    void *out
    )

Generic XDR resource-freeing routine pointer

typedef struct rpc_func_info rpc_func_info

Description of a RPC routine implementation

typedef struct rpc_call_data rpc_call_data

RPC call activation details

typedef struct deferred_call_list deferred_call_list

Opaque structure to hold the list of asynchronous RPC calls

typedef void() tarpc_close_fd_hook(
    int fd,
    void *cookie
    )

Type of a hook function called just before FD is closed.

Close hooks do not return error directly and closing function is always called, however they can set RPC error with te_rpc_error_set() or save information about error in cookie.

Parameters:

fd

File descriptor that is about to be closed.

cookie

Pointer specified when registering the hook.

typedef struct rpcs_msghdr_helper rpcs_msghdr_helper

Helper structure used when converting tarpc_msghdr to struct msghdr and vice versa.

typedef enum rpcs_msghdr_check_args_mode rpcs_msghdr_check_args_mode

Variants of checking whether there are unexpected changes of arguments after function call.

typedef uint64_t tarpc_size_t

RPC size_t analog

typedef int32_t tarpc_pid_t

RPC pid_t analog

typedef int64_t tarpc_ssize_t

RPC ssize_t analog

typedef uint32_t tarpc_socklen_t

RPC socklen_t analog

typedef tarpc_ptr tarpc_sigset_t

Handle of the ‘sigset_t’ or 0

typedef tarpc_ptr tarpc_fd_set

Handle of the ‘fd_set’ or 0

typedef int64_t tarpc_off_t

RPC off_t analog

typedef int64_t tarpc_rlim_t

RPC rlim_t analog

typedef int64_t tarpc_clock_t

RPC clock_t analogue

typedef int64_t tarpc_time_t

RPC time_t analogue

typedef int64_t tarpc_suseconds_t

RPC suseconds_t analogue

typedef tarpc_ptr tarpc_aiocb_t

Pointer to ‘struct aiocb’

typedef uint64_t tarpc_pthread_t

RPC pthread_t analogue

typedef tarpc_ptr tarpc_wsaevent

Handle of the ‘WSAEvent’ or 0

typedef tarpc_ptr tarpc_hwnd

Handle of the window

typedef tarpc_ptr tarpc_overlapped

WSAOVERLAPPED structure

typedef tarpc_ptr tarpc_handle

HANDLE

typedef tarpc_ptr tarpc_iomux_state

Handle of the ‘ iomux_state ‘ or 0

typedef int64_t tarpc_dlhandle

RPC dynamic linking loader handlers

typedef uint32_t tarpc_ethtool_command

Ethtool command, should be u32 on any Linux

typedef tarpc_ptr tarpc_rte_mempool

Handle of the ‘rte_mempool’ or 0

typedef tarpc_ptr tarpc_rte_mbuf

Handle of the ‘rte_mbuf’ or 0

typedef tarpc_ptr tarpc_rte_ring

Handle of the ‘rte_ring’ or 0

typedef uint64_t tarpc_rss_hash_protos_t

Bitmask of RSS hash protocols

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_free_in

rte_pktmbuf_free()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_next_in

rte_pktmbuf_get_next()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_pkt_len_in

rte_pktmbuf_get_pkt_len()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_nb_segs_in

rte_pktmbuf_get_nb_segs()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_port_in

rte_pktmbuf_get_port()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_data_len_in

rte_pktmbuf_get_data_len()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_vlan_tci_in

rte_pktmbuf_get_vlan_tci()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_vlan_tci_outer_in

rte_pktmbuf_get_vlan_tci_outer()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_flags_in

rte_pktmbuf_get_flags()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_pool_in

rte_pktmbuf_get_pool()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_headroom_in

rte_pktmbuf_headroom()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_tailroom_in

rte_pktmbuf_tailroom()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_packet_type_in

rte_pktmbuf_get_packet_type()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_rss_hash_in

rte_pktmbuf_get_rss_hash()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_fdir_id_in

rte_pktmbuf_get_fdir_id()

typedef struct tarpc_mbuf_in tarpc_rte_pktmbuf_get_tx_offload_in

rte_pktmbuf_get_tx_offload()

typedef struct tarpc_mbuf_in tarpc_rte_mbuf_match_tx_rx_pre_in

rte_mbuf_match_tx_rx_pre()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_info_get_in

rte_eth_dev_info_get()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_close_in

rte_eth_dev_close()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_reset_in

rte_eth_dev_reset()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_start_in

rte_eth_dev_start()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_stop_in

rte_eth_dev_stop()

typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_dev_rx_intr_enable_in

rte_eth_dev_rx_intr_enable()

typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_dev_rx_intr_disable_in

rte_eth_dev_rx_intr_disable()

typedef struct tarpc_rte_eth_tx_burst_in tarpc_rte_eth_tx_prepare_in

rte_eth_tx_prepare()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_set_link_up_in

rte_eth_dev_set_link_up()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_set_link_down_in

rte_eth_dev_set_link_down()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_promiscuous_enable_in

rte_eth_promiscuous_enable()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_promiscuous_disable_in

rte_eth_promiscuous_disable()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_promiscuous_get_in

rte_eth_promiscuous_get()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_allmulticast_enable_in

rte_eth_allmulticast_enable()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_allmulticast_disable_in

rte_eth_allmulticast_disable()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_allmulticast_get_in

rte_eth_allmulticast_get()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_get_vlan_offload_in

rte_eth_dev_get_vlan_offload()

typedef struct tarpc_descriptor_status_in tarpc_rte_eth_rx_descriptor_status_in

rte_eth_rx_descriptor_status()

typedef struct tarpc_descriptor_status_in tarpc_rte_eth_tx_descriptor_status_in

rte_eth_tx_descriptor_status()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_socket_id_in

rte_eth_dev_socket_id()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_is_valid_port_in

rte_eth_dev_is_valid_port()

typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_dev_rx_queue_start_in

rte_eth_dev_rx_queue_start()

typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_dev_rx_queue_stop_in

rte_eth_dev_rx_queue_stop()

typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_dev_tx_queue_start_in

rte_eth_dev_tx_queue_start()

typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_dev_tx_queue_stop_in

rte_eth_dev_tx_queue_stop()

typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_rx_queue_info_get_in

rte_eth_rx_queue_info_get()

typedef struct tarpc_rte_eth_dev_port_id_queue_id_in tarpc_rte_eth_tx_queue_info_get_in

rte_eth_tx_queue_info_get()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_flow_ctrl_get_in

rte_eth_dev_flow_ctrl_get()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_link_get_nowait_in

rte_eth_link_get_nowait()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_link_get_in

rte_eth_link_get()

typedef struct tarpc_rte_eth_dev_udp_tunnel_port_add_in tarpc_rte_eth_dev_udp_tunnel_port_delete_in

rte_eth_dev_udp_tunnel_port_delete()

typedef struct tarpc_rte_eth_dev_port_id_in tarpc_rte_eth_dev_get_name_by_port_in

rte_eth_dev_get_name_by_port()

typedef tarpc_ptr tarpc_rte_flow_attr

rte_flow API Handle of the ‘rte_flow_attr’ or 0

typedef tarpc_ptr tarpc_rte_flow_item

Handle of the ‘rte_flow_item’ or 0

typedef tarpc_ptr tarpc_rte_flow_action

Handle of the ‘rte_flow_action’ or 0

typedef tarpc_ptr tarpc_rte_flow

RTE flow handle or zero

typedef struct tarpc_rte_flow_validate_in tarpc_rte_flow_create_in

rte_flow_create()

typedef struct tarpc_void_in tarpc_dpdk_get_version_in

dpdk_get_version()

typedef struct tarpc_void_in tarpc_dpdk_find_representors_in

dpdk_find_representors()

typedef tarpc_serial_common_in tarpc_serial_close_in

serial_close() arguments

typedef tarpc_serial_common_out tarpc_serial_close_out

serial_close() output data

typedef tarpc_serial_common_in tarpc_serial_spy_in

serial_spy() arguments

typedef tarpc_serial_common_out tarpc_serial_spy_out

serial_spy() output data

typedef tarpc_serial_common_in tarpc_serial_force_rw_in

serial_force_rw() arguments

typedef tarpc_serial_common_out tarpc_serial_force_rw_out

serial_force_rw() output data

typedef tarpc_serial_common_in tarpc_serial_send_enter_in

serial_send_enter() arguments

typedef tarpc_serial_common_out tarpc_serial_send_enter_out

serial_send_enter() output data

typedef tarpc_serial_common_in tarpc_serial_send_ctrl_c_in

serial_send_ctrl_c() arguments

typedef tarpc_serial_common_out tarpc_serial_send_ctrl_c_out

serial_send_ctrl_c() output data

typedef tarpc_serial_common_out tarpc_serial_flush_out

serial_flush() output data

typedef struct tarpc_serial_check_pattern_out tarpc_serial_wait_pattern_out

serial_wait_pattern() output data

typedef enum rpc_xml_op rpc_xml_op

Tags distinguished for rpc call and rpc result

typedef struct xml_app_data xml_app_data

Additional data is to be passed to conversion procedures

typedef struct te_xdp_frame te_xdp_frame

Structure describing an Ethernet frame for XDP programs

typedef struct restconf_settings restconf_settings

Structure for RESTCONF configuration settings.

typedef struct tad_atm_cell_ctrl_data tad_atm_cell_ctrl_data

ATM cell control data specified by upper layers.

Pointer to this structure may be attached to ATM cell packets as opaque data.

typedef struct cli_csap_prompt cli_csap_prompt

CLI prompt information

typedef struct cli_csap_prompts cli_csap_prompts_t

A set of possible CLI prompts.

Implementation of CLI CSAP uses a separate process in which context functions of Expect library run. Expect library can help waiting for a number of patterns telling us which pattern matches the data read from output. CLI CSAP was designed with an assumption that ‘send’ operations results in some data output that follows with so called COMMAND PROMPT, i.e. a fixed string that tells it is ready to accept the next command. Some commands expect a login/password can be asked in reply, which is why we have two more prompt types: LOGIN PROMPT and PASSWORD PROMPT.

The values for all prompt types can be specified on CSAP creation (command prompt is mandatory), but you can overwrite prompt values for each ‘send’ operation. I.e. if you know that as the result of some command you will get command prompt that differs from original you need to specify new value for command prompt as a part of ‘send’ PDU.

typedef void (*csap_id_enum_cb)(
    csap_handle_t csap_id,
    void *ptr,
    void *opaque
    )

Prototype of callback function for CSAP IDs enumeration.

c true Continue c false Break

Parameters:

csap_id

CSAP ID

ptr

Associated pointer

opaque

typedef struct dhcp_csap_specific_data dhcp_csap_specific_data_t

DHCP CSAP specific data

typedef struct tad_eth_rw_data tad_eth_rw_data

Ethernet layer read/write specific data

typedef struct sendq_entry_s sendq_entry_t

Send queue entry structure

typedef struct sendq_s sendq_t

Send queue structure. Packets from the tail of the queue should be sent first

typedef struct tad_iscsi_layer_data tad_iscsi_layer_data

iSCSI CSAP layer specific data

typedef struct tad_rte_mbuf_rw_data tad_rte_mbuf_rw_data

RTE mbuf layer read / write specific data

typedef struct tad_socket_rw_data tad_socket_rw_data

Socket read/write specific data

typedef struct tad_bps_pkt_frag tad_bps_pkt_frag

Binary protocol packet fragment field description.

typedef struct tad_bps_pkt_frag_def tad_bps_pkt_frag_def

Internal data of BPS for binary packet fragment definition.

typedef struct tad_bps_pkt_frag_data tad_bps_pkt_frag_data

Internal data of BPS for binary packet fragment.

typedef struct csap_instance csap_instance

CSAP instance support resources and attributes.

typedef struct csap_layer_t csap_layer_t

Collection of common protocol layer attributes of CSAP.

typedef void (*csap_spt_unregister_cb_t)(void)

Callback type to release resources allocated by CSAP protocol support initialization.

Returns:

Status code.

typedef te_errno (*csap_layer_init_cb_t)(
    csap_p csap,
    unsigned int layer
    )

Callback type to initialize CSAP layer.

Parameters:

csap

CSAP instance.

layer

Numeric index of layer in CSAP type to be processed. Layers are counted from zero, from up to down.

Returns:

Status code.

typedef te_errno (*csap_layer_destroy_cb_t)(
    csap_p csap,
    unsigned int layer
    )

Callback type to destroy CSAP layer. This callback should free all undeground media resources used by this layer and all memory used for layer-specific data and pointed in respective structure in ‘layer-data’ in CSAP instance structure.

Parameters:

csap

CSAP instance.

layer

Numeric index of layer in CSAP type to be processed. Layers are counted from zero, from up to down.

Returns:

Status code.

typedef char* (*csap_layer_get_param_cb_t)(
    csap_p csap,
    unsigned int layer,
    const char *param
    )

Callback type to read parameter value of CSAP.

Parameters:

csap

CSAP instance.

layer

Index of layer in CSAP stack, which param is wanted.

param

Protocol-specific name of parameter.

Returns:

String with textual presentation of parameter value, or NULL if error occurred. User have to free memory at returned pointer.

typedef te_errno (*csap_layer_confirm_pdu_cb_t)(
    csap_p csap,
    unsigned int layer,
    asn_value *layer_pdu,
    void **p_opaque
    )

Callback type to confirm Traffic Pattern or Template PDU with CSAP parameters and possibilities. For example, it checks that there is sufficient information for traffic generating, and writes CSAP defaults to Traffic PDU.

Parameters:

csap

CSAP instance.

layer

numeric index of layer in CSAP type to be processed

layer_pdu

ASN.1 value with PDU

p_opaque

Location for opaque data pointer to be passed later to binary data generation callback

Returns:

Status code.

typedef void (*csap_layer_release_opaque_cb_t)(
    csap_p csap,
    unsigned int layer,
    void *opaque
    )

Callback to release opaque data prepared by confirm callback.

Parameters:

csap

CSAP instance

layer

Numeric index of layer in CSAP type to be processed

opaque

Opaque data pointer prepared by confirm callback

typedef te_errno (*csap_layer_generate_pkts_cb_t)(
    csap_p csap,
    unsigned int layer,
    const asn_value *tmpl_pdu,
    void *opaque,
    const tad_tmpl_arg_t *args,
    size_t arg_num,
    tad_pkts *sdus,
    tad_pkts *pdus
    )

Callback type to generate binary data to be sent to media. If some iteration was specified in traffic template, it done on the upper layer of template processing, this callback is called for every set of iteration parameters values.

Parameters:

csap

CSAP instance.

layer

Numeric index of layer in CSAP type to be processed.

tmpl_pdu

ASN.1 value with PDU.

opaque

Opaque data prepared by confirm callback.

args

Array with values of template iteration parameters, must be used to prepare binary data, if references to these paramters are present in traffic template PDU.

arg_num

Length of array above.

sdus

List of upper layer packets. May be NULL or empty list.

pdus

List to put packets generated by the layer.

Returns:

Status code.

typedef te_errno (*csap_layer_match_pre_cb_t)(
    csap_p csap,
    unsigned int layer,
    tad_recv_pkt_layer *meta_pkt_layer
    )

Callback to allocate and/or prepare per received packet layer opaque data.

It called on match fast path for each matched packet plus one.

Parameters:

csap

CSAP instance

layer

Numeric index of the layer

meta_pkt_layer

Receiver meta-packet layer

Returns:

Status code.

typedef te_errno (*csap_layer_match_do_cb_t)(
    csap_p csap,
    unsigned int layer,
    const asn_value *ptrn_pdu,
    void *ptrn_opaque,
    tad_recv_pkt *meta_pkt,
    tad_pkt *pdu,
    tad_pkt *sdu
    )

Callback type to parse received packet and match it with pattern.

It called on match fast path for each received packet.

Parameters:

csap

CSAP instance

layer

Numeric index of layer in CSAP type to be processed

ptrn_pdu

Pattern NDS for the layer

ptrn_opaque

Opaque data prepared by confirm_ptrn_cb

meta_pkt

Receiver meta-packet

pdu

Received packet (protocol data unit of the layer)

sdu

Rest upper layer payload (service data unit of the layer)

pkt

Received packet, may be list of fragments, which all should be defragmented by this callback and information should be put into single PDU

payload

Rest upper layer payload, if present (OUT)

parsed_packet

Caller of method should pass here empty asn_value instance of ASN type ‘Generic-PDU’. Callback have to fill this instance with values from parsed and matched packet.

Returns:

Status code.

typedef te_errno (*csap_layer_gen_pattern_cb_t)(
    csap_p csap,
    unsigned int layer,
    const asn_value *tmpl_pdu,
    asn_value **pattern_pdu
    )

Callback type to generating pattern to filter just one response to the packet which will be sent by this CSAP according to this template.

Parameters:

csap

CSAP instance.

layer

Numeric index of layer in CSAP type to be processed.

tmpl_pdu

ASN value with template PDU.

pattern_pdu

OUT: ASN value with pattern PDU, generated according to passed template PDU and CSAP parameters.

Returns:

Status code.

typedef te_errno (*csap_rw_init_cb_t)(csap_p csap)

Callback type to init CSAP layer part which is responsible for read/write.

Parameters:

csap

CSAP instance.

Returns:

Status code.

typedef te_errno (*csap_rw_destroy_cb_t)(csap_p csap)

Callback type to destroy CSAP layer part which is responsible for read/write.

Parameters:

csap

CSAP instance.

Returns:

Status code.

typedef te_errno (*csap_low_resource_cb_t)(csap_p csap)

Callback type to prepare/release low-layer resources of CSAP used in traffic process. Usually should open/close sockets, etc.

Parameters:

csap

CSAP instance.

Returns:

Status code.

typedef te_errno (*csap_read_cb_t)(
    csap_p csap,
    unsigned int timeout,
    tad_pkt *pkt,
    size_t *pkt_len
    )

Callback type to read data from media of the CSAP.

Parameters:

csap

CSAP instance

timeout

Timeout of waiting for data in microseconds

pkt

Packet for received data

pkt_len

Location for real length of the received packet

Returns:

Status code.

typedef te_errno (*csap_write_cb_t)(
    csap_p csap,
    const tad_pkt *pkt
    )

Callback type to write data to media of the CSAP.

Parameters:

csap

CSAP instance

pkt

Packet to send

Returns:

Status code.

typedef te_errno (*csap_write_read_cb_t)(
    csap_p csap,
    unsigned int timeout,
    const tad_pkt *w_pkt,
    tad_pkt *r_pkt,
    size_t *r_pkt_len
    )

Callback type to write data to media of CSAP and read data from media just after write, to get answer to sent request.

Parameters:

csap

CSAP instance

timeout

Timeout of waiting for data in microseconds

w_pkt

Packet to be sent

r_pkt

Packet for received data

r_pkt_len

Location for real length of the received packet

Returns:

Status code.

typedef struct csap_spt_type_t* csap_spt_type_p

Structure for description of particluar CSAP layer type supported in current TAD build. It contains some pointers to specific layer-dependent callbacks and list with supported lower neighbours.

typedef struct tad_eth_sap tad_eth_sap

Ethernet service access point data

typedef struct tad_pkt_seg tad_pkt_seg

TAD packet segment

typedef struct tad_pkt tad_pkt

TAD packet representation

typedef struct tad_pkts tad_pkts

TAD list of packets

typedef void (*tad_pkt_seg_free)(
    void *ptr,
    size_t len
    )

Packet segment data free function prototype.

Parameters:

ptr

Pointer

len

Associated length

typedef void (*tad_pkt_ctrl_free)(void *ptr)

Prototype of the function to free packet representation control blocks (segment, packet).

Parameters:

ptr

Pointer to control block to be freed

typedef te_errno (*tad_pkt_seg_enum_cb)(
    const tad_pkt *pkt,
    tad_pkt_seg *seg,
    unsigned int seg_num,
    void *opaque
    )

Prototype of the function to be called for each packet segment.

Parameters:

pkt

Packet

seg

Segment

seg_num

Number of the segment in packet (starting from 0)

opaque

Opaque pointer passed to enumeration routine

Returns:

Status code.

typedef struct tad_poll_context tad_poll_context

TAD poll context data.

typedef te_errno (*tad_processing_pkt_method)(
    csap_p csap,
    const char *usr_param,
    const uint8_t *pkt,
    size_t pkt_len
    )

Type for reference to user function for some magic processing with matched pkt

Parameters:

csap

CSAP descriptor structure.

usr_param

String passed by user.

pkt

Packet binary data, as it was caught from net.

pkt_len

Length of pkt data.

Returns:

Status code.

typedef struct tad_action_spec tad_action_spec

Action specification.

typedef struct tad_recv_ptrn_unit_data tad_recv_ptrn_unit_data

Per-pattern unit data of the TAD Receiver.

typedef struct tad_recv_pattern_data tad_recv_pattern_data

Per-pattern data of the TAD Receiver.

typedef struct tad_recv_context tad_recv_context

TAD Receiver context data.

typedef struct tad_recv_op_context tad_recv_op_context

TAD Receiver stop/wait/get context data.

typedef struct tad_recv_pkt_layer tad_recv_pkt_layer

Received packet layer data.

typedef struct tad_recv_pkt tad_recv_pkt

Element in queue of received packets.

typedef te_errno() tad_reply_op_status(
    void *,
    te_errno
    )

Just status report without any additional information

typedef te_errno() tad_reply_op_poll(
    void *,
    te_errno,
    unsigned int
    )

Report poll completion or error

typedef te_errno() tad_reply_op_pkts(
    void *,
    te_errno,
    unsigned int
    )

Report status and number of sent/received packets

typedef te_errno() tad_reply_op_pkt(
    void *,
    const asn_value *
    )

Report received packet

typedef struct tad_reply_spec tad_reply_spec

TAD async reply backend specification

typedef struct tad_reply_context tad_reply_context

TAD async reply context

typedef struct tad_rte_mbuf_sap tad_rte_mbuf_sap

RTE mbuf service access point data

typedef struct tad_send_tmpl_unit_data tad_send_tmpl_unit_data

Per-template unit data of the TAD Sender.

typedef struct tad_send_template_data tad_send_template_data

Per-template data of the TAD Sender.

typedef struct tad_send_context tad_send_context

TAD Sender context data.

typedef te_errno (*tad_special_send_pkt_cb)(
    csap_p csap,
    const char *usr_param,
    tad_pkts *pkts
    )

Type for reference to user function for some magic processing with matched pkt

Parameters:

csap

CSAP descriptor structure.

usr_param

String passed by user.

pkts

List of binary packets.

Returns:

Status code.

typedef struct tad_int_expr_t tad_int_expr_t

Type for expression presentation struct

typedef struct tad_du_data_t tad_du_data_t

Struct for octet or character string handling.

typedef int (*tad_user_generate_method)(
    int csap_id,
    int layer,
    asn_value *tmpl
    )

Type for reference to user function for generating data to be sent.

Parameters:

csap_id

Identifier of CSAP

layer

Numeric index of layer in CSAP type to be processed.

tmpl

ASN value with template. function should replace that field (which it should generate) with #plain (in headers) or #bytes (in payload) choice (IN/OUT)

Returns:

zero on success or error code.

typedef struct csap_instance* csap_p

Pointer type to CSAP instance

typedef enum tapi_cfg_base_ta_dir tapi_cfg_base_ta_dir

Kind of a TA directory

typedef enum tapi_cfg_if_chan tapi_cfg_if_chan

Supported types of channels

typedef struct tapi_cfg_if_fc tapi_cfg_if_fc

Interface flow control parameters. Negative value means “do not set”, 0 - disable, 1 - enable.

typedef struct tapi_cfg_if_rss_hfunc tapi_cfg_if_rss_hfunc

Information about RSS hash function

typedef enum te_nginx_cpu_aff_mode te_nginx_cpu_aff_mode

Nginx worker processes CPU affinity modes

typedef enum te_nginx_server_tokens_mode te_nginx_server_tokens_mode

Nginx server response presentation mode

typedef const char* tapi_openvpn_id

Definition of a type for OpenVPN instance ID

typedef const char* tapi_openvpn_prop

Type for sub instance IDs

typedef te_errno (*tapi_cfg_openvpn_int_param_set)(
    const char *ta,
    tapi_openvpn_id id,
    int val
    )

Prototype for a function setting parameter of an integer type

typedef te_errno (*tapi_cfg_openvpn_str_param_set)(
    const char *ta,
    tapi_openvpn_id id,
    const char *val
    )

Prototype for a function setting parameter of a string type

typedef enum tapi_cfg_rx_rule_spec_loc tapi_cfg_rx_rule_spec_loc

Special rule insertion locations

typedef enum tapi_cfg_rx_rule_flow tapi_cfg_rx_rule_flow

Supported types of flow for Rx rules

typedef const char* tapi_socks_id

Definition of a type for Socks instance ID

typedef const char* tapi_socks_user_id

Definition of a type for Socks user instance ID

typedef const char* tapi_socks_proto_id

Definition of a type for Socks proto instance ID

typedef const char* tapi_socks_cipher_id

Definition of a type for Socks cipher instance ID

typedef const char* tapi_socks_interface_id

Definition of a type for Socks interface instance ID

typedef enum te_socks_impl te_socks_impl

Enumeration of SOCKS server implementations

typedef struct test_behaviour test_behaviour

List of test behaviour switches.

typedef enum tapi_bpf_stim_type tapi_bpf_stim_type

Stimulus types.

typedef struct tapi_bpf_stim_ctx tapi_bpf_stim_ctx

Internal BPF context.

typedef struct tapi_bpf_stim_hdl tapi_bpf_stim_hdl

Congestion stimuli BPF handle type.

typedef struct tapi_dns_unbound_cfg_opt tapi_dns_unbound_cfg_opt

Unbound DNS server config file options.

typedef bool bool struct tapi_nvme_internal_dirinfo tapi_nvme_internal_dirinfo

Directory info

typedef struct tapi_perf_error_map tapi_perf_error_map

Perf application error messages mapping.

typedef enum tapi_local_file_type tapi_local_file_type

File types.

typedef struct tapi_local_file_property tapi_local_file_property

File’s property.

typedef struct tapi_local_file tapi_local_file

A file representation.

typedef struct tapi_local_file_le tapi_local_file_le

Files list entry.

typedef te_errno (*tapi_local_fs_traverse_cb)(
    tapi_local_file *file,
    void *user_data
    )

Prototype of handler for using in tapi_local_fs_traverse.

Parameters:

file

Local file which is represented by tapi_local_file structure.

user_data

Opaque user data.

Returns:

Status code.

See also:

tapi_local_fs_traverse

typedef enum tapi_storage_service_type tapi_storage_service_type

Back-end service type.

typedef struct tapi_storage_auth_params tapi_storage_auth_params

Authorization parameters of service.

typedef struct tapi_storage_share_le tapi_storage_share_le

Shared directories list entry.

typedef struct tapi_snmp_if_table_row_t tapi_snmp_if_table_row_t

RFC1213-MIB::ifTable row

typedef struct tapi_snmp_ip_addr_table_row_s tapi_snmp_ip_addr_table_row_t

RFC1213-MIB::ipAddrTable row

typedef struct tapi_snmp_if_table_row_t tapi_snmp_if_table_row_t

Rows in an instance of an ifTable

typedef struct tapi_snmp_ip_addrtable_row_t tapi_snmp_ip_addrtable_row_t

Rows in an instance of an ipAddrTable

typedef struct tapi_snmp_ip_address_table_row_s tapi_snmp_ip_address_table_row_t

Rows in an instance of an IP-MIB::ipAddressTable

typedef struct tapi_snmp_ip_net_to_media_table_row_s tapi_snmp_ip_net_to_media_table_row_t

Rows in an instance of an IP-MIB::ipNetToMediaTable

typedef struct tapi_snmp_ip_cidr_route_table_row_s tapi_snmp_ip_cidr_route_table_row_t

Rows in an instance of an IP-FORWARD-MIB::ipCidrRouteTable

typedef bool (*te_expand_param_func)(
    const char *name,
    const void *ctx,
    te_string *dest
    )

Type for parameter expanding functions for te_string_expand_parameters().

The function is expected to append a value associated with name to dest, or leave dest if name is undefined.

The function is allowed to return true without actually modifying dest meaning that name is associated with an “explicitly empty” value.

Parameters:

name

parameter name

ctx

parameter expansion context

dest

destination string

Returns:

true if dest has been appended to

typedef const char* (*te_param_value_getter)(
    const char *name,
    const void *ctx
    )

A function type for getting a value by name from given context.

Deprecated This type is only used by deprecated old te_expand_parameters(). See te_expand_param_func().

Parameters:

name

parameter name

ctx

parameter context

Returns:

a value associated with name or NULL

typedef struct te_meas_stats_data_t te_meas_stats_data_t

Structure with main statistical characteristics of sample

typedef struct te_meas_stats_stab_t te_meas_stats_stab_t

Data for stabilization of sample

typedef struct te_meas_stats_summary_t te_meas_stats_summary_t

Summary of sample, e.g. its histogram

typedef struct te_meas_stats_t te_meas_stats_t

Structure for providing both summary and stabilization by request

typedef struct trc_test_iter_arg trc_test_iter_arg

Test iteration argument

typedef struct trc_test_iter_args trc_test_iter_args

Head of the list with test iteration arguments

typedef struct trc_report_argument trc_report_argument

TE log test argument

typedef struct trc_exp_result_entry trc_exp_result_entry

Single test result with auxiliary information for TRC.

typedef struct trc_exp_result trc_exp_result

Expected test result.

typedef struct te_trc_db te_trc_db

Short alias for TRC database type

typedef struct te_trc_db_walker te_trc_db_walker

Short alias for type to represent position in TRC database tree

typedef int (*func_args_match_ptr)(
    const void *,
    unsigned int,
    trc_report_argument *,
    bool
    )

Typedef for function matching iterations in TRC with iterations from XML log. The first argument is pointer to TRC iteration, the second one is the number of arguments in the array pointer to which is passed as the third argument. The last argument indicates whether to use function for filtering out some iterations instead of matching.

typedef enum step_iter_flags step_iter_flags

Flags passed to trc_db_walker_step_iter() function.

typedef enum trc_db_walker_motion trc_db_walker_motion

Types of motion of the TRC database walker

typedef struct trc_user_data trc_user_data

User data associated with TRC database element

typedef struct trc_file trc_file

Item of queue of included files

typedef struct trc_tests trc_tests

Head of the list with tests

typedef struct trc_test_iter trc_test_iter

Test iteration

typedef struct trc_test_iters trc_test_iters

Head of the list with test iterations

typedef enum trc_test_type trc_test_type

Types of tests

typedef struct trc_test trc_test

Test run

typedef struct tarpc_void_in tarpc_upnp_cp_connect_in

Create connection arguments.

typedef struct tarpc_void_in tarpc_upnp_cp_disconnect_in

Destroy connection arguments.

typedef enum rgt_attr_type rgt_attr_type_t

Each template before using is parsed onto blocks each block can be whether a constant sting or a variable value. For example the following single line template: The value of A is @s:A@, the value of B is @s:B@. Will be split into five blocks:

  1. const string: “The value of A is “

  2. a value of variable: $A (output via s format string)

  3. const string: “, the value of B is “

  4. a value of variable: $B (output via s format string)

  5. const string: “.” The list of possible attribyte types

typedef struct rgt_attrs rgt_attrs_t

Structure to keep attribute value

typedef enum rgt_blk_type rgt_blk_type_t

Specifies the type of block

typedef struct rgt_var_def rgt_var_def_t

The structure represents single variable in template

typedef struct rgt_blk rgt_blk_t

The structure represents one block of a template

typedef struct rgt_tmpl rgt_tmpl_t

Structure to keep a single template

typedef enum rgt_io_mode rgt_io_mode_t

Modes of reading raw log file

typedef struct param param

Structure that represents session/test/package “parameter” entity

typedef enum result_status result_status_t

Possible results of test, package or session

typedef struct result_info result_info_t

Structure for keeping session/package/test result information

typedef enum node_type node_type_t

Possible node types

typedef struct rgt_author rgt_author

Package author.

typedef struct node_descr node_descr_t

Structure that represents information about a particular entry. It is used for passing information about start/end events.

typedef struct ctrl_msg_data ctrl_msg_data

Additional data passed to callbacks processing control messages

typedef int (*f_process_ctrl_log_msg)(
    node_info_t *node,
    ctrl_msg_data *data
    )

Type of callback function used for processing control messages

Parameters:

node

Control node information

data

Additional data (like test verdicts)

typedef enum rgt_op_mode rgt_op_mode_t

RGT operation mode constants

typedef int (*f_fetch_log_msg)(
    struct log_msg **msg,
    struct rgt_gen_ctx *ctx
    )

Type of function that is used for extracting log messages from a raw log file. Such function is responsible for only raw-level parsing and it doesn’t generates the complete log string, so that it shouldn’t fill “txt_msg” field of “log_msg” structure.

typedef struct rgt_gen_ctx rgt_gen_ctx_t

Structure that keeps generic data used in processing raw log file.

typedef struct msg_arg msg_arg

Structure that represents argument in its raw representation There must be some more information given to determine which type of data it consists of. (This information can be obtained form format string)

typedef struct log_msg log_msg

Structure that keeps log message in an universal format

typedef struct log_msg_ptr log_msg_ptr

Structure that is stored in the tree of log nodes instead of log_msg structure for each regular log message. It is used to reduce memory consumption: full log message is loaded to memory from file only when we need to process it, and memory is released as soon as we end with it.

typedef struct msg_queue msg_queue

Structure storing a queue of regular log message pointers.

typedef void (*capture_tmpls_output_t)(
    rgt_gen_ctx_t *ctx,
    rgt_depth_ctx_t *depth_ctx,
    rgt_tmpl_t *tmpl,
    const rgt_attrs_t *attrs
    )

Type of callback used for output of RGT templates.

typedef struct te_rgt_mi_meas_value te_rgt_mi_meas_value

Value of a measured parameter or statistic obtained from JSON.

typedef struct te_rgt_mi_meas_param te_rgt_mi_meas_param

Description of measured parameter

typedef struct te_rgt_mi_kv te_rgt_mi_kv

Key-value pair

typedef struct te_rgt_mi_meas_view_line_graph te_rgt_mi_meas_view_line_graph

Line-graph view

typedef struct te_rgt_mi_meas_view te_rgt_mi_meas_view

View (graph, etc)

typedef struct te_rgt_mi_meas te_rgt_mi_meas

Description of MI message of type “measurement”

typedef struct te_rgt_mi_person te_rgt_mi_person

Personal information

typedef struct te_rgt_mi_test_start te_rgt_mi_test_start

Description of MI message of type “test_start”

typedef struct te_rgt_mi_test_result te_rgt_mi_test_result

Description of a test result

typedef struct te_rgt_mi_test_end te_rgt_mi_test_end

Description of MI message of type “test_end”

typedef struct te_rgt_mi_trc_tag_entry te_rgt_mi_trc_tag_entry

Description of a TRC tag

typedef struct te_rgt_mi_trc_tags te_rgt_mi_trc_tags

Description of MI message of type “trc_tags”

typedef struct te_rgt_mi te_rgt_mi

Parsed MI message

typedef enum rgt_state rgt_state_t

The list of possible states in XML processing state machine

typedef enum rgt_node rgt_node_t

Possible node types

typedef struct rgt_depth_ctx rgt_depth_ctx_t

Structure that keeps values specific for the particular depth of processing XML file.

typedef struct rgt_mem_ctx rgt_mem_ctx_t

Structure that keeps context of mem-dump processing sequence.

typedef struct rgt_gen_ctx rgt_gen_ctx_t

Structure that keeps basic data used in processing XML file.

typedef struct rgt_depth_data_storage rgt_depth_data_storage

Storage for user data associated with different log depths.

typedef void() rgt_xml2fmt_free_depth_data_cb(void *data)

Type of callback to use with rgt_xml2fmt_free_depth_data().

typedef struct rgt_xml2multi_opts rgt_xml2multi_opts

Storage for parsed command line options

typedef enum read_message_rc read_message_rc

Message reading result code

typedef uint64_t entry[2]

Index entry

typedef struct rgt_cap_idx_rec rgt_cap_idx_rec

Entry in index of capture files heads.

Capture file head is the main PCAP header + PCAP header and data related to the first captured packet. That packet is a fake one containing information about sniffer (TA name, interface name, etc).

All such heads are stored in a single file in RAW log bundle. A separate index file tells at which position a head for a particular capture file is stored and how many bytes it contains.

typedef struct rgt_frag_rec rgt_frag_rec

Record in a RGT log bundle file describing how RAW log is split into fragments.

typedef struct set set

Set of numbers

typedef struct problem problem

Definition of problem to be solved

typedef enum alg_type alg_type

Algorithms types to be used for solving a problem

typedef enum trc_log_parse_state trc_log_parse_state

State of the TE log parser from TRC point of view

typedef struct trc_log_parse_ctx trc_log_parse_ctx

TRC report TE log parser context.

typedef struct trc_re_match_subst trc_re_match_subst

Regular expression match substitution

typedef struct trc_re_subst trc_re_subst

Regular expression substitution

typedef struct trc_re_namespace trc_re_namespace

Regular expression substitution

typedef struct trc_diff_key_stats trc_diff_key_stats

Statistics for each key which makes differences

typedef struct trc_diff_set trc_diff_set

Set of tags to compare

typedef enum trc_test_status trc_test_status

Status of expected testing result from TRC point of view.

typedef enum trc_diff_status trc_diff_status

Status of expected testing result comparison.

typedef struct trc_diff_stats_counter_s trc_diff_stats_counter

Type of simple counter.

typedef trc_diff_stats_counter trc_diff_stats_counters[TRC_TEST_STATUS_MAX][TRC_TEST_STATUS_MAX][TRC_DIFF_STATUS_MAX]

Set X vs set Y statistics are three dimension array of simple counters. Indices are the results of the corresponding set together with equal/different knowledge, when main result is the same.

typedef trc_diff_stats_counters trc_diff_stats[TRC_DIFF_IDS][TRC_DIFF_IDS - 1]

TRC differencies statistics are two dimension array of statistics per set X vs set Y statistics.

A half of this array is used in fact (the first index is always greater than the second one).

typedef struct trc_diff_entry trc_diff_entry

Element of the list with TRC diff results.

typedef struct trc_diff_ctx trc_diff_ctx

TRC diff tool context.

The object is quiet big and it is highly not recommented to allocate it on stack.

typedef struct trc_report_stats trc_report_stats

Testing results comparator statistics

typedef struct trc_report_test_iter_entry trc_report_test_iter_entry

Result of test iteration run

typedef struct trc_report_test_iter_data trc_report_test_iter_data

Data attached to test iterations

typedef struct trc_report_test_data trc_report_test_data

Data attached to test entry

typedef struct trc_report_ctx trc_report_ctx

TRC report context

typedef struct trc_report_key_test_entry trc_report_key_test_entry

Auxilary structure to list iterations marked by specific key

typedef struct trc_report_key_entry trc_report_key_entry

Key list entry

typedef struct trc_report_key_ctx trc_report_key_ctx

TRC report context

typedef struct trc_update_tag_logs trc_update_tag_logs

Group of logs with the same tag expression

typedef struct trc_update_wilds_list_entry trc_update_wilds_list_entry

Entry of list of wildcards used in updating rules

typedef enum trc_update_rtype trc_update_rtype

TRC updating rule types

typedef struct trc_update_rule trc_update_rule

TRC updating rule

typedef enum res_simpl_stat res_simpl_stat

Results simplification status

typedef struct trc_update_test_iter_data trc_update_test_iter_data

TRC Update test iteration data attached to iteration in TRC DB

typedef struct trc_update_test_data trc_update_test_data

TRC Update test data attached to test in TRC DB

typedef struct trc_update_test_entry trc_update_test_entry

Entry of queue containing information about tests to be updated

typedef struct trc_update_tests_group trc_update_tests_group

Entry of queue containing information about groups of tests to be updated

typedef struct trc_update_ctx trc_update_ctx

Context of TRC Update tool

Global Variables

const char* ta_name

Test Agent name

const char* ta_name

Test Agent name

const char* ta_execname

Test Agent executable name

char ta_dir[RCF_MAX_PATH]

Test Agent data and binaries location

char ta_tmp_dir[RCF_MAX_PATH]

Directory for temporary files

char ta_lib_mod_dir[RCF_MAX_PATH]

Directory for kernel module files

char ta_lib_bin_dir[RCF_MAX_PATH]

Directory for library files

uint32_t cfg_conf_delay

Delay for configuration changes accommodation

char* cfg_ta_list

Buffer with TAs list

char* cfg_get_buf

Buffer for GET requests

bool local_cmd_seq

Whether local commands sequence is terminated or not. This variable is intended to solve the problem mentioned in note 1 above.

char max_commit_subtree[CFG_INST_NAME_MAX]

Maximum allowed subtree value for commit operation. This variable is intended to solve the problem mentioned in note 2 above.

char* local_cmd_bkp

Backup file name which reflects situation before local SET/ADD/DEL command.

te_log_message_f lgr_log_message

Create message and register it in the raw log file.

pid_t tester_pid

Tester PID, needed to allow listeners to stop TE execution

log_listener_conf listener_confs[LOG_MAX_LISTENERS]

Array of listener configurations

log_listener listeners[LOG_MAX_LISTENERS]

Array of listeners

msg_queue listener_queue

Message queue instance to be used by Logger threads

bool listeners_enabled

Whether there are active listeners

streaming_filter streaming_filters[LOG_MAX_FILTERS]

Array of streaming filters

jmp_buf test_path_jmp_buf

Jump buffer to jump out from test path parser in the case of failure

bool tester_sigint_received

Is SIGINT signal received by Tester?

te_log_message_f* te_log_message_va

Logging backend

const char* te_lgr_entity

Global variable with name of the Logger entity to be used from libraries to log from this process context.

It MUST be initialized to some value to avoid segmentation fault.

const asn_type*const asn_base_boolean

Declaration of structures which describes basic ASN.1 types. BOOLEAN

const asn_type*const asn_base_integer

INTEGER

const asn_type*const asn_base_uinteger

UINTEGER

const asn_type*const asn_base_enum

ENUMERATED

const asn_type*const asn_base_charstring

UniversalString

const asn_type*const asn_base_octstring

OCTET STRING

const asn_type*const asn_base_bitstring

BIT STRING

const asn_type*const asn_base_real

REAL

const asn_type*const asn_base_null

NULL

const asn_type*const asn_base_objid

OBJECT IDENTIFIER

const asn_type*const asn_base_int4

INTEGER (0..15)

const asn_type*const asn_base_int8

INTEGER (0..255)

const asn_type*const asn_base_int16

INTEGER (0..65535)

const asn_type asn_base_boolean_s

BOOLEAN

const asn_type asn_base_integer_s

INTEGER

const asn_type asn_base_enum_s

ENUMERATED

const asn_type asn_base_charstring_s

UniversalString

const asn_type asn_base_octstring_s

OCTET STRING

const asn_type asn_base_bitstring_s

BIT STRING

const asn_type asn_base_real_s

REAL

const asn_type asn_base_null_s

NULL

const asn_type asn_base_objid_s

OBJECT IDENTIFIER

const asn_type asn_base_int1_s

INTEGER (0..1)

const asn_type asn_base_int2_s

INTEGER (0..3)

const asn_type asn_base_int3_s

INTEGER (0..7)

const asn_type asn_base_int4_s

INTEGER (0..15)

const asn_type asn_base_int5_s

INTEGER (0..31)

const asn_type asn_base_int6_s

INTEGER (0..63)

const asn_type asn_base_int7_s

INTEGER (0..127)

const asn_type asn_base_int8_s

INTEGER (0..255)

const asn_type asn_base_int9_s

INTEGER (0..511)

const asn_type asn_base_int12_s

INTEGER (0..4095)

const asn_type asn_base_int16_s

INTEGER (0..65535)

const asn_type asn_base_int24_s

INTEGER (0..16777215)

const asn_type asn_base_int32_s

INTEGER (0..4294967295)

const asn_type asn_base_uint32_s

UINTEGER (0..4294967295)

const te_enum_map cfg_cvt_mapping[]

Array to convert cfg_val_type to string and vice versa using te_enum.h

cfg_primary_type cfg_types[CFG_PRIMARY_TYPES_NUM]

Primary types array

te_log_message_f logfork_log_message

Logging backend for processed forked from Test Agents

te_log_message_f ten_log_message

Compose log message and send it to TE Logger.

static te_log_message_tx_f te_log_message_tx = NULL

Transport to log messages

netconf_recv_cb_t geneve_list_cb

Callback function to decode Geneve link data.

netconf_recv_cb_t vxlan_list_cb

Callback function to decode VXLAN link data.

rpc_info tarpc_functions[]

RPC functions table; generated automatically This will be soon moved to another library

restconf_settings restconf

RESTCONF configuration settings.

test_behaviour test_behaviour_storage

Storage for test behaviour switches.

This variable is introduced to make possible checking for test behaviours outside of main(). It is assumed that this variable is filled once on test start and after that it can only be read, so no mutex is used to protect it.

bool fd_not_closed_verdict

This variable is set to true when the verdict about FD not being properly closed is printed the first time from CLEANUP_RPC_CLOSE(), to avoid printing it multiple times when closing many FDs.

It is used to implement “cleanup_fd_leak_check” behaviour.

const tapi_job_methods_t rpc_job_methods

Methods for jobs created by RPC factory

tapi_job_method_create rpc_job_create

Create a job.

Job ID is set on successful function call

See also:

tapi_job_method_create

tapi_job_method_start rpc_job_start

Start a job

See also:

tapi_job_method_start

tapi_job_method_allocate_channels rpc_job_allocate_channels

Allocate channels for a job

See also:

tapi_job_method_allocate_channels

tapi_job_method_kill rpc_job_kill

Send a signal to the job

See also:

tapi_job_method_kill

tapi_job_method_killpg rpc_job_killpg

Send a signal to the proccess group

See also:

tapi_job_method_killpg

tapi_job_method_wait rpc_job_wait

Wait for the job completion

Negative timeout_ms means #TAPI_RPC_JOB_BIG_TIMEOUT_MS. TE_ECHILD return value means that the job was never started.

See also:

tapi_job_method_wait

tapi_job_method_stop rpc_job_stop

Stop a job

See also:

tapi_job_method_stop

tapi_job_method_destroy rpc_job_destroy

Destroy a job

See also:

tapi_job_method_destroy

tapi_job_method_set_workdir rpc_job_set_workdir

Set new working directory for a job.

This function should be called before the job is started.

See also:

tapi_job_method_set_workdir

tapi_job_method_wrapper_add rpc_job_wrapper_add

Add a wrapper for a job

See also:

tapi_job_method_wrapper_add

tapi_job_method_wrapper_delete rpc_job_wrapper_delete

Delete a wrapper

See also:

tapi_job_method_wrapper_delete

tapi_job_method_add_exec_param rpc_job_add_exec_param

Add a process parameters for a job

See also:

tapi_job_method_add_exec_param

tapi_job_method_add_sched_param rpc_job_add_sched_param

Use rpc_job_add_exec_param() in the new code

Deprecated

bool rpc_msghdr_msg_flags_init_check_enabled

Initialize and check rpc_msghdr.msg_flags value in RPC only if the variable is true.

te_trc_db* current_db

Pointer to DB we’re currently working with - last DB opened by trc_db_open

f_process_ctrl_log_msg ctrl_msg_proc[CTRL_EVT_LAST][NT_LAST]

External declarations of a set of message processing functions

jmp_buf rgt_mainjmp

The stack context of the main procedure

capture_tmpls_output_t capture_tmpls_out_cb

Callback used for output of RGT templates (NULL by default, if set to something else, used instead of rgt_tmpls_output()).

trc_re_substs key_substs

Key substitutions

trc_re_namespaces key_namespaces

Key namespaces

Global Functions

int ta_snmp_init_cold_reboot(char* param)

Prepare the cold reboot via SNMP.

Parameters:

param

Parameter for initialization the cold reboot

Returns:

Status code.

te_errno ta_snmp_cold_reboot(const char* id)

Cold reboot for the specified host via SNMP

Parameters:

id

Name of the host

Returns:

Status code

int ta_shell_init_cold_reboot(char* param)

Prepare the cold reboot via shell command.

Parameters:

param

Parameter for initialization the cold reboot

Returns:

Status code.

te_errno ta_shell_cold_reboot(const char* id)

Cold reboot for the specified host via shell command

Parameters:

id

Name of the host

Returns:

Status code

void ta_snmp_init()

Initialize Net-SNMP library

ta_snmp_session* ta_snmp_open_session(const struct sockaddr* net_addr, long int version, const char* community)

Open new SNMP session for getting/setting values at the specified agent

Parameters:

net_addr

Address of SNMP agent

version

SNMP version to use

community

SNMP v1/2c community name to use

Returns:

Pointer to new SNMP session structure, or NULL if failed.

void ta_snmp_close_session(ta_snmp_session* session)

Close opened SNMP session

Parameters:

session

Close opened SNMP session

te_errno ta_snmp_set(ta_snmp_session* session, ta_snmp_oid* oid, size_t oid_len, ta_snmp_type_t type, const uint8_t* value, size_t value_len)

Set value of single SNMP object

Parameters:

session

Opened SNMP session

oid

OID of the object to set value

oid_len

Length of OID (in OID components)

type

Value data type

value

Pointer to value data

value_len

Length of value data (in bytes)

Returns:

Status code.

te_errno ta_snmp_get(ta_snmp_session* session, ta_snmp_oid* oid, size_t oid_len, ta_snmp_type_t* type, uint8_t* buf, size_t* buf_len)

Get the value of single SNMP object (generic function)

Parameters:

session

Opened SNMP session

oid

OID of the object to get value from

oid_len

Length of OID (in OID components)

type

Value data type

buf

Buffer for value data

buf_len

Length of buffer (in bytes)

Returns:

Status code.

te_errno ta_snmp_get_int(ta_snmp_session* session, ta_snmp_oid* oid, size_t oid_len, long int* value)

Get integer SNMP value of single SNMP object

Parameters:

session

Opened SNMP session

oid

OID of the object to get value from

oid_len

Length of OID (in OID components)

value

Place for value data

Returns:

Status code.

te_errno ta_snmp_get_string(ta_snmp_session* session, ta_snmp_oid* oid, size_t oid_len, char* buf, size_t* buf_len)

Get octet string SNMP value of single SNMP object (value will be terminated by adding trailing zero byte)

Parameters:

session

Opened SNMP session

oid

OID of the object to get value from

oid_len

Length of OID (in OID components)

buf

Buffer for value data

buf_len

Length of buffer (IN), actual length of value (OUT) (in bytes)

Returns:

Status code.

te_errno write_sys_value(const char* value, const char* format, ...)

Write requested value to system file.

Parameters:

value

Null-terminated string containing the value.

format

Format string for path to the system file.

Arguments for the format string.

Returns:

Status code.

te_errno read_sys_value(char* value, size_t len, bool ignore_eaccess, const char* format, ...)

Read requested value from system file.

Parameters:

value

Where to save the value.

len

Expected length, including null byte.

ignore_eaccess

If true, return success saving empty string in value if the file cannot be opened due to EACCES error.

format

Format string for path to the system file.

Arguments for the format string.

Returns:

Status code.

te_errno get_dir_list(const char* path, char* buffer, size_t length, bool ignore_absence, include_callback_func include_callback, void* callback_data, int(*)(const struct dirent**, const struct dirent**) compar)

Obtain list of files in a given directory.

Parameters:

path

Filesystem path.

buffer

Where to save the list.

length

Available space in buffer.

ignore_absence

If true, return success and save empty string to buffer if path does not exist.

include_callback

If not NULL, will be called for each file name before including it in the list. The file name will be included only if this callback returns true.

callback_data

Pointer which should be passed to the callback as the second argument.

compar

Comparison function for sorting directory entries (may be NULL).

Returns:

Status code.

te_errno string_replace(char** dst, const char* src)

Replace the given string by another string given allocated from heap. Treat src with value NULL or pointing to an empty string equally and replace dst with NULL in this case.

Parameters:

dst

String to be replaced.

src

Replacement string.

Returns:

Status code.

te_errno string_empty_list(char** list)

Initializes the list of instances to be empty.

Parameters:

list

The list of instances.

Returns:

Status code.

te_errno get_interface_kind(const char* ifname, char* value)

Get kind of interface (“bond”, “vlan”, “team”, etc).

Parameters:

ifname

Interface name

value

Where to save interface kind (should be of RCF_MAX_VAL length).

Returns:

Status code.

te_errno ta_unix_conf_selftest_init(void)

Initialize auxiliary configuration objects used for testing Configurator.

Returns:

Status code.

te_errno ta_ethtool_lsets_field_get(ta_ethtool_lsets* lsets, ta_ethtool_lsets_field field, unsigned int* value)

Get value of link settings field.

Parameters:

lsets

Pointer to the structure with link settings

field

Field ID

value

Where to save requested value

Returns:

Status code.

te_errno ta_ethtool_lsets_field_set(ta_ethtool_lsets* lsets, ta_ethtool_lsets_field field, unsigned int value)

Set value of link settings field.

Parameters:

lsets

Pointer to the structure with link settings

field

Field ID

value

Value to set

Returns:

Status code.

const char* ta_ethtool_lmode_name(ta_ethtool_link_mode mode)

Get name of a link mode.

Parameters:

mode

Link mode ID

Returns:

Pointer to string constant.

te_errno ta_ethtool_lmode_parse(const char* name, ta_ethtool_link_mode* mode)

Parse string representation of a link mode (i.e. its name).

Parameters:

name

Link mode name

mode

Where to save parsed ID

Returns:

Status code.

te_errno ta_ethtool_lmode_supported(ta_ethtool_lsets* lsets, ta_ethtool_link_mode mode, bool* supported)

Check whether a given link mode is reported as supported.

Parameters:

lsets

Pointer to the link settings structure

mode

Link mode to check

supported

Will be set to true if link mode is supported, to false otherwise

Returns:

Status code.

te_errno ta_ethtool_lmode_advertised(ta_ethtool_lsets* lsets, ta_ethtool_link_mode mode, bool* advertised)

Check whether a given link mode is reported as advertised.

Parameters:

lsets

Pointer to the link settings structure

mode

Link mode to check

advertised

Will be set to true if link mode is advertised, to false otherwise

Returns:

Status code.

te_errno ta_ethtool_lmode_lp_advertised(ta_ethtool_lsets* lsets, ta_ethtool_link_mode mode, bool* lp_advertised)

Check whether a given link mode is reported as advertised by link partner.

Parameters:

lsets

Pointer to the link settings structure

mode

Link mode to check

lp_advertised

Will be set to true if link mode is advertised by link partner, to false otherwise

Returns:

Status code.

te_errno ta_ethtool_lmode_advertise(ta_ethtool_lsets* lsets, ta_ethtool_link_mode mode, bool enable)

Set a given link mode as advertised or not advertised.

Parameters:

lsets

Pointer to the link settings structure

mode

Link mode

enable

Whether link mode should be advertised or not

Returns:

Status code.

te_errno call_ethtool_ioctl(const char* if_name, int cmd, void* value)

Call SIOCETHTOOL ioctl() to get or set some values.

Parameters:

if_name

Name of the interface

cmd

Ethtool command number

value

Pointer to Ethtool command structure

Returns:

Status code.

te_errno get_ethtool_value(const char* if_name, unsigned int gid, ta_ethtool_cmd cmd, void** ptr_out)

Get a pointer to Ethtool command structure to work with. Structure fields are filled with help of related Ethtool get command when it is requested the first time (for a given gid).

Parameters:

if_name

Interface name

gid

Group ID

cmd

Ethtool command ID

ptr_out

Here requested pointer will be saved

Returns:

Status code.

te_errno commit_ethtool_value(const char* if_name, unsigned int gid, ta_ethtool_cmd cmd)

Commit configuration changes via SIOCETHTOOL. It is assumed that changes made by one or more set operations are saved in an object stored for a given interface which can be retrieved with ta_obj_find().

Parameters:

if_name

Interface name

gid

Request group ID

cmd

Ethtool command ID telling what to commit

Returns:

Status code.

te_errno ta_ethtool_lmode_list_names(ta_ethtool_lsets* lsets, bool link_partner, te_string* list_str)

Compose list of link mode names which are supported by our interface or advertised by link partner.

Parameters:

lsets

Structure with link settings

link_partner

If true, get list of link mode names advertised by link partner, otherwise - list of link mode names supported by the interface

list_str

Where to append names of link modes

Returns:

Status code.

te_errno ta_ethtool_get_max_speed(ta_ethtool_lsets* lsets, unsigned int* speed, unsigned int* duplex)

Determine best speed/duplex supported by network interface.

Parameters:

lsets

Structure with link settings

speed

Where to save best speed

duplex

Where to save corresponding duplex value

Returns:

Status code.

te_errno ta_ethtool_get_strings(unsigned int gid, const char* if_name, unsigned int set_id, const ta_ethtool_strings** strs)

Get set of strings (like set of RSS hash function names or Ethernet features).

Parameters:

gid

Request group ID

if_name

Interface name

set_id

String set ID

strs

Where to save pointer to filled ta_ethtool_strings (caller should not release it)

Returns:

Status code.

te_errno ta_ethtool_get_string_idx(unsigned int gid, const char* if_name, unsigned int set_id, const char* target, unsigned int* idx)

Get index of a given string in a set of strings.

Parameters:

gid

Request group ID

if_name

Interface name

set_id

String set ID

target

Target string

idx

Where to save index of the target string

Returns:

Status code.

int ta_ethtool_failed_cmd(void)

Get the failed Ethtool command.

Returns:

The last failed command number.

void ta_ethtool_reset_failed_cmd(void)

Reset the failed Ethtool command number. Call this right before calling a function from this API which may fail due to ioctl(SIOCETHTOOL), if you are going to check ta_ethtool_failed_cmd() after that.

const char* ta_ethtool_cmd2str(int cmd)

Get string representation of native ethtool command.

Parameters:

cmd

Ethtool command number.

Returns:

String representation.

static const char* get_ds_name(const char* oid)

Command line for all processes list Get name of the service by the object identifier

static int file_exists(char* file)

Check, if the file exists and accessible

int ds_create_backup(const char* dir, const char* name, int* index)

Create backup for the daemon/service configuration file.

Parameters:

dir

configuration file directory

name

configuration file basename

index

location for daemon/service index

Returns:

Status code

void ds_restore_backup(int index)

Restore initial state of the service.

Parameters:

index

service index

void ds_restore_backups(void)

Restore initial state of all services

const char* ds_config(int index)

Get configuration file name for the daemon/service.

Parameters:

index

index returned by the ds_create_backup

Returns:

Pathname of the configuration file

const char* ds_backup(int index)

Get name of the configuration file name backup for the daemon/service.

Parameters:

index

index returned by the ds_create_backup

Returns:

Pathname of the configuration file

bool ds_config_changed(int index)

Check, if the daemon/service configuration file was changed.

Parameters:

index

index returned by the ds_create_backup

Returns:

true, if the file was changed

int ds_lookup(const char* dir, const char* name)

Look for registered service with specified configuration directory and file name.

Parameters:

dir

configuration directory name

name

service name

Returns:

index or -1

void ds_config_touch(int index)

Notify backup manager that the configuration file was touched.

Parameters:

index

daemon/service index

te_errno daemon_get(unsigned int gid, const char* oid, char* value)

Get current state daemon.

Parameters:

gid

unused

oid

daemon name

value

value location

Returns:

Status code

te_errno daemon_set(unsigned int gid, const char* oid, const char* value)

Start/stop daemon.

Parameters:

gid

unused

oid

daemon name

value

new value

Returns:

Status code

static bool daemon_running(const char* daemon)

Check, if daemon/service is running (enabled).

Parameters:

daemon

daemon/service name

Returns:

true, if daemon is running

int find_file(unsigned int n, const char*const* files, bool exec)

Find the first existing file in the list.

Parameters:

n

Number of entries

files

Array with file names

exec

Should the file be executable

Returns:

Index of the found file or -1

te_errno slapd_add(void)

Add slapd node to the configuration tree.

Returns:

Status code.

te_errno pppoe_client_add(void)

Add PPPoE client support nodes to the configuration tree.

Returns:

Status of the operation.

te_errno nginx_commit(unsigned int gid, const cfg_oid* p_oid)

Apply locally stored changes.

Parameters:

gid

Group identifier

p_oid

Pointer to the OID

Returns:

Status code

nginx_inst* nginx_inst_find(const char* name)

Find nginx instance.

Parameters:

name

Instance name

Returns:

Nginx instance pointer

te_errno nginx_http_init(void)

Initialize nginx HTTP configuration subtree.

Returns:

Status code

void nginx_http_server_free(nginx_http_server* srv)

Free nginx HTTP server resources.

Parameters:

srv

Server pointer

void nginx_http_upstream_free(nginx_http_upstream* us)

Free nginx HTTP upstream group resources.

Parameters:

us

Upstream group pointer

te_errno nginx_param_get_string(char* value, const char* param)

Get configurator value from string buffer nginx parameter.

Parameters:

value

Configurator value buffer

param

Parameter value

Returns:

Status code

te_errno nginx_param_set_string(char** param, const char* value)

Set string buffer parameter from configurator value. Previous value will be freed.

Parameters:

param

Parameter location

value

Configurator value

Returns:

Status code

te_errno nginx_param_get_uint(char* value, unsigned int param)

Get configurator value from unsigned integer nginx parameter.

Parameters:

value

Configurator value buffer

param

Parameter value

Returns:

Status code

te_errno nginx_param_set_uint(unsigned int* param, const char* value)

Set nginx unsigned integer parameter from configurator value.

Parameters:

param

Parameter location

value

Configurator value

Returns:

Status code

te_errno nginx_param_get_boolean(char* value, bool param)

Get configurator value from nginx boolean parameter.

Parameters:

value

Configurator value buffer

param

Parameter value

Returns:

Status code

te_errno nginx_param_set_boolean(bool* param, const char* value)

Set nginx boolean parameter from configurator value.

Parameters:

param

Parameter location

value

Configurator value

Returns:

Status code

te_errno ta_unix_conf_ovs_init(void)

Initialise Open vSwitch deployment subtree.

Returns:

Status code.

te_errno ta_unix_conf_ps_init(void)

Initialize processes configuration.

Returns:

Status code.

te_errno ta_unix_conf_route_init(void)

Initialize routing configuration.

Returns:

Status code.

te_errno ta_unix_conf_route_find(ta_rt_info_t* rt_info)

Find route and return its attributes.

Parameters:

rt_info

Route related information

Returns:

Status code.

te_errno ta_unix_conf_route_change(ta_cfg_obj_action_e action, ta_rt_info_t* rt_info)

Change route.

Parameters:

action

What to do with this route

rt_info

Route-related information

Returns:

Status code.

te_errno ta_unix_conf_route_list(char** list)

Get instance list for object “/agent/route”.

Parameters:

list

Location for the list pointer

Returns:

Status code.

te_errno ta_unix_conf_route_blackhole_list(char** list)

Get list of ‘blackhole’ routes.

Parameters:

list

Location for pointer to allocated string

Returns:

Status code.

te_errno ta_unix_conf_route_blackhole_add(ta_rt_info_t* rt_info)

Add ‘blackhole’ route.

Parameters:

rt_info

Route information

Returns:

Status code.

te_errno ta_unix_conf_route_blackhole_del(ta_rt_info_t* rt_info)

Delete ‘blackhole’ route.

Parameters:

rt_info

Route information

Returns:

Status code.

te_errno ta_unix_conf_outgoing_if(ta_rt_info_t* rt_info)

Resolve outgoing interface for destination.

If destination is not directly reachable it is replaced with gateway address.

Parameters:

rt_info

Route information with specified destination

Returns:

Status code.

te_errno ta_unix_conf_rule_init(void)

Initialize rules configuration.

Returns:

Status code.

te_errno ta_unix_conf_rule_find(uint32_t required, te_conf_ip_rule* rule)

Find a rule and fill the optional fields.

Parameters:

required

Required fields for comparison

rule

Rule related information

Returns:

Status code.

te_errno ta_unix_conf_rule_list(char** list)

Get instances list for object “/agent/rule”.

Parameters:

list

Location for the list pointer

Returns:

Status code.

int conf_net_if_wrapper_if_nametoindex(const char* if_name)

Index of the network interface corresponding to the name if_name

Parameters:

if_name

Interface name

Returns:

Index of the network interface

te_errno conf_qdisc_parent_get(unsigned int gid, const char* oid, char* value)

‘get’ method implementation for TC parent

Parameters:

gid

group identifier

oid

full object instance identifier

value

location for the value

Returns:

Status code

te_errno conf_qdisc_handle_get(unsigned int gid, const char* oid, char* value)

‘get’ method implementation for TC handle

Parameters:

gid

group identifier

oid

full object instance identifier

value

location for the value

Returns:

Status code

te_errno conf_qdisc_enabled_set(unsigned int gid, const char* oid, const char* value, const char* if_name)

‘set’ method implementation for TC qdisc enabled

Parameters:

gid

group identifier

oid

full object instance identifier

value

location for the value

if_name

interface name

Returns:

Status code

te_errno conf_qdisc_enabled_get(unsigned int gid, const char* oid, char* value, const char* if_name)

‘get’ method implementation for TC qdisc enabled

Parameters:

gid

group identifier

oid

full object instance identifier

value

location for the value

if_name

interface name

Returns:

Status code

te_errno conf_qdisc_kind_get(unsigned int gid, const char* oid, char* value, const char* if_name)

‘get’ method implementation for TC kind

Parameters:

gid

group identifier

oid

full object instance identifier

value

location for the value

if_name

interface name

Returns:

Status code

te_errno conf_qdisc_kind_set(unsigned int gid, const char* oid, const char* value, const char* if_name)

‘set’ method implementation for TC kind

Parameters:

gid

group identifier

oid

full object instance identifier

value

location for the value

if_name

interface name

Returns:

Status code

te_errno conf_qdisc_param_set(unsigned int gid, const char* oid, const char* value, const char* if_name, const char* tc, const char* qdisc_str, const char* param)

‘set’ method implementation for TC qdisc netem/tbf

Parameters:

gid

group identifier

oid

full object instance identifier

value

location for the value

if_name

interface name

tc

Traffic Control value (empty string)

qdisc

QDisc value (empty string)

param

parameter name for set value

Returns:

Status code

te_errno conf_qdisc_param_get(unsigned int gid, const char* oid, char* value, const char* if_name, const char* tc, const char* qdisc, const char* param)

‘get’ method implementation for TC qdisc netem/tbf

Parameters:

gid

group identifier

oid

full object instance identifier

value

location for the value

if_name

interface name

tc

Traffic Control value (empty string)

qdisc

QDisc value (empty string)

param

parameter name for get value

Returns:

Status code

te_errno conf_qdisc_param_add(unsigned int gid, const char* oid, const char* value, const char* if_name, const char* tc, const char* qdisc, const char* param)

‘add’ method implementation for TC qdisc netem/tbf

Parameters:

gid

group identifier

oid

full object instance identifier

value

parameter for add

if_name

interface name

tc

Traffic Control value (empty string)

qdisc

QDisc value (empty string)

param

parameter name

Returns:

Status code

te_errno conf_qdisc_param_del(unsigned int gid, const char* oid, const char* if_name, const char* tc, const char* qdisc, const char* param)

‘del’ method implementation for TC qdisc netem/tbf

Parameters:

gid

group identifier

oid

full object instance identifier

if_name

interface name

tc

Traffic Control value (empty string)

qdisc

QDisc value (empty string)

param

Parameter name to delete

Returns:

Status code

te_errno conf_qdisc_param_list(unsigned int gid, const char* oid, const char* sub_id, char** list, const char* if_name)

‘list’ method implementation for TC qdisc netem/tbf

Parameters:

gid

group identifier

oid

full object instance identifier

sub_id

ID (name) of the object to be listed

list

location for the returned list pointer

if_name

interface name

Returns:

Status code

void conf_qdisc_tbf_params_free(void)

Free TC qdisc tbf parameters objects

void conf_qdisc_clsact_params_free(void)

Free TC qdisc clsact parameters objects.

te_errno ta_unix_conf_tc_init(void)

Initialization of Traffic Control configuration

Returns:

Status code

void ta_unix_conf_tc_fini(void)

Clean up of Traffic Control configuration

te_errno conf_tc_internal_init(void)

Initialization of libnl socket, caches, qdisc

Returns:

Status code

void conf_tc_internal_fini(void)

Clean up socket, caches, qdisc

struct nl_sock* conf_tc_internal_get_sock(void)

Get initialized libnl socket

Returns:

initialized libnl socket

struct rtnl_qdisc* conf_tc_internal_try_get_qdisc(const char* if_name)

Get qdisc binded with interface name must be given back with rtnl_qdisc_put() after usage

Parameters:

if_name

interface name

Returns:

qdisc context

struct rtnl_qdisc* conf_tc_internal_get_qdisc(const char* if_name)

Get qdisc binded with interface name if exist, otherwise create new no back with rtnl_qdisc_put() after usage

Parameters:

if_name

interface name

Returns:

qdisc context

te_errno conf_tc_internal_nl_error2te_errno(int nl_error)

Convert libnl error to TE error in case unknown error - function print WARN with interpretation of libnl error and return TE_EUNKNOWN

Parameters:

nl_error

libnl error

TE_EUNKNOWN

if conversation no success

Returns:

TE error

te_errno conf_tc_internal_qdisc_enable(const char* if_name)

Enable qdisc for interface

Parameters:

if_name

interface name

Returns:

TE error

te_errno conf_tc_internal_qdisc_disable(const char* if_name)

Disable qdisc for interface

Parameters:

if_name

interface name

Returns:

TE error

te_errno ta_unix_conf_sniffer_init(void)

Initialize sniffers configuration.

Returns:

Status code.

te_errno ta_unix_conf_sniffer_cleanup(void)

Cleanup sniffers function.

Returns:

Status code.

void* te_command_monitor(void* arg)

Launch the command monitor.

Parameters:

arg

Pointer to cmd_monitor_t structure

Returns:

NULL

int te_sniffer_process(int argc, char* argv[])

Launch the sniffer process.

te_errno ta_unix_conf_vm_init(void)

Initialize virtual machines configuration.

Returns:

Status code.

te_errno ta_interface_oper_status_get(const char* ifname, bool* status)

Get oper status of the interface (true - RUNNING).

Parameters:

ifname

name of the interface (like “eth0”)

status

location to put status of the interface

Returns:

Status code

te_errno ta_interface_status_get(const char* ifname, bool* status)

Get status of the interface (false - down or true - up).

Parameters:

ifname

name of the interface (like “eth0”)

status

location to put status of the interface

Returns:

Status code

te_errno ta_interface_status_set(const char* ifname, bool status)

Change status of the interface. If virtual interface is put to down state,it is de-installed and information about it is stored in the list of down interfaces.

Parameters:

ifname

name of the interface (like “eth0”)

status

true to get interface up and false to down

Returns:

Status code

void wsa_func_handles_discover()

Discover addresses of *Ex functions

static char* getenv_reliable(const char* name)

Try to get both cygwin and windows environment; non-reenterable

void* completion_callback_addr(const char* name)

Get address of completion callback.

Parameters:

name

name of the callback

Returns:

Callback address

te_errno completion_callback_register(const char* name, void* callback)

Register pair name:callback.

Parameters:

name

symbolic name of the callback which may be passed in RPC

callback

callback function

Returns:

Status code

te_errno get_addr_by_ifindex(int if_index, struct in_addr* addr)

Get an IPv4 address on specified interface.

Parameters:

if_index

Network device index

addr

Location for the obtained address

Returns:

Status code

static te_errno win_rpc_errno(int err)

Converts the windows error to RPC one.

static te_errno thread_create(void* func, void* arg, uint32_t* tid)

Create a thread.

Parameters:

func

entry point

arg

argument

tid

location for thread identifier

Returns:

Status code

static te_errno thread_cancel(uint32_t tid)

Cancel the thread.

Parameters:

tid

thread identifier

Returns:

Status code

static void thread_exit(void* ret)

Exit from the thread returning DWORD exit code.

Parameters:

argument

to return

static te_errno thread_join(uint32_t tid, void** arg)

Join the thread.

Parameters:

tid

thread identifier

arg

location for thread result

Returns:

Status code

static void rpc_overlapped_free_memory(rpc_overlapped* overlapped)

Free memory allocated for overlapped routine; it is assumed that test does not call two routines with single overlapped object simultaneously.

static int iovec2overlapped(rpc_overlapped* overlapped, int vector_len, struct tarpc_iovec* vector)

Allocate memory for the overlapped object and copy vector content to it.

static int overlapped2iovec(rpc_overlapped* overlapped, int* vector_len, struct tarpc_iovec** vector_val)

Copy memory from the overlapped object to vector and free it

static int buf2overlapped(rpc_overlapped* overlapped, int buflen, char* buf)

Allocate memory for the overlapped object and copy buffer content to it.

static int shut_how_rpc2h(rpc_shut_how how)

Convert shutdown parameter from RPC to native representation.

static void init_checked_arg(checked_arg** list, char* real_arg, int len, int len_visible)

Initialise the checked argument and add it into the list

static int check_args(checked_arg* list)

Verify that arguments are not corrupted

int cfg_backup_process_file(xmlNodePtr node, bool restore, const te_vec* subtrees)

Process “backup” configuration file or backup file.

Parameters:

node

<backup> node pointer

restore

if true, the configuration should be restored after unsuccessful dynamic history restoring

subtrees

Vector of the subtrees to restore. May be NULL for the root.

Returns:

status code (errno.h)

int cfg_backup_restore_ta(char* ta)

Save current version of the TA subtree, synchronize DB with TA and restore TA configuration.

Parameters:

ta

TA name

Returns:

status code (see te_errno.h)

int cfg_backup_create_file(const char* filename, const te_vec* subtrees)

Create “backup” configuration file with specified name.

Parameters:

filename

name of the file to be created

subtrees

Vector of the subtrees to create a backup file. NULL to create backup fo all the subtrees

Returns:

status code (errno.h)

te_errno cfg_backup_create_filter_file(const char* filename, const te_vec* subtrees)

Create file XML file with subtrees to filter backup file

Parameters:

filename

Name of the filter file

subtrees

Vector of the subtrees

Returns:

Status code

te_errno cfg_backup_verify(const char* filename, const te_vec* subtrees)

Verify backup configuration file

Parameters:

filename

Name of the backup file

subtrees

Vector of subtrees

Returns:

Status code

te_errno cfg_backup_restore_nohistory(const char* filename, const te_vec* subtrees)

Restore backup configuration file

Parameters:

filename

Name of the backup file

subtrees

Vector of subtrees

Returns:

Status code

te_errno cfg_backup_verify_and_restore(const char* filename, const te_vec* subtrees)

Verify backup and try to restore by backup

Parameters:

filename

Name of the backup file

subtrees

Vector of subtrees

Returns:

Status code

te_errno cfg_backup_verify_and_restore_ta_subtrees(const char* filename, const te_vec* ta_list)

Verify backup and try to restore by backup by specified agents

Parameters:

filename

Name of the backup file

ta_list

Vector of the test agents

Returns:

Status code

static bool cfg_object_agent(cfg_object* obj)

Check if object is /agent

static bool cfg_inst_agent(cfg_instance* inst)

Check if instance is /agent:*

Parameters:

inst

instance

Returns:

true if instance is /agent:*

static bool cfg_get_ta_name(const char* oid, char* ta)

Get name of the TA from /agent:xxx… object identifier.

Parameters:

oid

instance identifier

ta

TA name location (RCF_MAX_NAME length)

Returns:

true if name is extracted or false if OID content is unexpected

void cfg_process_msg_register(cfg_register_msg* msg)

Process message with user request.

Parameters:

msg

message pointer (it is assumed that message buffer length is long enough, for example for cfg_process_msg_get_oid it should be >= CFG_RECV_BUF_LEN)

cfg_pattern_msg* cfg_process_msg_pattern(cfg_pattern_msg* msg)

Process a user request to find all objects or object instances matching a pattern.

Parameters:

msg

message pointer

Returns:

message pointer of pointer to newly allocated message if the resulting message length > CFG_BUF_LEN

cfg_object* cfg_get_object(const char* oid_s)

Find object for specified instance object identifier.

Parameters:

oid_s

object instance identifier in string representation

Returns:

object structure pointer or NULL

cfg_object* cfg_get_obj_by_obj_id_str(const char* obj_id_str)

Find object for specified object identifier.

Parameters:

obj_id_str

object identifier in string representation

Returns:

pointer to object structure or NULL

cfg_instance* cfg_get_ins_by_ins_id_str(const char* ins_id_str)

Find instance for specified instance identifier.

Parameters:

ins_id_str

instance identifier in string representation

Returns:

pointer to instance structure or NULL

int cfg_db_add(const char* oid_s, cfg_handle* handle, cfg_val_type type, cfg_inst_val val)

Add instance to the database.

Parameters:

oid_s

object instance identifier

handle

location for handle of the new instance

type

instance value type

val

value to be assigned to the instance

Returns:

status code (see te_errno.h)

void cfg_db_del(cfg_handle handle)

Delete instance from the database.

Parameters:

handle

object instance handle

int cfg_db_del_check(cfg_handle handle)

Check that it’s possible to delete instance from the database.

Parameters:

handle

object instance handle

Returns:

status code (see te_errno.h)

int cfg_db_set(cfg_handle handle, cfg_inst_val val)

Change instance value.

Parameters:

handle

object instance handle

val

value to be assigned to the instance

Returns:

status code (see te_errno.h)

int cfg_db_get(cfg_handle handle, cfg_inst_val* val)

Get instance value.

Parameters:

handle

object instance handle

val

location for the value

Returns:

status code (see te_errno.h)

int cfg_db_find(const char* oid_s, cfg_handle* handle)

Find instance in the database.

Parameters:

oid_s

object instance identifier

handle

location for found object or object instance

Returns:

status code (see te_errno.h)

te_errno cfg_db_find_pattern(const char* pattern, unsigned int* p_nmatches, cfg_handle** p_matches)

Find all objects or object instances matching a pattern.

Parameters:

pattern

string object identifier possibly containing ‘*’ (see Configurator documentation for details)

p_nmatches

OUT: number of found objects or object instances

p_matches

OUT: array of object/(object instance) handles; memory for the array is allocated using malloc()

Returns:

0 or TE_EINVAL if a pattern format is incorrect or some argument is NULL.

int cfg_db_init(void)

Initialize the database during startup or re-initialization.

Returns:

0 (success) or TE_ENOMEM

void cfg_db_destroy(void)

Destroy the database before shutdown.

bool cfg_oid_match_volatile(const char* oid_s, char** oid_out)

Check if the object identifier (possibly wildcard) matches some volatile object on the Test Agent.

Parameters:

oid_s

object identifier in string representation

oid_out

the found object identifier in string

Returns:

true (match) or false (does not match)

void cfg_conf_delay_update(const char* oid)

Update the current configuration delay after adding/deleting/changing an instance.

Parameters:

oid

instance OID

static void cfg_conf_delay_reset(void)

Sleep the delay and reset it

te_errno cfg_db_tree_print(const char* filename, const unsigned int log_lvl, const char* id_fmt, ...)

Starting from a given prefix, print a tree of objects or instances into a file and(or) log.

Parameters:

filename

output filename (NULL to skip)

log_lvl

TE log level (0 to skip)

id_fmt

a format string for the id of the root from which we print.

Returns:

Status code.

void cfg_db_tree_print_msg_log(cfg_tree_print_msg* msg, const unsigned int cfg_log_lvl)

log_msg() helper to print a log upon arrival of this type of msg.

Parameters:

msg

Message (usually received by Configurator).

cfg_log_lvl

Level at which to log the message itself (maybe different from msg->log_lvl)

Returns:

te_errno cfg_db_obj_print_deps(const char* filename, const unsigned int log_lvl, const char* id_fmt, ...)

Print all dependancies of an object into a file and(or) log.

Parameters:

filename

output filename (NULL to skip)

log_lvl

TE log level (0 to skip)

id_fmt

a format string for the id of an obj.

Returns:

Status code.

te_errno cfg_db_unregister_obj_by_id_str(char* id, const unsigned int log_lvl)

Remove an object from the data base.

Parameters:

id

id string of an object to be removed.

log_lvl

Log level for messages about forced actions (instance delete, dependancy cut, etc. )

Returns:

0 or TE_EINVAL, if error occurred.

static bool cfg_instance_volatile(cfg_instance* inst)

Check if the instance is volatile

te_errno parse_config_dh_sync(xmlNodePtr root_node, te_kvpair_h* expand_vars)

Process XML document containing dynamic history and synchronise resulting database with Test Agents.

Parameters:

root_node

Root node of the input document

expand_vars

List of key-value pairs for expansion in file, NULL if environment variables are used for substitutions

Returns:

Status code.

int cfg_dh_process_file(xmlNodePtr node, te_kvpair_h* expand_vars, bool postsync)

Process “history” configuration file - execute all commands and add them to dynamic history. Note: this routine does not reboot Test Agents.

Parameters:

node

<history> node pointer

expand_vars

List of key-value pairs for expansion in file, NULL if environment variables are used for substitutions

postsync

is processing performed after sync with TA

Returns:

status code (errno.h)

int cfg_dh_create_file(char* filename)

Create “history” configuration file with specified name.

Parameters:

filename

name of the file to be created

Returns:

status code (errno.h)

int cfg_dh_attach_backup(char* filename)

Attach backup to the last command.

Parameters:

filename

name of the backup file

Returns:

status code (see te_errno.h)

int cfg_dh_restore_backup(char* filename, bool hard_check)

Restore backup with specified name using reversed command of the dynamic history. Processed commands are removed from the history.

Parameters:

filename

name of the backup file

hard_check

whether hard check should be applied on restore backup. For instance if on deleting some instance we got ESRCH or ENOENT, we should keep processing without any error.

TE_ENOENT

there is not command in dynamic history to which the specified backup is attached

Returns:

status code (see te_errno.h)

int cfg_dh_restore_backup_on_shutdown()

Restore backup when the configurator shuts down reversing the dynamic history. Processed commands are removed from the history.

Returns:

status code (see te_errno.h)

int cfg_dh_push_command(cfg_msg* msg, bool local, const cfg_inst_val* old_val)

Push a command to the history.

Parameters:

msg

message with set, add or delete user request.

local

whether this command is local or not.

old_val

The old value of the instance. It is used for CFG_SET and CFG_DEL command.

Returns:

0 (success) or TE_ENOMEM

int cfg_dh_apply_commit(const char* oid)

Notify history DB about successful commit operation. The result of calling of this function is that some entries in DH DB enter committed state.

Parameters:

oid

OID of the instance that was successfully committed

Returns:

status code (errno.h)

void cfg_dh_delete_last_command(void)

Delete last command from the history.

void cfg_dh_destroy(void)

Destroy dynamic history before shut down.

void cfg_dh_optimize(void)

Remove useless command sequences.

void cfg_dh_release_after(char* filename)

Release history after backup.

Parameters:

filename

name of the backup file

int cfg_dh_release_backup(char* filename)

Forget about this backup.

Parameters:

filename

name of the backup file

Returns:

status code

te_errno cfg_dh_restore_agents(const te_vec* ta_list)

Restore TA configuration using the direct order of the DH commands. If the command from DH has a backup file, this file will be compared with current state and TA will be restore using the attached file. Processed commands are not removed from the history.

Parameters:

ta_list

Test agent names

Returns:

Status code

te_errno cfg_rcf_add(cfg_instance* inst)

Handle /rcf: subtree add requests.

Returns:

Status code.

te_errno cfg_rcf_del(cfg_instance* inst)

Handle /rcf: subtree delete requests.

Returns:

Status code.

te_errno cfg_rcf_set(cfg_instance* inst)

Handle /rcf: subtree set requests.

Returns:

Status code.

void cfg_ta_reboot_all(void)

Reboot all Test Agents (before re-initializing of the Configurator).

int cfg_ta_sync(char* oid, bool subtree)

Synchronize object instances tree with Test Agents.

Parameters:

oid

identifier of the object instance or subtree or NULL if whole database should be synchronized

subtree

1 if the subtree of the specified node should be synchronized

Returns:

status code (see te_errno.h)

void cfg_ta_sync_obj(cfg_object* obj, bool subtree)

Synchronize all instances with given object with Test Agents

Parameters:

obj

object or object tree

subtree

1 if subtree should be synchronized

int cfg_ta_add_agent_instances(void)

Add instances for all agents.

Returns:

status code (see te_errno.h)

int cfg_tas_commit(const char* oid)

Commit changes in local Configurator database to the Test Agents.

Parameters:

oid

  • subtree OID or NULL if whole database should be synchronized

Returns:

status code (see te_errno.h)

int cfg_ta_sync_dependants(cfg_instance* inst, bool no_children)

Synchronize dependant nodes.

Parameters:

inst

Instance whose dependants to synchronize.

no_children

If true, do not synchronize direct children (makes things faster when synchronization is done after removing an instance from TA).

Returns:

0 on success, error code otherwise

void cfg_ta_log_syncing(bool flag)

Toggles logging of all sync operations

Parameters:

flag

Is logging enabled

te_errno conf_ta_reboot_agents(const te_vec* agents)

Reboot the test agents specified in the vector

Parameters:

agents

Vector of the agents

Returns:

Status code

te_errno parse_config_yaml(const char* filename, te_kvpair_h* expand_vars, xmlNodePtr xn_history_root, const char* conf_dirs)

Parse YAML configuration file.

The input file must be a YAML document containing dynamic history statements. One may leverage these statements to create instances for the objects maintained by the primary configuration file. The instances may come with logical expressions either per individual entry or per a bunch of entries to indicate conditions which must be true for the instances to hit the XML document being generated.

The XML document will be consumed directly by cfg_dh_process_file().

Parameters:

filename

The input file path

expand_vars

List of key-value pairs for expansion in file, NULL if environment variables are used for substitutions

xn_history_root

XML node containing translated yaml file content, NULL if yaml file is not being included

conf_dirs

Directories where additionally Configurator should search files via include directive NULL if there are no configuration directories.

Returns:

Status code.

typedef TAILQ_HEAD(refcnt_buffer)

List of reference-counted buffers

te_errno refcnt_buffer_init(refcnt_buffer* rbuf, void* data, size_t len)

Initialize a reference-counting buffer using the given data.

Ownership over the data is transferred to the buffer.

Parameters:

rbuf

refcount buffer

data

buffer contents

len

buffer size

Returns:

Status code

te_errno refcnt_buffer_init_copy(refcnt_buffer* rbuf, const void* data, size_t len)

Initialize a reference-counting buffer using the given data.

User-supplied data is copied into the buffer.

Parameters:

rbuf

refcount buffer

data

buffer contents

len

buffer size

Returns:

Status code

void refcnt_buffer_copy(refcnt_buffer* dest, const refcnt_buffer* src)

Copy a reference-counting buffer.

Parameters:

dest

target buffer

src

source buffer

void refcnt_buffer_free(refcnt_buffer* rbuf)

Deinitialize a reference-counting buffer.

Parameters:

rbuf

refcount buffer

void msg_buffer_init(msg_buffer* buf)

Initialize a message buffer.

Parameters:

buf

message buffer

te_errno msg_buffer_add(msg_buffer* buf, const refcnt_buffer* msg)

Add a message to a message buffer.

Parameters:

buf

message buffer

msg

message

Returns:

status code

void msg_buffer_remove_first(msg_buffer* buf)

Remove the first message in the buffer.

Parameters:

buf

message buffer

void msg_buffer_free(msg_buffer* buf)

Deinitialize the buffer.

All messages in the buffer will be freed.

Parameters:

buf

message buffer

cfg_file_type get_cfg_file_type(const char* filename)

Determine config file format.

Parameters:

filename

path to the config file

typedef SLIST_HEAD(ta_inst)

List of TAs

int config_parser(const char* filename)

Parse logger configuration file.

Parameters:

filename

configuration file full name.

0

Success.

Negative

Failure.

Returns:

Status information

void config_ta(ta_inst* ta)

Configure TA according to the configuration file.

Parameters:

ta

TA instance

void lgr_register_message(const void* buf_mess, size_t buf_len)

Register the log message in the raw log file.

Parameters:

buf_mess

Log message location.

buf_len

Log message length.

bool te_log_check_shutdown(void)

Check the logger shutdown flag.

Returns:

true if the flag is active else false.

te_errno listener_conf_add(const char* confstr)

Add user-supplied listener configuration

log_listener_conf* listener_conf_get(const char* name)

Find the user-supplied configuration for a given listener

te_errno listener_init(log_listener* listener, json_t* data)

Initialize the connection with the listener.

Parameters:

listener

listener description

data

metadata in JSON format

Returns:

Status code

te_errno listener_add_msg(log_listener* listener, const refcnt_buffer* msg)

Add message to listener’s buffer.

Parameters:

listener

listener description

msg

message

Returns:

Status code

te_errno listener_dump(log_listener* listener)

Dump messages to listener.

Parameters:

listener

listener description

Returns:

Status code

te_errno listener_finish_request(log_listener* listener, CURLcode result)

Handler listener’s response.

Parameters:

listener

listener description

result

CURL status code

Returns:

Status code

te_errno listener_finish(log_listener* listener)

Finish listener’s operation.

Parameters:

listener

listener description

Returns:

Status code

void listener_free(log_listener* listener)

Deinitialize listener and free its resources.

Parameters:

listener

listener description

te_errno msg_queue_init(msg_queue* queue)

Initialize a message queue.

Parameters:

queue

Message queue

Returns:

Status code

te_errno msg_queue_post(msg_queue* queue, const char* buf, size_t len)

Post a message on the queue.

A copy of the message will be made, so the caller is free to reuse the buffer for other messages.

Parameters:

queue

Message queue

buf

Message content

len

Message length

Returns:

Status code

void msg_queue_extract(msg_queue* queue, refcnt_buffer_list* list, bool* shutdown)

Extract messages from the message queue.

After this function is called, the queue’s contents will be moved into the user-supplied message list.

Parameters:

queue

Message queue

list

Message list to be initialized with queue contents

shutdown

Whether the queue is currently being shutdown

void msg_queue_shutdown(msg_queue* queue)

Notify the consumer that there will not be any new messages

te_errno msg_queue_fini(msg_queue* queue)

Deinitialize a message queue.

Parameters:

queue

Message queue

Returns:

Status code

void listeners_conf_dump(void)

Log current listener configuration

void* listeners_thread(void*)

Main routine for the listener server thread

te_errno streaming_action_add_listener(streaming_action* action, int listener_id)

Add a listener to streaming action.

Parameters:

action

streaming action

listener_id

id of listener to be added

Returns:

Status code

te_errno streaming_filter_process(const streaming_filter* filter, const log_msg_view* view)

Process a log message through a given filter.

Parameters:

filter

streaming filter

view

log message

Returns:

Status code

te_errno streaming_filter_add_action(streaming_filter* filter, const char* rule_name, int listener_id)

Add an action to a streaming filter.

Parameters:

filter

streaming filter

rule_name

streaming rule name

listener_id

listener’s position in the listeners array

void sniffers_handler(char* agent)

This is an entry point of sniffers message server. This server should be run as separate thread. All log messages from all sniffers entities will be processed by this routine.

Parameters:

agent

Agent name

void sniffer_mark_handler(char* mark_data)

This is an entry point of sniffers mark message server. This server should be run as separate thread. Mark messages to all sniffers transmitted by this routine.

Parameters:

mark_data

Data for the marker packet

void sniffers_logs_cleanup(char* agt_fldr)

Make folder for capture logs or cleanup existing folder.

Parameters:

agt_fldr

Full path to the folder

void sniffers_init(void)

Initialization of components to work of the sniffers.

ta* rcf_find_ta_by_name(char* name)

Obtain TA structure address by Test Agent name.

Parameters:

name

Test Agent name

Returns:

TA structure pointer or NULL

usrreq* rcf_find_user_request(usrreq* req, int sid)

Check if a message with the same SID is already sent.

Parameters:

req

request list anchor (ta->sent or ta->failed)

sid

session identifier of the received user request

void rcf_answer_user_request(usrreq* req)

Respond to user request and remove the request from the list.

Parameters:

req

request with already filled out parameters

void rcf_answer_all_requests(usrreq* req, int error)

Respond to all user requests in the specified list with specified error.

Parameters:

req

anchor of request list (&ta->sent or &ta->pending)

error

error to be filled in

void rcf_set_ta_dead(ta* agent)

Mark test agent as recoverable dead.

Parameters:

agent

Test Agent

void rcf_set_ta_unrecoverable(ta* agent)

Mark test agent as unrecoverable dead.

Parameters:

agent

Test Agent

int rcf_init_agent(ta* agent)

Initialize Test Agent or recovery it after reboot. Test Agent is marked as “unrecoverable dead” in the case of failure.

Parameters:

agent

Test Agent structure

Returns:

Status code

int rcf_send_cmd(ta* agent, usrreq* req)

Send command to the Test Agent according to user request.

Parameters:

agent

Test Agent structure

req

user request

Returns:

0 (success) or -1 (failure)

usrreq* rcf_alloc_usrreq(void)

Allocate memory for user request.

void rcf_ta_reboot_state_handler(ta* agent)

Entry point of reboot state machine.

Parameters:

agent

Test Agent structure

void rcf_set_ta_reboot_state(ta* agent, ta_reboot_state state)

Set the specified agent reboot state, log the message about it and and remember the timestamp of switching to a new state.

Parameters:

agent

Test Agent structure

state

Reboot state

bool rcf_ta_reboot_before_req(ta* agent, usrreq* req)

Check that from the point of view of the reboot context command can be sent to the agent

Parameters:

agent

Test Agent structure

req

User request

Returns:

true if command should be sent

bool rcf_ta_reboot_on_req_reply(ta* agent, rcf_op_t opcode)

Check that in terms of the reboot context the waiting requests should be processed

Parameters:

agent

Test Agent structure

opcode

Request operation code

Returns:

false if the waiting requests should be processed

void rcf_ta_reboot_init_ctx(ta* agent)

Initialize reboot context for the TA

Parameters:

agent

Test Agent structure

void rcf_ta_reboot_get_next_reboot_type(ta* agent)

Get the next available reboot type

Parameters:

agent

Test Agent structure

te_errno rcf_tce_conf_parse(rcf_tce_conf_t** conf, const char* file)

Parse an RCF TCE configuration.

Parameters:

conf

The variable to store the configuration.

file

The path to the TCE configuration file.

Returns:

0 on success or TE errno otherwise.

void rcf_tce_conf_free(rcf_tce_conf_t* conf)

Destroy an RCF TCE configuration.

typedef TAILQ_HEAD(test_path_items, test_path_item)

List of test path items

typedef TAILQ_HEAD(test_paths, test_path)

List of test paths

te_errno tester_test_path_parse(test_path* path)

Parse test path specification.

Parameters:

path

Path with not parsed string representation

Returns:

Status code.

te_errno test_path_new(test_paths* paths, const char* path, test_path_type type)

Create a new test path item and insert it into the list.

Parameters:

paths

Root of test paths

path

Path content

type

Type of the path

Returns:

Status code.

void test_paths_free(test_paths* paths)

Free list of test paths.

Parameters:

paths

Root of test paths to be freed

te_errno tester_process_test_paths(const tester_cfgs* cfgs, test_paths* paths, testing_scenario* scenario, bool all_by_default)

Process requested tests paths and create testing scenario. It no test paths are specified, scenario to run all tests is created.

Parameters:

cfgs

Configurations

paths

Paths specified by user

scenario

Location for testing scenario

all_by_default

If tests to run are not specified, run all by default

Returns:

Status code.

te_errno tester_log_trc_tags(const tqh_strings* trc_tags)

Log TRC tags as an MI message.

Tag names and values are split at the first colon, no additional checks are performed.

Parameters:

trc_tags

TRC tags.

Returns:

Status code.

typedef TAILQ_HEAD(test_suites_info, test_suite_info)

Head of the list with information about Test Suites

static void test_suite_info_free(test_suite_info* p)

Free test suite information.

Parameters:

p

Information about test suite

static void test_suites_info_free(test_suites_info* suites)

Free list of test suites information.

Parameters:

suites

List of with test suites information

te_errno tester_build_suite(const test_suite_info* suite, bool verbose)

Build Test Suite.

Parameters:

suite

Test Suites

verbose

Be verbose in the case of build failure

Returns:

Status code.

te_errno tester_build_suites(const test_suites_info* suites, bool verbose)

Build list of Test Suites.

Parameters:

suites

List of Test Suites

verbose

Be verbose in the case of build failure

Returns:

Status code.

typedef TAILQ_HEAD(cmd_monitor_descrs, cmd_monitor_descr)

Head of a queue of cmd_monitor_descrs

void free_cmd_monitor(cmd_monitor_descr* monitor)

Free memory occupied by command monitor description.

Parameters:

monitor

Monitor description structure pointer

void free_cmd_monitors(cmd_monitor_descrs* monitors)

Free memory occupied by command monitor descriptions.

Parameters:

monitors

Queue of monitor descriptions

int start_cmd_monitors(cmd_monitor_descrs* monitors)

Start command monitors from the queue.

Parameters:

monitors

Queue of monitor descriptions

Returns:

0 on success, -1 on failure

int stop_cmd_monitors(cmd_monitor_descrs* monitors)

Stop command monitors from the queue.

Parameters:

monitors

Queue of monitor descriptions

Returns:

0 on success, -1 on failure

typedef TAILQ_HEAD(persons_info, person_info)

Head of the list with information about persons

typedef TAILQ_HEAD(test_options, test_option)

List of options

typedef SLIST_HEAD(test_value_types, test_value_type)

List of value’s types

typedef TAILQ_HEAD(test_vars_args, test_var_arg)

List of test session variables

typedef TAILQ_HEAD(run_items, run_item)

List of run items

typedef TAILQ_HEAD(tests_info, test_info)

Head of the list with test info

typedef TAILQ_HEAD(test_packages, test_package)

Head of the list of test packages

typedef SLIST_HEAD(test_var_arg_lists, test_var_arg_list)

Head of the list with information about run item variable/argument lists.

static test_attrs* test_get_attrs(run_item* ri)

Get attributes of the test executed by the run item.

Parameters:

ri

Run item

Returns:

Pointer to the test attributes.

static const char* test_get_name(const run_item* ri)

Get name of the test executed by the run item.

Parameters:

ri

Run item

Returns:

Pointer to the test attributes.

static const char* run_item_name(const run_item* ri)

Get run item name.

static bool run_item_container(const run_item* ri)

Is run item a container (session or package)?

static test_entity_values* test_var_arg_values(const test_var_arg* va)

Get pointer to variable/argument values.

Parameters:

va

Variable/argument

te_errno test_run_item_enum_args(const run_item* ri, test_var_arg_enum_cb callback, bool up_to_first_err, void* opaque)

Enumerate run item arguments including inherited from session variables.

Parameters:

ri

Run item

callback

Function to be called for each argument

up_to_first_err

Whether to stop on the first encountered error when enumerating arguments

opaque

Data to be passed in callback function

Returns:

Status code.

const test_var_arg* test_run_item_find_arg(const run_item* ri, const char* name, unsigned int* n_values, unsigned int* outer_iters)

Find argument of the run item by name. The function takes into account lists when calculate n_values and outer_iters.

Parameters:

ri

Run item

name

Name of the argument to find

n_values

Location for total number of values of the argument or NULL

outer_iters

Location for total number of outer iterations because of argument before this one or NULL

Returns:

Pointer to found argument or NULL.

te_errno test_entity_values_enum(const run_item* ri, const test_session* context, const test_entity_values* values, test_entity_value_enum_cb callback, void* opaque, test_entity_value_enum_error_cb enum_error_cb, void* ee_opaque)

Enumerate values from the list in current variables context.

Parameters:

ri

Run item or NULL

context

Test session or NULL

values

List of values

callback

Function to be called for each singleton value

opaque

Data to be passed in callback function

enum_error_cb

Function to be called on back path when enumeration error occur (for example, when value has been found)

ee_opaque

Opaque data for enum_error_cb function

Returns:

Status code.

te_errno test_var_arg_enum_values(const run_item* ri, const test_var_arg* va, test_entity_value_enum_cb callback, void* opaque, test_entity_value_enum_error_cb enum_error_cb, void* ee_opaque)

Enumerate singleton values of the run item argument or session variable.

Parameters:

ri

Run item or NULL

va

Variable/argument

callback

Function to be called for each singleton value

opaque

Data to be passed in callback function

enum_error_cb

Function to be called on back path when enumeration error occur (for example, when value has been found)

ee_opaque

Opaque data for enum_error_cb function

Returns:

Status code.

te_errno test_var_arg_get_value(const run_item* ri, const test_var_arg* va, const unsigned int index, test_entity_value_enum_error_cb enum_error_cb, void* ee_opaque, const test_entity_value** value)

Get value of the run item argument by index.

Parameters:

ri

Run item context

va

Argument

index

Index of the value to get (0,…)

enum_error_cb

Function to be called on back path when enumeration error occur (for example, when value has been found)

ee_opaque

Opaque data for enum_error_cb function

value

Location for plain value pointer

Returns:

Status code.

tester_cfg* tester_cfg_new(const char* filename)

Allocate and initialize Tester configuration.

Parameters:

filename

Name of the file with configuration

Returns:

Pointer to allocated and initialized Tester configuration or NULL.

te_errno tester_parse_configs(tester_cfgs* cfgs, bool build, bool verbose)

Parse Tester configuration files.

Parameters:

cfgs

Tester configurations with not parsed file

build

Build test suites

verbose

Be verbose in the case of build failure

Returns:

Status code.

te_errno tester_prepare_configs(tester_cfgs* cfgs)

Prepare configuration to be passed by testing scenario generator.

Parameters:

cfgs

List of Tester configurations

Returns:

Status code.

void tester_cfgs_free(tester_cfgs* cfgs)

Free Tester configurations.

Parameters:

cfgs

List of Tester configurations to be freed

tester_cfg_walk_ctl tester_configs_walk(const tester_cfgs* cfgs, const tester_cfg_walk* walk_cbs, const unsigned int walk_flags, const void* opaque)

Traverse Tester configurations.

The function does not modify any data under pointers specified as function parameters. However, const qualifier is discarded when opaque data and configuration element are passed in callbacks provided by user.

Parameters:

cfgs

List of configurations

walk_cbs

Walk callbacks

walk_flags

Walk control flags

opaque

Opaque data to be passed in callbacks

Returns:

Walk control.

static const char* ri_type2str(run_item_type type)

Convert run item type to string.

Parameters:

type

Run item type.

Returns:

String representation of the type.

static const char* ri_role2str(run_item_role role)

Convert role value to string

static void bit_mask_set(uint8_t* mem, unsigned int bit)

Set specified bit in bitmask.

Parameters:

mem

Bit mask memory

bit

Bit number to set (starting from 0)

static void bit_mask_clear(uint8_t* mem, unsigned int bit)

Clear specified bit in bitmask.

Parameters:

mem

Bit mask memory

bit

Bit number to cleared (starting from 0)

static bool bit_mask_is_set(const uint8_t* mem, unsigned int bit)

Is specified bit in bitmask set?

Parameters:

mem

Bit mask memory

bit

Bit number to test (starting from 0)

enum interactive_mode_opts tester_interactive_open_prompt(const tester_cfgs* cfgs, test_paths* paths, testing_scenario* scenario)

Open the interactive tester user prompt and return the user choice.

Parameters:

cfgs

Configurations

paths

Location for test paths

scenario

Location for testing scenario

Returns:

Interactive Tester UI return code.

typedef TAILQ_HEAD(test_requirements, test_requirement)

Head of the list of requirements

te_errno tester_new_target_reqs(logic_expr** targets, const char* req)

Create a new target requirement and insert it using logical ‘and’ with current target.

Parameters:

targets

Location of the target requirements expression

req

String requirement

0

Success.

TE_ENOMEM

Memory allocation failure.

Returns:

Status code.

te_errno test_requirements_clone(const test_requirements* reqs, test_requirements* new_reqs)

Clone list of requirements.

Parameters:

reqs

List of requirements to be cloned

new_reqs

New list of requirements (must be initialized)

Returns:

Status code.

void test_requirements_free(test_requirements* reqs)

Free list of requirements.

Parameters:

reqs

List of requirements to be freed

bool tester_is_run_required(const logic_expr* targets, const test_requirements* sticky_reqs, const struct run_item* test, const struct test_iter_arg* args, tester_flags flags, bool quiet)

Determine whether running of the test required.

c true Run is required c false Run is not required

Parameters:

targets

Target requirements expression

sticky_reqs

List of collected sticky requirements

test

Test to be checked

args

Array with test iteration arguments (run item has fixed number of arguments)

flags

Current Tester context flags

quiet

te_errno tester_get_sticky_reqs(test_requirements* sticky_reqs, const test_requirements* reqs)

Add sticky requirements to the context.

Parameters:

sticky_reqs

List of requirements in the current context

reqs

List of requirements

Returns:

Status code.

const char* tester_reqs_expr_to_string(const logic_expr* expr)

Print requirements expression to static buffer.

Parameters:

expr

Requirements expression

Returns:

Pointer to the static buffer with printed expression.

static te_errno tester_test_results_init(tester_test_results* results)

Initialize the list of results.

Parameters:

results

List to be initialized

Returns:

Status code.

static void tester_test_result_add(tester_test_results* results, tester_test_result* result)

Insert a new test results in the list.

Parameters:

results

List with location for results of the tests which are in progress

result

Location for a new test

static void tester_test_result_del(tester_test_results* results, tester_test_result* result)

Delete test results from the list.

Parameters:

results

List with location for results of the tests which are in progress

result

Result to be extracted

te_errno tester_test_msg_listener_start(tester_test_msg_listener** ctx, tester_test_results* results)

Start test messages listener.

Parameters:

ctx

Location for listener control data

results

List of tests which are in progress to store data from received messages

Returns:

Status code.

te_errno tester_test_msg_listener_stop(tester_test_msg_listener** ctx)

Stop test messages listener.

Parameters:

ctx

Location of listener control data

Returns:

Status code.

typedef TAILQ_HEAD(testing_scenario, testing_act)

Testing scenario is a sequence of acts

void scenario_act_free(testing_act* act)

Free act of the testing scenario.

Parameters:

act

Act to be freed

void scenario_free(testing_scenario* scenario)

Free the testing scenario.

Parameters:

scenario

Scenario to be freed

testing_act* scenario_new_act(const unsigned int first, const unsigned int last, const tester_flags flags)

Allocate a new act in testing scenario.

Parameters:

first

The first item

last

The last item

flags

Act flags

Returns:

Status code.

te_errno scenario_add_act(testing_scenario* scenario, const unsigned int first, const unsigned int last, const tester_flags flags, const char* hash)

Add new act in testing scenario.

Parameters:

scenario

Testing scenario

first

The first item

last

The last item

flags

Act flags

hash

Test iteration hash or NULL

Returns:

Status code.

te_errno scenario_act_copy(testing_scenario* scenario, const testing_act* act)

Copy act to scenario.

Parameters:

scenario

Testing scenario

act

Act to be copied

Returns:

Status code.

te_errno scenario_copy(testing_scenario* dst, const testing_scenario* src)

Copy one scenario to another.

Parameters:

dst

Destination scenario

src

Source scenario

Returns:

Status code.

te_errno scenario_by_bit_mask(testing_scenario* scenario, unsigned int offset, const uint8_t* bm, unsigned int bm_len, unsigned int bit_weight, const char* hash)

Generate scenario by bit mask.

Parameters:

scenario

Scenario to add acks

offset

Initial offset

bm

Bit mask with acts to run

bm_len

Length of the bit mask

bit_weight

Weight of single bit in the mask

hash

Test iteration HASH or NULL

Returns:

Status code.

te_errno scenario_append(testing_scenario* scenario, testing_scenario* subscenario, unsigned int iterate)

Append one scenario to another specified number of times.

Parameters:

scenario

Scenario to append to

subscenario

Scenario to be iterated and appended

iterate

Number of iterations

Returns:

Status code.

void scenario_apply_to(testing_scenario* scenario, unsigned int from)

Update testing scenario to have all items starting from 0 up to the item with maximum identifier.

Parameters:

scenario

Testing scenario

from

Minimum identifier

void scenario_apply_from(testing_scenario* scenario, unsigned int to)

Update testing scenario to have all items starting from the minimum identifier up to the to identifier.

Parameters:

scenario

Testing scenario

to

Maximum identifier

void scenario_add_flags(testing_scenario* scenario, const tester_flags flags)

Add flags to all acts of the testing scenario.

Parameters:

scenario

A testing scenario

flags

Flags to add

void scenario_del_acts_by_flags(testing_scenario* scenario, tester_flags flags)

Remove acts which have all specified flags.

Parameters:

scenario

A testing scenario

flags

Flags of removed acts

void scenario_del_acts_with_no_flags(testing_scenario* scenario)

Remove acts which do not have any flags

Parameters:

scenario

A testing scenario

void scenario_glue(testing_scenario* scenario)

Glue testing scenario acts with equal flags.

Parameters:

scenario

Sorted testing scenario to be processed

te_errno scenario_exclude(testing_scenario* scenario, testing_scenario* exclude, tester_flags flags)

Remove some flags from testing scenario.

Parameters:

scenario

Sorted testing scenario to exclude from

exclude

Sorted testing scenario to be excluded

flags

Flags which have to have all item from exclude

Returns:

Status code.

te_errno scenario_merge(testing_scenario* scenario, testing_scenario* add, tester_flags flags)

Merge one testing scenario description into another.

Parameters:

scenario

Sorted testing scenario to merge to

add

Sorted testing scenario to merge in

flags

Flags which have to have all item from add

Returns:

Status code.

te_errno scenario_apply_flags(testing_scenario* scenario, const testing_scenario* flags)

Apply flags from scenario flags to testing scenario.

Parameters:

scenario

Testing scenario (may be not sorted)

flags

Testing scenario with flags to apply

Returns:

Status code.

testing_direction scenario_step(const testing_act** act, unsigned int* act_id, unsigned int start_id, unsigned int next_id, bool skip)

Move on the testing scenario.

Parameters:

act

Location of the current testing act

act_id

Location of the current action ID

start_id

Start iteration ID of the current run item

next_id

Next iteration ID to which Tester is going to move

skip

If true, all the next acts which are within [start_id, next_id) should be skipped

Returns:

Testing scenario movement direction.

const char* scenario_to_str(const testing_scenario* scenario)

String representation of testing scenario.

Parameters:

scenario

Testing scenario

Returns:

Pointer to static buffer with testing scenario as string.

te_errno scenario_apply_dial(testing_scenario* scenario, const struct tester_cfgs* cfgs, double dial)

Replace a given testing scenario with a new one containing randomly chosen requested percentage of test iterations from the given scenario.

Parameters:

scenario

Scenario to replace.

cfgs

Configurations.

dial

Percentage of test iterations to choose (should be in [0, 100] range).

Returns:

Status code.

te_errno tester_run(testing_scenario* scenario, const struct logic_expr* targets, const struct tester_cfgs* cfgs, struct test_paths* paths, const te_trc_db* trc_db, const tqh_strings* trc_tags, const tester_flags flags, const char* verdict)

Run test configurations.

Parameters:

scenario

Testing scenario

targets

Target requirements

cfgs

Tester configurations

paths

Test paths

trc_db

TRC database handle

trc_tags

List of TRC tags (IUT identification)

flags

Flags

Returns:

Status code.

te_errno tester_start_serial_thread(void)

Start the Tester thread to handle serial parsers events

Parameters:

0

Success

Returns:

Status code

te_errno tester_stop_serial_thread(void)

Cleanup and stop the tester serial thread

Parameters:

0

Success

Returns:

Status code

te_errno tester_set_serial_pid(pid_t i_pid)

Set the process identifier of the current test

Parameters:

i_pid

PID of the current test process

0

Success

Returns:

Status code

te_errno tester_release_serial_pid(void)

Release the process identifier of the current test

Parameters:

0

Success

Returns:

Status code

bool tester_check_serial_stop(void)

Check the flag to stop test sequence

c true Test sequence should be stopped c false Continue work

Returns:

void tester_term_out_start(tester_flags flags, run_item_type type, const char* name, unsigned int tin, test_id parent, test_id self)

Log test start to terminal.

Parameters:

flags

Tester context flags

type

Type of run item

name

Name of the test

tin

Test identification number

parent

Parent ID

self

Self ID of the test

void tester_term_out_done(tester_flags flags, run_item_type type, const char* name, unsigned int tin, test_id parent, test_id self, tester_test_status status, trc_verdict trcv)

Log test done to terminal.

Parameters:

flags

Tester context flags

type

Type of run item

name

Name of the test

tin

Test identification number

parent

Parent ID

self

Self ID of the test

status

Test status

trcv

TRC result

int tester_term_cleanup(void)

Cleanup curses structures to make valgrind happy. Should not be called before any other terminal-handling functions.

Returns:

0 on success

te_errno tester_init_types(void)

Initialize types support library.

Returns:

Status code.

const test_value_type* tester_find_type(const test_session* session, const char* name)

Find type by name in current context.

Parameters:

session

Test session context

name

Name of the type to find

Returns:

Pointer to found type or NULL.

void tester_add_type(test_session* session, test_value_type* type)

Register new type in the current context.

Parameters:

session

Test session context

type

Type description

const test_entity_value* tester_type_check_plain_value(const test_value_type* type, const char* plain)

Check that plain value belongs to type.

Parameters:

type

Type description

plain

Plain value

Returns:

Pointer to corresponding value description or NULL.

te_errno rcf_comm_agent_create_listener(int port, int* listener)

Create a listener for accepting connection from RCF in TA.

Normally this function is called from rcf_comm_agent_init(). It is used outside of it only when it is required to create listener before starting TA, see agents/unix/ta_rcf_listener.c

Parameters:

port

Local port to which the listener should be bound.

listener

Where to save socket FD.

Returns:

Status code.

int rcf_comm_agent_init(const char* config_str, rcf_comm_connection** p_rcc)

Wait for incoming connection from the Test Engine side of the Communication library.

Parameters:

config_str

Configuration string, content depends on the communication type (network, serial, etc)

p_rcc

Pointer to to pointer the rcf_comm_connection structure to be filled, used as handler.

0

Success.

other

value errno.

Returns:

Status code.

int rcf_comm_agent_wait(rcf_comm_connection* rcc, char* buffer, size_t* pbytes, void** pba)

Wait for command from the Test Engine via Network Communication library.

Parameters:

rcc

Handler received from rcf_comm_agent_init

buffer

Buffer for data

pbytes

Pointer to variable with: on entry - size of the buffer; on return: number of bytes really written if 0 returned (success); unchanged if TE_ESMALLBUF returned; number of bytes in the message (with attachment) if TE_EPENDING returned. (Note: If the function called a number of times to receive one big message, a full number of bytes will be returned on first call. On the next calls number of bytes in the message minus number of bytes previously read by this function will be returned.); undefined if other errno returned.

pba

Address of the pointer that will hold on return address of the first byte of attachment (or NULL if no attachment attached to the command). If this function called more than once (to receive big attachment) this pointer will be not touched.

0

Success (message received and written to the buffer).

TE_ESMALLBUF

Buffer is too small for the message. The part of the message is written to the buffer. Other part(s) of the message can be read by the next calls to the rcf_comm_agent_wait. The ETSMALLBUF will be returned until last part of the message will be read.

TE_EPENDING

Attachment is too big to fit into the buffer. Part of the message with attachment is written to the buffer. Other part(s) can be read by the next calls to the rcf_comm_engine_receive. The TE_EPENDING will be returned until last part of the message will be read.

other

value errno.

Returns:

Status code.

int rcf_comm_agent_reply(rcf_comm_connection* rcc, const void* p_buffer, size_t length)

Send reply to the Test Engine side of Network Communication library.

Parameters:

rcc

Handler received from rcf_comm_agent_init.

p_buffer

Buffer with reply.

length

Length of the data to send.

0

Success.

other

value errno.

Returns:

Status code.

int rcf_comm_agent_close(rcf_comm_connection** p_rcc)

Close connection.

Parameters:

p_rcc

Pointer to variable with handler received from rcf_comm_agent_init.

0

Success.

other

value errno.

Returns:

Status code.

static const char* cs_neigh_entry_state2str(cs_neigh_entry_state state)

String representation of neighbour entry state.

static const char* te_log_level2str(te_log_level level)

Convert Log level value from integer to readable string.

In case of unknown Log level function returns NULL, so be careful using it.

Parameters:

level

Log level value

Returns:

string literal pointer

void te_log_init(const char* lgr_entity, te_log_message_f* log_message)

Every TE process (engine application, test, test agent) must call this function in its main to set ‘te_lgr_entity’ global variable with specified initial value.

Parameters:

lgr_entity

Logger entity name (e.g. RCF) or NULL

log_message

Log message backend function or NULL

static void te_log_message_ts(const char* file, unsigned int line, te_log_ts_sec sec, te_log_ts_usec usec, unsigned int level, const char* entity, const char* user, const char* fmt, ...)

Wrapper for te_log_message_va().

All parameters are transparently forwarded to te_log_message_va() which complies to te_log_message_f prototype.

static void te_log_message(const char* file, unsigned int line, unsigned int level, const char* entity, const char* user, const char* fmt, ...)

Wrapper for te_log_message_va() to get log message timestamp.

All parameters are transparently forwarded to te_log_message_va() which complies to te_log_message_f prototype.

static const char* rcf_op_to_string(rcf_op_t op)

Convert RCF operation number to text.

Parameters:

op

operation number

Returns:

Pointer to null-terminated string.

const rcf_tce_comp_conf_t* rcf_tce_get_next_comp_conf(const rcf_tce_type_conf_t* type, const rcf_tce_comp_conf_t* comp)

Get the TCE configuration of a TA component.

Parameters:

type

The TA type configuration.

comp

The configuration of the previous TA component or NULL to get the configuration of the first TA component.

const rcf_tce_type_conf_t* rcf_tce_get_type_conf(const rcf_tce_conf_t* conf, const char* type)

Get the TCE configuration of a TA type.

Parameters:

conf

The TCE configuration.

type

The TA type.

uint32_t thread_self(void)

Get OS identifier of the current thread.

Returns:

Thread identifier

void* thread_mutex_create(void)

Create a mutex.

Returns:

Mutex handle

void thread_mutex_destroy(void* mutex)

Destroy a mutex.

Parameters:

mutex

mutex handle

void thread_mutex_lock(void* mutex)

Lock the mutex.

Parameters:

mutex

mutex handle

void thread_mutex_unlock(void* mutex)

Unlock the mutex.

Parameters:

mutex

mutex handle

bool ta_interface_is_mine(const char* ifname)

Check that interface is locked for using of this TA

Parameters:

ifname

name of network interface

0

interface is not locked

other

interface is locked

static uint16_t ip_csum_part(uint32_t checksum, const void* data, size_t length)

Calculate 16-bit checksum: one’s complement sum of all 16 bit words. Function works correctly with length less then 64k.

One’s complement of the computed value should be written to checksum field in IP/TCP/UDP headers.

Parameters:

checksum

start checksum calculating from this value

data

pointer to the data which checksum should be calculated

length

length of the data

Returns:

calculated checksum.

static uint16_t calculate_checksum(const void* data, size_t length)

Calculate 16-bit checksum: 16-bit one’s complement sum of all 16 bit words. Function works correctly with length less then 64k.

One’s complement of the computed value should be written to checksum field in IP/TCP/UDP headers.

Parameters:

data

pointer to the data which checksum should be calculated

length

length of the data

Returns:

calculated checksum.

static bool ptr_is_not_null(const void* ptr)

Check if a pointer is NULL. It’s to avoid warnings in macros.

Parameters:

ptr

A pointer

Returns:

true if ptr is not NULL

static unsigned int te_round_to_zero(unsigned int n, unsigned int m)

Round-towards-zero to nearest multiple.

Parameters:

n

Number to be rounded.

m

Number to multiple of which to round.

static const char* te_rc_mod2str(te_errno err)

Convert error source from integer to readable string.

non-reenterable in the case of unknown module

Parameters:

err

integer source or errno (source / error code composition)

Returns:

string literal pointer

static const char* te_rc_err2str(te_errno err)

Convert code from integer to readable string.

non-reenterable

Parameters:

err

integer source

Returns:

string literal pointer

static te_errno te_rc_os2te(int err)

Convert OS errno to TE error code.

Parameters:

err

OS errno

Returns:

TE error code

static void te_var_name2env(const char* name, char* env, int env_size)

Function converts name of test variable to name of environment variable which holds it’s actual value.

Actual prefixes are defined above.

Rules: VAR.xxx.yyy ->> TE_TEST_VAR_xxx__yyy

Parameters:

name

[in] Name of the variable

env

[out] Pointer to memory to store env variable name

static char* te_strerror_r(int in_errno, char* buf, size_t buf_len)

Wrapper around strerror_r() version that does not ignore its return code.

It’s a bit crazy, cause latest GCC complains that it should not be ignored cause it thinks that in case we’re using GNU extension it will store pointed to an important message about errno conversion failure.

static const char* te_test_status_to_str(te_test_status status)

Convert test status to string representation.

Parameters:

status

Test status

Returns:

Pointer to string representation.

typedef TAILQ_HEAD(te_test_verdicts, te_test_verdict)

List of verdicts.

static void te_test_result_init(te_test_result* result)

Initialize test result by defaults.

static void te_test_result_free_verdict(te_test_verdict* verdict)

Free resources allocated for test result verdict

static void te_test_result_free_verdicts(te_test_verdicts* verdicts)

Free resources allocated for test result verdicts.

static void te_test_result_clean(te_test_result* result)

Clean memory allocated for te_test_result members.

Parameters:

result

TE test result

static void te_test_result_free(te_test_result* result)

Free test result.

Parameters:

result

TE test result

static te_errno te_test_result_verdicts_cpy(te_test_verdicts* dst, te_test_verdicts* src)

Copy test verdicts.

Parameters:

dst

Where copied verdicts should be placed (should be initialized already).

src

From where to copy verdicts.

Returns:

Status code.

static te_test_result* te_test_result_dup(te_test_result* result)

Duplicate test result.

Parameters:

result

Test result

Returns:

Copy of result

static void te_test_result_cpy(te_test_result* dest, te_test_result* src)

Copy test result.

Parameters:

dest

Where to copy (will be initialized by this function)

src

What to copy

te_errno ta_vlan_get_parent(const char* ifname, char* parent)

Get parent device name of VLAN interface. If passed interface is not VLAN, method sets ‘parent’ to empty string and return success.

Parameters:

ifname

interface name

parent

location of parent interface name, IF_NAMESIZE buffer length(OUT)

Returns:

status

te_errno ta_bond_get_slaves(const char* ifname, tqh_strings* slaves, int* slaves_num, bool* is_team)

Get slaves devices names for bonding interface. If passed interface is not bonding, method sets ‘slaves_num’ to zero and return success.

Parameters:

ifname

Interface name

slaves

Where to save slaves interfaces names

slaves_num

Where to save number of slaves interfaces (may be NULL)

is_team

If not NULL, will be set to true if this is teaming device, and to false otherwise.

Returns:

Status code.

te_errno ta_process_mgmt_init(void)

Initialize process management subsystem

pid_t ta_waitpid(pid_t pid, int* status, int options)

waitpid() analogue, with the same parameters/return value. Only WNOHANG option is supported for now. Process groups are not supported for now.

int ta_system(const char* cmd)

system() analogue, with the same parameters/return value.

See also:

ta_system_fmt

int ta_system_fmt(const char* fmt, ...)

system() analogue, with the same return value. The function builds a command line with a printf-like format string.

Parameters:

fmt

Command format string

Format string arguments

See also:

ta_system

int te_errno ta_popen_r(const char* cmd, pid_t* cmd_pid, FILE** f)

popen(‘r’) analogue, with slightly modified parameters.

See also:

ta_popen_r_fmt

te_errno ta_popen_r_fmt(pid_t* cmd_pid, FILE** f, const char* fmt, ...)

Build a command line with a printf-like format string and call ta_popen_r().

Parameters:

cmd_pid

PID of the executed command.

f

Descriptor of the executed command’s stdout.

fmt

Command format string.

Format string arguments.

Returns:

Status code.

See also:

ta_popen_r, ta_pclose_r

te_errno te_errno ta_pclose_r(pid_t cmd_pid, FILE* f)

Perform cleanup actions for ta_popen_r() function.

int ta_kill_death(pid_t pid)

Kill a child process.

Parameters:

pid

PID of the child to be killed

0

child was exited or killed successfully

-1

there is no such child.

Returns:

Status code

See also:

ta_kill_and_wait

int ta_kill_and_wait(pid_t pid, int sig, unsigned int timeout_s)

Kill a child process and wait for process to change state

Parameters:

pid

PID of the child process to be killed

sig

Signal to be sent to child process

timeout_s

Time to wait for process to change state

0

Successful result

-1

Failed to kill the child process

-2

Timed out to wait for changed state of the child process

Returns:

Status code

See also:

ta_kill_death

te_errno mkdirp(const char* path, int mode)

Create the directory(ies), if they do not already exist

Parameters:

path

Path of the directory to be created

mode

The permission bits to assign to a new directory(ies)

0

The directory has been created successfully or existing

Returns:

Status code

te_errno register_vfork_hook(void(*)(void) prepare, void(*)(void) child, void(*)(void) parent)

This function is an equivalent for pthread_atfork(), but it sets up hooks to be called explicitly around vfork() via run_vhook_hooks().

child and parent hooks need to obey all restrictions imposed by vfork()

Parameters:

prepare

A hook to run before vfork()

child

A hook to run after vfork() in the child process

parent

A hook to run after vfork() in the parent process

void run_vfork_hooks(enum vfork_hook_phase phase)

Run hooks registered by register_vfork_hook()

This function is merely a convenience routine, it does not in itself have anything to do with vfork(), so it’s totally the caller’s responsibility to call it at appropriate places. The typical scenario would look like this:

run_vfork_hook(VFORK_HOOK_PHASE_PREPARE);
child = vfork();
if (child == -1)
{
   run_vfork_hook(VFORK_HOOK_PHASE_PARENT);
   ....
   return error;
}
if (child == 0)
{
   run_vfork_hook(VFORK_HOOK_PHASE_CHILD);
   ....
   _exit(0);
}
run_vfork_hook(VFORK_HOOK_PHASE_PARENT);

Parameters:

phase

Hook phase (see vfork_hook_phase)

bool agent_check_l4_port_is_free(int socket_family, int socket_type, uint16_t port)

Check that a given TCP or UDP port is not bound.

Parameters:

socket_family

Socket family to use for checking, AF_INET for IPv4, AF_INET6 for IPv6 or 0 for IPv6 with fallback to IPv4 if IPv6 is not supported.

socket_type

Socket type to use, SOCK_STREAM, SOCK_DGRAM, or 0 to check both.

port

Port number in host endian

Returns:

true - Port is free

te_errno agent_alloc_l4_port(int socket_family, int socket_type, uint16_t* port)

Allocate a TCP/UDP port for the TA.

Parameters:

socket_family

Socket family to use, AF_INET for IPv4, AF_INET6 for IPv6 or 0 for IPv6 with fallback to IPv4 if IPv6 is not supported.

socket_type

Socket type to use, SOCK_STREAM, SOCK_DGRAM, or 0 to check both.

port

Port number in host endian

Returns:

Status code

void agent_free_l4_port(uint16_t port)

Free a TCP/UDP port for the TA. The API is used to free the ports allocated by agent_alloc_l4_port().

Parameters:

port

Port number in host endian

te_errno agent_alloc_l4_specified_port(int socket_family, int socket_type, uint16_t port)

Allocate the specified TCP/UDP port for TA.

Parameters:

socket_family

Socket family to use, AF_INET for IPv4, AF_INET6 for IPv6 or 0 for IPv6 with fallback to IPv4 if IPv6 is not supported.

socket_type

Socket type to use, SOCK_STREAM, SOCK_DGRAM, or 0 to check both.

port

Port number in host endian

Returns:

Status code

te_errno agent_key_generate(agent_key_manager manager, const char* type, unsigned bitsize, const char* user, const char* private_key_file)

Generate a key with a given manager.

Parameters:

manager

Key manager to use

type

Key type. For AGENT_KEY_MANAGER_SSH: the value of -t option of ssh-keygen

bitsize

Bit length of a key

user

The name of the key owner (NULL means the current user)

private_key_file

The path to a file where the new private key will be stored

Returns:

Status code

int asn_tag_equal(asn_tag_t l, asn_tag_t r)

Compare two ASN.1 tags.

Parameters:

l

first argument;

r

second argument;

1

if tags are equal;

0

if tags are differ;

Returns:

truth value of tag equality

te_errno asn_impl_find_subtype(const asn_type* type, const char* label, const asn_type** found_type)

Find one-depth sub-type for passed ASN.1 type tree by its label. This function is applicable only for ASN.1 types with COMPOUND syntax.

Parameters:

type

pointer to ASN.1 value which leaf field is interested;

label

textual field label, specifying subvalue of ‘type’, for syntaxes “*_OF” and “TAGGED” this parameter is ignored.

found_type

pointer to found ASN.1 type (OUT).

Returns:

zero on success, otherwise error code.

te_errno asn_impl_find_subvalue(const asn_value* container, const char* label, asn_value const** found_val)

Find one-depth subvalue in ASN.1 value tree by its label. This method is applicable only to values with COMPOUND syntax.

Parameters:

container

pointer to ASN.1 value which leaf field is interested;

label

textual field label, specifying subvalue of ‘container’. Label for ‘SEQUENCE OF’ and ‘SET OF’ subvalues is decimal notation of its integer index in array.

found_val

pointer to found subvalue (OUT).

Returns:

zero on success, otherwise error code.

te_errno asn_child_named_index(const asn_type* type, const char* labels, int* index, const char** rest_labels)

Find numeric index of subvalue in ASN.1 type specification by symbolic label.

If type syntax in CHOICE, ‘labels’ may start from CHOICE field label with leading ‘#’. For CHOICE got index is offset of child specification in ASN.1 type definition, but not in ASN.1 value instance.

Parameters:

type

ASN.1 type.

labels

Labels string.

index

Location for found index (OUT).

rest_labels

Location for pointer to rest labels (OUT).

Returns:

status code

te_errno asn_child_tag_index(const asn_type* type, asn_tag_class tag_class, uint16_t tag_val, int* index)

Determine numeric index of field in structure presenting ASN.1 type by tag of subvalue. This method is applicable only to values with COMPOUND syntax with named components: ‘SEQUENCE’, ‘SET’ and ‘CHOICE’.

Parameters:

type

ASN.1 type which subvalue is interested.

tag_class

class of ASN.1 tag

tag_val

value of ASN.1 tag

index

found index, unchanged if error occurred (OUT).

Returns:

zero on success, otherwise error code.

te_errno asn_put_child_by_index(asn_value* container, asn_value* child, int index)

Internal method for insert child by its index in container type named-array. For CHOICE syntax index used for check that new_value has respective type as specified in ASN.1 type.

This method does not check that incoming pointers are not NULL, so be careful, when call it directly.

Parameters:

container

ASN.1 value which child should be updated, have to be of syntax SEQUENCE, SET, or CHOICE

child

New ASN.1 value for child, may be NULL.

index

Index of child.

Returns:

zero on success, otherwise error code.

te_errno asn_get_child_by_index(const asn_value* container, asn_value** child, int index)

Internal method for get child by its index in container type named-array. For CHOICE syntax index used for check that really contained subvalue has respective type and choice name as specified in ASN.1 type.

This method does not check that incoming pointers are not NULL, so be careful, when call it directly.

Parameters:

container

ASN.1 value which child should be updated, have to be of syntax SEQUENCE, SET, or CHOICE

child

Location for pointer to the child (OUT).

index

Index of child.

Returns:

zero on success, otherwise error code.

static int asn_syntax_is_a(asn_syntax syntax, int mask)

Test whether all bits 1 in mask are the same in syntax; that is bitwise consequence mask => syntax have give all 1. Thus result is true when bitwise NOT for (bitwise mask => syntax) is zero.

Parameters:

syntax

Syntax to be tested.

mask

Mask.

Returns:

non-zero if statement true and zero if false.

const char* asn_get_type_name(const asn_type* type)

Obtain textual label of ASN.1 type.

Parameters:

type

ASN.1 type which name is interested

Returns:

plain string with type name or NULL if error occurred.

asn_syntax asn_get_syntax_of_type(const asn_type* type)

Obtain ASN.1 syntax type;

Parameters:

type

ASN.1 value which leaf syntax is interested

Returns:

syntax of specified leaf in value.

te_errno asn_get_subtype(const asn_type* type, const asn_type** subtype, const char* labels)

Get constant pointer to subtype of some ASN.1 type.

Parameters:

type

ASN.1 type

subtype

location for pointer to ASN.1 sub-type (OUT)

labels

string with dot-separated sequence of textual field labels, specifying interested sub-type

Returns:

zero or error code.

te_errno asn_get_child_type(const asn_type* type, const asn_type** subtype, asn_tag_class tag_class, asn_tag_value tag_val)

Get ASN.1 type of on-level child of constraint ASN.1 type by child tag.

Parameters:

type

root of ASN.1 value tree which subvalue is interested

subtype

location for pointer to ASN.1 sub-value (OUT)

tag_class

class of ASN.1 tag

tag_val

value of ASN.1 tag

Returns:

zero on success or error code.

te_errno asn_label_to_tag(const asn_type* type, const char* label, asn_tag_t* tag)

Find ASN.1 tag value by textual label.

Parameters:

type

ASN.1 type descriptor, must have SEQUENCE, SET or CHOICE syntax

label

textual label of desired field

tag

location for ASN.1 tag (OUT)

Returns:

status code

asn_value* asn_init_value(const asn_type* type)

Init empty ASN.1 value of specified type.

Parameters:

type

ASN.1 type to which value should belong

Returns:

pointer to new asn_value instance or NULL if error occurred.

asn_value* asn_init_value_tagged(const asn_type* type, asn_tag_class tc, asn_tag_value tag)

Init empty ASN.1 value of specified type with a certain ASN.1 tag.

Parameters:

type

ASN.1 type to which value should belong

tc

ASN.1 tag class, see enum definition and ASN.1 standard

tag

ASN.1 tag value, may be an arbitrary non-negative integer

Returns:

pointer to new asn_value instance or NULL if error occurred.

asn_value* asn_copy_value(const asn_value* value)

Make a copy of ASN.1 value instance.

Parameters:

value

ASN.1 value to be copied

Returns:

pointer to new asn_value instance or NULL if error occurred.

te_errno asn_assign_value(asn_value* dst, const asn_value* src)

Move content of ASN.1 value to another ASN.1 value instance.

Parameters:

dst

ASN.1 value, which content should be changed to be identical to ‘src’.

src

ASN.1 value to be copied.

Returns:

zero on success, otherwise error code.

void asn_free_value(asn_value* value)

Free memory allocated by ASN.1 value instance.

Parameters:

value

ASN.1 value to be destroyed

Returns:

nothing

const asn_type* asn_get_type(const asn_value* value)

Obtain ASN.1 type to which specified value belongs.

Parameters:

value

ASN.1 value which type is interested

Returns:

pointer to asn_type instance or NULL if error occurred.

bool asn_check_type(const asn_value* value, const asn_type* type)

Check ASN.1 value for particular type.

Parameters:

value

ASN.1 value.

type

ASN.1 type.

Returns:

true if value of type of type, false otherwise.

te_errno asn_parse_value_text(const char* string, const asn_type* type, asn_value** parsed_val, int* parsed_syms)

Parse textual presentation of single ASN.1 value of specified type and create a new instance of asn_value type with its internal presentation. Text should correspond to the “Value” production label in ASN.1 specification.

Parameters:

string

text to be parsed

type

expected type of value

parsed_val

parsed value (OUT)

parsed_syms

number of parsed symbols (OUT)

Returns:

zero on success, otherwise error code.

te_errno asn_parse_dvalue_in_file(const char* filename, const asn_type* type, asn_value** parsed_value, int* syms_parsed)

Read ASN.1 text file, parse DefinedValue of specified ASN.1 type

Parameters:

filename

name of file to be parsed

type

expected type of value

parsed_value

parsed value (OUT)

syms_parsed

quantity of parsed symbols in ‘text’ (OUT)

Returns:

zero on success, otherwise error code.

int asn_sprint_value(const asn_value* value, char* buffer, size_t buf_len, unsigned int indent)

Prepare textual ASN.1 presentation of passed value and put it into specified buffer. This method writes trailing zero to the text buffer, and checks that there is space for it, but does not include it in amount of printed symbols - exactly like standard snprintf().

Besides, if required buffer length is greater, then passed, last buffer byte will be set to zero, and textual presentation of value will be printed so match, as possible. In this case asn_sprint_value will return amount of total number of bytes, which are required for this value.

Parameters:

value

ASN.1 value to be printed

buffer

buffer for ASN.1 text

buf_len

length of buffer

indent

current indent, usually zero

Returns:

number characters should be written to buffer (without trailing zero), or -1 if error occurred.

te_errno asn_save_to_file(const asn_value* value, const char* filename)

Prepare textual ASN.1 presentation of passed value and save this string to file with specified name. If file already exists, it will be overwritten.

Parameters:

value

ASN.1 value to be stored

filename

name of the file

Returns:

zero on success, otherwise error code.

te_errno asn_encode(void* buf, size_t* buf_len, asn_value* value)

BER encoding of passed ASN.1 value.

Parameters:

buf

pointer to buffer to be filled by coded data

buf_len

length of accessible buffer, function puts here length of encoded data (IN/OUT)

value

asn value to be encoded

Returns:

zero on success, otherwise error code.

asn_value* asn_decode(const void* data)

BER decoding of passed data.

Parameters:

data

pointer to data to be decoded

Returns:

pointer to new asn_value instance or NULL if error occurred.

te_errno asn_find_child_choice_values(const asn_value* container, asn_tag_value tag_value, asn_child_desc_t** items_out, unsigned int* nb_items_out)

Find ASN.1 CHOICE values identified by the given tag value from child ASN.1 values inside the given SEQUENCE_OF ASN.1 container

Parameters:

container

ASN.1 container

tag_value

ASN.1 tag value

items_out

Location for the array of descriptors containing values which correspond to tag_value and their serial numbers

nb_items_out

Location for the size of items_out

Returns:

Status code

asn_value* asn_find_child_choice_value(const asn_value* container, asn_tag_value tag_value)

Dedicated wrapper for asn_find_child_choice_values() to get the first matching choice value in the container

asn_value* asn_choice_array_look_up_value(unsigned int nb_values, asn_value** values, asn_tag_value tag)

Given an ASN.1 CHOICE array and a tag, look up the first element which, when unfolded, resolves to a value matching the given tag.

Parameters:

nb_values

The number of elements in ASN.1 CHOICE array

values

ASN.1 CHOICE array

tag

ASN.1 tag

Returns:

First matching ASN.1 CHOICE unfolded value or NULL

te_errno asn_free_child(asn_value* value, asn_tag_class tag_class, asn_tag_value tag_val)

Free one-level subvalue of constraint ASN.1 value instance by tag. For CHOICE syntax value tag is ignored.

Parameters:

value

ASN.1 value which subvalue should be destroyed

tag_class

class of ASN.1 tag

tag_val

value of ASN.1 tag

Returns:

zero on success, otherwise error code.

te_errno asn_free_descendant(asn_value* value, const char* labels)

Free subvalue of constraint ASN.1 value instance, which may be very deep in value-constrain tree.

Parameters:

value

ASN.1 value which subvalue should be destroyed

labels

string with dot-separated sequence of textual field labels, specifying subvalue in ASN.1 value tree with ‘container’ as a root. Label for SEQUENCE OF and SET OF subvalues is decimal notation of its integer index in array. Choice labels should be prepended by symbol #

Returns:

zero on success, otherwise error code.

asn_value* asn_find_descendant(const asn_value* value, te_errno* status, const char* labels_fmt, ...)

Find descendant value in ASN.1 value tree by textual labels specifier. This method fails and return NULL if specified subvalue does not exists in ‘value’. Besides, if some CHOICE specifier is absent, this methods silently go down to specific value.

NOTE for user: do not change got subvalue, if you are not sure, what are you doing. Especially - do not free it!

Parameters:

value

Root of ASN.1 value tree.

status

Location of status of operation, always changed unless NULL (OUT).

labels_fmt

Format (*printf-like) string for labels string.

Respective parameters for format string.

Returns:

pointer to found subvalue.

asn_value* asn_retrieve_descendant(asn_value* value, te_errno* status, const char* labels_fmt, ...)

Find descendant value in ASN.1 value tree by textual labels specifier. This method creates subvalue, respective to labels, if it is absent in ‘value’. If some CHOICE specifier is absent, but there is specific subvalue at that node, this methods fails and set ‘status’ to TE_EASNWRONGLABEL.

NOTE for user: do not change got subvalue, if you are not sure, what are you doing. Especially - do not free it!

Parameters:

value

Root of ASN.1 value tree.

status

Location of status of operation, always changed unless NULL (OUT).

labels_fmt

Format (*printf-like) string for labels string.

Respective parameters for format string.

Returns:

pointer to found subvalue.

te_errno asn_get_descendent(const asn_value* container, asn_value** subval, const char* labels)

Get descendent subvalue of some ASN.1 value with COMPOUND syntax. Got subvalue should NOT be freed!

This method is much faster then asn_read_component_value() because it does not make external copy of subvalue.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

subval

location for pointer to ASN.1 sub-value (OUT)

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success or error code.

te_errno asn_put_descendent(asn_value* container, asn_value* subval, const char* labels)

Put descendent subvalue to some ASN.1 value with COMPOUND syntax. Passed ASN.1 value simply inserted into tree without copy, old value on respective place is freed!

Parameters:

container

Root of ASN.1 value tree.

subval

ASN.1 sub-value which should be inserted, may be NULL, if respective part of ‘container’ just should be cleared.

labels

Textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description.

Returns:

zero on success or error code.

te_errno asn_insert_indexed(asn_value* container, asn_value* elem_value, int index, const char* labels)

Insert array element in indexed syntax (i.e. SEQUENCE OF or SET OF) subvalue of root ASN.1 value container. Passed subvalue will NOT copied, do not free it after this method!

Parameters:

container

root of ASN.1 value tree which subvalue is interested

elem_value

ASN.1 value to be placed into the array, specified by labels at place, specified by index

index

array index of place to which element should be inserted

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

te_errno asn_remove_indexed(asn_value* container, int index, const char* labels)

Remove array element from indexed syntax (i.e. SEQUENCE OF or SET OF) subvalue of root ASN.1 value container.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

index

array index of element to be removed

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

te_errno asn_get_indexed(const asn_value* container, asn_value** subval, int index, const char* labels)

Get subvalue of ASN.1 value with indexed (SEQUENCE OF or SET OF) syntax. Got subvalue should NOT be freed!

This method does not make external copy of subvalue.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

subval

location for pointer to ASN.1 sub-value (OUT)

index

index of subvalue

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success or error code.

te_errno asn_write_primitive(asn_value* value, const void* data, size_t d_len)

Write primitive syntax value.

Parameters:

value

ASN.1 value with primitive syntax.

data

Data to be written, should be in nature C format for data type respective to leaf syntax.

d_len

Length of the data. Measured in octets for all types except OID and BIT_STRING; for OID measured in sizeof(int); for BIT_STRING measured in bits.

Returns:

zero on success or error code.

te_errno asn_put_choice(asn_value* container, asn_value* value)

Put ‘value’ as CHOICE of ‘container’. Free other subvalue of ‘container’, if there is one. Check that type of ‘value’ is one of possible choices in ‘container’.

Parameters:

container

ASN.1 value of CHOICE syntax, which subvalue should be changed.

value

ASN.1 value to be put into ‘container’.

Returns:

status code

te_errno asn_path_from_extended(asn_value* node, const char* ext_path, char* asn_path, unsigned int asn_path_len, bool auto_insert)

Convert ‘extended’ ASN.1 path (set of labels) to ordinary one for given asn_value.

Extended ASN.1 path could have search expression instead of one (or several) labels. Only index labels could be replaced (i.e. it is possible only for SEQUENCE_OF and SET_OF types) and subtype has to be SEQUENCE or SET. The syntax is following: <optional labels>.[<label>:<asn text value>].<other optional labels> Square brackets are part of format. The asn_value corresponding to <optional labels> is iterated and for each member the <label> value is compared to <asn text value>. If comparison is successful, then whole search expression is replaced by index. There could be several labels in the search expression, they are separated by ‘,’ then.

Parameters:

node

Root ASN.1 value to start searching for labels

ext_path

Extended ASN.1 path with search expressions

asn_path

Buffer for normal ASN.1 path

asn_path_len

asn_path buffer length

auto_insert

Insert items if search fail

Returns:

Status code

int asn_insert_value_extended_path(asn_value* root_node, const char* ext_path, asn_value* value, int* index)

Inserts ‘value’ into root_node ASN.1 value.

ext_path must be of format <labels>.[<label>:<asn text value>]

‘value’ will be inserted as a subvalue of <labels> value, its index will be stored in ‘index’ variable and after that <asn text value> will be assigned to field named <label> of newly inserted ASN.1 value. Several labels could be specified in [], separate with ‘,’.

Parameters:

root_node

Root ASN.1 value to start searching for labels

ext_path

Extended ASN.1 path with search expressions

value

ASN.1 value to be inserted

index

Index of ‘value’ after insertion into container (OUT)

Returns:

Status code

te_errno asn_check_value_contains(asn_value* container, asn_value* value)

Check that everything that is in the ‘value’ is in the ‘container’.

Parameters:

container

ASN.1 value to be compared against

value

ASN.1 value to be compared

Returns:

Status code

te_errno asn_free_subvalue(asn_value* value, const char* labels)

Free subvalue of constraint ASN.1 value instance.

Parameters:

value

ASN.1 value which subvalue should be destroyed

labels

string with dot-separated sequence of textual field labels, specifying subvalue in ASN.1 value tree with ‘container’ as a root. Label for SEQUENCE OF and SET OF subvalues is decimal notation of its integer index in array. Choice labels should be prepended by symbol #

Returns:

zero on success, otherwise error code.

te_errno asn_free_subvalue_fmt(asn_value* container, const char* labels_fmt, ...)

Variadic version of asn_free_subvalue().

te_errno te_errno asn_free_child_value(asn_value* value, asn_tag_class tag_class, asn_tag_value tag_val)

Free one-level subvalue of constraint ASN.1 value instance by tag. For CHOICE syntax value tag is ignored.

Parameters:

value

ASN.1 value which subvalue should be destroyed

tag_class

class of ASN.1 tag

tag_val

value of ASN.1 tag

Returns:

zero on success, otherwise error code.

te_errno asn_put_child_value(asn_value* container, asn_value* subvalue, asn_tag_class tag_class, asn_tag_value tag_val)

Put ASN.1 value to the named one-depth leaf to the ASN.1 value. Free old leaf subvalue, if there was one. Subvalue is not copied, but inserted into ASN.1 tree of ‘container’ as is.

Parameters:

container

ASN.1 value which child should be updated, have to be of syntax SEQUENCE, SET, or CHOICE

subvalue

new ASN.1 value for child

tag_class

class of ASN.1 tag

tag_val

value of ASN.1 tag

Returns:

zero on success, otherwise error code.

te_errno asn_put_child_value_by_label(asn_value* container, asn_value* subvalue, const char* label)

The same as ‘asn_put_child_value’, but take as child specificator its character label instead of tag.

Parameters:

container

ASN.1 value which child should be updated, have to be of syntax SEQUENCE, SET, or CHOICE

subvalue

new ASN.1 value for child

label

character label of child

Returns:

zero on success, otherwise error code.

te_errno asn_write_value_field(asn_value* container, const void* data, size_t d_len, const char* labels)

Write data into primitive syntax leaf in specified ASN.1 value.

Parameters:

container

pointer to ASN.1 value which leaf field is interested

data

data to be written, should be in nature C format for data type respective to leaf syntax

d_len

length of the data Measured in octets for all types except OID and BIT_STRING; for OID measured in sizeof(int) for BIT_STRING measured in bits

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

te_errno asn_write_value_field_fmt(asn_value* container, const void* data, size_t len, const char* labels_fmt, ...)

Variadic version of asn_write_value_field().

te_errno te_errno asn_read_value_field(const asn_value* container, void* data, size_t* d_len, const char* labels)

Read data from primitive syntax leaf in specified ASN.1 value.

Parameters:

container

pointer to ASN.1 value which leaf field is interested

data

pointer to buffer for read data (OUT)

d_len

length of available buffer / read data (IN/OUT). Measured in octets for all types except OID and BIT_STRING; for OID measured in sizeof(int), for BIT_STRING measured in bits

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

te_errno asn_read_value_field_fmt(const asn_value* container, void* data, size_t* len, const char* labels_fmt, ...)

Variadic version of asn_read_value_field().

te_errno te_errno asn_get_enum(const asn_value* container, int32_t* value)

Get primitive value of enumeration type from ASN.1 value.

Parameters:

container

ASN.1 value containing data of enumeration type.

value

Primitive value.

Returns:

Status code.

te_errno asn_get_enum_name(const asn_value* container, const char** name)

Get enumeration value name.

Return value must not be modified, since it points to container internals.

Parameters:

container

ASN.1 value containing data of enumeration type.

name

Name of value of enumeration type.

Returns:

Status code.

te_errno asn_write_int32(asn_value* container, int32_t value, const char* labels)

Write 32-bit integer into leaf in specified ASN.1 value.

Parameters:

container

pointer to ASN.1 value which leaf field is interested

value

integer value to be written

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

te_errno asn_read_int32(const asn_value* container, int32_t* value, const char* labels)

Read 32-bit integer from leaf in specified ASN.1 value.

Parameters:

container

pointer to ASN.1 value which leaf field is interested

value

place for integer value to be read (OUT)

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

te_errno asn_write_uint32(asn_value* container, uint32_t value, const char* labels)

Write 32-bit unsigned integer into leaf in specified ASN.1 value.

Parameters:

container

Pointer to ASN.1 value.

value

Value to be written.

labels

Textual ASN.1 labels of a leaf which should be changed; see asn_free_subvalue() method for more information.

Returns:

Status code.

te_errno asn_read_uint32(const asn_value* container, uint32_t* value, const char* labels)

Read 32-bit unsigned integer from a leaf in specified ASN.1 value.

Parameters:

container

Pointer to ASN.1 value.

value

Where to save read value.

labels

Textual ASN.1 labels of a leaf from which to read value; see asn_free_subvalue() method for more information.

Returns:

Status code.

te_errno asn_write_bool(asn_value* container, bool value, const char* labels)

Write boolean into leaf in specified ASN.1 value.

Parameters:

container

pointer to ASN.1 value which leaf field is interested

value

boolean value to be written

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

te_errno asn_read_bool(const asn_value* container, bool* value, const char* labels)

Read boolean from leaf in specified ASN.1 value.

Parameters:

container

pointer to ASN.1 value which leaf field is interested

value

place for boolean value to be read (OUT)

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

te_errno asn_write_string(asn_value* container, const char* value, const char* labels)

Write character string into leaf in specified ASN.1 value.

Parameters:

container

pointer to ASN.1 value which leaf field is interested

value

string to be written

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

te_errno asn_read_string(const asn_value* container, char** value, const char* labels)

Read character string from leaf in specified ASN.1 value. User have to free() got pointer to string.

Parameters:

container

pointer to ASN.1 value which leaf field is interested

value

place for pointer to read string (OUT)

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

te_errno asn_write_component_value(asn_value* container, const asn_value* elem_value, const char* labels)

Write component of COMPOUND subvalue in ASN.1 value tree.

Parameters:

container

root of ASN.1 value tree which subvalue to be changed

elem_value

ASN.1 value to be placed into the tree at place, specified by labels

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

te_errno asn_read_component_value(const asn_value* container, asn_value** elem_value, const char* labels)

Read component of COMPOUND subvalue in ASN.1 value tree.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

elem_value

read ASN.1 value, copy of subtree specified by labels argument (OUT)

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

te_errno asn_write_indexed(asn_value* container, const asn_value* elem_value, int index, const char* labels)

Replace array element in indexed (SEQUENCE OF or SET OF) subvalue of root ASN.1 value container.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

elem_value

ASN.1 value to be placed into the array, specified by labels at place, specified by index

index

array index of element to be replaced

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success, otherwise error code.

asn_value* asn_read_indexed(const asn_value* container, int index, const char* labels)

Read array element in indexed (SEQUENCE OF or SET OF) subvalue of root ASN.1 value ‘container’.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

index

array index of element to be read

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

pointer to new asn_value instance or NULL if error occurred.

int asn_get_length(const asn_value* container, const char* labels)

Get length of subvalue of root ASN.1 value container. Semantic of length value depends on the ASN.1 syntax. primitive syntax: INTEGER zero for usual native int or number of bits used. LONG_INT, CHAR_STRING, OCT_STRING, REAL number of octets; OBJECT IDENTIFIER number of sub-ids, which sub-id has usual for current architecture size of int; BIT_STRING number of bits; constraint syntax: number of sub-values; should be one or zero (for non-complete values) for CHOICE and TAGGED syntactic.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

length subvalue, -1 if error occurred.

asn_syntax asn_get_syntax(const asn_value* value, const char* labels)

Obtain ASN.1 syntax of specified field in value.

Parameters:

value

ASN.1 value which leaf syntax is interested

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

syntax of specified leaf in value.

const char* asn_get_choice_ptr(const asn_value* container)

Get choice in subvalue of root ASN.1 value container.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

Returns:

pointer to label or NULL on error.

te_errno asn_get_choice(const asn_value* container, const char* labels, char* choice_label, size_t ch_lb_len)

Get choice in subvalue of root ASN.1 value container.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description Subvalue should have ASN.1 syntax CHOICE

choice_label

string with label of choice in ASN.1 value (OUT)

ch_lb_len

length of available buffer in choice_label

Returns:

zero or error code.

const char* asn_get_name(const asn_value* container)

Get name of value;

Parameters:

container

value which name is interested

Returns:

value’s name or NULL.

te_errno asn_get_subvalue(const asn_value* container, asn_value** subval, const char* labels)

Get constant pointer to subvalue of some ASN.1 value with COMPOUND syntax. User may to try discard const qualifier of obtained subvalue only if he (she) knows very well what he doing with ASN.1 value. In particular, got subvalue should NOT be freed!

This method is much faster then “asn_read_component_value’ because it does not make external copy of subvalue.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

subval

location for pointer to ASN.1 sub-value (OUT)

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success or error code.

te_errno asn_get_child_value(const asn_value* container, const asn_value** subval, asn_tag_class tag_class, asn_tag_value tag_val)

Get constant pointer to direct subvalue of ASN.1 value with named syntax (SEQUENCE or SET) by its tag. If there are more then one child with specified tag, method return first found.

User may try to discard const qualifier of obtained subvalue only if he (she) knows very well what he doing with ASN.1 value. In particular, got subvalue should NOT be freed!

This method is much faster then “asn_read_component_value’ because it does not make external copy of subvalue.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

subval

location for pointer to ASN.1 sub-value (OUT)

tag_class

class of ASN.1 tag

tag_val

value of ASN.1 tag

Returns:

zero on success or error code.

te_errno asn_get_choice_value(const asn_value* container, asn_value** subval, asn_tag_class* tag_class, asn_tag_value* tag_val)

Get constant pointer to direct subvalue of ASN.1 value with CHOICE syntax.

User may try to discard const qualifier of obtained subvalue only if he (she) knows very well what he doing with ASN.1 value. In particular, got subvalue should NOT be freed!

This method is much faster then “asn_read_component_value’ because it does not make external copy of subvalue.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

subval

location for pointer to ASN.1 sub-value (OUT)

tag_class

class of ASN.1 tag of subvalue (OUT)

tag_val

value of ASN.1 tag of subvalue (OUT)

Returns:

zero on success or error code.

te_errno asn_get_field_data(const asn_value* container, void* data_ptr, const char* labels)

Get constant pointer to data related to leaf plain-syntax sub-value of ASN.1 value.

Got pointer should NOT be freed!

Write to got memory location is acceptable in case of simple data syntax (e.g. PrintableString or INTEGER) and if new data has length not greater then set in ASN.1 value leaf; user has no way to change data length except via ‘asn_write_value_field’ method.

This method is much faster then “asn_read_value_field’ because it does not copy data to user location, with large octet strings or OIDs it may be significant.

Parameters:

container

root of ASN.1 value tree which subvalue is interested

data_ptr

pointer to location for plain data pointer; usually it should be something like &str, where str has type const char * (OUT)

labels

textual ASN.1 labels of subvalue; see asn_free_subvalue method for more description

Returns:

zero on success or error code.

asn_tag_value asn_get_tag(const asn_value* container)

Get tag of value.

Parameters:

container

value which name is interested

Returns:

value’s name or NULL.

size_t asn_count_txt_len(const asn_value* value, unsigned int indent)

Count required length of string for textual presentation of specified value, without trailing zero byte. So, while using this method to calculate required buffer, add 1 to got value.

Parameters:

value

ASN.1 value

indent

current indent, usually should be zero

Returns:

length the number of bytes required for textual presentation of specified value.

te_errno asn_put_mark(asn_value* value, int mark)

Set the mark to ASN.1 value, which is arbitrary integer, which semantic is user-free.

Parameters:

value

Pointer to the ASN.1 value.

mark

Mark to be set.

Returns:

status code.

te_errno asn_get_mark(const asn_value* value, int* mark)

Get the mark of ASN.1 value.

Parameters:

value

Pointer to the ASN.1 value.

mark

Location for the mark of value.

Returns:

status code.

te_errno asn_walk_depth(asn_value* container, bool only_leafs, te_errno* status, walk_method func, void* user_ptr)

Walk over all subvalues tree of ASN.1 value. Order of walk is depth-first. Walk stops if user callback return non-zero status.

Parameters:

container

Pointer to the ASN.1 value which subvalues should be iterated.

only_leafs

Boolean flag, if true, user callback will will be called only for the leafs, i.e. for nodes without sub-values: either primitive or empty compound.

status

Location for user status of walk: if callback return non-zero, walk stops and callback return code will be put here. Should be zero before start.

func

User callback, which should be called for each subvalue.

user_ptr

User parameter for callback.

Returns:

status code.

te_errno asn_walk_breadth(asn_value* container, bool only_leafs, te_errno* status, walk_method func, void* user_ptr)

Walk over all subvalues tree of ASN.1 value. Order of walk is breadth-first. Walk stops if user callback return non-zero status.

Parameters:

container

Pointer to the ASN.1 value which subvalues should be iterated.

only_leafs

Boolean flag, if true, user callback will will be called only for the leafs, i.e. for nodes without sub-values: either primitive or empty compound.

status

Location for user status of walk: if callback return non-zero, walk stops and callback return code will be put here.

func

User callback, which should be called for each subvalue.

user_ptr

User parameter for callback.

Returns:

status code.

te_errno builder_build_test_suite(const char* suite, const char* sources)

This function is called by Tester subsystem to build dynamically a Test Suite. Test Suite is installed to ${TE_INSTALL_SUITE}/bin/<suite>.

Test Suite may be linked with TE libraries. If TE_INSTALL or TE_BUILD are not empty necessary compiler and linker flags are passed to Test Suite configure in variables TE_CFLAGS and TE_LDFLAGS.

Parameters:

suite

Unique suite name.

sources

Source location of the Test Suite (Builder will look for configure script in this directory. If the path is started from “/” it is considered as absolute. Otherwise it is considered as relative from TE_BASE.

Returns:

Status code.

int rcf_net_engine_connect(const char* addr, const char* port, struct rcf_net_connection** p_rnc, fd_set* p_select_set)

Connects to the Test Agent side of Network Communication library.

Parameters:

addr

  • network address of the test agent

port

  • port of the test agent

p_rnc

  • pointer to to pointer to the rcf_net_connection structure to be filled, used as handler

p_select_set

  • pointer to the fdset for reading to be modified

0

  • success

other

value - errno

Returns:

Status code.

int rcf_net_engine_transmit(struct rcf_net_connection* rnc, const char* data, size_t length)

Transmits data to the Test Agent via Network Communication library.

Parameters:

rnc

  • Handler received from rcf_net_engine_connect.

data

  • Data to be transmitted.

length

  • Length of the data.

0

  • success

other

value - errno

Returns:

Status code.

bool rcf_net_engine_is_ready(struct rcf_net_connection* rnc)

Check, if some data are pending on the test agent connection. This routine never blocks.

c true Data are pending. c false No data are pending.

Parameters:

rnc

Returns:

Status code.

int rcf_net_engine_receive(struct rcf_net_connection* rnc, char* buffer, size_t* pbytes, char** pba)

Receive data from the Test Agent via Network Communication library.

Parameters:

rnc

  • Handler received from rcf_net_engine_connect

buffer

  • Buffer for data

pbytes

  • Pointer to variable with: on entry - size of the buffer; on return: number of bytes really written if 0 returned (success); unchanged if TE_ESMALLBUF returned; number of bytes in the message (with attachment) if TE_EPENDING returned. (Note: If the function called a number of times to receive one big message, a full number of bytes will be returned on first call. On the next calls number of bytes in the message minus number of bytes previously read by this function will be returned); undefined if other errno returned.

pba

  • Address of the pointer that will hold on return an address of the first byte of the attachment (or NULL if no attachment attached to the command). If this function called more than once (to receive big attachment) this pointer will be not touched.

0

Success (message received and written to the buffer)

TE_ESMALLBUF

Buffer is too small for the message. The part of the message is written to the buffer. Other part(s) of the message can be read by the next calls to the rcf_net_engine_receive(). The ETSMALLBUF will be returned until last part of the message will be read.

TE_EPENDING

Attachment is too big to fit into the buffer. Part of the message with attachment is written to the buffer. Other part(s) can be read by the next calls to the rcf_net_engine_receive(). The TE_EPENDING will be returned until last part of the message will be read.

other

value errno

Returns:

Status code.

int rcf_net_engine_close(struct rcf_net_connection** p_rnc, fd_set* p_select_set)

Close connection (socket) to the Test Agent and release the memory used by struct rcf_net_connection *rnc.

Parameters:

p_rnc

Pointer to variable with handler received from rcf_net_engine_connect

p_select_set

Pointer to the fdset for reading to be modified

0

  • success

other

value - errno

Returns:

Status code.

void te_conf_ip_rule_init(te_conf_ip_rule* rule)

Initialize structure te_conf_ip_rule

Parameters:

rule

Structure to initialize

te_errno te_conf_ip_rule_to_str(const te_conf_ip_rule* rule, char** str)

Transform structure te_conf_ip_rule to char*

Parameters:

rule

Source structure

str

Pointer to result string

Returns:

Status code

te_errno te_conf_ip_rule_from_str(const char* str, uint32_t* required, te_conf_ip_rule* rule)

Transform char * to structure te_conf_ip_rule and required fields

Parameters:

str

Source string

required

Final required fields

rule

Final structure

Returns:

Status code

te_conf_obj_compare_result te_conf_ip_rule_compare(uint32_t required, const te_conf_ip_rule* object_a, const te_conf_ip_rule* object_b)

Compare two structures te_conf_ip_rule with specified required fields

Parameters:

required

Mask required fields

object_a

First structure

object_b

Second structure

Returns:

Result of the comparison

void te_conf_ip_rule_set_invert(te_conf_ip_rule* rule, bool invert)

Set inversion flag for IP rule.

Parameters:

rule

IP rule structure.

invert

If true, set the flag; otherwise clear it.

bool te_conf_ip_rule_get_invert(const te_conf_ip_rule* rule)

Get state of inversion flag for IP rule.

Parameters:

rule

IP rule structure.

Returns:

true if flag is set, false otherwise.

te_errno te_conf_obj_to_str(const te_conf_obj* fields, size_t fields_number, const void* base, uint32_t mask, char** str)

Transform object to string

Parameters:

fields

Specifies fields of an object

fields_number

Number of the object fields (elements in fields)

base

Base address of an object

mask

Mask of filled fields in an object

str

Pointer to result string

Returns:

Status code

te_errno te_conf_obj_from_str(const te_conf_obj* fields, size_t fields_number, const char* str, uint32_t* required, void* base, uint32_t* mask)

Transform string to object

Parameters:

fields

Specifies fields of an object

fields_number

Number of the object fields (elements in fields)

str

Source string

required

Finally required fields

base

Base address of an object

mask

Mask of filled fields in an object

Returns:

Status code

te_conf_obj_compare_result te_conf_obj_compare(const te_conf_obj* fields, size_t fields_number, uint32_t required, const void* base_a, uint32_t mask_a, const void* base_b, uint32_t mask_b)

Compare two objects

Parameters:

fields

Specifies fields of an object

fields_number

Number of the object fields (elements in fields)

required

Mask required fields

base_a

Base address of an object A

mask_a

Mask of filled fields in an object A

base_b

Base address of an object B

mask_b

Mask of filled fields in an object B

Returns:

Result of comparison

char* cfg_oid_get_inst_name(const cfg_oid* oid, int idx)

Get specified instance name from OID.

Parameters:

oid

OID

idx

Instance index with negative values support to count from the last subidentifier (e.g. -1 to get the last instance name)

Returns:

Instance name allocated from heap or NULL.

See also:

cfg_oid_str_get_inst_name()

char* cfg_oid_str_get_inst_name(const char* oid_str, int idx)

Get specified instance name from OID in string format.

Parameters:

oid_str

OID in string format

idx

Instance index with negative values support (-1 to get the last instance name)

Returns:

Instance name allocated from heap or NULL.

See also:

cfg_oid_get_inst_name()

static char* cfg_oid_object_subid(cfg_oid* oid, unsigned int i)

Get sub-ID from object OID.

static char* cfg_oid_inst_subid(cfg_oid* oid, unsigned int i)

Get sub-ID from instance OID.

cfg_oid* cfg_allocate_oid(int length, bool inst)

Allocate memory for object identifier or object instance identifier.

Parameters:

length

number of identifier elements

inst

if true, object instance identifier should be allocated

Returns:

newly allocated structure pointer or NULL

cfg_oid* cfg_convert_oid_str(const char* oid)

Convert object identifier or object instance identifier in string representation to cfg_oid structure.

Parameters:

oid

OID in string representation

Returns:

newly allocated structure pointer or NULL

char* cfg_convert_oid(const cfg_oid* oid)

Convert object identifier or object instance identifier in structure representation to string (memory is allocated by the routine using malloc()).

Parameters:

oid

OID in structure representation

Returns:

newly allocated string or NULL

void cfg_free_oid(cfg_oid* oid)

Free memory allocated for OID stucture.

Parameters:

oid

oid structure

int cfg_oid_cmp(const cfg_oid* o1, const cfg_oid* o2)

Compare object identifiers.

Parameters:

o1

the first OID

o2

the second OID

0

equal

1

not equal

bool cfg_oid_match(const cfg_oid* inst_oid, const cfg_oid* obj_oid, bool match_prefix)

Checks whether inst_oid is an instance of obj_oid.

Parameters:

inst_oid

Instance OID.

obj_oid

Object OID.

match_prefix

If true, inst_oid should be within a subtree defined by obj_oid, i.e. there should be a prefix of inst_oid matching obj_oid. Otherwise, the whole inst_oid shall match.

Returns:

true iff inst_oid matches obj_oid.

te_errno cfg_oid_dispatch(const cfg_oid_rule rules[], const char* inst_oid, void* ctx)

Calls an action depending on the object OID.

The function parses inst_oid, then searchers actions for an entry with a matching object_oid (as per cfg_oid_match). Then a corresponding handler is called.

Parameters:

rules

The array of rules, the last entry shall have NULL in object_oid field.

inst_oid

Instance OID

ctx

User data passed to the handler

TE_ESRCH

No matching entry is found

Returns:

Status code (may be returned from a handler)

cfg_oid* cfg_oid_common_root(const cfg_oid* oid1, const cfg_oid* oid2)

Determines a common part of two OIDs. If both OIDs are object OIDs, an object OID is returned. Otherwise, an instance OID is returned that starts with a common part of the two, with instance names taken from either ‘oid1’ or ‘oid2’ whichever is an instance OID, and the rest is filled from ‘oid1’ with names set to ‘*’.

Example:

  • /a/b/c + /a/b/d -> /a/b

  • /a/b/c + /a:A/b:B/d -> /a:A/b:B/c:*

  • /a:A/b:B/c:C + /a/b/d -> /a:A/b:B/c:*

  • /a:A/b:B/c:C + /a:A1/b:B1/d:D -> /a:A/b:B/c:*

Parameters:

oid1

the first OID

oid2

the second OID

resulting

OID

static void cfg_oid_inst2obj(const char* inst_oid, char* obj_oid)

Convert instance identifier to object identifier.

Parameters:

inst_oid

instance identifier

obj_oid

object identifier (CFG_OID_MAX length)

te_errno cfg_ipc_mk_get(cfg_get_msg* msg, size_t msg_buf_size, cfg_handle handle, bool sync)

Prepare a cfg_get_instance message.

Parameters:

msg

message buffer

msg_buf_size

length of the message buffer

handle

object instance handle

sync

synchronization flag

Returns:

Status code (see te_errno.h)

te_errno cfg_ipc_mk_find_str(cfg_find_msg* msg, size_t msg_buf_size, const char* oid)

Prepare a cfg_find message.

Parameters:

msg

message buffer

msg_buf_size

length of the message buffer

oid

object identifier in string representation

Returns:

Status code (see te_errno.h)

TE_EMSGSIZE the OID is too long

te_errno cfg_ipc_mk_find_fmt(cfg_find_msg* msg, size_t msg_buf_size, const char* oid_fmt, ...)

Prepare a cfg_find message.

Parameters:

msg

message buffer

msg_buf_size

length of the message buffer

oid_fmt

format string for the object identifier

TE_EMSGSIZE

the OID is too long

Returns:

Status code (see te_errno.h)

te_errno te_errno cfg_ipc_mk_set(cfg_set_msg* msg, size_t msg_buf_size, cfg_handle handle, bool local, cfg_val_type type, cfg_inst_val value)

Prepare a cfg_set_instance message.

Parameters:

msg

message buffer

msg_buf_size

length of the message buffer

handle

object instance handle

local

whether the set is local

type

value type (necessary for fast processing)

value

new value to be assigned to the instance

Returns:

Status code (see te_errno.h)

static te_errno cfg_ipc_mk_set_int(cfg_set_msg* msg, size_t msg_buf_size, cfg_handle handle, bool local, int32_t value)

Same function as cfg_ipc_mk_set, but type is fixed as CVT_INT32

static te_errno cfg_ipc_mk_set_str(cfg_set_msg* msg, size_t msg_buf_size, cfg_handle handle, bool local, char* value)

Same function as cfg_ipc_mk_set, but type is fixed as CVT_STRING

te_errno cfg_ipc_mk_del(cfg_del_msg* msg, size_t msg_buf_size, cfg_handle handle, bool local)

Prepare a cfg_del_instance message.

Parameters:

msg

message buffer

msg_buf_size

length of the message buffer

handle

object instance handle

local

whether the delete is local

Returns:

Status code (see te_errno.h)

static const char* cs_server_name(void)

Discover name of the Configurator IPC server

void cfg_process_msg(cfg_msg** msg, bool update_dh)

Process message with user request.

Parameters:

msg

location of message pointer (message may be updated or re-allocated by the function)

update_dh

if true, add the command to dynamic history

int ipc_init_client(const char* client_name, bool conn, struct ipc_client** p_client)

Initialize IPC library for the client.

Parameters:

client_name

Unique name of the client (must be less than UNIX_PATH_MAX)

conn

false connectionless client, true connection-oriented client

p_client

Location for client handle

Returns:

Status code.

const char* ipc_client_name(const struct ipc_client* ipcc)

Get IPC client name.

Parameters:

ipcc

Pointer to the ipc_client structure returned by ipc_init_client()

Returns:

Pointer to ‘0’-terminated string or NULL

int ipc_send_message(struct ipc_client* ipcc, const char* server_name, const void* msg, size_t msg_len)

Send the message to the server with specified name.

Todo It must NOT fail, if server has not been registered yet.

Parameters:

ipcc

Pointer to the ipc_client structure returned by ipc_init_client()

server_name

Name of the server, this name must be registered by ipc_register_server()

msg

Pointer to message to send

msg_len

Length of the message to send

0

Success

errno

Failure

Returns:

Status code.

int ipc_send_message_with_answer(struct ipc_client* ipcc, const char* server_name, const void* msg, size_t msg_len, void* recv_buf, size_t* p_buf_len)

Send the message to the server with specified name and wait for the answer.

Parameters:

ipcc

Pointer to the ipc_client structure returned by ipc_init_client()

server_name

Name of the server, this name must be registered by ipc_register_server().

msg

Pointer to message to send

msg_len

Length of the message to send

recv_buf

Pointer to the buffer for answer.

p_buf_len

Pointer to the variable to store: on entry - length of the buffer; on exit - length of the message received (or full length of the message if TE_ESMALLBUF is returned).

0

Success

TE_ESMALLBUF

Receive buffer is too small for the message, whole buffer is filled up, *p_buf_len contains whole answer length, ipc_receive_rest_answer() must be used to receive the rest of the message.

errno

Failure

Returns:

Status code.

int ipc_receive_answer(struct ipc_client* ipcc, const char* server_name, void* buf, size_t* p_buf_len)

Receive (or wait for) the message from the server with specified name.

Parameters:

ipcc

Pointer to the ipc_client structure returned by ipc_init_client()

server_name

Name of the server, this name must be registered by ipc_register_server()

buf

Pointer to the buffer for answer

p_buf_len

Pointer to the variable to store: on entry - length of the buffer; on exit - length of the message received (or full length of the message if TE_ESMALLBUF is returned).

0

Success

TE_ESMALLBUF

Receive buffer is too small for the message, whole buffer is filled up, *p_buf_len contains whole answer length, ipc_receive_rest_answer() must be used to receive the rest of the message.

errno

Failure

Returns:

Status code.

int ipc_receive_rest_answer(struct ipc_client* ipcc, const char* server_name, void* buf, size_t* p_buf_len)

Receive the rest of the message from the server with specified name.

Parameters:

ipcc

Pointer to the ipc_client structure returned by ipc_init_client()

server_name

Name of the server, this name must be registered by ipc_register_server()

buf

Pointer to the buffer for answer

p_buf_len

Pointer to the variable to store: on entry - length of the buffer; on exit - length of the message received (or full length of the message if TE_ESMALLBUF is returned).

0

Success

TE_ESMALLBUF

Receive buffer is too small for the message, whole buffer is filled up, *p_buf_len contains whole answer length, ipc_receive_rest_answer() must be used to receive the rest of the message.

errno

Failure

Returns:

Status code.

int ipc_close_client(struct ipc_client* ipcc)

Close IPC client.

Parameters:

ipcc

Pointer to the ipc_client structure returned by ipc_init_client()

0

Success

errno

Failure

Returns:

Status code.

TAILQ_HEAD(ipc_datagrams, ipc_datagram)

Definition of type for head of the tail queue with datagrams

int ipc_remember_datagram(struct ipc_datagrams* p_pool, void* data, size_t len, struct sockaddr_un* addr, size_t addr_len)

Store datagram in the pool.

Parameters:

p_pool

  • pointer to the datagram pool

data

  • pointer to data to be owned by routine on success

len

  • length of the datagram

addr

  • source address of the datagram

addr_len

  • length of the address

0

  • success

TE_ENOMEM

  • memory allocation failure

Returns:

Status code.

int ipc_init(void)

Initialize IPC library. This function must be called before any other functions in the IPC server library. This function must be called only once.

Returns:

Status code.

int ipc_register_server(const char* name, bool conn, struct ipc_server** p_ipcs)

Register IPC server.

Parameters:

name

Name of the server (must be less than UNIX_PATH_MAX)

conn

false connectionless server, true connection-oriented server

p_ipcs

Location for IPC server handle

Returns:

Status code.

int ipc_get_server_fd(const struct ipc_server* ipcs)

Get a file descriptor of the server.

Bug It seems to be unuseful in the TCP implementation.

Parameters:

ipcs

Pointer to the ipc_server structure returned by ipc_register_server().

Returns:

IPC server file descriptor.

int ipc_get_server_fds(const struct ipc_server* ipcs, fd_set* set)

Get a file descriptor of the server.

Parameters:

ipcs

Pointer to the ipc_server structure returned by ipc_register_server()

set

Set to be updated

Returns:

Maximum file descriptor number or -1.

bool ipc_is_server_ready(struct ipc_server* ipcs, const fd_set* set, int max_fd)

Is server ready on the base of knowledge in specified set of file descriptors?

Parameters:

ipcs

Pointer to the ipc_server structure returned by ipc_register_server()

set

Set to be analyzed

max_fd

Maximum file descriptor to be analyzed

Returns:

Is server ready or not?

const char* ipc_server_client_name(const struct ipc_server_client* ipcsc)

Get name of the IPC server client.

Parameters:

ipcsc

Pointer to the ipc_server_client structure returned by ipc_receive_message()

Returns:

Pointer to ‘0’-terminated string, “UNKNOWN” or NULL

int ipc_receive_message(struct ipc_server* ipcs, void* buf, size_t* p_buf_len, struct ipc_server_client** p_ipcsc)

Receive a message from IPC client.

Parameters:

ipcs

Pointer to the ipc_server structure returned by ipc_register_server()

buf

Buffer for the message

p_buf_len

Pointer to the variable to store: on entry - length of the buffer, on exit - length of the received message (or the rest length of the message if TE_ESMALLBUF returned).

p_ipcsc

Location for the pointer to ipc_server_client() structure. This variable will point to internal IPC library data, user MUST NOT free it.

0

Success

TE_ESMALLBUF

Buffer is too small for the message, the rest of the message can be received by ipc_receive_message() with this client pointer in *p_ipcsc

errno

Other failure

Returns:

Status code.

int ipc_send_answer(struct ipc_server* ipcs, struct ipc_server_client* ipcsc, const void* msg, size_t msg_len)

Send an answer to the client.

Parameters:

ipcs

Pointer to the ipc_server structure returned by ipc_register_server()

ipcsc

Variable returned by ipc_receive_message() with pointer ipc_server_client structure

msg

Pointer to message to send

msg_len

Length of the message to send

Returns:

Status code.

int ipc_close_server(struct ipc_server* ipcs)

Close the server. Free all resources allocated by the server.

Parameters:

ipcs

Pointer to the ipc_server structure returned by ipc_register_server()

Returns:

Status code.

int ipc_kill(void)

Close IPC library. No other IPC library functions except ipc_init() must be called after this function.

Returns:

Status code.

iscsi_initiator_data_t* iscsi_configuration(void)

Returns a pointer to master iSCSI initiator parameter table

Returns:

the pointer

int iscsi_get_target_id(const char* oid)

Function returns target ID from the name of the instance: /agent:Agt_A/iscsi_initiator:/target_data:target_x/… the target id is ‘x’

Parameters:

oid

The full name of the instance

Returns:

ID of the target

int iscsi_get_cid(const char* oid)

Function returns CID from the name of the instance.

Parameters:

oid

The full name of the instance

Returns:

ID of the connection

te_errno iscsi_post_connection_request(int target_id, int cid, int status, bool urgent)

Asynchronously posts a request to change a state of a given connection. The request will be handled by iscsi_initiator_conn_request_thread(). The only status values acceptable by this function are:

  • ISCSI_CONNECTION_UP

  • ISCSI_CONNECTION_DOWN

  • ISCSI_CONNECTION_REMOVED

Parameters:

target_id

Target number

cid

Connection number

status

New status

urgent

If true, the request will be put into the head of the queue, instead of the tail

Returns:

Status code

void iscsi_init_default_tgt_parameters(iscsi_target_data_t* tgt_data)

Initialize default parameters for all possible connections of a given target.

Parameters:

tgt_data

Structure of the target data to initialize.

void iscsi_init_default_ini_parameters(void)

Initialize all Initiator-related structures

int iscsi_unix_cli(const char* cmd, ...)

Executes ta_system formatting the command line with cmd and the rest of arguments.

Parameters:

cmd

printf-like format specifier

0

ta_system terminated with zero exit code

TE_ESHCMD

ta_system failed

Returns:

Error code

te_errno iscsi_openiscsi_stop_daemon(void)

Stop Open-iSCSI managing daemon

Returns:

status code

te_errno iscsi_initiator_dummy_set(iscsi_connection_req* req)

Dummy initiator controlling function

Parameters:

req

Connection request (unused)

Returns:

TE_ENOSYS

te_errno iscsi_initiator_unh_set(iscsi_connection_req* req)

Connection request handler for UNH initiator

Parameters:

req

Connection request

Returns:

Status code

te_errno iscsi_initiator_openiscsi_set(iscsi_connection_req* req)

Connection request handler for Open-iSCSI initiator

Parameters:

req

Connection request

Returns:

Status code

te_errno iscsi_initiator_l5_set(iscsi_connection_req* req)

Connection request handler for L5 initiator under Linux

Parameters:

req

Connection request

Returns:

Status code

te_errno iscsi_initiator_win32_set(iscsi_connection_req* req)

Connection request handler for MS iSCSI

Parameters:

req

Connection request

Returns:

Status code

static bool iscsi_is_param_needed(iscsi_target_param_descr_t* param, iscsi_target_data_t* tgt_data, iscsi_connection_data_t* conn_data, iscsi_tgt_chap_data_t* auth_data)

Check whether a given parameter param needs to be configured in a certain situation.

Parameters:

param

Parameter description

tgt_data

Target-wide parameters

conn_data

iSCSI operational parameters

auth_data

iSCSI security parameters

Returns:

true if the parameter should be configured

void iscsi_write_param(void(*)(void*, char*) outfunc, void* destination, iscsi_target_param_descr_t* param, iscsi_target_data_t* tgt_data, iscsi_connection_data_t* conn_data, iscsi_tgt_chap_data_t* auth_data)

Write an iSCSI parameter to a certain destination.

Parameters:

outfunc

Output callback. It takes two arguments: destination and a buffer with the parameter value

destination

Opaque data passed to outfunc

param

Parameter description

tgt_data

Target-wide parameters

conn_data

iSCSI operational parameters

auth_data

iSCSI security parameters

void iscsi_write_to_file(void* destination, char* what)

Callback function for iscsi_write_param(). It writes the value to a FILE stream

Parameters:

destination

FILE pointer

what

Parameter value

void iscsi_put_to_buf(void* destination, char* what)

Callback function for iscsi_write_param(). It just copies what to destination.

Parameters:

destination

Buffer pointer

what

Parameter value

void iscsi_append_to_buf(void* destination, char* what)

Callback function for iscsi_write_param(). It appends what to destination as per strcat().

Parameters:

destination

Buffer pointer

what

Parameter value

bool iscsi_when_tgt_auth(iscsi_target_data_t* target_data, iscsi_connection_data_t* conn_data, iscsi_tgt_chap_data_t* auth_data)

Predicate function for iscsi_write_param().

Parameters:

target_data

Target-wide parameters

conn_data

iSCSI operational parameters

auth_data

iSCSI security parameters

Returns:

true if target authentication is requested

bool iscsi_when_not_tgt_auth(iscsi_target_data_t* target_data, iscsi_connection_data_t* conn_data, iscsi_tgt_chap_data_t* auth_data)

Predicate function for iscsi_write_param().

Parameters:

target_data

Target-wide parameters

conn_data

iSCSI operational parameters

auth_data

iSCSI security parameters

Returns:

true if target authentication is not requested

bool iscsi_when_chap(iscsi_target_data_t* target_data, iscsi_connection_data_t* conn_data, iscsi_tgt_chap_data_t* auth_data)

Predicate function for iscsi_write_param().

Parameters:

target_data

Target-wide parameters

conn_data

iSCSI operational parameters

auth_data

iSCSI security parameters

Returns:

true if any authentication is requested

te_errno iscsi_get_device_name(iscsi_connection_data_t* conn, int target_id, bool is_generic, char* outbuffer)

Detect SCSI device name

Parameters:

conn

Connection data

target_id

Target ID

is_generic

If true, obtain SCSI generic device name, otherwise block device name

outbuffer

Device name buffer (OUT)

Returns:

Status code

te_errno log_branch_filter_load_xml(log_branch_filter* filter, xmlNodePtr filter_node)

Load a branch filter from an XML file.

Parameters:

filter

branch filter

filter_node

XML root node for the filter

Returns:

Status code

te_errno log_duration_filter_load_xml(log_duration_filter* filter, xmlNodePtr filter_node)

Load a duration filter from an XML file.

Parameters:

filter

branch filter

filter_node

XML root node for the filter

Returns:

Status code

te_errno log_msg_filter_load_xml(log_msg_filter* filter, xmlNodePtr filter_node)

Load a message filter from an XML file.

Parameters:

filter

branch filter

filter_node

XML root node for the filter

Returns:

Status code

te_errno log_msg_filter_load_yaml(log_msg_filter* filter, yaml_document_t* doc, yaml_node_t* node)

Load a message filter from a YAML node.

Parameters:

filter

branch filter

doc

YAML document

node

root YAML node for this filter

Returns:

Status code

void log_branch_filter_init(log_branch_filter* filter)

Initialize a branch filter.

Parameters:

filter

branch filter

te_errno log_branch_filter_add(log_branch_filter* filter, const char* path, bool include)

Add a branch rule.

Parameters:

filter

branch filter

path

branch path

include

whether to include or exclude the branch

Returns:

Status code

log_filter_result log_branch_filter_check(log_branch_filter* filter, const char* path)

Check a path.

Parameters:

filter

branch filter

path

branch path

Returns:

Filtering result

void log_branch_filter_free(log_branch_filter* filter)

Free the memory allocated for the filter.

Parameters:

filter

branch filter

te_errno log_duration_filter_init(log_duration_filter* filter)

Initialize a duration filter.

Parameters:

filter

duration filter

Returns:

Status code

te_errno log_duration_filter_add(log_duration_filter* filter, const char* type, uint32_t min, uint32_t max, bool include)

Add a duration rule.

Parameters:

filter

duration filter

type

flow node type (e.g. “PACKAGE” or “SESSION”)

min

start of interval

max

end of interval

include

should this interval be included

Returns:

Status code

log_filter_result log_duration_filter_check(log_duration_filter* filter, const char* type, uint32_t duration)

Check a duration.

Parameters:

filter

duration filter

type

flow node type (e.g. “PACKAGE” or “SESSION”)

duration

duration

Returns:

Filtering result

void log_duration_filter_free(log_duration_filter* filter)

Free the memory allocated for the filter.

Parameters:

filter

duration filter

te_errno log_msg_filter_init(log_msg_filter* filter)

Initialize the given message filter.

Parameters:

filter

message filter

Returns:

Status code

te_errno log_msg_filter_set_default(log_msg_filter* filter, bool include, te_log_level level_mask)

Add a rule without any specific entity or user.

Calls to this and other functions that add a filtering rule can act as either an “include” or an “exclude” command. This differentiation is done through the “include” parameter provided by these functions.

An “include” command makes the filter include the message with the properties described in the new rule, despite what the previous rules might have said. “Exclude” commands behave similarly.

Parameters:

filter

message filter

include

include or exclude

level_mask

log levels bitmask

Returns:

Status code

te_errno log_msg_filter_add_entity(log_msg_filter* filter, bool include, const char* name, bool regex, te_log_level level_mask)

Add an entity-specific rule.

In case of a failure, the new rule may be applied only partially.

Parameters:

filter

message filter

include

include or exclude

name

name or PCRE

regex

is name a PCRE?

level_mask

log levels bitmask

Returns:

Status code

te_errno log_msg_filter_add_user(log_msg_filter* filter, bool include, const char* entity, bool entity_regex, const char* user, bool user_regex, te_log_level level_mask)

Add a user-specific rule.

In case of a failure, the new rule may be applied only partially.

Parameters:

filter

message filter

include

include or exclude

entity

entity name or PCRE or NULL (apply for all entities)

entity_regex

is entity a PCRE?

user

user name or PCRE

user_regex

is user a PCRE?

level_mask

log levels bitmask

Returns:

Status code

log_filter_result log_msg_filter_check(const log_msg_filter* filter, const log_msg_view* view)

Check a log message against a message filter.

Parameters:

filter

message filter

view

message view

Returns:

Verdict

bool log_msg_filter_equal(const log_msg_filter* a, const log_msg_filter* b)

Compare two filters and check if they’re equal.

Parameters:

a

message filter 1

b

message filter 2

void log_msg_filter_free(log_msg_filter* filter)

Free the memory allocated by the message filter.

Parameters:

filter

message filter

te_errno te_raw_log_parse(const void* buf, size_t buf_len, log_msg_view* view)

Parse a raw log message. After a successful call, every pointer in the view structure will point to an address within the [buf; buf + len] region. If an error occurs, the view structure may be filled only partially.

Parameters:

buf

message buffer

buf_len

length of message buffer

view

view structure to be filled

te_errno te_raw_log_expand(const log_msg_view* view, te_string* target)

Expand the message’s format string.

The result will be appended to the given te_string.

Parameters:

view

message view

target

where the result should be placed

Returns:

Status code

int logfork_register_user(const char* name)

Register process name and pid, so it would be possible to know from which process or thread message has been sent.

If the process is already registered, change its name.

Parameters:

name

process or thread name

0

success

-1

failure

int logfork_delete_user(pid_t pid, uint32_t tid)

Delete user with a given pid and tid.

Parameters:

pid

process id

tid

thread id

0

success

-1

failure

int logfork_set_id_logging(bool enabled)

Enable or disable logging of process name and id in messages (enabled by default)

Parameters:

enabled

true - enable, false - disable

0

success

-1

failure

void logfork_entry(void)

Entry point for log gathering.

te_errno ta_log_init(const char* lgr_entity)

Initialize Logger resources on the Test Agent side (log buffer, log file and so on).

Parameters:

lgr_entity

Logger entity name to use

Returns:

Status code (see te_errno.h)

te_errno ta_log_shutdown(void)

Finish Logger activity on the Test Agent side (flushes buffers in the file if that means exists and so on).

Returns:

Status code (see te_errno.h)

void ta_log_dynamic_user_ts(te_log_ts_sec sec, te_log_ts_usec usec, unsigned int level, const char* user, const char* msg)

Register a log message in the raw log with log user stored as an argument (slow mode).

Log user string is usually stored in the raw log as a pointer to a string in static memory region to avoid copying/memory allocation. But in some cases log user has to be dynamic, and the function copies the log user into raw log argument to support that.

Parameters:

sec

Timestamp seconds

usec

Timestamp microseconds

level

Log level

user

Pointer to log user (copied into raw log)

msg

Pointer to the log message.

uint32_t ta_log_get(uint32_t buf_length, uint8_t* transfer_buf)

Request the log messages accumulated in the Test Agent local log buffer. Passed messages will be deleted from local log.

Parameters:

buf_length

Length of the transfer buffer.

transfer_buf

Pointer to the transfer buffer.

Length

of the filled part of the transfer buffer in bytes

static void ta_log_message_fast(unsigned int level, const char* user, const char* fmt, int argl1, ta_log_arg arg1, int argl2, ta_log_arg arg2, int argl3, ta_log_arg arg3, int argl4, ta_log_arg arg4, int argl5, ta_log_arg arg5, int argl6, ta_log_arg arg6, int argl7, ta_log_arg arg7, int argl8, ta_log_arg arg8, int argl9, ta_log_arg arg9, int argl10, ta_log_arg arg10, int argl11, ta_log_arg arg11, int argl12, ta_log_arg arg12, int argl13)

Log message (fast mode).

Parameters:

level

Log level

user

Arbitrary user name

fmt

Message format string

argl1..argl12

Auxiliary args containing information about appropriate arg

arg1..arg12

Arguments passed into the function according to message format string

argl13

Additional argument length to detect too many arguments condition

static void ta_log_timestamp(te_log_ts_sec* sec, te_log_ts_usec* usec)

Get timestamp for a log message.

Parameters:

sec

Location for seconds

usec

Location for microseconds

static int lgr_rb_init(struct lgr_rb* ring_buffer)

Initialize ring buffer.

Parameters:

ring_buffer

Ring buffer location.

0

Success.

-1

Failure.

static int lgr_rb_destroy(struct lgr_rb* ring_buffer)

Destroy ring buffer.

Parameters:

ring_buffer

Ring buffer location.

0

Success.

-1

Failure.

static uint32_t lgr_rb_remove_oldest(struct lgr_rb* ring_buffer)

Remove oldest message.

Parameters:

ring_buffer

Ring buffer location.

Unused

ring buffer elements.

static uint32_t lgr_rb_allocate_space(struct lgr_rb* ring_buffer, uint32_t nmbr, uint32_t* position)

Allocate ring buffer space for number elements.

Parameters:

ring_buffer

Ring buffer location.

nmbr

Number of elements need to be allocated.

position

Allocated space first element number.

Number

of allocated elements.

static uint32_t lgr_rb_allocate_head(struct lgr_rb* ring_buffer, uint32_t force, uint32_t* position)

Allocate ring buffer space for head element of message. If force flag is turn on and ring buffer does not have an unused space the oldest message will be removed to allocate new one.

Parameters:

ring_buffer

Ring buffer location.

force

Remove oldest message if unused space is absent.

position

Number of the first element of allocated space.

Number

of allocated elements.

static uint32_t lgr_rb_allocate_and_copy(struct lgr_rb* ring_buffer, const void* start, uint32_t length, uint8_t** arg_addr, bool add_zero)

Allocate ring buffer space and copy length bytes from start address. Only 256 bytes can be copied if ring buffer unused space is enough.

Parameters:

ring_buffer

Ring buffer location.

start

Byte array start address.

length

The length of the output (may be one byte longer than the input).

arg_addr

Argument address (memory dump address or string address).

add_zero

If true, a terminating zero byte is appended to the output buffer.

Number

of allocated elements.

static void lgr_rb_get_elements(struct lgr_rb* ring_buffer, uint32_t position, uint32_t length, uint8_t* destination)

Get ring buffer elements

Parameters:

ring_buffer

Ring buffer location.

position

Obtained element position.

length

Number of bytes need to be obtained.

destination

Destination location.

static const char* logger_server_name(void)

Discover name of the Logger IPC server

static const char* logger_ta_prefix(void)

Discover name of the Logger client for TA

static const char* logger_flush_name(void)

Discover name of the log flush client

void log_client_close(void)

Close IPC with Logger server and release resources.

Usually user should not worry about calling of the function, since it is called automatically using atexit() mechanism.

int log_flush_ten(const char* ta_name)

Pump out all log messages (only older than time of this procedure calling) accumulated into the Test Agent local log buffer/file and register it into the raw log file.

Parameters:

ta_name

  • the name of separate TA whose local log should be flushed

Returns:

Status code

static void log_message_va(te_log_msg_raw_data* out, const char* file, unsigned int line, te_log_ts_sec sec, te_log_ts_usec usec, unsigned int level, const char* entity, const char* user, const char* fmt, va_list ap)

Create log message and send to Logger server.

The rest of parameters complies with te_log_message_f prototype.

Parameters:

out

Output interface parameters

ap

Arguments passed into the function according to raw log format string description

static void log_message_int(te_log_msg_raw_data* out, const char* file, unsigned int line, unsigned int level, const char* entity, const char* user, const char* fmt, ...)

Internal function for logging. It has the same prototype as log_message().

It calls log_message_va(), therefore it may be called from log_message_va() just before exit.

te_errno logic_expr_eval(const logic_expr* parsed, logic_expr_get_val* get_val, void* cookie, logic_expr_res* res)

Evaluate logical expression tree.

Evaluation is not lazy.

Parameters:

parsed

Logical expression tree

get_val

Function to evaluate simple value nodes

cookie

Callback opaque data

res

Result

Returns:

Status code

te_errno logic_expr_parse(const char* str, logic_expr** expr)

Parse string-based logical expression.

Parameters:

str

String to be parsed

expr

Location for pointer to parsed expression

Returns:

Status code.

void logic_expr_free_res(logic_expr_res* res)

Free logical expression result.

Parameters:

res

Logical expression result

logic_expr* logic_expr_binary(logic_expr_type type, logic_expr* lhv, logic_expr* rhv)

Create binary logical expression.

Parameters:

type

AND or OR

lhv

Left hand value

rhv

Right hand value

Returns:

Pointer to allocated value or NULL.

void logic_expr_free_nr(logic_expr* expr)

Non-recursive free of logical expressions.

Parameters:

expr

Expression to be freed

void logic_expr_free(logic_expr* expr)

Free logical expression.

Parameters:

expr

Expression to be freed

logic_expr* logic_expr_dup(logic_expr* expr)

Duplicate logical expression.

Parameters:

expr

Expression to be duplicated

Returns:

Duplicate logical expression or NULL

int logic_expr_match(const logic_expr* re, const tqh_strings* set)

Is set of string match logical expression?

Parameters:

re

Logical expression

set

Set of strings

Returns:

Value characterizing degree of matching or -1 if there is no matching

int logic_expr_int_lex_destroy(void)

Destroy logical expressions lexer global context.

te_errno logic_expr_dnf(logic_expr** expr, int(*)(logic_expr*, logic_expr*) comp_func)

Transform logic expression into disjunctive normal form: || / && || / / && x && || / … / … y && … …

Parameters:

expr

Logical expression

comp_func

Function comparing logical expressions

Returns:

0 on success or error code

te_errno logic_expr_dnf_split(logic_expr* dnf, logic_expr*** array, int* size)

Split DNF in disjuncts, copy them to array.

Parameters:

dnf

DNF

array

Pointer to array of disjuncts to be set

size

Pointer to size of array to be set

Returns:

0 on success or error code

char* logic_expr_to_str(logic_expr* expr)

Get string representation of logical expression.

Parameters:

expr

logical expression

Returns:

String representation

int ndn_du_write_plain_int(asn_value* pdu, uint16_t tag, int32_t value)

Write integer “plain” value into specified Data-Unit field of NDS PDU.

Parameters:

pdu

ASN value with NDN PDU

tag

tag of Data-Unit field

value

new value to be written

Returns:

status code

int ndn_du_read_plain_int(const asn_value* pdu, uint16_t tag, int32_t* value)

Read integer “plain” value from specified Data-Unit field of NDS PDU.

Parameters:

pdu

ASN value with NDN PDU

tag

tag of Data-Unit field

value

location for read value (OUT)

Returns:

status code

int ndn_du_write_plain_string(asn_value* pdu, uint16_t tag, const char* value)

Write character string “plain” value into specified Data-Unit field of NDS PDU.

Parameters:

pdu

ASN value with NDN PDU

tag

tag of Data-Unit field

value

new value to be written

Returns:

status code

int ndn_du_read_plain_string(const asn_value* pdu, uint16_t tag, char** value)

Read character string “plain” value from specified Data-Unit field of NDS PDU. User have to free() got pointer.

Parameters:

pdu

ASN value with NDN PDU

tag

tag of Data-Unit field

value

place for pointer to read string (OUT)

Returns:

status code

int ndn_du_write_plain_oct(asn_value* pdu, uint16_t tag, const uint8_t* value, size_t len)

Write octet string “plain” value into specified Data-Unit field of NDS PDU.

Parameters:

pdu

ASN value with NDN PDU

tag

tag of Data-Unit field

value

new value to be written

len

length of data to be written

Returns:

status code

int ndn_du_read_plain_oct(const asn_value* pdu, uint16_t tag, uint8_t* value, size_t* len)

Read octet string “plain” value from specified Data-Unit field of NDS PDU.

Parameters:

pdu

ASN value with NDN PDU

tag

tag of Data-Unit field

value

location for read octet string (OUT)

len

length of buffer/read data (IN/OUT)

Returns:

status code

int ndn_match_data_units(const asn_value* pat, asn_value* pkt_pdu, const uint8_t* data, size_t d_len, const char* label)

Match data with DATA-UNIT pattern.

Parameters:

pat

ASN value with pattern PDU

pkt_pdu

ASN value with parsed packet PDU, may be NULL if parsed packet is not need (OUT)

data

binary data to be matched

d_len

length of data packet to be matched, in bytes

label

textual label of desired field, which should be DATA-UNIT{} type

Returns:

zero if matches, errno otherwise.

int ndn_match_mask(const asn_value* mask_pat, const uint8_t* data, size_t d_len)

Match data with mask pattern.

Parameters:

mask_pat

ASN value with mask pattern

data

binary data to be matched

d_len

length of data packet to be matched, in bytes

Returns:

zero if matches, errno otherwise.

int ndn_get_timestamp(const asn_value* packet, struct timeval* ts)

Get timestamp from received Raw-Packet

Parameters:

packet

ASN-value of Raw-Packet type.

ts

location for timestamp (OUT).

Returns:

zero on success or appropriate error code otherwise.

te_errno ndn_packet_to_template(const asn_value* pkt, asn_value** tmpl)

Convert received packet to the template to be sent.

Parameters:

pkt

ASN value with received packet.

tmpl

Location for ASN value with template.

Returns:

status code.

char* ndn_csap_stack_by_spec(const asn_value* csap_spec)

Produce CSAP spec. ID by means of parsing ASN.1 representation

CSAP spec. ID is allocated from heap and should be freed by the caller

Parameters:

csap_spec

ASN.1 CSAP spec.

Returns:

CSAP spec. ID string or NULL on failure

te_errno ndn_init_asn_value(asn_value** value, const asn_type* type)

Check ASN.1 value pointer. If it is NULL, initialize a new value of specified type. All errors are logged inside the function. There is no necessity to log them after call.

Todo Check that ASN.1 value belongs to type

Parameters:

value

Location of ASN.1 value pointer

type

ASN.1 type to which value should belong

Returns:

Status code.

te_errno ndn_csap_add_layer(asn_value** csap_spec, const asn_type* layer_type, const char* layer_choice, asn_value** layer_spec)

Add a new CSAP specification layer.

Parameters:

csap_spec

Location of ASN.1 value with CSAP specification (if NULL pointer is stored in location, a new CSAP specification is initialized)

layer_type

ASN.1 type of a new layer

layer_choice

String name of a new layer as ASN.1 choice (including ‘#’, e.g. “#eth”)

layer_spec

Location for a new ASN.1 value with layer specification (may be NULL)

Returns:

Status code.

asn_value* ndn_csap_spec_by_traffic_template(const asn_value* tmpl)

Create empty CSAP spec by template. User have to asn_free_value() got pointer.

Parameters:

tmpl

Location for ASN value with template.

Returns:

CSAP spec on success, otherwise NULL is returned on error.

te_errno ndn_arp_packet_to_plain(const asn_value* pkt, ndn_arp_header_plain* arp_header)

Convert ARP-Header ASN value to plain C structure.

Parameters:

pkt

ASN value of type ARP-Header or Generic-PDU with choice “arp”

arp_header

Location for converted structure (OUT)

Returns:

Zero on success or error code.

asn_value* ndn_arp_plain_to_packet(const ndn_arp_header_plain* arp_header)

Convert plain C structure to ARP-Header ASN value.

Parameters:

arp_header

Structure to be converted

Returns:

Pointer to new ASN value object or NULL.

int ndn_bpdu_asn_to_plain(const asn_value* pkt, ndn_stp_bpdu_t* bpdu)

Convert Bridge STP PDU ASN value to plain C structure.

Parameters:

pkt

ASN value of type Bridge-PDU or Generic-PDU with choice “bridge”.

bpdu

converted structure (OUT).

Returns:

zero on success or error code.

asn_value* ndn_bpdu_plain_to_asn(const ndn_stp_bpdu_t* bpdu)

Convert plain C structure with Bridge STP PDU to respective ASN value.

Parameters:

bpdu

  • structure to be converted.

pointer

to created ASN value on success.

NULL

on memory allocation error.

int ndn_eth_packet_to_plain(const asn_value* pkt, ndn_eth_header_plain* eth_header)

Convert Ethernet-Header ASN value to plain C structure.

Parameters:

pkt

ASN value of type Ethernet Header or Generic-PDU with choice “eth”.

eth_header

location for converted structure (OUT).

Returns:

zero on success or error code.

asn_value* ndn_eth_plain_to_packet(const ndn_eth_header_plain* eth_header)

Convert plain C structure to Ethernet-Header ASN value.

Parameters:

eth_header

structure to be converted.

Returns:

pointer to new ASN value object or NULL.

int ndn_forw_action_asn_to_plain(const asn_value* val, ndn_forw_action_plain* forw_action)

Convert Forwarder-Action ASN value to plain C structure.

Parameters:

val

ASN value of type

forw_action

converted structure (OUT).

Returns:

zero on success or error code.

int ndn_forw_action_plain_to_asn(const ndn_forw_action_plain* forw_action, asn_value** val)

Convert plain C structure to Forwarder-Action ASN value.

Parameters:

forw_action

converted structure.

val

location for pointer to ASN value of type (OUT)

Returns:

zero on success or error code.

int asn2bin_data(asn_value* segment_data, uint8_t* data, uint32_t* data_len)

Convert asn representation of iSCSI Segment Data to binary data

Parameters:

segment_data

asn representation of iSCSI Segment Data

data

buffer to contain result of conversion

data_len

IN - length of buffer OUT - length of binary data - result of conversion

Returns:

Status code

int bin_data2asn(uint8_t* data, uint32_t data_len, asn_value** value)

Convert iSCSI Segment Data represented as binary data to asn representation

Parameters:

data

binary data

data_len

binary data length

segment_data

location for result of conversion

Returns:

Status code

size_t iscsi_rest_data_len(uint8_t* bhs, iscsi_digest_type header_digest, iscsi_digest_type data_digest)

Calculate extra (non-BHS) length of iSCSI PDU.

Parameters:

bhs

Pointer to iSCSI PDU begin

header_digest

HeaderDigest type

data_digest

DataDigest type

Returns:

Number of bytes rest in PDU

te_errno ndn_rte_flow_read_with_offset(const asn_value* pdu, const char* name, size_t size, uint32_t offset, uint32_t* spec_p, uint32_t* mask_p, uint32_t* last_p)

Get values of spec, mask and last of requested field with specified name based on size of the value (in bits) and offset of the value (in bits)

Parameters:

pdu

ASN.1 value

name

Name of the field

size

Size of the requested filed

offset

Offset of the requested filed

spec_p

Pointer to the spec

mask_p

Pointer to the mask

last_p

Pointer to the last

Returns:

Status code

const char* ndn_snmp_msg_type_h2str(ndn_snmp_msg_t msg_type)

Converse NDN SNMP Message types from numeric to string format

Parameters:

msg_type

Message type in numeric format

Returns:

Message type in string format

typedef LIST_HEAD(netconf_route_nexthops, netconf_route_nexthop)

List head type for list of netconf_route_nexthop.

const char* netconf_nla_type2str(netconf_nla_type nla_type)

Get string name of netlink attribute type.

Parameters:

nla_type

Attribute type

Returns:

Pointer to statically allocated string with attribute name.

void netconf_devlink_param_value_data_mv(netconf_nla_type nla_type, netconf_devlink_param_value_data* dst, netconf_devlink_param_value_data* src)

Move parameter value data from one structure to another one. This function releases memory allocated for old value if necessary.

Parameters:

nla_type

Parameter type

dst

Destination structure

src

Source structure

const char* devlink_param_cmode_netconf2str(netconf_devlink_param_cmode cmode)

Get string name of device parameter configuration mode.

Parameters:

cmode

Configuration mode

Returns:

Pointer to statically allocated string.

netconf_devlink_param_cmode devlink_param_cmode_str2netconf(const char* cmode)

Parse name of device parameter configuration mode.

Parameters:

cmode

Name to parse

Returns:

One of the values from netconf_devlink_param_cmode.

const char* netconf_devlink_eswitch_mode_netconf2str(netconf_devlink_eswitch_mode mode)

Get string name of device eswitch mode.

Parameters:

mode

Eswitch mode.

Returns:

Pointer to statically allocated string.

netconf_devlink_eswitch_mode netconf_devlink_eswitch_mode_str2netconf(const char* mode)

Parse name of device eswitch mode.

Parameters:

mode

Name to parse.

Returns:

One of the values from netconf_devlink_eswitch_mode.

int netconf_open(netconf_handle* nh, int netlink_family)

Open the netconf session and get handle of it on success. This function should be called before any other in this library.

Parameters:

nh

Address to store netconf session handle

netlink_family

Netlink family to use

Returns:

0 on success, -1 on error (check errno for details).

netconf_list* netconf_link_dump(netconf_handle nh)

Get list of all network devices. Free it with netconf_list_free() function.

Parameters:

nh

Netconf session handle

Returns:

List, or NULL in case of error (check errno for details).

te_errno netconf_link_set_ns(netconf_handle nh, const char* ifname, int32_t fd, pid_t pid)

Move interface to a network namespace.

Parameters:

nh

Netconf handle.

ifname

Interface name.

fd

File descriptor belongs to a network namespace or -1 to choose namespace using pid.

pid

Process identifier in the target namespace.

Returns:

Status code

void netconf_net_addr_init(netconf_net_addr* net_addr)

Set default values to fields in network address struct.

Parameters:

net_addr

Network address struct

int netconf_net_addr_modify(netconf_handle nh, netconf_cmd cmd, const netconf_net_addr* net_addr)

Modify some network address. You should call netconf_net_addr_init() on struct before. The only required fields to set is address and ifindex.

Parameters:

nh

Netconf session handle

cmd

Action to do

net_addr

Network address to modify

Returns:

0 on success, -1 on error (check errno for details).

netconf_list* netconf_net_addr_dump(netconf_handle nh, unsigned char family)

Get list of all network addresses. Free it with netconf_list_free() function.

Parameters:

nh

Netconf session handle

family

Address type to filter list (or AF_UNSPEC to get both)

Returns:

List, or NULL in case of error (check errno for details).

void netconf_route_init(netconf_route* route)

Set default values to fields in route struct.

Parameters:

route

Route entry struct

See also:

netconf_route_clean

void netconf_route_clean(netconf_route* route)

Release memory allocated for netconf_route fields.

Parameters:

route

Pointer to netconf_route.

See also:

netconf_route_init

int netconf_route_modify(netconf_handle nh, netconf_cmd cmd, const netconf_route* route)

Modify some route. You should call netconf_route_init() on struct before.

Parameters:

nh

Netconf session handle

cmd

Action to do

route

Route to modify

Returns:

0 on success, -1 on error (check errno for details).

netconf_list* netconf_route_dump(netconf_handle nh, unsigned char family)

Get list of all routes. Free it with netconf_list_free() function.

Parameters:

nh

Netconf session handle

family

Address type to filter list (or AF_UNSPEC to get both)

Returns:

List, or NULL in case of error (check errno for details).

netconf_list* netconf_route_get_entry_for_addr(netconf_handle nh, const struct sockaddr* dst_addr)

Get list with routing table entry for specified destination address.

Parameters:

nh

Netconf session handle.

dst_addr

Destination address, now only IPv4 is supported.

Returns:

List, or NULL in case of error (check errno for details).

int netconf_route_get_src_addr_and_iface(netconf_handle nh, const struct sockaddr* dst_addr, const struct sockaddr* src_addr, char* ifname)

Get source address and interface for specified destination address.

Parameters:

nh

Netconf session handle

dst_addr

Destination address

src_addr

Source address (OUT)

ifname

Source interface. Must be at least IF_NAMESIZE. (OUT)

Returns:

Status code

void netconf_rule_init(netconf_rule* rule)

Set default values to fields in rule struct.

Parameters:

rule

Rule entry struct

netconf_list* netconf_rule_dump(netconf_handle nh, unsigned char family)

Get list of all rules. Free it with netconf_list_free() function.

Parameters:

nh

Netconf session handle

family

Address type to filter list (or AF_UNSPEC to get both)

Returns:

List, or NULL in case of error (check errno for details).

te_errno netconf_rule_modify(netconf_handle nh, netconf_cmd cmd, const netconf_rule* rule)

Modify some rule. You should call netconf_rule_init() on struct before.

Parameters:

nh

Netconf session handle

cmd

Action to do

rule

Rule to modify

Returns:

Status code.

void netconf_neigh_init(netconf_neigh* neigh)

Set default values to fields in neighbour struct.

Parameters:

neigh

Neighbour entry struct

int netconf_neigh_modify(netconf_handle nh, netconf_cmd cmd, const netconf_neigh* neigh)

Modify some neighbour table entry. You should call netconf_neigh_init() on struct before. The only required fields to set is dst and ifindex.

Parameters:

nh

Netconf session handle

cmd

Action to do

neigh

Neighbour table entry to modify

Returns:

0 on success, -1 on error (check errno for details).

netconf_list* netconf_neigh_dump(netconf_handle nh, unsigned char family)

Get list of all neighbour table entries. Free it with netconf_list_free() function.

Parameters:

nh

Netconf session handle

family

Address type to filter list (or AF_UNSPEC to get both)

Returns:

List, or NULL in case of error (check errno for details).

void netconf_list_filter(netconf_list* list, netconf_node_filter_t filter, void* user_data)

Filter list with custom filter function. This function calls callback on every node at the list. If it returns false, delete that node, else save.

Parameters:

list

List to filter

filter

Filter function

user_data

Data passed to callback

void netconf_list_free(netconf_list* list)

Free resources used by some netconf list. The list handle is invalid after call of this.

Parameters:

list

List to free

void netconf_close(netconf_handle nh)

Close the session and free any resources used by it.

Parameters:

nh

Netconf session handle

netconf_list* netconf_net_addr_dump_iface(netconf_handle nh, unsigned char family, int ifindex)

Get list of all network addresses on specified interface. Free it with netconf_net_addr_free() function.

Parameters:

nh

Netconf session handle

family

Address type to filter list (or AF_UNSPEC to get both)

ifindex

Interface index to filter with

Returns:

List, or NULL in case of error (check errno for details).

netconf_list* netconf_net_addr_dump_primary(netconf_handle nh, unsigned char family, bool primary)

Get list of all primary/secondary network addresses. Free it with netconf_net_addr_free() function.

Parameters:

nh

Netconf session handle

family

Address type to filter list (or AF_UNSPEC to get both)

primary

true to get primary addresses, false - secondary

Returns:

List, or NULL in case of error (check errno for details).

te_errno netconf_macvlan_modify(netconf_handle nh, netconf_cmd cmd, const char* link, const char* ifname, const char* mode_str)

Add or delete MAC VLAN interface or change mode of existing interface.

Parameters:

nh

Netconf session handle

cmd

Action to do

link

Link (main) interface name

ifname

MAC VLAN interface name

mode_str

MAC VLAN mode

Returns:

Status code

te_errno netconf_macvlan_list(netconf_handle nh, const char* link, char** list)

Get MAC VLAN interfaces list on link.

Parameters:

nh

Netconf session handle

link

Link (main) interface name

list

Space separated list of MAC VLAN interfaces names

Returns:

Status code

te_errno netconf_macvlan_get_mode(netconf_handle nh, const char* ifname, const char** mode_str)

Get MAC VLAN interface mode.

Parameters:

nh

Netconf session handle

ifname

MAC VLAN interface name

mode_str

Pointer to the MAC VLAN mode string

Returns:

Status code

te_errno netconf_ipvlan_modify(netconf_handle nh, netconf_cmd cmd, const char* link, const char* ifname, uint16_t mode, uint16_t flag)

Add or delete IP VLAN interface or change mode of existing interface.

Parameters:

nh

Netconf session handle

cmd

Action to do

link

Link (main) interface name

ifname

IP VLAN interface name

mode

IP VLAN mode

flag

IP VLAN flag

Returns:

Status code

te_errno netconf_ipvlan_list(netconf_handle nh, const char* link, char** list)

Get IP VLAN interfaces list on link.

Parameters:

nh

Netconf session handle

link

Link (main) interface name

list

Space separated list of IP VLAN interfaces names

Returns:

Status code

te_errno netconf_ipvlan_get_mode(netconf_handle nh, const char* ifname, uint32_t* mode, uint32_t* flag)

Get IP VLAN interface mode.

Parameters:

nh

Netconf session handle

ifname

IP VLAN interface name

mode

Pointer to the IP VLAN mode

flag

Pointer to the IP VLAN flag

Returns:

Status code

te_errno netconf_vlan_modify(netconf_handle nh, netconf_cmd cmd, const char* link, const char* ifname, unsigned int vid)

Add or delete VLAN interface.

Parameters:

nh

Netconf session handle

cmd

Action to do

link

Link (main) interface name

ifname

VLAN interface name (may be NULL or empty)

vid

VLAN ID

Returns:

Status code

te_errno netconf_vlan_list(netconf_handle nh, const char* link, char** list)

Get VLAN interfaces list on link.

Parameters:

nh

Netconf session handle

link

Link (main) interface name

list

Space separated list of VLAN interfaces IDs

Returns:

Status code

te_errno netconf_vlan_get_ifname(netconf_handle nh, const char* link, unsigned int vid, char* ifname, size_t len)

Get name of a VLAN interface by its VLAN ID.

Parameters:

nh

Netconf session handle

link

Link (main) interface name

vid

VLAN ID

ifname

Where to save VLAN interface name

len

Length of ifname buffer.

Returns:

Status code

te_errno netconf_veth_add(netconf_handle nh, const char* ifname, const char* peer)

Add new veth interface.

Parameters:

nh

Netconf session handle

ifname

The interface name

peer

The peer interface name

Returns:

Status code.

te_errno netconf_veth_del(netconf_handle nh, const char* ifname)

Delete a veth interface.

Parameters:

nh

Netconf session handle

ifname

The interface name

Returns:

Status code.

te_errno netconf_veth_get_peer(netconf_handle nh, const char* ifname, char* peer, size_t peer_len)

Get a veth peer interface.

Parameters:

nh

Netconf session handle

ifname

The veth interface name

peer

Buffer to save the peer interface name

peer_len

peer buffer length

Returns:

Status code.

te_errno netconf_veth_list(netconf_handle nh, netconf_veth_list_filter_func filter_cb, void* filter_opaque, char** list)

Get veth interfaces list.

Parameters:

nh

Netconf session handle

filter_cb

Filtering callback function or NULL

filter_opaque

Opaque data to pass to the filtering function

list

Space-separated interfaces list (allocated from the heap)

Returns:

Status code.

te_errno netconf_udp_tunnel_del(netconf_handle nh, const char* ifname)

Delete a UDP Tunnel interface.

Parameters:

nh

Netconf session handle

ifname

The interface name

Returns:

Status code.

te_errno netconf_udp_tunnel_list(netconf_handle nh, netconf_udp_tunnel_list_filter_func filter_cb, void* filter_opaque, char** list, char* link_kind)

Get UDP Tunnel interfaces list.

Parameters:

nh

Netconf session handle

filter_cb

Filtering callback function or NULL

filter_opaque

Opaque data to pass to the filtering function

list

Space-separated interfaces list (allocated from the heap)

link_kind

Link kind name to specify behavior

Returns:

Status code.

te_errno netconf_geneve_add(netconf_handle nh, const netconf_geneve* geneve)

Add new Geneve interface.

Parameters:

nh

Netconf session handle

ifname

The interface name

Returns:

Status code.

te_errno netconf_geneve_list(netconf_handle nh, netconf_udp_tunnel_list_filter_func filter_cb, void* filter_opaque, char** list)

Get Geneve interfaces list.

Parameters:

nh

Netconf session handle

filter_cb

Filtering callback function or NULL

filter_opaque

Opaque data to pass to the filtering function

list

Space-separated interfaces list (allocated from the heap)

Returns:

Status code.

te_errno netconf_vxlan_add(netconf_handle nh, const netconf_vxlan* vxlan)

Add new VXLAN interface.

Parameters:

nh

Netconf session handle

ifname

The interface name

Returns:

Status code.

te_errno netconf_vxlan_list(netconf_handle nh, netconf_udp_tunnel_list_filter_func filter_cb, void* filter_opaque, char** list)

Get VXLAN interfaces list.

Parameters:

nh

Netconf session handle

filter_cb

Filtering callback function or NULL

filter_opaque

Opaque data to pass to the filtering function

list

Space-separated interfaces list (allocated from the heap)

Returns:

Status code.

te_errno netconf_bridge_add(netconf_handle nh, const char* ifname)

Add new bridge interface.

Parameters:

nh

Netconf session handle

ifname

The interface name

Returns:

Status code.

te_errno netconf_bridge_del(netconf_handle nh, const char* ifname)

Delete a bridge interface.

Parameters:

nh

Netconf session handle

ifname

The interface name

Returns:

Status code.

te_errno netconf_bridge_list(netconf_handle nh, netconf_bridge_list_filter_func filter_cb, void* filter_opaque, char** list)

Get bridge interfaces list.

Parameters:

nh

Netconf session handle

filter_cb

Filtering callback function or NULL

filter_opaque

Opaque data to pass to the filtering function

list

Space-separated interfaces list (allocated from the heap)

Returns:

Status code.

te_errno netconf_port_list(netconf_handle nh, const char* brname, netconf_port_list_filter_func filter_cb, void* filter_opaque, char** list)

Get port interfaces list.

Parameters:

nh

Netconf session handle

brname

The bridge name

filter_cb

Filtering callback function or NULL

filter_opaque

Opaque data to pass to the filtering function

list

Space-separated interfaces list (allocated from the heap)

Returns:

Status code.

te_errno netconf_port_add(netconf_handle nh, const char* brname, const char* ifname)

Add new bridge port interface.

Parameters:

nh

Netconf session handle

brname

The bridge interface name

ifname

The interface name

Returns:

Status code.

te_errno netconf_port_del(netconf_handle nh, const char* ifname)

Delete a bridge port interface.

Parameters:

nh

Netconf session handle

ifname

The interface name

Returns:

Status code.

te_errno netconf_devlink_get_info(netconf_handle nh, const char* bus, const char* dev, netconf_list** list)

Get device infomation from devlink.

bus and dev should be either both NULL (to retrieve information about all devices) or not NULL (to retrieve information about specific device).

Parameters:

nh

Netconf session handle

bus

Bus name

dev

Device name (PCI address for PCI device)

list

Where to save pointer to the list of retrieved device data (caller should release it)

Returns:

Status code.

te_errno netconf_devlink_get_eswitch(netconf_handle nh, const char* bus, const char* dev, netconf_list** list)

Get device eswitch information from devlink.

bus and dev should be either both NULL (to retrieve information about all devices) or not NULL (to retrieve information about specific device).

Parameters:

nh

Netconf session handle.

bus

Bus name.

dev

Device name (PCI address for PCI device).

list

Where to save pointer to the list of retrieved device data (caller should release it).

Returns:

Status code.

te_errno netconf_devlink_eswitch_mode_set(netconf_handle nh, const char* bus, const char* dev, netconf_devlink_eswitch_mode mode)

Set eswitch mode for a device via devlink.

Parameters:

nh

Netconf session handle.

bus

Bus name.

dev

Device name (PCI address for PCI device).

mode

Eswitch mode to set.

Returns:

Status code.

te_errno netconf_devlink_param_dump(netconf_handle nh, netconf_list** list)

Get list of supported device parameters from devlink.

Parameters:

nh

Netconf session handle

list

Where to save pointer to the list of retrieved device parameters (caller should release it)

Returns:

Status code.

te_errno netconf_devlink_param_set(netconf_handle nh, const char* bus, const char* dev, const char* param_name, netconf_nla_type nla_type, netconf_devlink_param_cmode cmode, const netconf_devlink_param_value_data* value)

Set value for a device parameter in some configuration mode via devlink.

Parameters:

nh

Netconf session handle

bus

Bus name

dev

Device name (PCI address for PCI device)

param_name

Parameter name

nla_type

Parameter type

cmode

Configuration mode in which to set value

value

Value to set

Returns:

Status code.

uint16_t netconf_cmd_to_flags(netconf_cmd cmd)

Get nlmsghdr flags to set depending on command.

Parameters:

cmd

Action to do

Returns:

Set of flags.

netconf_list* netconf_dump_request(netconf_handle nh, uint16_t type, unsigned char family, netconf_recv_cb_t* recv_cb, void* cookie)

Handle dump request.

Parameters:

nh

Netconf handle

type

Type of dump as in nlmsg_type field

family

Address family to dump

recv_cb

Handler of one response entity

cookie

Parameters for recv_cb

Returns:

List of information nodes, or NULL in case of error.

int netconf_list_extend(netconf_list* list, netconf_node_type type)

Extend list by one node. The node data is filled with zeroes.

Parameters:

list

Netconf list

type

Type of new node

Returns:

0 on success, -1 on error.

te_errno netconf_append_attr(char* req, size_t max_len, uint16_t attr_type, const void* data, size_t len)

Append generic attribute structure (struct nlattr) to the end of netlink message, update length in its header.

Parameters:

req

Netlink message

max_len

Maximum length available for the message

attr_type

Attribute type

data

Data stored in attribute

len

Length of the data

Returns:

Status code.

te_errno netconf_get_str_attr(struct nlattr* na, char** value)

Get string value from netlink attribute.

Parameters:

na

Pointer to the attribute

value

Where to save the value (dynamically allocated null-terminated string which the caller should release)

Returns:

Status code.

te_errno netconf_get_uint8_attr(struct nlattr* na, uint8_t* value)

Get uint8_t value from netlink attribute.

Parameters:

na

Pointer to the attribute

value

Where to save obtained value

Returns:

Status code.

te_errno netconf_get_uint16_attr(struct nlattr* na, uint16_t* value)

Get uint16_t value from netlink attribute.

Parameters:

na

Pointer to the attribute

value

Where to save obtained value

Returns:

Status code.

te_errno netconf_get_uint32_attr(struct nlattr* na, uint32_t* value)

Get uint32_t value from netlink attribute.

Parameters:

na

Pointer to the attribute

value

Where to save obtained value

Returns:

Status code.

te_errno netconf_get_uint64_attr(struct nlattr* na, uint64_t* value)

Get uint64_t value from netlink attribute.

Parameters:

na

Pointer to the attribute

value

Where to save obtained value

Returns:

Status code.

void netconf_append_rta(struct nlmsghdr* h, const void* data, int len, unsigned short rta_type)

Append routing attribute to existing nlmsg. There should be enough memory after the message.

Parameters:

h

Header of message

data

Data of rtattr

len

Length of data

rta_type

Type of rtattr

void netconf_append_rta_nested(struct nlmsghdr* h, unsigned short rta_type, struct rtattr** rta)

Append a nested attribute.

Parameters:

h

Header of message

rta_type

Type of rtattr

rta

Pointer to rtattr pointer

void netconf_append_rta_nested_end(struct nlmsghdr* h, struct rtattr* rta)

Finalise appending of a nested attribute.

Parameters:

h

Header of message

rta

Pointer to the nested attribute

void netconf_parse_rtattr(struct rtattr* rta, int len, struct rtattr** rta_arr, int max)

Parse attributes message.

Parameters:

rta

Pointer to the first attribute in the message

len

The message length

rta_arr

Sorted attributes pointers array

max

Maximum index of the array

void netconf_parse_rtattr_nested(struct rtattr* rta, struct rtattr** rta_arr, int max)

Parse attributes message.

Parameters:

rta

Pointer to the first attribute in the message

len

The message length

rta_arr

Sorted attributes pointers array

max

Maximum index of the array

uint32_t netconf_get_rta_u32(struct rtattr* rta)

Get u32 value from data of attribute rta.

void* netconf_dup_rta(const struct rtattr* rta)

Duplicate a data of rtattr. The memory is allocated using malloc().

Parameters:

rta

Routing attribute

Returns:

Address of duplicated data, or NULL in case of error.

void* netconf_bytes2str_rta(const struct rtattr* rta)

Duplicate data of rtattr, transforming raw bytes into a readable lowercase hex string.

Parameters:

rta

Routing atribute.

Returns:

Address of duplicated data, or NULL in case of error.

te_errno netconf_process_attrs(void* first_attr, size_t attrs_size, netconf_attr_cb cb, void* cb_data)

Process netlink attributes.

Parameters:

first_attr

Pointer to the first attribute

attrs_size

Total number of bytes occupied by attributes

cb

Callback to which pointer to every attribute is passed

cb_data

User data passed to the callback

Returns:

Status code.

te_errno netconf_process_hdr_attrs(struct nlmsghdr* h, size_t hdr_len, netconf_attr_cb cb, void* cb_data)

Wrapper over netconf_process_attrs() which assumes that attributes are placed immediately after some header in netlink message.

Parameters:

h

Pointer to the main header of the netlink message

hdr_len

Length of the additional header (not the main header)

cb

Callback to which pointer to every attribute is passed

cb_data

User data passed to the callback

Returns:

Status code.

te_errno netconf_process_nested_attrs(struct nlattr* na_parent, netconf_attr_cb cb, void* cb_data)

Wrapper over netconf_process_attrs() which assumes that parsed attributes are nested inside another attribute.

Parameters:

na_parent

Parent attribute

cb

Callback to which pointer to every attribute is passed

cb_data

User data passed to the callback

Returns:

Status code.

void netconf_link_node_free(netconf_node* node)

Free memory used by node of network interface type.

Parameters:

node

Node to free

void netconf_net_addr_node_free(netconf_node* node)

Free memory used by node of network address type.

Parameters:

node

Node to free

void netconf_route_node_free(netconf_node* node)

Free memory used by node of route type.

Parameters:

node

Node to free

void netconf_neigh_node_free(netconf_node* node)

Free memory used by node of neighbour type.

Parameters:

node

Node to free

void netconf_rule_node_free(netconf_node* node)

Free memory used by node of rule type.

Parameters:

node

Node to free

void netconf_macvlan_node_free(netconf_node* node)

Free memory used by node of MAC VLAN type.

Parameters:

node

Node to free

void netconf_ipvlan_node_free(netconf_node* node)

Free memory used by node of IP VLAN type.

Parameters:

node

Node to free

void netconf_vlan_node_free(netconf_node* node)

Free memory used by node of VLAN type.

Parameters:

node

Node to free

void netconf_veth_node_free(netconf_node* node)

Free memory used by a veth node.

Parameters:

node

Node to free

void netconf_udp_tunnel_free(netconf_udp_tunnel* udp_tunnel)

Free memory used by a generic UDP Tunnel struct.

Parameters:

node

Struct to free

void netconf_geneve_node_free(netconf_node* node)

Free memory used by a Geneve node.

Parameters:

node

Node to free

void netconf_vxlan_node_free(netconf_node* node)

Free memory used by a VXLAN node.

Parameters:

node

Node to free

void netconf_bridge_node_free(netconf_node* node)

Free memory used by a bridge node.

Parameters:

node

Node to free

void netconf_port_node_free(netconf_node* node)

Free memory used by a bridge port node.

Parameters:

node

Node to free

void netconf_devlink_info_node_free(netconf_node* node)

Free memory used by a devlink device information node.

Parameters:

node

Node to free

void netconf_devlink_param_node_free(netconf_node* node)

Free memory used by a devlink device parameter node.

Parameters:

node

Node to free

int netconf_talk(netconf_handle nh, void* req, int len, netconf_recv_cb_t* recv_cb, void* cookie, netconf_list* list)

Send request to kernel and receive response.

Parameters:

nh

Neconf handle

req

Request data

len

Request length

recv_cb

Handler of one response entity

cookie

Parameters for recv_cb

list

Argument of callback

void netconf_init_nlmsghdr(char* req, netconf_handle nh, uint16_t nlmsg_type, uint16_t nlmsg_flags, struct nlmsghdr** hdr)

Initialize hdr.

Parameters:

req

Request buffer

nh

Netconf session handle

nlmsg_type

Netlink message type

nlmsg_flags

Netlink message flags

hdr

Pointer to the netlink message header

void netconf_parse_link(struct nlmsghdr* h, struct rtattr** rta_arr, int max)

Parse the general link attribute.

Parameters:

nh

Netconf session handle

rta_arr

Sorted attributes pointers array

max

Maximum index of the array

Get Generic Netlink family ID. The same module can have different IDs on different hosts, so it is required to obtain its family ID before accessing it via Generic Netlink.

Parameters:

nh

Netconf handle

family_name

Family name

family_id

Where to save requested family ID

Returns:

Status code.

Process attributes of Generic Netlink message.

Parameters:

h

Pointer to message header

cb

Callback for processing attributes

cb_data

User data passed to the callback

Returns:

Status code.

Initialize headers for Generic Netlink message.

Parameters:

req

Pointer to the buffer where to initialize headers

max_len

Maximum space available in the buffer

nlmsg_type

Message type (usually netlink family ID is passed here)

nlmsg_flags

Netlink flags

cmd

Command ID

version

Family-specific version

nh

Netconf handle

Returns:

Status code.

int rcf_pch_vread(struct rcf_comm_connection* conn, char* cbuf, size_t buflen, size_t answer_plen, rcf_var_type_t type, const char* var)

Default vread command handler.

Parameters:

conn

connection handle

cbuf

command buffer

buflen

length of the command buffer

answer_plen

number of bytes to be copied from the command to answer

type

variable type

var

variable name

Returns:

0 or error returned by communication library

int rcf_pch_vwrite(struct rcf_comm_connection* conn, char* cbuf, size_t buflen, size_t answer_plen, rcf_var_type_t type, const char* var, ...)

Default vwrite command handler.

Parameters:

conn

connection handle

cbuf

command buffer

buflen

length of the command buffer

answer_plen

number of bytes to be copied from the command to answer

type

variable type

var

variable name

value

Returns:

0 or error returned by communication library

void rcf_pch_cfg_init(void)

Initialize RCF PCH configuration tree support.

int rcf_pch_configure(struct rcf_comm_connection* conn, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, rcf_ch_cfg_op_t op, const char* oid, const char* val)

Default configure command handler.

Parameters:

conn

connection handle

cbuf

command buffer

buflen

length of the command buffer

answer_plen

number of bytes in the command buffer to be copied to the answer

ba

pointer to location of binary attachment in the command buffer or NULL if no binary attachment is provided

cmdlen

full length of the command including binary attachment

op

configure operation

oid

object instance identifier or NULL

val

object instance value or NULL

Returns:

0 or error returned by communication library

te_errno rcf_pch_agent_list(unsigned int gid, const char* oid, const char* sub_id, char** list)

Default implementation of agent list accessor. This function complies with rcf_ch_cfg_list prototype.

Parameters:

gid

group identifier

oid

full parent object instance identifier

sub_id

ID of the object to be listed

list

(OUT) location for pointer to string with space separated list (should be allocated using malloc())

0

success

TE_ENOMEM

memory allocation failure

int rcf_pch_file(struct rcf_comm_connection* conn, char* cbuf, size_t buflen, size_t answer_plen, const uint8_t* ba, size_t cmdlen, rcf_op_t op, const char* filename)

Default file processing handler.

Parameters:

conn

connection handle

cbuf

command buffer

buflen

length of the command buffer

answer_plen

number of bytes in the command buffer to be copied to the answer

ba

pointer to location of binary attachment in the command buffer or NULL if no binary attachment is provided

cmdlen

full length of the command including binary attachment

op

if true, file should be put

filename

full name of the file in TA or NUT file system

Returns:

0 or error returned by communication library

int rcf_pch_call(struct rcf_comm_connection* conn, char* cbuf, size_t buflen, size_t answer_plen, const char* rtn, bool is_argv, int argc, void** params)

Default routine call handler.

Parameters:

conn

connection handle

cbuf

command buffer

buflen

length of the command buffer

answer_plen

number of bytes in the command buffer to be copied to the answer

rtn

routine entry point name

is_argv

if true, then routine prototype is (int argc, char **argv)

argc

number of arguments

params

pointer to array of RCF_MAX_PARAMS length with routine arguments

Returns:

0 or error returned by communication library

int rcf_pch_rpc(struct rcf_comm_connection* conn, int sid, const char* data, size_t len, const char* server, uint32_t timeout)

RPC handler.

Parameters:

conn

connection handle

sid

session identifier

data

pointer to data in the command buffer

len

length of encoded data

server

RPC server name

timeout

timeout in seconds or 0 for unlimited

Returns:

0 or error returned by communication library

void rcf_pch_rpc_atfork(void)

Cleanup RCF RPC server structures. Close all sockets. Release all allocated memory. Do NOT kill any RPC servers.

This function is intended to be used after fork in child process to release all resources allocated by RCF PCH RPC support.

void rcf_pch_rpc_shutdown(void)

Cleanup RCF RPC server structures.

const char* rcf_pch_rpc_get_provider(void)

Get the name of RCF RPC provider application

void write_str_in_quotes(char* dst, const char* src, size_t len)

Write string to the answer buffer (inserting ‘' before ‘”’) in double quotes.

Parameters:

dst

pointer in the answer buffer where string should be placed

src

string to be written to

len

maximum number of symbols to be copied

struct rpcserver* rcf_pch_find_rpcserver(const char* name)

Find the RPC server with specified name.

Parameters:

name

The name of RPC server

Returns:

RPC server handle or NULL

struct rpcserver* rcf_pch_rpcserver_first(void)

Get the first element of RPC server list.

Returns:

the first RPC server from list of RPC servers

struct rpcserver* rcf_pch_rpcserver_next(struct rpcserver* rpcs)

Get the next element of RPC server list from current RPC server.

Parameters:

rpcs

current RPC server

Returns:

the next RPC server from current RPC server or NULL

const char* rcf_pch_rpcserver_get_name(const struct rpcserver* rpcs)

Get the name of RPC server.

Parameters:

rpcs

RPC server

Returns:

the name of RPC server

void rcf_pch_rpcserver_plugin_init(pthread_mutex_t* rcf_pch_lock, rcf_pch_rpc_call rcf_pch_call)

Add the node rpcserver_plugin in configuration tree, initialize the mutex and the RPC call.

Parameters:

rcf_pch_lock

Lock for protect RPC servers and plugins list

rcf_pch_call

Function which helps to call the RPC functions

void rcf_pch_rpcserver_plugin_enable(struct rpcserver* rpcs)

Find the RPC server plugin corresponding to RPC server rcps and enable it.

Parameters:

rpcs

RPC server

void rcf_pch_rpcserver_plugin_disable(struct rpcserver* rpcs)

Find the RPC server plugin corresponding to RPC server rcps and disable it.

Parameters:

rpcs

RPC server

void ta_obj_cleanup(void)

Release all the objects which are still marked as being in use.

int ta_obj_attr_set(ta_cfg_obj_t* obj, const char* name, const char* value)

Set (or add if there is no such attribute) specified value to the particular attribute.

Parameters:

obj

Object where to update attribute list

name

Attribute name to update (or to add)

value

Attribute value

Returns:

Error code or 0

ta_cfg_obj_attr_t* ta_obj_attr_find(ta_cfg_obj_t* obj, const char* name)

Find specified attribute in object.

Parameters:

obj

Object where we want to find an attribute

name

Attribute name

Returns:

Pointer to the attribute if found, and NULL otherwise

void ta_obj_free(ta_cfg_obj_t* obj)

Free object.

Parameters:

obj

Object to be freed

ta_cfg_obj_t* ta_obj_find(const char* type, const char* name, unsigned int gid)

Finds an object of specified type whose name is the same as name parameter.

Parameters:

type

Object type - user-defined constant

name

Object name - actually, instance name

gid

Request group ID

Returns:

Pointer to object in case of success, NULL otherwise.

te_errno ta_obj_find_create(const char* type, const char* name, unsigned int gid, ta_obj_cb cb_func, ta_cfg_obj_t** obj, bool* created)

Find an object of specified type whose name is the same as name parameter. Creates an object if it does not exist.

Parameters:

type

Object type - user-defined constant.

name

Object name - instance name.

gid

Request group ID.

cb_func

Callback function for filling object attributes if it is created.

obj

Where to save pointer to object.

created

Will be set to true if not NULL and object is created.

Returns:

Status code.

int ta_obj_add(const char* type, const char* name, const char* value, unsigned int gid, void* user_data, ta_cfg_obj_data_free* user_free, ta_cfg_obj_t** new_obj)

Create an object of specified type with particular value.

Parameters:

type

Object type - user-defined constant

name

Object name - actually, instance name

value

Object value

gid

Request group ID

user_data

Some user-data value associated with this object

user_free

Function that can be used to release user_data

new_obj

Object entry (OUT)

Returns:

Error code or 0

te_errno ta_obj_value_set(const char* type, const char* name, const char* value, unsigned int gid, ta_obj_cb cb_func)

Set the value of the object.

Parameters:

type

Object type - user-defined constant

name

Object name

value

Object value

gid

Request group ID

cb_func

Callback function for filling object attributes if it is created.

Returns:

Status code.

int ta_obj_set(const char* type, const char* name, const char* attr_name, const char* attr_value, unsigned int gid, ta_obj_cb cb_func)

Create or update object of specified type. In case object with specified name has been already added it just updates (adds) the value of specified attribute. In case there is no object with specified name and type, it creates it with SET action and calls callback function func.

Callback function should be used to fill in all the attributes with their current values if necessary.

Parameters:

type

Object type - user-defined constant

name

Object name - actually, instance name

attr_name

Attribute name to update in object

attr_value

Attribute value

gid

Request group ID

cb_func

Callback function to be called if SET operation leads to creating a new object in collection

Returns:

Error code or 0

int ta_obj_del(const char* type, const char* name, void* user_data, ta_cfg_obj_data_free* user_free, unsigned int gid, ta_obj_cb cb_func)

Create an object of specified type and mark it as deleted.

Parameters:

type

Object type - user-defined constant

name

Object name - actually, instance name

user_data

Some user-data value associated with this object

user_free

Function that can be used to release user_data

gid

Request group ID

cb_func

Callback function to be called for created object

Returns:

Error code or 0

void ta_cfg_obj_log(const ta_cfg_obj_t* obj)

Log TA configuration object using RING logging level.

Parameters:

obj

An object

const char* ta_rt_type2name(ta_route_type type)

Converts a route type id to a string representation

Parameters:

type

Route type id

Returns:

A pointer to static buffer holding the type name

typedef TAILQ_HEAD(ta_rt_nexthops_t, ta_rt_nexthop_t)

Queue head type for nexthops of a multipath route.

void ta_rt_nexthops_clean(ta_rt_nexthops_t* hops)

Remove all elements from a queue of route nexthops, release memory occupied by them.

Parameters:

hops

Head of nexthops queue.

void ta_rt_info_clean(ta_rt_info_t* rt_info)

Release dynamic memory allocated for fields of ta_rt_info_t structure, clear its fields.

Parameters:

rt_info

Pointer to ta_rt_info_t structure.

static void ta_rt_info_init(ta_route_type type, ta_rt_info_t* rt_info)

Initialize ta_rt_info_t data structure.

Parameters:

type

Which route type to set for rt_info

rt_info

Routing information data structure to initialize

Returns:

N/A

int ta_rt_parse_inst_name(const char* name, ta_rt_info_t* rt_info)

Parses route instance name and fills in a part of rt_info data structure.

Parameters:

name

Route instance name

rt_info

Routing information data structure (OUT)

int ta_rt_parse_inst_value(const char* value, ta_rt_info_t* rt_info)

Parses route instance value to rt_info data structure.

Parameters:

value

Value of the instance

rt_info

Routing information data structure (OUT)

int ta_rt_parse_attrs(ta_cfg_obj_attr_t* attrs, ta_rt_info_t* rt_info)

Parses route object attributes and fills in a part of rt_info data structure.

Parameters:

attrs

Route attributes

rt_info

Routing information data structure (OUT)

int ta_rt_parse_obj(ta_cfg_obj_t* obj, ta_rt_info_t* rt_info)

Parses route object info to rt_info data structure.

Parameters:

obj

Route object

rt_info

Routing information data structure (OUT)

const char* rpc_dpdk_offloads_tx_get_name(unsigned long long bit)

Get the string representation of a Tx offload by TA RPC offload bit.

Parameters:

bit

Tx offload bit number

Returns:

Tx offload name

const char* rpc_dpdk_offloads_rx_get_name(unsigned long long bit)

Get the string representation of a Rx offload by TA RPC offload bit.

Parameters:

bit

Rx offload bit number

Returns:

Rx offload name

const char* lio_opcode_rpc2str(rpc_lio_opcode opcode)

Convert RPC lio_listio opcode to string

int lio_opcode_rpc2h(rpc_lio_opcode opcode)

Convert RPC lio_listio opcode to native one

rpc_lio_opcode lio_opcode_h2rpc(int opcode)

Convert native lio_listio opcode to RPC one

const char* lio_mode_rpc2str(rpc_lio_mode mode)

Convert RPC lio_listio mode to string

int lio_mode_rpc2h(rpc_lio_mode mode)

Convert RPC lio_listio option to native one

rpc_lio_mode lio_mode_h2rpc(int mode)

Convert native lio_listio mode to RPC one

const char* aio_cancel_retval_rpc2str(rpc_aio_cancel_retval ret)

Convert RPC aio_cancel return to string

int aio_cancel_retval_rpc2h(rpc_aio_cancel_retval ret)

Convert RPC aio_cancel return value to native one

rpc_aio_cancel_retval aio_cancel_retval_h2rpc(int ret)

Convert native aio_cancel return to RPC one

const char* bitmask2str(struct rpc_bit_map_entry* maps, unsigned int val)

Convert an arbitrary bitmask to string according to the mapping passed

Parameters:

maps

an array of mappings

val

bitmask value to be mapped

Returns:

String representation of bit mask

unsigned int d_type_rpc2h(unsigned int d_type)

Convert RPC file type to native file type

unsigned int d_type_h2rpc(unsigned int d_type)

Convert native file type to RPC file type

const char* d_type_rpc2str(rpc_d_type type)

Convert RPC file type to string representation

unsigned int dlopen_flags_rpc2h(unsigned int flags)

dlopen_flags_rpc2str() Convert RPC dlopen mode flags to native flags

unsigned int dlopen_flags_h2rpc(unsigned int flags)

Convert dlopen mode native flags to RPC flags

static rpc_errno errno_h2rpc(int host_errno_val)

Convert system native errno to RPC errno

static const char* errno_rpc2str(rpc_errno rpc_errno_val)

Convert RPC errno to string.

If confiversion fails, the function is not reenterable.

unsigned int fcntl_flags_rpc2h(unsigned int flags)

fcntl_flags_rpc2str() Convert RPC file control flags to native flags

unsigned int fcntl_flags_h2rpc(unsigned int flags)

Convert file control native flags to RPC flags

int fcntl_rpc2h(rpc_fcntl_command cmd)

Convert RPC fcntl commands to native ones.

unsigned int splice_flags_rpc2h(rpc_splice_flags mode)

splice_flags_rpc2str()

unsigned int hwtstamp_instr_rpc2h(unsigned int instrs)

timestamping_flags_rpc2str()

int hwtstamp_tx_types_rpc2h(rpc_hwtstamp_tx_types type)

Convert RPC constant to corresponding value from hwtstamp_tx_types enum.

Parameters:

type

RPC constant

Returns:

Corresponding native value or -1 if no such value exists.

rpc_hwtstamp_tx_types hwtstamp_tx_types_h2rpc(int type)

Convert constant from hwtstamp_tx_types enum to corresponding RPC constant.

Parameters:

type

Native constant

Returns:

Corresponding RPC value or RPC_HWTSTAMP_TX_UNKNOWN if no such value exists.

const char* hwtstamp_tx_types_rpc2str(rpc_hwtstamp_tx_types type)

Get string name of a constant from rpc_hwtstamp_tx_types enum.

Parameters:

type

RPC constant

Returns:

Constant name.

unsigned int hwtstamp_tx_types_flags_h2rpc(unsigned int flags)

Convert native flags from hwtstamp_tx_types to RPC ones. These flags are returned by ioctl(SIOCETHTOOL/ETHTOOL_GET_TS_INFO). Every member of enum hwtstamp_tx_types has a corresponding bit, for example HWTSTAMP_TX_ON -> (1 << HWTSTAMP_TX_ON). If this function sees (1 << HWTSTAMP_TX_ON) bit set, it sets (1 << RPC_HWTSTAMP_TX_ON) bit in the result.

Parameters:

flags

Native flags

Returns:

RPC flags.

te_errno hwtstamp_tx_types_flags_rpc2te_str(unsigned int flags, te_string* str)

Append string representation of flags produced by hwtstamp_tx_types_flags_h2rpc() to TE string.

Parameters:

flags

Flags

str

Where to append string representation

Returns:

Status code.

int hwtstamp_rx_filters_rpc2h(rpc_hwtstamp_rx_filters filter)

Convert RPC constant to corresponding value from hwtstamp_rx_filters enum.

Parameters:

filter

RPC constant

Returns:

Corresponding native value or -1 if no such value exists.

rpc_hwtstamp_rx_filters hwtstamp_rx_filters_h2rpc(int filter)

Convert constant from hwtstamp_rx_filters enum to corresponding RPC constant.

Parameters:

filter

Native constant

Returns:

Corresponding RPC value or RPC_HWTSTAMP_FILTER_UNKNOWN if no such value exists.

const char* hwtstamp_rx_filters_rpc2str(rpc_hwtstamp_rx_filters filter)

Get string name of a constant from rpc_hwtstamp_rx_filters enum.

Parameters:

filter

RPC constant

Returns:

Constant name.

unsigned int hwtstamp_rx_filters_flags_h2rpc(unsigned int flags)

Convert native flags from hwtstamp_rx_filters to RPC ones. These flags are returned by ioctl(SIOCETHTOOL/ETHTOOL_GET_TS_INFO). Every member of enum hwtstamp_rx_filters has a corresponding bit, for example HWTSTAMP_FILTER_ALL -> (1 << HWTSTAMP_FILTER_ALL). If this function sees (1 << HWTSTAMP_FILTER_ALL) bit set, it sets (1 << RPC_HWTSTAMP_FILTER_ALL) bit in the result.

Parameters:

flags

Native flags

Returns:

RPC flags.

te_errno hwtstamp_rx_filters_flags_rpc2te_str(unsigned int flags, te_string* str)

Append string representation of flags produced by hwtstamp_rx_filters_flags_h2rpc() to TE string.

Parameters:

flags

Flags

str

Where to append string representation

Returns:

Status code.

unsigned int if_fl_rpc2h(unsigned int flags)

if_fl_rpc2str()

int ai_flags_rpc2h(rpc_ai_flags flags)

Convert RPC AI flags to native ones

rpc_ai_flags ai_flags_h2rpc(int flags)

Convert native AI flags to RPC ones

const char* pthread_cancelstate_rpc2str(rpc_pthread_cancelstate state)

Convert RPC thread cancel state to string

int pthread_cancelstate_rpc2h(rpc_pthread_cancelstate state)

Convert RPC thread cancel state to native thread cancel state

rpc_pthread_cancelstate pthread_cancelstate_h2rpc(int state)

Convert native thread cancel state to RPC thread cancel state

const char* pthread_canceltype_rpc2str(rpc_pthread_canceltype type)

Convert RPC thread cancel type to string

int pthread_canceltype_rpc2h(rpc_pthread_canceltype type)

Convert RPC thread cancel type to native thread cancel type

rpc_pthread_canceltype pthread_canceltype_h2rpc(int type)

Convert native thread cancel type to RPC thread cancel type

const char* signum_rpc2str(rpc_signum s)

Convert RPC signal number to string

int signum_rpc2h(rpc_signum s)

Convert RPC signal number to the native one

rpc_signum signum_h2rpc(int s)

Convert native signal number to the RPC one

const char* si_code_rpc2str(rpc_si_code si)

Convert RPC signal code to string

int si_code_rpc2h(rpc_si_code si)

Convert RPC signal code to the native one

rpc_si_code si_code_h2rpc(rpc_signum s, int si)

Convert native signal code to the RPC one.

Parameters:

s

Signal number

si

Native signal code

Returns:

RPC signal code

const char* sigev_notify_rpc2str(rpc_sigev_notify notify)

Convert RPC sigevent notification type to string

int sigev_notify_rpc2h(rpc_sigev_notify notify)

Convert RPC signevent notification type native one

rpc_sigev_notify sigev_notify_h2rpc(int notify)

Convert native signevent notification type to RPC one

int sighow_rpc2h(rpc_sighow how)

Convert RPC sigprocmask() how parameter to the native one

unsigned int sigaction_flags_rpc2h(unsigned int flags)

sigaction_flags_rpc2str() Convert RPC sigaction flags to native flags

unsigned int sigaction_flags_h2rpc(unsigned int flags)

Convert native sigaction flags to RPC flags

unsigned int sigaltstack_flags_rpc2h(rpc_ss_flags flags)

sigaltstack_flags_rpc2str() Convert RPC sigaltstack flags to native flags

rpc_ss_flags sigaltstack_flags_h2rpc(unsigned int flags)

Convert native sigaltstack flags to RPC flags

const char* tarpc_sigevent2str(const tarpc_sigevent* sigevent)

Convert RPC sigevent structure to string.

Parameters:

sigevent

RPC sigevent structure

Returns:

human-readable string

static const char* rpc_epoll_ctl_op2str(int op)

epoll_event_rpc2str()

unsigned int prot_flags_rpc2h(unsigned int flags)

prot_flags_rpc2str() Convert RPC memory protection flags to native flags

unsigned int prot_flags_h2rpc(unsigned int flags)

Convert native memory protection flags to RPC flags

unsigned int map_flags_rpc2h(unsigned int flags)

map_flags_rpc2str() Convert RPC memory mapping flags to native flags

unsigned int map_flags_h2rpc(unsigned int flags)

Convert native memory mapping flags to RPC flags

const char* madv_value_rpc2str(rpc_madv_value value)

Convert rpc_madvise_value to string

int madv_value_rpc2h(rpc_madv_value value)

Convert rpc_madvise_value to native value

rpc_madv_value madv_value_h2rpc(int value)

Convert native value to rpc_madv_value

unsigned int poll_event_rpc2h(unsigned int events)

poll_event_rpc2str()

static const char* iomux2str(iomux_func iomux)

Convert integer representation of I/O multiplexer into a string one.

Parameters:

iomux

Integer representation

Returns:

String representation

static int str2iomux(const char* iomux)

Convert string representation of I/O multiplexer into an integer one.

Parameters:

iomux

String representation

Returns:

Integer representation

const char* rlimit_resource_rpc2str(rpc_rlimit_resource resource)

Convert RPC resource type (setrlimit/getrllimit) to string representation.

int rlimit_resource_rpc2h(rpc_rlimit_resource resource)

Convert RPC resource type (setrlimit/getrllimit) to native resource type.

rpc_rlimit_resource rlimit_resource_h2rpc(int resource)

Convert native resource type (setrlimit/getrllimit) to RPC resource type.

const char* scm_tstamp_rpc2str(rpc_scm_tstamp type)

Convert RPC domain to string

size_t tarpc_cmsg_data_len(tarpc_cmsghdr* rpc_cmsg)

Estimate buffer length required to store a given control data.

Parameters:

rpc_cmsg

Pointer to tarpc_cmsghdr structure storing information about control data.

Returns:

Buffer length.

size_t tarpc_cmsg_total_len(tarpc_cmsghdr* rpc_cmsg, unsigned int num)

Get length of control data required to store cmsghdr structures corresponding to array of tarpc_cmsghdr structures.

Parameters:

rpc_cmsg

Pointer to the first element of the array.

num

Number of elements in the array.

Returns:

Length of control data.

te_errno cmsg_data_h2rpc(int level, int type, uint8_t* data, int len, tarpc_cmsghdr* rpc_cmsg)

Convert native cmsghdr data representation into TARPC one.

Parameters:

level

Originating protocol

type

Protocol-specific type

data

Data to be converted

len

Length of data to be converted

rpc_cmsg

Where to place converted value

Returns:

0 on success or error code

te_errno cmsg_data_rpc2h(tarpc_cmsghdr* rpc_cmsg, uint8_t* data, int* len)

Convert TARPC cmsghdr data representation into native one.

Parameters:

rpc_cmsg

TARPC structure with data to be converted

data

Where to place converted data

len

Maximum length of converted data (will be updated to actual length)

Returns:

0 on success or error code

te_errno msg_control_h2rpc(uint8_t* cmsg_buf, size_t cmsg_len, tarpc_cmsghdr** rpc_cmsg, unsigned int* rpc_cmsg_count, uint8_t** tail, unsigned int* tail_len)

Convert native control message representation into TARPC one.

If some bytes at the end of cmsg_buf cannot be parsed as valid cmsghdr (for example, because there is not enough space for cmsghdr structure itself), this function will not fail but will store these bytes in tail).

Parameters:

cmsg_buf

Buffer with control message to be converted

cmsg_len

Length of control message

rpc_cmsg

Where to place converted control message

rpc_cmsg_count

Will be set to count of cmsghdr headers in a message

tail

Where to save remaining (not parsed) part of control data (memory is allocated, should be freed by caller)

tail_len

Number of bytes saved in tail

Returns:

0 on success or error code

te_errno msg_control_rpc2h(tarpc_cmsghdr* rpc_cmsg, unsigned int rpc_cmsg_count, uint8_t* tail, unsigned int tail_len, uint8_t* cmsg_buf, size_t* cmsg_len)

Convert TARPC control message representation into native one.

Parameters:

rpc_cmsg

Control message to be converted

rpc_cmsg_count

Count of cmsghdr headers

tail

Not parsed part of control data to be appended at the end

tail_len

Number of bytes in tail

cmsg_buf

Where to place converted control message

cmsg_len

Available space in cmsg_buf

Returns:

0 on success or error code Non-standard protocol family for Ethernet addresses

const char* domain_rpc2str(rpc_socket_domain domain)

Convert RPC domain to string

int domain_rpc2h(rpc_socket_domain domain)

Convert RPC domain to native domain

rpc_socket_domain domain_h2rpc(int domain)

Convert native domain to RPC domain

const char* addr_family_rpc2str(rpc_socket_addr_family addr_family)

Convert RPC address family to string

int addr_family_rpc2h(rpc_socket_addr_family addr_family)

Convert RPC address family to native address family

rpc_socket_addr_family addr_family_h2rpc(int addr_family)

Convert native address family to RPC address family

const char* socktype_rpc2str(rpc_socket_type type)

Convert RPC socket type to string (including flags SOCK_CLOEXEC and SOCK_NONBLOCK)

int socktype_rpc2h(rpc_socket_type type)

Convert RPC socket type to native socket type (including RPC_SOCK_NONBLOCK and RPC_SOCK_CLOEXEC flags)

rpc_socket_type socktype_h2rpc(int type)

Convert native socket type to RPC socket type

int socket_flags_rpc2h(rpc_socket_flags flags)

socket_flags_rpc2str() Convert RPC socket flags to native socket flags

rpc_socket_flags socket_flags_h2rpc(int flags)

Convert native socket flags to RPC socket flags

const char* proto_rpc2str(rpc_socket_proto proto)

Convert RPC protocol to string

int proto_rpc2h(rpc_socket_proto proto)

Convert RPC IP protocol to native IP protocol constants

rpc_socket_proto proto_h2rpc(int proto)

Convert native IP protocol to RPC IP protocol constants

const char* shut_how_rpc2str(rpc_shut_how how)

Convert RPC protocol to string

unsigned int send_recv_flags_rpc2h(unsigned int flags)

send_recv_flags_rpc2str() Convert RPC send/receive flags to native flags

unsigned int send_recv_flags_h2rpc(unsigned int flags)

Convert native send/receive flags to RPC flags

const char* send_function_tarpc2str(tarpc_send_function func)

Convert tarpc_send_function enum value to string name.

Parameters:

func

Enum value.

Returns:

String name.

const char* mtu_discover_arg_rpc2str(rpc_mtu_discover_arg arg)

Convert RPC path MTU discovery argument to string

int mtu_discover_arg_rpc2h(rpc_mtu_discover_arg opt)

Convert RPC path MTU discovery argument constant to native one

rpc_mtu_discover_arg mtu_discover_arg_h2rpc(int arg)

Convert native path MTU discovery argument to RPC one

const char* sockopt_rpc2str(rpc_sockopt opt)

Convert RPC socket option to string

int sockopt_rpc2h(rpc_sockopt opt)

Convert RPC socket option constants to native ones

rpc_sockopt sockopt_h2rpc(int opt_type, int opt)

Convert native socket options to RPC one

rpc_sockopt cmsg_type_h2rpc(int level, int type)

Convert native control message type to RPC one.

Parameters:

level

Value of cmsg_level.

type

Value of cmsg_type.

Returns:

Converted value.

bool sockopt_is_boolean(rpc_sockopt opt)

Has socket option boolean semantic?

const char* tcp_state_rpc2str(rpc_tcp_state st)

Convert RPC TCP socket state to string

rpc_tcp_state tcp_state_str2rpc(const char* s)

Convert string representation of TCP socket state to RPC constant

Parameters:

s

String representation of rpc_tcp_state value

Returns:

RPC constant corresponding to a given string

int tcp_state_rpc2h(rpc_tcp_state st)

Convert RPC TCP socket state constants to native ones

rpc_tcp_state tcp_state_h2rpc(int st)

Convert native TCP socket states to RPC one

unsigned int tcpi_options_rpc2h(unsigned int flags)

tcpi_options_rpc2str() Convert RPC TCP options in tcp_info structure to native ones

unsigned int tcpi_options_h2rpc(unsigned int flags)

Convert native TCP options in tcp_info structure to RPC ones

const char* tcp_ca_state_rpc2str(rpc_tcp_ca_state st)

Convert RPC TCP congestion state to string

int tcp_ca_state_rpc2h(rpc_tcp_ca_state st)

Convert RPC TCP congestion state constants to native ones

rpc_tcp_ca_state tcp_ca_state_h2rpc(int st)

Convert native TCP congestion states to RPC one

const char* socklevel_rpc2str(rpc_socklevel level)

Convert RPC socket option constants to string

int socklevel_rpc2h(rpc_socklevel level)

Convert RPC socket option constants to native ones

rpc_socklevel socklevel_h2rpc(int level)

Convert native socket option constants to RPC ones

rpc_socklevel rpc_sockopt2level(rpc_sockopt opt)

Convert RPC socket option constant to its level.

const char* ioctl_rpc2str(rpc_ioctl_code code)

Convert RPC ioctl requests to string

int ioctl_rpc2h(rpc_ioctl_code code)

Get native value of ioctl() request.

Parameters:

code

RPC value

Returns:

Native value (TE_IOCTL_UNKNOWN if native value is not defined)

struct sockaddr* sockaddr_to_te_af(const struct sockaddr* addr, tarpc_sa** rpc_sa)

Convert host sockaddr to host sockaddr with TE_AF_TARPC_SA address family.

Parameters:

addr

Host sockaddr structure

rpc_sa

NULL or location for pointer to tarpc_sa structure in the created host sockaddr structure

Returns:

Allocated memory or NULL.

void sockaddr_raw2rpc(const void* buf, socklen_t len, tarpc_sa* rpc)

Fill in ‘ tarpc_sa ‘ structure to contain raw buffer of specified length.

Parameters:

buf

Buffer (may be NULL)

len

Length of the buffer (have to be 0, if buf is NULL)

rpc

Pointer to the structure to be filled in

void sockaddr_input_h2rpc(const struct sockaddr* sa, tarpc_sa* rpc)

Convert sockaddr structure from host representation to RPC. It should be either TE_AF_TARPC_SA or known address structure.

Parameters:

sa

Sockaddr structure to be converted (may be NULL)

rpc

Pointer to the structure to be filled in

void sockaddr_output_h2rpc(const struct sockaddr* sa, socklen_t rlen, socklen_t len, tarpc_sa* rpc)

Convert sockaddr structure from host representation to RPC. It does not recognize TE_AF_TARPC_SA address family.

Parameters:

sa

Sockaddr structure to be converted (may be NULL)

rlen

Real length of the buffer under sa

len

Length returned by called function

rpc

Pointer to the structure to be filled in (filled in by zeros or used to generate sa from RPC to host representation)

const char* sockaddr_h2str(const struct sockaddr* addr)

String representation of sockaddr structure including processing of special case for TE_AF_TARPC_SA address family.

Parameters:

addr

Host sockaddr structure

Returns:

Pointer to static buffer.

const char* sockaddr_h2str_buf(const struct sockaddr* addr, char* buf, size_t len)

String representation of sockaddr structure including processing of special case for TE_AF_TARPC_SA address family. The same as sockaddr_h2str() but uses supplied buffer to store string.

Parameters:

addr

Pointer to sockaddr structure.

buf

Where to save string representation.

len

Length of the buffer.

Returns:

Pointer to buffer with string (may be string constant).

const char* addr_family_sockaddr_str(rpc_socket_addr_family addr_family)

Convert RPC address family to corresponding structure name.

Parameters:

addr_family

Address family

Returns:

Name of corresponding sockaddr structure.

RPCBITMAP2STR(ethtool_flags, ETHTOOL_FLAGS_MAPPING_LIST)

ethtool_flags_rpc2str()

uint32_t ethtool_flags_rpc2h(uint32_t flags)

Convert ethtool flags from RPC to native representation

uint32_t ethtool_flags_h2rpc(uint32_t flags)

Convert ethtool flags from native representation to RPC one

RPCBITMAP2STR(ethtool_reset_flags_aux, ETHTOOL_RESET_FLAGS_MAPPING_LIST)

ethtool_reset_flags_aux_rpc2str()

const char* ethtool_reset_flags_rpc2str(uint32_t flags)

Convert ethtool reset flags from RPC to string representation

uint32_t ethtool_reset_flags_rpc2h(uint32_t flags)

Convert ethtool reset flags from RPC to native representation

uint32_t ethtool_reset_flags_h2rpc(uint32_t flags)

Convert ethtool reset flags from native representation to RPC one

const char* ethtool_cmd_rpc2str(rpc_ethtool_cmd ethtool_cmd)

Convert RPC ethtool command to string

int ethtool_cmd_rpc2h(rpc_ethtool_cmd ethtool_cmd)

Convert RPC ethtool command to native one

rpc_ethtool_cmd ethtool_cmd_h2rpc(int ethtool_cmd)

Convert native ethtool command to RPC one

tarpc_ethtool_type ethtool_cmd2type(rpc_ethtool_cmd cmd)

Convert ethtool command to TARPC_ETHTOOL_* types of its data.

const char* eth_proto_rpc2str(rpc_eth_proto proto)

Convert RPC Ethernet protocol to string

int eth_proto_rpc2h(rpc_eth_proto proto)

Convert RPC ethernet protocol to native value

rpc_eth_proto eth_proto_h2rpc(unsigned int proto)

Convert native ethernet protocol to RPC value

const char* arp_hardware_rpc2str(rpc_arp_hardware hardware)

Convert RPC ARP hardware identifier to string

unsigned int arp_hardware_rpc2h(rpc_arp_hardware hardware)

Convert RPC ARP hardware identifier to native value

rpc_arp_hardware arp_hardware_h2rpc(unsigned int hardware)

Convert native ARP hardware identifier to RPC value

const char* packet_type_rpc2str(rpc_packet_type type)

Convert RPC packet type to string

unsigned int packet_type_rpc2h(rpc_packet_type type)

Convert RPC packet type to native value

rpc_packet_type packet_type_h2rpc(unsigned int type)

Convert native packet type to RPC value

unsigned int file_mode_flags_rpc2h(unsigned int flags)

file_mode_flags_rpc2str() Convert RPC mode flags to native flags

int access_mode_flags_rpc2h(int mode)

access_mode_flags_rpc2str() Convert RPC access mode to native flags

const char* sysinfo_command_rpc2str(rpc_sysinfo_command resource)

Convert RPC resource type (setrlimit/getrllimit) to string representation.

int sysinfo_command_rpc2h(rpc_sysinfo_command resource)

Convert RPC resource type (setrlimit/getrllimit) to native resource type.

static int timeval_h2rpc(const struct timeval* tv_h, struct tarpc_timeval* tv_rpc)

Convert ‘struct timeval’ to ‘struct tarpc_timeval ‘.

Parameters:

tv_h

Pointer to ‘struct timeval’

tv_rpc

Pointer to ‘struct tarpc_timeval

static int timeval_rpc2h(const struct tarpc_timeval* tv_rpc, struct timeval* tv_h)

Convert ‘struct tarpc_timeval ‘ to ‘struct timeval’.

Parameters:

tv_rpc

Pointer to ‘struct tarpc_timeval

tv_h

Pointer to ‘struct timeval’

static int timezone_h2rpc(const struct timezone* tz_h, struct tarpc_timezone* tz_rpc)

Convert ‘struct timezone’ to ‘struct tarpc_timezone ‘.

Parameters:

tz_h

Pointer to ‘struct timezone’

tz_rpc

Pointer to ‘struct tarpc_timezone

static int timezone_rpc2h(const struct tarpc_timezone* tz_rpc, struct timezone* tz_h)

Convert ‘struct tarpc_timezone ‘ to ‘struct timezone’.

Parameters:

tz_rpc

Pointer to ‘struct tarpc_timezone

tz_h

Pointer to ‘struct timezone’

int clock_id_rpc2h(rpc_clock_id id)

Convert RPC clock ID to native one.

Parameters:

id

RPC clock ID

Returns:

Native clock ID on success, -1 on failure.

const char* clock_id_rpc2str(rpc_clock_id id)

Get string representation of clock ID.

Parameters:

id

RPC clock ID

Returns:

Pointer to string constant.

unsigned int adj_mode_flags_rpc2h(unsigned int flags)

adj_mode_flags_rpc2str() Convert RPC timex mode flags to native ones.

Parameters:

flags

RPC flags

Returns:

Native flags.

unsigned int adj_mode_flags_h2rpc(unsigned int flags)

Convert native timex mode flags to RPC ones.

Parameters:

flags

Native flags

Returns:

RPC flags.

unsigned int timex_status_flags_rpc2h(unsigned int flags)

timex_status_flags_rpc2str() Convert RPC timex status flags to native ones.

Parameters:

flags

RPC flags

Returns:

Native flags.

unsigned int timex_status_flags_h2rpc(unsigned int flags)

Convert native timex status flags to RPC ones.

Parameters:

flags

Native flags

Returns:

RPC flags.

te_errno timex_tarpc2te_str(const tarpc_timex* val, te_string* str)

Append string representation of tarpc_timex structure to TE string.

Parameters:

val

Pointer to tarpc_timex structure

str

Pointer to TE string

Returns:

Status code.

int waitpid_opts_rpc2h(rpc_waitpid_opts opts)

Convert RPC waitpid options to native options

const char* wait_status_flag_rpc2str(rpc_wait_status_flag flag)

Convert status flag to string

rpc_wait_status wait_status_h2rpc(int st)

Convert native status value to RPC status structure

const char* sysconf_name_rpc2str(rpc_sysconf_name name)

Convert RPC sysconf() name to string representation.

int sysconf_name_rpc2h(rpc_sysconf_name name)

Convert RPC sysconf() name to native one.

rpc_sysconf_name sysconf_name_h2rpc(int name)

Convert native sysconf() name to RPC one.

int preadv2_pwritev2_flags_rpc2h(rpc_preadv2_pwritev2_flags flags)

preadv2_pwritev2_flags_rpc2str()

const char* network_event_rpc2str(rpc_network_event events)

Convert RPC network event(s) to string

unsigned int network_event_rpc2h(rpc_network_event flags)

Convert RPC network event flags to native flags

rpc_network_event network_event_h2rpc(unsigned int flags)

Convert native network event flags to RPC flags

unsigned int transmit_file_flags_rpc2h(rpc_transmit_file_flags flags)

Convert RPC transmit file flags to native flags

unsigned int open_sock_flags_rpc2h(unsigned int flags)

open_sock_flags_rpc2str() Convert rpc_open_sock_flags to the native ones

unsigned int join_leaf_flags_rpc2h(unsigned int flags)

join_leaf_flags_rpc2str() Convert rpc_join_leaf_flags to the native ones

const char* join_leaf_rpc2str(rpc_join_leaf_flags open_code)

Convert rpc_join_leaf_flags to string

static const char* neg_errno_rpc2str(int nerrno)

Convert negative RPC errno to string.

Non-negative is printed as decimal number.

The function uses static buffer and therefore non thread-safe and non-reentrant.

int rpc_rte_mk_flow_rule_components(rcf_rpc_server* rpcs, const asn_value* flow_rule_components, rpc_rte_flow_attr_p* attr, rpc_rte_flow_item_p* pattern, rpc_rte_flow_action_p* actions)

Make RTE flow components from ASN.1 representation. In one function call, attributes, pattern and actions can be made all together from ASN.1 flow rule, or only one of them from corresponding ASN.1 representation.

Parameters:

flow_rule_components

ASN.1 flow rule components

attr

RTE flow attr pointer

pattern

RTE flow item pointer to the array of items

actions

RTE flow action pointer to the array of actions

Returns:

0 on success; jumps out in case of failure

void rpc_rte_free_flow_rule(rcf_rpc_server* rpcs, rpc_rte_flow_attr_p attr, rpc_rte_flow_item_p pattern, rpc_rte_flow_action_p actions)

Free RTE flow structures with attributes, pattern and actions.

Parameters:

attr

RTE flow attr pointer

pattern

RTE flow item pointer to the array of items

actions

RTE flow action pointer to the array of actions

Returns:

0 on success; jumps out in case of failure

int rpc_rte_insert_flow_rule_items(rcf_rpc_server* rpcs, rpc_rte_flow_item_p* pattern, const asn_value* items, int index)

Insert RTE flow rule items provided in ASN.1 representation into RTE flow rule pattern starting at specified index.

Parameters:

pattern

RTE flow item pointer to the array of items, on success contains pointer to the new array

items

ASN.1 representation of flow rule items to insert

index

Index starting at which to insert items, negative means insert to the end of the pattern

Returns:

Status code; jumps out in case of failure

int rpc_rte_flow_prepend_opaque_actions(rcf_rpc_server* rpcs, rpc_rte_flow_action_p flow_actions, rpc_rte_flow_action_p opaque_actions, unsigned int nb_opaque_actions, rpc_rte_flow_action_p* united_actions)

Concatenate the given flow action arrays in a newly allocated one

Parameters:

flow_actions

RPC pointer to an END-terminated action array

opaque_actions

RPC pointer to an array of opaque actions

nb_opaque_actions

The number of the opaque actions

united_actions

Location for the result

Returns:

Status code; jumps out on error (negative value)

void rpc_rte_flow_release_united_actions(rcf_rpc_server* rpcs, rpc_rte_flow_action_p united_actions)

Cleanup counterpart for rpc_rte_flow_prepend_opaque_actions()

int rpc_rte_flow_prepend_opaque_items(rcf_rpc_server* rpcs, rpc_rte_flow_item_p flow_items, rpc_rte_flow_item_p opaque_items, unsigned int nb_opaque_items, rpc_rte_flow_item_p* united_items)

Concatenate the given flow item arrays in a newly allocated one

Parameters:

flow_items

RPC pointer to an END-terminated item array

opaque_items

RPC pointer to an array of opaque items

nb_opaque_items

The number of the opaque items

united_items

Location for the result

Returns:

Status code; jumps out on error (negative value)

void rpc_rte_flow_release_united_items(rcf_rpc_server* rpcs, rpc_rte_flow_item_p united_items)

Cleanup counterpart for rpc_rte_flow_prepend_opaque_items()

static bool dpdk_reuse_rpcs(void)

Get TE_ENV_DPDK_REUSE_RPCS feature status

Returns:

true, if the feature is requested; false, if the feature is disabled

rpc_rte_mbuf_p tapi_rte_mk_mbuf_eth(rcf_rpc_server* rpcs, rpc_rte_mempool_p mp, const uint8_t* dst_addr, const uint8_t* src_addr, const uint16_t ether_type, const uint8_t* payload, size_t len)

Prepare an RTE mbuf with Ethernet frame containing particular data (if buffer to contain the frame data is NULL, then random data will be put)

Parameters:

mp

RTE mempool pointer

dst_addr

Destination Ethernet address (network byte order)

src_addr

Source Ethernet address (network byte order)

ether_type

Ethernet type value (host byte order)

payload

Data to be encapsulated into the frame or NULL

len

Data length

Returns:

RTE mbuf pointer on success; jumps out on failure

rpc_rte_mbuf_p tapi_rte_mk_mbuf_ip(rcf_rpc_server* rpcs, rpc_rte_mempool_p mp, const uint8_t* eth_dst_addr, const uint8_t* eth_src_addr, const struct sockaddr* ip_dst_addr, const struct sockaddr* ip_src_addr, const uint8_t next_hdr, const uint8_t* payload, const size_t payload_len, const int cksum_opt)

Prepare an RTE mbuf with an Ethernet frame containing IP packet (if buffer to contain IP payload is NULL, then random data will be put)

Parameters:

mp

RTE mempool pointer

eth_dst_addr

Destination Ethernet address (network byte order)

eth_src_addr

Source Ethernet address (network byte order)

ip_dst_addr

Destination IPv4/6 address

ip_src_addr

Source IPv4/6 address

next_hdr

L4 protocol ID (i.e., IPPROTO_UDP)

payload

Data to be encapsulated into IP packet or NULL

payload_len

Payload length

cksum_opt

SW checksum preparation choice; possible values are those from tapi_rte_mbuf_cksum enum

Returns:

RTE mbuf pointer on success; jumps out on failure

rpc_rte_mbuf_p tapi_rte_mk_mbuf_udp(rcf_rpc_server* rpcs, rpc_rte_mempool_p mp, const uint8_t* eth_dst_addr, const uint8_t* eth_src_addr, const struct sockaddr* udp_dst_addr, const struct sockaddr* udp_src_addr, const uint8_t* payload, const size_t payload_len, const int cksum_opt)

Prepare an RTE mbuf with an Ethernet frame containing UDP packet

Parameters:

mp

RTE mempool pointer

eth_dst_addr

Destination Ethernet address (network byte order)

eth_src_addr

Source Ethernet address (network byte order)

udp_dst_addr

Destination IPv4/6 address and port

udp_src_addr

Source IPv4/6 address and port

payload

Data to be encapsulated into UDP packet or NULL

payload_len

Payload length

cksum_opt

SW checksum preparation choice; possible values are those from tapi_rte_mbuf_cksum enum

Returns:

RTE mbuf pointer on success; jumps out on failure

rpc_rte_mbuf_p tapi_rte_mk_mbuf_tcp(rcf_rpc_server* rpcs, rpc_rte_mempool_p mp, const uint8_t* eth_dst_addr, const uint8_t* eth_src_addr, const struct sockaddr* tcp_dst_addr, const struct sockaddr* tcp_src_addr, const uint32_t th_seq, const uint32_t th_ack, const uint8_t th_off, const uint8_t th_flags, const uint16_t th_win, const uint16_t th_urp, const uint8_t* payload, const size_t payload_len, const int cksum_opt)

Prepare an RTE mbuf with an Ethernet frame containing TCP packet (if TCP options are to be added, one should include them as a part of payload and set correct data offset [TCP header length +

  • options length] th_off)

Parameters:

mp

RTE mempool pointer

eth_dst_addr

Destination Ethernet address (network byte order)

eth_src_addr

Source Ethernet address (network byte order)

tcp_dst_addr

Destination IPv4/6 address and port

tcp_src_addr

Source IPv4/6 address and port

th_seq

TX data seq. number (network byte order) or 0

th_ack

RX data seq. number (network byte order) or 0

th_off

Data offset (includes options length) or 0 (measured in 32-bit words)

th_flags

TCP flags or 0

th_win

RX flow control window (network byte order) or 0

th_urp

Urgent pointer (network byte order) or 0

payload

Data to be encapsulated into TCP packet or NULL

payload_len

Payload length (should include options length)

cksum_opt

SW checksum preparation choice; possible values are those from tapi_rte_mbuf_cksum enum

Returns:

RTE mbuf pointer on success; jumps out on failure

uint8_t* tapi_rte_get_mbuf_data(rcf_rpc_server* rpcs, rpc_rte_mbuf_p m, size_t offset, size_t* bytes_read)

Read the whole mbuf (chain) data (starting at a given offset) into the buffer allocated internally and pass the number of bytes read to the user-specified variable

Parameters:

m

RTE mbuf pointer

offset

Offset into mbuf data

bytes_read

Amount of bytes read

Returns:

Pointer to a buffer containing data read from mbuf (chain)

void tapi_rte_mk_mbuf_mk_ptrn_by_tmpl(rcf_rpc_server* rpcs, asn_value* template, rpc_rte_mempool_p mp, send_transform* transform, rpc_rte_mbuf_p** mbufs_out, unsigned int* n_mbufs_out, asn_value** ptrn_out)

Produce mbuf(s) from template, set offloads and provide a pattern to capture resulting packets on the peer side

Deprecated This API is not well-thought, and the implementation is mind-boggling.

Please consider using simpler helper: tapi_rte_mk_mbufs_by_tmpl_get_pkts().

Consider removing this API and all connected helpers.

The function jumps out in case of error

Parameters:

template

ASN.1 traffic template

mp

RTE mempool pointer

transform

A set of parameters describing certain trasformations which are required to affect the outgoing packets

mbufs_out

Location for RTE mbuf pointer(s)

n_mbufs_out

Location for the number of mbufs prepared

ptrn_out

Location for the pattern to be produced or NULL

void tapi_rte_pktmbuf_random_redist(rcf_rpc_server* rpcs, rpc_rte_mempool_p* mp_multi, unsigned int mp_multi_nb_items, rpc_rte_mbuf_p* packets, unsigned int nb_packets)

Go through an array of packets (mbuf chains) and try to transform each of them by means of a randomly selected segmentation pattern

rpc_rte_pktmbuf_redist_multi() is used in the wrapper; the original pointers from packets may be replaced; packets will likely contain brand-new pointers

mp_multi An array of RTE mempool pointers mp_multi_nb_items The number of RTE mempool pointers in the array packets An array of RTE mbuf pointers nb_packets The number of RTE mbuf pointers in the array

void tapi_rte_mk_mbufs_by_tmpl_get_pkts(rcf_rpc_server* rpcs, const asn_value* tmpl, rpc_rte_mempool_p mp, rpc_rte_mbuf_p** mbufs, unsigned int* nb_mbufs, asn_value*** pkts, unsigned int* nb_pkts)

Given a traffic template, produce mbufs and also provide ASN.1 raw packets, representing the mbufs, to the caller.

Parameters:

rpcs

RPC server handle

tmpl

The traffic template

mp

A handle of the mempool to allocate mbufs from

mbufs

Location for the resulting array of mbuf handles

nb_mbufs

The number of mbuf handles in the array

pkts

Location for the resulting array of ASN.1 raw packets

nb_pkts

Location for the number of packets in the array

static void neg_errno_h2rpc(int* retval)

Translate negative errno from host to RPC.

static te_errno rpc_dpdk_bitmask64_convert(uint64_t from_bm, const te_enum_bitmask_conv conv_map[], bool rte2rpc, uint64_t* to_bm)

Convert RPC 64-bit bitmask to/from RTE.

Parameters:

from_bm

Bitmask to convert from.

conv_map

Conversion map.

rte2rpc

Whether conversion is from RTE to RPC.

to_bm

Bitmask to convert to.

TE_EINVAL

conv_map contains zero values or overlapped bits.

TE_ERANGE

Conversion was done, but some bits of bm can not be converted using conv_map.

Returns:

Status code.

static te_errno rpc_dpdk_bitmask64_rpc2rte(uint64_t rpc_bm, const te_enum_bitmask_conv conv_map[], uint64_t* rte_bm)

Convert RPC 64-bit RPC bitmask to RTE.

Parameters:

rpc_bm

RPC 64-bit bitmask to convert.

conv_map

Conversion map.

rte_bm

Converted RTE 64-bit bitmask.

TE_EINVAL

conv_map contains zero values or overlapped bits.

TE_ERANGE

Conversion was done, but some bits of bm can not be converted using conv_map.

Returns:

Status code.

static uint64_t rpc_dpdk_bitmask64_rte2rpc(uint64_t rte_bm, const te_enum_bitmask_conv conv_map[], unsigned int unknown_bit)

Convert RPC 64-bit RTE bitmask to RPC.

Parameters:

rte_bm

RPC 64-bit bitmask to convert.

conv_map

Conversion map.

unknown_bit

Bit to set if conversion was failed or incomleted.

Returns:

Converted RPC 64-bit bitmask.

static te_errno rpc_dpdk_bitmask32_rpc2rte(uint32_t rpc_bm, const te_enum_bitmask_conv conv_map[], uint32_t* rte_bm)

Convert RPC 32-bit RPC bitmask to RTE.

Parameters:

rpc_bm

RPC 32-bit bitmask to convert.

conv_map

Conversion map.

rte_bm

Converted RTE 32-bit bitmask.

TE_EINVAL

conv_map contains zero values or overlapped bits.

TE_ERANGE

Conversion was done, but some bits of bm can not be converted using conv_map.

Returns:

Status code.

static uint32_t rpc_dpdk_bitmask32_rte2rpc(uint32_t rte_bm, const te_enum_bitmask_conv conv_map[], unsigned int unknown_bit)

Convert RPC 32-bit RTE bitmask to RPC.

Parameters:

rte_bm

RPC 32-bit bitmask to convert.

conv_map

Conversion map.

unknown_bit

Bit to set if conversion was failed or incomleted.

Returns:

Converted RPC 32-bit bitmask.

static te_errno rpc_dpdk_bitmask16_rpc2rte(uint16_t rpc_bm, const te_enum_bitmask_conv conv_map[], uint16_t* rte_bm)

Convert RPC 16-bit RPC bitmask to RTE.

Parameters:

rpc_bm

RPC 16-bit bitmask to convert.

conv_map

Conversion map.

rte_bm

Converted RTE 16-bit bitmask.

TE_EINVAL

conv_map contains zero values or overlapped bits.

TE_ERANGE

Conversion was done, but some bits of bm can not be converted using conv_map.

Returns:

Status code.

static uint32_t rpc_dpdk_bitmask16_rte2rpc(uint16_t rte_bm, const te_enum_bitmask_conv conv_map[], unsigned int unknown_bit)

Convert RPC 16-bit RTE bitmask to RPC.

Parameters:

rte_bm

RPC 16-bit bitmask to convert.

conv_map

Conversion map.

unknown_bit

Bit to set if conversion was failed or incomleted.

Returns:

Converted RPC 16-bit bitmask.

iomux_return_iterator iomux_return_iterate(iomux_func iomux, iomux_state* st, iomux_return* ret, iomux_return_iterator it, int* p_fd, int* p_events)

Iterate through all iomux result and return fds and events.

Parameters:

iomux

Multiplexer function type.

st

The multiplexer context.

ret

Returned multiplexer data.

it

iterator value, IOMUX_RETURN_ITERATOR_START should be use for the first iteration.

p_fd

File descriptor location.

p_events

Events location.

Returns:

New iterator value, IOMUX_RETURN_ITERATOR_END means no events left.

int iomux_create_state(iomux_func iomux, iomux_funcs* funcs, iomux_state* state)

Initialize iomux_state with zero value. Possibly, we should pass maximum number of fds and use that number instead of IOMUX_MAX_POLLED_FDS.

Parameters:

iomux

Multiplexer function type.

funcs

Pointer to the multiplexer functions.

state

The multiplexer context.

Returns:

0 on success or -1 in the case of failure.

int iomux_close(iomux_func iomux, iomux_funcs* funcs, iomux_state* state)

Close iomux state when necessary.

Parameters:

iomux

Multiplexer function type.

funcs

Pointer to the multiplexer functions.

state

The multiplexer context.

Returns:

0 on success or -1 in the case of failure.

int iomux_add_fd(iomux_func iomux, iomux_funcs* funcs, iomux_state* state, int fd, int events)

Add fd to the list of watched fds, with given events (in POLL-events). For select, all fds are added to exception list. For some iomuxes, the function will produce error when adding the same fd twice, so iomux_mod_fd() should be used.

Parameters:

iomux

Multiplexer function type.

funcs

Pointer to the multiplexer functions.

state

The multiplexer context.

fd

The file descriptor.

events

Expected events.

Returns:

0 on success or -1 in the case of failure.

int iomux_wait(iomux_func iomux, iomux_funcs* funcs, iomux_state* state, iomux_return* ret, int timeout)

Add fd to the list of watched fds, with given events (in POLL-events). For select, all fds are added to exception list. For some iomuxes, the function will produce error when adding the same fd twice, so iomux_mod_fd() should be used.

Parameters:

iomux

Multiplexer function type.

funcs

Pointer to the multiplexer functions.

state

The multiplexer context.

ret

Return events, may be NULL if user is not interested in the event list.

timeout

Multiplexer timeout value, milliseconds.

Returns:

0 on success or -1 in the case of failure.

int iomux_find_func(tarpc_lib_flags lib_flags, iomux_func* iomux, iomux_funcs* funcs)

Resolve all functions used by particular iomux and store them into iomux_funcs.

Parameters:

lib_flags

Flag to use.

iomux

Multiplexer function type.

funcs

Pointer to the multiplexer functions.

Returns:

0 on success or -1 in the case of failure.

int iomux_mod_fd(iomux_func iomux, iomux_funcs* funcs, iomux_state* state, int fd, int events)

Modify events for already-watched fds.

Parameters:

iomux

Multiplexer function type.

funcs

Pointer to the multiplexer functions.

state

The multiplexer context.

fd

The file descriptor.

events

Expected events.

Returns:

0 on success or -1 in the case of failure.

int iomux_fd_is_writable(int fd_exp, iomux_func iomux, iomux_state* iomux_st, iomux_return* iomux_ret, int rc, bool* writable)

Process a multiplexer call results to detrmine if a file descriptor is writable. It is expected to get no more then one event.

Parameters:

fd_exp

Endpoint where the event is expected.

iomux

Multiplexer function type.

iomux_st

The multiplexer context.

iomux_ret

Returned multiplexer data.

rc

Return code of the multiplexer function call.

writable

Location for writable.

Returns:

0 on success or -1 in the case of failure.

static void iomux_state_init_invalid(iomux_func iomux, iomux_state* state)

Initialize a multiplexer context so that it is safe to call iomux_close().

Parameters:

iomux

Multiplexer function type.

state

The multiplexer context.

static iomux_func get_default_iomux(void)

Get default multiplexer type.

Returns:

The multiplexer type.

void rcf_pch_mem_init(void)

Initialize RCF PCH memory mapping

rpc_ptr rcf_pch_mem_index_alloc(void* mem, rpc_ptr_id_namespace ns, const char* caller_func, int caller_line)

Assign the identifier to memory.

Parameters:

mem

Location of real memory address

ns

Namespace

caller_func

Name of function (for more detailed error messages)

caller_line

Line in file (for more detailed error messages)

Returns:

Memory identifier or 0 in the case of failure

void rcf_pch_mem_alloc_set_offset(tarpc_int id, size_t offset)

Mark the memory identifier corresponding to the pointer ID with the offset (it is asserted to be zero before the start).

Parameters:

id

Pointer ID

offset

The offset that should be set

te_errno rcf_pch_mem_index_free(rpc_ptr id, rpc_ptr_id_namespace ns, const char* caller_func, int caller_line)

Mark the memory identifier corresponding to the memory address with the ns as “unused”.

Parameters:

id

Memory id returned by rcf_pch_mem_index_alloc

ns

Namespace

caller_func

Name of function (for more detailed error messages)

caller_line

Line in file (for more detailed error messages)

Returns:

Status code

te_errno rcf_pch_mem_index_free_mem(void* mem, rpc_ptr_id_namespace ns, const char* caller_func, int caller_line)

Mark the memory identifier corresponding to memory address mem and namespace ns as “unused”.

Parameters:

mem

Memory address

ns

Namespace

caller_func

Name of function (for more detailed error messages)

caller_line

Line in file (for more detailed error messages)

Returns:

Status code

void* rcf_pch_mem_index_mem_to_ptr(rpc_ptr id, rpc_ptr_id_namespace ns, const char* caller_func, int caller_line)

Obtain address of the real memory by its identifier and namespace.

Parameters:

id

Memory id returned by rcf_pch_mem_index_alloc

ns

Namespace

caller_func

Name of function (for more detailed error messages)

caller_line

Line in file (for more detailed error messages)

Returns:

Memory address or NULL

void* rcf_pch_mem_base_ptr(rpc_ptr id)

Obtain the base address of the real memory by its identifier and namespace. It should only be used to free or reallocate the memory. In most cases (e.g. if the memory was initially allocated by a standard malloc()) rcf_pch_mem_base_ptr() and rfc_pch_mem_get() yield the same result.

Parameters:

id

Memory id returned by rcf_pch_mem_index_alloc

Returns:

Memory address or NULL

te_errno rcf_pch_mem_index_ptr_to_mem_gen(void* mem, rpc_ptr_id_namespace ns, rpc_ptr* id)

Find memory identifier by memory address and namespace.

Parameters:

mem

Memory address

ns

Namespace

id

RPC pointer identifier

Returns:

Status code

rpc_ptr rcf_pch_mem_index_ptr_to_mem(void* mem, rpc_ptr_id_namespace ns, const char* caller_func, int caller_line)

Find memory identifier by memory address and namespace. Reports an error if identifier is not found.

Parameters:

mem

Memory address

ns

Namespace

caller_func

Name of function (for more detailed error messages)

caller_line

Line in file (for more detailed error messages)

Returns:

memory identifier or 0

rpc_ptr_id_namespace rcf_pch_mem_ns_generic(void)

Determine a namespace id for generic namespace

Returns:

namespace id

te_errno rcf_pch_mem_ns_get_index(const char* ns_string, rpc_ptr_id_namespace* ns_id)

Determine a namespace id by the string of namespace

Parameters:

ns_string

Namespace as string

ns_id

Namespace id

Returns:

Status code

te_errno rcf_pch_mem_ns_get_string(rpc_ptr_id_namespace ns_id, const char** ns_string)

Determine a string of namespace by the namespace id

Parameters:

ns_id

Namespace id

ns_string

Namespace as string

Returns:

Status code

static te_errno rcf_pch_mem_ns_create_if_needed(rpc_ptr_id_namespace* ns_id, const char* ns_str, const char* caller_func, int caller_line)

Associate a variable with the namespace id.

Parameters:

ns_id

Variable name for namespace id

ns_str

Namespace as string

caller_func

Name of function (for more detailed error messages)

caller_line

Line in file (for more detailed error messages)

static int shut_how_rpc2h(rpc_shut_how how)

Convert shutdown parameter from RPC to native representation.

FIXME: Move it to lib/rpc_types.

bool tarpc_dynamic_library_loaded(void)

Get the loading status of dynamic library.

Returns:

true if dynamic library loaded

int tarpc_find_func(tarpc_lib_flags lib_flags, const char* name, api_func* func)

Find the function by its name.

Parameters:

lib_flags

how to resolve function name

name

function name

func

location for function address

Returns:

status code

typedef STAILQ_HEAD(checked_arg_list, checked_arg)

List of checked argguments

void tarpc_init_checked_arg(checked_arg_list* list, uint8_t* real_arg, size_t len, size_t len_visible, const char* name)

Initialise the checked argument and add it into the list

te_errno tarpc_check_args(checked_arg_list* list)

Verify that arguments are not corrupted

void te_rpc_error_set_target(tarpc_out_arg* out_common)

Set location where to update error number and message when te_rpc_error_set() is called. This function also clears other fields of te_rpc_err.

Parameters:

out_common

Where to set error number and message so that they will be reported to RPC caller. If NULL is passed, then the following calls of te_rpc_error_set() will print error message instead of doing anything.

void te_rpc_error_set(te_errno err, const char* msg, ...)

Save information about error occurred during RPC call which will be reported to caller.

If this function is not used (or err is set to 0), errno value will be reported to caller.

Parameters:

err

Error number.

msg

Format string for error message.

Arguments for format string.

te_errno te_rpc_error_get_num(void)

Get error number set with te_rpc_error_set() the last time.

Returns:

Error number.

int tarpc_mutex_lock(pthread_mutex_t* mutex)

Call pthread_mutex_lock(), report error with te_rpc_error_set() if it failed.

Parameters:

mutex

Mutex to lock.

Returns:

Return value of pthread_mutex_lock().

int tarpc_mutex_unlock(pthread_mutex_t* mutex)

Call pthread_mutex_unlock(), report error with te_rpc_error_set() if it failed.

Parameters:

mutex

Mutex to unlock.

Returns:

Return value of pthread_mutex_unlock().

void tarpc_before_call(struct rpc_call_data* call, const char* id)

Do some preparations before passing an call to a real function:

  • probably wait for a specific deadline

  • record a starting timestamp

  • save errno

  • do logging

This function is normally only called from inside MAKE_CALL()

See also:

tarpc_after_call()

void tarpc_after_call(struct rpc_call_data* call)

Do some postprocessing after the real RPC work is done:

  • record errno status

  • record call duration

  • check the registered checked args validity

This function is normally only called from inside MAKE_CALL()

See also:

tarpc_before_call()

void tarpc_generic_service(deferred_call_list* list, rpc_call_data* call)

Generic RPC handler. It does all preparations, most imporant

  • copy arguments

  • set up an asynchronous call context if needed and then calls the real code

void* rcf_pch_rpc_server(const char* name)

Entry function for RPC server.

Parameters:

name

RPC server name

Returns:

NULL

void rcf_pch_rpc_server_argv(int argc, char** argv)

Wrapper to call rcf_pch_rpc_server via “ta exec func” mechanism.

Parameters:

argc

should be 1

argv

should contain pointer to RPC server name

te_errno rpcserver_plugin_enable(const char* install, const char* action, const char* uninstall)

Find all callbacks and enable the RPC server plugin.

Parameters:

install

Function name for install plugin or empty string or NULL

action

Function name for plugin action or empty string or NULL

uninstall

Function name for uninstall plugin or empty string or NULL

Returns:

Status code

te_errno rpcserver_plugin_disable(void)

Disable the RPC server plugin.

Returns:

Status code

void signal_registrar(int signum)

Special signal handler which registers signals.

Parameters:

signum

received signal

void signal_registrar_siginfo(int signum, siginfo_t* siginfo, void* context)

Special signal handler which registers signals and also saves signal information.

Parameters:

signum

received signal

siginfo

pointer to siginfo_t structure

context

pointer to user context

void tarpc_close_fd_hooks_call(int fd)

Call FD close hooks if they are registered.

Parameters:

fd

FD to be closed.

int tarpc_close_fd_hook_register(tarpc_close_fd_hook* hook, void* cookie)

Register FD close hook (which will be called just before FD is closed in implementations of RPC calls like rpc_close()).

The same hook may be registered more than once with the same cookie. All the registered hooks are called before FD is closed. FD should be closed even if some hook fails, unless it is dup2()/dup3() call which will not be executed in such case.

Close because of exit() or CLOEXEC does not result in calling these hooks.

Parameters:

hook

FD close hook.

cookie

Pointer to be passed to each invocation of the hook.

Returns:

0 on success, -1 on failure.

int tarpc_close_fd_hook_unregister(tarpc_close_fd_hook* hook, void* cookie)

Unregister FD close hook.

If there is more than one hook matching the parameters, the last one will be removed.

Parameters:

hook

FD close hook.

cookie

Pointer specified when registering the hook.

Returns:

0 on success, -1 on failure.

int tarpc_call_close_with_hooks(api_func close_func, int fd)

Call close hooks and then closing function.

Parameters:

close_func

Closing function to call.

fd

File descriptor.

Returns:

0 on success, -1 on failure.

te_errno tarpc_fill_buff_with_sequence(char* buf, int size, tarpc_pat_gen_arg* arg)

Fill a buffer with values provided by get_nth_elm().

Parameters:

buf

Buffer

size

Buffer size

arg

Pointer to tarpc_pat_gen_arg structure, where

  • coef1 is a starting number in a sequence

Returns:

Status code.

te_errno tarpc_fill_buff_with_sequence_lcg(char* buf, int size, tarpc_pat_gen_arg* arg)

Fills the buffer with a linear congruential sequence and updates arg parameter for the next call.

Each element is calculated using the formula: X[n] = a * X[n-1] + c, where a and c are taken from arg parameter:

  • a is arg->coef2,

  • c is arg->coef3

Before calling this function you should remember offset field from arg

  • it will be start position of the requested data in the buffer. The call of this function sets it for the next call.

Parameters:

buf

Buffer

size

How many bytes to fill (buffer should be larger by at least TARPC_LCG_MAX_OFFSET bytes)

arg

Pointer to tarpc_pat_gen_arg structure, where:

  • coef1 is x0 - starting number in a sequence;

  • coef2 is a - multiplying constant;

  • coef3 is c - additive constant;

  • offset - position at which requested data will start in the buffer (algorithm uses 4-byte words internally, so it is possible that some bytes at the beginning should be omitted)

Returns:

Status code.

void rpcs_iovec_tarpc2h(const struct tarpc_iovec* tarpc_iov, struct iovec* iov, size_t count, bool may_change, checked_arg_list* arglist)

Fill array of iovec structures with data from array of tarpc_iovec structures.

Parameters:

tarpc_iov

Array of tarpc_iovec structures.

iov

Array of iovec structures.

count

Number of elements in the arrays.

may_change

If true, INIT_CHECKED_ARG() should allow change of data in iovecs, otherwise it should not. The first option is meant for readv()-like calls, the second - for writev()-like ones.

arglist

Pointer to list of RPC call arguments which are checked after target function call (to ensure that the target function changes only what it is supposed to).

te_errno rpcs_msghdr_tarpc2h(rpcs_msghdr_check_args_mode check_args, const struct tarpc_msghdr* tarpc_msg, rpcs_msghdr_helper* helper, struct msghdr* msg, checked_arg_list* arglist, const char* name_fmt, ...)

Convert tarpc_msghdr to struct msghdr (rpcs_msghdr_h2tarpc() should be used for reverse conversion after RPC call).

Parameters:

check_args

How to check arguments for unexpected changes after target function call.

tarpc_msg

tarpc_msghdr value to convert.

helper

Helper structure storing auxiliary data for converted value.

msg

Where to save converted value.

arglist

Pointer to list of variable-length arguments which are checked after target function call (to ensure that the target function changes only what it is supposed to).

name_fmt

Format string for base name for arguments which will be added to arglist (“msg”, “msgs[3]”, etc).

Format string arguments.

Returns:

Status code.

See also:

rpcs_msghdr_h2tarpc, rpcs_msghdr_helper_clean

te_errno te_errno rpcs_msghdr_h2tarpc(const struct msghdr* msg, const rpcs_msghdr_helper* helper, struct tarpc_msghdr* tarpc_msg)

Convert struct msghdr back to tarpc_msghdr (i.e. this function should be used after rpcs_msghdr_tarpc2h()).

Parameters:

msg

msghdr to convert.

helper

Helper structure passed to rpcs_msghdr_tarpc2h() for this msg.

tarpc_msg

Where to save converted value.

Returns:

Status code.

See also:

rpcs_msghdr_tarpc2h

void rpcs_msghdr_helper_clean(rpcs_msghdr_helper* h, struct msghdr* msg)

Release memory allocated for rpcs_msghdr_helper and struct msghdr after calling rpcs_msghdr_tarpc2h().

Parameters:

h

Pointer to rpcs_msghdr_helper.

msg

Pointer to struct msghdr.

See also:

rpcs_msghdr_tarpc2h

te_errno rpcs_mmsghdrs_tarpc2h(rpcs_msghdr_check_args_mode check_args, const tarpc_mmsghdr* tarpc_mmsgs, unsigned int num, rpcs_msghdr_helper** helpers, struct mmsghdr** mmsgs, checked_arg_list* arglist)

Convert array of tarpc_mmsghdr structures to array of mmsghdr structures.

Use rpcs_mmsghdrs_helpers_clean() to release memory after calling this function.

Parameters:

check_args

How to check arguments for unexpected changes after target function call.

tarpc_mmsgs

Pointer to array of tarpc_mmsghdr structures.

num

Number of elements in tarpc_mmsgs.

helpers

Where to save pointer to array of helper structures storing auxiliary data for converted values.

mmsgs

Where to save pointer to array of mmsghdr structures.

arglist

Pointer to list of variable-length arguments which are checked after target function call (to ensure that the target function changes only what it is supposed to).

Returns:

Status code.

See also:

rpcs_mmsghdrs_h2tarpc, rpcs_mmsghdrs_helpers_clean

te_errno rpcs_mmsghdrs_h2tarpc(const struct mmsghdr* mmsgs, const rpcs_msghdr_helper* helpers, struct tarpc_mmsghdr* tarpc_mmsgs, unsigned int num)

Convert array of mmsghdr structures back to array of tarpc_mmsghdr structures.

This function should be used after rpcs_mmsghdrs_tarpc2h().

Parameters:

mmsgs

Pointer to array of mmsghdr structures.

helpers

Pointer to array of helper structures storing auxiliary data for converted values.

tarpc_mmsgs

Pointer to array of tarpc_mmsghdr structures.

num

Number of elements in arrays.

Returns:

Status code.

See also:

rpcs_mmsghdrs_tarpc2h, rpcs_mmsghdrs_helpers_clean

void rpcs_mmsghdrs_helpers_clean(rpcs_msghdr_helper* helpers, struct mmsghdr* mmsgs, unsigned int num)

Release memory allocated for arrays after calling rpcs_mmsghdrs_tarpc2h().

Parameters:

helpers

Pointer to array of rpcs_msghdr_helper structures.

mmsgs

Pointer to array of mmsghdr structures.

num

Number of elements in arrays.

te_errno rpc_transport_init(const char* tmp_path)

Initialize RPC transport.

Parameters:

tmp_path

Path to folder where temporary files should be stored

void rpc_transport_shutdown(void)

Shutdown RPC transport.

te_errno rpc_transport_connect_rpcserver(const char* name, rpc_transport_handle* p_handle)

Await connection from RPC server.

Parameters:

name

name of the RPC server

p_handle

connection handle location

Returns:

Status code.

te_errno rpc_transport_connect_ta(const char* name, rpc_transport_handle* p_handle)

Connect from RPC server to Test Agent

Parameters:

name

name of the RPC server

p_handle

connection handle location

Returns:

Status code.

void rpc_transport_close(rpc_transport_handle handle)

Break the connection.

Parameters:

handle

connection handle

void rpc_transport_read_set_init(void)

Reset set of descriptors to wait.

void rpc_transport_read_set_add(rpc_transport_handle handle)

Add the handle to the read set.

Parameters:

handle

connection handle

bool rpc_transport_read_set_wait(int timeout)

Wait for the read event.

Parameters:

timeout

timeout in seconds

Returns:

true is the read event is received or false otherwise

bool rpc_transport_is_readable(rpc_transport_handle handle)

Check if data are pending on the connection.

Parameters:

handle

connection handle

Returns:

true is data are pending or false otherwise

te_errno rpc_transport_recv(rpc_transport_handle handle, uint8_t* buf, size_t* p_len, int timeout)

Receive message with specified timeout.

Parameters:

handle

connection handle

buf

buffer for reading

p_len

IN: buffer length; OUT: length of received message

timeout

timeout in seconds

TE_ETIMEDOUT

Timeout ocurred

TE_ECONNRESET

Connection is broken

TE_ENOMEM

Message is too long

Returns:

Status code.

te_errno rpc_transport_send(rpc_transport_handle handle, const uint8_t* buf, size_t len)

Send message.

Parameters:

handle

connection handle

buf

buffer for writing

len

message length

TE_ECONNRESET

Connection is broken

Returns:

Status code.

rpc_info* rpc_find_info(const char* name)

Find information corresponding to RPC function by its name.

Parameters:

name

base function name

Returns:

function information structure address or NULL

int rpc_xdr_encode_call(const char* name, void* buf, size_t* buflen, void* objp)

Encode RPC call with specified name.

Parameters:

name

RPC name

buf

buffer for encoded data

buflen

length of the buf (IN) / length of the data (OUT)

objp

input parameters structure, for example pointer to structure tarpc_bind_in

TE_ENOENT

No such function

TE_ESUNRPC

Buffer is too small or another encoding error ocurred

Returns:

Status code

int rpc_xdr_encode_result(const char* name, bool rc, void* buf, size_t* buflen, void* objp)

Encode RPC result.

Parameters:

name

RPC name

buf

buffer for encoded data

buflen

length of the buf (IN) / length of the (OUT)

rc

value returned by RPC

objp

output parameters structure, for example pointer to structure tarpc_bind_out

TE_ESUNRPC

Buffer is too small or another encoding error ocurred

Returns:

Status code

int rpc_xdr_decode_call(void* buf, size_t buflen, char* name, void** objp)

Decode RPC call.

Parameters:

buf

buffer with encoded data

buflen

length of the data

name

RPC name location (length >= RCF_RPC_MAX_NAME)

objp

C structure for input parameters to be allocated and filled

Returns:

Status code

int rpc_xdr_decode_result(const char* name, void* buf, size_t buflen, void* objp)

Decode RPC result.

Parameters:

name

RPC name

buf

buffer with encoded data

buflen

length of the data

objp

C structure for input parameters to be filled

Returns:

Status code (if rc attribute of result is false, an error should be returned)

te_errno rpc_xdr_inspect_call(const void* buf, size_t buflen, char* name, struct tarpc_in_arg* common)

Decode only the common part of the RPC call

Unlike rpc_xdr_decode_call(), this is a pointer to memory provided by the caller, not allocated by the function

Parameters:

buf

buffer with encoded data

buflen

length of the data

name

RPC name location (length >= RCF_RPC_MAX_NAME)

common

Decode common input parameters

Returns:

Status code

te_errno rpc_xdr_inspect_result(const void* buf, size_t buflen, struct tarpc_out_arg* common)

Decode only the common part of the RPC result.

Parameters:

buf

buffer with encoded data

buflen

length of the data

common

Decode common output parameters

Returns:

Status code (if rc attribute of result is false, an error should be returned)

void rpc_xdr_free(rpc_arg_func func, void* objp)

Free RPC C structure.

Parameters:

func

XDR function

objp

C structure pointer

union tarpc_sa_data switch(tarpc_socket_addr_family type)

‘type’ is the same as ‘family’, but defines real representation

union tarpc_ethtool_data switch(tarpc_ethtool_type type)

struct ethtool_*

bool_t xmlxdr_uint8_t(XDR* xdrs, uint8_t* ip)

Conversion procedures for base data types. These are analogs to SUN RPC base data types conversion procedures, used in RPC XML.

void start_compound_data(void* data, const XML_Char* elem, const XML_Char** atts)

Parser handlers for structure data types

bool_t xdrxml_create(XDR* xdrs, caddr_t buf, u_int buflen, rpc_xml_op op, bool_t rc, const char* name, enum xdr_op x_op)

Initializes XDR structure to perform further conversions.

Parameters:

xdrs

XDR structure

buf

buffer to contain xml document representing transmitting data

buflen

buffer size

op

rpc_xml_call or rpc_xml_result

rc

true or false, used only when op is rpc_xml_result

name

call/result name

x_op

XDR_ENCODE, XDR_DECODE of XDR_FREE

Returns:

true or false (in case of memory allocation failure)

bool_t xdrxml_return_code(XDR* xdrs)

Free memory allocated during XDR structure initializing in xdrxml_create()

Parameters:

xdrs

XDR structure

bool_t xdrxml_free(XDR* xdrs)

Return rc containing in xml document attached to XDR structure

Parameters:

xdrs

XDR structure

static __always_inline int te_xdp_get_u16_ho(__u8* p, __u8*const p_end, __u16* result)

Get uint16 value from a packet in XDP program (converting it to host byte order).

Parameters:

p

Where to get value

p_end

Pointer to the end of packet

result

Where to save obtained value

0

Success

-1

Failure

Returns:

Status code

static __always_inline int te_xdp_skip_bytes(__u8** p, __u8*const p_end, int num)

Advance current offset checking that it is still inside the packet.

Parameters:

p

Pointer to the pointer holding current position

p_end

Pointer to the end of packet

num

How many bytes to skip

0

Success

-1

Failure

Returns:

Status code

static __always_inline int te_xdp_skip_vlan(__u8** p, __u8*const p_end)

Skip VLAN tag in Ethernet header.

Parameters:

p

Pointer to the pointer holding current position

p_end

Pointer to the end of packet

0

Success (if there is no VLAN tag, success is returned)

-1

Failure (not enough bytes in the packet)

Returns:

Status code

static __always_inline int te_xdp_parse_ipv4(te_xdp_frame* frame)

Parse IPv4 header (it is assumed that it is level 2 header in Ethernet frame).

Parameters:

frame

Pointer to frame structure

0

Success

-1

Failure

Returns:

Status code

static __always_inline int te_xdp_parse_ipv6(te_xdp_frame* frame)

Parse IPv6 header (it is assumed that it is level 2 header in Ethernet frame).

Parameters:

frame

Pointer to frame structure

0

Success

-1

Failure

Returns:

Status code

static __always_inline int te_xdp_parse_eth_frame(te_xdp_frame* frame)

Parse headers in Ethernet frame, saving pointers to discovered headers and their types in the frame structure.

Parameters:

frame

Pointer to frame structure

0

Success

-1

Failure

Returns:

Status code

static __always_inline int te_xdp_frame_match_ip_tcpudp(const te_xdp_frame* frame, te_bpf_ip_tcpudp_filter* filter)

Check whether a parsed frame matches a given IP+TCP/UDP filter.

Parameters:

frame

Frame structure

filter

Filter structure

1

Matched

0

Not matched

Returns:

Matching result

te_errno ta_restconf_conf_init(void)

Initialize the RESTCONF agent configuration subtrees and default settings.

Returns:

Status code.

te_errno ta_restconf_conf_server_init(void)

Initialize the RESTCONF agent /config/server configuration subtree.

Returns:

Status code.

te_errno ta_restconf_conf_search_init(void)

Initialize the RESTCONF agent /config/search configuration subtree.

Returns:

Status code.

te_errno tad_arp_init_cb(csap_p csap, unsigned int layer)

Callback to initialize ‘arp’ CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_arp_destroy_cb(csap_p csap, unsigned int layer)

Callback to destroy ‘arp’ CSAP layer.

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_arp_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with ARP CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_arp_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with ARP CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_arp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_arp_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_do_cb_t prototype.

te_errno tad_atm_rw_init_cb(csap_p csap)

Callback for init ‘atm’ CSAP layer if single in stack.

The function complies with csap_rw_init_cb_t prototype.

te_errno tad_atm_rw_destroy_cb(csap_p csap)

Callback for destroy ‘atm’ CSAP layer if single in stack.

The function complies with csap_rw_destroy_cb_t prototype.

te_errno tad_atm_prepare_send(csap_p csap)

Open transmit socket for ATM CSAP.

The function complies with csap_low_resource_cb_t prototype.

te_errno tad_atm_shutdown_send(csap_p csap)

Close transmit socket for ATM CSAP.

The function complies with csap_low_resource_cb_t prototype.

te_errno tad_atm_write_cb(csap_p csap, const tad_pkt* pkt)

Callback for write data to media of ATM CSAP.

The function complies with csap_write_cb_t prototype.

te_errno tad_atm_prepare_recv(csap_p csap)

Open receive socket for ATM CSAP.

The function complies with csap_low_resource_cb_t prototype.

te_errno tad_atm_shutdown_recv(csap_p csap)

Close receive socket for ATM CSAP.

The function complies with csap_low_resource_cb_t prototype.

te_errno tad_atm_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len)

Callback for read data from media of ATM CSAP.

The function complies with csap_read_cb_t prototype.

te_errno tad_atm_init_cb(csap_p csap, unsigned int layer)

Callback to initialize ‘atm’ CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_atm_destroy_cb(csap_p csap, unsigned int layer)

Callback to destroy ‘atm’ CSAP layer.

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_atm_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with ATM CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_atm_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with ATM CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

void tad_atm_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release PDU with ATM layer private data.

The function complies with csap_layer_release_opaque_cb_t prototype.

te_errno tad_atm_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_atm_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_do_cb_t prototype.

te_errno tad_aal5_init_cb(csap_p csap, unsigned int layer)

Callback to initialize ‘aal5’ CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_aal5_destroy_cb(csap_p csap, unsigned int layer)

Callback to destroy ‘aal5’ CSAP layer.

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_aal5_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with ATM CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_aal5_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with ATM CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_aal5_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_aal5_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_bin_cb_t prototype.

uint32_t calculate_crc32(uint32_t previous_value, uint8_t* next_pkt, size_t next_len)

Calculate CRC32 hash value for new portion of data, using ready value for previous data. If there are no previous data, pass 0xffffffff as ‘previous_value’.

Parameters:

previous_value

Ready CRC32 value for previous data block.

next_pkt

Pointer to new portion of data.

next_len

Length of new portion of data.

Returns:

updated CRC32 value or zero if NULL pointer passed.

te_errno tad_bridge_eth_init_cb(csap_p csap, unsigned int layer, const asn_value* csap_nds)

Callback for init ‘bridge’ CSAP layer over ‘eth’ in stack.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_bridge_eth_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy ‘bridge’ CSAP layer over ‘eth’ in stack.

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_bridge_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with ehternet CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_bridge_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with ehternet CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_bridge_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_bridge_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_bin_cb_t prototype.

te_errno tad_bridge_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** ptrn_pdu)

Callback for generating pattern to filter just one response to the packet which will be sent by this CSAP according to this template.

The function complies with csap_layer_gen_pattern_cb_t prototype.

void free_bridge_csap_data(bridge_csap_specific_data_p spec_data, char is_complete)

Free all memory allocated by eth csap specific data.

Parameters:

spec_data

Poiner to structure

is_complete

If not 0 the final free() will be called on passed pointer

te_errno tad_cli_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len)

Callback for read data from media of CLI CSAP.

The function complies with csap_read_cb_t prototype.

te_errno tad_cli_write_cb(csap_p csap, const tad_pkt* pkt)

Callback for write data to media of CLI CSAP.

The function complies with csap_write_cb_t prototype.

te_errno tad_cli_write_read_cb(csap_p csap, unsigned int timeout, const tad_pkt* w_pkt, tad_pkt* r_pkt, size_t* r_pkt_len)

Callback for write data to media of CLI CSAP and read data from media just after write, to get answer to sent request.

The function complies with csap_write_read_cb_t prototype.

te_errno tad_cli_rw_init_cb(csap_p csap)

Callback for init ‘file’ CSAP layer.

The function complies with csap_rw_init_cb_t prototype.

te_errno tad_cli_rw_destroy_cb(csap_p csap)

Callback for destroy ‘file’ CSAP layer.

The function complies with csap_rw_destroy_cb_t prototype.

te_errno tad_cli_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_cli_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_bin_cb_t prototype.

te_errno tad_cli_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** pattern_pdu)

Callback for generating pattern to filter just one response to the packet which will be sent by this CSAP according to this template.

The function complies with csap_layer_gen_pattern_cb_t prototype.

void free_cli_csap_data(cli_csap_specific_data_p spec_data)

Free all memory allocated by cli csap specific data

Parameters:

spec_data

poiner to structure

void csap_id_init(void)

Initialize CSAP IDs database.

void csap_id_destroy(void)

Destroy CSAP IDs database.

csap_handle_t csap_id_new(void* ptr)

Allocate a new CSAP ID and associate it with specified pointer.

Parameters:

ptr

Associated pointer (must be not equal to NULL)

Returns:

A new CSAP ID or CSAP_INVALID_HANDLE

void* csap_id_get(csap_handle_t csap_id)

Get pointer associated with CSAP ID.

Parameters:

csap_id

CSAP ID

Returns:

Associated pointer or NULL

void* csap_id_delete(csap_handle_t csap_id)

Forget CSAP ID.

Parameters:

csap_id

CSAP ID

Returns:

Associated pointer or NULL

void csap_id_enum(csap_id_enum_cb cb, void* opaque)

Enumerate all known CSAP IDs.

It is allowed to delete enumerated item from callback.

Parameters:

cb

Function to be called for each CSAP ID

opaque

User opaque data

te_errno tad_dhcp_rw_init_cb(csap_p csap)

Callback for init ‘file’ CSAP layer as read/write layer.

The function complies with csap_rw_init_cb_t prototype.

te_errno tad_dhcp_rw_destroy_cb(csap_p csap)

Callback for destroy ‘file’ CSAP layer as read/write layer.

The function complies with csap_rw_destroy_cb_t prototype.

te_errno tad_dhcp_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len)

Callback for read data from media of DHCP CSAP.

The function complies with csap_read_cb_t prototype.

te_errno tad_dhcp_write_cb(csap_p csap, const tad_pkt* pkt)

Callback for write data to media of DHCP CSAP.

The function complies with csap_write_cb_t prototype.

char* tad_dhcp_get_param_cb(csap_p csap, unsigned int layer, const char* param)

Callback for read parameter value of DHCP CSAP.

The function complies with csap_layer_get_param_cb_t prototype.

te_errno tad_dhcp_init_cb(csap_p csap, unsigned int layer)

Callback for init ‘dhcp’ CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_dhcp_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy ‘dhcp’ CSAP layer.

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_dhcp_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with DHCP CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_dhcp_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with DHCP CSAP arameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_dhcp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_dhcp_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_do_cb_t prototype.

void tad_dhcp_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release data prepared by confirm callback or packet match.

The function complies with csap_layer_release_opaque_cb_t prototype.

te_errno tad_dhcp_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** ptrn_pdu)

Callback for generating pattern to filter just one response to the packet which will be sent by this CSAP according to this template.

The function complies with csap_layer_gen_pattern_cb_t prototype.

te_errno tad_dhcp6_init_cb(csap_p csap, unsigned int layer)

Callback for init ‘dhcp6’ CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_dhcp6_rw_init_cb(csap_p csap)

Callback for init ‘file’ CSAP layer as read/write layer.

The function complies with csap_rw_init_cb_t prototype.

te_errno tad_dhcp6_write_cb(csap_p csap, const tad_pkt* pkt)

Callback for write data to media of DHCPv6 CSAP.

The function complies with csap_write_cb_t prototype.

te_errno tad_dhcp6_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with DHCP6 CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_dhcp6_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_dhcp6_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** ptrn_pdu)

Callback for generating pattern to filter just one response to the packet which will be sent by this CSAP according to this template.

The function complies with csap_layer_gen_pattern_cb_t prototype.

te_errno tad_eth_rw_init_cb(csap_p csap)

Callback for init ‘eth’ CSAP layer if single in stack.

The function complies with csap_rw_init_cb_t prototype.

te_errno tad_eth_rw_destroy_cb(csap_p csap)

Callback for destroy ‘eth’ CSAP layer if single in stack.

The function complies with csap_rw_destroy_cb_t prototype.

te_errno tad_eth_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len)

Callback for read data from media of Ethernet CSAP.

The function complies with csap_read_cb_t prototype.

te_errno tad_eth_prepare_send(csap_p csap)

Open transmit socket for Ethernet CSAP.

The function complies with csap_low_resource_cb_t prototype.

te_errno tad_eth_shutdown_send(csap_p csap)

Close transmit socket for Ethernet CSAP.

The function complies with csap_low_resource_cb_t prototype.

te_errno tad_eth_write_cb(csap_p csap, const tad_pkt* pkt)

Callback for write data to media of Ethernet CSAP.

The function complies with csap_write_cb_t prototype.

te_errno tad_eth_prepare_recv(csap_p csap)

Open receive socket for Ethernet CSAP.

The function complies with csap_low_resource_cb_t prototype.

te_errno tad_eth_shutdown_recv(csap_p csap)

Close receive socket for Ethernet CSAP.

The function complies with csap_low_resource_cb_t prototype.

te_errno tad_eth_init_cb(csap_p csap, unsigned int layer)

Callback to initialize ‘eth’ CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_eth_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy ‘eth’ CSAP layer.

The function complies with csap_destroy_cb_t prototype.

char* tad_eth_get_param_cb(csap_p csap, unsigned int layer, const char* param)

Callback for read parameter value of Ethernet CSAP.

The function complies with csap_layer_get_param_cb_t prototype.

te_errno tad_eth_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with Ethernet protocol CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_eth_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with Ethernet protocol CSAP arameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_eth_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_eth_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_do_cb_t prototype.

void tad_eth_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release data prepared by confirm callback or packet match.

The function complies with csap_layer_release_opaque_cb_t prototype.

int eth_echo_method(csap_p csap, uint8_t* pkt, size_t len)

Ethernet echo CSAP method. Method should prepare binary data to be send as “echo” and call respective write method to send it. Method may change data stored at passed location.

Parameters:

csap

identifier of CSAP

pkt

Got packet, plain binary data.

len

length of data.

Returns:

zero on success or error code.

int tadf_add_forw_task(const char* forw_asn_spec, int sendq_id)

Create new forw task with specified parameters, associate it with specified send queue.

Parameters:

forw_asn_spec

Textual presentation of ASN value with parameters for new forwareder task

sendq_id

ID of send queue

Returns:

zero on success or error status

int tadf_del_forw_task(const char* forw_name)

Destroy specified forw task.

Parameters:

forw_name

Name of forw task to be destroyed

Returns:

zero on success or error status

int tadf_forw_task_set_param(const char* forw_name, const char* param_spec, int value)

Set parameter of specified forw task, not stopping its functionality.

Parameters:

forw_name

Name of forw task whose parameter should be changed

param_spec

Name of parameter to be changed, it should be correct ASN label of field in forw_task ASN specification, passed during forw task creation

value

New value of parameter

Returns:

zero on success or error status

int tadf_forw_packet(csap_p csap_descr, const char* forw_name, const uint8_t* pkt, size_t pkt_len)

Process packet via specified forw task. It includes: make drop, delay, and reorder (if specifed) and put it into send queue, which is attached to this forw task.

Parameters:

forw_name

Name of forw task

pkt

Pointer to the packet data

pkt_len

Length of packet

Returns:

zero on success or error status

void tadf_sendq_list_create(void)

This function inits the sendq_list and sendq list mutex lock.

int tadf_sendq_list_destroy(void)

Function destroyes the sendq list. All sendqs in the list are also destroyed.

Returns:

0 - if the list was destroyed correctly errno - otherwise

int tadf_sendq_list_clear(void)

Function cleares the sendq list. All sendqs from are destroyed.

Returns:

0 - if the list was destroyed correctly errno - otherwise

sendq_t* tadf_sendq_find(int sendq_id)

Function returns pointer to the sendq with the corresponding ID.

Parameters:

sendq_id

ID of the sendq to search for.

Returns:

Pointer to the sendq, even if it is NULL, NULL is also returned in case the sendq_id is out of range

int tadf_sendq_create(csap_handle_t csap_id, int bandwidth, int size_max)

Function creates sendq in the sendq_list. Function choses the first free place in the sendq_list and puts the created sendq there.

Parameters:

csap_id

Id of CSAP via which the data should be sent

bandwidth

Required Send Queue bandwidth

size_max

Required Send Queue buffer size

Returns:

ID of the created sendq if the function ends correctly, or -1 on error

int tadf_sendq_destroy(int sendq_id)

Function destroyes the sendq due to the sendq ID. The sendq_list[ID] is set to NULL.

Parameters:

sendq_id

The ID of the sendq to be destroyed.

Returns:

0 - if the function ends correctly TE_EINVAL - if there is no sendq with such ID

int tadf_sendq_set_param(int sendq_id, const char* param_spec, int value)

Sets the parameter of the send queue due to parameter name and new value.

Parameters:

sendq_id

The ID of the queue the parameter of which should be changed.

param_spec

The name of the parameter in human-readable form.

value

New value of the parameter.*

Returns:

0 - if the function ends correctly TE_EINVAL - if there is no such parameter

int tadf_sendq_get_param(int sendq_id, const char* param_spec)

Gets the parameter of the send queue due to parameter name.

Parameters:

sendq_id

The ID of the queue the parameter of which should be outputed.

param_spec

The name of the parameter in human-readable form.

Returns:

Value of the parameter or -1 if there is no parameter with such name.

int tadf_sendq_init(sendq_t** queue, csap_p csap, int bandwidth, int size_max)

This function initializes the objects of the send queue: 1) sendq parameters 2) sendq mutex lock 3) sending thread of the send queue 4) sync pipe

Parameters:

queue

Location for pointer to the initalised queue structure (OUT)

csap

Pointer to the descriptor of destination CSAP

bandwidth

Required Send Queue bandwidth

size_max

Required Send Queue buffer size

Returns:

0 - if the function ends correctly errno - otherwise

int tadf_sendq_free(sendq_t* queue)

This function destroyes the send queue and all related objects.

Parameters:

queue

The send queue to be destroyed.

Returns:

0 - if the function ends correctly errno - otherwise

void* tadf_sendq_send_thread_main(void* queue)

The main sending thread function. The function sends packets to their destination using write_cb of the corresponding CSAP.

Parameters:

queue

The queue the thread should work with

Returns:

0 - if the thread exits correctly -1 - otherwise

int tadf_sendq_put_pkt(sendq_t* queue, const uint8_t* pkt, const size_t pkt_len, struct timeval mdump)

This function puts packet in the send queue due to the send time. If the packet inserted to the top of the send queue, the function informs sending thread via send queue sync pipe.

Parameters:

queue

The queue the packet should be putted to.

pkt

Packet data.

pkt_len

The length of the packet data, including headers.

mdump

The time packet should be send at.

Returns:

0 - if the packet was inserted correctly errno - otherwise

static int timeval_compare(struct timeval tv1, struct timeval tv2)

Compares two time values.

Parameters:

tv1

First timeval

tv2

Second timeval

-1

if tv1 is earlier then tv2.

0

if tv1 is equal to tv2.

1

if tv1 is later then tv2.

te_errno tad_frame_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_frame_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for initialize pattern opaque data.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

void tad_frame_release_ptrn_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release pattern opaque data.

The function complies with csap_layer_release_opaque_cb_t prototype.

te_errno tad_frame_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_do_cb_t prototype.

te_errno tad_geneve_init_cb(csap_p csap, unsigned int layer_idx)

Initialize ‘geneve’ CSAP layer protocol-specific data (the function complies with ‘csap_layer_init_cb_t’ prototype)

te_errno tad_geneve_destroy_cb(csap_p csap, unsigned int layer_idx)

Teardown ‘geneve’ CSAP layer protocol-specific data (the function complies with ‘csap_layer_destroy_cb_t’ prototype)

void tad_geneve_release_pdu_cb(csap_p csap, unsigned int layer_idx, void* opaque)

Teardown Geneve data prepared by confirm callback or packet match (the function complies with ‘csap_layer_release_opaque_cb_t’ prototype)

te_errno tad_geneve_confirm_tmpl_cb(csap_p csap, unsigned int layer_idx, asn_value* layer_pdu, void** p_opaque)

Confirm template PDU with respect to Geneve CSAP parameters and possibilities (the function complies with ‘csap_layer_confirm_pdu_cb_t’ prototype)

te_errno tad_geneve_gen_bin_cb(csap_p csap, unsigned int layer_idx, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Generate Geneve binary data (the function complies with ‘csap_layer_generate_pkts_cb_t’ prototype)

te_errno tad_geneve_confirm_ptrn_cb(csap_p csap, unsigned int layer_idx, asn_value* layer_pdu, void** p_opaque)

Confirm pattern PDU with respect to Geneve CSAP parameters and possibilities (the function complies with ‘csap_layer_confirm_pdu_cb_t’ prototype)

te_errno tad_geneve_match_post_cb(csap_p csap, unsigned int layer_idx, tad_recv_pkt_layer* meta_pkt_layer)

Generate a meta packet Geneve NDS per a packet received (if need be) (the function complies with ‘csap_layer_match_post_cb_t’ prototype)

te_errno tad_geneve_match_do_cb(csap_p csap, unsigned int layer_idx, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Parse a packet received and match it against the pattern’s Geneve PDU (the function complies with ‘csap_layer_match_do_cb_t’ prototype)

te_errno tad_gre_init_cb(csap_p csap, unsigned int layer_idx)

Initialize ‘gre’ CSAP layer protocol-specific data (the function complies with ‘csap_layer_init_cb_t’ prototype)

te_errno tad_gre_destroy_cb(csap_p csap, unsigned int layer_idx)

Teardown ‘gre’ CSAP layer protocol-specific data (the function complies with ‘csap_layer_destroy_cb_t’ prototype)

void tad_gre_release_pdu_cb(csap_p csap, unsigned int layer_idx, void* opaque)

Teardown GRE data prepared by confirm callback or packet match (the function complies with ‘csap_layer_release_opaque_cb_t’ prototype)

te_errno tad_gre_confirm_tmpl_cb(csap_p csap, unsigned int layer_idx, asn_value* layer_pdu, void** p_opaque)

Confirm template PDU with respect to GRE CSAP parameters and possibilities (the function complies with ‘csap_layer_confirm_pdu_cb_t’ prototype)

te_errno tad_gre_gen_bin_cb(csap_p csap, unsigned int layer_idx, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Generate GRE binary data (the function complies with ‘csap_layer_generate_pkts_cb_t’ prototype)

te_errno tad_gre_confirm_ptrn_cb(csap_p csap, unsigned int layer_idx, asn_value* layer_pdu, void** p_opaque)

Confirm pattern PDU with respect to GRE CSAP parameters and possibilities (the function complies with ‘csap_layer_confirm_pdu_cb_t’ prototype)

te_errno tad_gre_match_post_cb(csap_p csap, unsigned int layer_idx, tad_recv_pkt_layer* meta_pkt_layer)

Generate a meta packet GRE NDS per a packet received (if need be) (the function complies with ‘csap_layer_match_post_cb_t’ prototype)

te_errno tad_gre_match_do_cb(csap_p csap, unsigned int layer_idx, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Parse a packet received and match it against the pattern’s GRE PDU (the function complies with ‘csap_layer_match_do_cb_t’ prototype)

te_errno tad_igmp_init_cb(csap_p csap, unsigned int layer)

Callback for init ‘igmp’ CSAP layer

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_igmp_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy ‘igmp’ CSAP layer

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_igmp_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with IGMP CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_igmp_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with IGMP CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_igmp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_igmp_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_do_cb_t prototype.

te_errno tad_igmp_match_pre_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer)

Callback to allocate and prepare per received packet layer IGMP data.

The function complies with csap_layer_match_pre_cb_t prototype.

te_errno tad_igmp_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer)

Callback to convert IGMP data to ASN.1 representation for matched packet.

The function complies with csap_layer_match_post_cb_t prototype.

te_errno tad_igmp_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** ptrn_pdu)

Callback for generating pattern to filter just one response to the packet which will be sent by this CSAP according to this template.

The function complies with csap_layer_gen_pattern_cb_t prototype.

void tad_igmp_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release data prepared by confirm callback or packet match.

The function complies with csap_layer_release_opaque_cb_t prototype.

te_errno tad_ip4_rw_init_cb(csap_p csap)

Callback to init IPv4 layer as read/write layer of the CSAP.

The function complies with csap_rw_init_cb_t prototype.

te_errno tad_ip4_rw_destroy_cb(csap_p csap)

Callback to destroy IPv4 layer as read/write layer of the CSAP.

The function complies with csap_rw_destroy_cb_t prototype.

te_errno tad_ip4_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len)

Callback for read data from media of IPv4 CSAP.

The function complies with csap_read_cb_t prototype.

te_errno tad_ip4_write_cb(csap_p csap, const tad_pkt* pkt)

Callback for write data to media of IPv4 CSAP.

The function complies with csap_write_cb_t prototype.

te_errno tad_ip4_init_cb(csap_p csap, unsigned int layer)

Callback for init ‘ip4’ CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_ip4_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy ‘ip4’ CSAP layer.

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_ip4_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with IPv4 CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_ip4_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with IPv4 CSAP arameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_ip4_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_ip4_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_do_cb_t prototype.

void tad_ip4_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release data prepared by confirm callback or packet match.

The function complies with csap_layer_release_opaque_cb_t prototype.

te_errno tad_icmp4_init_cb(csap_p csap, unsigned int layer)

Callback for init ‘icmp4’ CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_icmp4_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy ‘icmp4’ CSAP layer.

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_icmp4_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with ICMPv4 CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_icmp4_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with ICMPv4 CSAP arameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_icmp4_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_icmp4_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_do_cb_t prototype.

void tad_icmp4_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release data prepared by confirm callback or packet match.

The function complies with csap_layer_release_opaque_cb_t prototype.

te_errno tad_udp_init_cb(csap_p csap, unsigned int layer)

Callback for init ‘udp’ CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_udp_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy ‘udp’ CSAP layer.

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_udp_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with UDP CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_udp_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with UDP CSAP arameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_udp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_udp_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_do_cb_t prototype.

void tad_udp_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release data prepared by confirm callback or packet match.

The function complies with csap_layer_release_opaque_cb_t prototype.

te_errno tad_tcp_init_cb(csap_p csap, unsigned int layer)

Callback for init ‘tcp’ CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_tcp_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy ‘tcp’ CSAP layer.

The function complies with csap_layer_destroy_cb_t prototype.

char* tad_tcp_get_param_cb(csap_p csap, unsigned int layer, const char* param)

Callback for read parameter value of TCP CSAP.

The function complies with csap_layer_get_param_cb_t prototype.

te_errno tad_tcp_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* tmpl_pdu, void** p_opaque)

Callback for confirm template TCP PDU with TCP CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_tcp_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* tmpl_pdu, void** p_opaque)

Callback for confirm pattern TCP PDU with TCP CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_tcp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_tcp_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_bin_cb_t prototype.

void tad_tcp_release_opaque_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release data prepared by confirm callback or packet match

The function complies with csap_layer_release_opaque_cb_t prototype

te_errno tad_ip6_init_cb(csap_p csap, unsigned int layer)

Callback for init ‘ip6’ CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_ip6_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy ‘ip6’ CSAP layer.

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_ip6_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with IPv6 CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_ip6_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

void tad_ip6_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release data prepared by confirm callback or packet match.

The function complies with csap_layer_release_opaque_cb_t prototype.

te_errno tad_ip6_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with IPv6 CSAP arameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_ip6_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_do_cb_t prototype.

te_errno tad_icmp6_init_cb(csap_p csap, unsigned int layer)

Callback for init ‘icmp6’ CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_icmp6_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy ‘icmp6’ CSAP layer.

The function complies with csap_layer_destroy_cb_t prototype.

void tad_icmp6_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release data prepared by confirm callback or packet match.

The function complies with csap_layer_release_opaque_cb_t prototype.

te_errno tad_icmp6_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with ICMPv6 CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_icmp6_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_icmp6_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with ICMPv6 CSAP arameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_icmp6_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_do_cb_t prototype.

te_errno tad_does_cksum_match(csap_p csap, tad_cksum_str_code cksum_str_code, uint16_t cksum, unsigned int layer)

A tool to interpret a result of an advanced checksum matching

Parameters:

csap

CSAP instance

cksum_str_code

The ‘script’ string code of ‘checksum’ DU

cksum

The calculated checksum value

layer

The layer number

Returns:

Status code

te_errno tad_l4_match_cksum_advanced(csap_p csap, tad_pkt* pdu, tad_recv_pkt* meta_pkt, unsigned int layer, uint8_t l4_proto, tad_cksum_str_code cksum_str_code)

An auxiliary tool to match L4 checksum (advanced mode)

Parameters:

csap

CSAP instance

pdu

L4 header

meta_pkt

TAD meta packet

layer

The layer number

l4_proto

L4 protocol ID

cksum_str_code

The ‘script’ string code of ‘checksum’ DU

Returns:

Status code

te_errno tad_iscsi_rw_init_cb(csap_p csap)

Callback for init iSCSI CSAP layer.

The function complies with csap_rw_init_cb_t prototype.

te_errno tad_iscsi_rw_destroy_cb(csap_p csap)

Callback for destroy iSCSI CSAP layer.

The function complies with csap_rw_destroy_cb_t prototype.

te_errno tad_iscsi_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len)

Callback for read data from media of iSCSI CSAP.

The function complies with csap_read_cb_t prototype.

te_errno tad_iscsi_write_cb(csap_p csap, const tad_pkt* pkt)

Callback for write data to media of iSCSI CSAP.

The function complies with csap_write_cb_t prototype.

te_errno tad_iscsi_init_cb(csap_p csap, unsigned int layer)

Callback for init iSCSI CSAP layer.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_iscsi_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy iSCSI CSAP layer.

The function complies with csap_layer_destroy_cb_t prototype.

char* tad_iscsi_get_param_cb(csap_p csap, unsigned int layer, const char* param)

Callback for read parameter value of iSCSI CSAP layer.

The function complies with csap_layer_get_param_cb_t prototype.

te_errno tad_iscsi_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_iscsi_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_bin_cb_t prototype.

te_errno tad_iscsi_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** pattern_pdu)

Callback for generating pattern to filter just one response to the packet which will be sent by this CSAP according to this template.

The function complies with csap_layer_gen_pattern_cb_t prototype.

te_errno tad_iscsi_prepare_send_cb(csap_p csap)

Prepare send callback

Parameters:

csap

CSAP descriptor structure.

Returns:

status code.

te_errno tad_iscsi_prepare_recv_cb(csap_p csap)

Prepare recv callback

Parameters:

csap

CSAP descriptor structure.

Returns:

status code.

te_errno tad_iscsi_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Confirm pattern callback

The function complies with csap_layer_confirm_pdu_cb_t prototype.

Returns:

status code.

te_errno tad_iscsi_dump_iscsi_pdu(const uint8_t* buffer, iscsi_dump_mode_t mode)

Dump some significant fields from iSCSI PDU to log.

Parameters:

buffer

Buffer with PDU.

mode

Dump mode, take influence only to words.

Returns:

status code

te_errno tad_pcap_rw_init_cb(csap_p csap)

Callback for init Ethernet-PCAP CSAP layer if single in stack.

The function complies with csap_rw_init_cb_t prototype.

te_errno tad_pcap_rw_destroy_cb(csap_p csap)

Callback for destroy Ethernet-PCAP CSAP layer if single in stack.

The function complies with csap_rw_destroy_cb_t prototype.

te_errno tad_pcap_prepare_recv(csap_p csap)

Open receive socket for Ethernet-PCAP CSAP.

This function complies with csap_low_resource_cb_t prototype.

te_errno tad_pcap_shutdown_recv(csap_p csap)

Close receive socket for Ethernet-PCAP CSAP.

This function complies with csap_low_resource_cb_t prototype.

te_errno tad_pcap_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len)

Callback for read data from media of Ethernet-PCAP CSAP.

The function complies with csap_read_cb_t prototype.

te_errno tad_pcap_init_cb(csap_p csap, unsigned int layer)

Callback for init Ethernet-PCAP CSAP layer if single in stack.

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_pcap_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy Ethernet-PCAP CSAP layer if single in stack.

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_pcap_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with Ethernet-PCAP CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_pcap_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_bin_cb_t prototype.

void tad_pcap_release_ptrn_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release data prepared by confirm callback.

The function complies with csap_layer_release_opaque_cb_t prototype.

te_errno tad_ppp_init_cb(csap_p csap, unsigned int layer)

Callback for init ‘ppp’ CSAP layer

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_ppp_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy ‘ppp’ CSAP layer

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_ppp_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with PPP CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_ppp_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with PPP CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_ppp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_ppp_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_bin_cb_t prototype.

te_errno tad_ppp_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** ptrn_pdu)

Callback for generating pattern to filter just one response to the packet which will be sent by this CSAP according to this template.

The function complies with csap_layer_gen_pattern_cb_t prototype.

void tad_ppp_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release data prepared by confirm callback or packet match.

The function complies with csap_layer_release_opaque_cb_t prototype.

te_errno tad_pppoe_init_cb(csap_p csap, unsigned int layer)

Callback for init ‘pppoe’ CSAP layer

The function complies with csap_layer_init_cb_t prototype.

te_errno tad_pppoe_destroy_cb(csap_p csap, unsigned int layer)

Callback for destroy ‘pppoe’ CSAP layer

The function complies with csap_layer_destroy_cb_t prototype.

te_errno tad_pppoe_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with PPPOE CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_pppoe_confirm_ptrn_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm pattern PDU with PPPOE CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_pppoe_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_pppoe_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_bin_cb_t prototype.

te_errno tad_pppoe_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** ptrn_pdu)

Callback for generating pattern to filter just one response to the packet which will be sent by this CSAP according to this template.

The function complies with csap_layer_gen_pattern_cb_t prototype.

void tad_pppoe_release_pdu_cb(csap_p csap, unsigned int layer, void* opaque)

Callback to release data prepared by confirm callback or packet match.

The function complies with csap_layer_release_opaque_cb_t prototype.

te_errno tad_rte_mbuf_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback to copy binary data prepared by the upper layers to the final packet; the function complies with csap_layer_generate_pkts_cb_t prototype

te_errno tad_rte_mbuf_match_post_cb(csap_p csap, unsigned int layer, tad_recv_pkt_layer* meta_pkt_layer)

Callback to initialize RTE mbuf NDS for the corresponding layer in the meta-packet known to match the CSAP pattern; the function complies with csap_layer_match_post_cb_t prototype

te_errno tad_rte_mbuf_match_do_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Stub callback which complies with csap_layer_match_do_cb_t prototype

te_errno tad_rte_mbuf_rw_init_cb(csap_p csap)

Callback for ‘rte_mbuf’ CSAP layer initialization (single in stack); the function complies with csap_rw_init_cb_t prototype

te_errno tad_rte_mbuf_rw_destroy_cb(csap_p csap)

Callback to destroy ‘rte_mbuf’ CSAP layer (single in stack); the function complies with csap_rw_destroy_cb_t prototype

te_errno tad_rte_mbuf_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len)

Callback (aka “read data”) for converting RTE mbuf to TAD packet; the function complies with csap_read_cb_t prototype

te_errno tad_rte_mbuf_write_cb(csap_p csap, const tad_pkt* pkt)

Callback (aka “write data”) for converting TAD packet to RTE mbuf; the function complies with csap_write_cb_t prototype

te_errno tad_snmp_rw_init_cb(csap_p csap)

Callback for init SNMP CSAP layer if single in stack.

The function complies with csap_rw_init_cb_t prototype.

te_errno tad_snmp_rw_destroy_cb(csap_p csap)

Callback for destroy SNMP CSAP layer if single in stack.

The function complies with csap_rw_destroy_cb_t prototype.

te_errno tad_snmp_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len)

Callback for read data from media of SNMP CSAP.

The function complies with csap_read_cb_t prototype.

te_errno tad_snmp_write_cb(csap_p csap, const tad_pkt* pkt)

Callback for write data to media of SNMP CSAP.

The function complies with csap_write_cb_t prototype.

te_errno tad_snmp_release_cb(csap_p csap)

Callback for release internal data after traffic processing.

The function complies with csap_low_resource_cb_t prototype.

te_errno tad_snmp_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_snmp_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_bin_cb_t prototype.

te_errno tad_snmp_gen_pattern_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, asn_value** pattern_pdu)

Callback for generating pattern to filter just one response to the packet which will be sent by this CSAP according to this template.

The function complies with csap_layer_gen_pattern_cb_t prototype.

void tad_snmp_free_pdu(void* ptr, size_t len)

Free snmp pdu

te_errno tad_socket_rw_init_cb(csap_p csap)

Callback for init ‘socket’ CSAP layer if single in stack.

The function complies with csap_rw_init_cb_t prototype.

te_errno tad_socket_rw_destroy_cb(csap_p csap)

Callback for destroy ‘socket’ CSAP layer if single in stack.

The function complies with csap_rw_destroy_cb_t prototype.

te_errno tad_socket_read_cb(csap_p csap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len)

Callback for read data from media of Socket CSAP.

The function complies with csap_read_cb_t prototype.

te_errno tad_socket_write_cb(csap_p csap, const tad_pkt* pkt)

Callback for write data to media of Socket CSAP.

The function complies with csap_write_cb_t prototype.

te_errno tad_socket_confirm_tmpl_cb(csap_p csap, unsigned int layer, asn_value* layer_pdu, void** p_opaque)

Callback for confirm template PDU with Socket protocol CSAP parameters and possibilities.

The function complies with csap_layer_confirm_pdu_cb_t prototype.

te_errno tad_socket_gen_bin_cb(csap_p csap, unsigned int layer, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Callback for generate binary data to be sent to media.

The function complies with csap_layer_generate_pkts_cb_t prototype.

te_errno tad_socket_match_bin_cb(csap_p csap, unsigned int layer, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Callback for parse received packet and match it with pattern.

The function complies with csap_layer_match_bin_cb_t prototype.

te_errno tad_agent_csap_init(void)

Initialize TAD /agent/csap configuration subtree support.

Returns:

Status code.

te_errno tad_agent_csap_fini(void)

Shutdown TAD /agent/csap configuration subtree support.

Returns:

Status code.

te_errno tad_csap_destroy_by_id(csap_handle_t csap_id)

Destroy CSAP.

Parameters:

csap_id

ID of the CSAP to be destroyed

Returns:

Status code.

te_errno tad_csap_create(const char* stack, const char* spec_str, csap_p* new_csap_p)

Create CSAP.

Parameters:

stack

CSAP protocols stack

spec_str

CSAP specification string

new_csap_p

Location for CSAP instance

Returns:

Status code.

te_errno tad_csap_destroy(csap_p csap)

Destroy CSAP

te_errno tad_send_preprocess_args(csap_p csap, const asn_value* tmpl_unit, tad_send_tmpl_unit_data* data)

Preprocess traffic template arguments.

Parameters:

csap

CSAP instance

tmpl_unit

Traffic template unit

data

Location for template unit auxiluary data to be prepared during preprocessing and used during binary data generation

Returns:

Status code.

te_errno tad_send_start_prepare(csap_p csap, const char* tmpl_str, bool postponed, const tad_reply_context* reply_ctx)

Prepare TAD Sender to start traffic generation.

Parameters:

csap

CSAP instance to generate traffic

tmpl_str

Traffic template in string format

postponed

“postponed” flag value

reply_ctx

TAD async reply context

Returns:

Status code.

te_errno tad_send_release(csap_p csap, tad_send_context* context)

Release TAD Sender context.

Parameters:

csap

CSAP instance

context

TAD Sender context pointer

Returns:

Status code.

te_errno tad_send_do(csap_p csap)

Run Sender.

It releases sender context in any case.

Parameters:

csap

CSAP instance

Returns:

Status code.

te_errno tad_recv_start_prepare(csap_p csap, const char* ptrn_str, unsigned int num, unsigned int timeout, unsigned int flags, const tad_reply_context* reply_ctx)

Prepare TAD Receiver to start matching traffic.

Parameters:

csap

CSAP instance to match traffic

ptrn_str

Traffic pattern in string representation

num

Number of packets to wait for (0 - unlimited)

timeout

Timeout in milliseconds

flags

Receive mode flags bitmask

reply_ctx

TAD async reply context

Returns:

Status code.

te_errno tad_recv_release(csap_p csap, tad_recv_context* context)

Release TAD Receiver context.

Parameters:

csap

CSAP instance

context

TAD Receiver context pointer

Returns:

Status code.

te_errno tad_recv_do(csap_p csap)

Run Receiver.

It releases receiver context in any case.

Parameters:

csap

CSAP instance

Returns:

Status code.

te_errno tad_recv_get_packets(csap_p csap, tad_reply_context* reply_ctx, bool wait, unsigned int* got)

Get matched packet from TAD receiver packets queue.

Parameters:

csap

CSAP structure

reply_ctx

TAD reply context for reporting

wait

Wait for more packets or end of processing

got

Location for number of got packets

Returns:

Status code.

te_errno tad_bps_pkt_frag_init(const tad_bps_pkt_frag* descr, unsigned int fields, const asn_value* layer_spec, tad_bps_pkt_frag_def* bps)

Initialize TAD binary PDU support for the binary PDU type.

There is no necessity to do any clean up in this routine in the case of failure. Things should be just consistent to allow tad_bps_pkt_frag_free() to do its work.

Parameters:

descr

Binary PDU description

fields

Number of fields in description

layer_spec

NDS with default values

bps

BPS internal data to be initialized

Returns:

Status code.

void tad_bps_pkt_frag_free(tad_bps_pkt_frag_def* bps)

Free resources allocated by tad_bps_pkt_frag_init().

Parameters:

bps

BPS internal data to be freed

void tad_bps_free_pkt_frag_data(const tad_bps_pkt_frag_def* def, tad_bps_pkt_frag_data* data)

Free resources allocated for packet fragment data.

Parameters:

def

Binary packet fragment definition filled in by tad_bps_pkt_frag_init() function

data

Binary packet fragment instance data filled in by tad_bps_nds_to_data_units() function

te_errno tad_bps_confirm_send(const tad_bps_pkt_frag_def* def, const tad_bps_pkt_frag_data* pkt)

Confirm that template plus defaults are enough to generate binary packet.

Parameters:

def

Binary packet fragment definition filled in by tad_bps_pkt_frag_init() function

pkt

Binary packet fragment data allocated and filled in by tad_bps_nds_to_data_units()

TE_ETADMISSNDS

Data are not sufficient.

Returns:

Status code.

size_t tad_bps_pkt_frag_bitlen(const tad_bps_pkt_frag* descr, unsigned int fields)

Calculate length of the binary packet fragment in bits using fragment specification only.

Parameters:

descr

Binary packet fragment description

fields

Number of fields in description

Returns:

Length in bits or 0, if it is unknown.

size_t tad_bps_pkt_frag_data_bitlen(const tad_bps_pkt_frag_def* def, const tad_bps_pkt_frag_data* pkt)

Calculate length of the binary packet fragment in bits using fragment specification or current values in data units.

Parameters:

def

Binary packet fragment definition filled in by tad_bps_pkt_frag_init() function

pkt

Binary packet fragment data allocated and filled in by tad_bps_nds_to_data_units()

Returns:

Length in bits or 0, if it is unknown.

te_errno csap_create(const char* type, csap_p* csap)

Create a new CSAP. This method does not perform any actions related to CSAP functionality, neither processing of CSAP init parameters, nor initialyzing some communication media units (for example, sockets, etc.). It only allocates memory for csap_instance sturture, set fields ‘id’, ‘depth’ and ‘proto’ in it and allocates memory for ‘layer_data’.

Parameters:

type

Type of CSAP: dot-separated sequence of textual layer labels

csap

Location for CSAP structure pointer

Returns:

Status code.

te_errno csap_destroy(csap_handle_t csap_id)

Destroy CSAP.

Before call this DB method, all protocol-specific data in ‘layer-data’ and underground media resources should be freed. This method will free all non-NULL pointers in ‘layer-data’, but does not know nothing about what structures are pointed by them, therefore if there are some more pointers in that structures, memory may be lost.

Parameters:

csap_id

Identifier of CSAP to be destroyed

Returns:

Status code.

csap_p csap_find(csap_handle_t csap_id)

Find CSAP by its identifier.

Change data in this structure if you really know what it means!

Parameters:

csap_id

Identifier of CSAP

Returns:

Pointer to structure with internal CSAP information or NULL if not found.

te_errno csap_command_under_lock(csap_p csap, tad_traffic_op_t command)

CSAP state transition by command.

The function have to be called under CSAP lock only.

Parameters:

csap

CSAP instance

command

Command

Returns:

Status code.

See also:

csap_command

static te_errno csap_command(csap_p csap, tad_traffic_op_t command)

CSAP state transition by command.

Parameters:

csap

CSAP instance

command

Command

Returns:

Status code.

See also:

csap_command_under_lock

static te_errno csap_wait(csap_p csap, unsigned int state_bits)

Wait for one of bit in CSAP state.

Parameters:

csap

CSAP instance

state_bits

Set of state bits to wait for at least one of them

Returns:

Status code.

te_errno csap_timedwait(csap_p csap, unsigned int state_bits, unsigned int ms)

Wait for one of bit in CSAP state with timeout.

Parameters:

csap

CSAP instance

state_bits

Set of state bits to wait for at least one of them

ms

Timeout in milliseconds

Returns:

Status code.

static unsigned int csap_get_rw_layer(csap_p csap)

Get CSAP read/write layer number.

Parameters:

csap

CSAP instance

Returns:

Number of CSAP read/write layer.

static void* csap_get_rw_data(csap_p csap)

Get read/write layer specific data.

Parameters:

csap

CSAP instance

Returns:

Pointer to read/write layer specific data.

static void csap_set_rw_data(csap_p csap, void* data)

Set read/write layer specific data.

Parameters:

csap

CSAP instance

data

Pointer to protocol specific data

static void* csap_get_proto_spec_data(csap_p csap, unsigned int layer)

Get protocol specific data of the layer.

Parameters:

csap

CSAP instance

layer

Layer number

Returns:

Pointer to protocol specific data for the layer.

static void csap_set_proto_spec_data(csap_p csap, unsigned int layer, void* data)

Set protocol specific data of the layer.

Parameters:

csap

CSAP instance

layer

Layer number

data

Pointer to protocol specific data

static struct csap_spt_type_t* csap_get_proto_support(csap_p csap, unsigned int layer)

Get protocol specific data of the layer.

Parameters:

csap

CSAP instance

layer

Layer number

Returns:

Pointer to protocol support definition.

static void csap_set_proto_support(csap_p csap, unsigned int layer, struct csap_spt_type_t* proto_support)

Set protocol specific data of the layer.

Parameters:

csap

CSAP instance

layer

Layer number

proto_support

Protocol support description

static tad_send_context* csap_get_send_context(csap_p csap)

Get TAD Sender context pointer.

Parameters:

csap

CSAP instance

static tad_recv_context* csap_get_recv_context(csap_p csap)

Get TAD Receiver context pointer.

Parameters:

csap

CSAP instance

te_errno csap_spt_init(void)

Init CSAP support database

Returns:

Status code.

te_errno csap_spt_add(csap_spt_type_p spt_descr)

Add structure for CSAP support for respective protocol.

Parameters:

spt_descr

CSAP layer support structure

Returns:

Status code.

csap_spt_type_p csap_spt_find(const char* proto)

Find structure for CSAP support respective to passed protocol label.

Parameters:

proto

protocol label

Returns:

Pointer to structure or NULL if not found.

void csap_spt_destroy(void)

Destroy CSAP support database.

te_errno tad_eth_sap_attach(const char* ifname, tad_eth_sap* sap)

Attach Ethernet service access point to provider and extract ancillary information. SAP is neigher sending nor receiving after attach.

It is assumed that ancillary information is constant and will not be modified before close.

Parameters:

ifname

Name of the interface/service

sap

Location for SAP description structure

Returns:

Status code.

See also:

tad_eth_sap_send_open(), tad_eth_sap_recv_open(), tad_eth_sap_detach()

te_errno tad_eth_sap_send_open(tad_eth_sap* sap, unsigned int mode)

Open Ethernet service access point for sending. The function does nothing, if Ethernet service access point has already been open for sending.

Parameters:

sap

SAP description structure

mode

Send mode

Returns:

Status code.

See also:

tad_eth_sap_send_close(), tad_eth_sap_recv_open()

te_errno tad_eth_sap_send(tad_eth_sap* sap, const tad_pkt* pkt)

Send Ethernet frame using service access point opened for sending.

Parameters:

sap

SAP description structure

pkt

Frame to be sent

Returns:

Status code.

See also:

tad_eth_sap_send_open(), tad_eth_sap_recv()

te_errno tad_eth_sap_send_close(tad_eth_sap* sap)

Close Ethernet service access point for sending.

Parameters:

sap

SAP description structure

Returns:

Status code.

te_errno tad_eth_sap_recv_open(tad_eth_sap* sap, unsigned int mode)

Open Ethernet service access point for receiving. The function does nothing, if Ethernet service access point has already been open for receiving.

Parameters:

sap

SAP description structure

mode

Receive mode (see enum tad_eth_recv_mode in ndn_eth.h)

Returns:

Status code.

See also:

tad_eth_sap_recv_close(), tad_eth_sap_send_open()

te_errno tad_eth_sap_recv(tad_eth_sap* sap, unsigned int timeout, tad_pkt* pkt, size_t* pkt_len)

Receive Ethernet frame using service access point opened for receiving.

Parameters:

sap

SAP description structure

timeout

Receive operation timeout

pkt

Frame to receive

pkt_len

Location for real packet length

Returns:

Status code.

See also:

tad_eth_sap_recv_open(), tad_eth_sap_send()

te_errno tad_eth_sap_recv_close(tad_eth_sap* sap)

Close Ethernet service access point for receiving.

Parameters:

sap

SAP description structure

Returns:

Status code.

te_errno tad_eth_sap_detach(tad_eth_sap* sap)

Detach Ethernet service access point from service provider and free all allocated resources.

Parameters:

sap

SAP description structure

Returns:

Status code.

te_errno tad_overlay_guess_def_protocol(csap_p csap, unsigned int layer_idx, tad_bps_pkt_frag_def* def, unsigned int du_idx)

Guess and fill in encap. protocol number within an overlay header default BPS

Parameters:

csap

CSAP pointer

layer_idx

Index of the overlay layer

def

Overlay header default BPS

du_idx

Protocol number DU index within the BPS

Returns:

Status code

void tad_pkt_seg_data_free(void* ptr, size_t len)

Trivial wrapper for free() to match tad_pkt_seg_free prototype.

typedef CIRCLEQ_HEAD(tad_pkt_segs, tad_pkt_seg)

Head of packet segments list

typedef CIRCLEQ_HEAD(tad_pkts_head, tad_pkt)

Head of packets list

void tad_pkt_init_seg_data(tad_pkt_seg* seg, void* ptr, size_t len, tad_pkt_seg_free free)

Initialize segment to be added in a packet.

Parameters:

seg

Segment which does not belong to any packet

ptr

Pointer to a data

len

Length of data

free

Function to be called to free these data

void tad_pkt_free_seg_data(tad_pkt_seg* seg)

Free packet segment data.

Parameters:

seg

Segment to free its data

void tad_pkt_free_seg(tad_pkt_seg* seg)

Free packet segment.

Parameters:

seg

Segment to be freed

tad_pkt_seg* tad_pkt_alloc_seg(void* data_ptr, size_t data_len, tad_pkt_seg_free data_free)

Allocate packet segment.

Parameters:

data_ptr

Pointer to segment data or NULL, if array of specified length should be allocated

data_len

Length of data in data_ptr or to be allocated

data_free

Function to be used to free data_ptr, if it is not a NULL

Returns:

Packet segment pointer or NULL.

unsigned int tad_pkt_seg_num(const tad_pkt* pkt)

Get number of segments in a packet.

Parameters:

pkt

Pointer to a packet

Returns:

Number of segments in the packet.

size_t tad_pkt_len(const tad_pkt* pkt)

Get total length of a packet.

It makes sence if packet segments refer to simple memory array of specified length.

Parameters:

pkt

Pointer to a packet

Returns:

Sum of all segments length.

void* tad_pkt_opaque(const tad_pkt* pkt)

Get opaque data pointer of the packet.

Parameters:

pkt

Pointer to a packet

Returns:

Opaque data pointer.

void tad_pkt_set_opaque(tad_pkt* pkt, void* opaque, tad_pkt_ctrl_free opaque_free)

Set opaque data pointer of the packet.

Parameters:

pkt

Pointer to a packet

opaque

Opaque pointer

opaque_free

Function to free opaque data

void tad_pkt_init_segs(tad_pkt* pkt)

Initialize packet as empty (no segments).

Parameters:

pkt

Pointer to a packet

void tad_pkt_free_segs(tad_pkt* pkt)

Free packet segments.

Parameters:

pkt

Pointer to a packet

void tad_pkt_init(tad_pkt* pkt, tad_pkt_ctrl_free my_free, void* opaque, tad_pkt_ctrl_free opaque_free)

Initialize packet.

Parameters:

pkt

Pointer to a packet

my_free

Function to free packet itself

opaque

Opaque data

opaque_free

Function to free opaque data

void tad_pkt_cleanup(tad_pkt* pkt)

Free all data resources, but keep control structures.

Parameters:

pkt

Packet to be cleaned up

void tad_pkt_free(tad_pkt* pkt)

Free packet.

Parameters:

pkt

Pointer to a packet

tad_pkt* tad_pkt_alloc(unsigned int n_segs, size_t first_seg_len)

Allocate a packet with specified number of segments and length of the first segment data.

Parameters:

n_segs

Number of segments to allocate for each packet

first_seg_len

Length of the first segment of each packet

Returns:

Allocated packet or NULL.

void tad_pkt_put_seg_data(tad_pkt* pkt, tad_pkt_seg* seg, void* ptr, size_t len, tad_pkt_seg_free free)

Put data in the packet segment.

Parameters:

pkt

Packet

seg

Segment of the packet

ptr

Pointer to a data to put

len

Length of data

free

Function to be called to free these data

void tad_pkt_set_seg_data_len(tad_pkt* pkt, tad_pkt_seg* seg, size_t new_len)

Set new length of the packet segment data.

Parameters:

pkt

Packet

seg

Segment

new_len

New value of the segment data length

void tad_pkt_append_seg(tad_pkt* pkt, tad_pkt_seg* seg)

Add segment to the packet as trailer.

Parameters:

pkt

Packet

seg

Segment to add

void tad_pkt_prepend_seg(tad_pkt* pkt, tad_pkt_seg* seg)

Add segment to the packet as header.

Parameters:

pkt

Packet

seg

Segment to add

void tad_pkt_insert_after_seg(tad_pkt* pkt, tad_pkt_seg* seg, tad_pkt_seg* new_seg)

Add segment to the packet.

Parameters:

pkt

Packet

seg

Segment to insert after it

new_seg

Segment to insert

te_errno tad_pkt_flatten_copy(tad_pkt* pkt, uint8_t** data, size_t* len)

Make flatten copy of a packet to specified memory array or to allocated using malloc().

If buffer provided by caller is not sufficient, the buffer is filled in and TE_ESMALLBUF is returned.

Parameters:

pkt

Packet

data

Location of the pointer to memory array (if *data is NULL, allocate it using malloc())

len

Location of the memory array length or NULL (if *data is not NULL, *len is equal to size of buffer provided by caller)

Returns:

Status code.

static tad_pkt_seg* tad_pkt_first_seg(const tad_pkt* pkt)

Get the first segment of the packet.

Parameters:

pkt

Packet

Returns:

Pointer to the first segment or NULL.

static tad_pkt_seg* tad_pkt_last_seg(const tad_pkt* pkt)

Get the last segment of the packet.

Parameters:

pkt

Packet

Returns:

Pointer to the last segment or NULL.

static tad_pkt_seg* tad_pkt_next_seg(const tad_pkt* pkt, const tad_pkt_seg* seg)

Get the next segment of the packet.

Parameters:

pkt

Packet

Returns:

Pointer to the next segment or NULL.

static tad_pkt_seg* tad_pkt_prev_seg(const tad_pkt* pkt, const tad_pkt_seg* seg)

Get the previous segment of the packet.

Parameters:

pkt

Packet

Returns:

Pointer to the previous segment or NULL.

te_errno tad_pkt_enumerate_seg(const tad_pkt* pkt, tad_pkt_seg_enum_cb func, void* opaque)

Enumerate packet segments.

Parameters:

pkt

Packet

func

Function to be called for each segment

opaque

Opaque pointer to be passed to callback function

Returns:

Status code.

te_errno tad_pkt_segs_to_iov(const tad_pkt* pkt, struct iovec* iov, size_t count)

Put packet segments data pointers with lengths to IO vector.

Parameters:

pkt

Packet

iov

IO vector

count

Number of element in iov

Returns:

Status code.

unsigned int tad_pkts_get_num(const tad_pkts* pkts)

Get number of packets in the list.

Parameters:

pkts

Pointer to the list of packets

Returns:

Number of packet in the list.

void tad_pkts_init(tad_pkts* pkts)

Initialize list of packets.

Parameters:

pkts

Pointer to the list of packets

void tad_cleanup_pkts(tad_pkts* pkts)

Free all data resources, but keep control structures.

Parameters:

pkts

List of packets to be cleaned up

void tad_free_pkts(tad_pkts* pkts)

Free packets.

Parameters:

pkts

Pointer to the list of packets

static tad_pkt* tad_pkts_first_pkt(const tad_pkts* pkts)

Get the first packet from the list.

Parameters:

pkts

List of packets

Returns:

Pointer to the first packet or NULL.

void tad_pkts_add_one(tad_pkts* pkts, tad_pkt* pkt)

Add packet to the list.

Parameters:

pkts

List with packets

pkt

Packet to add

void tad_pkts_del_one(tad_pkts* pkts, tad_pkt* pkt)

Delete packet from the list.

Parameters:

pkts

List with packets

pkt

Packet to delete

void tad_pkts_move(tad_pkts* dst, tad_pkts* src)

Move packets from one list to other.

Parameters:

dst

Destination list with packets

src

Source list with packets

te_errno tad_pkts_add_new_seg(tad_pkts* pkts, bool header, void* data_ptr, size_t data_len, tad_pkt_seg_free data_free)

Add a new segment to each packet in the list.

Parameters:

pkts

List of packets

header

Add segment as header or trailer

data_ptr

Pointer to segment data or NULL, if array of specified length should be allocated

data_len

Length of data in data_ptr or to be allocated

data_free

Function to be used to free data_ptr, if it is not a NULL

Returns:

Status code.

te_errno tad_pkts_alloc(tad_pkts* pkts, unsigned int n_pkts, unsigned int n_segs, size_t first_seg_len)

Allocate a number of packets with specified number of segments and length of the first segment data. Add allocated packets to the list.

Parameters:

pkts

List to add allocated packets

n_pkts

Number of packets to allocate

n_segs

Number of segments to allocate for each packet

first_seg_len

Length of the first segment of each packet

Returns:

Status code.

te_errno tad_pkts_enumerate_first_segs(tad_pkts* pkts, tad_pkt_seg_enum_cb func, void* opaque)

Enumerate first segments of each packet in the list.

Parameters:

pkts

List of packets

func

Function to be called for the first segment of each packet

opaque

Pointer to opaque data to be passed in callback function as the last argument

Returns:

Status code.

te_errno tad_pkt_fragment(tad_pkt* pkt, size_t frag_data_len, ssize_t add_seg_len, bool header, tad_pkts* pkts)

Fragment a packet without data copying.

Parameters:

pkt

Packet to fragment

frag_data_len

Maximum length of the fragment (without any additional segments length)

add_seg_len

Length of the additional segment or -1, if no additional segments are necessary

header

Is additional segment header or trailer?

pkts

List to add fragments of the packet

Returns:

Status code.

te_errno tad_pkt_get_frag(tad_pkt* dst, tad_pkt* src, size_t frag_off, size_t frag_len, tad_pkt_get_frag_mode mode)

Get (without copy of data) fragment of the packet.

Parameters:

dst

Destination packet

src

Source packet

frag_off

Offset of the fragment in source packet

frag_len

Length of the fragment

mode

What to do, if more than available is requested?

E2BIG

Too big fragment is requested with mode equal to TAD_PKT_GET_FRAG_ERROR

Returns:

Status code.

void tad_pkt_read(const tad_pkt* pkt, const tad_pkt_seg* seg, size_t off, size_t len, uint8_t* dst)

Read byte-aligned data from packet starting from offset in specified segment. Offset have to fit in data available in the segment. Packet have to have enoght data to read.

Parameters:

pkt

Packet

seg

Packet segment

off

Offset in the segment

len

Total length of data to read

dst

Destination

void tad_pkt_read_bits(const tad_pkt* pkt, size_t bitoff, size_t bitlen, uint8_t* dst)

Read bits from packet. If length is not byte aligned, the bit string is prepended by zero bits to be byte aligned.

It is assumed that packet has enough data.

Parameters:

pkt

Packet

bitoff

Offset in bits

bitlen

Number of bits to read starting from offset

dst

Destination

bool tad_pkt_read_bit(const tad_pkt* pkt, size_t bitoff)

Single-bit wrapper for tad_pkt_read_bits()

te_errno tad_pkt_match_mask(const tad_pkt* pkt, size_t len, const uint8_t* mask, const uint8_t* value, bool exact_len)

Match packet content by mask.

Parameters:

pkt

Packet

len

Length of the mask/value

mask

Mask bytes

value

Value bytes

exact_len

Is packet length should be equal to length of the mask or may be greater?

Returns:

Status code.

te_errno tad_pkt_match_bytes(const tad_pkt* pkt, size_t len, const uint8_t* payload, bool exact_len)

Match packet content by payload.

Parameters:

pkt

Packet

len

Length of the payload

mask

Payload bytes

exact_len

Is packet length should be equal to length of the payload or may be greater?

Returns:

Status code.

te_errno tad_pkt_realloc_segs(tad_pkt* pkt, size_t new_len)

Alloc additional segments for the packet

Parameters:

pkt

the packet to add new segments

new_len

necessary length of the packet after adding segments

Returns:

Status code.

te_errno tad_pkt_mark_layer_segments_cb(tad_pkt* pkt, void* opaque)

A helper to set the given layer tag in the outermost TAD packet segments which don’t yet belong to any custom tag.

This function complies with tad_pkt_enum_cb prototype and must be invoked with tad_pkt_enumerate() facility.

The opaque pointer must refer to the new tag value or be equal to NULL. In the latter case the target segments will be flagged as containing custom tag values although the tag values themselves won’t change from default ones.

te_errno tad_poll_enqueue(csap_p csap, unsigned int timeout, const tad_reply_context* reply_ctx)

Enqueue TAD poll request.

Parameters:

csap

CSAP instance

timeout

Timeout in milliseconds

reply_ctx

TAD async reply context

Returns:

Status code.

void tad_recv_init_context(tad_recv_context* context)

Initialize TAD Receiver context.

Parameters:

context

Context to be initialized

te_errno tad_recv_prepare(csap_p csap, asn_value* ptrn_unit, unsigned int num, unsigned int timeout, const tad_reply_context* reply_ctx)

Prepare TAD Receiver to match traffic by pattern to specified CSAP.

Parameters:

csap

CSAP instance to match traffic

pattern

Traffic pattern (owned by the routine in any case)

num

Number of packets to wait for (0 - unlimited)

timeout

Timeout in milliseconds

reply_ctx

TAD async reply context

Returns:

Status code.

void* tad_recv_thread(void* arg)

Start routine for Receiver thread.

Parameters:

arg

Start argument, should be pointer to CSAP structure

Returns:

NULL

te_errno tad_recv_op_enqueue(csap_p csap, tad_traffic_op_t op, const tad_reply_context* reply_ctx)

Enqueue traffic receive get/wait/stop/destroy operation.

Parameters:

csap

CSAP

op

Operation (stop/wait/get)

reply_ctx

TAD async reply context

Returns:

Status code.

typedef TAILQ_HEAD(tad_recv_pkt)

Queue of received packets

static te_errno tad_reply_clone(tad_reply_context* dst, const tad_reply_context* src)

Clone TAD reply context.

static void tad_reply_cleanup(tad_reply_context* ctx)

Clean up TAD reply context.

static te_errno tad_reply_status(tad_reply_context* ctx, te_errno rc)

Async status reply.

Parameters:

ctx

TAD async reply context

rc

Status to be reported

static te_errno tad_reply_poll(tad_reply_context* ctx, te_errno rc, unsigned int poll_id)

Async report poll completion.

Parameters:

ctx

TAD async reply context

rc

Status to be reported

poll_id

Poll ID

static te_errno tad_reply_pkts(tad_reply_context* ctx, te_errno rc, unsigned int num)

Async report number of sent/received packets.

Parameters:

ctx

TAD async reply context

rc

Status to be reported

num

Number of sent or received packets

static te_errno tad_reply_pkt(tad_reply_context* ctx, const asn_value* pkt)

Async report received packet.

Parameters:

ctx

TAD async reply context

pkt

Packet in ASN.1 value

te_errno tad_reply_rcf_init(tad_reply_context* ctx, rcf_comm_connection* rcfc, const char* answer_pfx, size_t pfx_len)

Initialize TAD RCF reply context.

Parameters:

ctx

TAD async reply context to be initialized

rcfc

RCF connection handle

answer_pfx

Answer prefix

pfx

Answer prefix length

Returns:

Status code.

te_errno tad_rte_mbuf_sap_read(tad_rte_mbuf_sap* sap, tad_pkt* pkt, size_t* pkt_len, unsigned* pend)

Take RTE mbuf from RTE ring and convert it to TAD packet

Parameters:

sap

SAP description structure

pkt

TAD packet to be produced

pkt_len

Location for TAD packet length

pend

Location for the residual of RTE ring entries

Returns:

Status code

te_errno tad_rte_mbuf_sap_write(tad_rte_mbuf_sap* sap, const tad_pkt* pkt)

Convert TAD packet to RTE mbuf and put the latter into RTE ring

Parameters:

sap

SAP description structure

pkt

Packet to be converted

Returns:

Status code

void tad_send_init_context(tad_send_context* context)

Initialize TAD Sender context.

Parameters:

context

Context to be initialized

te_errno tad_send_prepare(csap_p csap, asn_value* tmpl_unit, const tad_reply_context* reply_ctx)

Prepare TAD Sender to generate traffic by template to specified CSAP.

Parameters:

csap

CSAP instance to generate traffic

template

Traffic template (owned by the routine in any case)

reply_ctx

TAD async reply context

Returns:

Status code.

te_errno tad_send_stop(csap_p csap, unsigned int* sent_pkts)

Stop TAD Sender.

Parameters:

csap

CSAP instance to stop generation traffic on

sent_pkts

Location for the number of sent packets

Returns:

Status code.

void* tad_send_thread(void* arg)

Start routine for Sender thread.

Parameters:

arg

Start argument, should be pointer to CSAP structure

Returns:

NULL

te_errno tad_send_prepare_bin(csap_p csap, asn_value* nds, const struct tad_tmpl_arg_t* args, size_t arg_num, tad_payload_spec_t* pld_data, void** layer_opaque, tad_pkts* pkts_per_layer)

Prepare binary data by NDS.

Parameters:

csap

CSAP description structure

nds

ASN value with traffic-template NDS, should be preprocessed (all iteration and function calls performed)

args

array with template iteration parameter values, may be used to prepare binary data, references to interation parameter values may be set in ASN traffic template PDUs

arg_num

length of array above

pld_type

type of payload in nds, passed to make function more fast

pld_data

payload data read from original NDS

pkts_per_layer

array with packets per generated layer (OUT)

Returns:

zero on success, otherwise error code.

te_errno tad_send_recv_generate_pattern(csap_p csap, asn_value* template, asn_value** pattern)

Generate Traffic Pattern NDS by template for send/receive command.

Parameters:

csap

Structure with CSAP parameters

template

Traffic template

pattern

Generated Traffic Pattern

Returns:

Status code.

int tad_confirm_pdus(csap_p csap, bool recv, asn_value* pdus, void** layer_opaque)

Confirm traffic template or pattern PDUS set with CSAP settings and protocol defaults. This function changes passed ASN value, user have to ensure that changes will be set in traffic template or pattern ASN value which will be used in next operation. This may be done by such ways:

Pass pointer got by asn_get_descendent method, or write modified value into original NDS.

Parameters:

csap

CSAP descriptor.

recv

Is receive flow or send flow.

pdus

ASN value with SEQUENCE OF Generic-PDU (IN/OUT).

layer_opaque

Array for per-layer opaque data pointers

Returns:

zero on success, otherwise error code.

te_tad_protocols_t te_proto_from_str(const char* proto_txt)

Convert text protocol label into integer tag.

Parameters:

proto_txt

string with protocol text label

Returns:

value from enum ‘te_tad_protocols_t’

const char* te_proto_to_str(te_tad_protocols_t proto)

Convert protocol integer tag into text protocol label.

Parameters:

proto

value from enum ‘te_tad_protocols_t’

Returns:

constant string with protocol text label or NULL

te_errno tad_convert_payload(const asn_value* ndn_payload, tad_payload_spec_t* pld_spec)

Convert ASN specification of payload from Traffic-Template to plain C sturcture.

Parameters:

ndn_payload

ASN value of Payload type

pld_spec

locaion for converted data

Returns:

Status code.

void tad_payload_spec_clear(tad_payload_spec_t* pld_spec)

Clear payload specification, free all data, allocated for it internally. Does NOT free passed struct itself.

Parameters:

pld_spec

pointer to payload spec to be cleared

int tad_int_expr_parse(const char* string, tad_int_expr_t** expr, int* syms)

Parse textual presentation of expression. Syntax is Perl-like, references to template arguments noted as $1, $2, etc.

Parameters:

string

Text with expression.

expr

Place where pointer to new expression will be put (OUT).

syms

Quantity of parsed symbols, if syntax error occurred, error position (OUT).

Returns:

status code.

tad_int_expr_t* tad_int_expr_constant_arr(uint8_t* arr, size_t len)

Initialize tad_int_expr_t structure with single constant value, storing binary array up to 8 bytes length. Array is assumed as “network byte order” and converted to “host byte order” while saveing in 64-bit integer.

Parameters:

arr

pointer to binary array.

len

length of array.

Returns:

pointer to new tad_int_expr_r structure, or NULL if no memory or too beg length passed.

tad_int_expr_t* tad_int_expr_constant(int64_t n)

Initialize tad_int_expr_t structure with single constant value.

Parameters:

n

Value.

Returns:

pointer to new tad_int_expr_r structure.

void tad_int_expr_free(tad_int_expr_t* expr)

Free data allocated for expression.

int tad_int_expr_calculate(const tad_int_expr_t* expr, const struct tad_tmpl_arg_t* args, size_t num_args, int64_t* result)

Calculate value of expression as function of argument set

Parameters:

expr

Expression structure.

args

Array with arguments.

num_args

Length of arguments array.

result

Location for result (OUT).

Returns:

status code.

uint64_t tad_ntohll(uint64_t n)

Convert 64-bit integer from network order to the host and vise versa.

Parameters:

n

Integer to be converted.

Returns:

converted integer

int tad_init_tmpl_args(tad_tmpl_iter_spec_t* arg_specs, size_t arg_specs_num, struct tad_tmpl_arg_t* arg_iterated)

Init argument iteration array template arguments specification. Memory block for array assumed to be allocated.

Parameters:

arg_specs

Array of template argument specifications.

arg_specs_num

Length of array.

arg_iterated

Array of template arguments (OUT).

positive

on success itertaion.

zero

if iteration finished.

negative

if invalid arguments passed.

int tad_iterate_tmpl_args(tad_tmpl_iter_spec_t* arg_specs, size_t arg_specs_num, struct tad_tmpl_arg_t* arg_iterated)

Perform next iteration for passed template arguments.

Parameters:

arg_specs

Array of template argument specifications.

arg_specs_num

Length of array.

arg_iterated

Array of template arguments (OUT).

positive

on success itertaion.

zero

if iteration finished.

negative

if invalid arguments passed.

void tad_tmpl_args_clear(tad_tmpl_iter_spec_t* arg_specs, unsigned int arg_num)

Clear internal data in template iterate args specs

Returns:

nothing.

int tad_get_tmpl_arg_specs(const asn_value* arg_set, tad_tmpl_iter_spec_t* arg_specs, size_t arg_num)

Get argument set from template ASN value and put it into plain-C array

Parameters:

arg_set

ASN value of type “SEQENCE OF Template-Parameter”, which is subvalue with label ‘arg-sets’ in Traffic-Template.

arg_specs

Memory block for arg_spec array. should be allocated by user.

arg_num

Length of arg_spec array, i.e. quantity of Template-Arguments in template.

Returns:

zero on success, otherwise error code.

int tad_data_unit_convert_by_label(const asn_value* pdu_val, const char* label, tad_data_unit_t* location)

Convert DATA-UNIT ASN field of PDU to plain C structure. Memory need to store dynamic data, is allocated in this method and should be freed by user.

Parameters:

pdu_val

ASN value with pdu, which DATA-UNIT field should be converted.

label

Textual label of DATA_UNIT field in PDU.

location

Location for converted structure.

Returns:

zero on success or error code.

int tad_data_unit_convert(const asn_value* pdu_val, asn_tag_value tag_value, tad_data_unit_t* location)

Convert DATA-UNIT ASN field of PDU to plain C structure. Uses tad_data_unit_convert_simple’ method, see notes to it.

Parameters:

pdu_val

ASN value with pdu, which DATA-UNIT field should be converted

tag_value

ASN tag value of field, tag class is assumed to be PRIVATE

location

location for converted structure, should not contain any ‘data staff’ - i.e. should be correctly filled or zeroed

Returns:

zero on success or error code.

int tad_data_unit_convert_simple(const asn_value* du_field, tad_data_unit_t* location)

Convert DATA-UNIT ASN value to plain C structure. Process only template (traffic-generating related) choices in DATA-UNIT. Memory need to store dynamic data, is allocated in this method and should be freed with ‘tad_data_unit_clear’. Template specifications, which was stored in passed location before the call of this method, will be cleared.

Parameters:

du_field

ASN value of DATA-UNIT type to be converted

location

Location for converted structure, should not contain any ‘data staff’ - i.e. should be correctly filled or zeroed

Returns:

zero on success or error code.

int tad_data_unit_from_bin(const uint8_t* data, size_t d_len, tad_data_unit_t* location)

Construct data-unit structure from specified binary data for simple per-byte compare.

Parameters:

data

Binary data which should be compared

d_len

Length of data

location

Location of data-unit structure to be initialized

Returns:

error status.

void tad_data_unit_clear(tad_data_unit_t* du)

Clear data_unit structure, e.g. free data allocated for internal usage. Memory block used by data_unit itself is not freed!

Parameters:

du

Pointer to data_unit structure to be cleared.

int tad_univ_match_field(const tad_data_unit_t* pattern, asn_value* pkt_pdu, uint8_t* data, size_t d_len, const char* label)

Generic method to match data in incoming packet with DATA_UNIT pattern field. If data matches, it will be written into respective field in pkt_pdu. Label of field should be provided by user. If pattern has “plain” type, data will be simply compared. If it is integer, data will be converted from “network byte order” to “host byte order” before matching.

This function is depricated, and leaved here only for easy backward rollbacks. Use ‘ndn_match_data_units’ instead. This function will be removed just when ‘ndn_match_data_units’ will be completed and debugged.

Parameters:

pattern

Pattern structure.

pkt_pdu

ASN value with parsed packet PDU (OUT).

data

Binary data to be matched.

d_len

Length of data packet to be matched, in bytes.

label

Textual label of desired field.

Returns:

zero on success (that means “data matches to the pattern”), otherwise error code.

int tad_data_unit_to_bin(const tad_data_unit_t* du_tmpl, const struct tad_tmpl_arg_t* args, size_t arg_num, uint8_t* data_place, size_t d_len)

Put binary data into specified place according with data unit, already converted into plain C structure. All integers put in network byte order.

Parameters:

du_tmpl

data unit template structure

args

Array with arguments.

arg_num

Length of arguments array.

data_place

location for generated binary data (OUT)

d_len

length of data field to be generated

Returns:

status code

te_errno tad_tcp_push_fin(int socket, const uint8_t* data, size_t length)

Send portion of data into TCP socket, and ensure that FIN will be send in last PUSH TCP message. Details: it set TCP_CORK option on the socket, write data to it, and shut down socket for the write. Note, that firther write to this socket are denied, and will cause SIG_PIPE.

Parameters:

socket

TCP socket fd

data

data to be sent

length

length of data

Returns:

status code

int tad_check_pdu_seq(csap_p csap, asn_value* pdus)

Check that types in sequence of Gengeric-PDU ASN values are corresponding with protocol types in CSAP protocol label stack. If some PDU in ASN value sequence is absent, add empty one. If it is not possible to determine, where empty PDU should be inserted (for example, if CSAP is ‘ip4.ip4.eth’ and ASN sequence has only one ‘ip4’ PDU), error returned. If ASN pdus sequence has extra PDU, error returned.

Parameters:

csap

Pointer to CSAP descriptor

pdus

ASN value, ‘SEQUENCE OF Generic-PDU’ (IN/OUT)

Returns:

status code

te_errno tad_common_write_read_cb(csap_p csap, unsigned int timeout, const tad_pkt* w_pkt, tad_pkt* r_pkt, size_t* r_pkt_len)

Generic implementation of write/read method using write and read in sequence.

This function complies with csap_write_read_cb_t prototype.

te_errno tad_common_read_cb_sock(csap_p csap, int sock, unsigned int flags, unsigned int timeout, tad_pkt* pkt, struct sockaddr* from, socklen_t* fromlen, size_t* pkt_len, int* msg_flags, void* cmsg_buf, size_t* cmsg_buf_len)

Generic implementation of read method over socket using poll and recvmsg calls.

Parameters:

csap

CSAP structure

sock

Socket file descriptor

flags

Flags to be forwarded to recvmsg

timeout

Timeout in microseconds

pkt

Packet with location from received data

from

Location from peer address

fromlen

On input length of the buffer for peer address, on output length of the peer address

pkt_len

Location for received packet length

msg_flags

Location for flags returned by recvmsg() or NULL

cmsg_buf

Buffer to put ancillary data (or NULL)

cmsg_buf_len

Ancillary data buffer length, in/out (or NULL)

Returns:

Status code.

te_errno tad_pthread_create(pthread_t* thread, void*(*)(void*) start_routine, void* arg)

Create detached thread.

Parameters:

thread

Location for thread handle (may be NULL)

start_routine

Thread entry point

arg

Thread entry point argument

Returns:

Status code.

tad_cksum_str_code tad_du_get_cksum_str_code(tad_data_unit_t* du)

An auxiliary tool to obtain a code of a DU value of TAD_DU_STRING type

If du is NULL or if it’s type is different from TAD_DU_STRING, then TAD_CKSUM_STR_CODE_NONE will be returned

Parameters:

du

The DU to be examined (may be NULL)

Returns:

The numeric code of the DU value

te_errno tad_vxlan_init_cb(csap_p csap, unsigned int layer_idx)

Initialize ‘vxlan’ CSAP layer protocol-specific data (the function complies with ‘csap_layer_init_cb_t’ prototype)

te_errno tad_vxlan_destroy_cb(csap_p csap, unsigned int layer_idx)

Teardown ‘vxlan’ CSAP layer protocol-specific data (the function complies with ‘csap_layer_destroy_cb_t’ prototype)

void tad_vxlan_release_pdu_cb(csap_p csap, unsigned int layer_idx, void* opaque)

Teardown VxLAN data prepared by confirm callback or packet match (the function complies with ‘csap_layer_release_opaque_cb_t’ prototype)

te_errno tad_vxlan_confirm_tmpl_cb(csap_p csap, unsigned int layer_idx, asn_value* layer_pdu, void** p_opaque)

Confirm template PDU with respect to VxLAN CSAP parameters and possibilities (the function complies with ‘csap_layer_confirm_pdu_cb_t’ prototype)

te_errno tad_vxlan_gen_bin_cb(csap_p csap, unsigned int layer_idx, const asn_value* tmpl_pdu, void* opaque, const tad_tmpl_arg_t* args, size_t arg_num, tad_pkts* sdus, tad_pkts* pdus)

Generate VxLAN binary data (the function complies with ‘csap_layer_generate_pkts_cb_t’ prototype)

te_errno tad_vxlan_confirm_ptrn_cb(csap_p csap, unsigned int layer_idx, asn_value* layer_pdu, void** p_opaque)

Confirm pattern PDU with respect to VxLAN CSAP parameters and possibilities (the function complies with ‘csap_layer_confirm_pdu_cb_t’ prototype)

te_errno tad_vxlan_match_post_cb(csap_p csap, unsigned int layer_idx, tad_recv_pkt_layer* meta_pkt_layer)

Generate a meta packet VxLAN NDS per a packet received (if need be) (the function complies with ‘csap_layer_match_post_cb_t’ prototype)

te_errno tad_vxlan_match_do_cb(csap_p csap, unsigned int layer_idx, const asn_value* ptrn_pdu, void* ptrn_opaque, tad_recv_pkt* meta_pkt, tad_pkt* pdu, tad_pkt* sdu)

Parse a packet received and match it against the pattern’s VxLAN PDU (the function complies with ‘csap_layer_match_do_cb_t’ prototype)

te_errno tapi_cfg_env_local_to_agent(void)

Set Environment variables specified in /local/env on corresponding Test Agents. If such variable already exists, set new value. If it does not exist, add it with specified value.

Returns:

Status code.

te_errno tapi_cfg_rpcs_local_to_agent(void)

Add RPC server from /local:<ta-name> tree to /agent:<ta-name> tree.

Returns:

Status code.

static bool tapi_is_cfg_link(char* s)

Check if string is configurator link.

Parameters:

s

String to check, whether it has configurator link prefix

Returns:

True if string has configurator link prefix, False otherwise.

te_errno tapi_cfg_set_loglevel(const char* agent, int level)

Set the console log level

Parameters:

agent

Test agent name

level

Console log level (See printk(9))

0

Success

Returns:

Status code

static char* tapi_get_cfg_link(char* link)

Resolve configurator link into its value.

Parameters:

link

Link to string to dereference

Returns:

Dereferenced link value from the configuration tree.

te_errno tapi_cfg_set_loglevel_save(const char* ta, int new_val, int* old_val)

Set kernel log level to a new value optionally saving the old one.

Parameters:

ta

Agent name

new_val

Value to be set (ignored if less than zero)

old_val

Where to save previous value (ignored if NULL)

Returns:

0 on success or status code

te_errno tapi_cfg_get_int_str(int* value, const char* oid)

Get integer value from configuration tree.

Parameters:

value

Where to save value.

oid

OID string.

Returns:

0 on success or error code

te_errno tapi_cfg_get_int_fmt(int* value, const char* format, ...)

Get integer value from configuration tree.

Parameters:

value

Where to save value.

format

Format string for configuration path.

Configuration path parameters.

Returns:

0 on success or error code

te_errno tapi_cfg_set_int_str(int value, int* old_value, const char* oid)

Set integer value in configuration tree.

Parameters:

value

Value to set.

old_value

If not NULL, here will be saved previous value.

oid

OID string.

Returns:

0 on success or error code

te_errno tapi_cfg_set_int_fmt(int value, int* old_value, const char* format, ...)

Set integer value in configuration tree.

Parameters:

value

Value to set.

old_value

If not NULL, here will be saved previous value.

format

Format string for configuration path.

Configuration path parameters.

Returns:

0 on success or error code

te_errno tapi_cfg_get_uint64_str(uint64_t* value, const char* oid)

Get uint64_t value from configuration tree.

Parameters:

value

Where to save value.

oid

OID string.

Returns:

0 on success or error code

te_errno tapi_cfg_get_uint64_fmt(uint64_t* value, const char* format, ...)

Get uint64_t value from configuration tree.

Parameters:

value

Where to save value.

format

Format string for configuration path.

Configuration path parameters.

Returns:

0 on success or error code

te_errno tapi_cfg_set_uint64_str(uint64_t value, uint64_t* old_value, const char* oid)

Set uint64_t value in configuration tree.

Parameters:

value

Value to set.

old_value

If not NULL, here will be saved previous value.

oid

OID string.

Returns:

0 on success or error code

te_errno tapi_cfg_set_uint64_fmt(uint64_t value, uint64_t* old_value, const char* format, ...)

Set uint64_t value in configuration tree.

Parameters:

value

Value to set.

old_value

If not NULL, here will be saved previous value.

format

Format string for configuration path.

Configuration path parameters.

Returns:

0 on success or error code

te_errno tapi_cfg_alloc_net_addr_pair(struct sockaddr** addr1, struct sockaddr** addr2, int* prefix)

Allocate two IP addresses from a free net_pool.

Parameters:

addr1

The first IP address pointer location

addr2

The second IP address pointer location

prefix

The prefix length

Returns:

Status code

te_errno tapi_cfg_add_new_user(const char* agent, int uid)

Add a new user on TA.

User name will be TE_USER_PREFIX + uid, TA requires this format. User will be created in a new group named after the user and having gid = uid.

Parameters:

agent

Agent on which to create a new user.

uid

User ID.

te_errno tapi_cfg_add_user_if_needed(const char* agent, int uid, bool* added)

Add a user on TA if no such user already exists.

added is set to true if a user has been added and to false if it existed already, so that the caller might decide whether it should call tapi_cfg_del_user().

Refer to tapi_cfg_add_new_user() for details concerning user creation.

Parameters:

agent

Agent on which to create a new user.

uid

User ID.

added

A flag to set if uid has been created (may be NULL).

Returns:

Status code.

te_errno tapi_cfg_del_user(const char* agent, int uid)

Remove a user previously added by tapi_cfg_add_new_user().

Parameters:

agent

Agent on which to remove a user.

uid

User ID.

char* tapi_cfg_base_get_ta_dir(const char* ta, tapi_cfg_base_ta_dir kind)

Get a TA directory as specified by kind.

Parameters:

ta

Agent name

kind

Kind of a directory (see tapi_cfg_base_ta_dir type)

Returns:

Directory path (must be free()’d) or NULL on error

te_errno tapi_cfg_base_get_ta_uname(const char* ta, struct utsname* uts)

Get uname info from TA.

Parameters:

ta

agent name

uts

UTS structure to hold TA values

Returns:

status code

te_errno tapi_cfg_if_chan_cur_get(const char* ta, const char* if_name, tapi_cfg_if_chan chan_type, int* num)

Get current number of network channels of a given type.

Parameters:

ta

Test Agent name

if_name

Interface name

chan_type

Network channels type

num

Location for the number of channels

Returns:

Status code.

te_errno tapi_cfg_if_chan_max_get(const char* ta, const char* if_name, tapi_cfg_if_chan chan_type, int* num)

Get maximum number of network channels of a given type.

Parameters:

ta

Test Agent name

if_name

Interface name

chan_type

Network channels type

num

Location for the number of channels

Returns:

Status code.

te_errno tapi_cfg_if_chan_cur_set(const char* ta, const char* if_name, tapi_cfg_if_chan chan_type, int num)

Set current number of network channels of a given type.

Parameters:

ta

Test Agent name

if_name

Interface name

chan_type

Network channels type

num

Number of channels to set

Returns:

Status code.

te_errno tapi_cfg_if_coalesce_get(const char* ta, const char* if_name, const char* param, uint64_t* val)

Get interrupt coalescing parameter value.

Parameters:

ta

Test Agent name

if_name

Interface name

param

Parameter name

val

Where to save obtained value

Returns:

Status code.

te_errno tapi_cfg_if_coalesce_set(const char* ta, const char* if_name, const char* param, uint64_t val)

Set interrupt coalescing parameter value.

Parameters:

ta

Test Agent name

if_name

Interface name

param

Parameter name

val

Value to set

Returns:

Status code.

te_errno tapi_cfg_if_coalesce_set_local(const char* ta, const char* if_name, const char* param, uint64_t val)

Set interrupt coalescing parameter value locally, to commit it later (may be together with other changes).

Parameters:

ta

Test Agent name

if_name

Interface name

param

Parameter name

val

Value to set

Returns:

Status code.

te_errno tapi_cfg_if_coalesce_commit(const char* ta, const char* if_name)

Commit changes made by a few tapi_cfg_if_coalesce_set_local() calls.

Parameters:

ta

Test Agent name

if_name

Interface name

Returns:

Status code.

te_errno tapi_cfg_if_fc_autoneg_get(const char* ta, const char* ifname, int* autoneg)

Get flow control autonegotiation state.

Parameters:

ta

Test agent name

ifname

Interface name

autoneg

Where to save flow control autonegotiation state (0 - disabled, 1 - enabled)

Returns:

Status code.

te_errno tapi_cfg_if_fc_autoneg_set(const char* ta, const char* ifname, int autoneg)

Set flow control autonegotiation state.

Parameters:

ta

Test agent name

ifname

Interface name

autoneg

State to set (0 - disabled, 1 - enabled)

Returns:

Status code.

te_errno tapi_cfg_if_fc_autoneg_set_local(const char* ta, const char* ifname, int autoneg)

Set flow control autonegotiation state locally, to commit it later.

Parameters:

ta

Test agent name

ifname

Interface name

autoneg

State to set (0 - disabled, 1 - enabled)

Returns:

Status code.

te_errno tapi_cfg_if_fc_rx_get(const char* ta, const char* ifname, int* rx)

Get flow control Rx state.

Parameters:

ta

Test agent name

ifname

Interface name

rx

Where to save flow control Rx state (0 - disabled, 1 - enabled)

Returns:

Status code.

te_errno tapi_cfg_if_fc_rx_set(const char* ta, const char* ifname, int rx)

Set flow control Rx state.

Parameters:

ta

Test agent name

ifname

Interface name

rx

State to set (0 - disabled, 1 - enabled)

Returns:

Status code.

te_errno tapi_cfg_if_fc_rx_set_local(const char* ta, const char* ifname, int rx)

Set flow control Rx state locally, to commit it later.

Parameters:

ta

Test agent name

ifname

Interface name

rx

State to set (0 - disabled, 1 - enabled)

Returns:

Status code.

te_errno tapi_cfg_if_fc_tx_get(const char* ta, const char* ifname, int* tx)

Get flow control Tx state.

Parameters:

ta

Test agent name

ifname

Interface name

tx

Where to save flow control Tx state (0 - disabled, 1 - enabled)

Returns:

Status code.

te_errno tapi_cfg_if_fc_tx_set(const char* ta, const char* ifname, int tx)

Set flow control Tx state.

Parameters:

ta

Test agent name

ifname

Interface name

tx

State to set (0 - disabled, 1 - enabled)

Returns:

Status code.

te_errno tapi_cfg_if_fc_tx_set_local(const char* ta, const char* ifname, int tx)

Set flow control Tx state locally, to commit it later.

Parameters:

ta

Test agent name

ifname

Interface name

tx

State to set (0 - disabled, 1 - enabled)

Returns:

Status code.

te_errno tapi_cfg_if_fc_commit(const char* ta, const char* if_name)

Commit all local flow control parameter changes.

Parameters:

ta

Test agent name

if_name

Interface name

Returns:

Status code.

te_errno tapi_cfg_if_fc_get(const char* ta, const char* ifname, tapi_cfg_if_fc* params)

Get all flow control parameter values for a given interface.

Parameters:

ta

Test agent name

ifname

Interface name

params

Where to save parameter values

Returns:

Status code.

te_errno tapi_cfg_if_fc_set(const char* ta, const char* ifname, tapi_cfg_if_fc* params)

Set flow control parameter values for a given interface. All non-negative parameter values will be set simultaneously by committing all changes at once.

Parameters:

ta

Test agent name

ifname

Interface name

params

Flow control parameter values

Returns:

Status code.

te_errno tapi_cfg_if_rss_rx_queues_get(const char* ta, const char* if_name, int* rx_queues)

Get number of available RX queues.

Parameters:

ta

Test Agent name

if_name

Network interface name

rx_queues

Where to save number of RX queues

Returns:

Status code.

te_errno tapi_cfg_if_rss_hash_key_get(const char* ta, const char* if_name, unsigned int rss_context, uint8_t** buf, size_t* len)

Get current RSS hash key.

Parameters:

ta

Test Agent name

if_name

Network interface name

rss_context

RSS context

buf

Where to save pointer to the key (should be released by the caller)

len

Length of the key in bytes

Returns:

Status code.

te_errno tapi_cfg_if_rss_hash_key_set_local(const char* ta, const char* if_name, unsigned int rss_context, const uint8_t* buf, size_t len)

Set RSS hash key (change should be committed with tapi_cfg_if_rss_hash_indir_commit()).

Parameters:

ta

Test Agent name.

if_name

Network interface name.

rss_context

RSS context.

buf

Key to set.

len

Length of the key in bytes (you can use tapi_cfg_if_rss_hash_key_get() to find out supported key length).

Returns:

Status code.

te_errno tapi_cfg_if_rss_hash_key_set(const char* ta, const char* if_name, unsigned int rss_context, const uint8_t* buf, size_t len)

Set RSS hash key.

Parameters:

ta

Test Agent name

if_name

Network interface name

rss_context

RSS context

buf

Key to set

len

Length of the key in bytes

Returns:

Status code.

te_errno tapi_cfg_if_rss_indir_table_size(const char* ta, const char* if_name, unsigned int rss_context, unsigned int* size)

Set current size of RSS indirection table.

Parameters:

ta

Test Agent name

if_name

Network interface name

rss_context

RSS context

size

Where to save table size

Returns:

Status code.

te_errno tapi_cfg_if_rss_indir_get(const char* ta, const char* if_name, unsigned int rss_context, unsigned int idx, int* val)

Get value stored in a entry of RSS indirection table.

Parameters:

ta

Test Agent name

if_name

Network interface name

rss_context

RSS context

idx

Index of the entry

val

Where to save obtained value

Returns:

Status code.

te_errno tapi_cfg_if_rss_indir_set_local(const char* ta, const char* if_name, unsigned int rss_context, unsigned int idx, int val)

Set value stored in a entry of RSS indirection table (change should be committed with tapi_cfg_if_rss_hash_indir_commit()).

Parameters:

ta

Test Agent name

if_name

Network interface name

rss_context

RSS context

idx

Index of the entry

val

Value to set

Returns:

Status code.

te_errno tapi_cfg_if_rss_indir_default_set_local(const char* ta, const char* if_name)

Request resetting indirection table of default RSS context to default state (reset will happen after tapi_cfg_if_rss_hash_indir_commit() is called).

Parameters:

ta

Test Agent name

if_name

Network interface name

Returns:

Status code.

te_errno tapi_cfg_if_rss_indir_default_set(const char* ta, const char* if_name)

Request resetting indirection table of default RSS context to default state.

Parameters:

ta

Test Agent name

if_name

Network interface name

Returns:

Status code.

te_errno tapi_cfg_if_rss_hash_indir_commit(const char* ta, const char* if_name, unsigned int rss_context)

Commit changes related to hash key, hash functions and indirection table.

Parameters:

ta

Test Agent name

if_name

Network interface name

rss_context

RSS context

Returns:

Status code.

te_errno tapi_cfg_if_rss_fill_indir_table(const char* ta, const char* if_name, unsigned int rss_context, unsigned int queue_from, unsigned int queue_to)

Fill RSS hash indirection table by assigning to all its entries queues from [queue_from, queue_to]. Made changes should be committed with tapi_cfg_if_rss_hash_indir_commit().

Example: if queue_from = 2 and queue_to = 3, then table will look like: entry 0: 2 entry 1: 3 entry 2: 2 entry 3: 3 …

Parameters:

ta

Test Agent name

if_name

Network interface name

rss_context

RSS context

queue_from

The first RX queue number

queue_to

The second RX queue number (if it is less than the first one, queues are assigned in backwards order)

Returns:

Status code.

te_errno tapi_cfg_if_rss_print_indir_table(const char* ta, const char* if_name, unsigned int rss_context)

Print to log RSS hash indirection table.

Parameters:

ta

Test Agent name

if_name

Network interface name

rss_context

RSS context

Returns:

Status code.

te_errno tapi_cfg_if_rss_hfuncs_get(const char* ta, const char* if_name, unsigned int rss_context, tapi_cfg_if_rss_hfunc** hfuncs, unsigned int* hfuncs_num)

Get information about all RSS hash functions for a given interface.

Parameters:

ta

Test Agent name

if_name

Network interface name

rss_context

RSS context

hfuncs

Where to save pointer to array of tapi_cfg_if_rss_hfunc structures

hfuncs_num

Where to save number of hash functions

Returns:

Status code.

te_errno tapi_cfg_if_rss_hfunc_set_local(const char* ta, const char* if_name, unsigned int rss_context, const char* func_name, int state)

Set locally the state of RSS hash function. This change should be committed with tapi_cfg_if_rss_hash_indir_commit().

Parameters:

ta

Test Agent name

if_name

Network interface name

rss_context

RSS context

func_name

Function name

state

0 - disabled, 1 - enabled

Returns:

Status code.

te_errno tapi_cfg_if_rss_hfunc_set_single_local(const char* ta, const char* if_name, unsigned int rss_context, const char* func_name)

Enable specified hash function, disable all the other functions. This change should be committed with tapi_cfg_if_rss_hash_indir_commit().

Parameters:

ta

Test Agent name

if_name

Network interface name

rss_context

RSS context

func_name

Function name

Returns:

Status code.

te_errno tapi_cfg_nginx_add(const char* ta, const char* inst_name)

Add nginx instance

Parameters:

ta

Test Agent

inst_name

Nginx instance name

Returns:

Status code

te_errno tapi_cfg_nginx_del(const char* ta, const char* inst_name)

Delete nginx instance

Parameters:

ta

Test Agent

inst_name

Nginx instance name

Returns:

Status code

te_errno tapi_cfg_nginx_enable(const char* ta, const char* inst_name)

Enable nginx instance.

Parameters:

ta

Test Agent

inst_name

Nginx instance name

Returns:

Status code

te_errno tapi_cfg_nginx_disable(const char* ta, const char* inst_name)

Disable nginx instance.

Parameters:

ta

Test Agent

inst_name

Nginx instance name

Returns:

Status code

te_errno tapi_cfg_nginx_cmd_prefix_get(const char* ta, const char* inst_name, char** cmd_prefix)

Get nginx command line prefix

Parameters:

ta

Test Agent

inst_name

Nginx instance name

cmd_prefix

Location for command line prefix

Returns:

Status code

te_errno tapi_cfg_nginx_cmd_prefix_set(const char* ta, const char* inst_name, const char* cmd_prefix)

Set nginx command line prefix

Parameters:

ta

Test Agent

inst_name

Nginx instance name

cmd_prefix

Command line prefix

Returns:

Status code

te_errno tapi_cfg_nginx_config_path_get(const char* ta, const char* inst_name, char** config_path)

Get nginx configuration file path

Parameters:

ta

Test Agent

inst_name

Nginx instance name

config_path

Location for configuration file path

Returns:

Status code

te_errno tapi_cfg_nginx_error_log_path_get(const char* ta, const char* inst_name, char** error_log)

Get nginx error log file path

Parameters:

ta

Test Agent

inst_name

Nginx instance name

error_log

Location for error log file path

Returns:

Status code

te_errno tapi_cfg_nginx_error_log_enable(const char* ta, const char* inst_name)

Enable nginx error logging.

Parameters:

ta

Test Agent

inst_name

Nginx instance name

Returns:

Status code

te_errno tapi_cfg_nginx_error_log_disable(const char* ta, const char* inst_name)

Disable nginx error logging.

Parameters:

ta

Test Agent

inst_name

Nginx instance name

Returns:

Status code

te_errno tapi_cfg_nginx_wrk_ps_num_get(const char* ta, const char* inst_name, unsigned int* wrk_ps_num)

Get number of nginx worker processes

Parameters:

ta

Test Agent

inst_name

Nginx instance name

wrk_ps_num

Location for number of worker processes

Returns:

Status code

te_errno tapi_cfg_nginx_wrk_ps_num_set(const char* ta, const char* inst_name, unsigned int wrk_ps_num)

Set number of nginx worker processes

Parameters:

ta

Test Agent

inst_name

Nginx instance name

wrk_ps_num

Number of worker processes

Returns:

Status code

te_errno tapi_cfg_nginx_wrk_cpu_aff_mode_get(const char* ta, const char* inst_name, te_nginx_cpu_aff_mode* wrk_cpu_aff_mode)

Get CPU affinity mode for nginx worker processes

Parameters:

ta

Test Agent

inst_name

Nginx instance name

wrk_cpu_aff_mode

Location for affinity mode

Returns:

Status code

te_errno tapi_cfg_nginx_wrk_cpu_aff_mode_set(const char* ta, const char* inst_name, te_nginx_cpu_aff_mode wrk_cpu_aff_mode)

Set CPU affinity mode for nginx worker processes

Parameters:

ta

Test Agent

inst_name

Nginx instance name

wrk_cpu_aff_mode

Affinity mode

Returns:

Status code

te_errno tapi_cfg_nginx_wrk_cpu_aff_mask_get(const char* ta, const char* inst_name, char** wrk_cpu_aff_mask)

Get CPU affinity mask for nginx worker processes

Parameters:

ta

Test Agent

inst_name

Nginx instance name

wrk_cpu_aff_mask

Location for affinity mask

Returns:

Status code

te_errno tapi_cfg_nginx_wrk_cpu_aff_mask_set(const char* ta, const char* inst_name, const char* wrk_cpu_aff_mask)

Set CPU affinity mask for nginx worker processes

Parameters:

ta

Test Agent

inst_name

Nginx instance name

wrk_cpu_aff_mask

Affinity mask

Returns:

Status code

te_errno tapi_cfg_nginx_wrk_rlimit_nofile_get(const char* ta, const char* inst_name, unsigned int* wrk_rlimit_nofile)

Get maximum number of open files for nginx worker processes

Parameters:

ta

Test Agent

inst_name

Nginx instance name

wrk_rlimit_nofile

Location for number of open files

Returns:

Status code

te_errno tapi_cfg_nginx_wrk_rlimit_nofile_set(const char* ta, const char* inst_name, unsigned int wrk_rlimit_nofile)

Set maximum number of open files for nginx worker processes

Parameters:

ta

Test Agent

inst_name

Nginx instance name

wrk_rlimit_nofile

Number of open files

Returns:

Status code

te_errno tapi_cfg_nginx_evt_wrk_conn_num_get(const char* ta, const char* inst_name, unsigned int* evt_wrk_conn_num)

Get number of nginx worker connections

Parameters:

ta

Test Agent

inst_name

Nginx instance name

evt_wrk_conn_num

Location for number of worker connections

Returns:

Status code

te_errno tapi_cfg_nginx_evt_wrk_conn_num_set(const char* ta, const char* inst_name, unsigned int evt_wrk_conn_num)

Set number of nginx worker connections

Parameters:

ta

Test Agent

inst_name

Nginx instance name

evt_wrk_conn_num

Number of worker connections

Returns:

Status code

te_errno tapi_cfg_nginx_evt_method_get(const char* ta, const char* inst_name, char** evt_method)

Get nginx connection processing method

Parameters:

ta

Test Agent

inst_name

Nginx instance name

evt_method

Location for connection processing method

Returns:

Status code

te_errno tapi_cfg_nginx_evt_method_set(const char* ta, const char* inst_name, const char* evt_method)

Set nginx connection processing method

Parameters:

ta

Test Agent

inst_name

Nginx instance name

evt_method

Connection processing method, e.g. epoll

Returns:

Status code

te_errno tapi_cfg_nginx_evt_multi_accept_get(const char* ta, const char* inst_name, bool* evt_multi_accept)

Get status of accepting multiple connections

Parameters:

ta

Test Agent

inst_name

Nginx instance name

evt_multi_accept

Location for multiple accept status

Returns:

Status code

te_errno tapi_cfg_nginx_evt_multi_accept_enable(const char* ta, const char* inst_name)

Enable accepting multiple connections

Parameters:

ta

Test Agent

inst_name

Nginx instance name

Returns:

Status code

te_errno tapi_cfg_nginx_evt_accept_mutex_disable(const char* ta, const char* inst_name)

Disable accepting multiple connections

Disable handling connections by turn

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ta

Test Agent

inst_name

Nginx instance name

Returns:

Status code

Status code

te_errno tapi_cfg_nginx_evt_accept_mutex_get(const char* ta, const char* inst_name, bool* evt_accept_mutex)

Set status of handling connections by turn

Parameters:

ta

Test Agent

inst_name

Nginx instance name

evt_accept_mutex

Location for accept mutex status

Returns:

Status code

te_errno tapi_cfg_nginx_evt_accept_mutex_enable(const char* ta, const char* inst_name)

Enable handling connections by turn

Parameters:

ta

Test Agent

inst_name

Nginx instance name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_add(const char* ta, const char* inst_name, const char* srv_name)

Add nginx server

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_del(const char* ta, const char* inst_name, const char* srv_name)

Delete nginx server

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_access_log_path_get(const char* ta, const char* inst_name, const char* srv_name, char** access_log)

Get nginx access log file path

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

access_log

Location for error log file path

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_access_log_enable(const char* ta, const char* inst_name, const char* srv_name)

Enable nginx access logging.

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_access_log_disable(const char* ta, const char* inst_name, const char* srv_name)

Disable nginx access logging.

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_ssl_name_get(const char* ta, const char* inst_name, const char* srv_name, char** ssl_name)

Get nginx server ssl name

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

ssl_name

Location for nginx ssl settings name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_ssl_name_set(const char* ta, const char* inst_name, const char* srv_name, const char* ssl_name)

Set nginx server ssl name

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

ssl_name

Nginx ssl settings name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_hostname_get(const char* ta, const char* inst_name, const char* srv_name, char** hostname)

Get nginx server ssl name

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

hostname

Location for nginx ssl settings name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_hostname_set(const char* ta, const char* inst_name, const char* srv_name, const char* hostname)

Set nginx server ssl name

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

hostname

Nginx ssl settings name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_mime_type_def_get(const char* ta, const char* inst_name, const char* srv_name, char** mime_type_def)

Get nginx server default mime type name

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

mime_type_def

Location for nginx ssl settings name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_mime_type_def_set(const char* ta, const char* inst_name, const char* srv_name, const char* mime_type_def)

Set nginx server default mime type

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

mime_type_def

Nginx default mime type

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_keepalive_timeout_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* keepalive_timeout)

Get nginx server keepalive timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

keepalive_timeout

Location for keepalive timeout

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_keepalive_timeout_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int keepalive_timeout)

Set nginx server keepalive timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

keepalive_timeout

Keepalive timeout

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_keepalive_requests_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* keepalive_requests)

Get nginx server keepalive requests

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

keepalive_requests

Location for keepalive requests

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_keepalive_requests_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int keepalive_requests)

Set nginx server keepalive requests

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

keepalive_requests

Keepalive requests

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_send_timeout_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* send_timeout)

Get nginx server send timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

send_timeout

Location for send timeout

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_send_timeout_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int send_timeout)

Set nginx server send timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

send_timeout

Send timeout

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_tokens_mode_get(const char* ta, const char* inst_name, const char* srv_name, te_nginx_server_tokens_mode* tokens_mode)

Get nginx server tokens mode

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

tokens_mode

Location for tokens mode

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_tokens_mode_set(const char* ta, const char* inst_name, const char* srv_name, te_nginx_server_tokens_mode tokens_mode)

Set nginx server tokens mode

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

tokens_mode

Tokens mode

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_sendfile_get(const char* ta, const char* inst_name, const char* srv_name, bool* sendfile)

Get nginx server sendfile option status

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

sendfile

Location for sendfile status

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_sendfile_enable(const char* ta, const char* inst_name, const char* srv_name)

Enable nginx server sendfile option

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_sendfile_disable(const char* ta, const char* inst_name, const char* srv_name)

Disable nginx server sendfile option

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_tcp_nopush_get(const char* ta, const char* inst_name, const char* srv_name, bool* tcp_nopush)

Get nginx server TCP_NOPUSH option status

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

tcp_nopush

Location for TCP_NOPUSH status

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_tcp_nopush_enable(const char* ta, const char* inst_name, const char* srv_name)

Enable nginx server TCP_NOPUSH option

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_tcp_nopush_disable(const char* ta, const char* inst_name, const char* srv_name)

Disable nginx server TCP_NOPUSH option

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_tcp_nodelay_get(const char* ta, const char* inst_name, const char* srv_name, bool* tcp_nodelay)

Get nginx server TCP_NODELAY option status

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

tcp_nodelay

Location for TCP_NODELAY status

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_tcp_nodelay_enable(const char* ta, const char* inst_name, const char* srv_name)

Enable nginx server TCP_NODELAY option

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_tcp_nodelay_disable(const char* ta, const char* inst_name, const char* srv_name)

Disable nginx server TCP_NODELAY option

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_reset_timedout_conn_get(const char* ta, const char* inst_name, const char* srv_name, bool* reset_timedout_conn)

Get nginx server reset timedout connection option status

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

reset_timedout_conn

Location for reset timedout connection status

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_reset_timedout_conn_enable(const char* ta, const char* inst_name, const char* srv_name)

Enable nginx server reset timedout connection option

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_reset_timedout_conn_disable(const char* ta, const char* inst_name, const char* srv_name)

Disable nginx server reset timedout connection option

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_proxy_conn_timeout_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* proxy_conn_timeout)

Get nginx server proxy connect timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

proxy_conn_timeout

Location for connect timeout

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_proxy_conn_timeout_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int proxy_conn_timeout)

Set nginx server proxy connect timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

proxy_conn_timeout

Connect timeout

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_proxy_buf_num_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* proxy_buf_num)

Get nginx server proxy number of buffers

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

proxy_buf_num

Location for proxy number of buffers

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_proxy_buf_num_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int proxy_buf_num)

Set nginx server proxy number of buffers

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

proxy_buf_num

Number of buffers

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_proxy_buf_def_size_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* proxy_buf_def_size)

Get nginx server proxy default buffer size

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

proxy_buf_def_size

Location for buffer size

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_proxy_buf_def_size_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int proxy_buf_def_size)

Set nginx server proxy default buffer size

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

proxy_buf_def_size

Buffer size

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_proxy_buf_init_size_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* proxy_buf_init_size)

Get nginx server proxy buffer size used for the first part of response

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

proxy_buf_init_size

Location for buffer size

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_proxy_buf_init_size_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int proxy_buf_init_size)

Set nginx server proxy buffer size used for the first part of response

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

proxy_buf_init_size

Buffer size

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_proxy_buf_get(const char* ta, const char* inst_name, const char* srv_name, bool* proxy_buf)

Get nginx server proxy buffering status

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

proxy_buf

Location for buffering status

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_proxy_buf_enable(const char* ta, const char* inst_name, const char* srv_name)

Enable nginx server proxy buffering

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_proxy_buf_disable(const char* ta, const char* inst_name, const char* srv_name)

Disable nginx server proxy buffering

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_file_cache_max_num_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* file_cache_max_num)

Get maximum number of nginx file cache elements

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

file_cache_max_num

Location for maximum number of cache elements

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_file_cache_max_num_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int file_cache_max_num)

Set maximum number of nginx server file cache elements

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

file_cache_max_num

Maximum number of cache elements

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_file_cache_inactive_time_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* file_cache_inactive_time)

Get nginx server file cache inactive timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

file_cache_inactive_time

Location for inactive timeout (in seconds)

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_file_cache_inactive_time_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int file_cache_inactive_time)

Set nginx server file cache inactive timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

file_cache_inactive_time

Inactive timeout (in seconds)

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_file_cache_valid_time_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* file_cache_valid_time)

Get nginx server file cache validation timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

file_cache_valid_time

Location for validation timeout (in seconds)

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_file_cache_valid_time_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int file_cache_valid_time)

Set nginx server file cache validation timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

file_cache_valid_time

Validation timeout (in seconds)

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_file_cache_errors_get(const char* ta, const char* inst_name, const char* srv_name, bool* file_cache_errors)

Get nginx server file lookup errors caching status

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

file_cache_errors

Location for errors caching status

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_file_cache_errors_enable(const char* ta, const char* inst_name, const char* srv_name)

Enable nginx server file lookup errors caching

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_file_cache_errors_disable(const char* ta, const char* inst_name, const char* srv_name)

Disable nginx server file lookup errors caching

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_file_cache_get(const char* ta, const char* inst_name, const char* srv_name, bool* file_cache)

Get nginx server file information caching status

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

file_cache

Location for file caching

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_file_cache_enable(const char* ta, const char* inst_name, const char* srv_name)

Enable nginx server file information caching

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_file_cache_disable(const char* ta, const char* inst_name, const char* srv_name)

Disable nginx server file information caching

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_client_body_timeout_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* client_body_timeout)

Get nginx server client body timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

client_body_timeout

Location for client body timeout (in seconds)

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_client_body_timeout_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int client_body_timeout)

Set nginx server client body timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

client_body_timeout

Client body timeout (in seconds)

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_client_body_max_size_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* client_body_max_size)

Get nginx server client body maximum size

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

client_body_max_size

Location for maximum body size

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_client_body_max_size_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int client_body_max_size)

Set nginx server client body maximum size

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

client_body_max_size

Maximum body size

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_client_header_timeout_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* client_header_timeout)

Get nginx server client header timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

client_header_timeout

Location for header timeout (in seconds)

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_client_header_timeout_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int client_header_timeout)

Set nginx server client header timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

client_header_timeout

Header timeout (in seconds)

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_client_header_buffer_size_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* client_header_buffer_size)

Get nginx server client header buffer size

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

client_header_buffer_size

Location for header buffer size

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_client_header_buffer_size_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int client_header_buffer_size)

Set nginx server client header buffer size

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

client_header_buffer_size

Header buffer size

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_client_large_header_buffer_num_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* client_large_header_buffer_num)

Get nginx server client large header buffer number

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

client_large_header_buffer_num

Location for buffer number

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_client_large_header_buffer_num_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int client_large_header_buffer_num)

Set nginx server client large header buffer number

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

client_large_header_buffer_num

Buffer number

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_client_large_header_buffer_size_get(const char* ta, const char* inst_name, const char* srv_name, unsigned int* client_large_header_buffer_size)

Get nginx server client large header buffer size

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

client_large_header_buffer_size

Location for buffer size

Returns:

Status code

te_errno tapi_cfg_nginx_http_server_client_large_header_buffer_size_set(const char* ta, const char* inst_name, const char* srv_name, unsigned int client_large_header_buffer_size)

Set nginx server client large header buffer size

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

client_large_header_buffer_size

Buffer size

Returns:

Status code

te_errno tapi_cfg_nginx_http_listen_entry_add(const char* ta, const char* inst_name, const char* srv_name, const char* entry_name, const char* addr_spec)

Add nginx server listening entry

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

entry_name

Nginx listening entry name

addr_spec

Listening entry address specification, e.g. port, unix socket, address:port

Returns:

Status code

te_errno tapi_cfg_nginx_http_listen_entry_del(const char* ta, const char* inst_name, const char* srv_name, const char* entry_name)

Delete nginx server listening entry

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

entry_name

Nginx listening entry name

Returns:

Status code

te_errno tapi_cfg_nginx_http_listen_entry_ssl_enable(const char* ta, const char* inst_name, const char* srv_name, const char* entry_name)

Enable ssl for nginx server listening entry

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

entry_name

Nginx listening entry name

Returns:

Status code

te_errno tapi_cfg_nginx_http_listen_entry_ssl_disable(const char* ta, const char* inst_name, const char* srv_name, const char* entry_name)

Disable ssl for nginx server listening entry

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

entry_name

Nginx listening entry name

Returns:

Status code

te_errno tapi_cfg_nginx_http_listen_entry_reuseport_enable(const char* ta, const char* inst_name, const char* srv_name, const char* entry_name)

Enable port reusing for nginx server listening entry

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

entry_name

Nginx listening entry name

Returns:

Status code

te_errno tapi_cfg_nginx_http_listen_entry_reuseport_disable(const char* ta, const char* inst_name, const char* srv_name, const char* entry_name)

Disable port reusing for nginx server listening entry

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

entry_name

Nginx listening entry name

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_add(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* uri)

Add nginx HTTP location entry

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

uri

URI specification

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_del(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name)

Delete nginx HTTP location entry

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_proxy_hdr_add(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* hdr_name, const char* hdr_value)

Add nginx HTTP location proxy http header

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

hdr_name

HTTP header name

hdr_value

HTTP header value

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_proxy_hdr_del(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* hdr_name)

Delete nginx HTTP location proxy http header

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

hdr_name

HTTP header name

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_uri_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** uri)

Get nginx HTTP location URI

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

uri

Location for URI specification

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_uri_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* uri)

Set nginx HTTP location URI

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

uri

URI specification

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_ret_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** ret)

Get nginx HTTP location return directive value

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

ret

Location for return directive

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_ret_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* ret)

Set nginx HTTP location return directive value

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

ret

Return directive

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_index_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** index)

Get nginx HTTP location index file path

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

index

Location for index file

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_index_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* index)

Set nginx HTTP location index file

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

index

Index file

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_root_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** root)

Get nginx HTTP location root path

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

root

Location for root path

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_root_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* root)

Set nginx HTTP location root path

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

root

Root path

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_proxy_ssl_name_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** proxy_ssl_name)

Get nginx HTTP location proxy SSL settings name

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

proxy_ssl_name

Location for SSL settings name

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_proxy_ssl_name_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* proxy_ssl_name)

Set nginx HTTP location proxy SSL settings name

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

proxy_ssl_name

SSL settings name

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_proxy_pass_url_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** proxy_pass_url)

Get nginx HTTP location proxy pass URL

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

proxy_pass_url

Location for proxy pass URL

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_proxy_pass_url_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* proxy_pass_url)

Set nginx HTTP location proxy pass URL

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

proxy_pass_url

Proxy pass URL

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_proxy_http_vers_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** proxy_http_vers)

Get nginx HTTP location proxy HTTP version

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

proxy_http_vers

Location for HTTP version

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_proxy_http_vers_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* proxy_http_vers)

Set nginx HTTP location proxy HTTP version

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

proxy_http_vers

HTTP version

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_ssl_name_get(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, char** ssl_name)

Get nginx HTTP location SSL settings name

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

ssl_name

Location for SSL settings name

Returns:

Status code

te_errno tapi_cfg_nginx_http_loc_ssl_name_set(const char* ta, const char* inst_name, const char* srv_name, const char* loc_name, const char* ssl_name)

Set nginx HTTP location SSL settings name

Parameters:

ta

Test Agent

inst_name

Nginx instance name

srv_name

Nginx server name

loc_name

HTTP location name

ssl_name

Location for SSL settings name

Returns:

Status code

te_errno tapi_cfg_nginx_http_upstream_add(const char* ta, const char* inst_name, const char* us_name)

Add nginx HTTP upstream group of servers

Parameters:

ta

Test Agent

inst_name

Nginx instance name

us_name

Upstream group name

Returns:

Status code

te_errno tapi_cfg_nginx_http_upstream_del(const char* ta, const char* inst_name, const char* us_name)

Delete nginx HTTP upstream group of servers

Parameters:

ta

Test Agent

inst_name

Nginx instance name

us_name

Upstream group name

Returns:

Status code

te_errno tapi_cfg_nginx_http_upstream_keepalive_num_get(const char* ta, const char* inst_name, const char* us_name, unsigned int* keepalive_num)

Get nginx HTTP upstream group number of keepalive connections

Parameters:

ta

Test Agent

inst_name

Nginx instance name

us_name

Upstream group name

keepalive_num

Location for number of keepalive connections

Returns:

Status code

te_errno tapi_cfg_nginx_http_upstream_keepalive_num_set(const char* ta, const char* inst_name, const char* us_name, unsigned int keepalive_num)

Set nginx HTTP upstream group number of keepalive connections

Parameters:

ta

Test Agent

inst_name

Nginx instance name

us_name

Upstream group name

keepalive_num

Number of keepalive connections

Returns:

Status code

te_errno tapi_cfg_nginx_http_us_server_add(const char* ta, const char* inst_name, const char* us_name, const char* srv_name, const char* addr_spec)

Add server to upstream group

Parameters:

ta

Test Agent

inst_name

Nginx instance name

us_name

Upstream group name

srv_name

Server name

addr_spec

Server address specification, e.g. IP-address:port or unix domain socket

Returns:

Status code

te_errno tapi_cfg_nginx_http_us_server_del(const char* ta, const char* inst_name, const char* us_name, const char* srv_name)

Delete server from upstream group

Parameters:

ta

Test Agent

inst_name

Nginx instance name

us_name

Upstream group name

srv_name

Server name

Returns:

Status code

te_errno tapi_cfg_nginx_http_us_server_weight_get(const char* ta, const char* inst_name, const char* us_name, const char* srv_name, unsigned int* weight)

Get nginx HTTP upstream server weight

Parameters:

ta

Test Agent

inst_name

Nginx instance name

us_name

Upstream group name

srv_name

Server name

weight

Location for weight

Returns:

Status code

te_errno tapi_cfg_nginx_http_us_server_weight_set(const char* ta, const char* inst_name, const char* us_name, const char* srv_name, unsigned int weight)

Set nginx HTTP upstream server weight

Parameters:

ta

Test Agent

inst_name

Nginx instance name

us_name

Upstream group name

srv_name

Server name

weight

Server weight

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_add(const char* ta, const char* inst_name, const char* ssl_name)

Add nginx ssl settings

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_del(const char* ta, const char* inst_name, const char* ssl_name)

Del nginx ssl settings

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_cert_get(const char* ta, const char* inst_name, const char* ssl_name, char** cert)

Get nginx ssl certificate

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

cert

Location for file path to certificate

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_cert_set(const char* ta, const char* inst_name, const char* ssl_name, const char* cert)

Set nginx ssl certificate

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

cert

File path to certificate

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_key_get(const char* ta, const char* inst_name, const char* ssl_name, char** key)

Get nginx ssl key

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

key

Location for file path to key

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_key_set(const char* ta, const char* inst_name, const char* ssl_name, const char* key)

Set nginx ssl key

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

key

File path to key

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_ciphers_get(const char* ta, const char* inst_name, const char* ssl_name, char** ciphers)

Get nginx ssl ciphers

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

ciphers

Location for ciphers list

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_ciphers_set(const char* ta, const char* inst_name, const char* ssl_name, const char* ciphers)

Set nginx ssl ciphers

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

ciphers

Ciphers list

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_protocols_get(const char* ta, const char* inst_name, const char* ssl_name, char** protocols)

Get nginx ssl protocols

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

protocols

Location for protocols list

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_protocols_set(const char* ta, const char* inst_name, const char* ssl_name, const char* protocols)

Set nginx ssl protocols

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

protocols

Protocols list

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_session_cache_get(const char* ta, const char* inst_name, const char* ssl_name, char** session_cache)

Get nginx ssl session cache.

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

session_cache

Location for session cache

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_session_cache_set(const char* ta, const char* inst_name, const char* ssl_name, const char* session_cache)

Set nginx ssl session cache.

Value: off | none | [builtin[:size]] [shared:name:size]

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

session_cache

Session cache

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_session_timeout_get(const char* ta, const char* inst_name, const char* ssl_name, unsigned int* session_timeout)

Get nginx ssl session timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

session_timeout

Location for session timeout

Returns:

Status code

te_errno tapi_cfg_nginx_ssl_session_timeout_set(const char* ta, const char* inst_name, const char* ssl_name, unsigned int session_timeout)

Set nginx ssl session timeout

Parameters:

ta

Test Agent

inst_name

Nginx instance name

ssl_name

Nginx ssl settings name

session_timeout

Session timeout

Returns:

Status code

te_errno tapi_cfg_openvpn_add(const char* ta, tapi_openvpn_id id)

Add OpenVPN instance.

Parameters:

ta

Test Agent.

id

Instance ID.

Returns:

Status code

te_errno tapi_cfg_openvpn_del(const char* ta, tapi_openvpn_id id)

Delete OpenVPN instance.

Parameters:

ta

Test Agent.

id

Instance ID.

Returns:

Status code

te_errno tapi_cfg_openvpn_prop_set(const char* ta, tapi_openvpn_id id, const char* prop, cfg_val_type type, const void* val)

Set OpenVPN property.

Parameters:

ta

Test Agent.

id

Instance ID.

prop

Name of property.

type

Type of property.

val

Value the property will receive after execution of function.

Returns:

Status code

te_errno tapi_cfg_openvpn_prop_get(const char* ta, tapi_openvpn_id id, const char* prop, cfg_val_type type, void** val)

Get OpenVPN property.

Parameters:

ta

Test Agent.

id

Instance ID.

prop

Name of property.

type

Type of property.

val

Pointer to value which will receive the parameter stored in the configurator.

Returns:

Status code

te_errno tapi_cfg_openvpn_enable(const char* ta, tapi_openvpn_id id)

Enable OpenVPN instance.

Parameters:

ta

Test Agent.

id

Instance ID.

Returns:

Status code

te_errno tapi_cfg_openvpn_disable(const char* ta, tapi_openvpn_id id)

Disable OpenVPN instance.

Parameters:

ta

Test Agent.

id

Instance ID.

Returns:

Status code

te_errno tapi_cfg_openvpn_endpoint_ip_get(const char* ta, tapi_openvpn_id id, struct sockaddr** addr)

Current OpenVPN endpoint IP.

Parameters:

ta

Test Agent.

id

Instance ID.

addr

Double pointer to sockaddr receiving IP.

Returns:

Status code.

te_errno tapi_cfg_openvpn_peer_add(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop peer)

Add peer to instance’s remote list: the remote which will be used in client mode during target peer selection.

Parameters:

ta

Test Agent.

id

Instance ID.

peer

Peer name.

Returns:

Status code

te_errno tapi_cfg_openvpn_peer_del(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop peer)

Delete peer from instance’s remote list.

Parameters:

ta

Test Agent.

id

Instance ID.

peer

Peer name.

Returns:

Status code

te_errno tapi_cfg_openvpn_peer_port_get(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop peer, uint16_t* val)

Get port associated with the peer.

Parameters:

ta

Test Agent.

id

Instance ID.

peer

Peer name.

val

Pointer to a variable which will receive the associated port.

Returns:

Status code

te_errno tapi_cfg_openvpn_peer_port_set(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop peer, uint16_t val)

Set port associated with the peer.

Parameters:

ta

Test Agent.

id

Instance ID.

peer

Peer name.

val

Port number which will be associated with given remote.

Returns:

Status code

te_errno tapi_cfg_openvpn_user_add(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user)

Add user to instance’s allowed user list.

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

Returns:

Status code

te_errno tapi_cfg_openvpn_user_del(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user)

Delete user from instance’s allowed user list.

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

Returns:

Status code

te_errno tapi_cfg_openvpn_user_username_get(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user, char** val)

Get user’s internal username (as opposed to user-friendly name used in TAPI).

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

val

Pointer to variable which will receive actual user’s username. The username string should be freed after usage.

Returns:

Status code

te_errno tapi_cfg_openvpn_user_username_set(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user, const char* val)

Set user’s internal username.

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

val

New user’s internal username.

Returns:

Status code

te_errno tapi_cfg_openvpn_user_password_get(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user, char** val)

Get password associated with given user.

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

val

Pointer to variable which will receive the actual password. The password string should be freed after usage.

Returns:

Status code

te_errno tapi_cfg_openvpn_user_password_set(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user, const char* val)

Set password associated with given user.

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

val

New user’s password.

Returns:

Status code

te_errno tapi_cfg_openvpn_user_certificate_get(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user, char** val)

Get certificate (rather path to it) associated with the user.

Certificate must be physically located at TA side.

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

val

Pointer to variable which will receive the actual certificate path. The certificate path string should be freed after usage.

Returns:

Status code

te_errno tapi_cfg_openvpn_user_certificate_set(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop user, const char* val)

Set path to certificate associated with the user.

Certificate must be physically located at TA side.

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

val

New user’s certificate path.

Returns:

Status code

te_errno tapi_cfg_openvpn_option_add(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop option, const char* val)

Add custom option to use when generating configuration file.

Parameters:

ta

Test Agent.

id

Instance ID.

option

User-friendly option name.

val

Full option, e.g. “sndbuf 65536”.

Returns:

Status code

te_errno tapi_cfg_openvpn_option_del(const char* ta, tapi_openvpn_id id, tapi_openvpn_prop option)

Delete option.

Parameters:

ta

Test Agent.

id

Instance ID.

option

User-friendly option name.

Returns:

Status code

te_errno tapi_cfg_rx_rule_add(const char* ta, const char* if_name, int64_t location, tapi_cfg_rx_rule_flow flow_type)

Add Rx classification rule.

Change is local and should be committed.

Parameters:

ta

Test Agent

if_name

Interface name

location

Rule location (may be a nonnegative number or a value from tapi_cfg_rx_rule_spec_loc)

flow_type

Flow type (may be left unspecified and set later with tapi_cfg_rx_rule_flow_type_set())

Returns:

Status code.

te_errno tapi_cfg_rx_rule_rx_queue_set(const char* ta, const char* if_name, int64_t location, int64_t rxq)

Set Rx queue.

Change is local and should be committed.

Parameters:

ta

Test Agent

if_name

Interface name

location

Rule location (may be a nonnegative number or a value from tapi_cfg_rx_rule_spec_loc)

rxq

Rx queue number or -1 if packets matching to the rule should be discarded

Returns:

Status code.

te_errno tapi_cfg_rx_rule_rss_context_set(const char* ta, const char* if_name, int64_t location, int64_t context_id)

Set RSS context.

Change is local and should be committed.

Parameters:

ta

Test Agent

if_name

Interface name

location

Rule location (may be a nonnegative number or a value from tapi_cfg_rx_rule_spec_loc)

context_id

RSS context number

Returns:

Status code.

tapi_cfg_rx_rule_flow tapi_cfg_rx_rule_flow_by_socket(int af, rpc_socket_type sock_type)

Get flow type for a given socket type and address family.

Parameters:

af

Address family (AF_INET, AF_INET6)

sock_type

Socket type (RPC_SOCK_STREAM, RPC_SOCK_DGRAM)

Returns:

Flow type.

te_errno tapi_cfg_rx_rule_flow_type_set(const char* ta, const char* if_name, int64_t location, tapi_cfg_rx_rule_flow flow_type)

Set flow type.

Change is local and should be committed.

Parameters:

ta

Test Agent

if_name

Interface name

location

Rule location (may be a nonnegative number or a value from tapi_cfg_rx_rule_spec_loc)

flow_type

Flow type to set

Returns:

Status code.

te_errno tapi_cfg_rx_rule_fill_ip_addrs_ports(const char* ta, const char* if_name, int64_t location, int af, const struct sockaddr* src, const struct sockaddr* src_mask, const struct sockaddr* dst, const struct sockaddr* dst_mask)

Fill address/port fields for TCP/UDP flow types.

Change is local and should be committed.

Parameters:

ta

Test Agent

if_name

Interface name

location

Rule location (may be a nonnegative number or a value from tapi_cfg_rx_rule_spec_loc)

af

AF_INET or AF_INET6

src

Source address/port or NULL

src_mask

Mask for source address/port or NULL. Null mask for non-null src is treated as all-ones value

dst

Destination address/port or NULL

dst_mask

Mask for destination address/port or NULL. Null mask for non-null dst is treated as all-ones value

Returns:

Status code.

te_errno tapi_cfg_rx_rule_commit(const char* ta, const char* if_name, int64_t location)

Commit changes made to Rx rule.

Parameters:

ta

Test Agent

if_name

Interface name

location

Rule location (may be a nonnegative number or a value from tapi_cfg_rx_rule_spec_loc)

Returns:

Status code.

te_errno tapi_cfg_rx_rule_get_last_added(const char* ta, const char* if_name, int64_t* location)

Get location of the rule added the last time (useful when special insertion location was used when adding the rule and you need to know the real location of added rule in rules table).

Parameters:

ta

Test Agent

if_name

Interface name

location

Where to save obtained location (may be -1 if the last rule was added for another interface or no rule was added at all)

Returns:

Status code.

te_errno tapi_cfg_rx_rule_del(const char* ta, const char* if_name, int64_t location)

Remove existing Rx classification rule.

Parameters:

ta

Test Agent

if_name

Interface name

location

Rule location

Returns:

Status code.

te_errno tapi_cfg_rx_rule_flow_type_get(const char* ta, const char* if_name, int64_t location, tapi_cfg_rx_rule_flow* flow_type)

Get flow type of existing Rx rule.

Parameters:

ta

Test Agent

if_name

Interface name

location

Rule location

flow_type

Where to save obtained flow type

Returns:

Status code.

te_errno tapi_cfg_rx_rule_rx_queue_get(const char* ta, const char* if_name, int64_t location, int64_t* rxq)

Get Rx queue assigned to a rule.

Parameters:

ta

Test Agent

if_name

Interface name

location

Rule location

rxq

Where to save Rx queue

Returns:

Status code.

te_errno tapi_cfg_rx_rule_rss_context_get(const char* ta, const char* if_name, int64_t location, int64_t* context_id)

Get RSS context assigned to a rule.

Parameters:

ta

Test Agent

if_name

Interface name

location

Rule location

context_id

Where to save RSS context

Returns:

Status code.

te_errno tapi_cfg_rx_rule_spec_loc_get(const char* ta, const char* if_name, bool* value)

Check whether special insertion locations are supported for Rx classification rules.

Parameters:

ta

Test Agent

if_name

Interface name

value

Will be set to true if special locations are supported, to false otherwise

Returns:

Status code.

te_errno tapi_cfg_rx_rule_table_size_get(const char* ta, const char* if_name, uint32_t* size)

Get size of Rx classification rules table.

Parameters:

ta

Test Agent

if_name

Interface name

size

Where to save rules table size

Returns:

Status code.

te_errno tapi_cfg_rx_rule_find_location(const char* ta, const char* if_name, unsigned int start, unsigned int end, int64_t* location)

Find a free place to insert a new Rx rule.

Parameters:

ta

Test Agent

if_name

Interface name

start

Index from which to start search

end

Last acceptable index plus one (if zero, rules table size will be used)

location

Found free location

Returns:

Status code.

te_errno tapi_cfg_socks_add(const char* ta, tapi_socks_id id)

Add Socks instance.

Parameters:

ta

Test Agent.

id

Instance ID.

Returns:

Status code

te_errno tapi_cfg_socks_del(const char* ta, tapi_socks_id id)

Delete Socks instance.

Parameters:

ta

Test Agent.

id

Instance ID.

Returns:

Status code

te_errno tapi_cfg_socks_enable(const char* ta, tapi_socks_id id)

Enable Socks instance.

Parameters:

ta

Test Agent.

id

Instance ID.

Returns:

Status code

te_errno tapi_cfg_socks_disable(const char* ta, tapi_socks_id id)

Disable Socks instance.

Parameters:

ta

Test Agent.

id

Instance ID.

Returns:

Status code

te_errno tapi_cfg_socks_status_get(const char* ta, tapi_socks_id id, bool* value)

Get Socks status.

Parameters:

ta

Test Agent.

id

Instance ID.

value

Current state. true if enabled, false if disabled.

Returns:

Status code

te_errno tapi_cfg_socks_status_set(const char* ta, tapi_socks_id id, bool value)

Set Socks status.

Parameters:

ta

Test Agent.

id

Instance ID.

value

New value to set. true to enable, false to disable.

Returns:

Status code

te_errno tapi_cfg_socks_impl_get(const char* ta, tapi_socks_id id, te_socks_impl* value)

Obtain used SOCKS server implementation.

Parameters:

ta

Test Agent.

id

Instance ID.

value

Pointer to variable which will received used SOCKS implementation.

Returns:

Status code

te_errno tapi_cfg_socks_impl_set(const char* ta, tapi_socks_id id, te_socks_impl value)

Set used SOCKS server implementation.

Parameters:

ta

Test Agent.

id

Instance ID.

value

Used SOCKS server implementation, element of te_sock_impl enumeration.

Returns:

Status code

te_errno tapi_cfg_socks_proto_add(const char* ta, tapi_socks_id id, tapi_socks_proto_id proto_id, int proto)

Add protocol to be used in SOCKS operations.

Parameters:

ta

Test Agent.

id

Instance ID.

proto_id

Protocol instance id.

proto

Target protocol, such as RPC_IPPROTO_TCP.

Returns:

Status code

te_errno tapi_cfg_socks_proto_del(const char* ta, tapi_socks_id id, tapi_socks_proto_id proto_id)

Remove protocol from being used in SOCKS operations.

Parameters:

ta

Test Agent.

id

Instance ID.

proto_id

Protocol instance id.

Returns:

Status code

te_errno tapi_cfg_socks_proto_get(const char* ta, tapi_socks_id id, tapi_socks_proto_id proto_id, int* value)

Obtain protocol used in SOCKS operations.

Parameters:

ta

Test Agent.

id

Instance ID.

proto_id

Protocol instance id.

value

Pointer to variable which will received used protocol.

Returns:

Status code

te_errno tapi_cfg_socks_proto_set(const char* ta, tapi_socks_id id, tapi_socks_proto_id proto_id, int value)

Set protocol to use in SOCKS operations.

Parameters:

ta

Test Agent.

id

Instance ID.

proto_id

Protocol instance id.

value

Valid protocol such as RPC_IPPROTO_TCP.

Returns:

Status code

te_errno tapi_cfg_socks_interface_add(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, const char* value)

Add interface to listen at.

Parameters:

ta

Test Agent.

id

Instance ID.

interface_id

Interface instance ID.

value

Interface name to assign, e.g. “eth1”.

Returns:

Status code

te_errno tapi_cfg_socks_interface_del(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id)

Remove interface from list of listened interfaces.

Parameters:

ta

Test Agent.

id

Instance ID.

interface_id

Interface instance ID.

Returns:

Status code

te_errno tapi_cfg_socks_interface_get(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, char** value)

Obtain interface instance listens at.

Parameters:

ta

Test Agent.

id

Instance ID.

interface_id

Interface instance ID.

value

Pointer to a string which will receive the obtained interface name. The string should be freed after usage.

Returns:

Status code

te_errno tapi_cfg_socks_interface_set(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, const char* value)

Set interface to listen at.

Parameters:

ta

Test Agent.

id

Instance ID.

interface_id

Interface instance ID.

value

Interface name to assign, e.g. “eth1”.

Returns:

Status code

te_errno tapi_cfg_socks_interface_port_get(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, uint16_t* value)

Get port to listen at.

Parameters:

ta

Test Agent.

id

Instance ID.

interface_id

Interface instance ID.

value

Pointer to a variable which will receive the port associated with given interface.

Returns:

Status code

te_errno tapi_cfg_socks_interface_port_set(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, uint16_t value)

Set port to listen at.

Parameters:

ta

Test Agent.

id

Instance ID.

interface_id

Interface instance ID.

value

Port number which will be associated with the given interface.

Returns:

Status code

te_errno tapi_cfg_socks_interface_addr_family_get(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, int* value)

Get address family used when binding to interface address.

Parameters:

ta

Test Agent.

id

Instance ID.

interface_id

Interface instance ID.

value

Pointer to a variable which will receive the address family associated with given interface.

Returns:

Status code

te_errno tapi_cfg_socks_interface_addr_family_set(const char* ta, tapi_socks_id id, tapi_socks_interface_id interface_id, int value)

Set address family which will be used when binding to interface address.

Parameters:

ta

Test Agent.

id

Instance ID.

interface_id

Interface instance ID.

value

Target address family, i.e. RPC_AF_INET6.

Returns:

Status code

te_errno tapi_cfg_socks_outbound_interface_get(const char* ta, tapi_socks_id id, char** value)

Obtain interface used to send traffic after receiving.

Parameters:

ta

Test Agent.

id

Instance ID.

value

Pointer to a string which will receive the obtained interface name. The string should be freed after usage.

Returns:

Status code

te_errno tapi_cfg_socks_outbound_interface_set(const char* ta, tapi_socks_id id, const char* value)

Set interface to let traffic out from.

Parameters:

ta

Test Agent.

id

Instance ID.

value

Interface name to assign, e.g. “eth1”.

Returns:

Status code

te_errno tapi_cfg_socks_cipher_get(const char* ta, tapi_socks_id id, char** value)

Get cipher used when passing encrypted traffic.

Parameters:

ta

Test Agent.

id

Instance ID.

value

Pointer to a string which will receive the obtained cipher. The string should be freed after usage.

Returns:

Status code

te_errno tapi_cfg_socks_cipher_set(const char* ta, tapi_socks_id id, const char* value)

Set cipher used when passing encrypted traffic.

Parameters:

ta

Test Agent.

id

Instance ID.

value

Cipher to assign, must be supported by selected implementation.

Returns:

Status code

te_errno tapi_cfg_socks_auth_get(const char* ta, tapi_socks_id id, char** value)

Get authentication type used when verifying users.

Parameters:

ta

Test Agent.

id

Instance ID.

value

Pointer to a string which will receive the obtained authentication type.

Returns:

Status code

te_errno tapi_cfg_socks_auth_set(const char* ta, tapi_socks_id id, const char* value)

Set authentication type used when verifying users.

Parameters:

ta

Test Agent.

id

Instance ID.

value

Authentication type to assign.

Returns:

Status code

te_errno tapi_cfg_socks_user_add(const char* ta, tapi_socks_id id, tapi_socks_user_id user)

Add user to instance’s allowed user list.

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

Returns:

Status code

te_errno tapi_cfg_socks_user_del(const char* ta, tapi_socks_id id, tapi_socks_user_id user)

Delete user from instance’s allowed user list.

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

Returns:

Status code

te_errno tapi_cfg_socks_user_next_hop_get(const char* ta, tapi_socks_id id, tapi_socks_user_id user, char** value)

Get user’s next server to be used (relay request to next server for that user)

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

value

Pointer to variable which will receive actual user’s next hop. The string should be freed after usage.

Returns:

Status code

te_errno tapi_cfg_socks_user_next_hop_set(const char* ta, tapi_socks_id id, tapi_socks_user_id user, const char* value)

Set user’s next server to use (for that user requests will be relayed to value server).

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

value

New user’s next hop.

Returns:

Status code

te_errno tapi_cfg_socks_user_username_get(const char* ta, tapi_socks_id id, tapi_socks_user_id user, char** value)

Get user’s internal username (as opposed to user-friendly name used in TAPI).

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

value

Pointer to variable which will receive actual user’s username. The variable should be freed after usage.

Returns:

Status code

te_errno tapi_cfg_socks_user_username_set(const char* ta, tapi_socks_id id, tapi_socks_user_id user, const char* value)

Set user’s internal username.

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

value

New user’s internal username.

Returns:

Status code

te_errno tapi_cfg_socks_user_password_get(const char* ta, tapi_socks_id id, tapi_socks_user_id user, char** value)

Get password associated with given user.

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

value

Pointer to variable which will receive the actual password. The variable should be freed after usage.

Returns:

Status code

te_errno tapi_cfg_socks_user_password_set(const char* ta, tapi_socks_id id, tapi_socks_user_id user, const char* value)

Set password associated with given user.

Parameters:

ta

Test Agent.

id

Instance ID.

user

User name.

value

New user’s password.

Returns:

Status code

void test_behaviour_get(test_behaviour* behaviour)

Fill test behaviour structure based on /local/test values. Ignores missing instances and sets corresponding switch to false, but logs a WARN.

Parameters:

behaviour

Behaviour structure to be filled in.

typedef LIST_HEAD(tapi_bpf_stim_ctx_list, tapi_bpf_stim_ctx)

BPF context list type.

void tapi_bpf_stim_init(rcf_rpc_server* pco, const char* ifname, unsigned int type, bool egress, tapi_bpf_stim_hdl** handle)

Load specific BPF program according to stimulus type type, enable clsact qdisc and link the program to tc attach point on interface ifname, according to egress argument.

The function jumps to cleanup in case of error.

Parameters:

pco

RPC server.

ifname

Interface to link the program to.

type

Type of the stimulus.

egress

Link stimulus BPF program to tc egress if true, otherwise link to tc ingress.

handle

BPF stimulus handle.

void tapi_bpf_stim_del(tapi_bpf_stim_hdl* handle)

Unlink and unload BPF stimulus program, disable clsact qdisc.

Parameters:

handle

BPF stimulus handle.

te_errno tapi_bpf_stim_drop(tapi_bpf_stim_hdl* handle, unsigned int num)

Activate “drop” stimulus. Drop next num packets.

Parameters:

handle

BPF stimulus handle.

num

Number of packets to drop.

Returns:

Status code

te_errno tapi_bpf_stim_dup(tapi_bpf_stim_hdl* handle, unsigned int num)

Activate “duplicate” stimulus. Duplicate next packet num times.

Parameters:

handle

BPF stimulus handle.

num

Number of copies to made.

Returns:

Status code

te_errno tapi_bpf_stim_delay(tapi_bpf_stim_hdl* handle, unsigned int num)

Activate “delay” stimulus. Delay next packet and send it after num frames.

Parameters:

handle

BPF stimulus handle.

num

How much packets to wait before sending delayed packet.

Returns:

Status code

int rpc_xsk_umem__create(rcf_rpc_server* rpcs, rpc_ptr umem_area, uint64_t size, tarpc_xsk_umem_config* config, rpc_ptr* umem)

Create UMEM.

Parameters:

rpcs

RPC server

umem_area

Memory allocated for UMEM

size

Size of the memory

config

UMEM configuration parameters (if NULL, default values will be used by libxdp)

umem

RPC pointer to created UMEM

Returns:

0 on success, -1 on failure.

int rpc_xsk_umem__delete(rcf_rpc_server* rpcs, rpc_ptr umem)

Destroy UMEM.

Parameters:

rpcs

RPC server

umem

RPC pointer to UMEM

Returns:

0 on success, -1 on failure.

int rpc_xsk_socket__create(rcf_rpc_server* rpcs, const char* if_name, uint32_t queue_id, rpc_ptr umem, bool shared_umem, tarpc_xsk_socket_config* config, rpc_ptr* sock)

Create AF_XDP socket.

Parameters:

rpcs

RPC server

if_name

Interface name

queue_id

Rx queue id

umem

RPC pointer to UMEM

shared_umem

If true, UMEM is shared with other sockets @oaram config Configuration parameters

sock

RPC pointer to created socket structure on TA

Returns:

Nonnegative socket FD on success, -1 on failure.

int rpc_xsk_socket__delete(rcf_rpc_server* rpcs, rpc_ptr sock)

Destroy AF_XDP socket on TA.

Parameters:

rpcs

RPC server

sock

RPC pointer to socket structure on TA

Returns:

0 on success, -1 on failure.

int rpc_xsk_map_set(rcf_rpc_server* rpcs, int map_fd, unsigned int key, int fd)

Set an entry of XSK map to FD of AF_XDP socket.

This operation cannot be done via Configurator by editing BPF map entries in configuration tree. XSKMAP is not supported like other map types by Linux kernel. Configurator cannot even list values of its entries because map lookup does not work. The set values are file descriptors which are valid only in the RPC server which created them, not in TA process handling Configuration tree changes.

Parameters:

rpcs

RPC server

map_fd

File descriptor of the map

key

Key in the map

fd

Value to set (nonnegative value means FD of AF_XDP socket; negative value means “remove existing

entry”)

Returns:

0 on success, -1 on failure.

See also:

rpc_bpf_obj_get()

ssize_t rpc_xsk_rx_fill_simple(rcf_rpc_server* rpcs, rpc_ptr umem, const char* if_name, uint32_t queue_id, size_t frames_cnt)

Add specified number of frame buffers to FILL ring of UMEM associated with a given AF_XDP socket. It will enable receiving data into these buffers.

Parameters:

rpcs

RPC server

umem

RPC pointer to UMEM

if_name

Interface name

queue_id

Rx queue id

frames_cnt

Number of frame buffers

Returns:

Number of added buffers on success, -1 on failure.

ssize_t rpc_xsk_receive_simple(rcf_rpc_server* rpcs, rpc_ptr sock, void* buf, size_t len)

Obtain a single packet from RX ring of AF_XDP socket.

This function is meant to be used with rpc_xsk_rx_fill_simple(). After reading data from frame buffer, the buffer is again added to FILL ring so that it can be reused.

Parameters:

rpcs

RPC server

sock

RPC pointer to socket structure on TA

buf

Buffer for received data

len

Buffer length

Returns:

Actual number of received bytes on success, -1 on failure.

int rpc_xsk_send_simple(rcf_rpc_server* rpcs, rpc_ptr sock, void* buf, size_t len)

Send a single packet from AF_XDP socket.

This function chooses for sending one of frame buffers not added to FILL ring by rpc_xsk_rx_fill_simple(). After adding packet buffer to TX ring, it waits until completion can be read from COMPLETION ring, and marks frame buffer as free for future use.

Parameters:

rpcs

RPC server

sock

RPC pointer to socket structure on TA

buf

Buffer with data to send

len

Data length

Returns:

0 on success, -1 on failure.

int rpc_bpf_obj_get(rcf_rpc_server* rpcs, const char* path)

Open a file in BPF file system, obtain BPF object file descriptor.

This function can be used to obtain from RPC process FD of XSK map pinned via configuration tree from TA process.

Parameters:

rpcs

RPC server

path

Path to BPF object file

Returns:

nonnegative FD on success, -1 on failure.

See also:

rpc_xsk_map_set()

te_errno tapi_bpf_map_pin_get_fd(rcf_rpc_server* rpcs, unsigned int bpf_id, const char* map_name, int* fd)

Pin BPF map to a file in BPFFS in TA process via configuration tree (if it is not pinned yet; otherwise use the currently pinned file). Then open that file with bpf_obj_get() to obtain FD of the map in RPC server process.

Parameters:

rpcs

RPC server

bpf_id

BPF object ID

map_name

BPF map name

fd

Location for obtained file descriptor

Returns:

Status code.

char* tapi_dns_gen_filepath(const char* ta, const char* base_dir, const char* filename)

Generate absolute path to file on TA side.

Parameters:

ta

Test Agent.

base_dir

Path to directory where the file will be generated. If NULL, the default base directory will be used.

filename

Path to the config file. If NULL, the file name will be randomly generated. If not an absolute path, base_dir will be used.

Returns:

Resulting path to the file.

te_errno tapi_dns_unbound_cfg_create(const char* ta, const tapi_dns_unbound_cfg_opt* opt, const char* base_dir, const char* filename, char** result_pathname)

Generate config file for unbound DNS server app.

result_pathname value malloc’d, so must be free’d.

Parameters:

ta

Test Agent name.

opt

Configs for Unbound server tool.

base_dir

Path to directory where the file will be generated. If NULL, the default base directory will be used.

pathname

Path to the config file. If NULL, the file name will be randomly generated. If not an absolute path, base_dir will be used.

result_pathname

Resulting path to the file. Maybe NULL.

Returns:

Status code.

void tapi_dns_unbound_cfg_destroy(const char* ta, const char* cfg_file)

Destroy generated config file for unbound DNS server app.

Parameters:

ta

Test Agent name.

cfg_file

Path to generated config file.

te_errno rpc_job_deallocate_channels(rcf_rpc_server* rpcs, unsigned int n_channels, unsigned int* channels)

Deallocate n_channels channels.

Parameters:

rpcs

RPC server

n_channels

Number of channels to deallocate

channels

Channels to deallocate

Returns:

Status code

te_errno rpc_job_attach_filter(rcf_rpc_server* rpcs, const char* filter_name, unsigned int n_channels, unsigned int* channels, bool readable, te_log_level log_level, unsigned int* filter)

Create a secondary output channel applying a filter to an existing channel.

Filters can be attached only to primary channels

Parameters:

rpcs

RPC server

filter_name

Name of the filter

n_channels

Count of channels

channels

Output channels to attach the filter to.

readable

If true, the output of the filter can be read with rpc_job_receive(); otherwise, it is discarded, possibly after being logged.

log_level

If non-zero, the output of the filter is logged with a given log level

filter

Filter channel (may be NULL for trivial filters)

TE_EPERM

Some of channels are input channels

TE_EINVAL

Some of channels are output filters

Returns:

Status code

te_errno rpc_job_filter_add_regexp(rcf_rpc_server* rpcs, unsigned int filter, const char* re, unsigned int extract)

Add a regular expression for filter

Parameters:

rpcs

RPC server

filter

Filter handle

re

PCRE-style regular expression to match

extract

A substring to extract as an output of the filter (0 meaning the whole match)

Returns:

Status code

te_errno rpc_job_filter_add_channels(rcf_rpc_server* rpcs, unsigned int filter, unsigned int n_channels, unsigned int* channels)

Attach an existing filter to additional output channels

Parameters:

rpcs

RPC server

filter

Filter to attach

n_channels

Count of channels

channels

Output channels to attach the filter to

Returns:

Status code

te_errno rpc_job_filter_remove_channels(rcf_rpc_server* rpcs, unsigned int filter, unsigned int n_channels, unsigned int* channels)

Remove filter from specified output channels

Parameters:

rpcs

RPC server

filter

Filter to remove

n_channels

Count of channels

channels

Output channels to remove the filter from

Returns:

Status code

te_errno rpc_job_receive(rcf_rpc_server* rpcs, unsigned int n_filters, unsigned int* filters, int timeout_ms, tarpc_job_buffer* buffer)

Read the next message from one of the available filters.

Parameters:

rpcs

RPC server

n_filters

Count of filters

filters

Set of filters to read from.

timeout_ms

Timeout to wait (negative means #TAPI_RPC_JOB_BIG_TIMEOUT_MS)

buffer

Data buffer pointer. If NULL, the message is silently discarded.

TE_ETIMEDOUT

if there’s no data available within timeout

TE_EPERM

if some of the filters are input channels or primary output channels

TE_EXDEV

if filters are on different RPC servers

Returns:

Status code

te_errno rpc_job_receive_last(rcf_rpc_server* rpcs, unsigned int n_filters, unsigned int* filters, int timeout_ms, tarpc_job_buffer* buffer)

Read the last non-eos message from one of the available filters. The message is not removed from the queue, it can still be read with rpc_job_receive().

Parameters:

rpcs

RPC server

n_filters

Count of filters

filters

Set of filters to read from.

timeout_ms

Timeout to wait (negative means #TAPI_RPC_JOB_BIG_TIMEOUT_MS)

buffer

Data buffer pointer. If NULL, the message is silently discarded.

TE_ETIMEDOUT

if there’s no data available within timeout

TE_EPERM

if some of the filters are input channels or primary output channels

TE_EXDEV

if filters are on different RPC servers

Returns:

Status code

te_errno rpc_job_receive_many(rcf_rpc_server* rpcs, unsigned int n_filters, unsigned int* filters, int timeout_ms, tarpc_job_buffer** buffers, unsigned int* count)

Read multiple messages at once from the specified filters. This function may retrieve some messages and return error if attempt to read the next message failed.

Parameters:

rpcs

RPC server

n_filters

Count of filters

filters

Set of filters to read from

timeout_ms

Timeout to wait (negative means #TAPI_RPC_JOB_BIG_TIMEOUT_MS)

buffers

Where to save pointer to array of message buffers. It should be released by the caller with tarpc_job_buffers_free()

count

On input, maximum number of messages to retrieve. If zero, all available messages will be retrieved. On output - number of actually retrieved messages

Returns:

Status code.

void tarpc_job_buffers_free(tarpc_job_buffer* buffers, unsigned int count)

Release array of message buffers.

Parameters:

buffers

Pointer to the array

count

Number of buffers in the array

te_errno rpc_job_clear(rcf_rpc_server* rpcs, unsigned int n_filters, unsigned int* filters)

Remove all pending messages from filters, they are lost completely.

Parameters:

rpcs

RPC server

n_filters

Count of filters

filters

Set of filters to clear.

TE_EPERM

if some of the filters are input channels or primary output channels

Returns:

Status code

te_errno rpc_job_send(rcf_rpc_server* rpcs, unsigned int channel, const void* buf, size_t count)

Send data to a job input channel.

Parameters:

rpcs

RPC server

channel

Input channel handle

buf

A pointer to data buffer

count

Size of data buffer

TE_EPERM

if channel is not an input channel

Returns:

Status code

te_errno rpc_job_poll(rcf_rpc_server* rpcs, unsigned int n_channels, unsigned int* channels, int timeout_ms)

Poll the job’s channels/filters for readiness.

Parameters:

rpcs

RPC server

n_channels

Count of channels

channels

Set of channels to wait

timeout_ms

Timeout in ms to wait (negative means #TAPI_RPC_JOB_BIG_TIMEOUT_MS)

TE_EPERM

if some channels from wait_set are neither input channels nor pollable output channels

Returns:

Status code

te_errno tapi_nvme_internal_file_append(rcf_rpc_server* rpcs, unsigned int timeout_sec, const char* string, const char* fmt, ...)

Analog of echo ‘string’ >> path

Parameters:

rpcs

RPC server

string

String for append to file

fmt

Format of path

Arguments for format path

Returns:

Status code

te_errno int tapi_nvme_internal_file_read(rcf_rpc_server* rpcs, char* buffer, size_t size, const char* fmt, ...)

Read file in buffer

Parameters:

rpcs

RPC server

buffer

Buffer to store the result

size

Size of buffer

fmt

Format of path

Arguments for format path

-1

if file cannot opened or read not success

Returns:

Number of read bytes

te_errno int bool tapi_nvme_internal_isdir_exist(rcf_rpc_server* rpcs, const char* path)

Check that directory is exist

Parameters:

rpcs

RPC server

path

Path for test

Returns:

existence of the directory

bool tapi_nvme_internal_mkdir(rcf_rpc_server* rpcs, const char* fmt, ...)

Create directory

Parameters:

rpcs

RPC server

fmt

Format of path

Arguments for format path

Returns:

Success of creation

bool bool tapi_nvme_internal_rmdir(rcf_rpc_server* rpcs, const char* fmt, ...)

Remove directory

Parameters:

rpcs

RPC server

fmt

Format of path

Arguments for format path

Returns:

Success of creation

te_errno tapi_nvme_internal_filterdir(rcf_rpc_server* rpcs, const char* path, const char* start_from, te_vec* result)

Search all directories of file in path begin start_from

Parameters:

rpcs

RPC server

path

Path for search

start_from

Pattern for search

result

Found directories or files te_vector have type tapi_nvme_internal_dirinfo

Returns:

Status code

void iperf_server_init(tapi_perf_server* server)

Initialize iperf server context with certain methods.

Parameters:

server

Server tool context.

void iperf_client_init(tapi_perf_client* client)

Initialize iperf client context with certain methods.

Parameters:

client

Client tool context.

void iperf3_server_init(tapi_perf_server* server)

Initialize iperf3 server context with certain methods.

Parameters:

server

Server tool context.

void iperf3_client_init(tapi_perf_client* client)

Initialize iperf3 client context with certain methods.

Parameters:

client

Client tool context.

te_errno perf_app_create_job_from_args(tapi_job_factory_t* factory, te_vec* args, tapi_perf_app* app)

Create job for perf application with specified arguments.

Parameters:

factory

Job factory.

args

List with command and its arguments to create application.

app

Application context.

Returns:

Status code.

See also:

perf_app_stop

te_errno perf_server_create(tapi_perf_server* server, tapi_job_factory_t* factory)

Create server perf tool.

Parameters:

server

Server context.

factory

Job factory.

Returns:

Status code.

te_errno perf_client_create(tapi_perf_client* client, tapi_job_factory_t* factory)

Create client perf tool.

Parameters:

client

Client context.

factory

Job factory.

Returns:

Status code.

te_errno perf_app_start(tapi_perf_app* app)

Start perf application. Note, perf_app_stop should be called to stop the application.

Parameters:

app

Application context.

Returns:

Status code.

See also:

perf_app_stop

te_errno perf_app_read_output(tapi_job_channel_t* out_filter, te_string* str)

Read data from filter to string.

Parameters:

out_filter

Filter for reading output and error messages.

str

String with filtered messages perf tool.

Returns:

Status code.

te_errno perf_app_stop(tapi_perf_app* app)

Stop perf application.

Parameters:

app

Application context.

Returns:

Status code.

See also:

perf_app_start

te_errno perf_app_wait(tapi_perf_app* app, int16_t timeout)

Wait while application finishes his work.

Parameters:

app

Application context.

timeout

Time to wait for application results (seconds).

0

No errors.

TE_ESHCMD

Application returns non-zero exit code.

TE_EFAIL

Critical error, application should be stopped.

Returns:

Status code.

te_errno perf_app_check_report(tapi_perf_app* app, tapi_perf_report* report, const char* tag)

Check application report for errors. The function prints verdicts in case of errors are presents in the report.

Parameters:

app

Application context.

report

Application report.

tag

Tag to print in verdict message.

Returns:

Status code. It returns non-zero code if there are errors in the report.

void perf_app_dump_output(tapi_perf_app* app, const char* tag)

Dump application output (both stdout and stderr).

Parameters:

app

Application context.

tag

Tag to print in dump message.

void perf_get_tool_input_tuple(const tapi_perf_server* server, const tapi_perf_client* client, te_string* buf)

Get application options as a string of name-value pairs.

Parameters:

server

Server context.

client

Client context.

buf

Where to log the results

void perf_get_tool_result_tuple(const tapi_perf_report* report, te_string* buf)

Get application results as a string of name-value pairs.

Parameters:

report

Report.

buf

Where to log the results

int rpc_get_rw_ability(bool* answer, rcf_rpc_server* rpcs, int s, int timeout, char* type)

Get readability (there are data to read) or writability (it is allowed to write) of a particular socket.

Parameters:

answer

pointer a the answer

rpcs

RPC server handle

s

socket to be checked

timeout

timeout in seconds

type

type of checking: “READ” or “WRITE”

Returns:

status code

int tapi_check_pipe(rcf_rpc_server* rpcs, int* pipefds)

Check data exchange on the pipe.

Parameters:

rpcs

RPC server handle

pipefds

Pipe file descriptors

Returns:

0 on success or -1 on failure

int rpc_create_and_bind_socket(rcf_rpc_server* rpc, rpc_socket_type sock_type, rpc_socket_proto proto, bool wild, bool set_reuse_addr, const struct sockaddr* addr)

Create socket of type sock_type from domain domain and bind it to the specified address

When the function returns -1 it reports the reason of the failure with ERROR() macro.

Parameters:

rpc

PCO where a socket is created

sock_type

Type of socket

proto

Protocol used for the socket

wild

Whether to bind socket to wildcard address

set_reuse_addr

Whether to set SO_REUSEADDR socket option on the socket

addr

Address the socket should be bound to (note that it is not allowed to have network address part of address set to wildcard, but if you want to bind the socket to wildcard address you should set wild parameter to true)

-1

Creating or binding socket failed

Returns:

Descriptor of created socket

int rpc_stream_server(rcf_rpc_server* srvr, rpc_socket_proto proto, bool srvr_wild, const struct sockaddr* srvr_addr)

Create a listening socket of type SOCK_STREAM on a particular PCO.

  1. Call socket() on srvr PCO with the following parameters: domain, SOCK_STREAM, proto. Created socket is referred as srvr_s below;

  2. If srvr_wild is true, fill in network address part of srvr_bind_addr with wildcard network address;

  3. Copy port part of srvr_addr to port part of srvr_bind_addr address;

  4. Bind srvr_s socket to srvr_bind_addr address.

  5. If port part of srvr_addr is zero (not specified), then call getsockname() on srvr_s socket to obtain the assigned port and set it to the port part of srvr_addr.

  6. Call listen() for srvr_s socket with default backlog.

Parameters:

srvr

PCO

proto

Protocol for the socket

srvr_wild

Whether to bind server to wildcard address or not

srvr_addr

Server address to be used as a template for bind() on server side (IN/OUT)

Returns:

Created socket or -1.

int rpc_stream_client(rcf_rpc_server* clnt, rpc_socket_domain domain, rpc_socket_proto proto, const struct sockaddr* clnt_addr)

Create a client socket of type SOCK_STREAM ready to connect to a remote peer (some listening socket)

SOCK_STREAM

  1. Call socket() on clnt PCO with the following parameters: domain, SOCK_STREAM, proto. Created socket is referred as clnt_s below.

  2. If clnt_addr is not equal to NULL, bind() clnt_s socket to clnt_addr address.

Parameters:

clnt

PCO where socket will be opened on

domain

Domain for the socket

proto

Protocol for the socket

clnt_addr

Address to bind client to or NULL

Returns:

Created socket or -1.

int rpc_stream_connection(rcf_rpc_server* srvr, rcf_rpc_server* clnt, rpc_socket_proto proto, const struct sockaddr* srvr_addr, const struct sockaddr* clnt_addr, int* srvr_s, int* clnt_s)

Create a connection of type SOCK_STREAM between two PCO

When the function returns -1 it reports the reason of the failure with ERROR() macro.

Parameters:

srvr

PCO where server socket is created

clnt

PCO where client socket is created

proto

Protocol for the connection

srvr_addr

Server address to be used as a template for bind() on server side (IN/OUT)

clnt_addr

Address to bind client to or NULL

srvr_s

Descriptor of the socket reside on srvr (OUT)

clnt_s

Descriptor of the socket reside on clnt (OUT)

0

Connection successfully created

-1

Creating connection failed

Returns:

Status of the operation

int rpc_dgram_connection_gen_wild(rcf_rpc_server* srvr, rcf_rpc_server* clnt, rpc_socket_proto proto, const struct sockaddr* srvr_addr, const struct sockaddr* clnt_addr, int* srvr_s, int* clnt_s, bool srvr_connect, bool clnt_connect, bool bind_wildcard)

Create a connection of type SOCK_DGRAM between two PCO

When the function returns -1 it reports the reason of the failure with ERROR() macro.

Parameters:

srvr

PCO where server socket is created

clnt

PCO where client socket is created

proto

Protocol for the connection

srvr_addr

Server address to be used as a template for bind() on server side

clnt_addr

Address to bind client to

srvr_s

Descriptor of the socket reside on srvr (OUT)

clnt_s

Descriptor of the socket reside on clnt (OUT)

srvr_connect

Whether we should call connect() on srvr_s or not

clnt_connect

Whether we should call connect() on clnt_s or not

bind_wildcard

Whether we should bind srvr_s socket to wildcard address or to unicast one

0

Connection successfully created

-1

Creating connection failed

Returns:

Status of the operation

int rpc_dgram_connection(rcf_rpc_server* srvr, rcf_rpc_server* clnt, rpc_socket_proto proto, const struct sockaddr* srvr_addr, const struct sockaddr* clnt_addr, int* srvr_s, int* clnt_s)

Create a connection of type SOCK_DGRAM between two PCO

When the function returns -1 it reports the reason of the failure with ERROR() macro.

Parameters:

srvr

PCO where server socket is created

clnt

PCO where client socket is created

proto

Protocol for the connection

srvr_addr

Server address to be used as a template for bind() on server side

clnt_addr

Address to bind client to

srvr_s

Descriptor of the socket reside on srvr (OUT)

clnt_s

Descriptor of the socket reside on clnt (OUT)

0

Connection successfully created

-1

Creating connection failed

Returns:

Status of the operation

int rpc_gen_connection_wild(rcf_rpc_server* srvr, rcf_rpc_server* clnt, rpc_socket_type sock_type, rpc_socket_proto proto, const struct sockaddr* srvr_addr, const struct sockaddr* clnt_addr, int* srvr_s, int* clnt_s, bool srvr_connect, bool bind_wildcard)

Create a connection of an arbitrary type between two PCO.

Provide a generic way to create a connection of an arbitrary type and from a particular domain

Division of two peers on server and client is purely abstract, because actually just after creating a connection of type SOCK_STREAM we close real server socket and associate its child socket, with srvr_s parameter of the function.

For connection of type SOCK_STREAM use algorithm Create a connection with connection oriented sockets.

For connection of type SOCK_DGRAM use algorithm Create a connectionless pair of sockets that can communicate with each other without specifying any addresses in their I/O operations.

When the function returns -1 it reports the reason of the failure with ERROR() macro.

Parameters:

srvr

PCO where server socket is created

clnt

PCO where client socket is created

sock_type

Socket type used in the connection

proto

Protocol for the connection

srvr_addr

Server address to be used as a template for bind() on server side

clnt_addr

Address to bind client to

srvr_s

Descriptor of the socket reside on srvr (accepted socket in the case of stream connection) (OUT)

clnt_s

Descriptor of the socket reside on clnt (OUT)

0

Connection successfully created

-1

Creating connection failed

Returns:

Status of the operation

te_errno tapi_rpc_namespace_check(rcf_rpc_server* rpcs, rpc_ptr ptr, const char* ns, const char* function, int line)

Check membership of pointer in the namespace ns.

Parameters:

rpcs

RPC server handle

ptr

Pointer ID

ns

Namespace as string

function

Name of function (for more detailed error messages)

line

Line in file (for more detailed error messages)

Returns:

Status code

const char* tapi_rpc_namespace_get(rcf_rpc_server* rpcs, rpc_ptr ptr)

Get namespace as string according to a pointer id.

Parameters:

rpcs

RPC server handle

ptr

Pointer ID

Returns:

Namespace as string or NULL for invalid namespace

te_errno msghdr_rpc2tarpc(const rpc_msghdr* rpc_msg, tarpc_msghdr* tarpc_msg, bool recv_call)

Transform value of rpc_msghdr type to value of tarpc_msghdr type.

This function does not copy data, so do not release pointers to data buffers in iov_base in cleanup.

Parameters:

rpc_msg

Pointer to value of type rpc_msghdr.

tarpc_msg

Where value of type tarpc_msghdr should be saved (call tarpc_msghdr_free() to free memory after this function, even if it failed).

recv_call

Set to true if conversion is done for receive function call.

Returns:

Status code.

void tarpc_msghdr_free(tarpc_msghdr* msg)

Release memory allocated by msghdr_rpc2tarpc() for converted value.

Parameters:

msg

Pointer to tarpc_msghdr value filled by msghdr_rpc2tarpc().

te_errno msghdr_tarpc2rpc(const tarpc_msghdr* tarpc_msg, rpc_msghdr* rpc_msg)

Transform value of tarpc_msghdr type to value of rpc_msghdr type.

Parameters:

tarpc_msg

Pointer to value of type tarpc_msghdr.

rpc_msg

Where value of type rpc_msghdr should be saved.

Returns:

Status code.

te_errno mmsghdrs_rpc2tarpc(const struct rpc_mmsghdr* rpc_mmsgs, unsigned int num, tarpc_mmsghdr** tarpc_mmsgs, bool recv_call)

Convert array of rpc_mmsghdr structures to array of tarpc_mmsghdr structures.

tarpc_mmsghdrs_free() should be used to release memory after successful call of this function.

Parameters:

rpc_mmsgs

Pointer to array of rpc_mmsghdr structures.

num

Number of elements in rpc_mmsgs.

tarpc_mmsgs

Where to save a pointer to array of converted values.

recv_call

If true, conversion is done for receive call.

Returns:

Status code.

See also:

mmsghdrs_tarpc2rpc, tarpc_mmsghdrs_free

void tarpc_mmsghdrs_free(tarpc_mmsghdr* tarpc_mmsgs, unsigned int num)

Release memory allocated by mmsghdrs_rpc2tarpc() for converted values.

Parameters:

tarpc_mmsgs

Pointer to array of tarpc_mmsghdr structures.

num

Number of elements in the array.

Returns:

Status code.

te_errno mmsghdrs_tarpc2rpc(const tarpc_mmsghdr* tarpc_mmsgs, struct rpc_mmsghdr* rpc_mmsgs, unsigned int num)

Convert array of tarpc_mmsghdr structures back to array of rpc_mmsghdr structures after RPC call.

Parameters:

tarpc_mmsgs

Pointer to array of tarpc_mmsghdr structures.

rpc_mmsgs

Pointer to array of rpc_mmsghdr structures.

num

Number of elements in arrays.

Returns:

Status code.

See also:

mmsghdrs_rpc2tarpc

rpc_ptr rpc_mmap(rcf_rpc_server* rpcs, uint64_t addr, uint64_t length, unsigned int prot, unsigned int flags, int fd, off_t offset)

Create memory mapping on TA.

If you need actual address on TA, not RPC pointer, you can use rpc_get_addr_by_id().

Parameters:

rpcs

RPC server handle.

addr

Hint where to create mapping.

length

Length of the mapping.

prot

Memory protection flags (see rpc_prot_flags).

flags

Memory mapping flags (see rpc_map_flags).

fd

File descriptor for which to create mapping (may be -1 if it is anonymous mapping).

offset

Offset in the file.

Returns:

RPC pointer to address of the mapping on success, RPC_NULL on failure.

int rpc_munmap(rcf_rpc_server* rpcs, rpc_ptr addr, uint64_t length)

Destroy memory mapping on TA.

Parameters:

rpcs

RPC server handle.

addr

RPC pointer previously returned by rpc_mmap().

length

Length of the mapping.

Returns:

0 on success, -1 on failure

int rpc_madvise(rcf_rpc_server* rpcs, rpc_ptr addr, uint64_t length, rpc_madv_value advise)

Give advise about use of memory.

Parameters:

rpcs

RPC server handle.

addr

RPC pointer to the start of a memory range.

length

Length of the range.

advise

Advise (see rpc_madv_value).

Returns:

0 on success, -1 on failure

const char* tarpc_timeval2str(const struct tarpc_timeval* tv)

Convert ‘struct timeval’ to string.

Static buffer is used for return value.

Parameters:

tv

pointer to ‘struct timeval’

Returns:

null-terminated string

const char* timespec2str(const struct timespec* tv)

Convert ‘struct timespec’ to string.

Static buffer is used for return value.

Parameters:

tv

pointer to ‘struct timespec’

Returns:

null-terminated string

const char* tarpc_timespec2str(const struct tarpc_timespec* tv)

Convert ‘struct tarpc_timespec ‘ to string.

Static buffer is used for return value.

Parameters:

tv

pointer to ‘struct tarpc_timespec

Returns:

null-terminated string

const char* tarpc_hwtstamp_config2str(const tarpc_hwtstamp_config* hw_cfg)

Convert ‘struct tarpc_hwtstamp_config ‘ to string.

Static buffer is used for return value.

Parameters:

hw_cfg

pointer to ‘struct tarpc_hwtstamp_config

Returns:

null-terminated string

int rpc_gettimeofday(rcf_rpc_server* rpcs, tarpc_timeval* tv, tarpc_timezone* tz)

Get current time.

Parameters:

rpcs

RPC server

tv

Where to save returned time

tz

Timezone (usually NULL)

Returns:

0 on success, -1 on failure.

int rpc_clock_gettime(rcf_rpc_server* rpcs, tarpc_clock_id_type id_type, int id, tarpc_timespec* ts)

Retrieve the time from the specified clock.

Parameters:

rpcs

RPC server

id_type

Type of clock ID

id

Clock ID

ts

Where to save obtained time

Returns:

0 on success, -1 on failure.

int rpc_clock_settime(rcf_rpc_server* rpcs, tarpc_clock_id_type id_type, int id, const tarpc_timespec* ts)

Set the time for the specified clock.

Parameters:

rpcs

RPC server

id_type

Type of clock ID

id

Clock ID

ts

Time to set

Returns:

0 on success, -1 on failure.

int rpc_clock_adjtime(rcf_rpc_server* rpcs, tarpc_clock_id_type id_type, int id, tarpc_timex* params)

Tune a clock.

Currently support of this call is limited, not all fields of struct timex are supported.

Parameters:

rpcs

RPC server

id_type

Type of clock ID

id

Clock ID

params

Adjustment parameters

Returns:

0 on success, -1 on failure.

te_errno tapi_rpc_read_fd_to_te_string(rcf_rpc_server* rpcs, int fd, te_string* testr)

Read a data from file descriptor to the te_string buffer. Note, it rewrites a current data in the buffer.

Deprecated Use rpc_read_fd2te_string instead.

Parameters:

rpcs

RPC server handle.

fd

File descriptor.

testr

te_string buffer to collect the data read from file descriptor.

Returns:

Status code.

te_errno tapi_rpc_append_fd_to_te_string(rcf_rpc_server* rpcs, int fd, te_string* testr)

Append a read from file descriptor data to the te_string buffer.

Deprecated Use rpc_read_fd2te_string_append instead.

Parameters:

rpcs

RPC server handle.

fd

File descriptor.

testr

te_string buffer to collect the data read from file descriptor.

Returns:

Status code.

int rpc_serial_open(rcf_rpc_server* rpcs, tapi_serial_handle* p_handle, const char* user, const char* console, const struct sockaddr* address)

Open serial console on provided RPC server handle and fill the handle

Handle should be released using rpc_serial_close()

Parameters:

rpcs

Target RPC server

p_handle

Pointer to handle to fill with the session information

user

User name

console

Console name

address

Console address, can be NULL to access it locally.

Returns:

0 on success, -1 on failure.

int rpc_serial_close(tapi_serial_handle handle)

Release the handle obtained using rpc_serial_open()

Parameters:

handle

Serial console session handle

Returns:

0 on success, -1 on failure.

int rpc_serial_read(tapi_serial_handle handle, char* buffer, size_t* buffer_len, int timeout_ms)

Read data from the console designated by handle and fill the data to buffer.

Parameters:

handle

Serial console session handle obtained by rpc_serial_open()

buffer

Target buffer

buffer_len

Pointer to a variable setting the expected length, updated with actual length filled to buffer

timeout_ms

Read timeout (in milliseconds)

Returns:

Number of bytes read in case of success, -1 on failure.

int rpc_serial_force_rw(tapi_serial_handle handle)

Force read/write operation on the given session handle

Parameters:

handle

Serial console session handle

Returns:

0 on success, -1 on failure.

int rpc_serial_spy(tapi_serial_handle handle)

Force spy mode operation on the given session handle

Parameters:

handle

Serial console session handle

Returns:

0 on success, -1 on failure.

int rpc_serial_send_str(tapi_serial_handle handle, const char* fmt, va_list vlist)

Send string to the serial session designated by handle.

Parameters:

handle

Serial console session handle

fmt

printf-like format for the command

vlist

Variadic prinf-like argument list

Returns:

Number of bytes sent in case of success, -1 on failure.

int rpc_serial_send_enter(tapi_serial_handle handle)

Send ‘enter’ press to the session designated by handle

Parameters:

handle

Serial console session handle

Returns:

0 on success, -1 on failure.

int rpc_serial_send_ctrl_c(tapi_serial_handle handle)

Send ‘ctrl+c’ press to the session designated by handle

Parameters:

handle

Serial console session handles

Returns:

0 on success, -1 on failure.

int rpc_serial_flush(tapi_serial_handle handle, size_t amount)

Flush the data to the session

Parameters:

handle

Serial console session handle

amount

Amount of data to drop or 0 to drop all

Returns:

0 on success, -1 on failure.

int rpc_serial_check_pattern(tapi_serial_handle handle, int* offset, const char* fmt, va_list vlist)

Check that data matching specified pattern (regular expression) are located in console session input buffer on the Test Agent. The data may be read after that by rpc_serial_read() because it is buffered.

Parameters:

handle

Serial console session handle

offset

If not NULL, is filled by offset of the first match

fmt

printf-like format for the pattern

vlist

Variadic printf-like argument list with

Returns:

0 on success, -1 on failure.

int rpc_serial_wait_pattern(tapi_serial_handle handle, int* offset, int timeout_ms, const char* fmt, va_list vlist)

Wait until data matching specified pattern (regular expression) appear in console session input buffer on the Test Agent. The data may be read after that by rpc_serial_read()

Parameters:

handle

Serial console sesssion handle

offset

If not NULL, is filled by offset of the first match

timeout_ms

Timeout of the operation in milliseconds or -1 to block until data are received or error occurs

fmt

printf-like format for the pattern

vlist

Variadic printf-like argument list

Returns:

0 on success, -1 on failure.

static bool tapi_local_file_is_file(const tapi_local_file* file)

Check if file is a regular file or directory

Parameters:

file

File.

Returns:

true if file is a regular file.

static bool tapi_local_file_is_dir(const tapi_local_file* file)

Check if file is a regular file or directory

Parameters:

file

File.

Returns:

true if file is a directory.

static const char* tapi_local_file_get_pathname(const tapi_local_file* file)

Get pathname of a file.

Parameters:

file

File.

Returns:

File pathname.

const char* tapi_local_file_get_name(const tapi_local_file* file)

Get file name. Extract name of file from pathname parameter.

Parameters:

file

File.

Returns:

File name on success, or NULL on error.

bool tapi_local_file_cmp(const tapi_local_file* file1, const tapi_local_file* file2)

Compare two files by type, name and size parameters.

Parameters:

file1

First file to compare.

file2

Second file to compare.

Returns:

true if files are equal.

void tapi_local_file_free_entry(tapi_local_file* file)

Free an entry of local file.

Parameters:

file

File.

void tapi_local_file_free(tapi_local_file* file)

Free a local file.

Parameters:

file

File.

SLIST_HEAD(tapi_local_file_list, tapi_local_file_le)

Head of files list.

te_errno tapi_local_fs_traverse(const char* pathname, tapi_local_fs_traverse_cb cb_pre, tapi_local_fs_traverse_cb cb_post, void* user_data)

Traverse the local file system. It calls tapi_local_fs_ls to obtain subitems of files to recursive traverse of files tree and then tapi_local_fs_list_free to free obtained items. This function is not suitable to change the file system tree structure but only to manipulate on it elements.

Parameters:

pathname

Pathname to start traverse from.

cb_pre

Callback function which is called on each element of local file system before traverse the next elements, or NULL if it is cb_post only needed.

cb_post

Callback function which is called on each element of local file system after traverse the next elements, or NULL if it is cb_pre only needed.

user_data

Additional data to post to cb_pre and cb_post handlers, or NULL.

Returns:

Status code.

See also:

tapi_local_fs_ls, tapi_local_fs_list_free

static te_errno tapi_local_fs_ls_root(tapi_local_file_list* files)

Get root files list from /local/fs configurator tree. It calls tapi_local_fs_ls to get the files. files should be released with tapi_local_fs_list_free when they are no longer needed.

Parameters:

files

Files list.

Returns:

Status code

See also:

tapi_local_fs_ls, tapi_local_fs_list_free

te_errno tapi_local_fs_ls(const char* pathname, tapi_local_file_list* files)

Get files list from /local/fs configurator tree. files should be released with tapi_local_fs_list_free when they are no longer needed.

Parameters:

pathname

Pathname of file list.

files

Files list.

Returns:

Status code

See also:

tapi_local_fs_list_free

void tapi_local_fs_list_free(tapi_local_file_list* files)

Free files list that was obtained with tapi_local_fs_ls.

Parameters:

files

Files list.

See also:

tapi_local_fs_ls

te_errno tapi_local_fs_get_file_metadata(const char* pathname, const char* metaname, char** metadata)

Get string representation of metadata of local file from configurator. metadata should be freed with free when it is no longer needed.

Parameters:

pathname

Pathname of file which metadata should be get.

metaname

Metadata name.

metadata

Metadata value.

Returns:

Status code.

char* tapi_local_fs_get_file_real_pathname(const tapi_local_file* file, const char* mapping_pfx)

Get real pathname of local file i.e. pathname mapped on real file system. Returned value should be freed with free when it is no longer needed.

Parameters:

file

Local file.

mapping_pfx

Prefix for file->pathname to map it on real file system, i.e. it is real root directory for local file. If NULL then configurator parameter env:STORAGE_CONTENT_DIR value will be used instead of mapping_pfx.

Returns:

Real pathname, or NULL in case of error.

void tapi_local_fs_ls_print(const char* pathname)

Print a local file system files info using RING function starting from the pathname. This function should be used for debugging purpose.

Parameters:

pathname

Path to start traverse from.

te_errno tapi_storage_auth_params_init(const struct sockaddr* server_addr, uint16_t port, const char* user, const char* password, tapi_storage_auth_params* auth_params)

Set up service authorization parameters. auth_params should be released with tapi_storage_auth_params_fini when it is no longer needed.

Parameters:

server_addr

The server address, may be NULL.

port

The server port.

user

User name for access, may be NULL.

password

Password, may be NULL.

auth_params

Authorization parameters.

Returns:

Status code.

See also:

tapi_storage_auth_params_fini

void tapi_storage_auth_params_fini(tapi_storage_auth_params* auth_params)

Release service authorization parameters that was initialized with tapi_storage_auth_params_init.

Parameters:

auth_params

Authorization parameters.

See also:

tapi_storage_auth_params_init

te_errno tapi_storage_auth_params_copy(tapi_storage_auth_params* to, const tapi_storage_auth_params* from)

Make a deep copy of authorization parameters. Actually this function performs initialization of to with from's parameters.

Parameters:

to

Auth params to copy to.

from

Auth params to copy from.

Returns:

Status code.

See also:

tapi_storage_auth_params_init

SLIST_HEAD(tapi_storage_share_list, tapi_storage_share_le)

Head of shared directories list.

void tapi_storage_share_list_free(tapi_storage_share_list* share)

Empty list of shared directories and free it entries.

Parameters:

share

List of shared directories.

te_errno iut_wait_change_gen(tsa_session* ss, int timeout)

Wait for change of TCP state of socket on the IUT side

Parameters:

ss

Pointer to TSA session structure

timeout

Maximum time to wait (in milliseconds)

Returns:

Status code.

te_errno iut_wait_change(tsa_session* ss)

Wait at most 2 * MSL time for change of TCP state of socket on the IUT side

Parameters:

ss

Pointer to TSA session structure

Returns:

Status code.

void wait_connectivity_changes(tsa_session* ss)

Wait for changes in connectivity if necessary.

Parameters:

ss

Pointer to TSA session structure of current working session

te_errno tsa_sock_create(tsa_session* ss, int rpc_selector)

Create new socket (if it was not created previously), set needed options, bind() it.

Parameters:

ss

Pointer to TSA session structure

rpc_selector

Determine RPC server on which socket must be created (that on IUT or on TST side)

Returns:

Status code.

void tsa_set_sock_handlers(tsa_handlers* handlers)

Set pointers in tsa_handlers structure to socket mode specific TCP state change handlers.

Parameters:

handlers

Pointer to tsa_handlers structure.

void tsa_set_csap_handlers(tsa_handlers* handlers)

Set pointers in tsa_handlers structure to CSAP mode specific TCP state change handlers.

Parameters:

handlers

Pointer to tsa_handlers structure.

te_errno te_string_expand_parameters(const char* src, te_expand_param_func expand_param, const void* ctx, te_string* dest)

Expands parameters in a string.

Parameter names are mapped to values with expand_param callback. Everything else is appended verbatim to dest string.

The parameter names must be enclosed in ${ and }.

Names are not necessary simple strings, specific expanders may define pretty complex syntaxes for variable names e.g. with subscripts etc (see te_string_expand_kvpairs()).

Conditional expansion is supported:

  • ${NAME:-VALUE} is expanded into VALUE if NAME variable is not set, otherwise to its value

  • ${NAME:+VALUE} is expanded into VALUE if NAME variable is set, otherwise to an empty string.

A NAME may have attached a pipeline of filters separated by a pipe character, e.g. ${var|base64|json}.

The following filters are defined:

Name

Meaning

base64

Use Base-64 encoding; see

base64uri

As the above, but use the URI-safe variant of Base-64.

c

Escape characters not allowed in C literals.

cid

Replace all non-alphanumerics with an underscore.

crlf

Replace all newlines not preceded by

hex

Encode each character as a two-digit hex value.

json

Encode the value as a JSON strings, quotes are added.

length

Replace the value with its length.

normalize

Trim trailing spaces and contract all inner spaces.

notempty

A special conditional filter, see below.

shell

Quote all special shell characters.

upper

Convert all letters to uppercase.

uri

Percent-encode all characters not allowed in URI.

xml

Represent all characters disallowed in XML as XML references.

notempty filter is only useful after some other filters and in conjuction with ${NAME:-VALUE}. Namely, any non-empty string is passed as is, but an empty string is discarded, as if the original reference did not exist, thus allowing the default value to be substituted.

There are also the following filters that require integral input values:

Name

Meaning

even

Pass even values as is, drop odd values.

nonzero

Pass non-zero values as is.

odd

Pass odd values as is, drop even values.

pred

Decrement a non-zero value by one.

succ

Increment a value not equal to

These filters are intended to be used together with looping constructs. Hence seemingly illogical behaviour for pred and succ: since negative indexes are treated as the count from the end, 0 should never become -1, nor -1 become 0. See the descrition of te_string_expand_kvpairs() for examples.

Todo Support registering additional filters.

base64, base64uri and hex filters can properly handle values with embedded zeroes, however, standard expanders used in te_string_expand_env_vars() and te_string_expand_kvpairs() cannot produce such values.

Only the actual value of a variable is passed through filters; default VALUE is not processed.

If src has a valid syntax, the function and its derivatives may only fail if any of filters fail. All currently implemented filters always succeed.

Parameters:

src

source string

expand_param

parameter expansion function

ctx

parameter expansion context

dest

destination string

TE_EINVAL

Unmatched ${ found

Returns:

status code

te_errno te_string_expand_env_vars(const char* src, const char* posargs[TE_EXPAND_MAX_POS_ARGS], te_string* dest)

Expand environment variables in a string.

See te_string_expand_parameters() for the expansion syntax.

Parameters:

src

source string

posargs

positional arguments (accesible through ${[0-9]}, may be NULL)

dest

destination string

Returns:

status code

te_errno te_string_expand_kvpairs(const char* src, const char* posargs[TE_EXPAND_MAX_POS_ARGS], const te_kvpair_h* kvpairs, te_string* dest)

Expand key references in a string.

See te_string_expand_parameters() for the expansion syntax.

The expanders support multi-valued keys in kvpairs using the following syntax for names:

  • an empty name is expanded to the current loop index;

  • a name staring with # is expanded to the count of values associated with the rest of the name;

  • NAME[INDEX] is processed in the following way:

    • first, INDEX is recursively expanded

    • then if the result is a valid nonnegative number N, it is used to select the Nth value;

    • else if the result is a negative number -N, it is used to select the Nth value counting from the last, i.e. -1 refers to the last associated value;

    • otherwise the expanded index is treated as a separator and all values associated with the NAME are output separated by the given separator. Note that literal ```` | and ```` : cannot be used as separators, because they would be processed by the general syntax.

  • NAME*EXPR is a loop construct. EXPR is recursively expanded as many times as there are values associated with NAME, varying the current loop index (which may be accessed with ${}). If there is no values associated with NAME, it is treated as a missing variable references, so e.g. a default value may be substituted.

The // comments below mark the expected content of the destination buffer.

te_kvpair_push(data, "ip_address", "%s", "172.16.1.1");
te_kvpair_push(data, "netmask", "%d", 16);
te_kvpair_push(data, "ip_address", "%s", "192.168.1.1");
te_kvpair_push(data, "netmask", "%d", 24);
te_kvpair_push(data, "ip_address", "%s", "127.0.0.1");
te_kvpair_push(data, "netmask", "%d", 32);
te_kvpair_push(data, "index", "%d", 1);

te_string_expand_kvpairs("${ip_address}", NULL, data, dest);
// 127.0.0.1

te_string_expand_kvpairs("${ip_address[0]}", NULL, data, dest);
// 127.0.0.1

te_string_expand_kvpairs("${ip_address[1]}", NULL, data, dest);
// 192.168.1.1

te_string_expand_kvpairs("${ip_address[-1]}", NULL, data, dest);
// 172.16.1.1

te_string_expand_kvpairs("${ip_address[3]:-missing}", NULL, data, dest);
// missing

te_string_expand_kvpairs("${ip_address[${index}]}", NULL, data, dest);
// 192.168.1.1

te_string_expand_kvpairs("${ip_address[3]:-missing}", NULL, data, dest);
// missing

te_string_expand_kvpairs("${ip_address[, ]}", NULL, data, dest);
// 127.0.0.1, 192.168.1.1, 172.16.1.1

te_string_expand_kvpairs("${#ip_address}", NULL, data, dest);
// 3

te_string_expand_kvpairs("${ip_address*address ${ip_address[${}]}/"
                         "${netmask[${}]}}\n}", NULL, data, dest);
// address 127.0.0.1/32
// address 192.168.1.1/24
// address 172.16.1.1/16

te_string_expand_kvpairs("${ip_address*${|nonzero:+,}"
                         "\"${ip_address[${}]}\"}", NULL, data, dest);
// "127.0.0.1","192.168.1.1","172.16.1.1"

te_string_expand_kvpairs("${ip_address*${ip_address[${|pred}]:-none} - "
                         "${ip_address[${|succ}]:-none}\n}",
                         NULL, data, dest);
// none - 192.168.1.1
// 127.0.0.1 - 172.16.1.1
// 192.168.1.1 - none

More examples can also be found in suites/selftest/ts/tool/expand_list.c.

Parameters:

src

source string

posargs

positional arguments (accesible through ${[0-9]}, may be NULL)

kvpairs

key-value pairs

dest

destination string

Returns:

status code

te_errno te_expand_parameters(const char* src, const char** posargs, te_param_value_getter get_param_value, const void* params_ctx, char** retval)

Expands parameters in a string.

See te_string_expand_parameters() for the expansion syntax.

Deprecated te_string_expand_parameters() should be used instead.

Parameters:

src

source string

posargs

positional arguments (accessible through ${[0-9]}, may be NULL)

get_param_value

function to get param value by name

params_ctx

context for parameters

retval

resulting string (must be free()’d by the caller)

TE_EINVAL

Unmatched ${ found

Returns:

status code

static te_errno te_expand_env_vars(const char* src, const char** posargs, char** retval)

Expands environment variables in a string.

See te_string_expand_parameters() for the expansion syntax.

Deprecated te_string_expand_env_vars() should be used instead.

Parameters:

src

source string

posargs

positional arguments (accessible through ${[0-9]}, may be NULL)

retval

resulting string (must be free()’d by the caller)

Returns:

status code

static te_errno te_expand_kvpairs(const char* src, const char** posargs, const te_kvpair_h* kvpairs, char** retval)

Expands key-value pairs in a string.

See te_string_expand_parameters() for the expansion syntax.

Deprecated te_string_expand_kvpairs() should be used instead.

Parameters:

src

source string

posargs

positional arguments (accessible through ${[0-9]}, may be NULL)

kvpairs

key-value pairs

retval

resulting string (must be free()’d by the caller)

Returns:

status code

static void te_meas_stats_update_mean_and_tss(te_meas_stats_data_t* data, double new_datapoint)

Update te_meas_stats_data_t sample mean and sum of squares of differences from mean with new datapoint

see Welford’s algorithm

Parameters:

data

Pointer to te_meas_stats_data_t structure

new_datapoint

New datapoint

static double te_meas_stats_get_var(const te_meas_stats_data_t* data)

Calculate variance of te_meas_stats_data_t structure sample

see Welford’s algorithm

Parameters:

data

Pointer to te_meas_stats_data_t structure

Returns:

Variance of te_meas_stats_data_t structure sample

static double te_meas_stats_get_deviation(const te_meas_stats_data_t* data)

Calculate deviation of te_meas_stats_data_t sample

Parameters:

data

Pointer to te_meas_stats_data_t structure

Returns:

deviation of te_meas_stats_data_t sample

static void te_meas_stats_update_cv(te_meas_stats_data_t* data)

Update CV of te_meas_stats_data_t structure

Parameters:

data

Pointer to te_meas_stats_data_t structure

static bool te_meas_stats_stab_is_stable(const te_meas_stats_stab_t* stab, const te_meas_stats_data_t* data)

Check if te_meas_stats_stab_t sample is stable

Parameters:

stab

Pointer to te_meas_stats_stab_t structure

data

Pointer to te_meas_stats_data_t structure

Returns:

true if te_meas_stats_stab_t sample is stable, false otherwise

static bool te_meas_stats_is_datapoint_correct(double datapoint, double mean, double deviation, double deviation_coeff)

Check if sample datapoint may be skipped

Check if deviation of datapoint within deviation_coeff deviations from mean (see Chebyshev’s inequality)

Parameters:

datapoint

sample datapoint

mean

sample mean

deviation

sample deviation

deviation_coeff

deviation coefficient

Returns:

true if datapoint may be skipped, false otherwise

static unsigned int te_meas_stats_sturges_rule(unsigned int num_datapoints)

Calculate number of bins by Sturge’s rule

Parameters:

num_datapoints

Size of sample

Returns:

Number of bins

static double te_meas_stats_value_deviation(double x, double y)

Calculate deviation of x from y in percentage

Parameters:

x

deviating value

y

fixed value

Returns:

deviation

te_errno te_meas_stats_data_init(te_meas_stats_data_t* data, unsigned int max_num_datapoints)

Allocates and initialize all fields of te_meas_stats_data_t structure.

Parameters:

data

Pointer to structure to initialize

max_num_datapoints

Maximum allowed datapoints

Returns:

Always 0.

void te_meas_stats_data_free(te_meas_stats_data_t* data)

Free te_meas_stats_data_t structure’s resources

Parameters:

data

Pointer to te_meas_stats_data_t structure

te_errno te_meas_stats_stab_init(te_meas_stats_stab_t* stab, te_meas_stats_data_t* data, unsigned int min_num_datapoints, double req_cv, unsigned int allowed_skips, double deviation_coeff)

Initialize te_meas_stats_stab_t structure.

Parameters:

stab

Pointer to structure to initialize

data

Pointer to te_meas_stats_data_t structure

min_num_datapoints

Minimum datapoints for stabilization

req_cv

CV required for stabilization

allowed_skips

Incorrect datapoints allowed to skip

deviation_coeff

Coefficient used to determine incorrect datapoints, if less than zero then the corresponding field initialized with TE_MEAS_STATS_DEFAULT_DEVIATION_COEFF

Returns:

Always 0.

void te_meas_stats_stab_free(te_meas_stats_stab_t* stab)

Free te_meas_stats_stab_t structure’s resources

Parameters:

stab

Pointer to te_meas_stats_stab_t structure

te_errno te_meas_stats_init(te_meas_stats_t* meas_stats, unsigned int max_num_datapoints, int flags, unsigned int min_num_datapoints, double req_cv, unsigned int allowed_skips, double deviation_coeff)

Initialize te_meas_stats_t structure, allocate and initialize its stats_stab and stats_summary fields if corresponding flags are specified.

Parameters:

meas_stats

Pointer to structure to initialize

max_num_datapoints

Maximum allowed iterations

flags

Bitwise-ORed values of te_meas_stats_init_flags

min_num_datapoints

Minimum datapoints for stabilization, ignored without TE_MEAS_STATS_INIT_STAB_REQUIRED flag specified

req_cv

CV required for stabilization, ignored without TE_MEAS_STATS_INIT_STAB_REQUIRED flag specified

allowed_skips

Incorrect datapoints allowed to skip, ignored without TE_MEAS_STATS_INIT_STAB_REQUIRED flag specified

deviation_coeff

Coefficient used to determine incorrect datapoints, if less than zero then the corresponding field initialized with TE_MEAS_STATS_DEFAULT_DEVIATION_COEFF. Ignored without TE_MEAS_STATS_INIT_STAB_REQUIRED flag specified

Returns:

Always 0.

void te_meas_stats_free(te_meas_stats_t* meas_stats)

Free te_meas_stats_t structure’s resources

Parameters:

meas_stats

Pointer to te_meas_stats_t structure

void te_meas_stats_summary_free(te_meas_stats_summary_t* summary)

Free te_meas_stats_summary_t structure’s resources

Parameters:

summary

Pointer to te_meas_summary_stab_t structure

te_meas_stats_update_code te_meas_stats_stab_update(te_meas_stats_stab_t* stab, te_meas_stats_data_t* data, double new_datapoint)

Update te_meas_stats_stab_t structure’s stats_data and correct_stats_data with new datapoint

Parameters:

stab

Pointer to te_meas_stats_stab_t structure

data

Pointer to stats_data structure of stats_stab

new_datapoint

New datapoint

Returns:

status of update

te_meas_stats_update_code te_meas_stats_update(te_meas_stats_t* meas_stats, double new_datapoint)

Update te_meas_stats_t structure with new datapoint. Note that in worst cases square of new datapoint may be calculated inside of this function call.

Parameters:

meas_stats

Pointer to te_meas_stats_t structure

new_datapoint

New datapoint

Returns:

status of update

typedef TAILQ_HEAD(trc_test_iter_args_head, trc_test_iter_arg)

Head of queue of test iteration arguments

typedef TAILQ_HEAD(trc_exp_result_entry_head, trc_exp_result_entry)

Head of queue of expected test results

te_errno trc_db_init(te_trc_db** p_trc_db)

Initialize a new TRC database.

Parameters:

p_trc_db

Location for TRC database instance handle

Returns:

Status code.

See also:

trc_db_save, trc_db_close

te_errno trc_db_open(const char* location, te_trc_db** db)

Open TRC database.

Parameters:

location

Location of the database

db

Location for TRC database instance handle

Returns:

Status code.

See also:

trc_db_save, trc_db_close

te_errno trc_db_open_ext(const char* location, te_trc_db** db, int flags)

Open TRC database.

Parameters:

location

Location of the database

db

Location for TRC database instance handle

flags

Flags (see trc_open_flags).

Returns:

Status code.

See also:

trc_db_save, trc_db_close

void trc_db_close(te_trc_db* trc_db)

Close TRC database.

Parameters:

trc_db

TRC database instance handle

te_trc_db_walker* trc_db_new_walker(te_trc_db* trc_db)

Allocate a new walker to traverse TRC database tree.

Parameters:

trc_db

TRC database instance

Returns:

Pointer to allocated walker.

te_trc_db_walker* trc_db_walker_copy(const te_trc_db_walker* walker)

Make a copy of existing database walker. It is helpful when you need to save current position in TRC database to work with it again later.

If you remove something from database, saved walker may become invalid.

Parameters:

walker

Walker instance

Returns:

Copy of the walker instance.

void trc_db_free_walker(te_trc_db_walker* walker)

Release resources allocated for TRC database tree walker.

Parameters:

walker

TRC database tree walker

bool trc_db_walker_is_iter(const te_trc_db_walker* walker)

Is walker located on a test iteration (or test itself)?

Parameters:

walker

Current walker position

bool trc_db_walker_step_test(te_trc_db_walker* walker, const char* test_name, bool force)

Move walker from the current position to the child test with specified name.

The function has to be called from initial walker position or iteration of any test.

Parameters:

walker

Current walker position

test_name

Name of the test

force

Force to create DB entry, if it does not exist (if resources allocation fails, false is returned, else true is returned)

Returns:

Is walker in a known place in TRC database tree?

bool trc_db_walker_step_iter(te_trc_db_walker* walker, unsigned int n_args, trc_report_argument* args, uint32_t flags, unsigned int db_uid, func_args_match_ptr func_args_match)

Move walker from the current position to the test iteration with specified arguments.

The function has to be called from the test entry position only.

Parameters:

walker

Current walker position

n_args

Number of arguments

args

Test arguments

flags

Flags (see step_iter_flags)

db_uid

TRC database user ID

func_args_match

Function to be used instead test_iter_args_match() if required.

Returns:

Is walker in a known place in TRC database tree?

void trc_db_walker_step_back(te_trc_db_walker* walker)

Move walker one step back.

Parameters:

walker

Current walker position

trc_db_walker_motion trc_db_walker_move(te_trc_db_walker* walker)

If previous motion is to nowhere, move to the root. If previous motion is not to the parent, try to move to the first son. Otherwise, move to the next brother, or to the parent, or nowhere.

Parameters:

walker

Current walker position

Returns:

Made motion.

const trc_exp_result* trc_db_walker_get_exp_result(const te_trc_db_walker* walker, const tqh_strings* tags)

Get test iteration expected result at the current TRC database walker position.

Parameters:

walker

Current walker position

tags

Tags which identify IUT

Returns:

Expected result.

NULL The test/iteration is unknown for TRC database.

bool te_test_results_equal(const te_test_result* lhv, const te_test_result* rhv)

Is obtained result equal to another?

Parameters:

lhv

Left hand result value

rhv

Right hand result value

Returns:

true if results are equal, false otherwise.

const trc_exp_result_entry* trc_is_result_expected(const trc_exp_result* expected, const te_test_result* obtained)

Is obtained result equal to one of expected?

Parameters:

expected

Expected results

obtained

Obtained result

Returns:

Pointer to the entry in expected result which is equal to obtained result.

bool trc_is_exp_result_skipped(const trc_exp_result* result)

Is expected result equal to skipped (without any verdicts).

Parameters:

result

Expected result to check

unsigned int trc_db_new_user(te_trc_db* db)

Allocate a new user ID.

Parameters:

db

TRC database handle

Returns:

Allocated user ID.

void trc_db_free_user(te_trc_db* db, unsigned int user_id)

Free user ID.

Parameters:

db

TRC database handle

user_id

User ID to free

void* trc_db_walker_get_user_data(const te_trc_db_walker* walker, unsigned int user_id)

Get data associated by user with current position in TRC database.

Parameters:

walker

TRC database walker

user_id

User ID

Returns:

Data associated by user or NULL.

void* trc_db_walker_get_parent_user_data(const te_trc_db_walker* walker, unsigned int user_id)

Get data associated by user with parent of current element in TRC database.

Parameters:

walker

TRC database walker

user_id

User ID

Returns:

Data associated by user or NULL.

te_errno trc_db_walker_set_user_data(const te_trc_db_walker* walker, unsigned int user_id, void* user_data)

Set data associated by user with current position in TRC database.

Parameters:

walker

TRC database walker

user_id

User ID

user_data

User data to associate

Returns:

Status code.

te_errno trc_db_walker_set_prop_ud(const te_trc_db_walker* walker, unsigned int user_id, void* user_data, void*(*)(void*, bool) data_gen)

Set data associated by user with current element in TRC database and all its parents.

Parameters:

walker

TRC database walker

user_id

User ID

user_data

User data to associate

data_gen

Function to generate user data for ancestors

Returns:

Status code.

void trc_db_walker_free_user_data(te_trc_db_walker* walker, unsigned int user_id, void(*)(void*) user_free)

Free user data associated by user with current position in TRC database.

Parameters:

walker

TRC database walker

user_id

User ID

user_free

Function to be used to free user data or NULL

te_errno trc_db_free_user_data(te_trc_db* db, unsigned int user_id, void(*)(void*) test_free, void(*)(void*) iter_free)

Free all data of specified user associated with elements of TRC database.

Parameters:

db

TRC database handle

user_id

User ID

test_free

Function to be used to free user data associated with test entries or NULL

iter_free

Function to be used to free user data associated with test iterations or NULL

Returns:

Status code.

static te_errno trc_add_tag(tqh_strings* tags, const char* name)

Add TRC tag into the list.

Parameters:

tags

List with TRC tags

name

Name of the tag to add

Returns:

Status code.

typedef LIST_HEAD(trc_user_data)

List with users’ data associated with TRC database element

typedef STAILQ_HEAD(trc_exp_results, trc_exp_result)

List of expected results

typedef TAILQ_HEAD(trc_files, trc_file)

Queue of included files

void trc_db_test_update_path(trc_test* test)

Update test path.

Parameters:

test

Test

trc_test* trc_db_new_test(trc_tests* tests, trc_test_iter* parent, const char* name)

Allocate and initialize control structure for a new test entry.

Parameters:

tests

List of tests to add a new

parent

Parent test iteration

name

Name of the test or NULL

trc_test_iter* trc_db_new_test_iter(trc_test* test, unsigned int n_args, trc_report_argument* args, trc_test_iter* insert_before)

Allocate and initialize control structure for a new test iteration.

If names [] and values [] are owned by the function, the pointers in names and values are set to NULL. It is assumed that this memory is allocated from heap and should be deallocated using free().

Parameters:

test

Test a new iteration belongs to

n_args

Number of arguments

args

Array with arguments

insert_before

If not NULL, insert the new iteration before this one. Otherwise the new iteration is added to the end of the list.

trc_exp_result_entry* trc_exp_result_entry_dup(trc_exp_result_entry* rentry)

Duplicate expected result entry.

Parameters:

rentry

Result entry to be duplicated

Returns:

Duplicate of result

trc_exp_result* trc_exp_result_dup(trc_exp_result* result)

Duplicate expected result.

Parameters:

result

Result to be duplicated

Returns:

Duplicate of result

const trc_exp_result* exp_defaults_get(te_test_status status)

Get expected results from set of widely used singleton results without verdicts.

Parameters:

status

Expected test status

Returns:

Pointer to expected result with signle entry with specified status and no verdicts.

trc_exp_results* trc_exp_results_dup(trc_exp_results* results)

Duplicate expected results.

Parameters:

results

Results to be duplicated.

Returns:

Duplicate results.

void trc_exp_results_cpy(trc_exp_results* dest, trc_exp_results* src)

Copy expected results from one list at the beginning of another list.

Parameters:

dest

Destination expected results list

src

Source expected results list

void trc_db_test_iter_res_cpy(trc_test_iter* dest, trc_test_iter* src)

Copy notes, default and expected results from one test iteration to another.

Parameters:

dest

Destination test iteration

src

Source test iteration

void trc_db_test_iter_res_split(trc_test_iter* itr)

Split every result having tag logical expression with more than one disjunct in DNF in several results, each with only one disjunct in DNF of logical expression.

Parameters:

itr

Test iteration

te_errno trc_verdict_to_xml(char* v, xmlNodePtr result_node)

Get XML representation of TRC test verdict.

Parameters:

v

Verdict text

result_node

XML node where to insert XML representation of verdict

Returns:

0 on success

te_errno trc_exp_result_entry_to_xml(trc_exp_result_entry* res_entry, xmlNodePtr results_node)

Get XML representation of TRC expected result entry.

Parameters:

res_entry

TRC expected result

results_node

XML node where to insert XML representation of result entry

Returns:

0 on success

te_errno trc_exp_result_to_xml(trc_exp_result* exp_result, xmlNodePtr result_node, bool is_default)

Get XML representation of TRC expected result.

Parameters:

exp_result

TRC expected result

result_node

XML node pointer where to insert XML representation of TRC expected result

is_default

Whether expected result is default or not

Returns:

0 on success

te_errno trc_exp_results_to_xml(trc_exp_results* exp_results, xmlNodePtr node, bool insert_after)

Get XML representation of TRC expected results.

Parameters:

exp_results

TRC expected results

node

XML node pointer

insert_after

Whether to insert <results> nodes after node or into it.

Returns:

0 on success

te_errno get_expected_verdict(xmlNodePtr node, char** verdict)

Get expected verdict from XML.

Parameters:

node

Location of the node of the test result

verdict

Location for the expected verdict data

Returns:

Status code.

te_errno get_expected_rentry(xmlNodePtr node, trc_exp_result_entry* rentry)

Get expected result entry from XML.

Parameters:

node

Location of the node of the test result entry

rentry

Location for the expected result entry data

Returns:

Status code.

te_errno get_expected_result(xmlNodePtr node, trc_exp_result* result, bool tags_tolerate)

Get expected results from XML.

Parameters:

node

Location of the node of the test result

result

Location for the expected result data

tags_tolerate

Whether to allow absence of tags attribute or void string as its value or not

Returns:

Status code.

te_errno get_expected_results(xmlNodePtr* node, trc_exp_results* results)

Get expected results from XML.

Parameters:

node

Location of the first non-arg node of the test iteration (IN), of the first non-result node of the test iteration (OUT)

results

Location for the expected results data

Returns:

Status code.

te_errno get_test_args(xmlNodePtr* node, trc_test_iter_args* args)

Get test iteration arguments.

Parameters:

node

XML node

args

List of arguments to be filled in

Returns:

Status code

te_errno trc_db_get_text_content(xmlNodePtr node, char** content)

Get text content of the node.

Parameters:

node

Location of the XML node pointer

content

Location for the result

Returns:

Status code

te_errno trc_db_save(te_trc_db* db, const char* filename, int flags, int uid, bool(*)(void*, bool) to_save, char*(*)(void*, bool) set_user_attr, char* cmd)

Save TRC database to file

Parameters:

db

TRC database

filename

Name of file

flags

Flags

uid

TRC DB User ID

to_save

Function to determine whether to save a given test or iteration (takes user data and boolean which is true if iteration is considered as parameters)

set_user_attr

Function determining which value should be assigned to “user_attr” attribute of test or iteration

cmd

Command used to generate TRC DB

Returns:

0 on success or error code

void trc_remove_exp_results(te_trc_db* db)

Remove all expected results from TRC DB, unlink and free related XML nodes.

Parameters:

db

TRC database

void trc_free_trc_test(trc_test* test)

Free resources allocated for the test.

Parameters:

test

Test to be freed

void trc_free_trc_tests(trc_tests* tests)

Free resources allocated for the list of tests.

Parameters:

tests

List of tests to be freed

void trc_free_test_iter(trc_test_iter* iter)

Free resources allocated for the test iteration.

Parameters:

iter

Test iteration to be freed

void trc_free_test_iter_args_head(trc_test_iter_args_head* head)

Free resources allocated for the list of test arguments.

Parameters:

head

Head of list of test arguments to be freed

void trc_free_test_iter_args(trc_test_iter_args* args)

Free resources allocated for the list of test arguments.

Parameters:

args

Structure containing head of list of test arguments to be freed

void trc_test_iter_args_init(trc_test_iter_args* args)

Initialize trc_test_iter_args structure.

Parameters:

args

Pointer to the structure

te_errno trc_test_iter_args_copy(trc_test_iter_args* dst, trc_test_iter_args* src)

Copy list of arguments.

Parameters:

dst

Where to add copied arguments

src

Source list of arguments

Returns:

Status code.

trc_test_iter_args* trc_test_iter_args_dup(trc_test_iter_args* args)

Duplicate list of test arguments.

Parameters:

args

Structure containing head of list of test arguments to be freed

void trc_exp_result_entry_free(trc_exp_result_entry* rentry)

Free resources allocated for expected result entry.

Parameters:

rentry

Result entry to be freed

void trc_exp_result_free(trc_exp_result* result)

Free resources allocated for expected result.

Parameters:

result

Result to be freed

void trc_exp_results_free(trc_exp_results* results)

Free resources allocated for the list of expected results.

Parameters:

results

List of expected results to be freed

void trc_db_test_delete_wilds(trc_test* test)

Delete all wildcard iterations from a given test

Parameters:

test

Test

void trc_db_walker_go_to_test(te_trc_db_walker* walker, trc_test* test)

Set TRC DB walker current position to a given test.

Parameters:

walker

TRC DB walker

test

Test

trc_users_data* trc_db_walker_users_data(const te_trc_db_walker* walker)

Get users data of current TRC database element

Parameters:

walker

TRC database walker

Returns:

Users data

trc_users_data* trc_db_walker_parent_users_data(const te_trc_db_walker* walker)

Get users data of parent of current TRC database element

Parameters:

walker

TRC database walker

Returns:

Users data

te_errno trc_db_set_user_data(void* db_item, bool is_iter, unsigned int user_id, void* user_data)

Set data associated by user with a given element in TRC database.

Parameters:

db_item

Element in TRC database (test or test iteration)

is_iter

Is db_item iteration or not?

user_id

User ID

user_data

User data to associate

Returns:

Data associated by user or NULL.

te_errno trc_db_iter_set_user_data(trc_test_iter* iter, unsigned int user_id, void* user_data)

Set data associated by user with a given iteration in TRC database.

Parameters:

iter

Test iteration handler

user_id

User ID

user_data

User data to associate

Returns:

Data associated by user or NULL.

te_errno trc_db_test_set_user_data(trc_test* test, unsigned int user_id, void* user_data)

Set data associated by user with a given iteration in TRC database.

Parameters:

test

Test handler

user_id

User ID

user_data

User data to associate

Returns:

Data associated by user or NULL.

int test_iter_args_match(const trc_test_iter_args* db_args, unsigned int n_args, trc_report_argument* args, bool is_strict)

Match TRC database arguments vs arguments specified by caller.

Parameters:

db_args

List with TRC database arguments

n_args

Number of elements in the args array

args

Array of arguments

is_strict

Can arguments be omitted in wildcard or not?

ITER_NO_MATCH

No matching

ITER_EXACT_MATCH

Exact matching of all arguments values

ITER_WILD_MATCH

Matching to a wildcard record in TRC

const trc_exp_result* trc_db_iter_get_exp_result(const trc_test_iter* iter, const tqh_strings* tags, bool last_match)

Get test iteration expected result.

Parameters:

iter

Test iteration

tags

Tags which identify IUT

last_match

Choose the last match expectation

Returns:

Expected result.

NULL The test/iteration is unknown for TRC database.

te_errno ta_unix_conf_upnp_cp_init(void)

Initialize the UPnP Control Point configuration subtrees and default settings.

Returns:

Status code.

te_errno ta_unix_conf_upnp_cp_release(void)

Stop the UPnP Control Point process.

Returns:

Status code.

void ta_unix_conf_upnp_cp_set_socket_name(const char* ta_path)

Set the UPnP Control Point pathname for the UNIX socket which is need to connect to the Control Point.

Parameters:

ta_path

Path to the TA workspace.

const char* ta_unix_conf_upnp_cp_get_socket_name(void)

Get the UPnP Control Point pathname for the UNIX socket which is need to connect to the Control Point.

Returns:

Pathname for the UNIX socket.

int te_upnp_cp(int argc, char* argv[])

Launch the UPnP Control Point process. This function should be called as: “te_upnp_cp target pathname”, where target is a Search Target that shall be one of the following:

  • ssdp:all Search for all devices and services.

  • upnp:rootdevice Search for root devices only.

  • uuid:device-UUID Search for a particular device.

  • urn:schemas-upnp-org:device:deviceType:ver Search for any device of this type where deviceType and ver are defined by the UPnP Forum working committee.

  • urn:schemas-upnp-org:service:serviceType:ver Search for any service of this type where serviceType and ver are defined by the UPnP Forum working committee.

  • urn:domain-name:device:deviceType:ver Search for any device of this type. Where domain-name (a Vendor Domain Name), deviceType and ver are defined by the UPnP vendor.

  • urn:domain-name:service:serviceType:ver Search for any service of this type. Where domain-name (a Vendor Domain Name), serviceType and ver are defined by the UPnP vendor. pathname is a pathname for a UNIX domain socket. iface is a Network interface which be used by UPnP Control Point to interact with UPnP devices.

rgt_attrs_t* rgt_tmpls_attrs_new(const char** xml_attrs)

Create rgt attribute list based on libxml attribute format

Currently you can only use one attribute list at the same time, so that after using the list free it with rgt_tmpls_attrs_free().

Parameters:

xml_attrs

XML attributes in libxml native format (array of pairs: attribute name, attribute value)

Returns:

Pointer to the list of attributes in rgt format

void rgt_tmpls_attrs_free(rgt_attrs_t* attrs)

Free the list of attributes.

Parameters:

attrs

Rgt attributes

rgt_attrs_t* rgt_tmpls_attrs_save(rgt_attrs_t* attrs)

Save a copy of rgt attribute list

Similar to rgt_tmpls_attrs_new() above, there can be only one copy of saved attributes.

Parameters:

attrs

Rgt attributes to save

Returns:

Pointer to the saved list

See also:

rgt_tmpls_attrs_saved_free

void rgt_tmpls_attrs_saved_free(rgt_attrs_t* attrs)

Free the saved copy of rgt attribute list

Parameters:

attrs

Saved copy of rgt attributes

See also:

rgt_tmpls_attrs_save

void rgt_tmpls_attrs_add_fstr(rgt_attrs_t* attrs, const char* name, const char* fmt_str, ...)

Add a new string attribute into the list of rgt attributes.

Parameters:

attrs

Rgt attributes list

name

A new attribute name

fmt_str

Format string for the attribute value followed by the list of arguments

void rgt_tmpls_attrs_set_fstr(rgt_attrs_t* attrs, const char* name, const char* fmt_str, ...)

Update the value of string attribute in the list of rgt attributes. If not exist it adds this attribute.

Parameters:

attrs

Rgt attributes list

name

A new attribute name

fmt_str

Format string for the attribute value followed by the list of arguments

void rgt_tmpls_attrs_add_uint32(rgt_attrs_t* attrs, const char* name, uint32_t val)

Add a new uint32_t attribute into the list of rgt attributes.

Parameters:

attrs

Rgt attributes list

name

A new attribute name

val

Attribute value

void rgt_tmpls_attrs_set_uint32(rgt_attrs_t* attrs, const char* name, uint32_t val)

Update the value of uint32_t attribute in the list of rgt attributes. If not exist it adds this attribute.

Parameters:

attrs

Rgt attributes list

name

A new attribute name

val

Attribute value

const char* rgt_tmpls_xml_attrs_get(const char** attrs, const char* name)

Get the value of attribute from the list of attributes in libxml native format.

Parameters:

attrs

XML attributes in libxml native format (array of pairs: attribute name, attribute value)

name

Attribute name, whose value we want to get

Returns:

Attribute value.

int rgt_resource_files_prefix_get(const char* util_path, const char* argv0, size_t size, char* prefix)

Get the prefix to resource files of running utility (tmpls, misc, etc.)

First call intializes prefix. If function succeeds, following calls return the same value. util_path and argv0 will be ignored in following calls

Assumes that the executable is in installdir/bindir and datadir is “share”

Parameters:

util_path

path to the utility resource directory from datadir

argv0

the name of called program (pass argv[0] from main)

size

size of the buffer pointed by prefix

prefix

pointer to the prefix to be written

0

On success

1

On failure

Returns:

Status code

int rgt_tmpls_parse(const char** files, const char* prefix, rgt_tmpl_t* tmpls, size_t tmpl_num)

Parses themplate files and fills in an appropriate data structure.

If an error occures the function output error message into stderr

Parameters:

files

An array of template files to be parsed

prefix

A path that must be prefixed before every files entry

tmpls

An array of internal representation of the templates

tmpl_num

Number of templates in the arrays (the same as the number of files passed)

0

On success

1

On failure

Returns:

Status of the operation

void rgt_tmpls_free(rgt_tmpl_t* tmpls, size_t tmpl_num)

Frees internal representation of templates

Parameters:

tmpls

Pointer to an array of templates

tmpl_num

Number of templates in the array

int rgt_tmpls_output(FILE* out_fd, rgt_tmpl_t* tmpl, const rgt_attrs_t* attrs)

Outputs a template block by block into specified file.

If an error occures the function output error message into stderr

Parameters:

out_fd

Output file descriptor

tmpl

Pointer to a template to be output

attrs

Pointer to an array of attributes for that template

0

On success

1

On failure

Returns:

Status of the operation

int rgt_tmpls_output_str(te_string* str, rgt_tmpl_t* tmpl, const rgt_attrs_t* attrs)

Outputs a template block by block into specified TE string.

If an error occures the function outputs error message into stderr

Parameters:

str

TE string to which to append data

tmpl

Pointer to a template to be output

attrs

Pointer to an array of attributes for that template

0

On success

1

On failure

Returns:

Status of the operation

te_errno rgt_which(const char* command, size_t size, char* location)

Traverse PATH variable and locate first entry that is the same as command and is an executable

If command contains path separator (e.g. ‘/’) rgt_which will fail

Parameters:

command

Command to find

size

Size of the buffer pointed to by location

location

Pointer to buffer to write result to

Returns:

Status code

int rgt_filter_init(const char* fltr_fname)

Initialize filter module.

Parameters:

fltr_fname

Name of the XML filter file

0

Success

-1

Failure

Returns:

Status of operation

void rgt_filter_destroy(void)

Destroys filter module.

Returns:

Nothing

enum node_fltr_mode rgt_filter_check_message(const char* entity, const char* user, te_log_level level, const uint32_t* timestamp, uint32_t* flags)

Validates if log message with a particular tuple (entity name, user name and timestamp) passes through user defined filter. The function updates message flags.

Parameters:

entity

Entity name

user

User name

level

Log level

timestamp

Timestamp

flags

Log message flags (OUT)

NFMODE_INCLUDE

the tuple is passed through the filter.

NFMODE_EXCLUDE

the tuple is rejected by the filter.

Returns:

Returns filtering mode for the tuple. It never returns NFMODE_DEFAULT value.

enum node_fltr_mode rgt_filter_check_branch(const char* path)

Verifies if the whole branch of execution flow should be excluded or included from the log report.

Parameters:

path

Path (name) of the branch to be checked. Path is formed from names of packages and/or test of the execution flow separated by ‘/’. For example path “/a/b/c/d” means that execution flow is pkg “a” -> pkg “b” -> pkg “c” -> [test | pkg] “d”

Returns:

Returns filtering mode for the branch.

enum node_fltr_mode rgt_filter_check_duration(const char* node_type, uint32_t* start_ts, uint32_t* end_ts)

Validates if the particular node (TEST, SESSION or PACKAGE) passes through duration filter.

Parameters:

node_type

Typo of the node (“TEST”, “SESSION” or “PACKAGE”)

start_ts

Start timestamp

end_ts

End timestamp

NFMODE_INCLUDE

the node is passed through the filter.

NFMODE_EXCLUDE

the node is rejected by the filter.

Returns:

Returns filtering mode for the node.

void flow_tree_init(void)

Initialize flow tree library.

Add session node with id equals to ROOT_ID into the tree and insert it into set of patential parent nodes (so called “new set”).

Returns:

Nothing

void flow_tree_destroy(void)

Free all resources used by flow tree library.

Returns:

Nothing

void* flow_tree_add_node(node_id_t parent_id, node_id_t node_id, node_type_t new_node_type, char* node_name, uint32_t* timestamp, void* user_data, int* err_code)

Try to add a new node into the execution flow tree.

Parameters:

parent_id

Parent node id.

node_id

Id of the node to be created.

1

New node was successfully added.

0

The parent node can’t get children.

Returns:

Status of operation.

void* flow_tree_close_node(node_id_t parent_id, node_id_t node_id, uint32_t* timestamp, int* err_code)

Try to close the node in execution flow tree.

Parameters:

parent_id

Parent node id.

node_id

Id of the node to be closed.

Pointer

if the node was successfully closed.

NULL

The node is unexpected.

Returns:

Pointer to the user data.

te_errno flow_tree_get_close_node(node_id_t* id, node_id_t* parent_id)

Returns ID (and parent ID) of a node that is waiting for close operation. Note that there could be more than one node in “close” set, this function returns an arbitrary one because they all are not distinguishable

Parameters:

id

ID of a node waiting for close

parent_id

ID of parent node

Returns:

0 on success, TE_ENOENT if all the nodes are closed.

enum node_fltr_mode flow_tree_filter_message(log_msg* msg)

Filters message according to package/test filtering.

Parameters:

msg

A message to be checked

Returns:

Returns a filtering mode of a node which the message links with

void flow_tree_attach_message(log_msg* msg)

Attaches message to the nodes of the flow tree.

Parameters:

msg

Message to be attached.

Returns:

Nothing.

void flow_tree_trace(void)

Goes through the flow tree and calls callback functions for each node. First it calls start node callback, then calls message processing callback for all messages attached to the node and goes to the subtree. After that it calls end node callback and message processing callback for all messages attached after the node.

Returns:

Nothing.

void index_mode_init(f_process_ctrl_log_msg ctrl_proc[CTRL_EVT_LAST][NT_LAST], f_process_reg_log_msg* reg_proc, f_process_log_root root_proc[CTRL_EVT_LAST])

Set callback pointers to refer functions implementing index mode of operation.

Parameters:

ctrl_proc

Table of callbacks for processing control log messages

reg_proc

Callback for processing regular message

root_proc

Callbacks for processing log start and end

size_t universal_read(FILE* fd, void* buf, size_t count, rgt_io_mode_t io_mode, const char* rawlog_fname)

Attempts to read up to count bytes from file descriptor fd into the buffer starting at buf. If read_mode equals to RMODE_BLOCKING and there is not enough data in file it blocks until count bytes available for read. If read_mode equals to RMODE_NONBLOCKING it doesn’t block in any cases.

Parameters:

fd

File descriptor used for reading.

buf

Pointer to the user specified buffer.

count

Number of bytes user wants to be read.

io_mode

Blocking or non-blocking mode of reading should be used.

rawlog_fname

Name of file which is used for reading.

n

> 0 operation successfully completed.

0

An error occurs, or the end-of-file is reached, or inode of file changed. User has to check it with feof() or ferror().

Returns:

Number of bytes read is returned.

void write_xml_string(struct obstack* obstk, const char* str, bool attr_val)

Output a string, encoding XML special characters.

Parameters:

obstk

Obstack structure for string output (if NULL, it will be written to rgt_ctx.out_fd).

str

String to process and output.

attr_val

Whether the string is an attribute value of some TAG?

void junit_mode_init(f_process_ctrl_log_msg ctrl_proc[CTRL_EVT_LAST][NT_LAST], f_process_reg_log_msg* reg_proc, f_process_log_root root_proc[CTRL_EVT_LAST])

Set callback pointers to refer functions implementing JUnit mode of operation.

Parameters:

ctrl_proc

Table of callbacks for processing control log messages.

reg_proc

Callback for processing regular message.

root_proc

Callbacks for processing log start and end.

f_fetch_log_msg rgt_define_rlf_format(rgt_gen_ctx_t* ctx, char** err)

Determines RLF version of the format and returns pointer to the function that should be used for extracting log messages from a raw log file.

Parameters:

ctx

Rgt utility context.

err

Pointer to the pointer on string that can be set to an error message string if the function returns NULL.

!NULL

Pointer to the log message extracting function.

NULL

Unknown format of RLF.

Returns:

pointer to the log message extracting function.

int fetch_log_msg_v1(struct log_msg** msg, rgt_gen_ctx_t* ctx)

Extracts the next log message from a raw log file version 1. The format of raw log file version 1 can be found in OKTL-0000593.

If the structure of a log message doesn’t confirm to the specification, this function never returns, but rather it throws an exception with longjmp call.

Parameters:

msg

Storage for log message to be extracted.

ctx

Rgt utility context.

1

Message is successfully read from Raw log file

0

There is no log messages left.

Returns:

Status of the operation.

static const char* result_status2str(result_status_t status)

Get string representation of result status.

Parameters:

status

Result status.

Returns:

String representation.

int rgt_process_tester_control_message(log_msg* msg)

Process control message from Tester: Insert a new node into the flow tree if it is a start event; Close node if it’s an end event.

In the case of errors it frees log message and calls longjmp.

Parameters:

msg

Pointer to the log message to be processed.

Returns:

Status of operation.

void rgt_process_regular_message(log_msg* msg)

Process regular log message: Checks if a message passes through user-defined filters, Attaches a message to the flow tree, or calls reg_msg_proc function depending on operation mode of the rgt.

In the case of errors it frees log message and calls longjmp.

Todo Don’t free log message but rather use it for storing the next one.

Parameters:

msg

Pointer to the log message to be processed.

Returns:

Nothing.

void rgt_emulate_accurate_close(uint32_t* latest_ts)

Emulate a set of close messages from Tester in order to correctly complete flow tree.

Parameters:

latest_ts

Timestamp of the latest log message, which will be used in all close messages

void rgt_process_event(node_type_t type, enum event_type evt, node_info_t* node)

Processes event occurred on a node of the flow tree. Currently the only event that is actually processed is MORE_BRANCHES.

Parameters:

type

Type of a node on which an event has occurred.

evt

Type of an event.

node

User-specific data that is passed on creation of the node.

Returns:

Nothing.

msg_arg* get_next_arg(log_msg* msg)

Return pointer to the log message argument. The first call of the function returns pointer to the first argument. The second call returns pointer to the second argument and so on.

Parameters:

msg

Message which argument we are going to obtain

Returns:

Pointer to an argument of a message

log_msg* alloc_log_msg(void)

Allocates a new log_msg structure from global memory pool for log messages.

Returns:

An address of log_msg structure.

void free_log_msg(log_msg* msg)

Frees log message.

The freeing of a log message leads to freeing all messages allocated
after the message.

Parameters:

msg

Log message to be freed.

Returns:

Nothing.

void rgt_expand_log_msg(log_msg* msg)

Converts format string + arguments into a formatted string. The result is put into txt_msg. If the latter is not NULL, the function does nothing, assuming immutable fmt_str and args.

Parameters:

msg

Log message

log_msg_ptr* log_msg_ref(log_msg* msg)

Create log_msg_ptr structure pointing to the last log message read from the raw log file.

Parameters:

msg

Log message

Returns:

Pointer to log_msg_ptr structure

log_msg* log_msg_read(log_msg_ptr* ptr)

Allocate new log_msg structure and read its contents from raw log offset specified in a given log_msg_ptr.

Parameters:

ptr

log_msg_ptr structure containing raw log offset

Returns:

Pointer to log_msg structure

struct obstack* obstack_initialize(void)

Allocate and initialize a new obstack structure

void obstack_destroy(struct obstack* obstk)

Deallocate an obstack structure

void initialize_log_msg_pool(void)

Initialize the log message pool.

Throws if it’s already initialized or on failure.

void destroy_log_msg_pool(void)

Free the log message pool

log_msg* alloc_log_msg(void)

Allocate a log message buffer from the pool

void free_log_msg(log_msg* msg)

Return a log message buffer to the pool

log_msg_ptr* alloc_log_msg_ptr(void)

Allocate memory for log_msg_ptr structure

void free_log_msg_ptr(log_msg_ptr* msg_ptr)

Release memory occupied by log_msg_ptr structure

void initialize_node_info_pool(void)

Initialize the node_info pool.

Throws if it’s already initialized or on failure.

void destroy_node_info_pool(void)

Free the node_info pool

node_info_t* alloc_node_info(void)

Allocate a node_info structure from the pool

void free_node_info(node_info_t* node)

Return a node_info structure to the pool

void* node_info_obstack_alloc(int size)

Allocate a buffer of given size from the node_info pool

void* node_info_obstack_copy0(const void* address, int size)

Allocate a copy of user-supplied data from the node_info pool.

This function adds an extra null byte at the end of the buffer it allocates. This means that if the user is copying a C string, they do not have to include the null terminator. In other words, the result of strlen can be passed as the size argument without any modification.

Parameters:

address

data buffer

size

size of data

Returns:

Pointer to the allocated buffer

void* node_info_obstack_copy(const void* address, int size)

Allocate a copy of user-supplied data from the node_info pool.

Parameters:

address

data buffer

size

size of data

Returns:

Pointer to the allocated buffer.

void msg_queue_foreach(msg_queue* q, GFunc cb, void* user_data)

Iterate over message pointers queue, starting with entries offloaded to a file.

Parameters:

q

Queue of message pointers

cb

Callback to be called for each queue entry

user_data

Pointer to be passed to callback

bool msg_queue_is_empty(msg_queue* q)

Check whether message pointers queue is empty.

Parameters:

q

Queue of message pointers

Returns:

true if queue is empty, false otherwise.

void te_rgt_parse_mi_message(const char* json_buf, size_t buf_len, te_rgt_mi* mi)

Parse MI message.

Currently only “measurement” MI message is fully supported, for other types this function only tries to parse JSON without extracting any data from it.

Parameters:

json_buf

Buffer with JSON from MI message.

buf_len

Length of the buffer.

mi

Where to store obtained data.

void te_rgt_mi_clean(te_rgt_mi* mi)

Release memory allocated for storing MI message data.

Parameters:

mi

Pointer to te_rgt_mi structure.

const char* te_rgt_mi_meas_param_name(te_rgt_mi_meas_param* param)

Get measurement parameter name (possibly derived from its type if name property was left empty).

Parameters:

param

Parameter.

Returns:

Pointer to constant string.

const char* rgt_node2str(rgt_node_t node_type)

Get string name of node type.

Parameters:

node_type

Node type.

Returns:

Type name.

void proc_chars(rgt_gen_ctx_t* ctx, rgt_depth_ctx_t* depth_ctx, const rgt_xmlChar* ch, size_t len)

Callback function for processing a group of characters.

Parameters:

ctx

Global processing context

depth_ctx

Depth-specific context

ch

Pointer to the start of a character string

len

The number of characters in ch string

bool proc_expand_entities(void)

Callback function that tells whether a program wants entities to be expanded or not. For instance XML, HTML generating programs do not want entities to be expanded, TEXT generating programs do.

Returns:

true if entities should be expanded, or false otherwise.

int rgt_xml2fmt_files_get_idx(const char* short_name)

Get index of the element in xml2fmt_files massive. Search by short name.

Parameters:

short_name

Short name of the template

-1

In case of failure

Returns:

Index

void* rgt_xml2fmt_alloc_depth_data(rgt_depth_data_storage* storage, uint32_t depth, bool* reused)

Allocate or reuse user data for a given depth.

Parameters:

storage

Pointer to user data storage.

depth

Depth for which to obtain user data.

reused

Set to true if data is reused (rather than allocated from scratch).

Returns:

Pointer to the requested user data.

void rgt_xml2fmt_free_depth_data(rgt_depth_data_storage* storage, rgt_xml2fmt_free_depth_data_cb* cb)

Release memory allocated for user data storage.

Parameters:

storage

Pointer to storage.

cb

Callback to release user data.

void rgt_xml2multi_opts_free(rgt_xml2multi_opts* opts)

Release memory allocated for rgt_xml2multi_opts.

Parameters:

opts

Pointer to options structure

void rgt_xml2multi_process_cmdline(rgt_xml2multi_opts* opts, poptContext con, int val)

Parse command line options and store them in rgt_xml2multi_opts.

Parameters:

opts

Options storage

con

popt context

val

Option identifier

bool rgt_xml2multi_match_node(rgt_xml2multi_opts* opts, const char* tin, const char* node_id, uint32_t depth, uint32_t seq)

Check whether a given log node should be output.

Parameters:

ctx

Context with matching parameters

tin

TIN of test iteration represented by this node

node_id

Node ID

depth

Node depth in log tree

seq

Node sequential number (in the list of children of its parent)

Returns:

true if node should be output, false otherwise.

void rgt_xml2multi_fname(char* fname, size_t len, rgt_xml2multi_opts* opts, rgt_gen_ctx_t* ctx, rgt_depth_ctx_t* depth_ctx, const char* tin, const char* node_id, const char* extension)

Obtain file name to use for a given log node.

Parameters:

fname

Buffer for file name

len

Length of the buffer

opts

Command line options

ctx

Generic rgt-format context

depth_ctx

Log depth specific rgt-format context

tin

Test iteration number

node_id

Log node identifier

extension

File extension (e.g. “html” or “json”)

void rgt_xml2multi_setup_outdir(rgt_gen_ctx_t* ctx, rgt_xml2multi_opts* opts, bool shared_files)

Set up output directory.

Parameters:

ctx

Generic rgt-format context

opts

Command line options

shared_files

If true, there are some shared files which should be copied to destination directory unless URL to common location is provided

int rgt_load_caps_idx(const char* split_log_path, rgt_cap_idx_rec** idx_out, unsigned int* idx_len_out, FILE** f_heads_out)

Process capture files index in a RAW log bundle.

Parameters:

split_log_path

Path to the unpacked bundle

idx_out

Where to save pointer to allocated array of rgt_cap_idx_rec structures

idx_len_out

Where to save number of elements in the array

f_heads_out

Where to save FILE pointer for an opened file where pcap files “heads” can be found

Returns:

0 on success, -1 on failure

int rgt_parse_frag_rec(const char* s, rgt_frag_rec* rec)

Parse fragment record in a RAW log bundle.

Parameters:

s

String containing the record

rec

Where to save parsed data

Returns:

0 on success, -1 on failure

int rgt_read_cap_prefix(FILE* f, uint32_t* file_id, uint64_t* pkt_offset, uint32_t* len)

Read the prefix of sniffed packet in a fragment file.

Parameters:

f

From which file to read

file_id

Where to save sniffer file ID

pkt_offset

Where to save packet offset

len

Where to save packet length

Returns:

1 if a prefix was read successfully, 0 if EOF was reached, -1 on error.

int file2file(FILE* out_f, FILE* in_f, off_t out_offset, off_t in_offset, off_t length)

Copy data from one file to another.

Parameters:

out_f

Destination file pointer

in_f

Source file pointer

out_offset

At which offset to write data in destination file (if < 0, then at current positon)

in_offset

At which offset to read data from source file (if < 0, then at current positon)

length

Length of data to be copied

Returns:

0 on success, -1 on failure

void problem_free(problem* p)

Free problem structure.

Parameters:

p

Problem structure pointer

te_errno get_fss_solution(problem* p, alg_type at)

Solve the problem used required algorithm(s).

Parameters:

p

Problem structure pointer

at

Algorithm type

Returns:

Status code

te_errno te_test_str2status(const char* str, te_test_status* status)

Convert string representation of test status to enumeration member.

Parameters:

str

String representation of test status

status

Location for converted test status

Returns:

Status code.

typedef TAILQ_HEAD(trc_re_match_substs, trc_re_match_subst)

Regular expression match substitutions list

typedef TAILQ_HEAD(trc_re_substs, trc_re_subst)

Regular expression substitutions list

typedef TAILQ_HEAD(trc_re_namespaces, trc_re_namespace)

List of substitutions namespaces

void trc_re_substs_free(trc_re_substs* substs)

Free resourses allocated for the list of regular expression substitutions.

te_errno trc_re_substs_read(const char* file, trc_re_substs* substs)

Read substitutions from file.

Parameters:

file

File name

substs

List to add substitutions to

Returns:

Status code.

te_errno trc_re_namespaces_read(const char* file, trc_re_namespaces* namespaces)

Read substitutions from file.

Parameters:

file

File name

substs

List to add substitutions to

Returns:

Status code.

void trc_re_substs_exec_start(const trc_re_substs* substs, const char* str, FILE* f)

Execute substitutions.

Parameters:

substs

List of substitutions to do

str

String to substitute in

f

File to write to

Returns:

Status code.

void trc_re_key_substs(const char* name, const char* key, FILE* f)

Do regular expression key substitutions.

Parameters:

key

Keys string

f

File to output to

ssize_t trc_re_substs_exec_buf_start(const trc_re_substs* substs, const char* str, char* buf, ssize_t buf_size)

Execute substitutions.

Parameters:

substs

List of substitutions to do

str

String to substitute in

buf

Buffer to put substituted string

buf_size

Buffer size

Returns:

Status code.

char* trc_re_key_substs_buf(const char* name, const char* key)

Do regular expression key substitutions.

Parameters:

name

Regular expression namespace name

key

Keys string

Returns:

Substituted string or NULL.

typedef CIRCLEQ_HEAD(trc_diff_keys_stats, trc_diff_key_stats)

List of statistics for all keys

typedef TAILQ_HEAD(trc_diff_sets, trc_diff_set)

List with set of tags to compare

typedef TAILQ_HEAD(trc_diff_result, trc_diff_entry)

Result of the TRC diff processing

trc_diff_set* trc_diff_find_set(trc_diff_sets* sets, unsigned int id, bool create)

Find set in sets list by specified ID.

Parameters:

sets

List of compared sets

id

Identifier of the set

create

create the set, if it is not found

Returns:

Status code.

te_errno trc_diff_set_name(trc_diff_sets* sets, unsigned int id, const char* name)

Set name of the compared set with specified ID.

Parameters:

sets

List of compared sets

id

Identifier of the set

name

New name of the set

Returns:

Status code.

te_errno trc_diff_set_log(trc_diff_sets* sets, unsigned int id, const char* log)

Set log filename of the compared set with specified ID.

Parameters:

sets

List of compared sets

id

Identifier of the set

log

Log filename for the set

Returns:

Status code.

te_errno trc_diff_set_url(trc_diff_sets* sets, unsigned int id, const char* url)

Set URL to html logs of the compared set with specified ID.

Parameters:

sets

List of compared sets

id

Identifier of the set

url

HTML log URL

Returns:

Status code.

te_errno trc_diff_show_keys(trc_diff_sets* sets, unsigned int id)

Enable showing keys of the compared set with specified ID.

Parameters:

sets

List of compared sets

id

Identifier of the set

Returns:

Status code.

te_errno trc_diff_add_tag(trc_diff_sets* sets, unsigned int id, const char* tag)

Add tag in the compared set with specified ID.

Parameters:

sets

List of compared sets

id

Identifier of the set

tag

Name of a new tag

Returns:

Status code.

te_errno trc_diff_add_ignore(trc_diff_sets* sets, unsigned int id, const char* ignore)

Add ignore pattern for the compared set with specified ID.

Parameters:

sets

List of compared sets

id

Identifier of the set

ignore

A new ignore pattern

Returns:

Status code.

void trc_diff_free_sets(trc_diff_sets* sets)

Free compared sets

Parameters:

sets

List of compared sets

trc_diff_ctx* trc_diff_ctx_new(void)

Allocate a new TRC diff context.

void trc_diff_ctx_free(trc_diff_ctx* ctx)

Free resources allocated in TRC diff context.

Parameters:

ctx

Context to be freed

bool trc_diff_is_exp_result_equal(const trc_exp_result* lhv, const trc_exp_result* rhv)

Are two expected results equal (including keys and notes)?

Parameters:

lhv

Left hand value

rhv

Right hand value

te_errno trc_diff_do(trc_diff_ctx* ctx)

Process TRC database and generate in-memory report.

Parameters:

ctx

TRC diff tool context

Returns:

Status code.

te_errno trc_diff_report_to_html(trc_diff_ctx* ctx, const char* filename, const char* header, const char* title)

Prepare TRC diff report in HTML format.

Parameters:

ctx

TRC diff tool context

filename

Name of the file to put report or NULL if report should be generated to stdout

header

HTML header file name to include into the report

title

Title of the report

Returns:

Status code.

te_errno trc_diff_process_logs(trc_diff_ctx* ctx)

Process TE log files specified for each diff set.

Parameters:

ctx

TRC diff context

Returns:

Status code.

te_errno trc_diff_filter_logs(trc_diff_ctx* ctx)

Filter test results by specified include/exclude rules.

Parameters:

ctx

TRC diff context

Returns:

Status code.

te_errno te_test_result_to_html(FILE* f, const te_test_result* result)

Output TE test result to HTML file.

Parameters:

f

File stream to write

result

Result to output

Returns:

Status code.

te_errno trc_test_result_to_html(FILE* f, const trc_exp_result_entry* result)

Output TRC test expected result entry to HTML file.

Parameters:

f

File stream to write

result

Expected result entry to output

Returns:

Status code.

te_errno trc_exp_result_to_html(FILE* f, const trc_exp_result* result, unsigned int flags, tqh_strings* tags)

Output expected result to HTML file.

Parameters:

f

File stream to write

result

Expected result to output

flags

Processing flags

Returns:

Status code.

te_errno trc_test_iter_args_to_html(FILE* f, const trc_test_iter_args* args, unsigned int flags)

Output test iteration arguments to HTML file.

Parameters:

f

File stream to write

args

Arguments

flags

Processing flags

Returns:

Status code.

te_errno trc_report_iter_args_to_html(FILE* f, const trc_report_argument* args, unsigned int args_n, unsigned int max_len, unsigned int flags)

Output test iteration arguments obtained from log to HTML file.

Parameters:

f

File stream to write

args

Arguments

args_n

Number of arguments

max_len

Maximum length of string (to split too long lines)

flags

Processing flags

Returns:

Status code.

te_errno trc_include_external_html(FILE* f, const char* src)

Include code from a file to the generated HTML.

Parameters:

f

File in which to append included code.

src

From were to include the code.

Returns:

Status code.

static unsigned int get_stats_by_status(const trc_report_stats* s, te_test_status status)

Get number of run test iterations with a given result status

Parameters:

s

TRC statistics

status

Test iteration result status

Returns:

Number of corresponding iterations or 0

void trc_report_init_ctx(trc_report_ctx* ctx)

Initialize TRC report tool context.

Parameters:

ctx

Context to be initialized

te_errno trc_report_process_log(trc_report_ctx* ctx, const char* log)

Process TE log file with obtained testing results.

Parameters:

ctx

TRC report context

log

Name of the file with TE log in XML format

Returns:

Status code.

te_errno trc_report_collect_stats(trc_report_ctx* ctx)

Collect statistics after processing of TE log.

Parameters:

ctx

TRC report context

Returns:

Status code.

te_errno trc_report_to_html(trc_report_ctx* ctx, const char* filename, const char* title, FILE* header, unsigned int flags)

Output TRC report in HTML format.

Parameters:

ctx

TRC report context

filename

Name of the file for HTML report

title

Report title or NULL

header

File with header to be added in HTML report or NULL

flags

Report options

Returns:

Status code.

void trc_report_free_test_iter_data(trc_report_test_iter_data* data)

Free resources allocated for test iteration in TRC report.

Parameters:

data

Test iteration data to be freed

const char* trc_report_get_iter_id(const trc_report_test_iter_entry* iter)

Return iteration ID (based on test ID, if available, or TIN).

This function returns pointer to static variable, it is not thread-safe, every call overwrites previously returned value. It is supposed that in HTML logs a file for the iteration is named “node_<ID>.html”.

Parameters:

iter

Pointer to structure describing iteration.

Returns:

String ID (empty if neither test ID nor TIN are available).

te_errno trc_tags_str_to_list(tqh_strings* tags, char* tags_str)

Parse string with TRC tags and add them into the list.

Parameters:

tags

List to add tags

tags_str

String with tags

Returns:

Status code.

te_errno trc_tags_json_to_list(tqh_strings* parsed_tags, char* json_buf)

Parse JSON string with TRC tags and add them into the list.

Parameters:

json_buf

JSON string with TRC tags.

parsed_tags

List to add tags.

Returns:

Status code.

int trc_tools_file_to_file(FILE* dst, FILE* src)

Copy all content of one file to another.

Parameters:

dst

Destination file

src

Source file

Returns:

Status code.

typedef TAILQ_HEAD(trc_update_tags_logs, trc_update_tag_logs)

Queue of groups of logs

typedef SLIST_HEAD(trc_update_wilds_list, trc_update_wilds_list_entry)

List of wildcards used in updating rules

typedef TAILQ_HEAD(trc_update_rules, trc_update_rule)

TRC updating rules queue

typedef SLIST_HEAD(trc_update_args_groups, trc_update_args_group)

List of TRC DB wildcards

typedef TAILQ_HEAD(trc_update_test_entries, trc_update_test_entry)

Queue containing information about tests to be updated

typedef TAILQ_HEAD(trc_update_tests_groups, trc_update_tests_group)

Queue containing information about groups of tests to be updated

void trc_update_init_ctx(trc_update_ctx* ctx_p)

Initialize TRC Update tool context.

Parameters:

ctx_p

Context pointer

void trc_update_free_ctx(trc_update_ctx* ctx_p)

Free TRC Update tool context.

Parameters:

ctx_p

Context pointer

void tag_logs_init(trc_update_tag_logs* tag_logs)

Initialize structure describing group of logs.

Parameters:

tag_logs

Structure to be initialized

void trc_update_tag_logs_free(trc_update_tag_logs* tag_logs)

Free structure describing group of logs.

Parameters:

tag_logs

Structure to be freed

void trc_update_tags_logs_free(trc_update_tags_logs* tags_logs)

Free queue of Tester run logs paths.

Parameters:

tags_logs

Queue pointer

void trc_update_tags_logs_remove_empty(trc_update_tags_logs* tags_logs)

Remove from a queue of tags those having no logs attached.

Parameters:

tags_logs

Queue pointer

void trc_update_init_test_iter_data(trc_update_test_iter_data* data)

Initialize TRC Update test iteration data.

Parameters:

data

Data to be initialized.

void trc_update_free_test_iter_data(trc_update_test_iter_data* data)

Free TRC Update test iteration data.

Parameters:

data

Data to be freed.

void trc_update_wilds_list_entry_free(trc_update_wilds_list_entry* entry)

Free entry of wildcards list.

Parameters:

entry

List entry to be freed

void trc_update_wilds_list_free(trc_update_wilds_list* list)

Free list of TRC DB wildcards.

Parameters:

list

List to be freed

void trc_update_rule_free(trc_update_rule* rule)

Free TRC updating rule.

Parameters:

rule

Rule to be freed

void trc_update_rules_free(trc_update_rules* rules)

Free queue of updating rules.

Parameters:

rules

Queue to be freed

int te_test_result_cmp(te_test_result* p, te_test_result* q)

Compare test iteration results.

Parameters:

p

The first result

q

The second result

Returns:

-1 if the first result is ‘less’ the second one, 0 if they are ‘equal’, 1 if the first result is ‘greater’ than the second one.

int trc_update_rentry_cmp(trc_exp_result_entry* p, trc_exp_result_entry* q)

Compare test iteration result entries (content of single <result> tags).

Parameters:

p

The first result

q

The second result

Returns:

-1 if the first result is ‘less’ the second one, 0 if they are ‘equal’, 1 if the first result is ‘greater’ than the second one.

int trc_update_result_cmp_gen(trc_exp_result* p, trc_exp_result* q, bool tags_cmp)

Compare expected results of iterations (used for ordering).

Parameters:

p

First expected result

q

Second expected result

tags_cmp

Whether to compare string representation of tag expressions or not

Returns:

-1, 0 or 1 as a result of comparison

int trc_update_result_cmp(trc_exp_result* p, trc_exp_result* q)

Compare expected results of iterations (used for ordering).

Parameters:

p

First expected result

q

Second expected result

Returns:

-1, 0 or 1 as a result of comparison

int trc_update_result_cmp_no_tags(trc_exp_result* p, trc_exp_result* q)

Compare expected results of iterations (used for ordering), do not consider tag expressions in comparison.

Parameters:

p

First expected result

q

Second expected result

Returns:

-1, 0 or 1 as a result of comparison

int trc_update_results_cmp(trc_exp_results* p, trc_exp_results* q)

Compare lists of expected results (used for ordering).

Parameters:

p

First expected results list.

q

Second expected results list.

Returns:

-1, 0 or 1 as a result of comparison

int trc_update_rules_cmp(trc_update_rule* p, trc_update_rule* q)

Compare updating rules.

Parameters:

p

The first rule

q

The second rule

Returns:

-1, 0 or 1 as a result of comparison

te_errno trc_update_ins_rule(trc_update_rule* rule, trc_update_rules* rules, int(*)(trc_update_rule*, trc_update_rule*) rules_cmp)

Insert rule in a queue in proper place (so that the queue will remain be sorted in increasing order).

Parameters:

rule

Updating rule

rules

Rules queue where to insert

rules_cmp

Comparing function

Returns:

-1, 0 or 1 as a result of comparison

void trc_update_test_entry_free(trc_update_test_entry* test_entry)

Free entry of queue of tests to be updated.

Parameters:

test_entry

Queue entry to be freed

void trc_update_test_entries_free(trc_update_test_entries* tests)

Free queue of tests to be updated.

Parameters:

tests

Queue to be freed

void trc_update_tests_group_free(trc_update_tests_group* group)

Free structure describing group of tests to be updated.

Parameters:

group

Pointer to structure describing group of tests

void trc_update_tests_groups_free(trc_update_tests_groups* groups)

Free queue of groups of tests to be updated.

Parameters:

groups

Pointer to queue of groups of tests

void trc_update_args_group_free(trc_update_args_group* args_group)

Free group of arguments (wildcard).

Parameters:

args_group

Group to be freed

void trc_update_args_groups_free(trc_update_args_groups* args_groups)

Free list of group of arguments (wildcards).

Parameters:

args_groups

List to be freed

trc_test_iter_args* trc_update_args_wild_dup(trc_test_iter_args* args)

Duplicate TRC DB iteration arguments.

Parameters:

args

Arguments to be duplicated

Returns:

Duplicate of arguments

bool trc_update_is_to_save(void* data, bool is_iter)

Determine whether to save a given element of TRC DB (test or iteration).

Parameters:

data

User data attached to element

is_iter

Is element iteration or not

Returns:

true if element should be saved, false otherwise

char* trc_update_set_user_attr(void* data, bool is_iter)

Function returning value of “user_attr” attribute to be set on iteration or test of required.

Parameters:

data

TRC Update data attached to TRC DB entry.

is_iter

Is it iteration or not?

Returns:

String representing value or NULL

te_errno trc_update_process_iter(trc_update_ctx* ctx, te_trc_db_walker* db_walker, trc_test_iter* iter, trc_report_test_iter_entry* entry)

Process test iteration.

Parameters:

ctx

TRC Update context

db_walker

TRC DB walker

iter

Test iteration

entry

Iteration result

Returns:

Status code

te_errno trc_update_process_logs(trc_update_ctx* gctx)

Process TE log file with obtained results of fake tester run.

Parameters:

gctx

TRC update context

Returns:

Status code.

Macros

#define AAL5_TRAILER_LEN

Length of AAL5 CPCS PDU trailer

#define ADDR_FAMILY_MAPPING_LIST

The list of values allowed for parameter of type ‘rpc_socket_addr_family’

#define ADD_TV(res, ts1, ts2)

Calculates the sum of timevals, ts1 + ts2.

Parameters:

res

The result timeval.

ts1

Time stamp to be reduced

ts2

On which value to reduce

#define AGENT_REBOOT

Reboot Test Agent process

#define AIO_WRONG_CALLBACK

Incorrect address of the callback function should be used

#define ARP_FL_MAPPING_LIST

List of mapping numerical value to string for ‘rpc_io_fl’

#define ASN_FALSE

ASN.1 boolean values of false and true are defined as: false is encoded as zero (0), true is encoded as a nonzero value. And according to https://msdn.microsoft.com/ru-ru/bb648639 true is 0xff

#define ASN_SYN_ARRAY

bit ‘ordered sequence’ for compound type syntaxes.

#define ASN_SYN_NAMED

bit ‘named syntax’ for compound type syntaxes.

#define ASN_SYN_ORDER

bit ‘ordered sequence’ for compound type syntaxes.

#define ATM_CELL_LEN

Length of ATM cell

#define ATM_HEADER_LEN

Length of ATM cell header

#define ATM_PAYLOAD_LEN

Length of ATM cell payload

#define BINARY_ATTACHMENT

Binary attachment is provided; file is saved in lfile

#define BITS_PER_BYTE

The number of bits in a byte

#define CFG_BACKUP_CREATE

Create configuration backup

#define CFG_BACKUP_RELEASE

Release configuration backup

#define CFG_BACKUP_RESTORE

Restore configuration backup

#define CFG_BACKUP_RESTORE_NOHISTORY

Restore configuration backup w/o trying to process history

#define CFG_BACKUP_VERIFY

Verify configuration backup

#define CFG_BPDU_TC_ACK_FLAG

Bit mask for Topology Change Acknowledgement flag See ANSI/IEEE Std. 802.1D, 1998 Edition section 9.3.1

#define CFG_BPDU_TC_FLAG

Bit mask for Topology Change flag See ANSI/IEEE Std. 802.1D, 1998 Edition section 9.3.1

#define CFG_BROTHER

Object brother

#define CFG_CHECK_NO_LOCAL_SEQ_BREAK(_cmd, _cfg_msg)

The CFG_CHECK_NO_LOCAL_SEQ_EXP wrapper, perform break

#define CFG_CHECK_NO_LOCAL_SEQ_EXP(_cmd, _cfg_msg, _ret_exp)

Perform check whether local commands sequence is started or not. If started then set msg _cfg_msg rc to TE_EACCES and return from the current function.

Parameters:

_cmd

Command name

_cfg_msg

cfg_msg argument

_ret_exp

Return expression

#define CFG_CHECK_NO_LOCAL_SEQ_RC(_cmd, _cfg_msg)

The CFG_CHECK_NO_LOCAL_SEQ_EXP wrapper, return status code

#define CFG_FATHER

Object father

#define CFG_HANDLE_MAX_INDEX

Maximum allowed value for index part of configuration handle

#define CFG_INST_NAME_MAX

Instance name, including trailing 0

#define CFG_MAX_INST_VALUE

Maximum length of the instance in the message

#define CFG_MSG_FIELDS

OUT: errno defined in te_errno.h

#define CFG_NEW_INST_HANDLE(_hndl, _idx)

Construct a new instance handle.

Parameters:

_hnld

New handle

_idx

Instance index

#define CFG_OBJ_OID_LITERAL(...)

Object OID literal.

The constructed value is a cfg_oid structure, not a pointer.

static cfg_oid object_oid = CFG_OBJ_OID_LITERAL({"agent"},
                                                {"interface"},
                                                {"status"});
...
cfg_oid *parsed = cfg_oid_convert_str(oid_str);
status = cfg_oid_cmp(&object_oid, parsed);
cfg_free_oid(parsed);

Parameters:

The list of subids. cfg_object_subid is a one-element structure, so string literals need to be wrapped in {..}. The first subid is implicitly set to “”.

#define CFG_OID_GET_INST_NAME(_p, _i)

Get instance name of the i-th sub-identifier.

Parameters:

_p

pointer to cfg_oid

_i

index

Returns:

Pointer to string (char *).

#define CFG_OID_LEN_MAX

Maximum number of subids. Note: this includes subid of root object, so your OID can contain one subid less than this number after leading ‘/’

#define CFG_OID_RULE(_match_prefix, _action, ...)

A helper macro to construct cfg_oid_rule entries.

Parameters:

_match_prefix

See cfg_oid_rule::match_prefix

_action

Action to execute

A list of subids as passed to CFG_OBJ_OID_LITERAL

#define CFG_OID_RULE_END

Terminating entry for cfg_oid_rule table

#define CFG_PRIMARY_TYPES_NUM

Number of configurator primary types

#define CFG_READ_CREATE

Instance may be added, changed and deleted

#define CFG_READ_ONLY

Instance is created automatically by TA and cannot be changed

#define CFG_READ_WRITE

Instance is created automatically by TA, but its value can be changed

#define CFG_SON

Object son

#define CFG_SUBID_MAX

Maximum length of sub-identifier including trailing 0

#define CHECK_ARG_SINGLE_PTR(_in_or_out, _arg)

Convenience helper to ensure that the “_val / _len” fields for _arg in the RPC _in_or_out structure are either unset or describe a single-element buffer

#define CHECK_ERROR_CLEANUP(rc_, msg_...)

Check if rc is nonzero, print error message and go to cleanup if it is.

Parameters:

rc_

Return value to check.

msg_

Format string and arguments for error message.

#define CHECK_FCLOSE(_f)

If FILE pointer is not NULL, call fclose() on it and set it to NULL. In case of failure, print error message and jump to error section.

Parameters:

_f

File pointer to close.

#define CHECK_FOPEN(_f, _path, _mode)

Call fopen(). If it returns NULL, print error message and jump to error section.

Parameters:

_f

Where to save opened FILE pointer.

_path

Path to the file.

_mode

Opening mode.

#define CHECK_FOPEN_FMT(_f, _mode, _path_fmt...)

Call te_fopen_fmt(), jump to error section if it failed.

Parameters:

_f

Where to save FILE pointer on success.

_mode

File opening mode.

_path_fmt

File path format string and arguments.

#define CHECK_FREAD(_ptr, _size, _nmemb, _f)

Call fread() and check that it read all the expected bytes. If it did not, print error message and jump to error section.

Parameters:

_ptr

Where to save read data.

_size

Size of the data element.

_nmemb

Number of data elements.

_f

File from which to read.

#define CHECK_FWRITE(_ptr, _size, _nmemb, _f)

Call fwrite() and check that it wrote all the expected bytes. If it did not, print error message and jump to error section.

Parameters:

_ptr

Data to write.

_size

Size of the data element.

_nmemb

Number of data elements.

_f

File to which to write.

#define CHECK_NOT_NULL(_expr)

Check value of an expression which can return NULL (in which case this macro will print error message and jump to error section).

Parameters:

_expr

Expression to check.

#define CHECK_NZ_RETURN(expr_)

Check whether an expression evaluates to non-zero. If it is, return its value.

Parameters:

expr_

Expression to evaluate.

#define CHECK_OS_NOT_NULL(_expr)

Check value of an expression which can return NULL and set errno in case of error (in which case this macro will print error message and jump to error section).

Parameters:

_expr

Expression to check.

#define CHECK_OS_RC(_expr)

Check value of an expression which can return negative value and set errno in case of error (in which case this macro will print error message and jump to error section).

Parameters:

_expr

Expression to check.

#define CHECK_RC(_expr)

Check value of an expression which can return negative value. If the value is negative, this macro will print error message and jump to error section.

Parameters:

_expr

Expression to check.

#define CHECK_RETVAL_VAR(_func, _var, _cond, _error_val)

If RPC call status is OK, check condition _cond and set specified variable _var to _error_val and RPC server errno to TE_ECORRUPTED, if it is true. If RPC call status is not OK, variable _var is set to _error_val and RPC server errno is not updated.

Error logging is requested if error is not expected and finally _var is equal to __error_val.

The function assumes to have RPC server handle as rpcs variable in the context.

Parameters:

_func

function name

_var

variable with return value

_cond

condition to be checked, if RPC call status is OK

_error_val

value to be assigned in the case of error

#define CHECK_RETVAL_VAR_ERR_COND(_func, _var, _cond, _error_val, _err_cond)

If RPC call status is OK, check condition _cond and set specified variable _var to _error_val and RPC server errno to TE_ECORRUPTED, if it is true. If RPC call status is not OK, variable _var is set to _error_val and RPC server errno is not updated.

Error logging is requested if error is not expected and _err_cond condition is true.

The function assumes to have RPC server handle as rpcs variable in the context.

Parameters:

_func

function name

_var

variable with return value

_cond

condition to be checked, if RPC call status is OK

_error_val

value to be assigned in the case of error

_err_cond

error logging condition, if RPC call status is OK

#define CHECK_RETVAL_VAR_IS_BOOL(_func, _var)

If RPC call status is OK, check that variable _var with function return value is true or false and set specified variable to false and RPC server errno to TE_ECORRUPTED, if it is not true. If RPC call status is not OK, variable _var is set to false and RPC server errno is not updated.

Error logging is requested if error is not expected and finally _var is equal to false.

The function assumes to have RPC server handle as rpcs variable in the context.

Parameters:

_func

function

_var

variable with return value

#define CHECK_RETVAL_VAR_IS_GTE_MINUS_ONE(_func, _var)

If RPC call status is OK, check that variable _var with function return value is greater or equal to -1 and set specified variable to -1 and RPC server errno to TE_ECORRUPTED, if it is not true. If RPC call status is not OK, variable _var is set to -1 and RPC server errno is not updated.

Error logging is requested if error is not expected and finally _var is equal to -1.

The function assumes to have RPC server handle as rpcs variable in the context.

Parameters:

_func

function name

_var

variable with return value

#define CHECK_RETVAL_VAR_IS_ZERO_OR_MINUS_ONE(_func, _var)

If RPC call status is OK, check that variable _var with function return value is 0 or -1 and set specified variable to -1 and RPC server errno to TE_ECORRUPTED, if it is not true. If RPC call status is not OK, variable _var is set to -1 and RPC server errno is not updated.

Error logging is requested if error is not expected and finally _var is equal to -1.

The function assumes to have RPC server handle as rpcs variable in the context.

Parameters:

_func

function

_var

variable with return value

#define CHECK_RETVAL_VAR_IS_ZERO_OR_NEGATIVE(_func, _var)

If RPC call status is OK, check that variable _var with function return value is 0 or negative and set specified variable to -1 and RPC server errno to TE_ECORRUPTED, if it is not true. If RPC call status is not OK, variable _var is set to -1 and RPC server errno is not updated.

Error logging is requested if error is not expected and finally _var is negative.

The function assumes to have RPC server handle as rpcs variable in the context.

Parameters:

_func

function

_var

variable with return value

#define CHECK_RETVAL_VAR_IS_ZERO_OR_NEG_ERRNO(_func, _var)

If RPC call status is OK, check that variable _var with function return value is 0 or negative errno and set specified variable to -TE_RC(TE_TAPI, TE_ECORRUPTED) and RPC server errno to TE_ECORRUPTED, if it is not true. If RPC call status is not OK, variable _var is set to -TE_RC(TE_TAPI, TE_ECORRUPTED) and RPC server errno is not updated.

Error logging is requested if error is not expected and finally _var is negative.

The function assumes to have RPC server handle as rpcs variable in the context.

Parameters:

_func

function

_var

variable with return value

#define CHECK_RETVAL_VAR_RPC_PTR(_func, _var)

Auxiliary check with false condition required for RPC logging with a correct log level in case when return value is an RPC pointer; it should be used in functions which normally don’t return NULL

Parameters:

_func

function

_var

variable with return value

#define CHECK_TE_RC(_expr)

Check value of an expression evaluating to te_errno; if it is not zero, print error and jump to error section.

Parameters:

_expr

Expression to check.

#define CKSUM_CMP_CORRECT

The value used to verify checksum correctness.

When checksum is originally computed, checksum field value is set to zero. If we recompute it with checksum field value set to one’s complement of the original sum, we get

sum + ~sum = 0xffff

and the final checksum value is one’s complement of this sum, i.e. 0x0.

This also works for the special case of UDP where 0 value (one’s complement of 0xffff sum) is replaced with 0xffff (see RFC 768):

0xffff + 0xffff = 0x1fffe -> 0xffff

Here a carry to 17th bit occurs and 1 is added to 16bit 0xfffe in one’s complement sum computation.

#define CLI_CSAP_DEFAULT_TIMEOUT

Seconds to wait for prompt

#define CLI_CSAP_STATUS_REPLY_WAITING

We still haven’t got a reply for the previous command

#define CLI_MAX_PROMPTS

Maximum number of allowed prompts

#define CMSG_NEXT(c)

Pointer to the next cmsghdr structure

Parameters:

c

Pointer to cmsghdr structure

#define CMSG_REMAINED_LEN(c, p, len)

Size of remained free space at the end of the buffer with cmsghdr structures.

Parameters:

c

Pointer to cmsghdr structure

p

Pointer to buffer containing cmsghdr structures

len

Length of buffer

#define CMSG_TOTAL_LEN(c)

Total amount of bytes occupied by cmsghdr structure taking into account payload and spacing

Parameters:

c

Pointer to cmsghdr structure

#define COLD_REBOOT

Cold reboot host

#define CONFIGURATOR_IPC

Type of IPC used by Configurator

#define CONFIGURATOR_SERVER

Configurator’s server name

#define CONST_SA(_p)

Cast to ‘const struct sockaddr *’ type.

#define CONST_SIN(_p)

Cast to ‘const struct sockaddr_in *’ type.

#define CONST_SIN6(_p)

Cast to ‘const struct sockaddr_in6 *’ type.

#define CONST_SS(_p)

Cast to ‘const struct sockaddr_storage *’ type.

#define CONST_SUN(_p)

Cast to ‘const struct sockaddr_un *’ type.

#define COPY_ARG(_a)

Copy in variable argument to out variable argument and zero in argument. out and in are assumed in the context.

#define COPY_ARG(_a)

Copy in variable argument to out variable argument and zero in argument. out and in are assumed in the context.

#define CSAP_LOCK(csap_inst_)

Locks access to CSAP shared flags and data. If already locked, wait until unlocked.

Parameters:

csap_inst_

CSAP instance

#define CSAP_SUPPORT_NO_RW

Helper macro to initialize part of csap_spt_type_t structure, if layer does not provide read/write functions.

#define CSAP_TRYLOCK(csap_inst_, rc_)

Try to lock access to CSAP shared flags and data.

Parameters:

csap_inst_

CSAP instance

rc_

Variable for return code

#define CSAP_UNLOCK(csap_inst_)

Unlocks access to CSAP shared flags and data.

Parameters:

csap_inst_

CSAP instance

#define CS_SUBSTITUTION_DELIMITER

Separator in values in which there are substitutions

#define CVT_INTEGER

CVT_INTEGER = CVT_INT32 fallback for test suites

#define DEF_STR_LEN

Generic string length used for strings containing raw log fragment file names and strings from index files

#define DOMAIN_MAPPING_LIST

The list of values allowed for parameter of type ‘rpc_socket_domain’

#define EPOLL_EVENT_MAPPING_LIST

List of mapping numerical value to string for ‘rpc_poll_event’

#define ERRNO_MAPPING_LIST

The list of values allowed for parameter of type ‘rpc_errno’

#define ERROR_ASN_INIT_VALUE(_type)

Macro to log failures of asn_init_value() function.

#define ERROR_CLEANUP(rc_, err_, format_, args_...)

Print error message, set return value, go to cleanup.

Parameters:

rc_

Function’s return value to set.

err_

Error to be returned.

format_

Format string.

args_

Arguments for format string (may be empty).

#define ERROR_UNSPEC

Unspecified error code

#define FALSE

Deprecated Use ISO C false.

#define GEN_CONNECTION(srvr_, clnt_, sock_type_, proto_, srvr_addr_, clnt_addr_, srvr_s_, clnt_s_)

The macro is a wrapper over gen_connection function. In case of failure it calls TEST_FAIL() macro, so that it should be called in test context only.

#define GEN_CONNECTION_WILD(srvr_, clnt_, sock_type_, proto_, srvr_addr_, clnt_addr_, srvr_s_, clnt_s_, bind_wildcard_)

The macro is a wrapper over gen_connection function. In case of failure it calls TEST_FAIL() macro, so that it should be called in test context only.

#define GEN_DGRAM_CONN(srvr_, clnt_, proto_, srvr_addr_, clnt_addr_, srvr_s_, clnt_s_, srvr_connect_, clnt_connect_)

The macro is a wrapper over rpc_dgram_connection_gen function. In case of failure it calls TEST_FAIL() macro, so that it should be called in test context only.

#define GEN_DGRAM_CONN_WILD(srvr_, clnt_, proto_, srvr_addr_, clnt_addr_, srvr_s_, clnt_s_, srvr_connect_, clnt_connect_, bind_wildcard_)

The macro is a wrapper over rpc_dgram_connection_gen_wild function. In case of failure it calls TEST_FAIL() macro, so that it should be called in test context only.

#define H2RPC(name_)

Converts system native constant to its mirror in RPC namespace

#define HAVE_STDARG_H

Define our own features

#define HOST_REBOOT

Reboot the host with Test Agent process

#define IFNAME_TO_INDEX(_name, _index)

Get interface index by its name. Return error if it cannot be done.

Parameters:

_name

Name of the interface.

_index

Where to save interface index.

#define IF_FL_MAPPING_LIST

List of mapping numerical value to string for ‘rpc_io_fl’

#define INFINITE_LOOP_BEGIN(name_)

Get time of start before entering infinite loop.

Parameters:

name_

Unique name used in auxiliary variables.

#define INFINITE_LOOP_BREAK(name_, timeout_)

Check whether infinite loop runs too long, break if timeout is reached.

Parameters:

name_

Unique name used in auxiliary variables.

timeout_

Timeout in milliseconds.

#define INTERMEDIATE_ANSWER

Packet is received on the TA, but traffic receiving continues

#define IN_AIOCB

Extract AIO control block from in argument

#define IN_FDSET

Extract fdset from in argument

#define IN_FDSET_NS(_ns)

Extract fdset with namespace from in argument

Parameters:

_ns

Namespace id

#define IN_SIGSET

Extract sigset from in argument

#define IOCTL_REQ_MAPPING_LIST

The list of values allowed for parameter of type ‘rpc_ioctl_code’

#define IOMUX_MAX_POLLED_FDS

Maximum file descriptors number which can be used in a multiplexer set.

#define IP4_HDR_DST_OFFSET

The offset (the number of 32-bit words) to the IPv4 destination address

#define IP4_HDR_H_CKSUM_DU_INDEX

The index of IPv4 header DU corresponding to ‘h-checksum’ PDU field

#define IP4_HDR_SRC_OFFSET

The offset (the number of 32-bit words) to the IPv4 source address

#define IP4_HDR_TOTAL_LEN_OFFSET

The offset to the total length field in IPv4 header, bytes

#define IP4_VERSION

IPv4 version number

#define IP6_ADDR_LEN

Size of IPv6 address in bytes

#define IP6_HDR_DST_OFFSET

The offset (the number of 32-bit words) to the IPv6 destination address

#define IP6_HDR_SIN6_ADDR_LEN

Length of IPv6 address (the number of 32-bit words)

#define IP6_HDR_SRC_OFFSET

The offset (the number of 32-bit words) to the IPv6 source address

#define IP6_PSEUDO_HDR_LEN

The length of IPv6 Pseudo Header used in calculation of Upper-Layer checksums (see RFC 2460, section 8.1 for details)

#define IP6_VERSION

IPv6 version number

#define IPC_RETRY

Number of retries for connecting to server

#define IPC_SEGMENT_SIZE

The maximal size of the datagram (has effect only if TE_IPC_AF_UNIX is defined).

#define IPC_SLEEP

Interval (in seconds) between retries

#define IP_HDR_VERSION_LEN

The length of IP header field ‘version’ is 4 bits

#define IP_HDR_VERSION_SHIFT

The shift of IP header field ‘version’ is 4 bits

#define ISCSI_AUTH_METHOD_LENGTH

AuthMethod length

#define ISCSI_BOOLEAN_LENGTH

Boolean value length

#define ISCSI_DEFAULT_HOST_BUS_ADAPTER

Host bus adapter default value.

#define ISCSI_DEFAULT_LUN_NUMBER

LUN of the target to connect to.

#define ISCSI_DEFAULT_RETRY_ATTEMPTS

Default number of attempts to probe for a SCSI device readiness

#define ISCSI_DEFAULT_RETRY_TIMEOUT

Default time slice to wait for a SCSI device readiness

#define ISCSI_DIGEST_LENGTH

HeaderDigest length CRC32R,None

#define ISCSI_END_PARAM_TABLE

Trailing element in iscsi_target_param_descr_t array

#define ISCSI_MAX_ADDR_LENGTH

Maximum address length

#define ISCSI_MAX_CID_LIST_LENGTH

Maximum length of the list of cids of the initiator

#define ISCSI_MAX_CMD_SIZE

Maximum length of the CLI command

#define ISCSI_MAX_CONNECTIONS_NUMBER

Maximum number of the connections with one target

#define ISCSI_MAX_DEVICE_NAME_LEN

Maximum length of device name

#define ISCSI_MAX_NAME_LENGTH

Maximum length of the (initiator|target)(name|alias)

#define ISCSI_MAX_TARGETS_NUMBER

Maximum number of targets the Initiator can connect to

#define ISCSI_SECURITY_VALUE_LENGTH

Length of the peer_secret, peer_name, local_secret, local_name

#define ISCSI_SESSION_ID_LENGTH

Length of Open iSCSI record ID or Microsoft session ID

#define ISCSI_SESSION_TYPE_LENGTH

SessionType length

#define ISCSI_TARGET_DEFAULT_PORT

Default targets port

#define IS_ZERO(ts)

The macro determines if the time val is zero

#define JSON_ARRAY_APPEND(_arr, _val, _rc, _lbl)

Append a new value to the JSON array.

Parameters:

_arr

JSON array.

_val

JSON type value to set as JSON array value.

_rc

Status code.

_lbl

Label to go on fails.

See also:

json_array_append

#define JSON_ARRAY_APPEND_NEW(_arr, _val, _rc, _lbl)

Append a new value to the JSON array.

Parameters:

_arr

JSON array.

_val

JSON type value to set as JSON array value.

_rc

Status code.

_lbl

Label to go on fails.

See also:

json_array_append_new

#define JSON_ARRAY_CREATE(_arr, _rc, _lbl)

Create a new JSON array.

Parameters:

_arr

JSON array to create.

_lbl

Label to go on fails.

See also:

json_array

#define JSON_ENCODING_FLAGS

flags parameter that controls some aspects of how the data is encoded.

#define JSON_OBJECT_CREATE(_obj, _rc, _lbl)

Create a new JSON object.

Parameters:

_obj

JSON object to create.

_rc

Status code.

_lbl

Label to go on fails.

See also:

json_object

#define JSON_OBJECT_SET(_obj, _key, _val, _rc, _lbl)

Set a new value to the JSON object.

Parameters:

_obj

JSON object.

_key

Key of value (null-terminated string).

_val

JSON type value to set as JSON object value.

_rc

Status code.

_lbl

Label to go on fails.

See also:

json_object_set

#define JSON_OBJECT_SET_NEW(_obj, _key, _val, _rc, _lbl)

Set a new value to the JSON object.

Parameters:

_obj

JSON object.

_key

Key of value (null-terminated string).

_val

JSON type value to set as JSON object value.

_rc

Status code.

_lbl

Label to go on fails.

See also:

json_object_set_new

#define LGR_16_TO_NET(_val, _res)

Convert value to the network order

#define LGR_FLUSH

Logger flush command

#define LGR_FLUSH_TA_MSG_MAX

Maximum number of messages to be get during flush. It is required to cope with permanent logging on TA with broken time synchronization.

#define LGR_GET_ARG(_hdr, _narg)

Get/Set header argument

#define LGR_GET_ELEMENTS_FIELD(_rb, _pos)

Get/Set message separate fields

#define LGR_GET_MESSAGE_ADDR(_rb, _pos)

This macro for using in following macros only

#define LGR_GET_MESSAGE_ARRAY(_rb, _pos)

Get message memory address in ring buffer

#define LGR_MAX_NAME

Maximum length of the Logger IPC server name

#define LGR_RB_CORRECTION(_val, _res)

This macro corrects head/tail value on ring buffer physical border

#define LGR_RB_HEAD(_rb)

Get ring buffer head element

#define LGR_RB_TAIL(_rb)

Get ring buffer tail element

#define LGR_RB_UNUSED(_rb)

Get ring buffer unused elements

#define LGR_SHUTDOWN

Logger shutdown command

#define LGR_SRV_FOR_TA_PREFIX

Prefix of the name of the per Test Agent Logger server

#define LGR_SRV_NAME

Name of the Logger server

#define LGR_TA_POLL_DEF

Default TA polling timeout in milliseconds

#define LIBGUPNP_DIDLLITE_CONTAINER_BUG

Disable extract a number of bytes used by all child items of the container cause gupnp_didl_lite_container_get_storage_used fails on minidlna server. Tested with libgupnp-av-1.0-dev/stable 0.12.6-1 and MiniDLNA 1.0.26 See details in Bug 8831.

Todo Remove this difinition when the bug will be resolved. See https://bugzilla.gnome.org/show_bug.cgi?id=770174

#define LOGFORK_MAXLEN

Maximum length of the logging message

#define LOGFORK_MAXUSER

Maximum length of the Logger user name or logfork user name

#define LOGF_SUPENTRY(_us, _fs, _args...)

< Logging of entry to and exit from function

#define LOGGER_IPC

Type of IPC used for Logger TEN API <-> Logger server

#define LOG_PRINT(_fmt, ...)

Print a message to stdout ending a line and flushing the output This macro is intended only for emergency logging when a normal logger is not available

#define MAKE_CALL(_code)

Execute code wrapped into tarpc_before_call() /tarpc_after_call()

#define MAKE_CALL(x)

Declare and initialise time variables; execute the code and store duration and errno in the output argument.

#define MAPPING_LIST_ENTRY(entry_val_)

Define one entry in the list of maping entries

#define MASK2PREFIX(mask, prefix)

Fast conversion of the network mask to prefix

#define MAX(_x, _y)

Determines maximum from two arguments. If arguments are equal, preference is given to the first one.

Macro user is responsible for appropriateness of the argument types.

Parameters:

_x

the first argument

_y

the second argument

See also:

MIN()

#define MAX_CHANGE_TIMEOUT

Wait for changing of TCP state not due to timeout at most MAX_CHANGE_TIMEOUT milliseconds.

#define MIN(_x, _y)

Determines minimum from two arguments. If arguments are equal, preference is given to the first one.

Macro user is responsible for appropriateness of the argument types.

Parameters:

_x

the first argument

_y

the second argument

See also:

MAX()

#define MSGHDR_MSG_FLAGS_INIT(_msg, _msg_set)

Initialize msg_flags by a random value.

Parameters:

_msg

Message to check msg_flags_mode if the initialization is requested

_msg_set

Message where the new value should be assigned

#define NDN_ARP_HW_SIZE_MAX

Buffer size for hardware address

#define NDN_ARP_PROTO_SIZE_MAX

Buffer size for protocol address

#define NDN_DATA_UNIT_TYPE(id, asn_t, asn_bt_txt_id)

Macro for definition of C structures, presenting DATA-UNIT based ASN types.

Parameters:

id

suffix, used to construct global constant names

asn_t

base ASN type, constant of asn_type type

asn_bt_txt_id

textual name of base ASN type

#define NDN_DATA_UNIT_WITH_RANGE_TYPE(id, asn_t, asn_bt_txt_id)

Macro for definition of C structures, presenting DATA-UNIT-range item and DATA-UNIT with it based ASN types.

Parameters:

id

suffix, used to construct global constant names

asn_t

base ASN type, constant of asn_type type

#define NDN_SNMP_SEC_MODEL_DEFAULT

Default SNMP security model

#define NEG_ERRNO_ARGS(_val)

Negative errno format string values.

It is used with NEG_ERRNO_FMT.

#define NEG_ERRNO_FMT

Generic format string for negative errno logging.

It is used with NEG_ERRNO_ARGS.

#define NETCONF_ASSERT(expr)

Nothing

#define NETCONF_DEVLINK_PARAM_CMODES

Number of supported device parameter configuration modes

#define NETCONF_HANDLE_INVALID

Invalid netconf session handle

#define NETCONF_MAX_MXBUF_LEN

Maximum size of mx buffer

#define NETCONF_MAX_REQ_LEN

Maximum size of request to kernel

#define NETCONF_NLMSG_TAIL(_msg)

Get pointer to the tail of netlink message data.

#define NETCONF_PREFIX_UNSPEC

Invalid prefix length

#define NETCONF_RCV_BUF_LEN

Size of receive buffer

#define NETCONF_SOCK_RCVBUF

Maximum socket receive buffer in bytes

#define NETCONF_SOCK_SNDBUF

Maximum socket send buffer in bytes

#define PARAMETERS_ARGV

Routine parameters are passed in argc/argv mode

#define PF_INVALID

PF_MAX was increased in 3.9 kernel. TE should use PF_INVALID instead of PF_MAX

#define POLL_EVENT_MAPPING_LIST

List of mapping numerical value to string for ‘rpc_poll_event’

#define PREPARE_ADDR(_name, _value, _wlen)

Convert address and register it in the list of checked arguments

#define PREPARE_ADDR(_name, _value, _wlen)

Convert address and register it in the list of checked arguments.

Parameters:

_name

Where to place converted value handle

_value

Value to be converted

_wlen

Visible len (all beyond this len should remain unchanged after function call.

#define PREPARE_ADDR_GEN(_name, _value, _wlen, _is_local, _do_register)

Convert address and register it in the list of checked arguments.

Parameters:

_name

Where to place converted value handle

_value

Value to be converted

_wlen

Visible len (all beyond this len should remain unchanged after function call).

_is_local

Whether local variable or dynamically allocated memory should be used to store converted value. This must be a literal true or false

_do_register

If true, register argument in the list to be checked after function call. This must be a literal true or false

#define PROMPT_VAL_MAX

Maximum possible length of prompt value

#define PROTOCOL_MAPPING_LIST

The list of values allowed for parameter of type ‘rpc_socket_proto’

#define PTR_VAL(_param)

Follow pointer if not NULL; otherwise return 0

#define QEL_DELETE(x)

Delete element from list; note, that you need not know reference to list to delete element from it

#define QEL_INSERT(list, new)

Insert new element in list

#define RCF_ACK_HOST_REBOOT_TIMEOUT

The interval between sending a reboot request to the agent and receiving a response in seconds

#define RCF_CMD_TIMEOUT

Default timeout (in seconds) for command processing on the TA

#define RCF_CMD_TIMEOUT_HUGE

Huge timeout for command processing on the TA

#define RCF_COLD_REBOOT_TIMEOUT

Timeout for cold reboot in seconds

#define RCF_CONFSET_TIMEOUT

Timeout for CONFSET operation, in seconds.

RCF_CMD_TIMEOUT is not big enough to allow performing time consuming set operations (for example, to generate DH parameters and start openvpn deamon) via Configurator.

#define RCF_HOST_REBOOT_TIMEOUT

TA host reboot timeout in seconds

#define RCF_IPC

Type of IPC used by RCF on Test Engine

#define RCF_LOG_FLUSHED_TIMEOUT

Timeout to wait for logs in seconds

#define RCF_MAX_ID

Maximum object or stack identifier length

#define RCF_MAX_LEN

Maximum length of RCF message or protocol command/answer

#define RCF_MAX_NAME

Maximum length of the name of the Test Agent, TA type, variable, etc. (including ‘0’).

#define RCF_MAX_PARAMS

Maximum number of routine parameters

#define RCF_MAX_PATH

Maximum full file name

#define RCF_MAX_VAL

Maximum length of variable value or object instance value

#define RCF_PCH_LOG_BULK

Size of the log data sent in one request

#define RCF_PCH_MEM_INDEX_ALLOC(_mem, _ns)

Wrapper for rcf_pch_mem_index_alloc() with details for error messages

#define RCF_PCH_MEM_INDEX_FREE(_id, _ns)

Wrapper for rcf_pch_mem_index_free() with details for error messages

#define RCF_PCH_MEM_INDEX_FREE_MEM(_mem, _ns)

Wrapper for rcf_pch_mem_index_free_mem() with details for error messages

#define RCF_PCH_MEM_INDEX_MEM_TO_PTR(_id, _ns)

Wrapper for rcf_pch_mem_index_mem_to_ptr() with details for error messages

#define RCF_PCH_MEM_INDEX_PTR_TO_MEM(_mem, _ns)

Wrapper for rcf_pch_mem_index_ptr_to_mem() with details for error messages

#define RCF_PCH_MEM_INDEX_TO_PTR_RPC(_mem, _id, _ns, _rc)

Wrapper for rcf_pch_mem_index_mem_to_ptr() with details for error messages. The macro sets _errno inside the variable out and calls return value _rc (may be unspecified for void return) in case of fail.

This macro can be called in a context where there is the variable out->common._errno.

This macro cannot be called in the macro MAKE_CALL. That macro resets the variable out->common._errno at the end.

#define RCF_PCH_MEM_NS_CREATE_IF_NEEDED(_ns_id, _ns_str)

Wrapper for rcf_pch_mem_ns_create_if_needed() with details for error messages

#define RCF_PCH_MEM_NS_CREATE_IF_NEEDED_RETURN(_ns_id, _ns_str, _rc)

Wrapper for rcf_pch_mem_ns_create_if_needed() with details for error messages. The macro sets errno and calls return value _rc (may be unspecified for void return) in case of fail.

#define RCF_RPC_BUF_LEN

Usual RPC buffer length

#define RCF_RPC_HUGE_BUF_LEN

Huge RPC buffer length - if encode fails with this buffer length, it’s assumed that error is not related to lack of space.

#define RCF_RPC_MAX_NAME

Maximum length of the RPC

#define RCF_RPC_SERVER_GET_EXEC

Next flags may be passed to RPC create_process exec after fork

#define RCF_RPC_SERVER_GET_EXISTING

Get only existing RPC server

#define RCF_RPC_SERVER_GET_INHERIT

Windows-specific: inherit file handles

#define RCF_RPC_SERVER_GET_NET_INIT

Windows-specific: initialize network

#define RCF_RPC_SERVER_GET_REGISTER

Register in configuration tree existing RPC server process (created without help of configurator previously, for example, to avoid setting flags like RCF_RPC_SERVER_GET_INHERIT automatically by configurator for the process creation).

#define RCF_RPC_SERVER_GET_REUSE

Reuse existing RPC server if possible without restart

#define RCF_RPC_SERVER_GET_THREAD

Create a subthread of the existing RPC server

#define RCF_SELECT_TIMEOUT

Default select timeout in seconds

#define RCF_SHUTDOWN_TIMEOUT

TA shutdown timeout in seconds

#define RCF_TALIB_METHODS_DEFINE(talib_prefix_)

Export RCF TA communication library methods.

This macro expects TE_LIB_NAME is defined with the name of the library. For the case of rcfunix library TE_LIB_NAME is defined as a part of command line options in Makefile.am

Parameters:

talib_prefix_

Prefix name used in method functions

#define RCF_TA_GET_LOG_SID

Special SID for TA get log operation

#define READ_PACKET_FIELD(rc_, pdu_, dgr_, dir_, field_)

Read field from packet.

Parameters:

rc_

Function’s return value to set.

pdu_

Pointer to PDU from which to read a field.

dgr_

Pointer to structure describing network packet.

dir_

Direction (prefix) of the field (src, dst)

field_

Label of desired field (port, addr).

#define RETVAL_BOOL(_func, _retval)

Return with check (for functions returning boolean value)

#define RETVAL_ECORRUPTED

Negative errno with RPC sanity failure indication

#define RETVAL_INT(_func, _retval)

Return with check (for functions returning value >= -1)

#define RETVAL_INT64(_func, _retval)

Return with check (for functions returning int64_t value >= -1)

#define RETVAL_INT_CHECK_WAIT_STATUS(_func, _retval, _status)

Return int value and check it and wait_status.

#define RETVAL_PTR(_func, _retval)

Return with check (for functions returning pointers)

#define RETVAL_PTR64(_func, _retval)

Return with check (for functions returning pointers)

#define RETVAL_RPC_PTR(_func, _retval)

Return with check (for functions returning pointers)

#define RETVAL_RPC_PTR_OR_NULL(_func, _retval)

Return with check (to be used in functions where NULL is not considered as an error value)

#define RETVAL_TE_ERRNO(_func, _retval)

Return with check (for functions returning te_errno value)

#define RETVAL_VOID(_func)

Return with check (for void functions)

#define RETVAL_WAIT_STATUS(_func, _retval)

Return wait_status with check.

#define RETVAL_ZERO_INT(_func, _retval)

Return with check (for functions returning zero value)

#define RGT_CLEANUP_JUMP

Jump to error/cleanup section without setting error variable (can be used when you simply need to terminate function execution, do cleanup and return success)

#define RGT_DEF_DUMMY_FUNC(name_)

Macro to define empty callback function

Parameters:

name_

Function name to be defined

#define RGT_DEPTH_DATA_STORAGE_INIT(_size)

Initializer for rgt_depth_data_storage.

#define RGT_ERROR

Check whether some error occurred

#define RGT_ERROR_FAIL

Value of error variable when errors occurred

#define RGT_ERROR_INIT

Declare and initialize error variable

#define RGT_ERROR_JUMP

Set error variable to error value and jump to error section

#define RGT_ERROR_OK

Value of error variable when no errors occurred

#define RGT_ERROR_SECTION

Macro for starting a section to which error-checking macros jump in case of failure. It disables further jumping, so those marcos are safe to use after it too, they only set error code then. It should be at the end of the function, meant for releasing resources and determining what to return.

#define RGT_ERROR_SET

Set error variable to error value

#define RGT_ERROR_VAL

Get value of error variable

#define RGT_MSG_FLG_ARTIFACT

A message is artifact

#define RGT_MSG_FLG_NORMAL

Message flag values An ordinary message

#define RGT_MSG_FLG_VERDICT

A message is verdict

#define RGT_NODE_ID_PREFIX

Prefix used for node ID in HTML log file name

#define RGT_NODE_ID_PREFIX

Prefix used for node ID in log file name

#define RGT_TMPLS_VAR_DELIMETER

Delimiter to be used for determination variables in templates

#define RGT_XML2MULTI_OPTS_INIT

Initializer for rgt_xml2multi_opts

#define RPC2H(name_)

Converts a constant from RPC namespace to system native constant

#define RPC2STR(name_)

Converts a constant from RPC namespace to string representation

#define RPCSERVER_PLUGIN_AWAIT_DYNAMIC_LIBRARY(_timeout)

Sleep the pending timeout and return error in case dynamic library is not loaded.

Parameters:

_timeout

Timeout of pending (in milliseconds)

Returns:

TE_RC (TE_TA_UNIX, TE_EPENDING) if dynamic library is not loaded

#define RPCSERVER_PLUGIN_AWAIT_RPC_CALL(_list, _timeout)

Sleep the pending timeout and return error in case non-blocking call is executed.

Parameters:

_list

List of asynchronous RPCs

_timeout

Timeout of pending (in milliseconds)

Returns:

TE_RC (TE_TA_UNIX, TE_EPENDING) if non-blocking call is executed

#define RPC_BIT_MAP_ENTRY(entry_val_)

Define one entry in the list of maping entries

#define RPC_DIRENT_HAVE_D_INO

Target system has ‘d_ino’ field in struct dirent (this field always present - it is mandatory).

#define RPC_DIRENT_HAVE_D_NAMLEN

Target system has ‘d_namelen’ field in struct dirent

#define RPC_DIRENT_HAVE_D_OFF

Target system has ‘d_off’ field in struct dirent

#define RPC_DIRENT_HAVE_D_TYPE

Target system has ‘d_type’ field in struct dirent

#define RPC_EPOLL_ALL

All known poll events

#define RPC_EPOLL_FLAGS_ALL

All known epoll flags

#define RPC_ERRNO

Convert OS error to RPC one

#define RPC_ERRNO

Obtain RCF RPC errno code

#define RPC_ERROR_MAX_LEN

Maximum length of string describing error.

#define RPC_IS_ERRNO_RPC(_errno)

Check, if errno is RPC errno, not other TE errno

#define RPC_MSG_ALL

Bitmask of all possible receive flags

#define RPC_OPTLEN_AUTO

Option length should be calculated automatically

#define RPC_O_ACCMODE

Access mode

#define RPC_PCH_MEM_WITH_NAMESPACE(_ns_id, _ns_str, _actions)

Performs _actions with a defined namespace

In case of an error this macro changes the errno for processing outside

Parameters:

_ns_id

Variable name for namespace id

_ns_str

Namespace as string

_actions

Some actions

#define RPC_POLL_ALL

All known poll events

#define RPC_POLL_NFDS_MAX

Maximum number of file descriptors passed to the poll

#define RPC_PTR_FMT

Generic format string of rpc_ptr pointers

It is used with RPC_PTR_VAL.

#define RPC_PTR_ID_GET_INDEX(_id)

Extract index of ids array item from the identifier _id

Parameters:

_id

Pointer id

Returns:

index of ids array item

#define RPC_PTR_ID_GET_NS(_id)

Extract index of namespaces array item from the identifier _id

Parameters:

_id

Pointer id

Returns:

index of namespaces array item

#define RPC_PTR_ID_INDEX_BITCOUNT

The amount of bits for index in ids in a pointer id

#define RPC_PTR_ID_INDEX_LIMIT

Maximum index value in ids in a pointer id

#define RPC_PTR_ID_INDEX_MASK

Mask of ids in a pointer id

#define RPC_PTR_ID_MAKE(_ns, _index)

Create a composite identifier

0 is equivalent to NULL for rpc_ptr and 1 is added to support this.

Parameters:

_ns

Index in the namespaces array

_index

Index in the ids array

Returns:

Pointer id

#define RPC_PTR_ID_NS_BITCOUNT

The count of bits for namespace value in a pointer id

#define RPC_PTR_ID_NS_INVALID

Invalid namespace

#define RPC_PTR_ID_TO_MEM

Alias for macro RCF_PCH_MEM_INDEX_MEM_TO_PTR.

#define RPC_PTR_MEM_TO_ID

Alias for macro RCF_PCH_MEM_INDEX_PTR_TO_MEM.

#define RPC_PTR_VAL(_val)

Description of the pointer _val fields according to the generic format string

It is used with RPC_PTR_FMT.

Parameters:

_val

pointer value

#define RPC_SIG_ERR

In our RPC model rpc_signal() function always returns string, that equals to a function name that currently used as the signal handler, and in case there is no signal handler registered rpc_signal() returns “0x00000000”, so in case of error function returns NULL.

#define RPC_STDIN_FILENO

Platform-independent defines for standard input, output and error file descriptors.

#define RPC_TYPE_NS_XSK_SOCKET

Namespace for pointers to internal ta_xsk_socket structure

#define RPC_TYPE_NS_XSK_UMEM

Namespace for pointers to internal ta_xsk_umem structure

#define RPC_XDP_BIND_COPY

Force copy mode

#define RPC_XDP_BIND_SHARED_UMEM

UMEM is shared

#define RPC_XDP_BIND_USE_NEED_WAKEUP

Enable XDP_RING_NEED_WAKEUP flag for FILL and Tx rings. When that flag is set, kernel needs syscall (poll() or sendto()) to wake up the driver. Checking that flag can reduce number of syscalls and improve performance.

#define RPC_XDP_BIND_ZEROCOPY

Force zero-copy mode

#define SA(_p)

Cast to ‘struct sockaddr *’ type.

#define SA(_p)

Cast pointer to ‘struct sockaddr *’.

Parameters:

_p

  • a pointer

Returns:

pointer to ‘struct sockaddr *’

#define SA_COMMON_LEN

Length of the common part of the “struct sockaddr”

#define SA_DATA_MAX_LEN

Maximum length of buffer for sa_data_val in tarpc_sockaddr

#define SEND_ANSWER(_fmt...)

Send answer to the TEN and return (is called from default command handlers).

It is assumed that local variables cbuf (command buffer pointer), buflen (length of the command buffer), answer_plen (length of data to be copied from the command to the answer), conn (connection to TEN handle) are defined in the context from which the macro is called.

Parameters:

_fmt

  • format string

#define SHUT_HOW_MAPPING_LIST

The list of values allowed for parameter of type ‘rpc_shut_how’

#define SIGNUM_MAPPING_LIST

The list of values allowed for parameter of type ‘rpc_signum’

#define SIN(_p)

Cast to ‘struct sockaddr_in *’ type.

#define SIN6(_p)

Cast to ‘struct sockaddr_in6 *’ type.

#define SKIP_SPACES(_ptr)

Skip spaces in the command.

Parameters:

_ptr

  • pointer to string

#define SLEEP_MSEC

Sleep 2 sec when we don’t know whether TCP state can change instantly or not (no definite timeout, just packets retransmitting after forwarding unlock).

#define SNIFFER_MARK_H_INIT(_proto, _msglen)

Initialization of a header for a marker packet.

Parameters:

_proto

Pointer to the allocated header location.

_msglen

Length of the user message for the packet.

#define SNIFFER_TS_CPY(_dest, _src)

Safe copy of the time stamp

Parameters:

_dest

32-bits struct of the time stamp

_src

32/64-bits struct of the timestamp

#define SNMP_CSAP_CREATE(ta_, sid_, snmp_agent_, community_, snmp_version_, csap_id_)

Macro around tapi_snmp_csap_create().

Parameters:

ta_

Test Agent name.

sid_

RCF Session ID.

snmp_agent_

Address of SNMP agent.

community_

SNMP community.

snmp_version_

SNMP version.

csap_id_

identifier of an SNMP CSAP. (OUT)

#define SNMP_GET_TABLE_ROWS(ta_, sid_, csap_id_, label_, num_, suffixes_, result_)

Macro around tapi_snmp_get_table_rows().

Parameters:

ta_

Test Agent name

sid_

RCF Session id

csap_id_

SNMP CSAP handle

label_

OID of SNMP table Entry MIB node

num_

number of suffixes

suffixes_

Array with index suffixes of desired table rows

result_

Allocated matrix with results, matrix width is greatest subid of Table entry (OUT)

#define SNMP_LOAD_MIB(mib_file_)

Macro around tapi_snmp_load_mib().

Parameters:

mib_file_

File name of the MIB file.

#define SNMP_LOAD_MIB_WITH_PATH(dir_path_, mib_file_)

Macro around tapi_snmp_load_mib_with_path().

Parameters:

dir_path_

Path to directory with MIB files

mib_file_

File name of the MIB file

#define SNMP_MAKE_INSTANCE(label_, oid_, indeces_...)

Macro around tapi_snmp_make_table_field_instance().

Parameters:

label_

SNMP label - OID string representation

oid_

Location for parsed OID (OUT)

indeces_

Indeces of table field instance

#define SNMP_MAKE_OID(label_, oid_)

Macro around tapi_snmp_make_oid().

Parameters:

label_

SNMP label - OID string representation

oid_

Location for parsed OID (OUT)

#define SNMP_MAKE_TBL_INDEX(label_, index_...)

Macro around tapi_snmp_make_table_index()

Parameters:

label_

table object identifier.

index_

pointer to table index.

#define SOCKADDR_H2STR_SBUF(_addr, _buf)

Macro simplifying use of sockaddr_h2str_buf() with statically allocated buffer.

Parameters:

_addr

Address.

_buf

Buffer where to save string.

Returns:

Pointer to buffer with string (may be string constant).

#define SOCKLEVEL_MAPPING_LIST

The list of values allowed for parameter of type ‘rpc_socklevel’

#define SOCKOPT_MAPPING_LIST

The list of values allowed for parameter of type ‘rpc_sockopt’

#define SOCK_TYPE_MAPPING_LIST

The list of values allowed for parameter of type ‘rpc_socket_type’

#define SS(_p)

Cast to ‘struct sockaddr_storage *’ type.

#define STEP_ITER_MATCH_FLAGS

Flags from step_iter_flags related to matching iterations to DB records.

#define STP_BPDU_CFG_TYPE

Value of BPDU Type field used in STP Configuration BPDU See ANSI/IEEE Std. 802.1D, 1998 Edition section 9.3.1

#define STP_BPDU_TCN_TYPE

Value of BPDU Type field used in STP Topology Change Notification BPDU See ANSI/IEEE Std. 802.1D, 1998 Edition section 9.3.2

#define SUB_TV(res, ts1, ts2)

Calculates substraction of timevals, ts1 - ts2.

Parameters:

res

The result timeval.

ts1

Time stamp to be reduced

ts2

On which value to reduce

#define SUN(_p)

Cast to ‘struct sockaddr_un *’ type.

#define SWAP_PTRS(_p1, _p2)

Swap two pointers.

Parameters:

_p1

one pointer

_p2

another pointer

#define SYS_recvmmsg

System call number of recvmmsg function

#define SYS_sendmmsg

System call number of sendmmsg function

#define TADF_SENDQ_LIST_SIZE_MAX

The maximum number of send queues created on the forwarder host

#define TAD_ARG_SIMPLE_FOR_BEGIN_DEF

Default value of begin of ‘simple-for’ iterator

#define TAD_ARG_SIMPLE_FOR_STEP_DEF

Default value of step of ‘simple-for’ iterator

#define TAD_CKSUM_STR_VAL_CORRECT

‘string’ choice value to denote that correct checksums will match only

#define TAD_CKSUM_STR_VAL_CORRECT_OR_ZERO

‘string’ choice value to denote that either correct or zero checksums match only

#define TAD_CKSUM_STR_VAL_INCORRECT

‘string’ choice value to denote that incorrect checksums will match only

#define TAD_ETH_RECV_ALL

Receive all packets

#define TAD_ETH_RECV_DEF

Default mode is to receive everything except outgoing packets

#define TAD_ETH_RECV_NO

Receive nothing

#define TAD_ETH_SAP_IFNAME_SIZE

Maximum length of the Ethernet interface (service provider) name

#define TAD_IP4_HDR_LEN

Default IPv4 header size (without options)

#define TAD_IP6_HDR_LEN

Default IPv6 header size (without options)

#define TAD_PKT_FOR_EACH_PKT_FWD(_head, _pkt)

Forward traversal of TAD packets list.

Parameters:

_head

Pointer to head of the list (tad_pkts_head *)

_pkt

Loop varaible to assign pointer to a packet (tad_pkt *)

#define TAD_PKT_FOR_EACH_PKT_REV(_head, _pkt)

Reverse traversal of TAD packets list.

Parameters:

_head

Pointer to head of the list (tad_pkts_head *)

_pkt

Loop varaible to assign pointer to a packet (tad_pkt *)

#define TAD_PKT_FOR_EACH_SEG_FWD(_head, _seg)

Forward traversal of TAD packet segments.

Parameters:

_head

Pointer to head of the list (tad_pkt_segs *)

_seg

Loop varaible to assign pointer to a segment (tad_seg_seg *)

#define TAD_SA2ARGS(_loc, _rem)

Convert sockaddr structures to address/port arguments passed to CSAP creation functions.

Parameters:

_loc

Local address.

_rem

Remote address.

#define TAD_TCP_HDR_LEN

Default TCP header size (without options)

#define TAD_TIMEOUT_DEF

Default receive timeout of the CSAP.

Todo Put it in appropriate place.

#define TAD_TIMEOUT_INF

Infinitive timeout to wait forever.

Todo Put it in appropriate place.

#define TAD_UDP_HDR_LEN

Length of UDP header

#define TAD_VLAN_TAG_LEN

Length of VLAN tag

#define TAPI_BPF_STIM_STIMULUS

List of values allowed for parameter of type tapi_bpf_stim_type.

#define TAPI_CFG_IF_FC_INIT

Initializer for tapi_cfg_if_fc

#define TAPI_CFG_IF_RSS_HFUNC_NAME_LEN

Maximum length of RSS hash function name

#define TAPI_LOCAL_FS_FOREACH(var_, head_, file_)

Loop ‘for’ to iterate through all file list entries.

Parameters:

var_

Pointer to the files list entry.

head_

Pointer to the head of the list.

file_

Pointer to the file which is represented by tapi_local_file structure.

See also:

tapi_local_file_le, tapi_local_file

#define TAPI_LOCAL_FS_FOREACH_DIR(var_, head_, dir_)

Loop ‘for’ to iterate through all file list entries of directory type.

Parameters:

var_

Pointer to the files list entry.

head_

Pointer to the head of the list.

dir_

Pointer to the directory which is represented by tapi_local_file structure.

See also:

tapi_local_file_le, tapi_local_file

#define TAPI_LOCAL_FS_FOREACH_FILE(var_, head_, file_)

Loop ‘for’ to iterate through all file list entries of regular file type.

Parameters:

var_

Pointer to the files list entry.

head_

Pointer to the head of the list.

file_

Pointer to the file which is represented by tapi_local_file structure.

See also:

tapi_local_file_le, tapi_local_file

#define TAPI_LOCAL_FS_FOREACH_RECURSIVE(pathname_, cb_func_, user_data_)

Recursive loop ‘for’ to iterate through all local file system files.

Parameters:

pathname_

Pathname to start traverse from.

cb_func_

Callback function which is called on each element of local file system before traverse the next elements.

user_data_

Additional data to post to cb_func_ function, or NULL.

See also:

tapi_local_fs_traverse, tapi_local_fs_traverse_cb

#define TAPI_LOCAL_FS_ROOT

Local file system root pathname representation in Configurator

#define TAPI_OPENVPN_ACCESSOR(name_, prop_, c_type_, cfg_type_)

Macro generating get/set accessors for property

#define TAPI_RPC_BUF_RAND

Pattern passed to set_buf_pattern to indicate that the buffer should be filled by random bytes.

#define TAPI_RPC_CHECK_OUT_ARG_SINGLE_PTR(_func, _arg)

Convenience helper to ensure that the “_val / _len” fields for _arg in the RPC output structure are either unset or describe a single-element buffer

#define TAPI_RPC_COPY_OUT_ARG_IF_PTR_NOT_NULL(_arg)

Convenience helper to pass the single-element buffer _arg from the RPC output structure back to the RPC caller

#define TAPI_RPC_JUMP_VERDICT(_func, _rpcs)

Print verdict before jumping to cleanup from RPC function.

Parameters:

_func

RPC function name

_rpcs

RPC server structure

#define TAPI_RPC_LOG(rpcs, func, in_format, out_format, _x...)

Log TAPI RPC call. If RPC call status is OK, log as ring, else log as error.

#define TAPI_RPC_LOG_ARG_TO_STR(_in_or_out, _arg, _log_buf, _func_arg_to_str)

Convenience helper to log the single-element output buffer _arg

The custom printout helper, _func_arg_to_str, should accept a log buffer and a the argument buffer pointer.

#define TAPI_RPC_NAMESPACE_CHECK(_rpcs, _ptr, _ns)

Wrapper for tapi_rpc_namespace_check() with details for error messages

#define TAPI_RPC_NAMESPACE_CHECK_JUMP(_rpcs, _ptr, _ns)

Wrapper for tapi_rpc_namespace_check() - jumps to cleanup in case of RPC pointer namespace check fail.

#define TAPI_RPC_OUT(_func, _res)

Free memory, check RPC error, jump in the case of RPC error or if _res is true, set jump condition to default value.

#define TAPI_RPC_SET_IN_ARG_IF_PTR_NOT_NULL(_arg)

Convenience helper to fill in the “_val / _len” fields for the single-element buffer _arg in the RPC input structure if the buffer is not NULL

#define TAPI_RPC_TIMEOUT_EXTRA_SEC

Extra time in seconds to be added to time2run before RPC timeout

#define TAPI_RTE_MBUF_CKSUM_BITS

Bits space for checksum control

#define TAPI_RTE_MBUF_CKSUM_L3_OFF

Layer3 (IP4) checksum bits offset

#define TAPI_RTE_MBUF_CKSUM_L4_OFF

Layer4 (TCP / UDP / ICMP) checksum bits offset

#define TAPI_SNMP_APPEND_OID_SUBID(oid_, subid_)

Append one SUB ID to OID (macro around tapi_snmp_oid_append()).

Parameters:

oid_

OID to be appended

subid_

SUB ID value

#define TAPI_SNMP_CHECK_INTEGER(ta, sid, csap_id, name, value, err_stat, sub_id...)

Macro to check SNMP type integer variable.

Parameters:

ta

Test Agent name

sid

RCF session ID

csap_id

Identifier of an SNMP CSAP

name

Name of an SNMP object the value is to be set

value

Integer value to compare

err_stat

Error status

sub_id

Index of table field instance (0 for scalar field)

#define TAPI_SNMP_CREATE_OID(oid_, len_, sub_ids_...)

Append one SUB ID to OID (macro around tapi_snmp_oid_append()).

Parameters:

oid_

OID to be appended

len_

The number of sub ids to add

sub_ids_

SUB ID value

#define TAPI_SNMP_GET(ta, sid, csap_id, name, next, vb, err_stat, sub_id...)

Macro around tapi_snmp_get()

Parameters:

ta

Test Agent name

sid

RCF Session id

csap_id

identifier of an SNMP CSAP

name

name of an SNMP object the value is to be set

next

GetRequest or GetNextRequest

vb

Location for returned varbind

err_stat

SNMP error status

sub_id

index of table field instance (0 for scalar field)

#define TAPI_SNMP_GET_INTEGER(ta, sid, csap_id, name, value, err_stat, sub_id...)

Macro around tapi_snmp_get_integer()

Parameters:

ta

Test Agent name

sid

RCF session ID

csap_id

Identifier of an SNMP CSAP

name

Name of an SNMP object the value is to be set

value

Pointer to returned integer value

err_stat

Error status

sub_id

Index of table field instance (0 for scalar field)

#define TAPI_SNMP_GET_OCTETSTRING(ta, sid, csap_id, name, value, size, err_stat, sub_id...)

Macro around tapi_snmp_get_octetstring()

Parameters:

ta

Test Agent name

sid

RCF session ID

csap_id

Identifier of an SNMP CSAP

name

Name of an SNMP object the value is to be set

value

Location for returned value

size

Size of returned value

err_stat

Error status

sub_id

Index of table field instance (0 for scalar field)

#define TAPI_SNMP_GET_SUBTABLE(tbl_, tbl_size_, index_prefix_, sub_tbl_, sub_tbl_size_)

Extracts subtable so that all the entries in the subtable have specified prefix in their index.

If there is no entry with specified index prefix, sub_tbl_ is set to NULL, and sub_tbl_size_ is set to zero.

Parameters:

tbl_

Pointer to the SNMP table data structure

tbl_size_

Number of rows in the table

index_prefix_

Index prefix that should present in all rows of the resulting subtable (tapi_snmp_oid_t *)

sub_tbl_

Placeholder for the pointer to the subtable (OUT)

sub_tbl_size_

Number of rows in the subtable (OUT)

#define TAPI_SNMP_GET_SYNTAX(label_, syntax_)

Macro around tapi_snmp_get_syntax().

Parameters:

label_

SNMP label - OID string representation

syntax_

Location for syntax

#define TAPI_SNMP_GET_TABLE(ta_, sid_, csap_id_, label_, num_, result_)

Macro around tapi_snmp_get_table().

Parameters:

ta_

Test Agent name

sid_

RCF Session id

csap_id_

SNMP CSAP handle

label_

OID of SNMP table Entry object, or one leaf in this entry

num_

Number of raws in table = height of matrix below (OUT)

result_

Allocated matrix with results, if only one column should be get, matrix width is 1, otherwise matrix width is greatest subid of Table entry (OUT)

#define TAPI_SNMP_GET_TABLE_COLUMNS(label_, columns_)

Macro around tapi_snmp_get_table_columns().

Parameters:

label_

OID of SNMP table Entry object, or one leaf in this entry

columns_

Columns of the table.

#define TAPI_SNMP_GET_TABLE_DIMENSION(label_, dimension_)

Macro around tapi_snmp_get_table_dimension().

Parameters:

label_

OID of SNMP table Entry object, or one leaf in this entry

dimension_

Pointer to the location of the table dimension (OUT)

#define TAPI_SNMP_GET_UNSIGNED(ta, sid, csap_id, name, value, err_stat, sub_id...)

Macro around tapi_snmp_get_unsigned()

Parameters:

ta

Test Agent name

sid

RCF session ID

csap_id

Identifier of an SNMP CSAP

name

Name of an SNMP object the value is to be set

value

Pointer to returned unsigned integer value

err_stat

Error status

sub_id

Index of table field instance (0 for scalar field)

#define TAPI_SNMP_MAKE_OID(label_, oid_)

Macro around tapi_snmp_make_oid().

Parameters:

label_

SNMP label - OID string representation

oid_

Location for parsed OID (OUT)

#define TAPI_SNMP_MAKE_VB(vb_, oid_, type_, value_...)

Macro around tapi_snmp_make_vb()

Parameters:

vb_

pointer to VarBind data structure.

oid_

OID string representation.

type_

type of value.

value_

VarBind value.

#define TAPI_SNMP_OID_ZERO(oid_)

Macro around tapi_snmp_oid_zero().

Parameters:

oid_

OID to be cleared

#define TAPI_SNMP_SET(ta, sid, csap_id, err_stat, err_index, values...)

Macro around tapi_snmp_set()

Parameters:

ta

Test Agent name

sid

RCF session ID

csap_id

Identifier of an SNMP CSAP.

err_stat

SNMP error status

err_index

Index of varbind where an error ocured

values

sequence of “varbind groups”: label of MIB leaf and value, which is either integer or pair <char *, int>, for OCTET_STRING types; ended by NULL.

#define TAPI_SNMP_SET_INTEGER(ta, sid, csap_id, name, value, err_stat, sub_id...)

Macro around tapi_snmp_set_integer()

Parameters:

ta

Test Agent name

sid

RCF session ID

csap_id

Identifier of an SNMP CSAP

name

Name of an SNMP object the value is to be set

value

Integer value

err_stat

SNMP error status

sub_id

Index of table field instance or 0 for scalar field

#define TAPI_SNMP_SET_OCTETSTRING(ta, sid, csap_id, name, value, length, err_stat, sub_id...)

Macro around tapi_snmp_set_octetstring()

Parameters:

ta

Test Agent name

sid

RCF session ID

csap_id

Identifier of an SNMP CSAP

name

Name of an SNMP object the value is to be set

value

Octet string value

length

Octet string length

err_stat

SNMP error status

sub_id

Index of table field instance or 0 for scalar field

#define TAPI_SNMP_SET_ROW(ta, sid, csap_id, err_stat, err_index, index, values...)

Macro around tapi_snmp_set_row()

Parameters:

ta

Test Agent name

sid

RCF session ID

csap_id

Identifier of an SNMP CSAP

err_stat

SNMP error status

err_index

Index of varbind where an error ocured

index

Index of table field instance or 0 for scalar field

values

sequence of “varbind groups”: label of MIB leaf and value, which is either integer or pair <char *, int>, for OCTET_STRING types; ended by NULL.

#define TAPI_SNMP_SET_STRING(ta, sid, csap_id, name, value, err_stat, sub_id...)

Macro for snmp set string type variable.

Parameters:

ta

Test Agent name

sid

RCF session ID

csap_id

Identifier of an SNMP CSAP

name

Name of an SNMP object the value is to be set

value

Display string value

err_stat

SNMP error status

sub_id

Index of table field instance or 0 for scalar field

#define TAPI_SNMP_SET_UNSIGNED(ta, sid, csap_id, name, value, err_stat, sub_id...)

Macro around tapi_snmp_set_unsigned()

Parameters:

ta

Test Agent name

sid

RCF session ID

csap_id

Identifier of an SNMP CSAP

name

Name of an SNMP object the value is to be set

value

Unsigned integer value

err_stat

SNMP error status

sub_id

Index of table field instance or 0 for scalar field

#define TAPI_SNMP_WALK(ta, sid, csap_id, name, userdata, callback)

Macro around tapi_snmp_walk.

Parameters:

ta

Test Agent name

sid

RCF session ID

csap_id

Identifier of an SNMP CSAP

name

Name of SNMP object

userdata

Userdata for walk cb

callback

Walk callback

#define TAPI_STORAGE_AUTH_INIT

On-stack tapi_storage_auth_params structure initializer.

#define TARPC_CHECK_RC(expr_)

Check return code and update the errno

#define TARPC_ENSURE_NOT_NULL(_inname)

Check that a RPC input parameter _inname is not NULL. Intended to be used before MAKE_CALL() for system functions that are declared nonnull. This macro should be called from inside TARPC_FUNC() or similar macro

#define TARPC_FIND_FUNC_RETURN(_libflags, _fname, _fp)

Try to find a function with tarpc_find_func(); in case of failure set RPC error with te_rpc_error_set() and return -1.

Parameters:

_libflags

Value of type tarpc_lib_flags telling how to resolve function name.

_fname

Function name.

_fp

Where to save function pointer.

#define TARPC_FUNC_COMMON(_safe, _static, _func, _copy_args, _actions)

Internal support macro to define RPC function content.

Parameters:

_safe

Whether to use type-safe or type-generic definitions

_static

Whether to use compile-time or run-time symbol resolution

_func

RPC function name

_copy_args

block of code that can be used for copying input argument values into output (this is usually done for IN/OUT arguments)

_actions

RPC function body

#define TARPC_FUNC_DYNAMIC_UNSAFE(_func, _copy_args, _actions)

Macro to define RPC wrapper.

This macro uses dynamic run-time symbol lookup and provides type-generic thunks to the underlying function:

Use this macro only if the prototype of the underlying function is not known at compile-time, in other cases use plain TARPC_FUNC()

Parameters:

_func

RPC function name

_copy_args

block of code that can be used for copying input argument values into output (this is usually done for IN/OUT arguments)

_actions

RPC function body

#define TARPC_FUNC_STANDALONE(_func, _copy_args, _actions)

Macro to define RPC wrapper. This is a special version for wrappers that do all the work themselves, having no underlying ordinary function. Therefore, func and its keen are not available in this macro.

It is only recommended to use this macro for short custom functions, where making a separate C functions would be too verbose (cf. inline C functions)

Parameters:

_func

RPC function name

_copy_args

block of code that can be used for copying input argument values into output (this is usually done for IN/OUT arguments)

_actions

RPC function body

#define TARPC_FUNC_STATIC_UNSAFE(_func, _copy_args, _actions)

Macro to define RPC wrapper.

It is analogous to TARPC_FUNC_STATIC_UNSAFE(), but it uses static (i.e. compile-time) symbol lookup, so the symbol must be declared at the point of use of this macro.

Deprecated Never ever use this macro. It is provided only to support static symbol resolution for compilers that lack __typeof keyword support.

Parameters:

_func

RPC function name

_copy_args

block of code that can be used for copying input argument values into output (this is usually done for IN/OUT arguments)

_actions

RPC function body

#define TARPC_LCG_LEN(_len)

Sufficient length for a buffer filled with tarpc_fill_buff_with_sequence_lcg(). It takes into account that sequence is generated in 4-byte units and there may be offset of up to 3 bytes from the start of the buffer.

Computed value may be a few bytes bigger than necessary but it seems better than to use more complex expression here.

Parameters:

_len

Length of sequence of bytes to generate.

#define TARPC_LCG_MAX_OFFSET

Maximum offset within a buffer filled with tarpc_fill_buff_with_sequence_lcg(). Buffer should be at least this number of bytes larger than the requested size.

This number is due to the fact that algorithm works with 4-byte words internally.

#define TARPC_SYSCALL_WRAPPER(_name, _rettype, _args, ...)

Macro to define syscall function wrapper content.

Parameters:

_name

Function name (bind, connect, etc.)

_rettype

Return type (according to man _name)

_args

Arguments list (according to man _name)

Values of arguments

#define TA_CHECKING

TA checking is in progress, to not forward new requests

#define TA_DEAD

TA is dead, but can be recovered

#define TA_DOWN

For internal RCF use

#define TA_ETHTOOL_LMODE_MASKS

Number of ethtool link mode bitmasks (supported, advertised and lp_advertised).

#define TA_ETHTOOL_LMODE_MASK_WORDS_MAX

Maximum number of 32bit words every link mode mask can occupy.

#define TA_FAKE

TA is started manually

#define TA_LOCAL

Test Agent runs on the same station with TEN, so it’s prohibited to reboot it if it is not proxy

#define TA_LOG_ARGS_MAX

Maximum arguments processed in this implementation. Implementation of the fast log has a lot of dependencies from this number.

#define TA_NO_HKEY_CHK

TA is copied using StrictHostKeyChecking=no SSH option

#define TA_OBJ_TYPE_BLACKHOLE

Name for object of type blackhole route

#define TA_OBJ_TYPE_IF_COALESCE

Name for the object type of network interface interrupt coalescing settings

#define TA_OBJ_TYPE_IF_LINK_SETS

Name for the object type of network interface link settings

#define TA_OBJ_TYPE_IF_PAUSE

Name for the object type of network interface pause parameters

#define TA_OBJ_TYPE_IF_PFLAGS

Name for the object type containing private flags for network interface.

#define TA_OBJ_TYPE_IF_RSSH

Name for the object type containing RSS hash key and indirection table.

#define TA_OBJ_TYPE_IF_RX_CLS_RULE

Name for the object type containing RX classification rule.

#define TA_OBJ_TYPE_IF_STRINGS

Name for the object type containing set of strings related to network interface (like list of names of Ethernet features).

#define TA_OBJ_TYPE_ROUTE

Name for object of type route

#define TA_OBJ_TYPE_SNIFFER

Name for object of type sniffer

#define TA_PROXY

Test Agent is proxy agent, so reboot should not lead to loss of the connectivity

#define TA_REBOOTABLE

Test Agent host may be rebooted

#define TA_REBOOTING

TA is performing cold reboot

#define TA_RT_INFO_FLG_GW

Gateway address is specified for the route

#define TA_RT_INFO_FLG_HOPLIMIT

hoplimit is specified for the route

#define TA_RT_INFO_FLG_IF

Interface name is specified for the route

#define TA_RT_INFO_FLG_IRTT

IRTT is specified for the route

#define TA_RT_INFO_FLG_METRIC

Metric is specified for the route

#define TA_RT_INFO_FLG_MTU

MTU is specified for the route

#define TA_RT_INFO_FLG_MULTIPATH

Route is multipath

#define TA_RT_INFO_FLG_SRC

Source address is specified for the route

#define TA_RT_INFO_FLG_TABLE

Table ID is specified for the route

#define TA_RT_INFO_FLG_TOS

TOS is specified for the route

#define TA_RT_INFO_FLG_WIN

Window size is specified for the route

#define TA_RT_NEXTHOP_FLG_GW

Flag which is set if gateway is specified for route nexthop.

#define TA_RT_NEXTHOP_FLG_OIF

Flag which is set if interface is specified for route nexthop.

#define TA_UNRECOVER

TA is dead, but can’t be recovered

#define TCPI_OPT_UNKNOWN

TA-independent names of TCP options displayed in tcp_info structure.

#define TCP_CA_STATE_MAPPING_LIST

The list of values allowed for parameter of type ‘rpc_tcp_ca_state’

#define TCP_HDR_CKSUM_DU_INDEX

The index of TCP header DU corresponding to ‘checksum’ PDU field

#define TCP_STATE_MAPPING_LIST

The list of values allowed for parameter of type ‘rpc_tcp_state’

#define TESTER_ASSEMBLE_PLAN

Gather the execution plan

#define TESTER_BREAK_SESSION

Break test session on Ctrl-C

#define TESTER_CFG_WALK_FORCE_EXCEPTION

Force walk to enter exception handler of every session

#define TESTER_CFG_WALK_SERVICE

Walk is in service routine

#define TESTER_CFG_WALK_SKIP_REPEAT

Run only repeat_start(), repeat_end() for what should be skipped due to incorrect arguments in iter_start().

#define TESTER_CMD_MONITOR_NAME_LEN

Maximum length of command monitor object name

#define TESTER_FAIL_ON_LEAK

Fail test scripts if valgrind detects a memory leak.

#define TESTER_FAKE

Fake run

#define TESTER_FORCE_RUN

Run tests regardless requested path

#define TESTER_GDB

Run scripts under GDB in interactive mode

#define TESTER_HANDDOWN_DEF

Default value of the executable handdown attribute

#define TESTER_INLOGUE

Is in prologue/epilogue

#define TESTER_INTERACTIVE

Interactive mode

#define TESTER_IPC

Type of IPC used by Tester IPC

#define TESTER_IPC_SERVER_ENV

Name of the environment variable with Tester IPC server name

#define TESTER_LOG_IGNORE_RUN_NAME

Force testing flow logging to ignore run item name

#define TESTER_LOG_REQS_LIST

Log list of known requirements to the log file

#define TESTER_NO_BUILD

Don’t build any Test Suites

#define TESTER_NO_CFG_TRACK

Don’t track configuration changes

#define TESTER_NO_CS

Don’t interact with Configurator

#define TESTER_NO_LOGUES

Prologues/epilogues are disabled

#define TESTER_NO_RUN

Don’t run any Test Suites

#define TESTER_NO_SIMULT

Disable simultaneousness

#define TESTER_NO_TRC

Don’t use TRC

#define TESTER_ONLY_REQ_LOGUES

Run only prologues/epilogues under which at least a single test is run according to requirements passed in command line. This may not work well in case when prologues can add their own requirements at run time via /local:/reqs:.

#define TESTER_OUT_EXP

Additional output of status together with TRC verdict

#define TESTER_OUT_TEST_PARAMS

Output test params to the console

#define TESTER_OUT_TIN

Additional output of TINs

#define TESTER_PRERUN

Flag which is set for preparatory walk over testing configuration tree

#define TESTER_QUIET_SKIP

Quiet skip of tests

#define TESTER_RUN

End of run path

#define TESTER_RUNPATH

Flag to be used on run path only

#define TESTER_RUN_UNTIL_VERDICT

If the flag is set, tester stops at the first test producing verdict matching the verdict provided in tester args.

#define TESTER_RUN_WHILE_PASSED

If any of these flags are set, tester stops at the first test producing result not matching them

#define TESTER_SHUTDOWN

Shutdown test scenario

#define TESTER_TIMEOUT_DEF

Default timeout is one day

#define TESTER_TRACK_CONF_DEF

Default value of the track_conf attribute

#define TESTER_TRACK_CONF_UNSPEC

This value means track_conf attribute is not specified

#define TESTER_VALGRIND

Run scripts under valgrind

#define TESTER_VERBOSE

The first level of verbosity: output of run path to stdout

#define TESTER_VERB_SKIP

Print ‘skipped’ in case of silent mode is on by default

#define TESTER_VVERB

The second level of verbosity: additional output of test IDs on run paths

#define TEST_ARG_ENV_PREFIX

Prefix for env variables which are connected with test arguments

#define TEST_ARG_VAR_PREFIX

Prefix for values of test arguments which in fact refer to variables

#define TEST_BEHAVIOUR(name_)

Get behavoiur switch

#define TEST_GET_ADDR_FAMILY(var_name_)

Get the value of parameter of type ‘rpc_socket_addr_family’

Parameters:

var_name_

Name of the variable used to get the value of “var_name_” parameter of type ‘rpc_socket_addr_family’ (OUT)

#define TEST_GET_CT_STIMULUS_PARAM(_var_name)

Get value of tapi_bpf_stim_type parameter.

Parameters:

_var_name

Test parameter name.

#define TEST_GET_DOMAIN(var_name_)

Get the value of parameter of type ‘rpc_socket_domain’

Parameters:

var_name_

Name of the variable used to get the value of “var_name_” parameter of type ‘rpc_socket_domain’ (OUT)

#define TEST_GET_ERRNO_PARAM(var_name_)

Get the value of parameter of type ‘rpc_sockopt’

Parameters:

var_name_

Name of the variable used to get the value of “var_name_” parameter of type ‘rpc_sockopt’ (OUT)

#define TEST_GET_IOCTL_REQ(var_name_)

Get the value of parameter of type ‘rpc_ioctl_code’

Parameters:

var_name_

Name of the variable used to get the value of “var_name_” parameter of type ‘rpc_ioctl_code’ (OUT)

#define TEST_GET_NDN_RTE_FLOW_ACTIONS(_var_name)

Get ndn_rte_flow_actions ASN.1 type test parameter.

Parameters:

_var_name

Variable whose name is the same as the name of parameter we get the value

#define TEST_GET_NDN_RTE_FLOW_ATTR(_var_name)

Get ndn_rte_flow_attr ASN.1 type test parameter.

Parameters:

_var_name

Variable whose name is the same as the name of parameter we get the value

#define TEST_GET_NDN_RTE_FLOW_PATTERN(_var_name)

Get ndn_rte_flow_pattern ASN.1 type test parameter.

Parameters:

_var_name

Variable whose name is the same as the name of parameter we get the value

#define TEST_GET_NDN_RTE_FLOW_RULE(_var_name)

Get ndn_rte_flow_rule ASN.1 type test parameter.

Parameters:

_var_name

Variable whose name is the same as the name of parameter we get the value

#define TEST_GET_POLL_EVT(var_name_)

Get the value of parameter of type ‘rpc_poll_event’

Parameters:

var_name_

Name of the variable used to get the value of “var_name_” parameter of type ‘rpc_poll_event’ (OUT)

#define TEST_GET_PROTOCOL(var_name_)

Get the value of parameter of type ‘rpc_socket_proto’

Parameters:

var_name_

Name of the variable used to get the value of “var_name_” parameter of type ‘rpc_socket_proto’ (OUT)

#define TEST_GET_SHUT_HOW(var_name_)

Get the value of parameter of type ‘rpc_shut_how’

Parameters:

var_name_

Name of the variable used to get the value of “var_name_” parameter of type ‘rpc_shut_how’ (OUT)

#define TEST_GET_SIGNUM(var_name_)

Get the value of parameter of type ‘rpc_signum’

Parameters:

var_name_

Name of the variable used to get the value of “var_name_” parameter of type ‘rpc_signum’ (OUT)

#define TEST_GET_SOCKLEVEL(var_name_)

Get the value of parameter of type ‘rpc_socklevel’

Parameters:

var_name_

Name of the variable used to get the value of “var_name_” parameter of type ‘rpc_socklevel’ (OUT)

#define TEST_GET_SOCKOPT(var_name_)

Get the value of parameter of type ‘rpc_sockopt’

Parameters:

var_name_

Name of the variable used to get the value of “var_name_” parameter of type ‘rpc_sockopt’ (OUT)

#define TEST_GET_SOCK_TYPE(var_name_)

Get the value of parameter of type ‘rpc_socket_type’

Parameters:

var_name_

Name of the variable used to get the value of “var_name_” parameter of type ‘rpc_socket_type’ (OUT)

#define TEST_GET_TCP_STATE(var_name_)

Get the value of parameter of type ‘rpc_tcpstate’

Parameters:

var_name_

Name of the variable used to get the value of “var_name_” parameter of type ‘rpc_tcpstate’ (OUT)

#define TEST_INHERITED_KEEPALIVE

Test flags

#define TE_AF_TARPC_SA

Special family for sockaddr structures filled in with tarpc_sa

#define TE_ALIGN(_v, _a)

Align up a value to a power of two

#define TE_ALIGN_MASK(_v, _m)

Align up a value to a power of two specified by mask

#define TE_ARRAY_LEN(array_)

Get the number of elements in an array reliably.

If array_ is not a real array but just a pointer to its first element, the macro raises a compile-time error (for compilers that support type dispatching).

Parameters:

array_

the array (not just a pointer)

Returns:

the number of elements in array_

#define TE_ARRAY_LEN_UNSAFE(array_)

Get the number of elements in an array.

This function does not barf when array_ is not a real array but just a pointer, and silently returns an incorrect value. Always use TE_ARRAY_LEN() instead.

Parameters:

array_

the array

Returns:

the number of elements in array_

#define TE_ASSERT_ARRAY(obj_)

Asserts that the argument is a true array, not a pointer.

The black art behind this macro is as follows:

  • the true type of an array is only compatible to itself;

  • but we cannot use TE_TYPE_ASSERT() directly with an array type due to an implicit lvalue-to-pointer conversion (see ISO/IEC 9899:2017 6.3.2.1.3);

  • however the said conversion does not happen under the address-of operator.

Thus we construct the expect type of the address of the array (note that it is not the same as the address of the fist element of the array) with the help of TE_ARRAY_LEN_UNSAFE() and then we assert it against the address of obj_. This requires that obj_ always be an lvalue, but since a true array is always an lvalue, it is not really a limitation.

Parameters:

obj_

an array

Returns:

obj_ unchanged

#define TE_BITSIZE(_typeobj)

The size of _typeobj in bits.

Parameters:

_typeobj

type or object

#define TE_BPF_CHECK_RC(_expr)

Check whether packet processing function succeeded, return error (-1) if it did not.

Parameters:

_expr

Expression to check.

#define TE_BPF_MAP_DEF(_name, _type, _max_entries, _key_type, _value_type)

Define BPF map using either legacy bpf_map_def definition or a new BTF-defined one. The former one is going to be dropped in libbpf, however the new one may be not supported properly on older distributions. For example, on Debian 10 with clang 7.0.1 compiled BPF program with new map definitions cannot be loaded with libbpf which complains that “BTF is required, but is missing or corrupted”.

Parameters:

_name

Map name

_type

Map type (see bpf_map_type enum in linux/bpf.h)

_max_entries

Maximum number of entries

_key_type

Type of key

_value_type

Type of value

#define TE_CAST_TYPEOF_PTR(obj_, src_)

Cast src_ to the type of pointer to obj_.

If typeof is not supported, it falls back to a generic void *.

Parameters:

obj_

Object of target type.

src_

Source pointer.

#define TE_CFG_TRC_TAGS_FMT

Macro for working with a branch of the configurator object tree for TRC tags.

#define TE_COMM_NET_ENGINE_KEEPCNT

Number of TCP keep-alive probes before failure

#define TE_COMM_NET_ENGINE_KEEPIDLE

TCP interval between successful keep-alive probes

#define TE_COMM_NET_ENGINE_KEEPINTVL

TCP interval between failed keep-alive probes

#define TE_COMPILE_TIME_ASSERT(x)

The same as TE_COMPILE_TIME_ASSERT_EXPR(), but suitable as a standalone statement without compiler warnings

#define TE_COMPILE_TIME_ASSERT_EXPR(x)

Build-time analog of an assert().

Syntactically this is a boolean expression that always return true, so it can be used in conditional expressions. This is important because a comma operator always makes an expression non-constant, so e.g. to insert a check into a static variable initializer, one would need to do smth like: static int x = TE_COMPILE_TIME_ASSERT_EXPR(test) ? value : 0

#define TE_CONF_OBJ_INIT(_base_type, _methods_value, _field, _flag_value, _options_value)

Initialize a structure fields

Parameters:

_base_type

Type of basic structure

_methods_value

Object methods

_field

Field name containing a value

_flag_value

Flag corresponding to a specified _field

_options_value

User options

#define TE_CONST_PTR_CAST(type_, ptr_)

Cast away constness from a pointer.

The rationale for the macro is twofold:

  • the only legal ISO C way to cast away constness is through an intermediate cast to uintptr_t and some compilers in some modes do enforce this;

  • the macro tries to be type-safe and assert at compile time that the object type is indeed compatible.

Casting away constness may still be dangerous, use with caution.

Parameters:

type_

The expected type of the pointer ptr_.

ptr_

Object pointer.

Returns:

ptr_ casted to a pointer to non-const type_.

#define TE_COPYRIGHT

Test Environment copyright to be used in applications output

#define TE_DEPRECATED

Mark an entity as deprecated. A reference to such entity would trigger a warning.

In most cases deprecated entities should instead have \xrefitem deprecated 11.

#define TE_ETHTOOL_UNKNOWN

Command number not used by Ethtool

#define TE_EXIT_ERROR

Exit with big problems

#define TE_EXIT_NOT_FOUND

Script to be run not found

#define TE_EXIT_SIGINT

Exit from application because of caught SIGINT signal

#define TE_EXIT_SIGUSR2

Exit from application because of caught SIGUSR2 signal

#define TE_EXIT_SKIP

Script tells that the test case does not make sense (can’t be run) with passed parameters.

#define TE_EXPAND_MAX_POS_ARGS

Maximum number of positional arguments

#define TE_EXTRACT_BITS(v_, start_, len_)

Extract len_ bits from v_ starting from start_.

Parameters:

v_

integral value

start_

starting bit

len_

field length

Returns:

extracted bits

#define TE_FATAL_ERROR(_fmt, ...)

Log an error and then immediately terminate the program.

A log message may be lost in this case. A future version may use a more sophisticated mechanism of exception handling.

Parameters:

_fmt

format string

arguments as specified by _fmt

#define TE_FUNC_CAST(_func_type, _func_ptr)

This macro can be used to suppress -Wcast-function-type warning when casting function pointer to incompatible function pointer type. Usually it is not a good idea to do this, use it only if you are sure it is safe and there is no better alternative.

Parameters:

_func_type

Desired function pointer type.

_func_ptr

Function pointer.

#define TE_IOCTL_AF_ETHER2LOCAL(_family)

Replace address family for Ethernet address to process it properly in ioctl calls

#define TE_IOCTL_AF_LOCAL2ETHER(_family)

Replace address family for Ethernet address to process it properly in RPC functions

#define TE_IOCTL_UNKNOWN

ioctl() request which is not known to system.

#define TE_IPC_AF_UNIX

Should AF_UNIX be used (AF_INET is used otherwise)

#define TE_IPV6_MAX_EXT_HEADERS

Maximum number of IPv6 extension headers. There are 4 known extension headers which may be encountered in TCP or UDP packets, one of them (Destination Options) can appear twice.

#define TE_IP_RULE_FLAG(_flag)

Macro to make field name shorter

#define TE_IS_ZERO_FUNC(_n)

Macro defining a function which checks whether a given sequence of bytes in memory is all zeroes.

Resulting function returns 0 if there is no match and 1 if there is a match.

Parameters:

_n

Number of bytes to check.

#define TE_LGR_ENTITY

Default entity name

#define TE_LGR_USER

Logger user

#define TE_LGR_USER

Default entity name

#define TE_LIKE_PRINTF(fmtarg_, va_)

Declare that a function is similiar to printf, taking a printf-style format string in its argument fmtarg_, and variable arguments starting at va_.

Parameters:

fmtarg_

the number of printf-style format string argument

va_

the number of the first variadic argument

#define TE_LIKE_VPRINTF(fmtarg_)

Declare that a function is similiar to vprintf, taking a printf-style format string in its argument fmtarg_.

Parameters:

fmtarg_

the number of printf-style format string argument

#define TE_LL_CONTROL

Control message (this is a flag which can come together with ERROR/WARN/RING).

#define TE_LL_ERROR

Any abnormal/unexpected situation (ERROR macro)

#define TE_LL_INFO

Important events required for test debugging (INFO macro)

#define TE_LL_MI

Events of machine interface data received

#define TE_LL_PACKET

Events of network packet received (PACKET macro)

#define TE_LL_RING

Very important event in TE and tests (RING macro)

#define TE_LL_VERB

Verbose logging of entity internals (VERB macro)

#define TE_LL_WARN

It’s not error situation, but may be an error (WARN macro)

#define TE_LOG_FIELD_MAX

Actual maximum field length

#define TE_LOG_ID_UNDEFINED

Log ID value that should be used when logging is being done from Engine Applications and Test Agents. In case of tests Tester passes “test ID” value as a command line argument, which should be used as “Log ID” in all log messages.

#define TE_LOG_LEVEL

Default log level. Zero means printing only messages which cannot be ignored: ERROR/WARN/RING/CONTROL.

#define TE_LOG_LEVELS_MANDATORY

Log levels which are always enabled (whatever TE_LOG_LEVEL is defined to).

#define TE_LOG_MSG_COMMON_HDR_SZ

Size of TE raw log message fields which do not use NFL.

In the case of TA it is necessary to add sizeof(te_log_seqno).

#define TE_LOG_RAW_EOR_LEN

Length of the End-Of-Record is equal to maximum supported by NFL

#define TE_LOG_VERSION

Current TE log version

#define TE_MAX_IP_ADDR_LEN

Maximum size of IP address (is equal to IPv6 address size)

#define TE_MIN_ETH_TYPE

Minimum value of Ethertype field

#define TE_MS2NS(_ms)

Convert milliseconds to nanoseconds.

#define TE_MS2SEC(_ms)

Convert milliseconds to seconds.

#define TE_MS2US(_ms)

Convert milliseconds to microseconds.

#define TE_NS2MS(_ns)

Convert nanoseconds to milliseconds.

#define TE_NS2SEC(_ns)

Convert nanoseconds to seconds.

#define TE_NS2TS(_ns, _p_tv)

Convert nanoseconds to struct timespec.

#define TE_NS2US(_ns)

Convert nanoseconds to microseconds.

#define TE_OFFSET_OF(_s, _f)

Offset of the field in structure.

Deprecated Use standard C offsetof

#define TE_OPTIONAL_DOUBLE_UNDEF

Undefined value for te_optional_double_t.

#define TE_OPTIONAL_DOUBLE_VAL(_x)

Defined value for te_optional_double_t.

Parameters:

_x

Value to set.

#define TE_OPTIONAL_UINTMAX_UNDEF

Undefined value for te_optional_uintmax_t.

#define TE_OPTIONAL_UINTMAX_VAL(_x)

Defined value for te_optional_uintmax_t.

Parameters:

_x

Value to set.

#define TE_OPTIONAL_UINT_UNDEF

Undefined value for te_optional_uint_t.

#define TE_OPTIONAL_UINT_VAL(_x)

Defined value for te_optional_uint_t.

Parameters:

_x

Value to set.

#define TE_OS_RC(_mod_id, _error)

Create error code from OS errno and module identifier

#define TE_PF_ETHER

Non-standard address family for Ethernet addresses

#define TE_PRINTF_SIZE_T

printf()-like length modified for 8-bit integers printf()-like length modified for 16-bit integers printf()-like length modified for 32-bit integers printf()-like length modified for 64-bit integers printf()-like length modified for (s)size_t integers

#define TE_PRINTF_SOCKLEN_T

printf()-like length modified for socklen_t integers

#define TE_PRINTF_TESTER_FLAGS

printf()-like length modifier for tester_flags

#define TE_PRINTF_TS_FMT

Format string for printing out struct timespec or tarpc_timespec value.

It should be used with TE_PRINTF_TS_VAL().

#define TE_PRINTF_TS_VAL(_ts)

Arguments for TE_PRINTF_TS_FMT.

Parameters:

_ts

tarpc_timespec or struct timespec value.

#define TE_PROTO_OVERHEAD

Maximum number of symbols necessary for Test Protocol overhead: session identifier, command and attachment information.

#define TE_PROTO_SHUTDOWN

TE Protocol literals

#define TE_RC(_mod_id, _error)

Compose base error code and module identifier

#define TE_RC_GET_ERROR(_rc)

Get error number without module identifier

#define TE_RC_GET_MODULE(_rc)

Get identifier of the module generated an error

#define TE_RC_MODULE_SHIFT

Shift of the module ID in ‘int’ (at least 32 bit) error code

#define TE_RC_UPDATE(_rc, _rc_new)

Update main return code, if it’s OK, otherwise keep it.

Parameters:

_rc

main return code to be updated

_rc_new

new return code to be assigned to main, if main is OK

Returns:

Updated return code.

#define TE_RC_UPSTREAM(_mod_id, _rc)

If _rc is not zero, replace its module identifier with _mod_id. Its purpose is to pass errors from underlying utility modules up the stack.

Parameters:

_rc

Downstream return code

_mod_id

Current module id

Returns:

Updated return code

#define TE_REQUIRE_SENTINEL

Mandate that variadic arguments be terminated with a NULL pointer.

See https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-sentinel-function-attribute for details.

#define TE_RGT_MI_GRAPH_AXIS_AUTO_SEQNO

Sequence number is specified on a graph axis

#define TE_RGT_MI_MAX_ERR_LEN

Maximum length of error description from JSON parser

#define TE_RGT_MI_MEAS_VALUE_INIT

Initializer for te_rgt_mi_meas_value structure

#define TE_RPC_CONVERT_NEGATIVE_ERR(_retval)

This macro can be used for functions which on failure return -errno instead of setting errno and returning -1. It converts errno and passes it to RPC caller as usual, replacing original return value with -1. It allows to check such RPC calls in tests like normal ones.

Parameters:

_retval

Return value of the RPC call. Changed to -1 if negative.

#define TE_SEC2MS(_sec)

Convert seconds to milliseconds.

#define TE_SEC2NS(_sec)

Convert seconds to nanoseconds.

#define TE_SEC2US(_sec)

Convert seconds to microseconds.

#define TE_SIZEOF_FIELD(type, field)

Size of a field in a structure type.

A complement to a C standard offsetof. One usecase for such a macro is to define compile-time assertions.

Parameters:

type

Struct or union type name

field

Field name

#define TE_TEST_ID_INIT

Initial test ID (assigned to root package)

#define TE_TEST_ID_ROOT_PROLOGUE

Test ID of the root prologue if the prologue exists.

Root package gets the initial ID. The next one is as typically root prologue.

#define TE_TEST_OBJECTIVE_ID

A string used to identify per-iteration objectives, generated by test control messages

#define TE_TIN_INVALID

Test identification number for prologues, epilogues, sessions, packages.

#define TE_TIN_INVALID

Test identification number for prologues, epilogues, sessions, packages.

#define TE_TMP_BKP_SUFFIX

Suffix for service backup files

#define TE_TMP_FILE_SUFFIX

Suffix for temporary files

#define TE_TMP_PATH

Directory where all TE temporary files are located

#define TE_TYPE_ALTERNATIVE(obj_, type1_, expr1_, type2_, expr2_)

Choose one of expressions depending on the type of obj_.

If the type of obj_ is compatible with type1_, expr1_ is returned, otherwise if the type is compatible with type2_, expr2_ is returned, otherwise a compilation error is raised.

type1_ and type2_ must not be compatible with each other.

obj_ is never evaluated, only its static type is considered and expr2_ is not evaluated if expr1_ is chosen and vice versa.

If the compiler does not support type dispatching, expr1_ is tentatively returned.

Parameters:

obj_

selector object

type1_

first type

expr1_

first alternative

type2_

second type

expr2_

second alternative

Returns:

expr1_ or expr2_ depending on the type of obj_.

#define TE_US2MS(_us)

Convert microseconds to milliseconds.

#define TE_US2NS(_us)

Convert microseconds to nanoseconds.

#define TE_US2SEC(_us)

Convert microseconds to seconds.

#define TE_US2TV(_us, _p_tv)

Convert microseconds to struct timeval.

#define TE_USER_PREFIX

Useful for debugging Prefix for tester user name

#define TE_USER_STEP

Reserved log user for TEST_STEP() macro

#define TE_USER_STEP_NEXT

Reserved log user for TEST_STEP_NEXT() macro

#define TE_USER_STEP_POP

Reserved log user for TEST_STEP_POP() macro

#define TE_USER_STEP_PUSH

Reserved log user for TEST_STEP_PUSH() macro

#define TE_USER_STEP_RESET

Reserved log user for TEST_STEP_RESET() macro

#define TE_USER_SUBSTEP

Reserved log user for TEST_SUBSTEP() macro

#define TE_VA_HEAD(first, ...)

Helper to get the first (mandatory) argument of the variadic macro.

For example:

#define MY_VA_MACRO(...) \
    do {                                                 \
        if (TE_VA_HEAD(__VA_ARGS__)[0] != '\0')          \
             // do something format string is not empty  \
    while (0)
#define TE_VA_TAIL(first, ...)

Helper to get all arguments of the variadic macro except the first one.

If there is no arguments except the first one, nothing is substituted.

#define TE_XDP_EQ_FUNC(_n)

Macro defining a function which checks whether a given sequence of bytes is the same in a packet and in a memory array.

Resulting function returns 0 if there is no match (or not enough bytes left in a packet) and 1 if there is a match.

Parameters:

_n

Number of bytes to compare.

#define TE_XDP_EQ_OR_ZERO_FUNC(_n)

Macro defining a function which checks that either a given sequence of bytes is the same in a packet and in a memory array, or memory array contains only zeroes.

Resulting function returns 0 if there is no match and 1 if there is a match.

Parameters:

_n

Number of bytes to compare.

#define TE_XDP_FRAME_INIT(_ctx)

Initializer for te_xdp_frame.

Parameters:

_ctx

Pointer to struct xdp_md.

#define TIMESTAMP_CMP(ts1, ts2)

Compares two timestamp values and returns the following values depending on ts1 and ts2 values: if ts1 < ts2 it returns -1 if ts1 > ts2 it returns 1 if ts1 = ts2 it returns 0

#define TIMESTAMP_SUB(res_ts, ts2, ts1)

Performs the following operation: res_ts = ts2 - ts1;

#define TMPL_NB_IP_PDUS_MAX

Maximum number of IPv4/IPv6 PDUs allowed in template

#define TRC_DIFF_IDS

Number of IDs supported by TRC diff

#define TRC_DIFF_INHERIT

Result should be inherited

#define TRC_DIFF_INHERITED

Result is inherited

#define TRC_REPORT_ITER_ID_LEN

Maximum length of test iteration ID

#define TRC_STATS_NOT_RUN(s)

Number of test iterations which have not been run in fact

#define TRC_STATS_RUN(s)

Number of run test iterations

#define TRC_STATS_RUN_UNEXP(s)

Number of test iterations with obtained unexpected results

#define TRC_STATS_SPEC(s)

Number of test iterations with specified result

#define TRC_STATS_UNEXP(s)

Number of test iterations with unexpected results (including not run)

#define TRC_UPDATE_RTYPES

All rule type flags

#define TRUE

Deprecated Use ISO C true.

#define TSA_BACKLOG_DEF

Default listen backlog value.

#define TV_RADIX

Amount of microseconds in one second

#define UDP_HDR_CKSUM_DU_INDEX

The index of UDP header DU corresponding to ‘checksum’ PDU field

#define UDP_HDR_P_LEN_DU_INDEX

The index of UDP header DU corresponding to ‘length’ PDU field

#define UNIX_PATH_MAX

There is no common place with UNIX_PATH_MAX define

#define UNIX_SERVICE_MAX

Maximum number of services the implementation supports

#define UNUSED(_x)

Marks unused argument of the function in order to avoid compilation warning.

Parameters:

_x

unused argument

#define UPNP_DEBUG

UPnP debug level. The higher the more verbal.

#define USAGE_ERROR_JUMP(_opt_con, _fmt...)

Print error message and go to error section in a function parsing command line options.

Parameters:

_opt_con

poptContext used when parsing options.

_fmt

Error message format.

Error message arguments.

#define WAIT_START(msec_start)

Wait time specified in the input argument.

#define WORD_32BIT

The number of bits in a 32-bit word

#define WORD_4BYTE

The number of bytes in a 32-bit word

#define XDP_BIND_FLAGS_MAPPING_LIST

List of XDP socket bind flags for the purpose of converting flags to string.

#define XINETD_ETC_DIR

Directory where xinetd service configuration files are located

#define XML2MULTI_COMMON_OPTS

Common options for rgt-xml2html-multi and rgt-xml2json

#define XML2MULTI_HTML_SPECIFIC_OPTS

Options specific to rgt-xml2html-multi

#define XSK_LIBXDP_FLAGS_MAPPING_LIST

List of values in rpc_xsk_libxdp_flags for the purpose of converting flags to string.

#define __log_sec

Macros for fast access to structure fields

#define ifTable_ifIndex

First octet of object identifier

#define rcf_pch_mem_alloc(_mem)

Wrapper for RCF_PCH_MEM_INDEX_ALLOC() with generic ns

#define rcf_pch_mem_free(_id)

Wrapper for RCF_PCH_MEM_INDEX_FREE() with generic ns

#define rcf_pch_mem_free_mem(_mem)

Wrapper for RCF_PCH_MEM_INDEX_FREE_MEM() with generic ns

#define rcf_pch_mem_get(_id)

Wrapper for RCF_PCH_MEM_INDEX_MEM_TO_PTR() with generic ns

#define rcf_pch_mem_get_id(_mem)

Wrapper for RCF_PCH_MEM_INDEX_PTR_TO_MEM() with generic ns

#define tad_tv_zero

Zero timeval

#define xmlxdr_enum

From xml data representation point of view ‘enum’ type is the ‘int’ one