#include <trafficselector.h>
Inheritance diagram for openikev2::TrafficSelector:

Public Types | |
| enum | TS_TYPE { TS_IPV4_ADDR_RANGE = 7, TS_IPV6_ADDR_RANGE = 8 } |
| Traffic selector types. More... | |
Public Member Functions | |
| TrafficSelector (TS_TYPE ts_type, auto_ptr< ByteArray > start_addr, auto_ptr< ByteArray > end_addr, uint16_t start_port, uint16_t end_port, uint8_t ip_protocol_id) | |
| Creates a new Traffic Selector (for all the IP protocols). | |
| TrafficSelector (TS_TYPE ts_type, auto_ptr< ByteArray > start_addr, auto_ptr< ByteArray > end_addr, uint8_t start_icmp_type, uint8_t start_icmp_code, uint8_t end_icmp_type, uint8_t end_icmp_code, uint8_t ip_protocol_id) | |
| Creates a new Traffic Selector (for ICMP/ICMPv6 protocols). | |
| TrafficSelector (IpAddress &address, uint8_t prefixlen, uint16_t port, uint8_t ip_protocol_id) | |
| Creates a new Traffic Selector, based on an IP subnet. | |
| TrafficSelector (IpAddress &address, uint8_t prefixlen, uint8_t icmp_type, uint8_t icmp_code, uint8_t ip_protocol_id) | |
| Creates a new Traffic Selector, based on an IP subnet (for ICMP/ICMPv6 protocols). | |
| TrafficSelector (const TrafficSelector &other) | |
| Creates a new TrafficSelector cloning another one. | |
| TrafficSelector (ByteBuffer &byte_buffer) | |
| Creates a new TrafficSelector based on its binary representation. | |
| virtual bool | operator>= (const TrafficSelector &other) const |
| Indicates if this TrafficSelector contains (is a superset) of other one. | |
| virtual bool | operator<= (const TrafficSelector &other) const |
| Indicates if this TrafficSelector is contained (is a subset) of other one. | |
| virtual bool | operator== (const TrafficSelector &other) const |
| Compares this TrafficSelector with another one. | |
| virtual uint16_t | getStartPort () const |
| Gets the start port attribute value. | |
| virtual uint16_t | getEndPort () const |
| Gets the end port attribute value. | |
| virtual uint8_t | getStartIcmpType () const |
| Gets the start ICMP type value. | |
| virtual uint8_t | getStartIcmpCode () const |
| Gets the start ICMP code value. | |
| virtual uint8_t | getEndIcmpType () const |
| Gets the end ICMP type value. | |
| virtual uint8_t | getEndIcmpCode () const |
| Gets the end ICMP code value. | |
| virtual auto_ptr< TrafficSelector > | clone () const |
| Clones a TrafficSelector. | |
| virtual void | getBinaryRepresentation (ByteBuffer &byte_buffer) const |
| virtual string | toStringTab (uint8_t tabs) const |
| Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE. | |
Static Public Member Functions | |
| static string | TS_TYPE_STR (TS_TYPE ts_type) |
| Translate from TS_type IDs to strings. | |
| static auto_ptr< TrafficSelector > | intersection (const TrafficSelector &ts1, const TrafficSelector &ts2) |
| Returns the result of intersec this TrafficSelector with other. | |
Public Attributes | |
| TS_TYPE | ts_type |
| Traffic selector type. | |
| auto_ptr< ByteArray > | start_addr |
| Smallest address included in this TS. | |
| auto_ptr< ByteArray > | end_addr |
| Largest address included in this TS. | |
| uint16_t | start_port |
| Smallest port number allowed by this TS. | |
| uint16_t | end_port |
| Largest port number allowed by this TS. | |
| uint8_t | ip_protocol_id |
| IP protocol ID (e.g. | |
Protected Member Functions | |
| void | construct (TS_TYPE ts_type, auto_ptr< ByteArray > start_addr, auto_ptr< ByteArray > end_addr, uint16_t start_port, uint16_t end_port, uint8_t ip_protocol_id) |
| Set up the Traffic Selector attributes, setting its parameters. | |
| void | construct (IpAddress &address, uint8_t prefixlen, uint16_t port, uint8_t ip_protocol_id) |
| Set up the Traffic Selector, based on an IP subnet. | |
Static Protected Member Functions | |
| static uint16_t | getExpectedAddressSize (TS_TYPE ts_type) |
| Gets the expected address size for the TS type. | |
| openikev2::TrafficSelector::TrafficSelector | ( | TS_TYPE | ts_type, | |
| auto_ptr< ByteArray > | start_addr, | |||
| auto_ptr< ByteArray > | end_addr, | |||
| uint16_t | start_port, | |||
| uint16_t | end_port, | |||
| uint8_t | ip_protocol_id | |||
| ) |
Creates a new Traffic Selector (for all the IP protocols).
| ts_type | TrafficSelector type | |
| start_addr | Starting address. | |
| end_addr | Ending address. | |
| start_port | Starting port number. | |
| end_port | Ending port number. | |
| ip_protocol_id | IP protocol ID. |
| openikev2::TrafficSelector::TrafficSelector | ( | TS_TYPE | ts_type, | |
| auto_ptr< ByteArray > | start_addr, | |||
| auto_ptr< ByteArray > | end_addr, | |||
| uint8_t | start_icmp_type, | |||
| uint8_t | start_icmp_code, | |||
| uint8_t | end_icmp_type, | |||
| uint8_t | end_icmp_code, | |||
| uint8_t | ip_protocol_id | |||
| ) |
Creates a new Traffic Selector (for ICMP/ICMPv6 protocols).
| ts_type | TrafficSelector type | |
| start_addr | Starting address. | |
| end_addr | Ending address. | |
| start_icmp_type | Starting ICMP type | |
| start_icmp_code | Starting ICMP code | |
| end_icmp_type | Ending ICMP type | |
| end_icmp_code | Ending ICMP code | |
| ip_protocol_id | IP protocol ID (only ICMP or ICMPv6) allowed |
| openikev2::TrafficSelector::TrafficSelector | ( | IpAddress & | address, | |
| uint8_t | prefixlen, | |||
| uint16_t | port, | |||
| uint8_t | ip_protocol_id | |||
| ) |
Creates a new Traffic Selector, based on an IP subnet.
| address | IP network address | |
| prefixlen | Prefix length | |
| port | Port to generate the port range. If port=0, the range will be 0-65535, Otherwise the port range will be exactly the indicated port | |
| ip_protocol_id | IP protocol ID |
| openikev2::TrafficSelector::TrafficSelector | ( | IpAddress & | address, | |
| uint8_t | prefixlen, | |||
| uint8_t | icmp_type, | |||
| uint8_t | icmp_code, | |||
| uint8_t | ip_protocol_id | |||
| ) |
Creates a new Traffic Selector, based on an IP subnet (for ICMP/ICMPv6 protocols).
| address | IP network address | |
| prefixlen | Prefix length | |
| icmp_type | ICMP type to generate the type/code range. | |
| icmp_code | ICMP code to generate the type/code range. If type/code = 0/0 then the range will be 0/0 - 0XFFF/0xFFFF. Otherwise, the range will be type/code - type/code. | |
| ip_protocol_id | IP protocol ID (only ICMP protocols) |
| openikev2::TrafficSelector::TrafficSelector | ( | const TrafficSelector & | other | ) |
Creates a new TrafficSelector cloning another one.
| other | Other TrafficSelector to be cloned. |
| openikev2::TrafficSelector::TrafficSelector | ( | ByteBuffer & | byte_buffer | ) |
Creates a new TrafficSelector based on its binary representation.
| byte_buffer | Buffer with its read pointer at the "TS type" field |
| uint16_t openikev2::TrafficSelector::getExpectedAddressSize | ( | TS_TYPE | ts_type | ) | [static, protected] |
Gets the expected address size for the TS type.
| ts_type | TS TYPE |
| void openikev2::TrafficSelector::construct | ( | TS_TYPE | ts_type, | |
| auto_ptr< ByteArray > | start_addr, | |||
| auto_ptr< ByteArray > | end_addr, | |||
| uint16_t | start_port, | |||
| uint16_t | end_port, | |||
| uint8_t | ip_protocol_id | |||
| ) | [protected] |
Set up the Traffic Selector attributes, setting its parameters.
This is the full featured construct method
| ts_type | TrafficSelector type | |
| start_addr | Starting address. | |
| end_addr | Ending address. | |
| start_port | Starting port number. | |
| end_port | Ending port number. | |
| ip_protocol_id | IP protocol ID. |
| void openikev2::TrafficSelector::construct | ( | IpAddress & | address, | |
| uint8_t | prefixlen, | |||
| uint16_t | port, | |||
| uint8_t | ip_protocol_id | |||
| ) | [protected] |
Set up the Traffic Selector, based on an IP subnet.
| address | IP subnet address | |
| prefixlen | Prefix length | |
| port | Port to generate the port range. If port=0, the range will be 0-65535, Otherwise the port range will be port-port. | |
| ip_protocol_id | IP protocol ID |
| string openikev2::TrafficSelector::TS_TYPE_STR | ( | TS_TYPE | ts_type | ) | [static] |
Translate from TS_type IDs to strings.
| ts_type | TS_type IDs |
| auto_ptr< TrafficSelector > openikev2::TrafficSelector::intersection | ( | const TrafficSelector & | ts1, | |
| const TrafficSelector & | ts2 | |||
| ) | [static] |
Returns the result of intersec this TrafficSelector with other.
| other | Other TrafficSelector. |
| bool openikev2::TrafficSelector::operator>= | ( | const TrafficSelector & | other | ) | const [virtual] |
Indicates if this TrafficSelector contains (is a superset) of other one.
| other | Other TrafficSelector. |
| bool openikev2::TrafficSelector::operator<= | ( | const TrafficSelector & | other | ) | const [virtual] |
Indicates if this TrafficSelector is contained (is a subset) of other one.
| other | Other TrafficSelector. |
| bool openikev2::TrafficSelector::operator== | ( | const TrafficSelector & | other | ) | const [virtual] |
Compares this TrafficSelector with another one.
| other | Other TrafficSelector. |
| uint16_t openikev2::TrafficSelector::getStartPort | ( | ) | const [virtual] |
Gets the start port attribute value.
| uint16_t openikev2::TrafficSelector::getEndPort | ( | ) | const [virtual] |
Gets the end port attribute value.
| uint8_t openikev2::TrafficSelector::getStartIcmpType | ( | ) | const [virtual] |
Gets the start ICMP type value.
| uint8_t openikev2::TrafficSelector::getStartIcmpCode | ( | ) | const [virtual] |
Gets the start ICMP code value.
| uint8_t openikev2::TrafficSelector::getEndIcmpType | ( | ) | const [virtual] |
Gets the end ICMP type value.
| uint8_t openikev2::TrafficSelector::getEndIcmpCode | ( | ) | const [virtual] |
Gets the end ICMP code value.
| auto_ptr< TrafficSelector > openikev2::TrafficSelector::clone | ( | ) | const [virtual] |
| string openikev2::TrafficSelector::toStringTab | ( | uint8_t | tabs | ) | const [virtual] |
Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.
| tabs | Num of tabs preceding the textual representation. |
Implements openikev2::Printable.
IP protocol ID (e.g.
UDP/TCP/ICMP)
1.5.1