A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
packet-socket-factory.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007 Emmanuelle Laprise
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
7 */
8#ifndef PACKET_SOCKET_FACTORY_H
9#define PACKET_SOCKET_FACTORY_H
10
11#include "ns3/socket-factory.h"
12
13namespace ns3
14{
15
16class Socket;
17
18/**
19 * \ingroup socket
20 *
21 * This can be used as an interface in a node in order for the node to
22 * generate PacketSockets that can connect to net devices.
23 */
25{
26 public:
27 /**
28 * \brief Get the type ID.
29 * \return the object TypeId
30 */
31 static TypeId GetTypeId();
32
34
35 /**
36 * Creates a PacketSocket and returns a pointer to it.
37 *
38 * \return a pointer to the created socket
39 */
40 Ptr<Socket> CreateSocket() override;
41};
42
43} // namespace ns3
44
45#endif /* PACKET_SOCKET_FACTORY_H */
This can be used as an interface in a node in order for the node to generate PacketSockets that can c...
Ptr< Socket > CreateSocket() override
Creates a PacketSocket and returns a pointer to it.
static TypeId GetTypeId()
Get the type ID.
Smart pointer class similar to boost::intrusive_ptr.
Object to create transport layer instances that provide a socket API to applications.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.