summaryrefslogtreecommitdiff
path: root/ospfd/ospfd.h
diff options
context:
space:
mode:
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>2008-09-02 19:06:31 +0100
committerPaul Jakma <paul@quagga.net>2008-09-02 21:38:00 +0100
commita49eb30a178547189147c8a35bf9e35f429abb66 (patch)
tree5d660dead08f4a98498240fefb86202000210932 /ospfd/ospfd.h
parent5d7bdd0ed9595f515bdfaa8af76fcfd41be7a6a6 (diff)
[ospfd] Restructure opsf_if_update() and ospf_network_run()
Add an struct interface paramenter and adjust the affected code accordingly. The old code was a mess looping over all interfaces several times when one interface was added/changed. * ospfd/ospfd.h: Add struct interface parameter to ospf_if_update() * ospfd/ospf_zebra.c: Add ifp arg to ospf_if_update() calls. (ospf_interface_address_delete) delete ospf_if_update() call, redundant as function calls ospf_if_free() itself. * ospfd/ospfd.c: (ospf_network_unset) handle deconfiguration here, rather than ospf_if_update. (ospf_network_run_interface) ospf_network_run, for any given interface. (ospf_network_run) move guts to previous, and use it. (ospf_if_update) Adjust to take struct interface as argument, as all callers have a specific ifp in mind. Iterate over ifp's connected list and call ospf_network_run_interface instead of ospf_network_run, turning this path into O(nm) rather than O(n^2). Adjust all code dealing with opsf_if_update and ospf_network_run to pass the new struct interface * arg. (some minor modifications and bug-additions by Paul Jakma). Signed-off-by: Paul Jakma <paul@quagga.net>
Diffstat (limited to 'ospfd/ospfd.h')
-rw-r--r--ospfd/ospfd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index b6187111..6a60e86f 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -588,7 +588,7 @@ extern int ospf_nbr_nbma_poll_interval_set (struct ospf *, struct in_addr,
extern int ospf_nbr_nbma_poll_interval_unset (struct ospf *, struct in_addr);
extern void ospf_prefix_list_update (struct prefix_list *);
extern void ospf_init (void);
-extern void ospf_if_update (struct ospf *);
+extern void ospf_if_update (struct ospf *, struct interface *);
extern void ospf_ls_upd_queue_empty (struct ospf_interface *);
extern void ospf_terminate (void);
extern void ospf_nbr_nbma_if_update (struct ospf *, struct ospf_interface *);