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 Emmanuelle Laprise | 3 * Copyright (c) 2007 Emmanuelle Laprise |
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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 | 387 |
388 LlcSnapHeader llc; | 388 LlcSnapHeader llc; |
389 llc.SetType (protocolNumber); | 389 llc.SetType (protocolNumber); |
390 p->AddHeader (llc); | 390 p->AddHeader (llc); |
391 | 391 |
392 // | 392 // |
393 // This corresponds to the length interpretation of the lengthType· | 393 // This corresponds to the length interpretation of the lengthType· |
394 // field but with an LLC/SNAP header added to the payload as in· | 394 // field but with an LLC/SNAP header added to the payload as in· |
395 // IEEE 802.2 | 395 // IEEE 802.2 |
396 // | 396 // |
397 lengthType = static_cast<uint16_t>(p->GetSize ()); | 397 lengthType = static_cast<uint16_t> (p->GetSize ()); |
398 | 398 |
399 // | 399 // |
400 // All Ethernet frames must carry a minimum payload of 46 bytes. The· | 400 // All Ethernet frames must carry a minimum payload of 46 bytes. The· |
401 // LLC SNAP header counts as part of this payload. We need to padd out | 401 // LLC SNAP header counts as part of this payload. We need to padd out |
402 // if we don't have enough bytes. These must be real bytes since they· | 402 // if we don't have enough bytes. These must be real bytes since they· |
403 // will be written to pcap files and compared in regression trace files. | 403 // will be written to pcap files and compared in regression trace files. |
404 // | 404 // |
405 if (p->GetSize () < 46) | 405 if (p->GetSize () < 46) |
406 { | 406 { |
407 uint8_t buffer[46]; | 407 uint8_t buffer[46]; |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 return true; | 1084 return true; |
1085 } | 1085 } |
1086 | 1086 |
1087 int64_t | 1087 int64_t |
1088 CsmaNetDevice::AssignStreams (int64_t stream) | 1088 CsmaNetDevice::AssignStreams (int64_t stream) |
1089 { | 1089 { |
1090 return m_backoff.AssignStreams (stream); | 1090 return m_backoff.AssignStreams (stream); |
1091 } | 1091 } |
1092 | 1092 |
1093 } // namespace ns3 | 1093 } // namespace ns3 |
LEFT | RIGHT |