View | Details | Raw Unified | Return to bug 1482
Collapse All | Expand All

(-)a/src/mesh/model/dot11s/dot11s-mac-header.cc (-3 / +3 lines)
 Lines 164-172    Link Here 
164
void
164
void
165
MeshHeader::Print (std::ostream &os) const
165
MeshHeader::Print (std::ostream &os) const
166
{
166
{
167
  os << "flags = " << (uint16_t) m_meshFlags << std::endl << "ttl = " << (uint16_t) m_meshTtl 
167
  os << "flags=" << (uint16_t) m_meshFlags << ", ttl=" << (uint16_t) m_meshTtl 
168
     << std::endl << "seqno = " << m_meshSeqno << std::endl<< "addr4 = " << m_addr4 << std::endl
168
     << ", seqno=" << m_meshSeqno << ", addr4=" << m_addr4 
169
     << "addr5 = " << m_addr5 << std::endl << "addr6 = " << m_addr6 << std::endl;
169
     << ", addr5=" << m_addr5 << ", addr6=" << m_addr6;
170
}
170
}
171
bool
171
bool
172
operator== (const MeshHeader & a, const MeshHeader & b)
172
operator== (const MeshHeader & a, const MeshHeader & b)
(-)a/src/mesh/model/dot11s/ie-dot11s-beacon-timing.cc (-5 / +4 lines)
 Lines 130-143    Link Here 
130
void
130
void
131
IeBeaconTiming::Print (std::ostream& os) const
131
IeBeaconTiming::Print (std::ostream& os) const
132
{
132
{
133
  os << std::endl << "<information_element id=" << ElementId () << ">" << std::endl;
133
  os << "BeaconTiming=(Number of units=" << (uint16_t) m_numOfUnits;
134
  os << "Number of units: " << (uint16_t) m_numOfUnits << std::endl;
135
  for (NeighboursTimingUnitsList::const_iterator j = m_neighbours.begin (); j != m_neighbours.end (); j++)
134
  for (NeighboursTimingUnitsList::const_iterator j = m_neighbours.begin (); j != m_neighbours.end (); j++)
136
    {
135
    {
137
      os << "AID=" << (uint16_t)(*j)->GetAid () << ", Last beacon was at " << (*j)->GetLastBeacon ()
136
      os << "(AID=" << (uint16_t)(*j)->GetAid () << ", Last beacon at=" << (*j)->GetLastBeacon ()
138
         << ", with beacon interval " << (*j)->GetBeaconInterval () << std::endl;
137
         << ", with beacon interval=" << (*j)->GetBeaconInterval () << ")";
139
    }
138
    }
140
  os << "</information_element>" << std::endl;
139
  os << ")";
141
}
140
}
142
void
141
void
143
IeBeaconTiming::SerializeInformationField (Buffer::Iterator i) const
142
IeBeaconTiming::SerializeInformationField (Buffer::Iterator i) const
(-)a/src/mesh/model/dot11s/ie-dot11s-configuration.cc (-9 / +8 lines)
 Lines 151-165    Link Here 
151
void
151
void
152
IeConfiguration::Print (std::ostream& os) const
152
IeConfiguration::Print (std::ostream& os) const
153
{
153
{
154
  os << std::endl << "<information_element id=" << ElementId () << ">" << std::endl;
154
  os << "MeshConfiguration=(neighbors=" << (uint16_t) m_neighbors
155
  os << "Number of neighbors:               = " << (uint16_t) m_neighbors
155
     << ", Active Path Selection Protocol ID=" << (uint32_t) m_APSPId
156
     << std::endl << "Active Path Selection Protocol ID: = " << (uint32_t) m_APSPId
156
     << ", Active Path Selection Metric ID=" << (uint32_t) m_APSMId
157
     << std::endl << "Active Path Selection Metric ID:   = " << (uint32_t) m_APSMId
157
     << ", Congestion Control Mode ID=" << (uint32_t) m_CCMId
158
     << std::endl << "Congestion Control Mode ID:        = " << (uint32_t) m_CCMId
158
     << ", Synchronize protocol ID=" << (uint32_t) m_SPId
159
     << std::endl << "Synchronize protocol ID:           = " << (uint32_t) m_SPId
159
     << ", Authentication protocol ID=" << (uint32_t) m_APId
160
     << std::endl << "Authentication protocol ID:        = " << (uint32_t) m_APId
160
     << ", Capabilities=" << m_meshCap.GetUint8 ();
161
     << std::endl << "Capabilities:                      = " << m_meshCap.GetUint8 () << std::endl;
161
  os << ")";
162
  os << "</information_element>" << std::endl;
163
}
162
}
164
void
163
void
165
IeConfiguration::SetRouting (dot11sPathSelectionProtocol routingId)
164
IeConfiguration::SetRouting (dot11sPathSelectionProtocol routingId)
(-)a/src/mesh/model/dot11s/ie-dot11s-id.cc (-3 / +1 lines)
 Lines 115-123    Link Here 
115
void
115
void
116
IeMeshId::Print (std::ostream& os) const
116
IeMeshId::Print (std::ostream& os) const
117
{
117
{
118
  os << std::endl << "<information_element id=" << ElementId () << ">" << std::endl;
118
  os << "MeshId=(meshId=" << PeekString () << ")";
119
  os << "meshId =  " << PeekString ();
120
  os << "</information_element>" << std::endl;
121
}
119
}
122
bool
120
bool
123
operator== (const IeMeshId & a, const IeMeshId & b)
121
operator== (const IeMeshId & a, const IeMeshId & b)
(-)a/src/mesh/model/dot11s/ie-dot11s-metric-report.cc (-3 / +1 lines)
 Lines 66-74    Link Here 
66
void
66
void
67
IeLinkMetricReport::Print (std::ostream& os) const
67
IeLinkMetricReport::Print (std::ostream& os) const
68
{
68
{
69
  os << std::endl << "<information_element id=" << ElementId () << ">" << std::endl;
69
  os << "Metric=" << m_metric;
70
  os << "Metric = " << m_metric;
71
  os << "</information_element>" << std::endl;
72
}
70
}
73
bool
71
bool
74
operator== (const IeLinkMetricReport & a, const IeLinkMetricReport & b)
72
operator== (const IeLinkMetricReport & a, const IeLinkMetricReport & b)
(-)a/src/mesh/model/dot11s/ie-dot11s-peer-management.cc (-7 / +6 lines)
 Lines 151-163    Link Here 
151
void
151
void
152
IePeerManagement::Print (std::ostream& os) const
152
IePeerManagement::Print (std::ostream& os) const
153
{
153
{
154
  os << std::endl << "<information_element id=" << ElementId () << ">" << std::endl;
154
  os << "PeerMgmt=(Subtype=" << (uint16_t) m_subtype
155
  os << " Subtype:      = " << (uint16_t) m_subtype << std::endl;
155
     << ", Length=" << (uint16_t) m_length
156
  os << " Length:       = " << (uint16_t) m_length << std::endl;
156
     << ", LocalLinkId=" << m_localLinkId
157
  os << " LocalLinkId:  = " << m_localLinkId << std::endl;
157
     << ", PeerLinkId=" << m_peerLinkId
158
  os << " PeerLinkId:   = " << m_peerLinkId << std::endl;
158
     << ", ReasonCode=" << m_reasonCode
159
  os << " ReasonCode:   = " << m_reasonCode << std::endl;
159
     << ")";
160
  os << "</information_element>" << std::endl;
161
}
160
}
162
bool
161
bool
163
operator== (const IePeerManagement & a, const IePeerManagement & b)
162
operator== (const IePeerManagement & a, const IePeerManagement & b)
(-)a/src/mesh/model/dot11s/ie-dot11s-peering-protocol.cc (-3 / +1 lines)
 Lines 50-58    Link Here 
50
void
50
void
51
IePeeringProtocol::Print (std::ostream& os) const
51
IePeeringProtocol::Print (std::ostream& os) const
52
{
52
{
53
  os << std::endl << "<information_element id=" << ElementId () << ">" << std::endl;
53
  os << "PeeringProtocol=(peering protocol=" << m_protocol << ")";
54
  os << "peering protocol = " << m_protocol;
55
  os << "</information_element>" << std::endl;
56
}
54
}
57
std::ostream &
55
std::ostream &
58
operator << (std::ostream &os, const IePeeringProtocol &a)
56
operator << (std::ostream &os, const IePeeringProtocol &a)
(-)a/src/mesh/model/dot11s/ie-dot11s-perr.cc (-5 / +4 lines)
 Lines 37-50    Link Here 
