IpcsClassifierRecord class. More...
#include "ipcs-classifier-record.h"
 Collaboration diagram for ns3::IpcsClassifierRecord:
 Collaboration diagram for ns3::IpcsClassifierRecord:| Classes | |
| struct | ipv4Addr | 
| ipv4Addr structure  More... | |
| struct | PortRange | 
| PortRange structure.  More... | |
| Public Member Functions | |
| IpcsClassifierRecord () | |
| IpcsClassifierRecord (Ipv4Address srcAddress, Ipv4Mask srcMask, Ipv4Address dstAddress, Ipv4Mask dstMask, uint16_t srcPortLow, uint16_t srcPortHigh, uint16_t dstPortLow, uint16_t dstPortHigh, uint8_t protocol, uint8_t priority) | |
| creates a classifier records and sets all its parameters  More... | |
| IpcsClassifierRecord (Tlv tlv) | |
| Decodes a TLV and creates a classifier.  More... | |
| ~IpcsClassifierRecord () | |
| void | AddDstAddr (Ipv4Address dstAddress, Ipv4Mask dstMask) | 
| add a new destination ip address to the classifier  More... | |
| void | AddDstPortRange (uint16_t dstPortLow, uint16_t dstPortHigh) | 
| add a range of destination port to the classifier  More... | |
| void | AddProtocol (uint8_t proto) | 
| add a protocol to the classifier  More... | |
| void | AddSrcAddr (Ipv4Address srcAddress, Ipv4Mask srcMask) | 
| add a new source ip address to the classifier  More... | |
| void | AddSrcPortRange (uint16_t srcPortLow, uint16_t srcPortHigh) | 
| add a range of source port to the classifier  More... | |
| bool | CheckMatch (Ipv4Address srcAddress, Ipv4Address dstAddress, uint16_t srcPort, uint16_t dstPort, uint8_t proto) const | 
| check if a packets can be used with this classifier  More... | |
| uint16_t | GetCid (void) const | 
| uint16_t | GetIndex (void) const | 
| uint8_t | GetPriority (void) const | 
| void | SetCid (uint16_t cid) | 
| Set the cid associated to this classifier.  More... | |
| void | SetIndex (uint16_t index) | 
| Set the index of the classifier.  More... | |
| void | SetPriority (uint8_t prio) | 
| Set the priority of this classifier.  More... | |
| Tlv | ToTlv (void) const | 
| Creates a TLV from this classifier.  More... | |
| Private Member Functions | |
| bool | CheckMatchDstAddr (Ipv4Address dstAddress) const | 
| Check match destination address function.  More... | |
| bool | CheckMatchDstPort (uint16_t dstPort) const | 
| Check match destination port function.  More... | |
| bool | CheckMatchProtocol (uint8_t proto) const | 
| Check match protocol function.  More... | |
| bool | CheckMatchSrcAddr (Ipv4Address srcAddress) const | 
| Check match source address function.  More... | |
| bool | CheckMatchSrcPort (uint16_t srcPort) const | 
| Check match source port function.  More... | |
| Private Attributes | |
| uint16_t | m_cid | 
| the CID  More... | |
| std::vector< struct ipv4Addr > | m_dstAddr | 
| destination address  More... | |
| std::vector< struct PortRange > | m_dstPortRange | 
| destination port range  More... | |
| uint16_t | m_index | 
| index  More... | |
| uint8_t | m_priority | 
| priority  More... | |
| std::vector< uint8_t > | m_protocol | 
| protocol  More... | |
| std::vector< struct ipv4Addr > | m_srcAddr | 
| source address  More... | |
| std::vector< struct PortRange > | m_srcPortRange | 
| surce port range  More... | |
| uint8_t | m_tosHigh | 
| TOS high.  More... | |
| uint8_t | m_tosLow | 
| TOS low.  More... | |
| uint8_t | m_tosMask | 
| TOS mask.  More... | |
IpcsClassifierRecord class.
Definition at line 35 of file ipcs-classifier-record.h.
| ns3::IpcsClassifierRecord::IpcsClassifierRecord | ( | void | ) | 
Definition at line 29 of file ipcs-classifier-record.cc.
References AddDstAddr(), AddDstPortRange(), AddSrcAddr(), AddSrcPortRange(), m_cid, m_index, m_priority, m_protocol, m_tosHigh, m_tosLow, and m_tosMask.
 Here is the call graph for this function:
 Here is the call graph for this function:| ns3::IpcsClassifierRecord::~IpcsClassifierRecord | ( | void | ) | 
