|
INET Framework for OMNeT++/OMNEST
|
#include <Ieee8022LlcSocket.h>
Classes | |
| class | ICallback |
Public Member Functions | |
| void | setCallback (ICallback *callback) |
| Sets a callback object, to be used with processMessage(). More... | |
| virtual int | getInterfaceId () const |
| Returns the interface Id. More... | |
| virtual int | getLocalSap () const |
| Returns the local SAP. More... | |
| virtual int | getRemoteSap () const |
| Returns the remote SAP. More... | |
| virtual void | open (int interfaceId, int localSap, int remoteSap) |
| virtual void | processMessage (cMessage *msg) override |
| Examines the message, takes ownership, and updates socket state. More... | |
Public Member Functions inherited from inet::SocketBase | |
| SocketBase () | |
| virtual | ~SocketBase () |
| void | setOutputGate (cGate *gate) |
| Sets the gate on which to send messages. More... | |
| int | getSocketId () const override |
| Returns the internal socket Id. More... | |
| virtual void | send (Packet *packet) override |
| Sends a data packet to the address and port specified previously in a connect() call. More... | |
| virtual bool | isOpen () const override |
| Returns true if the socket is open. More... | |
| virtual void | close () override |
| Unbinds the socket. More... | |
| virtual void | destroy () override |
| Notify the protocol that the owner of ISocket has destroyed the socket. More... | |
| virtual bool | belongsToSocket (cMessage *msg) const override |
| Returns true if the message belongs to this socket instance. More... | |
| void * | getUserData () const |
| void | setUserData (void *userData) |
Public Member Functions inherited from inet::ISocket | |
| virtual | ~ISocket () |
Protected Member Functions | |
| virtual void | sendOut (cMessage *msg) override |
Protected Attributes | |
| int | interfaceId = -1 |
| int | localSap = -1 |
| int | remoteSap = -1 |
| ICallback * | callback = nullptr |
Protected Attributes inherited from inet::SocketBase | |
| cGate * | outputGate = nullptr |
| int | socketId = -1 |
| bool | isOpen_ = false |
| void * | userData = nullptr |
|
inlinevirtual |
Returns the interface Id.
|
inlinevirtual |
Returns the local SAP.
|
inlinevirtual |
Returns the remote SAP.
|
virtual |
|
overridevirtual |
Examines the message, takes ownership, and updates socket state.
Implements inet::ISocket.
Referenced by inet::Ieee8022LlcSocketIo::handleMessageWhenUp(), inet::EtherAppServer::handleMessageWhenUp(), and inet::EtherAppClient::handleMessageWhenUp().
|
overrideprotectedvirtual |
|
inline |
Sets a callback object, to be used with processMessage().
This callback object may be your simple module itself (if it multiply inherits from ICallback too, that is you declared it as
class MyAppModule : public cSimpleModule, public LlcSocket::ICallback
and redefined the necessary virtual functions; or you may use dedicated class (and objects) for this purpose.
LlcSocket doesn't delete the callback object in the destructor or on any other occasion.
Referenced by inet::EtherAppServer::initialize(), inet::EtherAppClient::initialize(), and inet::Ieee8022LlcSocketIo::setSocketOptions().
|
protected |
Referenced by processMessage().