typedef unsigned int node_id;
typedef unsigned short message_type;
typedef unsigned int message_id;

class network_protocol {
 public:

  enum message_types {
    join = 1,
    join_ack,
    send,
    send_ack,
    broadcast
  };

  struct message_header{
    //note: source is not necessarily the sender of the packet
    //in n-hop broadcast it is the originating client
    //in adhoc routing it is the originating client
    node_id source;
    node_id dest;
    message_id id;
    message_type type;
    int args;
  };

  enum error_types {
    IOERROR = 1,
    UNKNOWN_DEST,
    NO_PEERS,
    
  };

 
};
