#include "ip3_addr.h"
#include "ip3_rte.h"

IpT_Address ALL_PIM_ROUTERS;

typedef struct PimDM_Neighbor {
     IpT_Address  neighbor_address;
     int          neighbor_timer;
     Paket       *last_message_ptr;
     Evhandle     rxmt_timer;
     Evhandle     delay_send_timer;
} PimDM_Neighbor; 


typedef struct PimDM_Interface {
     IpT_Interface_Info  *intf_ptr;
     IpT_Address          interface_addr;
     List                *pim_dm_neighbor_list;
} PimDM_Interface;


typedef struct PimDM_Mroute_Table {
     List *   Mroute_entry_list_ptr;
     Boolean  dirty_flag;
     double   last_cal_time;
} PimDM_Mroute_Table;


typedef struct PimDM_Mroute_Entry {
     double       entry_time;
     SGPair      *SrcGrp;
     IpT_Address  RPF_neighbor;
     IpT_Address  iif;
     List        *oif;
     int          num_forward_intf;
     Evhandle     negative_timer_handle;
} PimDM_Mroute_Entry;


typedef struct {
    IpT_Address source;
    IpT_Address group;
} SGPair;


typedef struct {
    OIF_Status  forward_status;
    Evhandle    rebroadcast_time;
    IpT_Address interface_addr;
} OIF_Interface;


typedef enum OIF_Status {
     Prune;
     Forward;
} OIF_Status;  


typedef enum pim_message_type {
        Hello;
        Prune;
        Graft;
        Graft_Ack;
} PimDM_Message_Type;

/*typedef struct PimDM_Interface {
     PimDM_Interface_Type interface_type;
     IpT_Address          interface_address;
     IpT_Address          interface_mask;
     List                 *pim_dm_neighbor_list;
} PimDM_Interface;*/








