LEFT | RIGHT |
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-2009 Strasbourg University | 3 * Copyright (c) 2007-2009 Strasbourg University |
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 TypeId Ipv6OptionPadnHeader::GetInstanceTypeId () const | 187 TypeId Ipv6OptionPadnHeader::GetInstanceTypeId () const |
188 { | 188 { |
189 return GetTypeId (); | 189 return GetTypeId (); |
190 } | 190 } |
191 | 191 |
192 Ipv6OptionPadnHeader::Ipv6OptionPadnHeader (uint32_t pad) | 192 Ipv6OptionPadnHeader::Ipv6OptionPadnHeader (uint32_t pad) |
193 { | 193 { |
194 SetType (1); | 194 SetType (1); |
195 NS_ASSERT_MSG (pad >= 2, "PadN must be at least 2 bytes long"); | 195 NS_ASSERT_MSG (pad >= 2, "PadN must be at least 2 bytes long"); |
196 SetLength ((uint8_t)(pad - 2)); | 196 SetLength (static_cast<uint8_t> (pad - 2)); |
197 } | 197 } |
198 | 198 |
199 Ipv6OptionPadnHeader::~Ipv6OptionPadnHeader () | 199 Ipv6OptionPadnHeader::~Ipv6OptionPadnHeader () |
200 { | 200 { |
201 } | 201 } |
202 | 202 |
203 void Ipv6OptionPadnHeader::Print (std::ostream &os) const | 203 void Ipv6OptionPadnHeader::Print (std::ostream &os) const |
204 { | 204 { |
205 os << "( type = " << (uint32_t)GetType () << " length = " << (uint32_t)GetLeng
th () << " )"; | 205 os << "( type = " << (uint32_t)GetType () << " length = " << (uint32_t)GetLeng
th () << " )"; |
206 } | 206 } |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 Ipv6OptionHeader::Alignment Ipv6OptionRouterAlertHeader::GetAlignment () const | 380 Ipv6OptionHeader::Alignment Ipv6OptionRouterAlertHeader::GetAlignment () const |
381 { | 381 { |
382 Alignment alignment; | 382 Alignment alignment; |
383 alignment.factor = 2; | 383 alignment.factor = 2; |
384 alignment.offset = 0; //2n+0 | 384 alignment.offset = 0; //2n+0 |
385 return alignment; | 385 return alignment; |
386 } | 386 } |
387 | 387 |
388 } /* namespace ns3 */ | 388 } /* namespace ns3 */ |
389 | 389 |
LEFT | RIGHT |