37
void
37
void
38
IePerr::Print (std::ostream &os) const
38
IePerr::Print (std::ostream &os) const
39
{
39
{
40
  os << std::endl << "<information_element id=" << ElementId () << ">" << std::endl;
40
  os << "PERR=(Number of failed destinations=" << m_addressUnits.size ();
41
  os << "Number of failed destinations: = " << m_addressUnits.size ();
42
  for (unsigned int j = 0; j < m_addressUnits.size (); j++)
41
  for (unsigned int j = 0; j < m_addressUnits.size (); j++)
43
    {
42
    {
44
      os << "Failed destination address: = " << m_addressUnits[j].destination << ", sequence number = "
43
      os << "(Failed destination address=" << m_addressUnits[j].destination << ", sequence number = "
45
         << m_addressUnits[j].seqnum;
44
         << m_addressUnits[j].seqnum << ")";
46
    }
45
    }
47
  os << std::endl << "</information_element>" << std::endl;
46
  os << ")";
48
}
47
}
49
uint8_t
48
uint8_t
50
IePerr::GetNumOfDest () const
49
IePerr::GetNumOfDest () const
(-)a/src/mesh/model/dot11s/ie-dot11s-prep.cc (-6 / +4 lines)
 Lines 189-200    Link Here 
189
void
189
void
190
IePrep::Print (std::ostream& os) const
190
IePrep::Print (std::ostream& os) const
191
{
191
{
192
  os << std::endl << "<information_element id=" << ElementId () << ">" << std::endl;
192
  os << "PREP=(Flags=" << m_flags << ", Hopcount=" << m_hopcount << ", TTL=" << m_ttl
193
  os << "Flags:        = " << m_flags << std::endl << "Hopcount:     = " << m_hopcount << std::endl << "TTL:          = " << m_ttl
193
     << ",Destination=" << m_destinationAddress << ", Dest. seqnum=" << m_destSeqNumber
194
     << std::endl<< "Destination:  = " << m_destinationAddress << std::endl << "Dest. seqnum: = " << m_destSeqNumber
194
     << ", Lifetime=" << m_lifetime << ", Metric=" << m_metric << ", Originator="
195
     << std::endl << "Lifetime:     = " << m_lifetime << std::endl<< "Metric:       = " << m_metric << std::endl << "Originator:   = "
195
     << m_originatorAddress << ", Orig. seqnum=" << m_originatorSeqNumber << ")";
196
     << m_originatorAddress << std::endl << "Orig. seqnum: = " << m_originatorSeqNumber << std::endl;
197
  os << "</information_element>" << std::endl;
198
}
196
}
199
bool
197
bool
200
operator== (const IePrep & a, const IePrep & b)
198
operator== (const IePrep & a, const IePrep & b)
(-)a/src/mesh/model/dot11s/ie-dot11s-preq.cc (-11 / +10 lines)
 Lines 316-335    Link Here 
316
void
316
void
317
IePreq::Print (std::ostream &os) const
317
IePreq::Print (std::ostream &os) const
318
{
318
{
319
  os << std::endl << "<information_element id=" << ElementId () << ">" << std::endl;
319
  os << "PREQ=(originator address  = " << m_originatorAddress
320
  os << " originator address  = " << m_originatorAddress << std::endl;
320
     << ", TTL                 = " << (uint16_t) m_ttl
321
  os << " TTL                 = " << (uint16_t) m_ttl << std::endl;
321
     << ", hop count           = " << (uint16_t) m_hopCount
322
  os << " hop count           = " << (uint16_t) m_hopCount << std::endl;
322
     << ", metric              = " << m_metric
323
  os << " metric              = " << m_metric << std::endl;
323
     << ", seqno               = " << m_originatorSeqNumber
324
  os << " seqno               = " << m_originatorSeqNumber << std::endl;
324
     << ", lifetime            = " << m_lifetime
325
  os << " lifetime            = " << m_lifetime << std::endl;
325
     << ", preq ID             = " << m_preqId
326
  os << " preq ID             = " << m_preqId << std::endl;
326
     << ", Destinations=(";
327
  os << " Destinations are:" << std::endl;
328
  for (int j = 0; j < m_destCount; j++)
327
  for (int j = 0; j < m_destCount; j++)
329
    {
328
    {
330
      os << "    " << m_destinations[j]->GetDestinationAddress () << std::endl;
329
      os << m_destinations[j]->GetDestinationAddress ();
331
    }
330
    }
332
  os << "</information_element>" << std::endl;
331
  os << ")";
333
}
332
}
334
std::vector<Ptr<DestinationAddressUnit> >
333
std::vector<Ptr<DestinationAddressUnit> >
335
IePreq::GetDestinationList ()
334
IePreq::GetDestinationList ()
(-)a/src/mesh/model/dot11s/ie-dot11s-rann.cc (-8 / +7 lines)
 Lines 151-164    Link Here 
151
void
151
void
152
IeRann::Print (std::ostream &os) const
152
IeRann::Print (std::ostream &os) const
153
{
153
{
154
  os << std::endl << "<information_element id=" << ElementId () << ">" << std::endl;
154
  os << "RANN=(flags=" << (int) m_flags
155
  os << "  flags              = " << (int) m_flags << std::endl;
155
     << ", hop count=" << (int) m_hopcount
156
  os << "  hop count          = " << (int) m_hopcount << std::endl;
156
     << ", TTL=" << (int) m_ttl
157
  os << "  TTL                = " << (int) m_ttl << std::endl;
157
     << ", originator address=" << m_originatorAddress
158
  os << "  originator address = " << m_originatorAddress << std::endl;
158
     << ", dst seq. number=" << m_destSeqNumber
159
  os << "  dst seq. number    = " << m_destSeqNumber << std::endl;
159
     << ", metric=" << m_metric
160
  os << "  metric             = " << m_metric << std::endl;
160
     << ")";
161
  os << "</information_element>" << std::endl;
162
}
161
}
163
162
164
bool
163
bool
(-)a/src/mesh/model/dot11s/peer-link-frame.cc (-381 / +75 lines)
29
NS_OBJECT_ENSURE_REGISTERED (PeerLinkOpenStart);
29
NS_OBJECT_ENSURE_REGISTERED (PeerLinkOpenStart);
30
30
31
PeerLinkOpenStart::PeerLinkOpenStart () :
31
PeerLinkOpenStart::PeerLinkOpenStart () :
32
  m_subtype ((uint8_t)(WifiActionHeader::PEER_LINK_OPEN)), m_capability (0), m_aid (0), m_rates (SupportedRates ()), m_meshId (),
32
  m_capability (0), m_rates (SupportedRates ()), m_meshId (),
33
  m_config (IeConfiguration ())
33
  m_config (IeConfiguration ())
34
{
34
{
35
}
35
}
36
void
36
void
37
PeerLinkOpenStart::SetPlinkOpenStart (PeerLinkOpenStart::PlinkOpenStartFields fields)
37
PeerLinkOpenStart::SetPlinkOpenStart (PeerLinkOpenStart::PlinkOpenStartFields fields)
38
{
38
{
39
  m_subtype = fields.subtype;
39
  m_capability = fields.capability;
40
  
40
  m_rates = fields.rates;
41
  if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE))
41
  m_meshId = fields.meshId;
42
    {
42
  m_config = fields.config;
43
      m_capability = fields.capability;
44
    }
45
  if (m_subtype == (uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM))
46
    {
47
      m_aid = fields.aid;
48
    }
49
  if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE))
50
    {
51
      m_rates = fields.rates;
52
    }
53
  if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM))
54
    {
55
      m_meshId = fields.meshId;
56
    }
57
  if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE))
58
    {
59
      m_config = fields.config;
60
    }
61
  else
62
    {
63
      //reasonCode not used here
64
    }
