diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-09-09 16:42:52 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-09-09 16:42:52 -0400 | 
| commit | 7932dd93319b8125c53d42effb52ce5834b6d3c0 (patch) | |
| tree | 8e8073953ceef87fa8f73a0801121db18899cef8 | |
| parent | f334c88ed9675eab624728ecd6eaaff3a9b41255 (diff) | |
ospf6d: Cleanup headers to our standard
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| -rw-r--r-- | ospf6d/ospf6_area.h | 14 | ||||
| -rw-r--r-- | ospf6d/ospf6_interface.h | 22 | ||||
| -rw-r--r-- | ospf6d/ospf6_intra.h | 10 | ||||
| -rw-r--r-- | ospf6d/ospf6_lsa.h | 19 | ||||
| -rw-r--r-- | ospf6d/ospf6_neighbor.h | 32 | ||||
| -rw-r--r-- | ospf6d/ospf6_nssa.h | 10 | ||||
| -rw-r--r-- | ospf6d/ospf6_route.h | 8 | ||||
| -rw-r--r-- | ospf6d/ospf6_zebra.h | 19 | 
8 files changed, 71 insertions, 63 deletions
diff --git a/ospf6d/ospf6_area.h b/ospf6d/ospf6_area.h index b2a275d745..aed9589bfb 100644 --- a/ospf6d/ospf6_area.h +++ b/ospf6d/ospf6_area.h @@ -149,16 +149,18 @@ extern void area_id2str(char *buf, int len, uint32_t area_id, int area_id_fmt);  extern int ospf6_area_cmp(void *va, void *vb); -extern struct ospf6_area *ospf6_area_create(uint32_t, struct ospf6 *, int); -extern void ospf6_area_delete(struct ospf6_area *); -extern struct ospf6_area *ospf6_area_lookup(uint32_t, struct ospf6 *); +extern struct ospf6_area *ospf6_area_create(uint32_t area_id, +					    struct ospf6 *ospf6, int df); +extern void ospf6_area_delete(struct ospf6_area *oa); +extern struct ospf6_area *ospf6_area_lookup(uint32_t area_id, +					    struct ospf6 *ospf6);  extern struct ospf6_area *ospf6_area_lookup_by_area_id(uint32_t area_id);  extern void ospf6_area_stub_unset(struct ospf6 *ospf6, struct ospf6_area *area); -extern void ospf6_area_enable(struct ospf6_area *); -extern void ospf6_area_disable(struct ospf6_area *); +extern void ospf6_area_enable(struct ospf6_area *oa); +extern void ospf6_area_disable(struct ospf6_area *oa); -extern void ospf6_area_show(struct vty *, struct ospf6_area *, +extern void ospf6_area_show(struct vty *vty, struct ospf6_area *oa,  			    json_object *json_areas, bool use_json);  extern void ospf6_area_plist_update(struct prefix_list *plist, int add); diff --git a/ospf6d/ospf6_interface.h b/ospf6d/ospf6_interface.h index ccdf8b1c8f..ee24b989bd 100644 --- a/ospf6d/ospf6_interface.h +++ b/ospf6d/ospf6_interface.h @@ -193,23 +193,23 @@ extern void ospf6_interface_stop(struct ospf6_interface *oi);  extern struct ospf6_interface *  ospf6_interface_lookup_by_ifindex(ifindex_t, vrf_id_t vrf_id); -extern struct ospf6_interface *ospf6_interface_create(struct interface *); -extern void ospf6_interface_delete(struct ospf6_interface *); +extern struct ospf6_interface *ospf6_interface_create(struct interface *ifp); +extern void ospf6_interface_delete(struct ospf6_interface *oi); -extern void ospf6_interface_enable(struct ospf6_interface *); -extern void ospf6_interface_disable(struct ospf6_interface *); +extern void ospf6_interface_enable(struct ospf6_interface *oi); +extern void ospf6_interface_disable(struct ospf6_interface *oi); -extern void ospf6_interface_state_update(struct interface *); -extern void ospf6_interface_connected_route_update(struct interface *); +extern void ospf6_interface_state_update(struct interface *ifp); +extern void ospf6_interface_connected_route_update(struct interface *ifp);  extern struct in6_addr *  ospf6_interface_get_global_address(struct interface *ifp);  /* interface event */ -extern int interface_up(struct thread *); -extern int interface_down(struct thread *); -extern int wait_timer(struct thread *); -extern int backup_seen(struct thread *); -extern int neighbor_change(struct thread *); +extern int interface_up(struct thread *thread); +extern int interface_down(struct thread *thread); +extern int wait_timer(struct thread *thread); +extern int backup_seen(struct thread *thread); +extern int neighbor_change(struct thread *thread);  extern void ospf6_interface_init(void);  extern void ospf6_interface_clear(struct interface *ifp); diff --git a/ospf6d/ospf6_intra.h b/ospf6d/ospf6_intra.h index 9c29681dee..4031ffe689 100644 --- a/ospf6d/ospf6_intra.h +++ b/ospf6d/ospf6_intra.h @@ -221,11 +221,11 @@ extern char *ospf6_network_lsdesc_lookup(uint32_t router_id,  					 struct ospf6_lsa *lsa);  extern int ospf6_router_is_stub_router(struct ospf6_lsa *lsa); -extern int ospf6_router_lsa_originate(struct thread *); -extern int ospf6_network_lsa_originate(struct thread *); -extern int ospf6_link_lsa_originate(struct thread *); -extern int ospf6_intra_prefix_lsa_originate_transit(struct thread *); -extern int ospf6_intra_prefix_lsa_originate_stub(struct thread *); +extern int ospf6_router_lsa_originate(struct thread *thread); +extern int ospf6_network_lsa_originate(struct thread *thread); +extern int ospf6_link_lsa_originate(struct thread *thread); +extern int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread); +extern int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread);  extern void ospf6_intra_prefix_lsa_add(struct ospf6_lsa *lsa);  extern void ospf6_intra_prefix_lsa_remove(struct ospf6_lsa *lsa);  extern int ospf6_orig_as_external_lsa(struct thread *thread); diff --git a/ospf6d/ospf6_lsa.h b/ospf6d/ospf6_lsa.h index a8ed9132dd..c271965fe7 100644 --- a/ospf6d/ospf6_lsa.h +++ b/ospf6d/ospf6_lsa.h @@ -231,10 +231,11 @@ extern int metric_type(struct ospf6 *ospf6, int type, uint8_t instance);  extern int metric_value(struct ospf6 *ospf6, int type, uint8_t instance);  extern int ospf6_lsa_is_differ(struct ospf6_lsa *lsa1, struct ospf6_lsa *lsa2);  extern int ospf6_lsa_is_changed(struct ospf6_lsa *lsa1, struct ospf6_lsa *lsa2); -extern uint16_t ospf6_lsa_age_current(struct ospf6_lsa *); -extern void ospf6_lsa_age_update_to_send(struct ospf6_lsa *, uint32_t); -extern void ospf6_lsa_premature_aging(struct ospf6_lsa *); -extern int ospf6_lsa_compare(struct ospf6_lsa *, struct ospf6_lsa *); +extern uint16_t ospf6_lsa_age_current(struct ospf6_lsa *lsa); +extern void ospf6_lsa_age_update_to_send(struct ospf6_lsa *lsa, +					 uint32_t transdelay); +extern void ospf6_lsa_premature_aging(struct ospf6_lsa *lsa); +extern int ospf6_lsa_compare(struct ospf6_lsa *lsa1, struct ospf6_lsa *lsa2);  extern char *ospf6_lsa_printbuf(struct ospf6_lsa *lsa, char *buf, int size);  extern void ospf6_lsa_header_print_raw(struct ospf6_lsa_header *header); @@ -254,16 +255,16 @@ extern struct ospf6_lsa *ospf6_lsa_create(struct ospf6_lsa_header *header);  extern struct ospf6_lsa *  ospf6_lsa_create_headeronly(struct ospf6_lsa_header *header);  extern void ospf6_lsa_delete(struct ospf6_lsa *lsa); -extern struct ospf6_lsa *ospf6_lsa_copy(struct ospf6_lsa *); +extern struct ospf6_lsa *ospf6_lsa_copy(struct ospf6_lsa *lsa);  extern struct ospf6_lsa *ospf6_lsa_lock(struct ospf6_lsa *lsa);  extern struct ospf6_lsa *ospf6_lsa_unlock(struct ospf6_lsa *lsa); -extern int ospf6_lsa_expire(struct thread *); -extern int ospf6_lsa_refresh(struct thread *); +extern int ospf6_lsa_expire(struct thread *thread); +extern int ospf6_lsa_refresh(struct thread *thread); -extern unsigned short ospf6_lsa_checksum(struct ospf6_lsa_header *); -extern int ospf6_lsa_checksum_valid(struct ospf6_lsa_header *); +extern unsigned short ospf6_lsa_checksum(struct ospf6_lsa_header *lsah); +extern int ospf6_lsa_checksum_valid(struct ospf6_lsa_header *lsah);  extern int ospf6_lsa_prohibited_duration(uint16_t type, uint32_t id,  					 uint32_t adv_router, void *scope); diff --git a/ospf6d/ospf6_neighbor.h b/ospf6d/ospf6_neighbor.h index a229897226..30e044da4b 100644 --- a/ospf6d/ospf6_neighbor.h +++ b/ospf6d/ospf6_neighbor.h @@ -183,24 +183,24 @@ extern const char *const ospf6_neighbor_state_str[];  int ospf6_neighbor_cmp(void *va, void *vb);  void ospf6_neighbor_dbex_init(struct ospf6_neighbor *on); -struct ospf6_neighbor *ospf6_neighbor_lookup(uint32_t, -					     struct ospf6_interface *); -struct ospf6_neighbor *ospf6_neighbor_create(uint32_t, -					     struct ospf6_interface *); -void ospf6_neighbor_delete(struct ospf6_neighbor *); +struct ospf6_neighbor *ospf6_neighbor_lookup(uint32_t router_id, +					     struct ospf6_interface *oi); +struct ospf6_neighbor *ospf6_neighbor_create(uint32_t router_id, +					     struct ospf6_interface *oi); +void ospf6_neighbor_delete(struct ospf6_neighbor *on);  /* Neighbor event */ -extern int hello_received(struct thread *); -extern int twoway_received(struct thread *); -extern int negotiation_done(struct thread *); -extern int exchange_done(struct thread *); -extern int loading_done(struct thread *); -extern int adj_ok(struct thread *); -extern int seqnumber_mismatch(struct thread *); -extern int bad_lsreq(struct thread *); -extern int oneway_received(struct thread *); -extern int inactivity_timer(struct thread *); -extern void ospf6_check_nbr_loading(struct ospf6_neighbor *); +extern int hello_received(struct thread *thread); +extern int twoway_received(struct thread *thread); +extern int negotiation_done(struct thread *thread); +extern int exchange_done(struct thread *thread); +extern int loading_done(struct thread *thread); +extern int adj_ok(struct thread *thread); +extern int seqnumber_mismatch(struct thread *thread); +extern int bad_lsreq(struct thread *thread); +extern int oneway_received(struct thread *thread); +extern int inactivity_timer(struct thread *thread); +extern void ospf6_check_nbr_loading(struct ospf6_neighbor *on);  extern void ospf6_neighbor_init(void);  extern int config_write_ospf6_debug_neighbor(struct vty *vty); diff --git a/ospf6d/ospf6_nssa.h b/ospf6d/ospf6_nssa.h index 454bdd7fe2..631503edc6 100644 --- a/ospf6d/ospf6_nssa.h +++ b/ospf6d/ospf6_nssa.h @@ -52,11 +52,11 @@ int ospf6_area_nssa_unset(struct ospf6 *ospf6, struct ospf6_area *area);  int ospf6_area_nssa_set(struct ospf6 *ospf6, struct ospf6_area *area);  extern void ospf6_nssa_lsa_flush(struct ospf6 *ospf6, struct prefix_ipv6 *p); -extern struct ospf6_lsa *ospf6_translated_nssa_refresh(struct ospf6_area *, -						       struct ospf6_lsa *, -						       struct ospf6_lsa *); -extern struct ospf6_lsa *ospf6_translated_nssa_originate(struct ospf6_area *, -							 struct ospf6_lsa *); +extern struct ospf6_lsa *ospf6_translated_nssa_refresh(struct ospf6_area *oa, +						       struct ospf6_lsa *type7, +						       struct ospf6_lsa *type5); +extern struct ospf6_lsa * +ospf6_translated_nssa_originate(struct ospf6_area *oa, struct ospf6_lsa *type7);  extern void ospf6_asbr_nssa_redist_task(struct ospf6 *ospf6); diff --git a/ospf6d/ospf6_route.h b/ospf6d/ospf6_route.h index 991720ec2e..54baaee638 100644 --- a/ospf6d/ospf6_route.h +++ b/ospf6d/ospf6_route.h @@ -343,7 +343,7 @@ extern int ospf6_route_get_first_nh_index(struct ospf6_route *route);  	ospf6_add_nexthop(route->nh_list, ifindex, addr)  extern struct ospf6_route *ospf6_route_create(struct ospf6 *ospf6); -extern void ospf6_route_delete(struct ospf6_route *); +extern void ospf6_route_delete(struct ospf6_route *route);  extern struct ospf6_route *ospf6_route_copy(struct ospf6_route *route);  extern int ospf6_route_cmp(struct ospf6_route *ra, struct ospf6_route *rb); @@ -384,8 +384,10 @@ extern void ospf6_route_show_detail(struct vty *vty, struct ospf6_route *route,  				    json_object *json, bool use_json); -extern int ospf6_route_table_show(struct vty *, int, int, struct cmd_token **, -				  struct ospf6_route_table *, bool use_json); +extern int ospf6_route_table_show(struct vty *vty, int argc_start, int argc, +				  struct cmd_token **argv, +				  struct ospf6_route_table *table, +				  bool use_json);  extern int ospf6_linkstate_table_show(struct vty *vty, int idx_ipv4, int argc,  				      struct cmd_token **argv,  				      struct ospf6_route_table *table); diff --git a/ospf6d/ospf6_zebra.h b/ospf6d/ospf6_zebra.h index a3ccc3d38d..e25f6bf80d 100644 --- a/ospf6d/ospf6_zebra.h +++ b/ospf6d/ospf6_zebra.h @@ -54,20 +54,23 @@ extern void ospf6_zebra_redistribute(int, vrf_id_t vrf_id);  extern void ospf6_zebra_no_redistribute(int, vrf_id_t vrf_id);  #define ospf6_zebra_is_redistribute(type, vrf_id)                              \  	vrf_bitmap_check(zclient->redist[AFI_IP6][type], vrf_id) -extern void ospf6_zebra_init(struct thread_master *); +extern void ospf6_zebra_init(struct thread_master *tm);  extern void ospf6_zebra_add_discard(struct ospf6_route *request,  				    struct ospf6 *ospf6);  extern void ospf6_zebra_delete_discard(struct ospf6_route *request,  				       struct ospf6 *ospf6); -extern void ospf6_distance_reset(struct ospf6 *); -extern uint8_t ospf6_distance_apply(struct prefix_ipv6 *, struct ospf6_route *, -				    struct ospf6 *); +extern void ospf6_distance_reset(struct ospf6 *ospf6); +extern uint8_t ospf6_distance_apply(struct prefix_ipv6 *p, +				    struct ospf6_route * or, +				    struct ospf6 *ospf6); -extern int ospf6_distance_set(struct vty *, struct ospf6 *, const char *, -			      const char *, const char *); -extern int ospf6_distance_unset(struct vty *, struct ospf6 *, const char *, -				const char *, const char *); +extern int ospf6_distance_set(struct vty *vty, struct ospf6 *ospf6, +			      const char *distance_str, const char *ip_str, +			      const char *access_list_str); +extern int ospf6_distance_unset(struct vty *vty, struct ospf6 *ospf6, +				const char *distance_str, const char *ip_str, +				const char *access_list_str);  extern int config_write_ospf6_debug_zebra(struct vty *vty);  extern void install_element_ospf6_debug_zebra(void);  | 
