Helper class that implements Classless Inter-Domain Routing (CIDR) IP address filtering.
More...
#include <CidrAddress.h>
|
uint32_t | m_ip = 0 |
|
uint32_t | m_mask = 0xFFFFFFFF |
|
Helper class that implements Classless Inter-Domain Routing (CIDR) IP address filtering.
◆ CidrAddress()
AzNetworking::CidrAddress::CidrAddress |
( |
const AZStd::string & |
cidrAddress | ) |
|
Construct from an input string.
- Parameters
-
cidrAddress | the input string to parse as a CIDR address (dotted quad/mask, ie 127.0.0.1/32) |
◆ GetIp()
uint32_t AzNetworking::CidrAddress::GetIp |
( |
| ) |
const |
Returns the IP of this CIDR address in host byte order.
- Returns
- the IP of this CIDR address in host byte order
◆ GetMask()
uint32_t AzNetworking::CidrAddress::GetMask |
( |
| ) |
const |
Returns the mask of this CIDR address.
- Returns
- the mask of this CIDR address
◆ IsMatch() [1/2]
bool AzNetworking::CidrAddress::IsMatch |
( |
const IpAddress & |
address | ) |
const |
Check to see if a AzNetworking uint IP matches this CIDR address instance.
- Parameters
-
- Returns
- boolean true if the address matches, false if it fails
◆ IsMatch() [2/2]
bool AzNetworking::CidrAddress::IsMatch |
( |
uint32_t |
address | ) |
const |
Check to see if a AzNetworking uint IP matches this CIDR address instance.
- Parameters
-
address | input IPv4 address as a uint32_t ** must be in host byte order ** |
- Returns
- boolean true if the address matches, false if it fails
◆ ParseAddress()
bool AzNetworking::CidrAddress::ParseAddress |
( |
const AZStd::string & |
cidrAddress | ) |
|
Parse the address from the provided string.
- Parameters
-
cidrAddress | the input string to parse as a CIDR address (dotted quad/mask, ie 127.0.0.1/32) |
- Returns
- boolean true if the input was successfully parsed, false on error
The documentation for this class was generated from the following file:
- Code/Framework/AzNetworking/AzNetworking/Utilities/CidrAddress.h