|
INET Framework for OMNeT++/OMNEST
|
#include <EthernetSocket.h>
|
| virtual void | sendOut (cMessage *msg) override |
| |
◆ bind()
| void inet::EthernetSocket::bind |
( |
const MacAddress & |
localAddress, |
|
|
const MacAddress & |
remoteAddress, |
|
|
const Protocol * |
protocol, |
|
|
bool |
steal |
|
) |
| |
Binds the socket to the MAC address.
30 EthernetBindCommand *
ctrl =
new EthernetBindCommand();
31 ctrl->setLocalAddress(localAddress);
32 ctrl->setRemoteAddress(remoteAddress);
34 ctrl->setSteal(steal);
35 request->setControlInfo(
ctrl);
◆ processMessage()
| void inet::EthernetSocket::processMessage |
( |
cMessage * |
msg | ) |
|
|
overridevirtual |
Examines the message, takes ownership, and updates socket state.
Implements inet::ISocket.
43 switch (msg->getKind()) {
57 throw cRuntimeError(
"EthernetSocket: invalid msg kind %d, one of the ETHERNNET_I_xxx constants expected", msg->getKind());
Referenced by inet::EthernetSocketIo::handleMessageWhenUp().
◆ sendOut()
| void inet::EthernetSocket::sendOut |
( |
cMessage * |
msg | ) |
|
|
overrideprotectedvirtual |
◆ setCallback()
| void inet::EthernetSocket::setCallback |
( |
ICallback * |
callback | ) |
|
|
inline |
◆ setNetworkInterface()
| void inet::EthernetSocket::setNetworkInterface |
( |
NetworkInterface * |
networkInterface | ) |
|
|
inline |
◆ callback
| ICallback* inet::EthernetSocket::callback = nullptr |
|
protected |
◆ networkInterface
The documentation for this class was generated from the following files:
virtual void socketClosed(EthernetSocket *socket)=0
Notifies about the socket closed.
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down protocol
Definition: IUdp-gates.txt:25
ICallback * callback
Definition: EthernetSocket.h:42
removed InterfaceReq
Definition: IUdp-gates.txt:11
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
removed ctrl
Definition: IUdp-gates.txt:7
int getInterfaceId() const
Definition: NetworkInterface.h:232
virtual void sendOut(cMessage *msg) override
Definition: EthernetSocket.cc:18
bool isOpen_
Definition: SocketBase.h:20
static const Protocol ethernetMac
Definition: Protocol.h:65
@ SOCKET_I_DATA
Definition: SocketCommand_m.h:85
NetworkInterface * networkInterface
Definition: EthernetSocket.h:43
@ SOCKET_I_CLOSED
Definition: SocketCommand_m.h:86
* tags
Definition: IUdp-gates.txt:3
virtual void sendOut(cMessage *msg)
Definition: SocketBase.cc:24
@ SOCKET_C_BIND
Definition: SocketCommand_m.h:65
virtual bool belongsToSocket(cMessage *msg) const override
Returns true if the message belongs to this socket instance.
Definition: SocketBase.cc:61
virtual void socketDataArrived(EthernetSocket *socket, Packet *packet)=0
Notifies about data arrival, packet ownership is transferred to the callee.