A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
openflow-switch-net-device.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: GPL-2.0-only
3 *
4 * Author: Blake Hurd <naimorai@gmail.com>
5 */
6
7/**
8 * \defgroup openflow OpenFlow Switch Device
9 * This section documents the API of the ns-3 OpenFlow module. For a generic functional description,
10 * please refer to the ns-3 manual.
11 */
12
13#ifndef OPENFLOW_SWITCH_NET_DEVICE_H
14#define OPENFLOW_SWITCH_NET_DEVICE_H
15
16#include "openflow-interface.h"
17
18#include "ns3/arp-header.h"
19#include "ns3/arp-l3-protocol.h"
20#include "ns3/bridge-channel.h"
21#include "ns3/enum.h"
22#include "ns3/ethernet-header.h"
23#include "ns3/integer.h"
24#include "ns3/ipv4-l3-protocol.h"
25#include "ns3/log.h"
26#include "ns3/mac48-address.h"
27#include "ns3/node.h"
28#include "ns3/simulator.h"
29#include "ns3/string.h"
30#include "ns3/tcp-header.h"
31#include "ns3/udp-header.h"
32#include "ns3/uinteger.h"
33
34#include <map>
35#include <set>
36
37namespace ns3
38{
39
40/**
41 * \ingroup openflow
42 * \brief A net device that switches multiple LAN segments via an OpenFlow-compatible flow table
43 *
44 * The OpenFlowSwitchNetDevice object aggregates multiple netdevices as ports
45 * and acts like a switch. It implements OpenFlow-compatibility,
46 * according to the OpenFlow Switch Specification v0.8.9
47 * <www.openflowswitch.org/documents/openflow-spec-v0.8.9.pdf>.
48 * It implements a flow table that all received packets are run through.
49 * It implements a connection to a controller via a subclass of the Controller class,
50 * which can send messages to manipulate the flow table, thereby manipulating
51 * how the OpenFlow switch behaves.
52 *
53 * There are two controllers available in the original package. DropController
54 * builds a flow for each received packet to drop all packets it matches (this
55 * demonstrates the flow table's basic implementation), and the LearningController
56 * implements a "learning switch" algorithm (see 802.1D), where incoming unicast
57 * frames from one port may occasionally be forwarded throughout all other ports,
58 * but usually they are forwarded only to a single correct output port.
59 *
60 * \attention The Spanning Tree Protocol part of 802.1D is not
61 * implemented. Therefore, you have to be careful not to create
62 * bridging loops, or else the network will collapse.
63 *
64 * \attention Each NetDevice used must only be assigned a Mac Address, adding it
65 * to an Ipv4 or Ipv6 layer will cause an error. It also must support a SendFrom
66 * call.
67 */
68
69/**
70 * \ingroup openflow
71 * \ingroup tests
72 * \defgroup openflow-tests OpenFlow module tests
73 */
74
75/**
76 * \ingroup openflow
77 * \brief A net device that switches multiple LAN segments via an OpenFlow-compatible flow table
78 */
80{
81 public:
82 /**
83 * Register this type.
84 * \return The TypeId.
85 */
86 static TypeId GetTypeId();
87
88 /**
89 * \name Descriptive Data
90 * \brief OpenFlowSwitchNetDevice Description Data
91 *
92 * These four data describe the OpenFlowSwitchNetDevice as if it were
93 * a real OpenFlow switch.
94 *
95 * There is a type of stats request that OpenFlow switches are supposed
96 * to handle that returns the description of the OpenFlow switch. Currently
97 * manufactured by "The ns-3 team", software description is "Simulated
98 * OpenFlow Switch", and the other two are "N/A".
99 * @{
100 */
101 /** \returns The descriptive string. */
102 static const char* GetManufacturerDescription();
103 static const char* GetHardwareDescription();
104 static const char* GetSoftwareDescription();
105 static const char* GetSerialNumber();
106 /**@}*/
107
109 ~OpenFlowSwitchNetDevice() override;
110
111 /**
112 * \brief Set up the Switch's controller connection.
113 *
114 * \param c Pointer to a Controller.
115 */
117
118 /**
119 * \brief Add a 'port' to a switch device
120 *
121 * This method adds a new switch port to a OpenFlowSwitchNetDevice, so that
122 * the new switch port NetDevice becomes part of the switch and L2
123 * frames start being forwarded to/from this NetDevice.
124 *
125 * \note The netdevice that is being added as switch port must
126 * _not_ have an IP address. In order to add IP connectivity to a
127 * bridging node you must enable IP on the OpenFlowSwitchNetDevice itself,
128 * never on its port netdevices.
129 *
130 * \param switchPort The port to add.
131 * \return 0 if everything's ok, otherwise an error number.
132 * Possible error numbers: EXFULL
133 */
134 int AddSwitchPort(Ptr<NetDevice> switchPort);
135
136 /**
137 * \brief Add a virtual port to a switch device
138 *
139 * The Ericsson OFSID has the concept of virtual ports and virtual
140 * port tables. These are implemented in the OpenFlowSwitchNetDevice, but
141 * don't have an understood use [perhaps it may have to do with
142 * MPLS integration].
143 *
144 * Possible error numbers: EINVAL
145 *
146 * \param ovpm The data for adding a virtual port.
147 * \return 0 if everything's ok, otherwise an error number.
148 */
149 int AddVPort(const ofp_vport_mod* ovpm);
150
151 /**
152 * \brief Stats callback is ready for a dump.
153 *
154 * Controllers have a callback system for status requests which calls this function.
155 *
156 * \param cb_ The callback data.
157 * \return 0 if everything's ok, otherwise an error number.
158 */
160
161 /**
162 * \brief Stats callback is done.
163 *
164 * Controllers have a callback system for status requests which calls this function.
165 *
166 * \param cb_ The callback data.
167 */
169
170 /**
171 * \brief Called from the OpenFlow Interface to output the Packet on either a Port or the
172 * Controller
173 *
174 * \param packet_uid Packet UID; used to fetch the packet and its metadata.
175 * \param in_port The index of the port the Packet was initially received on.
176 * \param max_len The maximum number of bytes the caller wants to be sent; a value of 0
177 * indicates the entire packet should be sent. Used when outputting to controller.
178 * \param out_port The port we want to output on.
179 * \param ignore_no_fwd If true, Ports that are set to not forward are forced to forward.
180 */
181 void DoOutput(uint32_t packet_uid,
182 int in_port,
183 size_t max_len,
184 int out_port,
185 bool ignore_no_fwd);
186
187 /**
188 * \brief The registered controller calls this method when sending a message to the switch.
189 *
190 * \param msg The message received from the controller.
191 * \param length Length of the message.
192 * \return 0 if everything's ok, otherwise an error number.
193 */
194 int ForwardControlInput(const void* msg, size_t length);
195
196 /**
197 * \return The flow table chain.
198 */
199 sw_chain* GetChain();
200
201 /**
202 * \return Number of switch ports attached to this switch.
203 */
205
206 /**
207 * \param p The Port to get the index of.
208 * \return The index of the provided Port.
209 */
211
212 /**
213 * \param n index of the Port.
214 * \return The Port.
215 */
217
218 /**
219 * \return The virtual port table.
220 */
221 vport_table_t GetVPortTable();
222
223 // From NetDevice
224 void SetIfIndex(const uint32_t index) override;
225 uint32_t GetIfIndex() const override;
226 Ptr<Channel> GetChannel() const override;
227 void SetAddress(Address address) override;
228 Address GetAddress() const override;
229 bool SetMtu(const uint16_t mtu) override;
230 uint16_t GetMtu() const override;
231 bool IsLinkUp() const override;
232 void AddLinkChangeCallback(Callback<void> callback) override;
233 bool IsBroadcast() const override;
234 Address GetBroadcast() const override;
235 bool IsMulticast() const override;
236 Address GetMulticast(Ipv4Address multicastGroup) const override;
237 bool IsPointToPoint() const override;
238 bool IsBridge() const override;
239 bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber) override;
240 bool SendFrom(Ptr<Packet> packet,
241 const Address& source,
242 const Address& dest,
243 uint16_t protocolNumber) override;
244 Ptr<Node> GetNode() const override;
245 void SetNode(Ptr<Node> node) override;
246 bool NeedsArp() const override;
249 bool SupportsSendFrom() const override;
250 Address GetMulticast(Ipv6Address addr) const override;
251
252 protected:
253 void DoDispose() override;
254
255 /**
256 * Called when a packet is received on one of the switch's ports.
257 *
258 * \param netdev The port the packet was received on.
259 * \param packet The Packet itself.
260 * \param protocol The protocol defining the Packet.
261 * \param src The source address of the Packet.
262 * \param dst The destination address of the Packet.
263 * \param packetType Type of the packet.
264 */
266 Ptr<const Packet> packet,
267 uint16_t protocol,
268 const Address& src,
269 const Address& dst,
270 PacketType packetType);
271
272 /**
273 * Takes a packet and generates an OpenFlow buffer from it, loading the packet data as well as
274 * its headers.
275 *
276 * \param packet The packet.
277 * \param src The source address.
278 * \param dst The destination address.
279 * \param mtu The Maximum Transmission Unit.
280 * \param protocol The protocol defining the packet.
281 * \return The OpenFlow Buffer created from the packet.
282 */
283 ofpbuf* BufferFromPacket(Ptr<const Packet> packet,
284 Address src,
285 Address dst,
286 int mtu,
287 uint16_t protocol);
288
289 private:
290 /**
291 * Add a flow.
292 *
293 * Possible error numbers: ENOMEM, ENOBUFS, ESRCH
294 *
295 * \param ofm The flow data to add.
296 * \return 0 if everything's ok, otherwise an error number.
297 */
298 int AddFlow(const ofp_flow_mod* ofm);
299
300 /**
301 * Modify a flow.
302 *
303 * \param ofm The flow data to modify.
304 * \return 0 if everything's ok, otherwise an error number.
305 */
306 int ModFlow(const ofp_flow_mod* ofm);
307
308 /**
309 * Send packets out all the ports except the originating one
310 *
311 * \param packet_uid Packet UID; used to fetch the packet and its metadata.
312 * \param in_port The index of the port the Packet was initially received on. This port doesn't
313 * forward when flooding.
314 * \param flood If true, don't send out on the ports with flooding disabled.
315 * \return 0 if everything's ok, otherwise an error number.
316 */
317 int OutputAll(uint32_t packet_uid, int in_port, bool flood);
318
319 /**
320 * Sends a copy of the Packet over the provided output port
321 *
322 * \param packet_uid Packet UID; used to fetch the packet and its metadata.
323 * \param out_port Output port.
324 */
325 void OutputPacket(uint32_t packet_uid, int out_port);
326
327 /**
328 * Seeks to send out a Packet over the provided output port. This is called generically
329 * when we may or may not know the specific port we're outputting on. There are many
330 * pre-set types of port options besides a Port that's hooked to our OpenFlowSwitchNetDevice.
331 * For example, it could be outputting as a flood, or seeking to output to the controller.
332 *
333 * \param packet_uid Packet UID; used to fetch the packet and its metadata.
334 * \param in_port The index of the port the Packet was initially received on.
335 * \param out_port The port we want to output on.
336 * \param ignore_no_fwd If true, Ports that are set to not forward are forced to forward.
337 */
338 void OutputPort(uint32_t packet_uid, int in_port, int out_port, bool ignore_no_fwd);
339
340 /**
341 * Sends a copy of the Packet to the controller. If the packet can be saved
342 * in an OpenFlow buffer, then only the first 'max_len' bytes of the packet
343 * are sent; otherwise, all of the packet is sent.
344 *
345 * \param packet_uid Packet UID; used to fetch the packet and its metadata.
346 * \param in_port The index of the port the Packet was initially received on.
347 * \param max_len The maximum number of bytes that the caller wants to be sent; a value of 0
348 * indicates the entire packet should be sent.
349 * \param reason Why the packet is being sent.
350 */
351 void OutputControl(uint32_t packet_uid, int in_port, size_t max_len, int reason);
352
353 /**
354 * If an error message happened during the controller's request, send it to the controller.
355 *
356 * \param type The type of error.
357 * \param code The error code.
358 * \param data The faulty data that lead to the error.
359 * \param len The length of the faulty data.
360 */
361 void SendErrorMsg(uint16_t type, uint16_t code, const void* data, size_t len);
362
363 /**
364 * Send a reply about this OpenFlow switch's features to the controller.
365 *
366 * List of capabilities and actions to support are found in the specification
367 * <www.openflowswitch.org/documents/openflow-spec-v0.8.9.pdf>.
368 *
369 * Supported capabilities and actions are defined in the openflow interface.
370 * To recap, flow status, flow table status, port status, virtual port table
371 * status can all be requested. It can also transmit over multiple physical
372 * interfaces.
373 *
374 * It supports every action: outputting over a port, and all of the flow table
375 * manipulation actions: setting the 802.1q VLAN ID, the 802.1q priority,
376 * stripping the 802.1 header, setting the Ethernet source address and destination,
377 * setting the IP source address and destination, setting the TCP/UDP source address
378 * and destination, and setting the MPLS label and EXP bits.
379 *
380 * \attention Capabilities STP (Spanning Tree Protocol) and IP packet
381 * reassembly are not currently supported.
382 *
383 */
384 void SendFeaturesReply();
385
386 /**
387 * Send a reply to the controller that a specific flow has expired.
388 *
389 * \param flow The flow that expired.
390 * \param reason The reason for sending this expiration notification.
391 */
392 void SendFlowExpired(sw_flow* flow, ofp_flow_expired_reason reason);
393
394 /**
395 * Send a reply about a Port's status to the controller.
396 *
397 * \param p The port to get status from.
398 * \param status The reason for sending this reply.
399 */
400 void SendPortStatus(ofi::Port p, uint8_t status);
401
402 /**
403 * Send a reply about this OpenFlow switch's virtual port table features to the controller.
404 */
406
407 /**
408 * Send a message to the controller. This method is the key
409 * to communicating with the controller, it does the actual
410 * sending. The other Send methods call this one when they
411 * are ready to send a message.
412 *
413 * \param buffer Buffer of the message to send out.
414 * \return 0 if successful, otherwise an error number.
415 */
416 int SendOpenflowBuffer(ofpbuf* buffer);
417
418 /**
419 * Run the packet through the flow table. Looks up in the flow table for a match.
420 * If it doesn't match, it forwards the packet to the registered controller, if the flag is set.
421 *
422 * \param packet_uid Packet UID; used to fetch the packet and its metadata.
423 * \param port The port this packet was received over.
424 * \param send_to_controller If set, sends to the controller if the packet isn't matched.
425 */
426 void RunThroughFlowTable(uint32_t packet_uid, int port, bool send_to_controller = true);
427
428 /**
429 * Run the packet through the vport table. As with AddVPort,
430 * this doesn't have an understood use yet.
431 *
432 * \param packet_uid Packet UID; used to fetch the packet and its metadata.
433 * \param port The port this packet was received over.
434 * \param vport The virtual port this packet identifies itself by.
435 * \return 0 if everything's ok, otherwise an error number.
436 */
437 int RunThroughVPortTable(uint32_t packet_uid, int port, uint32_t vport);
438
439 /**
440 * Called by RunThroughFlowTable on a scheduled delay
441 * to account for the flow table lookup overhead.
442 *
443 * \param key Matching key to look up in the flow table.
444 * \param buffer Buffer of the packet received.
445 * \param packet_uid Packet UID; used to fetch the packet and its metadata.
446 * \param port The port the packet was received over.
447 * \param send_to_controller
448 */
449 void FlowTableLookup(sw_flow_key key,
450 ofpbuf* buffer,
451 uint32_t packet_uid,
452 int port,
453 bool send_to_controller);
454
455 /**
456 * Update the port status field of the switch port.
457 * A non-zero return value indicates some field has changed.
458 *
459 * \param p A reference to a Port; used to change its config and flag fields.
460 * \return true if the status of the Port is changed, false if unchanged (was already the right
461 * status).
462 */
464
465 /**
466 * Fill out a description of the switch port.
467 *
468 * \param p The port to get the description from.
469 * \param desc A pointer to the description message; used to fill the description message with
470 * the data from the port.
471 */
472 void FillPortDesc(ofi::Port p, ofp_phy_port* desc);
473
474 /**
475 * Generates an OpenFlow reply message based on the type.
476 *
477 * \param openflow_len Length of the reply to make.
478 * \param type Type of reply message to make.
479 * \param bufferp Message buffer; used to make the reply.
480 * \return The OpenFlow reply message.
481 */
482 void* MakeOpenflowReply(size_t openflow_len, uint8_t type, ofpbuf** bufferp);
483
484 /**
485 * \name Receive Methods
486 *
487 * Actions to do when a specific OpenFlow message/packet is received
488 *
489 * @{
490 */
491 /**
492 * \param msg The OpenFlow message received.
493 * \return 0 if everything's ok, otherwise an error number.
494 */
495 int ReceivePortMod(const void* msg);
496 int ReceiveFeaturesRequest(const void* msg);
497 int ReceiveGetConfigRequest(const void* msg);
498 int ReceiveSetConfig(const void* msg);
499 int ReceivePacketOut(const void* msg);
500 int ReceiveFlow(const void* msg);
501 int ReceiveStatsRequest(const void* msg);
502 int ReceiveEchoRequest(const void* msg);
503 int ReceiveEchoReply(const void* msg);
504 int ReceiveVPortMod(const void* msg);
505 int ReceiveVPortTableFeaturesRequest(const void* msg);
506 /**@}*/
507
508 /// Rx Callback
510 /// Promiscuous Rx Callback
512
513 Mac48Address m_address; ///< Address of this device.
514 Ptr<Node> m_node; ///< Node this device is installed on.
515 Ptr<BridgeChannel> m_channel; ///< Collection of port channels into the Switch Channel.
516 uint32_t m_ifIndex; ///< Interface Index
517 uint16_t m_mtu; ///< Maximum Transmission Unit
518
519 /// PacketData type
520 typedef std::map<uint32_t, ofi::SwitchPacketMetadata> PacketData_t;
521 PacketData_t m_packetData; ///< Packet data
522
523 /// Switch's port type
524 typedef std::vector<ofi::Port> Ports_t;
525 Ports_t m_ports; ///< Switch's ports
526
527 Ptr<ofi::Controller> m_controller; ///< Connection to controller.
528
529 uint64_t m_id; ///< Unique identifier for this switch, needed for OpenFlow
530 Time m_lookupDelay; ///< Flow Table Lookup Delay [overhead].
531
532 Time m_lastExecute; ///< Last time the periodic execution occurred.
533 uint16_t m_flags; ///< Flags; configurable by the controller.
534 uint16_t m_missSendLen; ///< Flow Table Miss Send Length; configurable by the controller.
535
536 sw_chain* m_chain; ///< Flow Table; forwarding rules.
537 vport_table_t m_vportTable; ///< Virtual Port Table
538};
539
540} // namespace ns3
541
542#endif /* OPENFLOW_SWITCH_NET_DEVICE_H */
a polymophic address class
Definition address.h:90
Callback template class.
Definition callback.h:422
Ipv4 addresses are stored in host order in this class.
Describes an IPv6 address.
an EUI-48 address
Network layer to device interface.
Definition net-device.h:87
PacketType
Packet types are used as they are in Linux.
Definition net-device.h:289
A net device that switches multiple LAN segments via an OpenFlow-compatible flow table.
void OutputControl(uint32_t packet_uid, int in_port, size_t max_len, int reason)
Sends a copy of the Packet to the controller.
Mac48Address m_address
Address of this device.
ofi::Port GetSwitchPort(uint32_t n) const
Ptr< Node > m_node
Node this device is installed on.
uint64_t m_id
Unique identifier for this switch, needed for OpenFlow.
bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
void * MakeOpenflowReply(size_t openflow_len, uint8_t type, ofpbuf **bufferp)
Generates an OpenFlow reply message based on the type.
Ptr< Channel > GetChannel() const override
void SendFlowExpired(sw_flow *flow, ofp_flow_expired_reason reason)
Send a reply to the controller that a specific flow has expired.
Ptr< BridgeChannel > m_channel
Collection of port channels into the Switch Channel.
void SetNode(Ptr< Node > node) override
void SendPortStatus(ofi::Port p, uint8_t status)
Send a reply about a Port's status to the controller.
Ptr< Node > GetNode() const override
uint16_t m_mtu
Maximum Transmission Unit.
void DoOutput(uint32_t packet_uid, int in_port, size_t max_len, int out_port, bool ignore_no_fwd)
Called from the OpenFlow Interface to output the Packet on either a Port or the Controller.
void RunThroughFlowTable(uint32_t packet_uid, int port, bool send_to_controller=true)
Run the packet through the flow table.
void ReceiveFromDevice(Ptr< NetDevice > netdev, Ptr< const Packet > packet, uint16_t protocol, const Address &src, const Address &dst, PacketType packetType)
Called when a packet is received on one of the switch's ports.
int ModFlow(const ofp_flow_mod *ofm)
Modify a flow.
static const char * GetManufacturerDescription()
vport_table_t m_vportTable
Virtual Port Table.
bool IsBridge() const override
Return true if the net device is acting as a bridge.
void SendFeaturesReply()
Send a reply about this OpenFlow switch's features to the controller.
void SendVPortTableFeatures()
Send a reply about this OpenFlow switch's virtual port table features to the controller.
Time m_lastExecute
Last time the periodic execution occurred.
int ForwardControlInput(const void *msg, size_t length)
The registered controller calls this method when sending a message to the switch.
bool SetMtu(const uint16_t mtu) override
int UpdatePortStatus(ofi::Port &p)
Update the port status field of the switch port.
uint16_t m_flags
Flags; configurable by the controller.
void SetAddress(Address address) override
Set the address of this interface.
void FlowTableLookup(sw_flow_key key, ofpbuf *buffer, uint32_t packet_uid, int port, bool send_to_controller)
Called by RunThroughFlowTable on a scheduled delay to account for the flow table lookup overhead.
void AddLinkChangeCallback(Callback< void > callback) override
uint16_t m_missSendLen
Flow Table Miss Send Length; configurable by the controller.
void SetReceiveCallback(NetDevice::ReceiveCallback cb) override
void OutputPort(uint32_t packet_uid, int in_port, int out_port, bool ignore_no_fwd)
Seeks to send out a Packet over the provided output port.
void StatsDone(ofi::StatsDumpCallback *cb_)
Stats callback is done.
void SendErrorMsg(uint16_t type, uint16_t code, const void *data, size_t len)
If an error message happened during the controller's request, send it to the controller.
void OutputPacket(uint32_t packet_uid, int out_port)
Sends a copy of the Packet over the provided output port.
std::map< uint32_t, ofi::SwitchPacketMetadata > PacketData_t
PacketData type.
int AddSwitchPort(Ptr< NetDevice > switchPort)
Add a 'port' to a switch device.
int SendOpenflowBuffer(ofpbuf *buffer)
Send a message to the controller.
void SetController(Ptr< ofi::Controller > c)
Set up the Switch's controller connection.
NetDevice::PromiscReceiveCallback m_promiscRxCallback
Promiscuous Rx Callback.
void DoDispose() override
Destructor implementation.
int StatsDump(ofi::StatsDumpCallback *cb_)
Stats callback is ready for a dump.
Time m_lookupDelay
Flow Table Lookup Delay [overhead].
int AddFlow(const ofp_flow_mod *ofm)
Add a flow.
int RunThroughVPortTable(uint32_t packet_uid, int port, uint32_t vport)
Run the packet through the vport table.
static TypeId GetTypeId()
Register this type.
NetDevice::ReceiveCallback m_rxCallback
Rx Callback.
void SetIfIndex(const uint32_t index) override
void SetPromiscReceiveCallback(NetDevice::PromiscReceiveCallback cb) override
int OutputAll(uint32_t packet_uid, int in_port, bool flood)
Send packets out all the ports except the originating one.
int AddVPort(const ofp_vport_mod *ovpm)
Add a virtual port to a switch device.
ofpbuf * BufferFromPacket(Ptr< const Packet > packet, Address src, Address dst, int mtu, uint16_t protocol)
Takes a packet and generates an OpenFlow buffer from it, loading the packet data as well as its heade...
Address GetMulticast(Ipv4Address multicastGroup) const override
Make and return a MAC multicast address using the provided multicast group.
Ptr< ofi::Controller > m_controller
Connection to controller.
std::vector< ofi::Port > Ports_t
Switch's port type.
void FillPortDesc(ofi::Port p, ofp_phy_port *desc)
Fill out a description of the switch port.
int ReceiveVPortTableFeaturesRequest(const void *msg)
sw_chain * m_chain
Flow Table; forwarding rules.
bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) override
bool IsPointToPoint() const override
Return true if the net device is on a point-to-point link.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:48
uint16_t port
Definition dsdv-manet.cc:33
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t data[writeSize]
Port and its metadata.
Callback for a stats dump request.