Common functions for IPv4 and IPv6
Overview
Declaration of common functions for IPv4/IPv6 CSAP. More…
// typedefs typedef struct tapi_ip_frag_spec tapi_ip_frag_spec; // structs struct tapi_ip_frag_spec; // global functions 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);
Detailed Documentation
Declaration of common functions for IPv4/IPv6 CSAP.
Copyright (C) 2019-2022 OKTET Labs Ltd. All rights reserved.
Typedefs
typedef struct tapi_ip_frag_spec tapi_ip_frag_spec
Specification of IPv4 or IPv6 fragment
Global Functions
void tapi_ip_frag_specs_init(tapi_ip_frag_spec* frags, unsigned int num)
Initialize array of IP fragment specifications.
Parameters:
frags |
Pointer to array. |
num |
Number of fragment specifications. |
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)
Create CSAP for IPv4 or IPv6 traffic.
Parameters:
ta_name |
Test Agent name. |
sid |
RCF SID. |
eth_dev |
Name of Ethernet interface. |
receive_mode |
Receive mode for Ethernet Layer on the interface. |
loc_mac_addr |
Local MAC address (or |
rem_mac_addr |
Remote MAC address (or |
af |
Address family ( |
loc_ip_addr |
Pointer to local IPv4 or IPv6 address (or |
rem_ip_addr |
Pointer to remote IPv4 or IPv6 address (or |
proto |
IP protocol or negative number. |
ip_csap |
Where to save pointer to created CSAP. |
Returns:
Status code.
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)
Create CSAP for TCP or UDP IPv4 or IPv6 traffic.
Parameters:
ta_name |
Test Agent name. |
sid |
RCF SID. |
eth_dev |
Name of Ethernet interface. |
receive_mode |
Receive mode for Ethernet Layer on the interface. |
loc_mac_addr |
Local MAC address (or |
rem_mac_addr |
Remote MAC address (or |
af |
Address family ( |
ip_proto |
|
loc_ip_addr |
Pointer to local IPv4 or IPv6 address (or |
rem_ip_addr |
Pointer to remote IPv4 or IPv6 address (or |
loc_port |
Local port number in network byte order or |
rem_port |
Remote port number in network byte order or |
csap |
Where to save pointer to created CSAP. |
Returns:
Status code.
te_errno tapi_ip_pdu_tmpl_fragments(asn_value** tmpl, asn_value** pdu, bool ipv4, tapi_ip_frag_spec* fragments, unsigned int num_frags)
Add fragments specification to IPv4 or IPv6 PDU.
Parameters:
tmpl |
|
pdu |
If |
ipv4 |
If |
fragments |
Array with IP fragments specifications |
num_frags |
Number of IP fragments |
Returns:
Status code.