65
}
43
}
66
PeerLinkOpenStart::PlinkOpenStartFields
44
PeerLinkOpenStart::PlinkOpenStartFields
67
PeerLinkOpenStart::GetFields () const
45
PeerLinkOpenStart::GetFields () const
68
{
46
{
69
  PlinkOpenStartFields retval;
47
  PlinkOpenStartFields retval;
70
  /// \todo protocol version:
48
  /// \todo protocol version:
71
  retval.subtype = m_subtype;
72
  retval.capability = m_capability;
49
  retval.capability = m_capability;
73
  retval.aid = m_aid;
74
  retval.rates = m_rates;
50
  retval.rates = m_rates;
75
  retval.meshId = m_meshId;
51
  retval.meshId = m_meshId;
76
  retval.config = m_config;
52
  retval.config = m_config;
95
void
71
void
96
PeerLinkOpenStart::Print (std::ostream &os) const
72
PeerLinkOpenStart::Print (std::ostream &os) const
97
{
73
{
98
  os << "subtype = " << (uint16_t) m_subtype << std::endl << "capability = " << m_capability << std::endl << "laid = "
74
  os << "capability=" << m_capability << ", rates=" << m_rates;
99
     << (uint16_t) m_aid << std::endl << "rates = " << m_rates << std::endl << "meshId = ";
75
  os << ", ";
100
  m_meshId.Print (os);
76
  m_meshId.Print (os);
101
  os << std::endl << "configuration = ";
77
  os << ", ";
102
  m_config.Print (os);
78
  m_config.Print (os);
103
  os << std::endl << "reason code = " << m_reasonCode;
104
}
79
}
105
uint32_t
80
uint32_t
106
PeerLinkOpenStart::GetSerializedSize () const
81
PeerLinkOpenStart::GetSerializedSize () const
107
{
82
{
108
  uint32_t size =0; //Peering protocol
83
  uint32_t size =0; //Peering protocol
109
  NS_ASSERT (m_subtype < 4);
84
  size += 2; //capability
110
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
85
  size += m_rates.GetSerializedSize ();
111
    {
86
  size += m_rates.extended.GetSerializedSize ();
112
      size += 2; //capability
87
  size += m_meshId.GetInformationFieldSize () + 2;
113
    }
88
  size += m_config.GetInformationFieldSize () + 2;
114
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype)
115
    {
116
      size += 2; //AID of remote peer
117
    }
118
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
119
    {
120
      size += m_rates.GetSerializedSize ();
121
      size += m_rates.extended.GetSerializedSize ();
122
    }
123
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype)
124
    {
125
      size += m_meshId.GetInformationFieldSize () + 2;
126
    }
127
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
128
    {
129
      size += m_config.GetInformationFieldSize () + 2;
130
    }
131
  else
132
    {
133
      //reasonCode not used here
134
    }
135
  return size;
89
  return size;
136
}
90
}
137
void
91
void
138
PeerLinkOpenStart::Serialize (Buffer::Iterator start) const
92
PeerLinkOpenStart::Serialize (Buffer::Iterator start) const
139
{
93
{
140
  Buffer::Iterator i = start;
94
  Buffer::Iterator i = start;
141
  NS_ASSERT (m_subtype < 4);
142
  
95
  
143
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
96
  i.WriteHtolsbU16 (m_capability);
144
    {
97
  i = m_rates.Serialize (i);
145
      i.WriteHtolsbU16 (m_capability);
98
  i = m_rates.extended.Serialize (i);
146
    }
99
  i = m_meshId.Serialize (i);
147
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype)
100
  i = m_config.Serialize (i);
148
    {
149
      i.WriteHtolsbU16 (m_aid);
150
    }
151
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
152
    {
153
      i = m_rates.Serialize (i);
154
      i = m_rates.extended.Serialize (i);
155
    }
156
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype)
157
    {
158
      i = m_meshId.Serialize (i);
159
    }
160
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
161
    {
162
      i = m_config.Serialize (i);
163
    }
164
  else
165
    {
166
      //reasonCode not used here
167
    }
168
}
101
}
169
uint32_t
102
uint32_t
170
PeerLinkOpenStart::Deserialize (Buffer::Iterator start)
103
PeerLinkOpenStart::Deserialize (Buffer::Iterator start)
171
{
104
{
172
  Buffer::Iterator i = start;
105
  Buffer::Iterator i = start;
173
  NS_ASSERT (m_subtype < 4);
174
  
106
  
175
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
107
  m_capability = i.ReadLsbtohU16 ();
108
  i = m_rates.Deserialize (i);
109
  i = m_rates.extended.DeserializeIfPresent (i);
110
  uint8_t id = i.ReadU8 ();
111
  uint8_t length = i.ReadU8 ();
112
  m_meshId.DeserializeInformationField (i, length);
113
  if ((m_meshId.ElementId () != (WifiInformationElementId) id) || (m_meshId.GetInformationFieldSize () != length))
176
    {
114
    {
177
      m_capability = i.ReadLsbtohU16 ();
115
      NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
178
    }
116
    }
179
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype)
117
  i.Next (m_meshId.GetInformationFieldSize ());
118
  id = i.ReadU8 ();
119
  length = i.ReadU8 ();
120
  m_config.DeserializeInformationField (i, length);
121
  if ((m_config.ElementId () != (WifiInformationElementId) id) || (m_config.GetInformationFieldSize () != length))
180
    {
122
    {
181
      m_aid = i.ReadLsbtohU16 ();
123
      NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
182
    }
124
    }
183
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
125
  i.Next (m_config.GetInformationFieldSize ());
184
    {
126
 
185
      i = m_rates.Deserialize (i);
186
      i = m_rates.extended.DeserializeIfPresent (i);
187
    }
188
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype)
189
    {
190
      uint8_t id = i.ReadU8 ();
191
      uint8_t length = i.ReadU8 ();
192
      m_meshId.DeserializeInformationField (i, length);
193
      if ((m_meshId.ElementId () != (WifiInformationElementId) id) || (m_meshId.GetInformationFieldSize () != length))
194
        {
195
          NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
196
        }
197
      i.Next (m_meshId.GetInformationFieldSize ());
198
    }
199
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
200
    {
201
      uint8_t id = i.ReadU8 ();
202
      uint8_t length = i.ReadU8 ();
203
      m_config.DeserializeInformationField (i, length);
204
      if ((m_config.ElementId () != (WifiInformationElementId) id) || (m_config.GetInformationFieldSize () != length))
205
        {
206
          NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
207
        }
208
      i.Next (m_config.GetInformationFieldSize ());
209
    }
210
  else
211
    {
212
       //reasonCode not used here
213
    }
214
  return i.GetDistanceFrom (start);
127
  return i.GetDistanceFrom (start);
215
}
128
}
216
bool
129
bool
217
operator== (const PeerLinkOpenStart & a, const PeerLinkOpenStart & b)
130
operator== (const PeerLinkOpenStart & a, const PeerLinkOpenStart & b)
218
{
131
{
219
  return ((a.m_subtype == b.m_subtype) && (a.m_capability == b.m_capability) && (a.m_aid == b.m_aid)
132
  return ((a.m_capability == b.m_capability)
220
          && (a.m_meshId.IsEqual (b.m_meshId)) && (a.m_config == b.m_config));
133
          && (a.m_meshId.IsEqual (b.m_meshId)) && (a.m_config == b.m_config));
221
  
134
  
222
}
135
}
223
NS_OBJECT_ENSURE_REGISTERED (PeerLinkCloseStart);
136
NS_OBJECT_ENSURE_REGISTERED (PeerLinkCloseStart);
224
137
225
PeerLinkCloseStart::PeerLinkCloseStart () :
138
PeerLinkCloseStart::PeerLinkCloseStart () :
226
  m_subtype ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE)), m_capability (0), m_aid (0), m_rates (SupportedRates ()), m_meshId (),
139
  m_meshId ()
227
  m_config (IeConfiguration ())
228
{
140
{
229
}
141
}
230
void
142
void
231
PeerLinkCloseStart::SetPlinkCloseStart (PeerLinkCloseStart::PlinkCloseStartFields fields)
143
PeerLinkCloseStart::SetPlinkCloseStart (PeerLinkCloseStart::PlinkCloseStartFields fields)
232
{
144
{
233
  m_subtype = fields.subtype;
145
  m_meshId = fields.meshId;
234
  
235
  if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE))
236
    {
237
      m_capability = fields.capability;
238
    }
239
  if (m_subtype == (uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM))
240
    {
241
      m_aid = fields.aid;
242
    }
243
  if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE))
244
    {
245
      m_rates = fields.rates;
246
    }
247
  if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM))
248
    {
249
      m_meshId = fields.meshId;
250
    }
251
  if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE))
252
    {
253
      m_config = fields.config;
254
    }
255
  else
256
    {
257
      //reasonCode not used here
258
    }
