#include <network.h>
Inheritance diagram for NetworkInput::

Public Methods | |
| NetworkInput (CallBackObj *toCall) | |
| Allocate and initialize network input driver. More... | |
| ~NetworkInput () | |
| De-allocate the network input driver data. More... | |
| PacketHeader | Receive (char *data) |
| Poll the network for incoming messages. If there is a packet waiting, copy the packet into "data" and return the header. If no packet is waiting, return a header with length 0. More... | |
| void | CallBack () |
| A packet may have arrived. More... | |
Private Attributes | |
| int | sock |
| UNIX socket number for incoming packets. More... | |
| char | sockName [32] |
| File name corresponding to UNIX socket. More... | |
| CallBackObj* | callWhenAvail |
| Interrupt handler, signalling packet has arrived. More... | |
| bool | packetAvail |
| Packet has arrived, can be pulled off of network. More... | |
| PacketHeader | inHdr |
| Information about arrived packet. More... | |
| char | inbox [MaxPacketSize] |
| Data for arrived packet. More... | |
Definition at line 57 of file network.h.
|
|
Allocate and initialize network input driver.
Definition at line 22 of file network.cc. |
|
|
De-allocate the network input driver data. NetworkInput::NetworkInput Deallocate the simulation for the network input (basically, deallocate the input mailbox) Definition at line 44 of file network.cc. |
|
|
A packet may have arrived. NetworkInput::CallBack Simulator calls this when a packet may be available to be read in from the simulated network. First check to make sure packet is available & there's space to pull it in. Then invoke the "callBack" registered by whoever wants the packet. Reimplemented from CallBackObj. Definition at line 61 of file network.cc. |
|
|
Poll the network for incoming messages. If there is a packet waiting, copy the packet into "data" and return the header. If no packet is waiting, return a header with length 0. NetworkInput::Receive Read a packet, if one is buffered Definition at line 94 of file network.cc. Referenced by PostOfficeInput::PostalDelivery().
|
|
|
Interrupt handler, signalling packet has arrived.
|
|
|
Information about arrived packet.
|
|
|
Data for arrived packet.
|
|
|
Packet has arrived, can be pulled off of network.
|
|
|
UNIX socket number for incoming packets.
|
|
|
File name corresponding to UNIX socket.
|
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001