Next: Node Process Control Block
Up: System structure
Previous: System structure
  Contents
The format of a message is presented below as it is defined in the form of C structure MESSAGE.
typedef struct mess {
int time ;
int drsy_time ;
int kind ; (*)
int value[10] ; (*)
long special_field[10] ;
int from ; (*)
int hops ;
int maxhops ;
int port ; (*)
struct mess *next ;
} MESSAGE ;
The fields of the MESSAGE fall in two categories :
- System specified fields
- These fields obtain proper values by the simulator, so the user is not allowed to update them. These fields are the followings:
- time: When the message must be delivered to the destination process.
- drsy_time: The real part of the above field time; this is used in the simulation of a synchronizer.
- from: Source process number.
- hops: On how many links has the message been propagated till now. The value of this field is meaningfull only if the system call pass_message() has been used for the delivering of the message (i.e. if the sender and the recepient could not communicate dierctly).
- port: The port of the node on which this message has arrived.
- next: Pointer to next message in a message queue.
- User specified fields
- The user (the protocol to be simulated) can use these fields for his own protocol:
- kind: Kind of message.
- value[]: Information that this message must carry.
- special_field[]: Extra information that the message must carry when the previous field value[] is not sufficient.
- maxhops: The maximum distance this message can propagate.
Next: Node Process Control Block
Up: System structure
Previous: System structure
  Contents
Ha Hoai Phuong
2002-11-11