• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/zebra/ospfd/

Lines Matching refs:lsdb

47 ospf_lsdb_init (struct ospf_lsdb *lsdb)
52 lsdb->type[i].db = route_table_init ();
56 ospf_lsdb_free (struct ospf_lsdb *lsdb)
58 ospf_lsdb_cleanup (lsdb);
59 XFREE (MTYPE_OSPF_LSDB, lsdb);
63 ospf_lsdb_cleanup (struct ospf_lsdb *lsdb)
66 assert (lsdb);
67 assert (lsdb->total == 0);
69 ospf_lsdb_delete_all (lsdb);
72 route_table_finish (lsdb->type[i].db);
85 /* Add new LSA to lsdb. */
87 ospf_lsdb_add (struct ospf_lsdb *lsdb, struct ospf_lsa *lsa)
93 table = lsdb->type[lsa->data->type].db;
99 lsdb->type[lsa->data->type].count_self++;
100 lsdb->type[lsa->data->type].count++;
101 lsdb->total++;
113 if (lsdb->new_lsa_hook != NULL)
114 (* lsdb->new_lsa_hook)(lsa);
120 ospf_lsdb_delete (struct ospf_lsdb *lsdb, struct ospf_lsa *lsa)
126 table = lsdb->type[lsa->data->type].db;
133 lsdb->type[lsa->data->type].count_self--;
134 lsdb->type[lsa->data->type].count--;
135 lsdb->total--;
140 if (lsdb->del_lsa_hook != NULL)
141 (* lsdb->del_lsa_hook)(lsa);
149 ospf_lsdb_delete_all (struct ospf_lsdb *lsdb)
158 table = lsdb->type[i].db;
163 lsdb->type[i].count_self--;
164 lsdb->type[i].count--;
165 lsdb->total--;
169 if (lsdb->del_lsa_hook != NULL)
170 (* lsdb->del_lsa_hook)(lsa);
178 ospf_lsdb_lookup (struct ospf_lsdb *lsdb, struct ospf_lsa *lsa)
185 table = lsdb->type[lsa->data->type].db;
198 ospf_lsdb_lookup_by_id (struct ospf_lsdb *lsdb, u_char type,
206 table = lsdb->type[type].db;
225 ospf_lsdb_lookup_by_id_next (struct ospf_lsdb *lsdb, u_char type,
234 table = lsdb->type[type].db;
264 ospf_lsdb_count_all (struct ospf_lsdb *lsdb)
266 return lsdb->total;
270 ospf_lsdb_count (struct ospf_lsdb *lsdb, int type)
272 return lsdb->type[type].count;
276 ospf_lsdb_count_self (struct ospf_lsdb *lsdb, int type)
278 return lsdb->type[type].count_self;
282 ospf_lsdb_isempty (struct ospf_lsdb *lsdb)
284 return (lsdb->total == 0);