Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

eqn_cruncher::pkt_header Class Reference

This represents the data type for the packet header, which is the first piece of data whenever any packet is sent across the network between the client and server. More...

#include <node_manager.hpp>

List of all members.

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
double reserved


Detailed Description

This represents the data type for the packet header, which is the first piece of data whenever any packet is sent across the network between the client and server.

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.


Member Data Documentation

int eqn_cruncher::pkt_header::code
 

Specifies the type of command. This field can one of these values: { quit, start, result, reset_client, reset_subclient }.

double eqn_cruncher::pkt_header::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.

int eqn_cruncher::pkt_header::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 eqn_cruncher::pkt_header::type
 

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.


The documentation for this class was generated from the following file:
Generated on Wed Sep 8 19:58:15 2004 for Equation Cruncher by doxygen1.2.18