259
}
146
}
260
PeerLinkCloseStart::PlinkCloseStartFields
147
PeerLinkCloseStart::PlinkCloseStartFields
261
PeerLinkCloseStart::GetFields () const
148
PeerLinkCloseStart::GetFields () const
262
{
149
{
263
  PlinkCloseStartFields retval;
150
  PlinkCloseStartFields retval;
264
  /// \todo protocol version:
151
  /// \todo protocol version:
265
  retval.subtype = m_subtype;
266
  retval.capability = m_capability;
267
  retval.aid = m_aid;
268
  retval.rates = m_rates;
269
  retval.meshId = m_meshId;
152
  retval.meshId = m_meshId;
270
  retval.config = m_config;
271
  
153
  
272
  return retval;
154
  return retval;
273
}
155
}
289
void
171
void
290
PeerLinkCloseStart::Print (std::ostream &os) const
172
PeerLinkCloseStart::Print (std::ostream &os) const
291
{
173
{
292
  os << "subtype = " << (uint16_t) m_subtype << std::endl << "capability = " << m_capability << std::endl << "laid = "
293
     << (uint16_t) m_aid << std::endl << "rates = " << m_rates << std::endl << "meshId = ";
294
  m_meshId.Print (os);
174
  m_meshId.Print (os);
295
  os << std::endl << "configuration = ";
296
  m_config.Print (os);
297
  os << std::endl << "reason code = " << m_reasonCode;
298
}
175
}
299
uint32_t
176
uint32_t
300
PeerLinkCloseStart::GetSerializedSize () const
177
PeerLinkCloseStart::GetSerializedSize () const
301
{
178
{
302
  uint32_t size =0; //Peering protocol
179
  uint32_t size =0; //Peering protocol
303
  NS_ASSERT (m_subtype < 4);
180
  size += m_meshId.GetInformationFieldSize () + 2;
304
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
305
    {
306
      size += 2; //capability
307
    }
308
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype)
309
    {
310
      size += 2; //AID of remote peer
311
    }
312
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
313
    {
314
      size += m_rates.GetSerializedSize ();
315
      size += m_rates.extended.GetSerializedSize ();
316
    }
317
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype)
318
    {
319
      size += m_meshId.GetInformationFieldSize () + 2;
320
    }
321
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
322
    {
323
      size += m_config.GetInformationFieldSize () + 2;
324
    }
325
  else
326
    {
327
      //reasonCode not used here
328
    }
329
  return size;
181
  return size;
330
}
182
}
331
void
183
void
332
PeerLinkCloseStart::Serialize (Buffer::Iterator start) const
184
PeerLinkCloseStart::Serialize (Buffer::Iterator start) const
333
{
185
{
334
  Buffer::Iterator i = start;
186
  Buffer::Iterator i = start;
335
  NS_ASSERT (m_subtype < 4);
187
  i = m_meshId.Serialize (i);
336
  
337
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
338
    {
339
      i.WriteHtolsbU16 (m_capability);
340
    }
341
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype)
342
    {
343
      i.WriteHtolsbU16 (m_aid);
344
    }
345
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
346
    {
347
      i = m_rates.Serialize (i);
348
      i = m_rates.extended.Serialize (i);
349
    }
350
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype)
351
    {
352
      i = m_meshId.Serialize (i);
353
    }
354
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
355
    {
356
      i = m_config.Serialize (i);
357
    }
358
  else
359
    {
360
      //reasonCode not used here
361
    }
362
}
188
}
363
uint32_t
189
uint32_t
364
PeerLinkCloseStart::Deserialize (Buffer::Iterator start)
190
PeerLinkCloseStart::Deserialize (Buffer::Iterator start)
365
{
191
{
366
  Buffer::Iterator i = start;
192
  Buffer::Iterator i = start;
367
  NS_ASSERT (m_subtype < 4);
368
  
193
  
369
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
194
  uint8_t id = i.ReadU8 ();
195
  uint8_t length = i.ReadU8 ();
196
  m_meshId.DeserializeInformationField (i, length);
197
  if ((m_meshId.ElementId () != (WifiInformationElementId) id) || (m_meshId.GetInformationFieldSize () != length))
370
    {
198
    {
371
      m_capability = i.ReadLsbtohU16 ();
199
      NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
372
    }
200
    }
373
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype)
201
  i.Next (m_meshId.GetInformationFieldSize ());
374
    {
375
      m_aid = i.ReadLsbtohU16 ();
376
    }
377
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
378
    {
379
      i = m_rates.Deserialize (i);
380
      i = m_rates.extended.DeserializeIfPresent (i);
381
    }
382
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype)
383
    {
384
      uint8_t id = i.ReadU8 ();
385
      uint8_t length = i.ReadU8 ();
386
      m_meshId.DeserializeInformationField (i, length);
387
      if ((m_meshId.ElementId () != (WifiInformationElementId) id) || (m_meshId.GetInformationFieldSize () != length))
388
        {
389
          NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
390
        }
391
      i.Next (m_meshId.GetInformationFieldSize ());
392
    }
393
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
394
    {
395
      uint8_t id = i.ReadU8 ();
396
      uint8_t length = i.ReadU8 ();
397
      m_config.DeserializeInformationField (i, length);
398
      if ((m_config.ElementId () != (WifiInformationElementId) id) || (m_config.GetInformationFieldSize () != length))
399
        {
400
          NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
401
        }
402
      i.Next (m_config.GetInformationFieldSize ());
403
    }
404
  else
405
    {
406
       //reasonCode not used here
407
    }
408
  return i.GetDistanceFrom (start);
202
  return i.GetDistanceFrom (start);
409
}
203
}
410
bool
204
bool
411
operator== (const PeerLinkCloseStart & a, const PeerLinkCloseStart & b)
205
operator== (const PeerLinkCloseStart & a, const PeerLinkCloseStart & b)
412
{
206
{
413
  return ((a.m_subtype == b.m_subtype) && (a.m_capability == b.m_capability) && (a.m_aid == b.m_aid)
207
  return ((a.m_meshId.IsEqual (b.m_meshId)));
414
          && (a.m_meshId.IsEqual (b.m_meshId)) && (a.m_config == b.m_config));
415
  
416
}
208
}
417
NS_OBJECT_ENSURE_REGISTERED (PeerLinkConfirmStart);
209
NS_OBJECT_ENSURE_REGISTERED (PeerLinkConfirmStart);
418
210
419
PeerLinkConfirmStart::PeerLinkConfirmStart () :
211
PeerLinkConfirmStart::PeerLinkConfirmStart () :
420
  m_subtype ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM)), m_capability (0), m_aid (0), m_rates (SupportedRates ()), m_meshId (),
212
  m_capability (0), m_aid (0), m_rates (SupportedRates ()),
421
  m_config (IeConfiguration ())
213
  m_config (IeConfiguration ())
422
{
214
{
423
}
215
}
424
void
216
void
425
PeerLinkConfirmStart::SetPlinkConfirmStart (PeerLinkConfirmStart::PlinkConfirmStartFields fields)
217
PeerLinkConfirmStart::SetPlinkConfirmStart (PeerLinkConfirmStart::PlinkConfirmStartFields fields)
426
{
218
{
427
  m_subtype = fields.subtype;
219
  m_capability = fields.capability;
428
  
220
  m_aid = fields.aid;
429
  if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE))
221
  m_rates = fields.rates;
430
    {
222
  m_config = fields.config;
431
      m_capability = fields.capability;
432
    }
433
  if (m_subtype == (uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM))
434
    {
435
      m_aid = fields.aid;
436
    }
437
  if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE))
438
    {
439
      m_rates = fields.rates;
440
    }
441
  if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM))
442
    {
443
      m_meshId = fields.meshId;
444
    }
445
  if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE))
446
    {
447
      m_config = fields.config;
448
    }
449
  else
450
    {
451
      //reasonCode not used here
452
    }
453
}
223
}
454
PeerLinkConfirmStart::PlinkConfirmStartFields
224
PeerLinkConfirmStart::PlinkConfirmStartFields
455
PeerLinkConfirmStart::GetFields () const
225
PeerLinkConfirmStart::GetFields () const
456
{
226
{
457
  PlinkConfirmStartFields retval;
227
  PlinkConfirmStartFields retval;
458
  /// \todo protocol version:
228
  /// \todo protocol version:
459
  retval.subtype = m_subtype;
460
  retval.capability = m_capability;
229
  retval.capability = m_capability;
461
  retval.aid = m_aid;
230
  retval.aid = m_aid;
462
  retval.rates = m_rates;
231
  retval.rates = m_rates;
463
  retval.meshId = m_meshId;
464
  retval.config = m_config;
232
  retval.config = m_config;
465
  
233
  
466
  return retval;
234
  return retval;
483
void
251
void
484
PeerLinkConfirmStart::Print (std::ostream &os) const
252
PeerLinkConfirmStart::Print (std::ostream &os) const
485
{
253
{
486
  os << "subtype = " << (uint16_t) m_subtype << std::endl << "capability = " << m_capability << std::endl << "laid = "
254
  os << "capability=" << m_capability << ", rates=" << m_rates;
487
     << (uint16_t) m_aid << std::endl << "rates = " << m_rates << std::endl << "meshId = ";
255
  os << ", ";
488
  m_meshId.Print (os);
489
  os << std::endl << "configuration = ";
490
  m_config.Print (os);
256
  m_config.Print (os);
491
  os << std::endl << "reason code = " << m_reasonCode;
492
}
257
}
493
uint32_t
258
uint32_t
494
PeerLinkConfirmStart::GetSerializedSize () const
259
PeerLinkConfirmStart::GetSerializedSize () const
495
{
260
{
496
  uint32_t size =0; //Peering protocol
261
  uint32_t size =0; //Peering protocol
497
  NS_ASSERT (m_subtype < 4);
262
  size += 2; //capability
498
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
263
  size += 2; //AID of remote peer
499
    {
264
  size += m_rates.GetSerializedSize ();
500
      size += 2; //capability
265
  size += m_rates.extended.GetSerializedSize ();
501
    }
266
  size += m_config.GetInformationFieldSize () + 2;
502
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype)
503
    {
504
      size += 2; //AID of remote peer
505
    }
506
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
507
    {
508
      size += m_rates.GetSerializedSize ();
509
      size += m_rates.extended.GetSerializedSize ();
510
    }
511
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype)
512
    {
513
      size += m_meshId.GetInformationFieldSize () + 2;
514
    }
515
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
516
    {
517
      size += m_config.GetInformationFieldSize () + 2;
518
    }
519
  else
520
    {
521
      //reasonCode not used here
522
    }
523
  return size;
267
  return size;
524
}
268
}
525
void
269
void
526
PeerLinkConfirmStart::Serialize (Buffer::Iterator start) const
270
PeerLinkConfirmStart::Serialize (Buffer::Iterator start) const
527
{
271
{
528
  Buffer::Iterator i = start;
272
  Buffer::Iterator i = start;
529
  NS_ASSERT (m_subtype < 4);
530
  
273
  
531
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
274
  i.WriteHtolsbU16 (m_capability);
532
    {
275
  i.WriteHtolsbU16 (m_aid);
533
      i.WriteHtolsbU16 (m_capability);
276
  i = m_rates.Serialize (i);
534
    }
277
  i = m_rates.extended.Serialize (i);
535
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype)
278
  i = m_config.Serialize (i);
536
    {
537
      i.WriteHtolsbU16 (m_aid);
538
    }
539
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
540
    {
541
      i = m_rates.Serialize (i);
542
      i = m_rates.extended.Serialize (i);
543
    }
544
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype)
545
    {
546
      i = m_meshId.Serialize (i);
547
    }