Definition at line 46 of file ipcs-classifier-record.cc.
| ns3::IpcsClassifierRecord::IpcsClassifierRecord | ( | Ipv4Address | srcAddress, | 
| Ipv4Mask | srcMask, | ||
| Ipv4Address | dstAddress, | ||
| Ipv4Mask | dstMask, | ||
| uint16_t | srcPortLow, | ||
| uint16_t | srcPortHigh, | ||
| uint16_t | dstPortLow, | ||
| uint16_t | dstPortHigh, | ||
| uint8_t | protocol, | ||
| uint8_t | priority | ||
| ) | 
creates a classifier records and sets all its parameters
| srcAddress | the source ip address | 
| srcMask | the mask to apply on the source ip address | 
| dstAddress | the destination ip address | 
| dstMask | the mask to apply on the destination ip address | 
| srcPortLow | the lower boundary of the source port range | 
| srcPortHigh | the higher boundary of the source port range | 
| dstPortLow | the lower boundary of the destination port range | 
| dstPortHigh | the higher boundary of the destination port range | 
| protocol | the L4 protocol | 
| priority | the priority of this classifier | 
Definition at line 128 of file ipcs-classifier-record.cc.
References AddDstAddr(), AddDstPortRange(), AddSrcAddr(), AddSrcPortRange(), m_cid, m_index, m_priority, m_protocol, m_tosHigh, m_tosLow, and m_tosMask.
 Here is the call graph for this function:
 Here is the call graph for this function:| ns3::IpcsClassifierRecord::IpcsClassifierRecord | ( | Tlv | tlv | ) | 
