|
| | RESIP_HeapCount (Tuple) |
| |
| | Tuple () |
| |
| | Tuple (const GenericIPAddress &genericAddress, TransportType type=UNKNOWN_TRANSPORT, const Data &targetDomain=Data::Empty) |
| |
| | Tuple (const Data &printableAddress, int port, IpVersion ipVer, TransportType type=UNKNOWN_TRANSPORT, const Data &targetDomain=Data::Empty, const Data &netNs=Data::Empty) |
| |
| | Tuple (const Data &printableAddress, int port, TransportType type, const Data &targetDomain=Data::Empty, const Data &netNs=Data::Empty) |
| |
| | Tuple (const in_addr &pipv4, int pport, TransportType ptype, const Data &targetDomain=Data::Empty, const Data &netNs=Data::Empty) |
| |
| | Tuple (const sockaddr &addr, TransportType ptype, const Data &targetDomain=Data::Empty) |
| |
| const sockaddr & | getSockaddr () const |
| | Retrieve a const binary representation of the socket address for this tuple.
|
| |
| sockaddr & | getMutableSockaddr () |
| | Retrieve the binary representation of the socket address for this tuple.
|
| |
| void | copySockaddrAnyPort (sockaddr *sa) |
| | Get a copy of the socket address including the interface and not the port number.
|
| |
| void | setSockaddr (const GenericIPAddress &) |
| | Set the internal binary representation of the socket address from the GenericIPAddress.
|
| |
| TransportType | getType () const |
| |
| void | setType (TransportType type) |
| |
| void | setPort (int port) |
| |
| int | getPort () const |
| |
| FlowKey | getFlowKey () const |
| |
| void | setFlowKey (FlowKey flowKey) |
| |
| bool | isV4 () const |
| |
| IpVersion | ipVersion () const |
| | Returns V4 or V6 as appropriate.
|
| |
| bool | isAnyInterface () const |
| | TRUE if this address is equal to the "INADDR_ANY" value for this address family.
|
| |
| socklen_t | length () const |
| |
| bool | isLoopback () const |
| |
| bool | isPrivateAddress () const |
| |
| bool | isSpecialPurposeAddress () const |
| |
| bool | operator< (const Tuple &rhs) const |
| | Compares TransportType, the binary address, port, and address family of the Tuple.
|
| |
| bool | operator== (const Tuple &rhs) const |
| | Compares TransportType, the binary address, port, and address family of the Tuple.
|
| |
| bool | isEqual (const Tuple &tuple, bool ignorePort=false, bool ignoreTransport=false) const |
| | compares this tuple with the one passed in for family, port and address equality.
|
| |
| Data | presentationFormat () const |
| | Wrapper around the inet_top() method.
|
| |
| GenericIPAddress | toGenericIPAddress () const |
| |
| bool | isEqualWithMask (const Tuple &tuple, short mask, bool ignorePort=false, bool ignoreTransport=false) const |
| | compares this tuple with the one passed in for family, port and address equality using the passed in address mask (mask is specified by number of bits)
|
| |
| bool | isAddressAllowed (const std::vector< AddressMask > &allowed, const std::vector< AddressMask > &denied) const |
| | Tests whether this address is permitted by the supplied allow/deny address lists.
|
| |
| void | setTargetDomain (const Data &target) |
| | Set the domain name this address tuple intends to represent.
|
| |
| const Data & | getTargetDomain () const |
| | Get the domain name this address tuple intends to represent.
|
| |
| void | setNetNs (const Data &netNs) |
| | Set the netns (network namespace) for this Tuple.
|
| |
| const Data & | getNetNs () const |
| | Get the netns for this Tuple.
|
| |
| size_t | hash () const |
| | Creates a 32-bit hash based on the contents of this Tuple.
|
| |
Represents a network address.
This includes:
- IP address
- port
- protocol (TransportType)
- TLS hostname (since this is integral to connection establishment)
Internally the class is aware of the struct sockaddr/sin_addr/sin6addr binary representation of the address. The sa_family of struct sockaddr is used to keep track of whether a Tuple is representing a an IPv4 or IPv6 address.
Also included are some comparator classes that can be used for containers of Tuple.
Definition at line 58 of file Tuple.hxx.
| bool Tuple::isAddressAllowed |
( |
const std::vector< AddressMask > & |
allowed, |
|
|
const std::vector< AddressMask > & |
denied |
|
) |
| const |
Tests whether this address is permitted by the supplied allow/deny address lists.
Deny wins: if this address matches any entry in denied the result is false. Otherwise, if allowed is non-empty, this address must match one of its entries to be permitted; an empty allowed list imposes no allow restriction. Port and transport are ignored; address family must match for an entry to apply (so an IPv4 address is never permitted by an IPv6 allow entry, and vice versa). Matching uses isEqualWithMask.
Definition at line 858 of file Tuple.cxx.
This is a (largely) opaque key that subclasses of Transport will use to help record/find flows.
For UDP and DTLS, this is just the FD, and the rest of the information about the flow is carried in the Tuple. For TCP and TLS, the FD of the connection is used. For protocols where using the FD would not be appropriate (SCTP), the transport may use whatever method to generate these it likes. (It is highly recommended that these ids are unique across all instances of a transport type)
Definition at line 189 of file Tuple.hxx.