548
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
549
    {
550
      i = m_config.Serialize (i);
551
    }
552
  else
553
    {
554
      //reasonCode not used here
555
    }
556
}
279
}
557
uint32_t
280
uint32_t
558
PeerLinkConfirmStart::Deserialize (Buffer::Iterator start)
281
PeerLinkConfirmStart::Deserialize (Buffer::Iterator start)
559
{
282
{
560
  Buffer::Iterator i = start;
283
  Buffer::Iterator i = start;
561
  NS_ASSERT (m_subtype < 4);
562
  
284
  
563
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
285
  m_capability = i.ReadLsbtohU16 ();
286
  m_aid = i.ReadLsbtohU16 ();
287
  i = m_rates.Deserialize (i);
288
  i = m_rates.extended.DeserializeIfPresent (i);
289
  uint8_t id = i.ReadU8 ();
290
  uint8_t length = i.ReadU8 ();
291
  m_config.DeserializeInformationField (i, length);
292
  if ((m_config.ElementId () != (WifiInformationElementId) id) || (m_config.GetInformationFieldSize () != length))
564
    {
293
    {
565
      m_capability = i.ReadLsbtohU16 ();
294
      NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
566
    }
295
    }
567
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype)
296
  i.Next (m_config.GetInformationFieldSize ());
568
    {
569
      m_aid = i.ReadLsbtohU16 ();
570
    }
571
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
572
    {
573
      i = m_rates.Deserialize (i);
574
      i = m_rates.extended.DeserializeIfPresent (i);
575
    }
576
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype)
577
    {
578
      uint8_t id = i.ReadU8 ();
579
      uint8_t length = i.ReadU8 ();
580
      m_meshId.DeserializeInformationField (i, length);
581
      if ((m_meshId.ElementId () != (WifiInformationElementId) id) || (m_meshId.GetInformationFieldSize () != length))
582
        {
583
          NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
584
        }
585
      i.Next (m_meshId.GetInformationFieldSize ());
586
    }
587
  if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype)
588
    {
589
      uint8_t id = i.ReadU8 ();
590
      uint8_t length = i.ReadU8 ();
591
      m_config.DeserializeInformationField (i, length);
592
      if ((m_config.ElementId () != (WifiInformationElementId) id) || (m_config.GetInformationFieldSize () != length))
593
        {
594
          NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
595
        }
596
      i.Next (m_config.GetInformationFieldSize ());
597
    }
598
  else
599
    {
600
       //reasonCode not used here
601
    }
602
  return i.GetDistanceFrom (start);
297
  return i.GetDistanceFrom (start);
603
}
298
}
604
bool
299
bool
605
operator== (const PeerLinkConfirmStart & a, const PeerLinkConfirmStart & b)
300
operator== (const PeerLinkConfirmStart & a, const PeerLinkConfirmStart & b)
606
{
301
{
607
  return ((a.m_subtype == b.m_subtype) && (a.m_capability == b.m_capability) && (a.m_aid == b.m_aid)
302
  return ((a.m_capability == b.m_capability) && (a.m_aid == b.m_aid)
608
          && (a.m_meshId.IsEqual (b.m_meshId)) && (a.m_config == b.m_config));
303
          && (a.m_config == b.m_config));
609
  
610
}
304
}
611
} // namespace dot11s
305
} // namespace dot11s
612
} // namespace ns3
306
} // namespace ns3
(-)a/src/mesh/model/dot11s/peer-link-frame.h (-40 / +9 lines)
35
 *
35
 *
36
 * \brief 802.11s Peer link open management frame
36
 * \brief 802.11s Peer link open management frame
37
 * 
37
 * 
38
 * Peer link management frame included the following (see chapters 7.4.12.1-7.4.12.3 of 802.11s):
38
 * Peer link opent frame includes the following:
39
 * - Subtype field
39
 * - Capability
40
 * - Association ID field
41
 * - Supported rates
40
 * - Supported rates
42
 * - Mesh ID of mesh
41
 * - Mesh ID of mesh
42
 * - Configuration
43
 */
43
 */
