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) 2008,2009 IITP RAS | 3 * Copyright (c) 2008,2009 IITP RAS |
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 * to really send packet using routing information. | 95 * to really send packet using routing information. |
96 */ | 96 */ |
97 virtual bool RequestRoute (uint32_t sourceIface, const Mac48Address source, co
nst Mac48Address destination, Ptr< | 97 virtual bool RequestRoute (uint32_t sourceIface, const Mac48Address source, co
nst Mac48Address destination, Ptr< |
98 const Packet> packet, uint16_t protocolType, RouteReplyCallback routeReply
) = 0; | 98 const Packet> packet, uint16_t protocolType, RouteReplyCallback routeReply
) = 0; |
99 /** | 99 /** |
100 * \brief When packet is ready to go to upper layer, protocol must | 100 * \brief When packet is ready to go to upper layer, protocol must |
101 * remove all its information: tags, header, etc. So, | 101 * remove all its information: tags, header, etc. So, |
102 * MeshPointDevice must call this method when passing a packet to | 102 * MeshPointDevice must call this method when passing a packet to |
103 * upper layer. | 103 * upper layer. |
104 * \returns true if packet shall not be dropeed, false otherwise. | 104 * \returns true if packet shall not be dropeed, false otherwise. |
105 * \param sourceIface the incoming interface of the packet | 105 * \param fromIface the incoming interface of the packet |
106 * \param source source address | 106 * \param source source address |
107 * \param destination destination address | 107 * \param destination destination address |
108 * \param packet the packet to be handled | 108 * \param packet the packet to be handled |
109 * \param protocolType protocol ID, needed to form a proper MAC-layer header | 109 * \param protocolType protocol ID, needed to form a proper MAC-layer header |
110 * \attention protocol type is passed by reference, because may be | 110 * \attention protocol type is passed by reference, because may be |
111 * changed | 111 * changed |
112 */ | 112 */ |
113 virtual bool RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source
, const Mac48Address destination, Ptr< | 113 virtual bool RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source
, const Mac48Address destination, Ptr< |
114 Packet> packet, uint16_t & protocolType) = 0; | 114 Packet> packet, uint16_t & protocolType) = 0; |
115 /// Set host mesh point, analog of SetNode (...) methods for upper layer proto
cols. | 115 /// Set host mesh point, analog of SetNode (...) methods for upper layer proto
cols. |
116 void | 116 void |
117 SetMeshPoint (Ptr<MeshPointDevice> mp); | 117 SetMeshPoint (Ptr<MeshPointDevice> mp); |
118 /// Each mesh protocol must be installed on the mesh point to work. | 118 /// Each mesh protocol must be installed on the mesh point to work. |
119 Ptr<MeshPointDevice> | 119 Ptr<MeshPointDevice> |
120 GetMeshPoint () const; | 120 GetMeshPoint () const; |
121 protected: | 121 protected: |
122 /// Host mesh point | 122 /// Host mesh point |
123 Ptr<MeshPointDevice> m_mp; | 123 Ptr<MeshPointDevice> m_mp; |
124 }; | 124 }; |
125 }//namespace ns3 | 125 }//namespace ns3 |
126 #endif | 126 #endif |
LEFT | RIGHT |