Decodes a TLV and creates a classifier.
| tlv | the TLV to decode and from which the classifier parameters will be extracted | 
Definition at line 50 of file ipcs-classifier-record.cc.
References AddDstAddr(), AddDstPortRange(), AddProtocol(), AddSrcAddr(), AddSrcPortRange(), ns3::Tlv::GetType(), ns3::ClassificationRuleVectorTlvValue::Index, ns3::ClassificationRuleVectorTlvValue::IP_dst, ns3::ClassificationRuleVectorTlvValue::IP_src, list, m_cid, m_index, m_priority, m_tosHigh, m_tosLow, m_tosMask, NS_ASSERT_MSG(), NS_FATAL_ERROR, ns3::CsParamVectorTlvValue::Packet_Classification_Rule, ns3::Tlv::PeekValue(), ns3::ClassificationRuleVectorTlvValue::Port_dst, ns3::ClassificationRuleVectorTlvValue::Port_src, ns3::ClassificationRuleVectorTlvValue::Priority, ns3::ClassificationRuleVectorTlvValue::Protocol, and ns3::ClassificationRuleVectorTlvValue::ToS.
 Here is the call graph for this function:
 Here is the call graph for this function:| void ns3::IpcsClassifierRecord::AddDstAddr | ( | Ipv4Address | dstAddress, | 
| Ipv4Mask | dstMask | ||
| ) | 
add a new destination ip address to the classifier
| dstAddress | the destination ip address | 
| dstMask | the mask to apply on the destination ip address | 
Definition at line 161 of file ipcs-classifier-record.cc.
References ns3::IpcsClassifierRecord::ipv4Addr::Address, m_dstAddr, and ns3::IpcsClassifierRecord::ipv4Addr::Mask.
Referenced by Ns3WimaxCsParamTlvTestCase::DoRun(), and IpcsClassifierRecord().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::IpcsClassifierRecord::AddDstPortRange | ( | uint16_t | dstPortLow, | 
| uint16_t | dstPortHigh | ||
| ) | 
add a range of destination port to the classifier
| dstPortLow | the lower boundary of the destination port range | 
| dstPortHigh | the higher boundary of the destination port range | 
Definition at line 178 of file ipcs-classifier-record.cc.
References m_dstPortRange, ns3::IpcsClassifierRecord::PortRange::PortHigh, and ns3::IpcsClassifierRecord::PortRange::PortLow.
Referenced by Ns3WimaxCsParamTlvTestCase::DoRun(), and IpcsClassifierRecord().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::IpcsClassifierRecord::AddProtocol | ( | uint8_t | proto | ) | 
add a protocol to the classifier
| proto | the L4 protocol to add | 
Definition at line 186 of file ipcs-classifier-record.cc.
References m_protocol.
Referenced by Ns3WimaxCsParamTlvTestCase::DoRun(), and IpcsClassifierRecord().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::IpcsClassifierRecord::AddSrcAddr | ( | Ipv4Address | srcAddress, | 
| Ipv4Mask | srcMask | ||
| ) | 
add a new source ip address to the classifier
| srcAddress | the source ip address | 
| srcMask | the mask to apply on the source ip address | 
Definition at line 153 of file ipcs-classifier-record.cc.
References ns3::IpcsClassifierRecord::ipv4Addr::Address, m_srcAddr, and ns3::IpcsClassifierRecord::ipv4Addr::Mask.
Referenced by Ns3WimaxCsParamTlvTestCase::DoRun(), and IpcsClassifierRecord().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::IpcsClassifierRecord::AddSrcPortRange | ( | uint16_t | srcPortLow, | 
| uint16_t | srcPortHigh | ||
| ) | 
add a range of source port to the classifier
| srcPortLow | the lower boundary of the source port range | 
| srcPortHigh | the higher boundary of the source port range | 
Definition at line 169 of file ipcs-classifier-record.cc.
References m_srcPortRange, ns3::IpcsClassifierRecord::PortRange::PortHigh, and ns3::IpcsClassifierRecord::PortRange::PortLow.
Referenced by Ns3WimaxCsParamTlvTestCase::DoRun(), and IpcsClassifierRecord().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| bool ns3::IpcsClassifierRecord::CheckMatch | ( | Ipv4Address | srcAddress, | 
| Ipv4Address | dstAddress, | ||
| uint16_t | srcPort, | ||
| uint16_t | dstPort, | ||
| uint8_t | proto | ||
| ) | const | 
check if a packets can be used with this classifier
| srcAddress | the source ip address of the packet | 
| dstAddress | the destination ip address of the packet | 
| srcPort | the source port of the packet | 
| dstPort | the destination port of the packet | 
| proto | The L4 protocol of the packet | 
Definition at line 296 of file ipcs-classifier-record.cc.
References CheckMatchDstAddr(), CheckMatchDstPort(), CheckMatchProtocol(), CheckMatchSrcAddr(), and CheckMatchSrcPort().
Referenced by ns3::ServiceFlow::CheckClassifierMatch(), and Ns3WimaxCsParamTlvTestCase::DoRun().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Check match destination address function.
| dstAddress | destination IP address to check | 
Definition at line 237 of file ipcs-classifier-record.cc.
References ns3::Ipv4Address::CombineMask(), m_dstAddr, and NS_LOG_INFO.
Referenced by CheckMatch().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Check match destination port function.
| dstPort | destination port to check | 
Definition at line 267 of file ipcs-classifier-record.cc.
References m_dstPortRange, NS_LOG_INFO, and port.
Referenced by CheckMatch().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Check match protocol function.
| proto | protocol number to check | 
Definition at line 282 of file ipcs-classifier-record.cc.
References m_protocol, and NS_LOG_INFO.
Referenced by CheckMatch().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Check match source address function.
| srcAddress | source IP address to check | 
Definition at line 223 of file ipcs-classifier-record.cc.
References ns3::Ipv4Address::CombineMask(), m_srcAddr, and NS_LOG_INFO.
Referenced by CheckMatch().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Check match source port function.
| srcPort | source port to check | 
Definition at line 252 of file ipcs-classifier-record.cc.
References m_srcPortRange, NS_LOG_INFO, and port.
Referenced by CheckMatch().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| uint16_t ns3::IpcsClassifierRecord::GetCid | ( | void | ) | const | 
Definition at line 212 of file ipcs-classifier-record.cc.
References m_cid.
| uint16_t ns3::IpcsClassifierRecord::GetIndex | ( | void | ) | const | 
Definition at line 207 of file ipcs-classifier-record.cc.
References m_index.
| uint8_t ns3::IpcsClassifierRecord::GetPriority | ( | void | ) | const | 
Definition at line 217 of file ipcs-classifier-record.cc.
References m_priority.
| void ns3::IpcsClassifierRecord::SetCid | ( | uint16_t | cid | ) | 
Set the cid associated to this classifier.
| cid | the connection identifier | 
Definition at line 196 of file ipcs-classifier-record.cc.
References m_cid.
| void ns3::IpcsClassifierRecord::SetIndex | ( | uint16_t | index | ) | 
Set the index of the classifier.
| index | the index of the classifier | 
Definition at line 201 of file ipcs-classifier-record.cc.
References m_index.
Referenced by Ns3WimaxCsParamTlvTestCase::DoRun().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::IpcsClassifierRecord::SetPriority | ( | uint8_t | prio | ) | 
Set the priority of this classifier.
| prio | the priority of the classifier | 
Definition at line 191 of file ipcs-classifier-record.cc.
References m_priority.
| Tlv ns3::IpcsClassifierRecord::ToTlv | ( | void | ) | const | 
Creates a TLV from this classifier.
Definition at line 307 of file ipcs-classifier-record.cc.
References ns3::VectorTlvValue::Add(), ns3::PortRangeTlvValue::Add(), ns3::ProtocolTlvValue::Add(), ns3::Ipv4AddressTlvValue::Add(), ns3::VectorTlvValue::GetSerializedSize(), ns3::PortRangeTlvValue::GetSerializedSize(), ns3::ProtocolTlvValue::GetSerializedSize(), ns3::Ipv4AddressTlvValue::GetSerializedSize(), ns3::ClassificationRuleVectorTlvValue::Index, ns3::ClassificationRuleVectorTlvValue::IP_dst, ns3::ClassificationRuleVectorTlvValue::IP_src, m_dstAddr, m_dstPortRange, m_priority, m_protocol, m_srcAddr, m_srcPortRange, ns3::CsParamVectorTlvValue::Packet_Classification_Rule, ns3::ClassificationRuleVectorTlvValue::Port_dst, ns3::ClassificationRuleVectorTlvValue::Port_src, ns3::ClassificationRuleVectorTlvValue::Priority, and ns3::ClassificationRuleVectorTlvValue::Protocol.
Referenced by ns3::CsParameters::ToTlv().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
the CID
Definition at line 195 of file ipcs-classifier-record.h.
Referenced by GetCid(), IpcsClassifierRecord(), and SetCid().
| 
 | private | 
