OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2007,2008,2009 INRIA, UDcast | 3 * Copyright (c) 2007,2008,2009 INRIA, UDcast |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 m_toleratedJitter = ((U32TlvValue*)((*iter)->PeekValue ()))->GetValu
e (); | 149 m_toleratedJitter = ((U32TlvValue*)((*iter)->PeekValue ()))->GetValu
e (); |
150 break; | 150 break; |
151 } | 151 } |
152 case SfVectorTlvValue::Maximum_Latency: | 152 case SfVectorTlvValue::Maximum_Latency: |
153 { | 153 { |
154 m_maximumLatency = ((U32TlvValue*)((*iter)->PeekValue ()))->GetValue
(); | 154 m_maximumLatency = ((U32TlvValue*)((*iter)->PeekValue ()))->GetValue
(); |
155 break; | 155 break; |
156 } | 156 } |
157 case SfVectorTlvValue::Fixed_length_versus_Variable_length_SDU_Indicator
: | 157 case SfVectorTlvValue::Fixed_length_versus_Variable_length_SDU_Indicator
: |
158 { | 158 { |
159 m_fixedversusVariableSduIndicator = ((U16TlvValue*)((*iter)->PeekVal
ue ()))->GetValue (); | 159 m_fixedversusVariableSduIndicator = static_cast<uint8_t> (((U16TlvVa
lue*)((*iter)->PeekValue ()))->GetValue ()); |
160 break; | 160 break; |
161 } | 161 } |
162 case SfVectorTlvValue::CS_Specification: | 162 case SfVectorTlvValue::CS_Specification: |
163 { | 163 { |
164 m_csSpecification = (enum CsSpecification)(((U8TlvValue*)((*iter)->P
eekValue ()))->GetValue ()); | 164 m_csSpecification = (enum CsSpecification)(((U8TlvValue*)((*iter)->P
eekValue ()))->GetValue ()); |
165 break; | 165 break; |
166 } | 166 } |
167 | 167 |
168 case SfVectorTlvValue::IPV4_CS_Parameters: | 168 case SfVectorTlvValue::IPV4_CS_Parameters: |
169 { | 169 { |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 { | 805 { |
806 SfVectorTlvValue tmpSfVector; | 806 SfVectorTlvValue tmpSfVector; |
807 tmpSfVector.Add (Tlv (SfVectorTlvValue::SFID, 4, U32TlvValue (m_sfid))); | 807 tmpSfVector.Add (Tlv (SfVectorTlvValue::SFID, 4, U32TlvValue (m_sfid))); |
808 tmpSfVector.Add (Tlv (SfVectorTlvValue::CID, 2, U16TlvValue (GetCid ()))); | 808 tmpSfVector.Add (Tlv (SfVectorTlvValue::CID, 2, U16TlvValue (GetCid ()))); |
809 tmpSfVector.Add (Tlv (SfVectorTlvValue::QoS_Parameter_Set_Type, 1, U8TlvValue
(m_qosParamSetType))); | 809 tmpSfVector.Add (Tlv (SfVectorTlvValue::QoS_Parameter_Set_Type, 1, U8TlvValue
(m_qosParamSetType))); |
810 tmpSfVector.Add (Tlv (SfVectorTlvValue::Traffic_Priority, 1, U8TlvValue (m_tra
fficPriority))); | 810 tmpSfVector.Add (Tlv (SfVectorTlvValue::Traffic_Priority, 1, U8TlvValue (m_tra
fficPriority))); |
811 tmpSfVector.Add (Tlv (SfVectorTlvValue::Maximum_Sustained_Traffic_Rate, 4, U32
TlvValue (m_maxSustainedTrafficRate))); | 811 tmpSfVector.Add (Tlv (SfVectorTlvValue::Maximum_Sustained_Traffic_Rate, 4, U32
TlvValue (m_maxSustainedTrafficRate))); |
812 tmpSfVector.Add (Tlv (SfVectorTlvValue::Maximum_Traffic_Burst, 4, U32TlvValue
(m_maxTrafficBurst))); | 812 tmpSfVector.Add (Tlv (SfVectorTlvValue::Maximum_Traffic_Burst, 4, U32TlvValue
(m_maxTrafficBurst))); |
813 tmpSfVector.Add (Tlv (SfVectorTlvValue::Minimum_Reserved_Traffic_Rate, 4, U32T
lvValue (m_minReservedTrafficRate))); | 813 tmpSfVector.Add (Tlv (SfVectorTlvValue::Minimum_Reserved_Traffic_Rate, 4, U32T
lvValue (m_minReservedTrafficRate))); |
814 tmpSfVector.Add (Tlv (SfVectorTlvValue::Minimum_Tolerable_Traffic_Rate, 4, U32
TlvValue (m_minTolerableTrafficRate))); | 814 tmpSfVector.Add (Tlv (SfVectorTlvValue::Minimum_Tolerable_Traffic_Rate, 4, U32
TlvValue (m_minTolerableTrafficRate))); |
815 tmpSfVector.Add (Tlv (SfVectorTlvValue::Service_Flow_Scheduling_Type, 1, U8Tlv
Value (m_schedulingType))); | 815 tmpSfVector.Add (Tlv (SfVectorTlvValue::Service_Flow_Scheduling_Type, 1, U8Tlv
Value (static_cast<uint8_t> (m_schedulingType)))); |
816 tmpSfVector.Add (Tlv (SfVectorTlvValue::Request_Transmission_Policy, 4, U32Tlv
Value (m_requestTransmissionPolicy))); | 816 tmpSfVector.Add (Tlv (SfVectorTlvValue::Request_Transmission_Policy, 4, U32Tlv
Value (m_requestTransmissionPolicy))); |
817 tmpSfVector.Add (Tlv (SfVectorTlvValue::Tolerated_Jitter, 4, U32TlvValue (m_to
leratedJitter))); | 817 tmpSfVector.Add (Tlv (SfVectorTlvValue::Tolerated_Jitter, 4, U32TlvValue (m_to
leratedJitter))); |
818 tmpSfVector.Add (Tlv (SfVectorTlvValue::Maximum_Latency, 4, U32TlvValue (m_max
imumLatency))); | 818 tmpSfVector.Add (Tlv (SfVectorTlvValue::Maximum_Latency, 4, U32TlvValue (m_max
imumLatency))); |
819 tmpSfVector.Add (Tlv (SfVectorTlvValue::Fixed_length_versus_Variable_length_SD
U_Indicator, | 819 tmpSfVector.Add (Tlv (SfVectorTlvValue::Fixed_length_versus_Variable_length_SD
U_Indicator, |
820 1, | 820 1, |
821 U8TlvValue (m_fixedversusVariableSduIndicator))); | 821 U8TlvValue (m_fixedversusVariableSduIndicator))); |
822 tmpSfVector.Add (Tlv (SfVectorTlvValue::SDU_Size, 1, U8TlvValue (m_sduSize))); | 822 tmpSfVector.Add (Tlv (SfVectorTlvValue::SDU_Size, 1, U8TlvValue (m_sduSize))); |
823 tmpSfVector.Add (Tlv (SfVectorTlvValue::Target_SAID, 2, U16TlvValue (m_targetS
AID))); | 823 tmpSfVector.Add (Tlv (SfVectorTlvValue::Target_SAID, 2, U16TlvValue (m_targetS
AID))); |
824 tmpSfVector.Add (Tlv (SfVectorTlvValue::CS_Specification, 1, U8TlvValue (m_csS
pecification))); | 824 tmpSfVector.Add (Tlv (SfVectorTlvValue::CS_Specification, 1, U8TlvValue (stati
c_cast<uint8_t> (m_csSpecification)))); |
825 tmpSfVector.Add (m_convergenceSublayerParam.ToTlv ()); | 825 tmpSfVector.Add (m_convergenceSublayerParam.ToTlv ()); |
826 if (m_direction == SF_DIRECTION_UP) | 826 if (m_direction == SF_DIRECTION_UP) |
827 { | 827 { |
828 return Tlv (Tlv::UPLINK_SERVICE_FLOW, tmpSfVector.GetSerializedSize (), tm
pSfVector); | 828 return Tlv (Tlv::UPLINK_SERVICE_FLOW, tmpSfVector.GetSerializedSize (), tm
pSfVector); |
829 } | 829 } |
830 else | 830 else |
831 { | 831 { |
832 return Tlv (Tlv::DOWNLINK_SERVICE_FLOW, tmpSfVector.GetSerializedSize (),
tmpSfVector); | 832 return Tlv (Tlv::DOWNLINK_SERVICE_FLOW, tmpSfVector.GetSerializedSize (),
tmpSfVector); |
833 } | 833 } |
834 } | 834 } |
835 | 835 |
836 bool | 836 bool |
837 ServiceFlow::CheckClassifierMatch (Ipv4Address srcAddress, | 837 ServiceFlow::CheckClassifierMatch (Ipv4Address srcAddress, |
838 Ipv4Address dstAddress, | 838 Ipv4Address dstAddress, |
839 uint16_t srcPort, | 839 uint16_t srcPort, |
840 uint16_t dstPort, | 840 uint16_t dstPort, |
841 uint8_t proto) const | 841 uint8_t proto) const |
842 { | 842 { |
843 return m_convergenceSublayerParam.GetPacketClassifierRule ().CheckMatch (srcAd
dress, | 843 return m_convergenceSublayerParam.GetPacketClassifierRule ().CheckMatch (srcAd
dress, |
844 dstAd
dress, | 844 dstAd
dress, |
845 srcPo
rt, | 845 srcPo
rt, |
846 dstPo
rt, | 846 dstPo
rt, |
847 proto
); | 847 proto
); |
848 } | 848 } |
849 } // namespace ns3 | 849 } // namespace ns3 |
OLD | NEW |