#include <node_manager.hpp>
Public Methods | |
| pkt_header () | |
Public Attributes | |
| int | size |
| Size of the packet excluding the size of the packet header, given by sizeof(pkt_header). The maximum value that this filed can take is: buff_size - sizeof(pkt_header). | |
| int | type |
| Type of packet: { data, command }. | |
| int | code |
| Specifies the type of command. | |
| double | reserved |
| Reserved for the implementation to use as it feels right. Currently the result command uses this to pass the result back to the caller. | |
The receipient of the packet is supposed to check/verify the correctness of the packet by checking the size field with the value returned by the receive function after performing some mathematical manipulations. More specifically, add the size field to the sizeof(pkt_header) and check if it is equal to the value returned by the receive function.
|
|
|
|
|
Specifies the type of command. This field can one of these values: { quit, start, result, reset_client, reset_subclient }. |
|
|
Reserved for the implementation to use as it feels right. Currently the result command uses this to pass the result back to the caller.
|
|
|
Size of the packet excluding the size of the packet header, given by sizeof(pkt_header). The maximum value that this filed can take is: buff_size - sizeof(pkt_header).
|
|
|
Type of packet: { data, command }. If it is a data packet, then the remaining fields do not hold any real significance. If however, it is a command packet, then the next field specifies what command it is. |
1.2.18