ospf.h:

 

 

 The following are the changes made to the ospf class.

 

    PCTable *pctable_head;

    int hftb;

    int refresh_time;

    int LSRefresh_Time;

    int HFTB_Time;

    int HFTB_Bin;

    int change_opts;

    int repair_lsseq;

 

    typedef struct pkt_count{ 

        int phy_int; 

        unsigned long pkt_num; 

        unsigned long int pkt_size; 

    }Pkt_Count; 

    Pkt_Count *pktcnt; 

    int pktcnt_size; 

 

    typedef struct lsa_count{

        int phy_int;

        unsigned long lsa_num;

        unsigned long int lsa_size;

    }Lsa_Count;

    Lsa_Count *lsacnt;

    int lsacnt_size;

 

    typedef struct ack_count{

        int phy_int;

        unsigned long ack_num;

        unsigned long int ack_size;

    }Ack_Count;

    Ack_Count *ackcnt;

    int ackcnt_size;

 

    void hftb_lsas();

 

    void add_parent_pctable(rtid_t orig, SpfNbr *par);

    void add_child_pctable(rtid_t orig, SpfNbr *ch);

    void delete_child_pctable(rtid_t orig, SpfNbr *ch);

    bool is_child_pctable(rtid_t orig, SpfNbr *ch);

    SpfNbr *get_parent_pctable(rtid_t orig);

    bool need_flood_pctable(rtid_t orig);

    void set_flood_pctable(SpfNbr *ch);

    bool need_tree_repair_pctable(rtid_t orig, seq_t seqno);

    void set_tree_repair_pctable(rtid_t orig, seq_t seqno);

    void print_pctable();

    void pktcnt_realloc();

    void print_pktstats();

    void lsacnt_realloc();

    void print_lsastats();

    void ackcnt_realloc();

    void print_ackstats();