| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |

Go to the source code of this file.
Functions | |
| std::string | mac_to_string (const rte_ether_addr &mac_addr) |
| Converts a MAC/ethernet address to a C++ string. More... | |
| bool | is_empty_mac_addr (const rte_ether_addr &addr) |
| Tests whether a MAC address has been set (is non-zero) More... | |
| std::string | ipv4_to_string (rte_be32_t ipv4_addr) |
| Converts an IPv4 address to a C++ string. More... | |
| std::string | ipv6_to_string (const uint32_t ipv6_addr[]) |
| Converts an IPv6 address to a C++ string. More... | |
| std::string | ip_to_string (const struct doca_flow_ip_addr &ip_addr) |
| Converts a DOCA Flow IP address struct to a C++ string. More... | |
| bool | is_ip_equal (struct doca_flow_ip_addr *ip_a, struct doca_flow_ip_addr *ip_b) |
| Compare DOCA Flow IP address struct, return true if addresses are equal. More... | |
| doca_error_t | parse_ip_addr (const std::string &ip_str, doca_flow_l3_type enforce_l3_type, struct doca_flow_ip_addr *ip_addr) |
| Parse an IP address string into a DOCA Flow IP address struct. More... | |
| void | copy_ip_addr (const struct doca_flow_ip_addr &src, struct doca_flow_ip_addr &dst) |
| Copy an IP address struct. More... | |
| psp_gw_peer * | lookup_vip_pair (std::vector< psp_gw_peer > *peers, ip_pair &vip_pair) |
| Search for a peer in a vector of peers that holds the same IP pair. More... | |
| void copy_ip_addr | ( | const struct doca_flow_ip_addr & | src, |
| struct doca_flow_ip_addr & | dst | ||
| ) |
Copy an IP address struct.
@src [in]: the source IP address @dst [out]: the destination IP address
Definition at line 110 of file psp_gw_utils.cpp.
| std::string ip_to_string | ( | const struct doca_flow_ip_addr & | ip_addr | ) |
Converts a DOCA Flow IP address struct to a C++ string.
Definition at line 63 of file psp_gw_utils.cpp.
| std::string ipv4_to_string | ( | rte_be32_t | ipv4_addr | ) |
Converts an IPv4 address to a C++ string.
Definition at line 47 of file psp_gw_utils.cpp.
| std::string ipv6_to_string | ( | const uint32_t | ipv6_addr[] | ) |
Converts an IPv6 address to a C++ string.
Definition at line 55 of file psp_gw_utils.cpp.
| bool is_empty_mac_addr | ( | const rte_ether_addr & | addr | ) |
Tests whether a MAC address has been set (is non-zero)
@addr [in]: the mac addr to test
Definition at line 41 of file psp_gw_utils.cpp.
| bool is_ip_equal | ( | struct doca_flow_ip_addr * | ip_a, |
| struct doca_flow_ip_addr * | ip_b | ||
| ) |
Compare DOCA Flow IP address struct, return true if addresses are equal.
@ip_a [in]: first IP address @ip_b [in]: second IP address
Definition at line 72 of file psp_gw_utils.cpp.
| psp_gw_peer* lookup_vip_pair | ( | std::vector< psp_gw_peer > * | peers, |
| ip_pair & | vip_pair | ||
| ) |
Search for a peer in a vector of peers that holds the same IP pair.
@peers [in]: vector of peers to search @vip_pair [in]: IP pair to search for
Definition at line 122 of file psp_gw_utils.cpp.
| std::string mac_to_string | ( | const rte_ether_addr & | mac_addr | ) |
Converts a MAC/ethernet address to a C++ string.
Definition at line 33 of file psp_gw_utils.cpp.
| doca_error_t parse_ip_addr | ( | const std::string & | ip_str, |
| doca_flow_l3_type | enforce_l3_type, | ||
| struct doca_flow_ip_addr * | ip_addr | ||
| ) |
Parse an IP address string into a DOCA Flow IP address struct.
@ip_str [in]: the IP address string to parse @enforce_l3_type [in]: the L3 type to enforce @ip_addr [out]: the parsed IP address
Definition at line 85 of file psp_gw_utils.cpp.