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) 2016 Universita' degli Studi di Napoli Federico II | 3 * Copyright (c) 2016 Universita' degli Studi di Napoli Federico II |
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 NS_LOG_FUNCTION (this); | 86 NS_LOG_FUNCTION (this); |
87 if (!m_headerAdded && (m_header.GetEcn () == Ipv6Header::ECN_ECT1 || m_header.
GetEcn () == Ipv6Header::ECN_ECT0)) | 87 if (!m_headerAdded && (m_header.GetEcn () == Ipv6Header::ECN_ECT1 || m_header.
GetEcn () == Ipv6Header::ECN_ECT0)) |
88 { | 88 { |
89 m_header.SetEcn (Ipv6Header::ECN_CE); | 89 m_header.SetEcn (Ipv6Header::ECN_CE); |
90 return true; | 90 return true; |
91 } | 91 } |
92 return false; | 92 return false; |
93 } | 93 } |
94 | 94 |
95 bool | 95 bool |
| 96 Ipv6QueueDiscItem::IsL4S (void) |
| 97 { |
| 98 NS_LOG_FUNCTION (this); |
| 99 if (!m_headerAdded && m_header.GetEcn () == Ipv6Header::ECN_ECT1) |
| 100 { |
| 101 return true; |
| 102 } |
| 103 return false; |
| 104 } |
| 105 |
| 106 bool |
96 Ipv6QueueDiscItem::GetUint8Value (QueueItem::Uint8Values field, uint8_t& value)
const | 107 Ipv6QueueDiscItem::GetUint8Value (QueueItem::Uint8Values field, uint8_t& value)
const |
97 { | 108 { |
98 bool ret = false; | 109 bool ret = false; |
99 | 110 |
100 switch (field) | 111 switch (field) |
101 { | 112 { |
102 case IP_DSFIELD: | 113 case IP_DSFIELD: |
103 value = m_header.GetTrafficClass (); | 114 value = m_header.GetTrafficClass (); |
104 ret = true; | 115 ret = true; |
105 break; | 116 break; |
106 } | 117 } |
107 | 118 |
108 return ret; | 119 return ret; |
109 } | 120 } |
110 | 121 |
111 } // namespace ns3 | 122 } // namespace ns3 |
OLD | NEW |