equal
deleted
inserted
replaced
152 * arrived at the device. |
152 * arrived at the device. |
153 * |
153 * |
154 * @see PointToPointChannel |
154 * @see PointToPointChannel |
155 * @param p a reference to the received packet |
155 * @param p a reference to the received packet |
156 */ |
156 */ |
157 void Receive (Packet& p); |
157 void Receive (Ptr<Packet> p); |
158 protected: |
158 protected: |
159 /** |
159 /** |
160 * Create a Trace Resolver for events in the net device. |
160 * Create a Trace Resolver for events in the net device. |
161 * |
161 * |
162 * @see class TraceResolver |
162 * @see class TraceResolver |
198 private: |
198 private: |
199 /** |
199 /** |
200 * Adds the necessary headers and trailers to a packet of data in order to |
200 * Adds the necessary headers and trailers to a packet of data in order to |
201 * respect the protocol implemented by the agent. |
201 * respect the protocol implemented by the agent. |
202 */ |
202 */ |
203 void AddHeader(Packet& p, uint16_t protocolNumber); |
203 void AddHeader(Ptr<Packet> p, uint16_t protocolNumber); |
204 /** |
204 /** |
205 * Removes, from a packet of data, all headers and trailers that |
205 * Removes, from a packet of data, all headers and trailers that |
206 * relate to the protocol implemented by the agent |
206 * relate to the protocol implemented by the agent |
207 * \return Returns true if the packet should be forwarded up the |
207 * \return Returns true if the packet should be forwarded up the |
208 * protocol stack. |
208 * protocol stack. |
209 */ |
209 */ |
210 bool ProcessHeader(Packet& p, uint16_t& param); |
210 bool ProcessHeader(Ptr<Packet> p, uint16_t& param); |
211 /** |
211 /** |
212 * Send a Packet Down the Wire. |
212 * Send a Packet Down the Wire. |
213 * |
213 * |
214 * The SendTo method is defined as the standard way that the level three |
214 * The SendTo method is defined as the standard way that the level three |
215 * protocol uses to tell a NetDevice to send a packet. SendTo is declared |
215 * protocol uses to tell a NetDevice to send a packet. SendTo is declared |
219 * @param p a reference to the packet to send |
219 * @param p a reference to the packet to send |
220 * @param dest a reference to the Address of the destination device |
220 * @param dest a reference to the Address of the destination device |
221 * @param protocolNumber Protocol Number used to find protocol touse |
221 * @param protocolNumber Protocol Number used to find protocol touse |
222 * @returns true if success, false on failure |
222 * @returns true if success, false on failure |
223 */ |
223 */ |
224 virtual bool SendTo (const Packet& p, const Address& dest, |
224 virtual bool SendTo (Ptr<Packet> p, const Address& dest, |
225 uint16_t protocolNumber); |
225 uint16_t protocolNumber); |
226 /** |
226 /** |
227 * Start Sending a Packet Down the Wire. |
227 * Start Sending a Packet Down the Wire. |
228 * |
228 * |
229 * The TransmitStart method is the method that is used internally in the |
229 * The TransmitStart method is the method that is used internally in the |
236 * @see PointToPointChannel::TransmitStart () |
236 * @see PointToPointChannel::TransmitStart () |
237 * @see TransmitCompleteEvent () |
237 * @see TransmitCompleteEvent () |
238 * @param p a reference to the packet to send |
238 * @param p a reference to the packet to send |
239 * @returns true if success, false on failure |
239 * @returns true if success, false on failure |
240 */ |
240 */ |
241 bool TransmitStart (Packet &p); |
241 bool TransmitStart (Ptr<Packet> p); |
242 /** |
242 /** |
243 * Stop Sending a Packet Down the Wire and Begin the Interframe Gap. |
243 * Stop Sending a Packet Down the Wire and Begin the Interframe Gap. |
244 * |
244 * |
245 * The TransmitComplete method is used internally to finish the process |
245 * The TransmitComplete method is used internally to finish the process |
246 * of sending a packet out on the channel. |
246 * of sending a packet out on the channel. |
292 * fire. |
292 * fire. |
293 * |
293 * |
294 * @see class CallBackTraceSource |
294 * @see class CallBackTraceSource |
295 * @see class TraceResolver |
295 * @see class TraceResolver |
296 */ |
296 */ |
297 CallbackTraceSource<const Packet &> m_rxTrace; |
297 CallbackTraceSource<Ptr<const Packet> > m_rxTrace; |
298 /** |
298 /** |
299 * Default data rate. Used for all newly created p2p net devices |
299 * Default data rate. Used for all newly created p2p net devices |
300 */ |
300 */ |
301 static DataRateDefaultValue g_defaultRate; |
301 static DataRateDefaultValue g_defaultRate; |
302 |
302 |