next up previous contents
Next: Node Process Control Block Up: System structure Previous: System structure   Contents

Message structure

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:

User specified fields
The user (the protocol to be simulated) can use these fields for his own protocol:


next up previous contents
Next: Node Process Control Block Up: System structure Previous: System structure   Contents
Ha Hoai Phuong
2002-11-11