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) 2011 Yufei Cheng | 3 * Copyright (c) 2011 Yufei Cheng |
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 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 | 1030 |
1031 { | 1031 { |
1032 SetType (160); | 1032 SetType (160); |
1033 SetLength (2); | 1033 SetLength (2); |
1034 } | 1034 } |
1035 | 1035 |
1036 DsrOptionAckReqHeader::~DsrOptionAckReqHeader () | 1036 DsrOptionAckReqHeader::~DsrOptionAckReqHeader () |
1037 { | 1037 { |
1038 } | 1038 } |
1039 | 1039 |
1040 void DsrOptionAckReqHeader::SetId (uint16_t identification) | 1040 void DsrOptionAckReqHeader::SetAckId (uint16_t identification) |
1041 { | 1041 { |
1042 m_identification = identification; | 1042 m_identification = identification; |
1043 } | 1043 } |
1044 | 1044 |
1045 uint16_t DsrOptionAckReqHeader::GetId () const | 1045 uint16_t DsrOptionAckReqHeader::GetAckId () const |
1046 { | 1046 { |
1047 return m_identification; | 1047 return m_identification; |
1048 } | 1048 } |
1049 | 1049 |
1050 void DsrOptionAckReqHeader::Print (std::ostream &os) const | 1050 void DsrOptionAckReqHeader::Print (std::ostream &os) const |
1051 { | 1051 { |
1052 os << "( type = " << (uint32_t)GetType () << " length = " << (uint32_t)GetLeng
th () | 1052 os << "( type = " << (uint32_t)GetType () << " length = " << (uint32_t)GetLeng
th () |
1053 << " id = " << m_identification << " )"; | 1053 << " id = " << m_identification << " )"; |
1054 } | 1054 } |
1055 | 1055 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 : m_identification (0) | 1103 : m_identification (0) |
1104 { | 1104 { |
1105 SetType (32); | 1105 SetType (32); |
1106 SetLength (10); | 1106 SetLength (10); |
1107 } | 1107 } |
1108 | 1108 |
1109 DsrOptionAckHeader::~DsrOptionAckHeader () | 1109 DsrOptionAckHeader::~DsrOptionAckHeader () |
1110 { | 1110 { |
1111 } | 1111 } |
1112 | 1112 |
1113 void DsrOptionAckHeader::SetId (uint16_t identification) | 1113 void DsrOptionAckHeader::SetAckId (uint16_t identification) |
1114 { | 1114 { |
1115 m_identification = identification; | 1115 m_identification = identification; |
1116 } | 1116 } |
1117 | 1117 |
1118 uint16_t DsrOptionAckHeader::GetId () const | 1118 uint16_t DsrOptionAckHeader::GetAckId () const |
1119 { | 1119 { |
1120 return m_identification; | 1120 return m_identification; |
1121 } | 1121 } |
1122 | 1122 |
1123 void DsrOptionAckHeader::SetRealSrc (Ipv4Address realSrcAddress) | 1123 void DsrOptionAckHeader::SetRealSrc (Ipv4Address realSrcAddress) |
1124 { | 1124 { |
1125 m_realSrcAddress = realSrcAddress; | 1125 m_realSrcAddress = realSrcAddress; |
1126 } | 1126 } |
1127 | 1127 |
1128 Ipv4Address DsrOptionAckHeader::GetRealSrc () const | 1128 Ipv4Address DsrOptionAckHeader::GetRealSrc () const |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1177 | 1177 |
1178 return GetSerializedSize (); | 1178 return GetSerializedSize (); |
1179 } | 1179 } |
1180 | 1180 |
1181 DsrOptionHeader::Alignment DsrOptionAckHeader::GetAlignment () const | 1181 DsrOptionHeader::Alignment DsrOptionAckHeader::GetAlignment () const |
1182 { | 1182 { |
1183 return (Alignment){4,0}; // 4n+0 | 1183 return (Alignment){4,0}; // 4n+0 |
1184 } | 1184 } |
1185 } /* namespace dsr */ | 1185 } /* namespace dsr */ |
1186 } /* namespace ns3 */ | 1186 } /* namespace ns3 */ |
LEFT | RIGHT |