ARP/Ping: ITcIoArpPingProtocol(Recv)

The interfaces ITcIoArpPingProtocol and ITcIoArpPingProtocolRecv enable sending of ARP and Ping messages from the real-time environment.

A project that uses this interface contains a pointer to an ITcIoArpPingProtocol object and implements ITcIoArpPingProtocolRecv itself. ITcIoArpPingProtocolRecv serves as callback interface for receiving data from the TCP/UDP RT module within the application.

ARP/Ping: ITcIoArpPingProtocol(Recv) 1: ITcIoArpPingProtocolRecv methods:

Name

Description

ArpReply

Callback function that is invoked when an ArpReply message is received.

PingReply

Callback function that is invoked when an PingReply message is received.

If these methods return S_OK, the packet is regarded as processed and is not forwarded to the operating system. If necessary, S_FALSE should be returned.

ARP/Ping: ITcIoArpPingProtocol(Recv) 2: ITcIoArpPingProtocol methods:

Name

Description

ArpRequest

Sends an ArpRequest

PingRequest

Sends a PingRequest

RegisterReceiver

Registering at the TCP/UDP RT module for receiving data.

UnregisterReceiver

Unregistering at the TCP/UDP RT module for receiving data.

CheckReceived

Must be called cyclically; ArpReply and PingReply are used as callback in the context of this method

To receive ARP or Ping data, registration is required by calling RegisterReceiver. This can be done in SetObjStateSO().

Data is provided by a callback of method ArpReceive or PingReceive from ITcIoArpPingProtocolRecv.

During the shutdown, all modules should unregister via UnregisterReceiver. This can be done in SetObjStateOS().