44
class PeerLinkOpenStart : public Header
44
class PeerLinkOpenStart : public Header
45
{
45
{
48
  ///\brief fields:
48
  ///\brief fields:
49
  struct PlinkOpenStartFields
49
  struct PlinkOpenStartFields
50
  {
50
  {
51
    uint8_t subtype;
51
    IePeeringProtocol protocol; //Peering protocol version - 3 octets
52
    IePeeringProtocol protocol; //Peering protocol version - in all subtypes - 3 octets
53
    uint16_t capability;        //open and confirm
52
    uint16_t capability;        //open and confirm
54
    uint16_t aid;               //confirm only
55
    SupportedRates rates;       //open and confirm
53
    SupportedRates rates;       //open and confirm
56
    IeMeshId meshId;            //open and close
54
    IeMeshId meshId;            //open and close
57
    IeConfiguration config;     //open and confirm
55
    IeConfiguration config;     //open and confirm
58
    uint16_t reasonCode;        //close only
59
  };
56
  };
60
  void SetPlinkOpenStart (PlinkOpenStartFields);
57
  void SetPlinkOpenStart (PlinkOpenStartFields);
61
  PlinkOpenStartFields GetFields () const;
58
  PlinkOpenStartFields GetFields () const;
69
  virtual uint32_t Deserialize (Buffer::Iterator start);
66
  virtual uint32_t Deserialize (Buffer::Iterator start);
70
67
71
private:
68
private:
72
  uint8_t m_subtype;
73
  IePeeringProtocol m_protocol;
74
  uint16_t m_capability;
69
  uint16_t m_capability;
75
  uint16_t m_aid;
76
  SupportedRates m_rates;
70
  SupportedRates m_rates;
77
  IeMeshId m_meshId;
71
  IeMeshId m_meshId;
78
  IeConfiguration m_config;
72
  IeConfiguration m_config;
79
  uint16_t m_reasonCode;
80
73
81
  friend bool operator== (const PeerLinkOpenStart & a, const PeerLinkOpenStart & b);
74
  friend bool operator== (const PeerLinkOpenStart & a, const PeerLinkOpenStart & b);
82
75
92
 *
85
 *
93
 * \brief 802.11s Peer link close management frame
86
 * \brief 802.11s Peer link close management frame
94
 * 
87
 * 
95
 * Peer link management frame included the following (see chapters 7.4.12.1-7.4.12.3 of 802.11s):
88
 * Peer link close frame includes the following:
96
 * - Subtype field
97
 * - Association ID field
98
 * - Supported rates
99
 * - Mesh ID of mesh
89
 * - Mesh ID of mesh
100
 */
90
 */
101
class PeerLinkCloseStart : public Header
91
class PeerLinkCloseStart : public Header
105
  ///\brief fields:
95
  ///\brief fields:
106
  struct PlinkCloseStartFields
96
  struct PlinkCloseStartFields
107
  {
97
  {
108
    uint8_t subtype;
98
    IePeeringProtocol protocol; //Peering protocol version - 3 octets
109
    IePeeringProtocol protocol; //Peering protocol version - in all subtypes - 3 octets
110
    uint16_t capability;        //open and confirm
111
    uint16_t aid;               //confirm only
112
    SupportedRates rates;       //open and confirm
113
    IeMeshId meshId;            //open and close
99
    IeMeshId meshId;            //open and close
114
    IeConfiguration config;     //open and confirm
115
    uint16_t reasonCode;        //close only
116
  };
100
  };
117
  void SetPlinkCloseStart (PlinkCloseStartFields);
101
  void SetPlinkCloseStart (PlinkCloseStartFields);
118
  PlinkCloseStartFields GetFields () const;
102
  PlinkCloseStartFields GetFields () const;
126
  virtual uint32_t Deserialize (Buffer::Iterator start);
110
  virtual uint32_t Deserialize (Buffer::Iterator start);
127
111
128
private:
112
private:
129
  uint8_t m_subtype;
130
  IePeeringProtocol m_protocol;
131
  uint16_t m_capability;
132
  uint16_t m_aid;
133
  SupportedRates m_rates;
134
  IeMeshId m_meshId;
113
  IeMeshId m_meshId;
135
  IeConfiguration m_config;
136
  uint16_t m_reasonCode;
137
114
138
  friend bool operator== (const PeerLinkCloseStart & a, const PeerLinkCloseStart & b);
115
  friend bool operator== (const PeerLinkCloseStart & a, const PeerLinkCloseStart & b);
139
116
148
 *
125
 *
149
 * \brief 802.11s Peer link confirm management frame
126
 * \brief 802.11s Peer link confirm management frame
150
 * 
127
 * 
151
 * Peer link management frame included the following (see chapters 7.4.12.1-7.4.12.3 of 802.11s):
128
 * Peer link confirm frame includes the following:
152
 * - Subtype field
153
 * - Association ID field
129
 * - Association ID field
154
 * - Supported rates
130
 * - Supported rates
155
 * - Mesh ID of mesh
131
 * - Configuration
156
 */
132
 */
157
class PeerLinkConfirmStart : public Header
133
class PeerLinkConfirmStart : public Header
158
{
134
{
161
  ///\brief fields:
137
  ///\brief fields:
162
  struct PlinkConfirmStartFields
138
  struct PlinkConfirmStartFields
163
  {
139
  {
164
    uint8_t subtype;
140
    IePeeringProtocol protocol; //Peering protocol version - 3 octets
165
    IePeeringProtocol protocol; //Peering protocol version - in all subtypes - 3 octets
166
    uint16_t capability;        //open and confirm
141
    uint16_t capability;        //open and confirm
167
    uint16_t aid;               //confirm only
142
    uint16_t aid;               //confirm only
168
    SupportedRates rates;       //open and confirm
143
    SupportedRates rates;       //open and confirm
169
    IeMeshId meshId;            //open and close
170
    IeConfiguration config;     //open and confirm
144
    IeConfiguration config;     //open and confirm
171
    uint16_t reasonCode;        //close only
172
  };
145
  };
173
  void SetPlinkConfirmStart (PlinkConfirmStartFields);
146
  void SetPlinkConfirmStart (PlinkConfirmStartFields);
174
  PlinkConfirmStartFields GetFields () const;
147
  PlinkConfirmStartFields GetFields () const;
182
  virtual uint32_t Deserialize (Buffer::Iterator start);
155
  virtual uint32_t Deserialize (Buffer::Iterator start);
183
156
184
private:
157
private:
185
  uint8_t m_subtype;
186
  IePeeringProtocol m_protocol;
187
  uint16_t m_capability;
158
  uint16_t m_capability;
188
  uint16_t m_aid;
159
  uint16_t m_aid;
189
  SupportedRates m_rates;
160
  SupportedRates m_rates;
190
  IeMeshId m_meshId;
191
  IeConfiguration m_config;
161
  IeConfiguration m_config;
192
  uint16_t m_reasonCode;
193
162
194
  friend bool operator== (const PeerLinkConfirmStart & a, const PeerLinkConfirmStart & b);
163
  friend bool operator== (const PeerLinkConfirmStart & a, const PeerLinkConfirmStart & b);
195
164
(-)a/src/mesh/model/dot11s/peer-management-protocol-mac.cc (-19 / +5 lines)
 Lines 104-110    Link Here 
104
          PeerLinkOpenStart peerFrame;
104
          PeerLinkOpenStart peerFrame;
105
          packet->RemoveHeader (peerFrame);
105
          packet->RemoveHeader (peerFrame);
106
          fields = peerFrame.GetFields ();
106
          fields = peerFrame.GetFields ();
107
          NS_ASSERT (fields.subtype == actionValue.selfProtectedAction); 
108
          if (!fields.meshId.IsEqual ( *(m_protocol->GetMeshId ())))
107
          if (!fields.meshId.IsEqual ( *(m_protocol->GetMeshId ())))
109
            {
108
            {
110
              m_protocol->ConfigurationMismatch (m_ifIndex, peerAddress);
109
              m_protocol->ConfigurationMismatch (m_ifIndex, peerAddress);
 Lines 119-125    Link Here 
119
              m_stats.brokenMgt++;
118
              m_stats.brokenMgt++;
120
              return false;
119
              return false;
121
            }
120
            }
122
          aid = fields.aid;
123
          config = fields.config;
121
          config = fields.config;
124
        }
122
        }
125
      else if (actionValue.selfProtectedAction == WifiActionHeader::PEER_LINK_CONFIRM)
123
      else if (actionValue.selfProtectedAction == WifiActionHeader::PEER_LINK_CONFIRM)
 Lines 128-134    Link Here 
128
          PeerLinkConfirmStart peerFrame;
126
          PeerLinkConfirmStart peerFrame;
129
          packet->RemoveHeader (peerFrame);
127
          packet->RemoveHeader (peerFrame);
130
          fields = peerFrame.GetFields ();
128
          fields = peerFrame.GetFields ();
131
          NS_ASSERT (fields.subtype == actionValue.selfProtectedAction); 
132
          if (!(m_parent->CheckSupportedRates (fields.rates)))
129
          if (!(m_parent->CheckSupportedRates (fields.rates)))
133
            {
130
            {
134
              m_protocol->ConfigurationMismatch (m_ifIndex, peerAddress);
131
              m_protocol->ConfigurationMismatch (m_ifIndex, peerAddress);
 Lines 145-151    Link Here 
145
          PeerLinkCloseStart peerFrame;
142
          PeerLinkCloseStart peerFrame;
146
          packet->RemoveHeader (peerFrame);
143
          packet->RemoveHeader (peerFrame);
147
          fields = peerFrame.GetFields ();
144
          fields = peerFrame.GetFields ();
148
          NS_ASSERT (fields.subtype == actionValue.selfProtectedAction); 
149
          if (!fields.meshId.IsEqual ( *(m_protocol->GetMeshId ())))
145
          if (!fields.meshId.IsEqual ( *(m_protocol->GetMeshId ())))
150
            {
146
            {
151
              m_protocol->ConfigurationMismatch (m_ifIndex, peerAddress);
147
              m_protocol->ConfigurationMismatch (m_ifIndex, peerAddress);
 Lines 153-164    Link Here 
153
              m_stats.brokenMgt++;
149
              m_stats.brokenMgt++;
154
              return false;
150
              return false;
155
            }
151
            }
156
          aid = fields.aid;
157
          config = fields.config;
158
        }
152
        }
159
      else
153
      else
160
        {
154
        {
161
          NS_FATAL_ERROR ("Unknown subtype" << actionValue.selfProtectedAction);
155
          NS_FATAL_ERROR ("Unknown Self-protected Action type: " << actionValue.selfProtectedAction);
162
        }
156
        }
163
      Ptr<IePeerManagement> peerElement;
157
      Ptr<IePeerManagement> peerElement;
164
      //Peer Management element is the last element in this frame - so, we can use MeshInformationElementVector
158
      //Peer Management element is the last element in this frame - so, we can use MeshInformationElementVector
 Lines 167-187    Link Here 
167
      peerElement = DynamicCast<IePeerManagement>(elements.FindFirst (IE11S_PEERING_MANAGEMENT));
161
      peerElement = DynamicCast<IePeerManagement>(elements.FindFirst (IE11S_PEERING_MANAGEMENT));
168
162
169
      NS_ASSERT (peerElement != 0);
163
      NS_ASSERT (peerElement != 0);
170
      //Check taht frame subtype corresponds peer link subtype
164
      //Check that frame subtype corresponds to peer link subtype
171
      if (peerElement->SubtypeIsOpen ())
165
      if (peerElement->SubtypeIsOpen ())
172
        {
166
        {
173
          m_stats.rxOpen++;
167
          m_stats.rxOpen++;
174
         NS_ASSERT (actionValue.selfProtectedAction == WifiActionHeader::PEER_LINK_OPEN);
168
          NS_ASSERT (actionValue.selfProtectedAction == WifiActionHeader::PEER_LINK_OPEN);
175
        }
169
        }
176
      if (peerElement->SubtypeIsConfirm ())
170
      if (peerElement->SubtypeIsConfirm ())
177
        {
171
        {
178
          m_stats.rxConfirm++;
172
          m_stats.rxConfirm++;
179
       NS_ASSERT (actionValue.selfProtectedAction == WifiActionHeader::PEER_LINK_CONFIRM); 
173
          NS_ASSERT (actionValue.selfProtectedAction == WifiActionHeader::PEER_LINK_CONFIRM); 
180
        }
174
        }
181
      if (peerElement->SubtypeIsClose ())
175
      if (peerElement->SubtypeIsClose ())
182
        {
176
        {
183
          m_stats.rxClose++;
177
          m_stats.rxClose++;
184
           NS_ASSERT (actionValue.selfProtectedAction == WifiActionHeader::PEER_LINK_CLOSE); 
178
          NS_ASSERT (actionValue.selfProtectedAction == WifiActionHeader::PEER_LINK_CLOSE); 
185
        }
179
        }
186
      //Deliver Peer link management frame to protocol:
180
      //Deliver Peer link management frame to protocol:
187
      m_protocol->ReceivePeerLinkFrame (m_ifIndex, peerAddress, peerMpAddress, aid, *peerElement, config);
181
      m_protocol->ReceivePeerLinkFrame (m_ifIndex, peerAddress, peerMpAddress, aid, *peerElement, config);
 Lines 256-262    Link Here 
256
      m_stats.txOpen++;
250
      m_stats.txOpen++;
257
      WifiActionHeader::ActionValue action;
251
      WifiActionHeader::ActionValue action;
258
      action.selfProtectedAction = WifiActionHeader::PEER_LINK_OPEN;
252
      action.selfProtectedAction = WifiActionHeader::PEER_LINK_OPEN;
259
      fields.subtype = WifiActionHeader::PEER_LINK_OPEN;
260
      actionHdr.SetAction (WifiActionHeader::SELF_PROTECTED, action); 
253
      actionHdr.SetAction (WifiActionHeader::SELF_PROTECTED, action); 
261
      plinkOpen.SetPlinkOpenStart (fields);
254
      plinkOpen.SetPlinkOpenStart (fields);
262
      packet->AddHeader (plinkOpen);
255
      packet->AddHeader (plinkOpen);
 Lines 267-273    Link Here 
267
      PeerLinkConfirmStart::PlinkConfirmStartFields fields;
260
      PeerLinkConfirmStart::PlinkConfirmStartFields fields;
268
      fields.rates = m_parent->GetSupportedRates ();
261
      fields.rates = m_parent->GetSupportedRates ();
269
      fields.capability = 0;
262
      fields.capability = 0;
270
      fields.meshId = *(m_protocol->GetMeshId ());
271
      fields.config = meshConfig;
263
      fields.config = meshConfig;
272
      PeerLinkConfirmStart plinkConfirm;
264
      PeerLinkConfirmStart plinkConfirm;
273
      WifiActionHeader actionHdr;
265
      WifiActionHeader actionHdr;
 Lines 275-281    Link Here 
275
      WifiActionHeader::ActionValue action;
267
      WifiActionHeader::ActionValue action;
276
      action.selfProtectedAction = WifiActionHeader::PEER_LINK_CONFIRM; 
268
      action.selfProtectedAction = WifiActionHeader::PEER_LINK_CONFIRM; 
277
      fields.aid = aid;
269
      fields.aid = aid;
278
      fields.subtype = WifiActionHeader::PEER_LINK_CONFIRM;
279
      actionHdr.SetAction (WifiActionHeader::SELF_PROTECTED, action); 
270
      actionHdr.SetAction (WifiActionHeader::SELF_PROTECTED, action); 
280
      plinkConfirm.SetPlinkConfirmStart (fields);
271
      plinkConfirm.SetPlinkConfirmStart (fields);
281
      packet->AddHeader (plinkConfirm);
272
      packet->AddHeader (plinkConfirm);
 Lines 284-300    Link Here 
284
  if (peerElement.SubtypeIsClose ())
275
  if (peerElement.SubtypeIsClose ())
285
    {
276
    {
286
      PeerLinkCloseStart::PlinkCloseStartFields fields;
277
      PeerLinkCloseStart::PlinkCloseStartFields fields;
287
      fields.rates = m_parent->GetSupportedRates ();
288
      fields.capability = 0;
289
      fields.meshId = *(m_protocol->GetMeshId ());
278
      fields.meshId = *(m_protocol->GetMeshId ());
290
      fields.config = meshConfig;
291
      PeerLinkCloseStart plinkClose;
279
      PeerLinkCloseStart plinkClose;
292
      WifiActionHeader actionHdr;
280
      WifiActionHeader actionHdr;
293
      m_stats.txClose++;
281
      m_stats.txClose++;
294
      WifiActionHeader::ActionValue action;
282
      WifiActionHeader::ActionValue action;
295
      action.selfProtectedAction = WifiActionHeader::PEER_LINK_CLOSE; 
283
      action.selfProtectedAction = WifiActionHeader::PEER_LINK_CLOSE; 
296
      fields.subtype = WifiActionHeader::PEER_LINK_CLOSE;
297
      fields.reasonCode = peerElement.GetReasonCode ();
298
      actionHdr.SetAction (WifiActionHeader::SELF_PROTECTED, action); 
284
      actionHdr.SetAction (WifiActionHeader::SELF_PROTECTED, action); 
299
      plinkClose.SetPlinkCloseStart (fields);
285
      plinkClose.SetPlinkCloseStart (fields);
300
      packet->AddHeader (plinkClose);
286
      packet->AddHeader (plinkClose);
(-)a/src/mesh/model/flame/flame-header.cc (-2 / +2 lines)
 Lines 52-59    Link Here 
52
void
52
void
53
FlameHeader::Print (std::ostream &os) const
53
FlameHeader::Print (std::ostream &os) const
54
{
54
{
55
  os << "Cost             = " << (uint16_t) m_cost << std::endl << "Sequence number  = " << m_seqno
55
  os << "Cost= " << (uint16_t) m_cost << ", Sequence number= " << m_seqno
56
     << std::endl << "Orig Destination = " << m_origDst << std::endl << "Orig Source      = " << m_origSrc << std::endl;
56
     << ", Orig Destination= " << m_origDst << ", Orig Source= " << m_origSrc;
57
}
57
}
58
uint32_t
58
uint32_t
59
FlameHeader::GetSerializedSize (void) const
59
FlameHeader::GetSerializedSize (void) const
(-)a/src/mesh/test/dot11s/dot11s-test-suite.cc (-10 lines)
 Lines 218-227    Link Here 
218
  {
218
  {
219
    PeerLinkOpenStart a;
219
    PeerLinkOpenStart a;
220
    PeerLinkOpenStart::PlinkOpenStartFields fields;
220
    PeerLinkOpenStart::PlinkOpenStartFields fields;
221
    fields.subtype = (uint8_t)(WifiActionHeader::PEER_LINK_OPEN);
222
    fields.capability = 0;
221
    fields.capability = 0;
223
    fields.aid = 101;
224
    fields.reasonCode = 12;
225
    fields.meshId = IeMeshId ("qwertyuiop");
222
    fields.meshId = IeMeshId ("qwertyuiop");
226
    a.SetPlinkOpenStart (fields);
223
    a.SetPlinkOpenStart (fields);
227
    Ptr<Packet> packet = Create<Packet> ();
224
    Ptr<Packet> packet = Create<Packet> ();
 Lines 233-243    Link Here 
233
  {
230
  {
234
    PeerLinkConfirmStart a;
231
    PeerLinkConfirmStart a;
235
    PeerLinkConfirmStart::PlinkConfirmStartFields fields;
232
    PeerLinkConfirmStart::PlinkConfirmStartFields fields;
236
    fields.subtype = (uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM);
237
    fields.capability = 0;
233
    fields.capability = 0;
238
    fields.aid = 1234;
234
    fields.aid = 1234;
239
    fields.reasonCode = 12;
240
    fields.meshId = IeMeshId ("qwerty");
241
    a.SetPlinkConfirmStart (fields);
235
    a.SetPlinkConfirmStart (fields);
242
    Ptr<Packet> packet = Create<Packet> ();
236
    Ptr<Packet> packet = Create<Packet> ();
243
    packet->AddHeader (a);
237
    packet->AddHeader (a);
 Lines 248-258    Link Here 
248
  {
242
  {
249
    PeerLinkCloseStart a;
243
    PeerLinkCloseStart a;
250
    PeerLinkCloseStart::PlinkCloseStartFields fields;
244
    PeerLinkCloseStart::PlinkCloseStartFields fields;
251
    fields.subtype = (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE);
252
    fields.capability = 0;
253
    fields.aid = 10;
254
    fields.meshId = IeMeshId ("qqq");
245
    fields.meshId = IeMeshId ("qqq");
255
    fields.reasonCode = 12;
256
    a.SetPlinkCloseStart (fields);
246
    a.SetPlinkCloseStart (fields);
257
    Ptr<Packet> packet = Create<Packet> ();
247
    Ptr<Packet> packet = Create<Packet> ();
258
    packet->AddHeader (a);
248
    packet->AddHeader (a);
(-)a/src/wifi/model/mgt-headers.cc (+60 lines)
 Lines 20-25    Link Here 
20
 * Author: Mirko Banchi <mk.banchi@gmail.com>
20
 * Author: Mirko Banchi <mk.banchi@gmail.com>
21
 */
21
 */
22
22
23
#include <sstream>
23
#include "mgt-headers.h"
24
#include "mgt-headers.h"
24
#include "ns3/simulator.h"
25
#include "ns3/simulator.h"
25
#include "ns3/assert.h"
26
#include "ns3/assert.h"
 Lines 729-737    Link Here 
729
  return GetTypeId ();
730
  return GetTypeId ();
730
}
731
}
731
732
733
std::string
734
WifiActionHeader::CategoryValueToString (CategoryValue value) const
735
{
736
  if (value == BLOCK_ACK)
737
    {
738
      return "BlockAck"; 
739
    }
740
  else if (value == MESH)
741
    {  
742
      return "Mesh";
743
    }
744
  else if (value == SELF_PROTECTED)
745
    {
746
      return "SelfProtected";
747
    }
748
  else if (value == VENDOR_SPECIFIC_ACTION)
749
    {
750
      return "VendorSpecificAction";
751
    }
752
  else
753
    {
754
      std::ostringstream convert;
755
      convert << value;
756
      return convert.str ();
757
    }
758
}
759
std::string
760
WifiActionHeader::SelfProtectedActionValueToString (SelfProtectedActionValue value) const
761
{
762
  if (value == PEER_LINK_OPEN)
763
    {
764
      return "PeerLinkOpen";
765
    }
766
  else if (value == PEER_LINK_CONFIRM)
767
    {
768
      return "PeerLinkConfirm";
769
    }
770
  else if (value == PEER_LINK_CLOSE)
771
    {
772
      return "PeerLinkClose";
773
    }
774
  else if (value == GROUP_KEY_INFORM)
775
    {
776
      return "GroupKeyInform";
777
    }
778
  else if (value == GROUP_KEY_ACK)
779
    {
780
      return "GroupKeyAck";
781
    }
782
  else
783
    {
784
      std::ostringstream convert;
785
      convert << value;
786
      return convert.str ();
787
    }
788
}
789
732
void
790
void
733
WifiActionHeader::Print (std::ostream &os) const
791
WifiActionHeader::Print (std::ostream &os) const
734
{
792
{
793
  os << "category=" << CategoryValueToString ((CategoryValue) m_category) 
794
     << ", value=" << SelfProtectedActionValueToString ((SelfProtectedActionValue) m_actionValue);
735
}
795
}
736
796
737
uint32_t
797
uint32_t
(-)a/src/wifi/model/mgt-headers.h (+2 lines)
 Lines 473-478    Link Here 
473
473
474
474
475
private:
475
private:
476
  std::string CategoryValueToString (CategoryValue value) const;
477
  std::string SelfProtectedActionValueToString (SelfProtectedActionValue value) const;
476
  uint8_t m_category; //!< Category of the action
478
  uint8_t m_category; //!< Category of the action
477
  uint8_t m_actionValue; //!< Action value
479
  uint8_t m_actionValue; //!< Action value
478
};
480
};
(-)a/src/wifi/model/wifi-information-element-vector.cc (-1 / +6 lines)
 Lines 115-121    Link Here 
115
void
115
void
116
WifiInformationElementVector::Print (std::ostream & os) const
116
WifiInformationElementVector::Print (std::ostream & os) const
117
{
117
{
118
  /// \todo
118
  for (IE_VECTOR::const_iterator i = m_elements.begin (); i != m_elements.end (); i++)
119
    {
120
       os << "(";
121
      (*i)->Print (os);
122
       os << ")";
123
    }
119
}
124
}
120
125
121
void
126
void
(-)a/src/wifi/model/wifi-mac-header.cc (-6 / +6 lines)
 Lines 1091-1102    Link Here 
1091
    case WIFI_MAC_MGT_ACTION_NO_ACK:
1091
    case WIFI_MAC_MGT_ACTION_NO_ACK:
1092
      PrintFrameControl (os);
1092
      PrintFrameControl (os);
1093
      os << " Duration/ID=" << m_duration << "us"
1093
      os << " Duration/ID=" << m_duration << "us"
1094
         << "DA=" << m_addr1 << ", SA=" << m_addr2 << ", BSSID=" << m_addr3
1094
         << ", DA=" << m_addr1 << ", SA=" << m_addr2 << ", BSSID=" << m_addr3
1095
         << ", FragNumber=" << std::hex << (int) m_seqFrag << std::dec << ", SeqNumber=" << m_seqSeq;
1095
         << ", FragNumber=" << std::hex << (int) m_seqFrag << std::dec << ", SeqNumber=" << m_seqSeq;
1096
      break;
1096
      break;
1097
    case WIFI_MAC_MGT_MULTIHOP_ACTION:
1097
    case WIFI_MAC_MGT_MULTIHOP_ACTION:
1098
      os << " Duration/ID=" << m_duration << "us"
1098
      os << " Duration/ID=" << m_duration << "us"
1099
         << "RA=" << m_addr1 << ", TA=" << m_addr2 << ", DA=" << m_addr3
1099
         << ", RA=" << m_addr1 << ", TA=" << m_addr2 << ", DA=" << m_addr3
1100
         << ", FragNumber=" << std::hex << (int) m_seqFrag << std::dec << ", SeqNumber=" << m_seqSeq;
1100
         << ", FragNumber=" << std::hex << (int) m_seqFrag << std::dec << ", SeqNumber=" << m_seqSeq;
1101
      break;
1101
      break;
1102
    case WIFI_MAC_DATA:
1102
    case WIFI_MAC_DATA:
 Lines 1104-1122    Link Here 
1104
      os << " Duration/ID=" << m_duration << "us";
1104
      os << " Duration/ID=" << m_duration << "us";
1105
      if (!m_ctrlToDs && !m_ctrlFromDs)
1105
      if (!m_ctrlToDs && !m_ctrlFromDs)
1106
        {
1106
        {
1107
          os << "DA=" << m_addr1 << ", SA=" << m_addr2 << ", BSSID=" << m_addr3;
1107
          os << ", DA=" << m_addr1 << ", SA=" << m_addr2 << ", BSSID=" << m_addr3;
1108
        }
1108
        }
1109
      else if (!m_ctrlToDs && m_ctrlFromDs)
1109
      else if (!m_ctrlToDs && m_ctrlFromDs)
1110
        {
1110
        {
1111
          os << "DA=" << m_addr1 << ", SA=" << m_addr3 << ", BSSID=" << m_addr2;
1111
          os << ", DA=" << m_addr1 << ", SA=" << m_addr3 << ", BSSID=" << m_addr2;
1112
        }
1112
        }
1113
      else if (m_ctrlToDs && !m_ctrlFromDs)
1113
      else if (m_ctrlToDs && !m_ctrlFromDs)
1114
        {
1114
        {
1115
          os << "DA=" << m_addr3 << ", SA=" << m_addr2 << ", BSSID=" << m_addr1;
1115
          os << ", DA=" << m_addr3 << ", SA=" << m_addr2 << ", BSSID=" << m_addr1;
1116
        }
1116
        }
1117
      else if (m_ctrlToDs && m_ctrlFromDs)
1117
      else if (m_ctrlToDs && m_ctrlFromDs)
1118
        {
1118
        {
1119
          os << "DA=" << m_addr3 << ", SA=" << m_addr4 << ", RA=" << m_addr1 << ", TA=" << m_addr2;
1119
          os << ", DA=" << m_addr3 << ", SA=" << m_addr4 << ", RA=" << m_addr1 << ", TA=" << m_addr2;
1120
        }
1120
        }
1121
      else
1121
      else
1122
        {
1122
        {

Return to bug 1482