From 92365889d1f856f323af452bad76f54c15ccdf45 Mon Sep 17 00:00:00 2001 From: hasso Date: Tue, 18 Jan 2005 13:53:33 +0000 Subject: * *.c: Changed many functions to static. Some commented out functions and some tiny related fixes. No functional changes. --- isisd/ChangeLog | 5 +++++ isisd/isis_adjacency.c | 6 +++--- isisd/isis_dr.c | 2 +- isisd/isis_events.c | 4 ++-- isisd/isis_lsp.c | 46 ++++++++++++++++++++++------------------- isisd/isis_network.c | 6 +++--- isisd/isis_pdu.c | 35 ++++++++++++++++--------------- isisd/isis_route.c | 51 +++++++++++++++++++++++---------------------- isisd/isis_spf.c | 56 ++++++++++++++++++++++++++++---------------------- isisd/isis_tlv.c | 2 +- isisd/isis_zebra.c | 30 ++++++++++++++------------- 11 files changed, 131 insertions(+), 112 deletions(-) (limited to 'isisd') diff --git a/isisd/ChangeLog b/isisd/ChangeLog index 0893e6f5..e34efd8c 100644 --- a/isisd/ChangeLog +++ b/isisd/ChangeLog @@ -1,3 +1,8 @@ +2005-01-18 Hasso Tepper + + * *.c: Changed many functions to static. Some commented out + functions and some tiny related fixes. No functional changes. + 2005-01-01 Hasso Tepper * isis_common.h, isisd.c, isis_pdu.c: Implement authentication in diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c index a6f9cbac..87609f64 100644 --- a/isisd/isis_adjacency.c +++ b/isisd/isis_adjacency.c @@ -49,7 +49,7 @@ extern struct isis *isis; -struct isis_adjacency * +static struct isis_adjacency * adj_alloc (u_char * id) { struct isis_adjacency *adj; @@ -293,7 +293,7 @@ isis_adj_expire (struct thread *thread) return 0; } -const char * +static const char * adj_state2string (int state) { @@ -315,7 +315,7 @@ adj_state2string (int state) /* * show clns/isis neighbor (detail) */ -void +static void isis_adj_print_vty2 (struct isis_adjacency *adj, struct vty *vty, char detail) { diff --git a/isisd/isis_dr.c b/isisd/isis_dr.c index e33e78b5..4eadc9c1 100644 --- a/isisd/isis_dr.c +++ b/isisd/isis_dr.c @@ -103,7 +103,7 @@ isis_run_dr_l2 (struct thread *thread) return ISIS_OK; } -int +static int isis_check_dr_change (struct isis_adjacency *adj, int level) { int i; diff --git a/isisd/isis_events.c b/isisd/isis_events.c index cd30ee42..66d694f6 100644 --- a/isisd/isis_events.c +++ b/isisd/isis_events.c @@ -143,7 +143,7 @@ isis_event_area_addr_change (struct isis_area *area) } -void +static void circuit_commence_level (struct isis_circuit *circuit, int level) { if (level == 1) @@ -186,7 +186,7 @@ circuit_commence_level (struct isis_circuit *circuit, int level) return; } -void +static void circuit_resign_level (struct isis_circuit *circuit, int level) { int idx = level - 1; diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c index 2f9728bc..8dae147f 100644 --- a/isisd/isis_lsp.c +++ b/isisd/isis_lsp.c @@ -104,7 +104,7 @@ lsp_search (u_char * id, dict_t * lspdb) return NULL; } -void +static void lsp_clear_data (struct isis_lsp *lsp) { if (!lsp) @@ -141,7 +141,7 @@ lsp_clear_data (struct isis_lsp *lsp) return; } -void +static void lsp_destroy (struct isis_lsp *lsp) { if (!lsp) @@ -183,7 +183,7 @@ lsp_db_destroy (dict_t * lspdb) /* * Remove all the frags belonging to the given lsp */ -void +static void lsp_remove_frags (struct list *frags, dict_t * lspdb) { dnode_t *dnode; @@ -321,7 +321,7 @@ lsp_inc_seqnum (struct isis_lsp *lsp, u_int32_t seq_num) /* * Genetates checksum for LSP and its frags */ -void +static void lsp_seqnum_update (struct isis_lsp *lsp0) { struct isis_lsp *lsp; @@ -360,7 +360,7 @@ isis_lsp_authinfo_check (struct stream *stream, struct isis_area *area, return authentication_check (passwd, &tlvs.auth_info); } -void +static void lsp_update_data (struct isis_lsp *lsp, struct stream *stream, struct isis_area *area) { @@ -615,7 +615,7 @@ lsp_build_list_ssn (struct isis_circuit *circuit, struct list *list, return; } -void +static void lsp_set_time (struct isis_lsp *lsp) { assert (lsp); @@ -642,7 +642,7 @@ lsp_set_time (struct isis_lsp *lsp) htons (ntohs (lsp->lsp_header->rem_lifetime) - 1); } -void +static void lspid_print (u_char * lsp_id, u_char * trg, char dynhost, char frag) { struct isis_dynhn *dyn = NULL; @@ -692,7 +692,7 @@ lsp_bits2string (u_char * lsp_bits) } /* this function prints the lsp on show isis database */ -void +static void lsp_print (dnode_t * node, struct vty *vty, char dynhost) { struct isis_lsp *lsp = dnode_get (node); @@ -712,7 +712,7 @@ lsp_print (dnode_t * node, struct vty *vty, char dynhost) lsp_bits2string (&lsp->lsp_header->lsp_bits), VTY_NEWLINE); } -void +static void lsp_print_detail (dnode_t * node, struct vty *vty, char dynhost) { struct isis_lsp *lsp = dnode_get (node); @@ -914,10 +914,11 @@ lsp_print_all (struct vty *vty, dict_t * lspdb, char detail, char dynhost) return lsp_count; } +#if 0 /* Seems to be old code */ /* this function reallocate memory to an lsp pdu, with an additional * size of memory, it scans the lsp and moves all pointers the * way they should */ -u_char * +static u_char * lsppdu_realloc (struct isis_lsp * lsp, int memorytype, int size) { u_char *retval; @@ -940,6 +941,7 @@ lsppdu_realloc (struct isis_lsp * lsp, int memorytype, int size) return STREAM_DATA (lsp->pdu) + (lsp->lsp_header->pdu_len - size); #endif /* LSP_MEMORY_PREASSIGN */ } +#endif /* 0 */ #if 0 /* Saving the old one just in case :) */ /* @@ -1170,7 +1172,7 @@ lsp_build_nonpseudo (struct isis_lsp *lsp, struct isis_area *area) #define FRAG_NEEDED(S,T,I) \ (STREAM_SIZE(S)-STREAM_REMAIN(S)+(I) > FRAG_THOLD(S,T)) -void +static void lsp_tlv_fit (struct isis_lsp *lsp, struct list **from, struct list **to, int tlvsize, int frag_thold, int tlv_build_func (struct list *, struct stream *)) @@ -1202,7 +1204,7 @@ lsp_tlv_fit (struct isis_lsp *lsp, struct list **from, struct list **to, return; } -struct isis_lsp * +static struct isis_lsp * lsp_next_frag (u_char frag_num, struct isis_lsp *lsp0, struct isis_area *area, int level) { @@ -1253,7 +1255,7 @@ lsp_next_frag (u_char frag_num, struct isis_lsp *lsp0, struct isis_area *area, * area->lsp_frag_threshold is exceeded. */ #if 1 -void +static void lsp_build_nonpseudo (struct isis_lsp *lsp, struct isis_area *area) { struct is_neigh *is_neigh; @@ -1519,7 +1521,8 @@ lsp_build_nonpseudo (struct isis_lsp *lsp, struct isis_area *area) } #endif -void +#if 0 /* Old code? */ +static void build_lsp_data (struct isis_lsp *lsp, struct isis_area *area) { struct list *circuit_list = area->circuit_list; @@ -1581,11 +1584,12 @@ build_lsp_data (struct isis_lsp *lsp, struct isis_area *area) } } +#endif /* 0 */ /* * 7.3.7 Generation on non-pseudonode LSPs */ -int +static int lsp_generate_non_pseudo (struct isis_area *area, int level) { struct isis_lsp *oldlsp, *newlsp; @@ -1651,7 +1655,7 @@ lsp_l2_generate (struct isis_area *area) return lsp_generate_non_pseudo (area, 2); } -int +static int lsp_non_pseudo_regenerate (struct isis_area *area, int level) { dict_t *lspdb = area->lspdb[level - 1]; @@ -1766,7 +1770,7 @@ lsp_refresh_l2 (struct thread *thread) * Something has changed -> regenerate LSP */ -int +static int lsp_l1_regenerate (struct thread *thread) { struct isis_area *area; @@ -1777,7 +1781,7 @@ lsp_l1_regenerate (struct thread *thread) return lsp_non_pseudo_regenerate (area, 1); } -int +static int lsp_l2_regenerate (struct thread *thread) { struct isis_area *area; @@ -1853,7 +1857,7 @@ L2: /* * 7.3.8 and 7.3.10 Generation of level 1 and 2 pseudonode LSPs */ -void +static void lsp_build_pseudo (struct isis_lsp *lsp, struct isis_circuit *circuit, int level) { @@ -1952,7 +1956,7 @@ lsp_build_pseudo (struct isis_lsp *lsp, struct isis_circuit *circuit, return; } -int +static int lsp_pseudo_regenerate (struct isis_circuit *circuit, int level) { dict_t *lspdb = circuit->area->lspdb[level - 1]; @@ -2270,7 +2274,7 @@ lsp_purge_non_exist (struct isis_link_state_hdr *lsp_hdr, } #ifdef TOPOLOGY_GENERATE -int +static int top_lsp_refresh (struct thread *thread) { struct isis_lsp *lsp; diff --git a/isisd/isis_network.c b/isisd/isis_network.c index ed732cc7..a0df32e3 100644 --- a/isisd/isis_network.c +++ b/isisd/isis_network.c @@ -95,7 +95,7 @@ static char sock_buff[8192]; * FIXME: and the p2p multicast being ??? */ #ifdef GNU_LINUX -int +static int isis_multicast_join (int fd, int registerto, int if_num) { struct packet_mreq mreq; @@ -137,7 +137,7 @@ isis_multicast_join (int fd, int registerto, int if_num) return ISIS_OK; } -int +static int open_packet_socket (struct isis_circuit *circuit) { struct sockaddr_ll s_addr; @@ -201,7 +201,7 @@ open_packet_socket (struct isis_circuit *circuit) #else -int +static int open_bpf_dev (struct isis_circuit *circuit) { int i = 0, fd; diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index 0e0a8322..b6a035e1 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -102,7 +102,7 @@ area_match (struct list *left, struct list *right) * return 0 the IIH's IP is not in the IS's subnetwork * 1 the IIH's IP is in the IS's subnetwork */ -int +static int ip_same_subnet (struct prefix_ipv4 *ip1, struct in_addr *ip2) { u_char *addr1, *addr2; @@ -194,7 +194,7 @@ authentication_check (struct isis_passwd *one, struct isis_passwd *theother) /* * Processing helper functions */ -void +static void tlvs_to_adj_nlpids (struct tlvs *tlvs, struct isis_adjacency *adj) { int i; @@ -214,13 +214,13 @@ tlvs_to_adj_nlpids (struct tlvs *tlvs, struct isis_adjacency *adj) } } -void +static void del_ip_addr (void *val) { XFREE (MTYPE_ISIS_TMP, val); } -void +static void tlvs_to_adj_ipv4_addrs (struct tlvs *tlvs, struct isis_adjacency *adj) { struct listnode *node; @@ -244,7 +244,7 @@ tlvs_to_adj_ipv4_addrs (struct tlvs *tlvs, struct isis_adjacency *adj) } #ifdef HAVE_IPV6 -void +static void tlvs_to_adj_ipv6_addrs (struct tlvs *tlvs, struct isis_adjacency *adj) { struct listnode *node; @@ -1253,7 +1253,7 @@ dontcheckadj: * Section 7.3.15.2 - Action on receipt of a sequence numbers PDU */ -int +static int process_snp (int snp_type, int level, struct isis_circuit *circuit, u_char * ssnpa) { @@ -1532,7 +1532,7 @@ process_snp (int snp_type, int level, struct isis_circuit *circuit, return retval; } -int +static int process_csnp (int level, struct isis_circuit *circuit, u_char * ssnpa) { /* Sanity check - FIXME: move to correct place */ @@ -1546,7 +1546,7 @@ process_csnp (int level, struct isis_circuit *circuit, u_char * ssnpa) return process_snp (ISIS_SNP_CSNP_FLAG, level, circuit, ssnpa); } -int +static int process_psnp (int level, struct isis_circuit *circuit, u_char * ssnpa) { if ((stream_get_endp (circuit->rcv_stream) - @@ -1568,7 +1568,7 @@ process_psnp (int level, struct isis_circuit *circuit, u_char * ssnpa) * 0x38 0x08 0x47 0x00 0x01 0x00 0x02 0x00 * 0x03 0x00 0x81 0x01 0xcc */ -int +static int process_is_hello (struct isis_circuit *circuit) { struct isis_adjacency *adj; @@ -1636,7 +1636,7 @@ process_is_hello (struct isis_circuit *circuit) * PDU Dispatcher */ -int +static int isis_handle_pdu (struct isis_circuit *circuit, u_char * ssnpa) { struct isis_fixed_hdr *hdr; @@ -1875,7 +1875,7 @@ fill_fixed_hdr (struct isis_fixed_hdr *hdr, u_char pdu_type) /* * SEND SIDE */ -void +static void fill_fixed_hdr_andstream (struct isis_fixed_hdr *hdr, u_char pdu_type, struct stream *stream) { @@ -2040,7 +2040,7 @@ send_hello (struct isis_circuit *circuit, int level) return retval; } -int +static int send_lan_hello (struct isis_circuit *circuit, int level) { return send_hello (circuit, level); @@ -2111,7 +2111,7 @@ send_p2p_hello (struct thread *thread) return ISIS_OK; } -int +static int build_csnp (int level, u_char * start, u_char * stop, struct list *lsps, struct isis_circuit *circuit) { @@ -2266,7 +2266,7 @@ send_l2_csnp (struct thread *thread) return retval; } -int +static int build_psnp (int level, struct isis_circuit *circuit, struct list *lsps) { struct isis_fixed_hdr fixed_hdr; @@ -2337,7 +2337,7 @@ build_psnp (int level, struct isis_circuit *circuit, struct list *lsps) * 7.3.15.4 action on expiration of partial SNP interval * level 1 */ -int +static int send_psnp (int level, struct isis_circuit *circuit) { int retval = ISIS_OK; @@ -2438,7 +2438,8 @@ send_l2_psnp (struct thread *thread) return retval; } -void +/* FIXME: Not used any more? */ +/* static void build_link_state (struct isis_lsp *lsp, struct isis_circuit *circuit, struct stream *stream) { @@ -2448,7 +2449,7 @@ build_link_state (struct isis_lsp *lsp, struct isis_circuit *circuit, length = stream_get_putp (stream); return; -} +} */ /* * ISO 10589 - 7.3.14.3 diff --git a/isisd/isis_route.c b/isisd/isis_route.c index 346b0753..3ef90380 100644 --- a/isisd/isis_route.c +++ b/isisd/isis_route.c @@ -53,7 +53,7 @@ extern struct isis *isis; extern struct thread_master *master; -struct isis_nexthop * +static struct isis_nexthop * isis_nexthop_create (struct in_addr *ip, unsigned int ifindex) { struct listnode *node; @@ -86,7 +86,7 @@ isis_nexthop_create (struct in_addr *ip, unsigned int ifindex) return nexthop; } -void +static void isis_nexthop_delete (struct isis_nexthop *nexthop) { nexthop->lock--; @@ -99,7 +99,7 @@ isis_nexthop_delete (struct isis_nexthop *nexthop) return; } -int +static int nexthoplookup (struct list *nexthops, struct in_addr *ip, unsigned int ifindex) { @@ -117,7 +117,8 @@ nexthoplookup (struct list *nexthops, struct in_addr *ip, return 0; } -void +#if 0 /* Old or new code? */ +static void nexthop_print (struct isis_nexthop *nh) { u_char buf[BUFSIZ]; @@ -127,7 +128,7 @@ nexthop_print (struct isis_nexthop *nh) zlog_debug (" %s %u", buf, nh->ifindex); } -void +static void nexthops_print (struct list *nhs) { struct listnode *node; @@ -135,10 +136,10 @@ nexthops_print (struct list *nhs) for (node = listhead (nhs); node; nextnode (node)) nexthop_print (getdata (node)); } +#endif /* 0 */ #ifdef HAVE_IPV6 - -struct isis_nexthop6 * +static struct isis_nexthop6 * isis_nexthop6_new (struct in6_addr *ip6, unsigned int ifindex) { @@ -158,7 +159,7 @@ isis_nexthop6_new (struct in6_addr *ip6, unsigned int ifindex) return nexthop6; } -struct isis_nexthop6 * +static struct isis_nexthop6 * isis_nexthop6_create (struct in6_addr *ip6, unsigned int ifindex) { struct listnode *node; @@ -181,7 +182,7 @@ isis_nexthop6_create (struct in6_addr *ip6, unsigned int ifindex) return nexthop6; } -void +static void isis_nexthop6_delete (struct isis_nexthop6 *nexthop6) { @@ -195,7 +196,7 @@ isis_nexthop6_delete (struct isis_nexthop6 *nexthop6) return; } -int +static int nexthop6lookup (struct list *nexthops6, struct in6_addr *ip6, unsigned int ifindex) { @@ -213,7 +214,8 @@ nexthop6lookup (struct list *nexthops6, struct in6_addr *ip6, return 0; } -void +#ifdef EXTREME_DEBUG +static void nexthop6_print (struct isis_nexthop6 *nh6) { u_char buf[BUFSIZ]; @@ -223,7 +225,7 @@ nexthop6_print (struct isis_nexthop6 *nh6) zlog_debug (" %s %u", buf, nh6->ifindex); } -void +static void nexthops6_print (struct list *nhs6) { struct listnode *node; @@ -231,11 +233,10 @@ nexthops6_print (struct list *nhs6) for (node = listhead (nhs6); node; nextnode (node)) nexthop6_print (getdata (node)); } - - +#endif /* EXTREME_DEBUG */ #endif /* HAVE_IPV6 */ -void +static void adjinfo2nexthop (struct list *nexthops, struct isis_adjacency *adj) { struct isis_nexthop *nh; @@ -258,7 +259,7 @@ adjinfo2nexthop (struct list *nexthops, struct isis_adjacency *adj) } #ifdef HAVE_IPV6 -void +static void adjinfo2nexthop6 (struct list *nexthops6, struct isis_adjacency *adj) { struct listnode *node; @@ -282,7 +283,7 @@ adjinfo2nexthop6 (struct list *nexthops6, struct isis_adjacency *adj) } #endif /* HAVE_IPV6 */ -struct isis_route_info * +static struct isis_route_info * isis_route_info_new (uint32_t cost, uint32_t depth, u_char family, struct list *adjacencies) { @@ -326,7 +327,7 @@ isis_route_info_new (uint32_t cost, uint32_t depth, u_char family, return rinfo; } -void +static void isis_route_info_delete (struct isis_route_info *route_info) { if (route_info->nexthops) @@ -346,7 +347,7 @@ isis_route_info_delete (struct isis_route_info *route_info) XFREE (MTYPE_ISIS_ROUTE_INFO, route_info); } -int +static int isis_route_info_same_attrib (struct isis_route_info *new, struct isis_route_info *old) { @@ -358,7 +359,7 @@ isis_route_info_same_attrib (struct isis_route_info *new, return 1; } -int +static int isis_route_info_same (struct isis_route_info *new, struct isis_route_info *old, u_char family) { @@ -412,7 +413,7 @@ isis_route_info_same (struct isis_route_info *new, return 1; } -void +static void isis_nexthops_merge (struct list *new, struct list *old) { struct listnode *node; @@ -429,7 +430,7 @@ isis_nexthops_merge (struct list *new, struct list *old) } #ifdef HAVE_IPV6 -void +static void isis_nexthops6_merge (struct list *new, struct list *old) { struct listnode *node; @@ -446,7 +447,7 @@ isis_nexthops6_merge (struct list *new, struct list *old) } #endif /* HAVE_IPV6 */ -void +static void isis_route_info_merge (struct isis_route_info *new, struct isis_route_info *old, u_char family) { @@ -460,7 +461,7 @@ isis_route_info_merge (struct isis_route_info *new, return; } -int +static int isis_route_info_prefer_new (struct isis_route_info *new, struct isis_route_info *old) { @@ -565,7 +566,7 @@ isis_route_create (struct prefix *prefix, u_int32_t cost, u_int32_t depth, return route_info; } -void +static void isis_route_delete (struct prefix *prefix, struct route_table *table) { struct route_node *rode; diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index fc5b05ab..66d4ca7e 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -58,8 +58,9 @@ extern struct host host; int isis_run_spf_l1 (struct thread *thread); int isis_run_spf_l2 (struct thread *thread); -/* performace issue ???? */ -void +#if 0 +/* performace issue ???? HT: Old or new code? */ +static void union_adjlist (struct list *target, struct list *source) { struct isis_adjacency *adj, *adj2; @@ -82,9 +83,10 @@ union_adjlist (struct list *target, struct list *source) listnode_add (target, adj); } } +#endif /* 7.2.7 */ -void +static void remove_excess_adjs (struct list *adjs) { struct listnode *node, *excess = NULL; @@ -140,7 +142,8 @@ remove_excess_adjs (struct list *adjs) return; } -const char * +#ifdef EXTREME_DEBUG +static const char * vtype2string (enum vertextype vtype) { switch (vtype) @@ -174,7 +177,7 @@ vtype2string (enum vertextype vtype) return NULL; /* Not reached */ } -const char * +static const char * vid2string (struct isis_vertex *vertex, u_char * buff) { switch (vertex->type) @@ -200,8 +203,9 @@ vid2string (struct isis_vertex *vertex, u_char * buff) return (char *) buff; } +#endif /* EXTREME_DEBUG */ -struct isis_spftree * +static struct isis_spftree * isis_spftree_new () { struct isis_spftree *tree; @@ -219,7 +223,7 @@ isis_spftree_new () return tree; } -void +static void isis_vertex_del (struct isis_vertex *vertex) { list_delete (vertex->Adj_N); @@ -229,7 +233,8 @@ isis_vertex_del (struct isis_vertex *vertex) return; } -void +#if 0 /* HT: Not used yet. */ +static void isis_spftree_del (struct isis_spftree *spftree) { spftree->tents->del = (void (*)(void *)) isis_vertex_del; @@ -242,6 +247,7 @@ isis_spftree_del (struct isis_spftree *spftree) return; } +#endif void spftree_area_init (struct isis_area *area) @@ -270,7 +276,7 @@ spftree_area_init (struct isis_area *area) return; } -struct isis_vertex * +static struct isis_vertex * isis_vertex_new (void *id, enum vertextype vtype) { struct isis_vertex *vertex; @@ -314,7 +320,7 @@ isis_vertex_new (void *id, enum vertextype vtype) /* * Add this IS to the root of SPT */ -void +static void isis_spf_add_self (struct isis_spftree *spftree, struct isis_area *area, int level) { @@ -347,7 +353,7 @@ isis_spf_add_self (struct isis_spftree *spftree, struct isis_area *area, return; } -struct isis_vertex * +static struct isis_vertex * isis_find_vertex (struct list *list, void *id, enum vertextype vtype) { struct listnode *node; @@ -392,7 +398,7 @@ isis_find_vertex (struct list *list, void *id, enum vertextype vtype) /* * Add a vertex to TENT sorted by cost and by vertextype on tie break situation */ -struct isis_vertex * +static struct isis_vertex * isis_spf_add2tent (struct isis_spftree *spftree, enum vertextype vtype, void *id, struct isis_adjacency *adj, u_int16_t cost, int depth, int family) @@ -452,7 +458,7 @@ isis_spf_add2tent (struct isis_spftree *spftree, enum vertextype vtype, return vertex; } -struct isis_vertex * +static struct isis_vertex * isis_spf_add_local (struct isis_spftree *spftree, enum vertextype vtype, void *id, struct isis_adjacency *adj, u_int16_t cost, int family) @@ -486,7 +492,7 @@ add2tent: return isis_spf_add2tent (spftree, vtype, id, adj, cost, 1, family); } -void +static void process_N (struct isis_spftree *spftree, enum vertextype vtype, void *id, u_int16_t dist, u_int16_t depth, struct isis_adjacency *adj, int family) @@ -548,7 +554,7 @@ process_N (struct isis_spftree *spftree, enum vertextype vtype, void *id, /* * C.2.6 Step 1 */ -int +static int isis_spf_process_lsp (struct isis_spftree *spftree, struct isis_lsp *lsp, uint16_t cost, uint16_t depth, int family) { @@ -661,7 +667,7 @@ lspfragloop: return ISIS_OK; } -int +static int isis_spf_process_pseudo_lsp (struct isis_spftree *spftree, struct isis_lsp *lsp, uint16_t cost, uint16_t depth, int family) @@ -714,7 +720,7 @@ pseudofragloop: return ISIS_OK; } -int +static int isis_spf_preload_tent (struct isis_spftree *spftree, struct isis_area *area, int level, int family) { @@ -906,7 +912,7 @@ isis_spf_preload_tent (struct isis_spftree *spftree, * The parent(s) for vertex is set when added to TENT list * now we just put the child pointer(s) in place */ -void +static void add_to_paths (struct isis_spftree *spftree, struct isis_vertex *vertex, struct isis_area *area) { @@ -932,7 +938,7 @@ add_to_paths (struct isis_spftree *spftree, struct isis_vertex *vertex, return; } -void +static void init_spt (struct isis_spftree *spftree) { spftree->tents->del = spftree->paths->del = (void (*)(void *)) isis_vertex_del; @@ -943,7 +949,7 @@ init_spt (struct isis_spftree *spftree) return; } -int +static int isis_run_spf (struct isis_area *area, int level, int family) { int retval = ISIS_OK; @@ -1139,7 +1145,7 @@ isis_spf_schedule (struct isis_area *area, int level) } #ifdef HAVE_IPV6 -int +static int isis_run_spf6_l1 (struct thread *thread) { struct isis_area *area; @@ -1169,7 +1175,7 @@ isis_run_spf6_l1 (struct thread *thread) return retval; } -int +static int isis_run_spf6_l2 (struct thread *thread) { struct isis_area *area; @@ -1253,16 +1259,16 @@ isis_spf_schedule6 (struct isis_area *area, int level) } #endif -void +static void isis_print_paths (struct vty *vty, struct list *paths) { struct listnode *node, *anode; struct isis_vertex *vertex; struct isis_dynhn *dyn, *nh_dyn = NULL; struct isis_adjacency *adj; -#ifdef EXTREME_DEBUG +#if 0 u_char buff[255]; -#endif +#endif /* 0 */ vty_out (vty, "System Id Metric Next-Hop" " Interface SNPA%s", VTY_NEWLINE); diff --git a/isisd/isis_tlv.c b/isisd/isis_tlv.c index d2e9f510..84f36c93 100644 --- a/isisd/isis_tlv.c +++ b/isisd/isis_tlv.c @@ -365,7 +365,7 @@ parse_tlvs (char *areatag, u_char * stream, int size, u_int32_t * expected, * +-------+-------+-------+-------+-------+-------+-------+-------+ */ #ifdef EXTREME_TLV_DEBUG - zlog_debug ("LSP Entries length %d", areatag, length); + zlog_debug ("ISIS-TLV (%s): LSP Entries length %d", areatag, length); #endif /* EXTREME_TLV_DEBUG */ *found |= TLVFLAG_LSP_ENTRIES; if (TLVFLAG_LSP_ENTRIES & *expected) diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c index 6d9e61f8..40743b29 100644 --- a/isisd/isis_zebra.c +++ b/isisd/isis_zebra.c @@ -46,7 +46,7 @@ extern struct thread_master *master; struct in_addr router_id_zebra; /* Router-id update message from zebra. */ -int +static int isis_router_id_update_zebra (int command, struct zclient *zclient, zebra_size_t length) { @@ -59,7 +59,7 @@ isis_router_id_update_zebra (int command, struct zclient *zclient, return 0; } -int +static int isis_zebra_if_add (int command, struct zclient *zclient, zebra_size_t length) { struct interface *ifp; @@ -76,7 +76,7 @@ isis_zebra_if_add (int command, struct zclient *zclient, zebra_size_t length) return 0; } -int +static int isis_zebra_if_del (int command, struct zclient *zclient, zebra_size_t length) { struct interface *ifp; @@ -102,7 +102,7 @@ isis_zebra_if_del (int command, struct zclient *zclient, zebra_size_t length) return 0; } -struct interface * +static struct interface * zebra_interface_if_lookup (struct stream *s) { struct interface *ifp; @@ -121,7 +121,7 @@ zebra_interface_if_lookup (struct stream *s) return ifp; } -int +static int isis_zebra_if_state_up (int command, struct zclient *zclient, zebra_size_t length) { @@ -148,7 +148,7 @@ isis_zebra_if_state_up (int command, struct zclient *zclient, return 0; } -int +static int isis_zebra_if_state_down (int command, struct zclient *zclient, zebra_size_t length) { @@ -168,7 +168,7 @@ isis_zebra_if_state_down (int command, struct zclient *zclient, return 0; } -int +static int isis_zebra_if_address_add (int command, struct zclient *zclient, zebra_size_t length) { @@ -199,7 +199,7 @@ isis_zebra_if_address_add (int command, struct zclient *zclient, return 0; } -int +static int isis_zebra_if_address_del (int command, struct zclient *client, zebra_size_t length) { @@ -237,7 +237,7 @@ isis_zebra_if_address_del (int command, struct zclient *client, return 0; } -void +static void isis_zebra_route_add_ipv4 (struct prefix *prefix, struct isis_route_info *route_info) { @@ -308,7 +308,7 @@ isis_zebra_route_add_ipv4 (struct prefix *prefix, } } -void +static void isis_zebra_route_del_ipv4 (struct prefix *prefix, struct isis_route_info *route_info) { @@ -415,7 +415,7 @@ isis_zebra_route_add_ipv6 (struct prefix *prefix, return; } -void +static void isis_zebra_route_del_ipv6 (struct prefix *prefix, struct isis_route_info *route_info) { @@ -525,7 +525,7 @@ isis_zebra_route_update (struct prefix *prefix, return; } -int +static int isis_zebra_read_ipv4 (int command, struct zclient *zclient, zebra_size_t length) { @@ -572,7 +572,7 @@ isis_zebra_read_ipv4 (int command, struct zclient *zclient, return 0; } -int +static int isis_zebra_read_ipv6 (int command, struct zclient *zclient, zebra_size_t length) { @@ -588,12 +588,14 @@ isis_distribute_list_update (int routetype) return 0; } -int +#if 0 /* Not yet. */ +static int isis_redistribute_default_set (int routetype, int metric_type, int metric_value) { return 0; } +#endif /* 0 */ void isis_zebra_init () -- cgit v1.2.1