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) 2004 Francisco J. Ros | 3 * Copyright (c) 2004 Francisco J. Ros |
4 * Copyright (c) 2007 INESC Porto | 4 * Copyright (c) 2007 INESC Porto |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License version 2 as | 7 * it under the terms of the GNU General Public License version 2 as |
8 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1619 } | 1619 } |
1620 | 1620 |
1621 void | 1621 void |
1622 RoutingProtocol::SendPacket (Ptr<Packet> packet, | 1622 RoutingProtocol::SendPacket (Ptr<Packet> packet, |
1623 const MessageList &containedMessages) | 1623 const MessageList &containedMessages) |
1624 { | 1624 { |
1625 NS_LOG_DEBUG ("OLSR node " << m_mainAddress << " sending a OLSR packet"); | 1625 NS_LOG_DEBUG ("OLSR node " << m_mainAddress << " sending a OLSR packet"); |
1626 | 1626 |
1627 // Add a header | 1627 // Add a header |
1628 olsr::PacketHeader header; | 1628 olsr::PacketHeader header; |
1629 header.SetPacketLength (static_cast<uint16_t>(header.GetSerializedSize () + pa
cket->GetSize ())); | 1629 header.SetPacketLength (static_cast<uint16_t> (header.GetSerializedSize () + p
acket->GetSize ())); |
1630 header.SetPacketSequenceNumber (GetPacketSequenceNumber ()); | 1630 header.SetPacketSequenceNumber (GetPacketSequenceNumber ()); |
1631 packet->AddHeader (header); | 1631 packet->AddHeader (header); |
1632 | 1632 |
1633 // Trace it | 1633 // Trace it |
1634 m_txPacketTrace (header, containedMessages); | 1634 m_txPacketTrace (header, containedMessages); |
1635 | 1635 |
1636 // Send it | 1636 // Send it |
1637 for (std::map<Ptr<Socket>, Ipv4InterfaceAddress>::const_iterator i = | 1637 for (std::map<Ptr<Socket>, Ipv4InterfaceAddress>::const_iterator i = |
1638 m_sendSockets.begin (); i != m_sendSockets.end (); i++) | 1638 m_sendSockets.begin (); i != m_sendSockets.end (); i++) |
1639 { | 1639 { |
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3044 NS_LOG_DEBUG ("** Routing table dump end."); | 3044 NS_LOG_DEBUG ("** Routing table dump end."); |
3045 #endif // NS3_LOG_ENABLE | 3045 #endif // NS3_LOG_ENABLE |
3046 | 3046 |
3047 return false; | 3047 return false; |
3048 } | 3048 } |
3049 } | 3049 } |
3050 } | 3050 } |
3051 void | 3051 void |
3052 RoutingProtocol::NotifyInterfaceUp (uint32_t i) | 3052 RoutingProtocol::NotifyInterfaceUp (uint32_t i) |
3053 { | 3053 { |
3054 NS_UNUSED(i); | 3054 NS_UNUSED (i); |
3055 } | 3055 } |
3056 void | 3056 void |
3057 RoutingProtocol::NotifyInterfaceDown (uint32_t i) | 3057 RoutingProtocol::NotifyInterfaceDown (uint32_t i) |
3058 { | 3058 { |
3059 NS_UNUSED(i); | 3059 NS_UNUSED (i); |
3060 } | 3060 } |
3061 void | 3061 void |
3062 RoutingProtocol::NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress addr
ess) | 3062 RoutingProtocol::NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress addr
ess) |
3063 { | 3063 { |
3064 NS_UNUSED(interface); | 3064 NS_UNUSED (interface); |
3065 NS_UNUSED(address); | 3065 NS_UNUSED (address); |
3066 } | 3066 } |
3067 void | 3067 void |
3068 RoutingProtocol::NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress a
ddress) | 3068 RoutingProtocol::NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress a
ddress) |
3069 { | 3069 { |
3070 NS_UNUSED(interface); | 3070 NS_UNUSED (interface); |
3071 NS_UNUSED(address); | 3071 NS_UNUSED (address); |
3072 } | 3072 } |
3073 | 3073 |
3074 | 3074 |
3075 void | 3075 void |
3076 RoutingProtocol::AddEntry (Ipv4Address const &dest, | 3076 RoutingProtocol::AddEntry (Ipv4Address const &dest, |
3077 Ipv4Address const &next, | 3077 Ipv4Address const &next, |
3078 uint32_t interface, | 3078 uint32_t interface, |
3079 uint32_t distance) | 3079 uint32_t distance) |
3080 { | 3080 { |
3081 NS_LOG_FUNCTION (this << dest << next << interface << distance << m_mainAddres
s); | 3081 NS_LOG_FUNCTION (this << dest << next << interface << distance << m_mainAddres
s); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3187 Ptr<const Ipv4StaticRouting> | 3187 Ptr<const Ipv4StaticRouting> |
3188 RoutingProtocol::GetRoutingTableAssociation () const | 3188 RoutingProtocol::GetRoutingTableAssociation () const |
3189 { | 3189 { |
3190 return m_hnaRoutingTable; | 3190 return m_hnaRoutingTable; |
3191 } | 3191 } |
3192 | 3192 |
3193 } // namespace olsr | 3193 } // namespace olsr |
3194 } // namespace ns3 | 3194 } // namespace ns3 |
3195 | 3195 |
3196 | 3196 |
LEFT | RIGHT |