Struct:ttIpsecSelector
#include trsecapi.h typedef struct tsIpsecSelector { #ifdef TM_USE_STRONG_ESL ttUser32Bit selPortMask; #endif /* TM_USE_STRONG_ESL */ /* a pair of IP */ struct sockaddr_storage selLocIp1; struct sockaddr_storage selRemtIp1; /* if selector is a range, we need another pair */ struct sockaddr_storage selLocIp2; struct sockaddr_storage selRemtIp2; /* port number is already there */ ttUser16Bit selIpFlags; ttUser8Bit selProtocol; ttUser8Bit selPadding; } ttIpsecSelector;
Structure Description
ttIpsecSelectorInString is for the user's reference, so the IP information is the string format IPv4 or IPv6 address.
ttIpsecSelector is designed for internal use, thus, all the IP addresses are in sockaddr_storage format, which can store either IPv4 or IPv6 socket address. And for internal use, we use an 8 bit value to indicate a protocol, resulting in an 8-bit padding which we do not use.
Members
- selPortMask
- When TM_USE_STRONG_ESL is defined, this parameter allows the user to specify a phys port to match on. Please see tfInterfaceGetPhysPort() and tfInterfaceSetPhysPort() for more information.
- selLocIp1
- If local side is an IP host address, we don't care the value in selLocIp2. If local IP selector is a subnet, then selLocIp1 indicates the subnet address and selLocIp2 indicates the mask. If local IP selector is an IP range, then selLocIp1 is minimum end and selLocIp2 is the maximum end.
- selLocIp2
- See selLocIp1.
- selRemtIp1
- With selRemtIp2, selRemtIp1 specifies the IP information for the remote side.
- selRemtIp2
- See selRemtIp1.
- selIpFlags
- See selstrIpFlags in ttIpsecSelectorInString. Anyway, it can't be any of the DNS flags, and prefix length, if any, will be translated to mask address.
- selLocPort
- Local side port number, in network-byte order. Could be TM_SELECTOR_WILD_PORT (0) to indicate this field is a wild value.
- selRemtPort
- Remote side port number, in network-byte order. Could be TM_SELECTOR_WILD_PORT (0) to indicate this field is a wild value.
- selProtocol
- Same as selProtocol in ttIpsecSelectorInString.
- selPadding
- For alignment usage, not used.