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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 os << m_header << " "; | 73 os << m_header << " "; |
74 } | 74 } |
75 os << GetPacket () << " " | 75 os << GetPacket () << " " |
76 << "Dst addr " << GetAddress () << " " | 76 << "Dst addr " << GetAddress () << " " |
77 << "proto " << (uint16_t) GetProtocol () << " " | 77 << "proto " << (uint16_t) GetProtocol () << " " |
78 << "txq " << (uint8_t) GetTxQueueIndex () | 78 << "txq " << (uint8_t) GetTxQueueIndex () |
79 ; | 79 ; |
80 } | 80 } |
81 | 81 |
82 bool | 82 bool |
| 83 Ipv6QueueDiscItem::Mark (void) |
| 84 { |
| 85 NS_LOG_FUNCTION (this); |
| 86 if (!m_headerAdded && (m_header.GetEcn () == Ipv6Header::ECN_ECT1 || m_header.
GetEcn () == Ipv6Header::ECN_ECT0)) |
| 87 { |
| 88 m_header.SetEcn (Ipv6Header::ECN_CE); |
| 89 return true; |
| 90 } |
| 91 return false; |
| 92 } |
| 93 |
| 94 bool |
83 Ipv6QueueDiscItem::GetUint8Value (QueueItem::Uint8Values field, uint8_t& value)
const | 95 Ipv6QueueDiscItem::GetUint8Value (QueueItem::Uint8Values field, uint8_t& value)
const |
84 { | 96 { |
85 bool ret = false; | 97 bool ret = false; |
86 | 98 |
87 switch (field) | 99 switch (field) |
88 { | 100 { |
89 case IP_DSFIELD: | 101 case IP_DSFIELD: |
90 value = m_header.GetTrafficClass (); | 102 value = m_header.GetTrafficClass (); |
91 ret = true; | 103 ret = true; |
92 break; | 104 break; |
93 } | 105 } |
94 | 106 |
95 return ret; | 107 return ret; |
96 } | 108 } |
97 | 109 |
98 } // namespace ns3 | 110 } // namespace ns3 |
OLD | NEW |