destination address
Definition at line 191 of file ipcs-classifier-record.h.
Referenced by AddDstAddr(), CheckMatchDstAddr(), and ToTlv().
| 
 | private | 
destination port range
Definition at line 193 of file ipcs-classifier-record.h.
Referenced by AddDstPortRange(), CheckMatchDstPort(), and ToTlv().
| 
 | private | 
index
Definition at line 185 of file ipcs-classifier-record.h.
Referenced by GetIndex(), IpcsClassifierRecord(), and SetIndex().
| 
 | private | 
priority
Definition at line 184 of file ipcs-classifier-record.h.
Referenced by GetPriority(), IpcsClassifierRecord(), SetPriority(), and ToTlv().
| 
 | private | 
protocol
Definition at line 189 of file ipcs-classifier-record.h.
Referenced by AddProtocol(), CheckMatchProtocol(), IpcsClassifierRecord(), and ToTlv().
| 
 | private | 
source address
Definition at line 190 of file ipcs-classifier-record.h.
Referenced by AddSrcAddr(), CheckMatchSrcAddr(), and ToTlv().
| 
 | private | 
surce port range
Definition at line 192 of file ipcs-classifier-record.h.
Referenced by AddSrcPortRange(), CheckMatchSrcPort(), and ToTlv().
| 
 | private | 
TOS high.
Definition at line 187 of file ipcs-classifier-record.h.
Referenced by IpcsClassifierRecord().
| 
 | private | 
TOS low.
Definition at line 186 of file ipcs-classifier-record.h.
Referenced by IpcsClassifierRecord().
| 
 | private | 
TOS mask.
Definition at line 188 of file ipcs-classifier-record.h.
Referenced by IpcsClassifierRecord().