]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: code cleanup
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 17 Dec 2009 10:14:28 +0000 (13:14 +0300)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 17 Dec 2009 10:14:28 +0000 (13:14 +0300)
* bgpd/bgp_aspath.c
  * ashash: only used in one file, make static
  * aspath_count_numas(): dead code, sayonara
* bgpd/bgpd.c
  * peer_nsf_stop(): only used in one file, make static
* bgpd/bgp_packet.h
  * bgp_capability_receive(): add missing prototype for a
    global function

bgpd/bgp_aspath.c
bgpd/bgp_aspath.h
bgpd/bgp_packet.h
bgpd/bgpd.c
bgpd/bgpd.h

index 3c8032f8d1f3065bba3c5c07fb4c830b9a6e3857..a9602d9092d9457da7f90b4b28457c0a0520727f 100644 (file)
@@ -86,7 +86,7 @@ struct assegment_header
 };
 
 /* Hash for aspath.  This is the top level structure of AS path. */
-struct hash *ashash;
+static struct hash *ashash;
 
 /* Stream for SNMP. See aspath_snmp_pathseg */
 static struct stream *snmp_stream;
@@ -501,22 +501,6 @@ aspath_has_as4 (struct aspath *aspath)
   return 0;
 }
 
-/* Return number of as numbers in in path */
-unsigned int
-aspath_count_numas (struct aspath *aspath)
-{
-  struct assegment *seg = aspath->segments;
-  unsigned int num;
-  
-  num=0;
-  while (seg)
-    {
-      num += seg->length;
-      seg = seg->next;
-    }
-  return num;
-}
-
 /* Convert aspath structure to string expression. */
 static char *
 aspath_make_str_count (struct aspath *as)
index 9854d1867e1c49606b877955d38a73d2baf4ab0d..b8a5dfabae4fd8f432a1fc346c455392d3f930c0 100644 (file)
@@ -99,7 +99,6 @@ extern size_t aspath_put (struct stream *, struct aspath *, int);
 
 extern struct aspath *aspath_reconcile_as4 (struct aspath *, struct aspath *);
 extern unsigned int aspath_has_as4 (struct aspath *);
-extern unsigned int aspath_count_numas (struct aspath *);
 
 /* For SNMP BGP4PATHATTRASPATHSEGMENT, might be useful for debug */
 extern u_char *aspath_snmp_pathseg (struct aspath *, size_t *);
index 85d640723597e8f7453ccf188e28d31aed6b0d07..8f0ebe318c618b07b33483aaaaffa47077e019fe 100644 (file)
@@ -52,4 +52,6 @@ extern void bgp_default_update_send (struct peer *, struct attr *,
                              afi_t, safi_t, struct peer *);
 extern void bgp_default_withdraw_send (struct peer *, afi_t, safi_t);
 
+extern int bgp_capability_receive (struct peer *, bgp_size_t);
+
 #endif /* _QUAGGA_BGP_PACKET_H */
index b34f996bab958ec1a565ef6817ffbfa6e54dc35f..cf3a6b424094f878a9b6b998104caf859bed1090 100644 (file)
@@ -1129,7 +1129,7 @@ peer_deactivate (struct peer *peer, afi_t afi, safi_t safi)
   return 0;
 }
 
-void
+static void
 peer_nsf_stop (struct peer *peer)
 {
   afi_t afi;
index e8b8ef5a7df2ac60280e548ceaafbd872c669503..f4ce89859a2f3ad0877d4f784b623131f00c36fa 100644 (file)
@@ -952,6 +952,4 @@ extern int peer_maximum_prefix_unset (struct peer *, afi_t, safi_t);
 extern int peer_clear (struct peer *);
 extern int peer_clear_soft (struct peer *, afi_t, safi_t, enum bgp_clear_type);
 
-extern void peer_nsf_stop (struct peer *);
-
 #endif /* _QUAGGA_BGPD_H */