From 6b0655a25194c7c0331154edaa6124cf783e5e5e Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 4 Jun 2014 06:53:35 +0200 Subject: [PATCH] *: nuke ^L (page feed) Quagga sources have inherited a slew of Page Feed (^L, \xC) characters from ancient history. Among other things, these break patchwork's XML-RPC API because \xC is not a valid character in XML documents. Nuke them from high orbit. Patches can be adapted simply by: sed -e 's%^L%%' -i filename.patch (you can type page feeds in some environments with Ctrl-V Ctrl-L) Signed-off-by: David Lamparter --- COPYING | 10 +-- COPYING.LIB | 18 ++--- NEWS | 84 ++++++++++---------- bgpd/bgp_advertise.c | 10 +-- bgpd/bgp_aspath.c | 12 +-- bgpd/bgp_attr.c | 10 +-- bgpd/bgp_clist.c | 8 +- bgpd/bgp_damp.c | 4 +- bgpd/bgp_debug.c | 2 +- bgpd/bgp_dump.c | 8 +- bgpd/bgp_ecommunity.c | 4 +- bgpd/bgp_filter.c | 6 +- bgpd/bgp_fsm.c | 4 +- bgpd/bgp_main.c | 4 +- bgpd/bgp_network.c | 2 +- bgpd/bgp_nexthop.c | 12 +-- bgpd/bgp_packet.c | 6 +- bgpd/bgp_route.c | 68 ++++++++-------- bgpd/bgp_routemap.c | 68 ++++++++-------- bgpd/bgp_snmp.c | 8 +- bgpd/bgp_vty.c | 168 +++++++++++++++++++-------------------- bgpd/bgp_zebra.c | 8 +- bgpd/bgpd.c | 74 ++++++++--------- bgpd/bgpd.h | 2 +- doc/mpls/opaque_lsa.txt | 8 +- lib/command.c | 2 +- lib/distribute.c | 4 +- lib/filter.c | 6 +- lib/getopt.c | 10 +-- lib/getopt1.c | 4 +- lib/if.c | 10 +-- lib/if_rmap.c | 6 +- lib/keychain.c | 8 +- lib/linklist.c | 8 +- lib/log.c | 8 +- lib/memory.c | 10 +-- lib/plist.c | 10 +-- lib/prefix.c | 6 +- lib/privs.c | 10 +-- lib/regex-gnu.h | 12 +-- lib/regex.c | 46 +++++------ lib/routemap.c | 8 +- lib/smux.c | 10 +-- lib/stream.c | 10 +-- lib/table.c | 2 +- lib/thread.c | 12 +-- lib/vty.c | 10 +-- lib/zclient.c | 8 +- ospf6d/ospf6_abr.c | 2 +- ospf6d/ospf6_area.c | 2 +- ospf6d/ospf6_asbr.c | 8 +- ospf6d/ospf6_interface.c | 6 +- ospf6d/ospf6_interface.h | 2 +- ospf6d/ospf6_intra.h | 2 +- ospf6d/ospf6_lsa.c | 6 +- ospf6d/ospf6_lsa.h | 2 +- ospf6d/ospf6_message.c | 4 +- ospf6d/ospf6_neighbor.c | 2 +- ospf6d/ospf6_neighbor.h | 2 +- ospf6d/ospf6_network.h | 2 +- ospf6d/ospf6_route.c | 2 +- ospf6d/ospf6_zebra.c | 4 +- ospf6d/ospf6d.c | 2 +- ospf6d/ospf6d.h | 2 +- ospfclient/COPYING | 10 +-- ospfd/ospf_abr.c | 2 +- ospfd/ospf_asbr.c | 6 +- ospfd/ospf_dump.c | 18 ++--- ospfd/ospf_flood.c | 8 +- ospfd/ospf_ia.c | 2 +- ospfd/ospf_interface.c | 12 +-- ospfd/ospf_ism.c | 4 +- ospfd/ospf_lsa.c | 34 ++++---- ospfd/ospf_lsdb.c | 2 +- ospfd/ospf_main.c | 4 +- ospfd/ospf_nsm.c | 6 +- ospfd/ospf_packet.c | 6 +- ospfd/ospf_snmp.c | 20 ++--- ospfd/ospf_spf.c | 12 +-- ospfd/ospf_vty.c | 50 ++++++------ ospfd/ospf_zebra.c | 2 +- ospfd/ospfd.c | 20 ++--- ripd/rip_debug.c | 2 +- ripd/rip_interface.c | 16 ++-- ripd/rip_main.c | 4 +- ripd/rip_peer.c | 2 +- ripd/rip_routemap.c | 14 ++-- ripd/rip_snmp.c | 6 +- ripd/rip_zebra.c | 8 +- ripd/ripd.c | 20 ++--- ripngd/ripng_debug.c | 2 +- ripngd/ripng_interface.c | 10 +-- ripngd/ripng_main.c | 4 +- ripngd/ripng_peer.c | 2 +- ripngd/ripng_routemap.c | 12 +-- ripngd/ripng_zebra.c | 4 +- ripngd/ripngd.c | 8 +- tests/main.c | 4 +- tests/test-checksum.c | 4 +- tests/test-privs.c | 2 +- zebra/connected.c | 4 +- zebra/if_proc.c | 2 +- zebra/interface.c | 2 +- zebra/irdp_packet.c | 6 +- zebra/kernel_socket.c | 8 +- zebra/main.c | 4 +- zebra/rt_ioctl.c | 2 +- zebra/rt_netlink.c | 2 +- zebra/rtadv.c | 6 +- zebra/test_main.c | 6 +- zebra/zebra_rib.c | 20 ++--- zebra/zebra_routemap.c | 10 +-- zebra/zebra_snmp.c | 6 +- zebra/zebra_vty.c | 2 +- zebra/zserv.c | 16 ++-- 115 files changed, 658 insertions(+), 658 deletions(-) diff --git a/COPYING b/COPYING index a43ea2126..b8cf3a1ab 100644 --- a/COPYING +++ b/COPYING @@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest diff --git a/COPYING.LIB b/COPYING.LIB index 161a3d1d4..2b4628e4a 100644 --- a/COPYING.LIB +++ b/COPYING.LIB @@ -51,7 +51,7 @@ library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. - + Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect @@ -98,7 +98,7 @@ works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. - + GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -145,7 +145,7 @@ Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - + 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 @@ -203,7 +203,7 @@ instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. - + Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. @@ -254,7 +254,7 @@ Library will still fall under Section 6.) distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - + 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work @@ -308,7 +308,7 @@ restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - + 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined @@ -349,7 +349,7 @@ subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. - + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or @@ -401,7 +401,7 @@ conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - + 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is @@ -435,7 +435,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest diff --git a/NEWS b/NEWS index 59e237d67..d1529bc4d 100644 --- a/NEWS +++ b/NEWS @@ -198,7 +198,7 @@ which the PtP patch introduced. * Chages in ospf6d ** Many bugs are fixed. - + * Changes in zebra-0.92a * Changes in bgpd @@ -215,7 +215,7 @@ which the PtP patch introduced. * Changes in zebra ** Treat kernel type routes as EGP routes. - + * Changes in zebra-0.92 ** Overall security is improved. Default umask is 0077. @@ -272,7 +272,7 @@ router bgp 7675 multiple IP address for an interface. ** Redistribution of loopback interface's address works fine. - + * Changes in zebra-0.91 ** --enable-oldrib configure option is removed. @@ -324,7 +324,7 @@ only supported on GNU/Linux with netlink interface. ** Fix bug of LSA MaxAge flood. ** Fix bug of NSSA codes. - + * Changes in zebra-0.90 ** From this beta release, --enable-unixdomain and --enable-newrib @@ -660,7 +660,7 @@ zebrastart.sh /usr/local/sbin/ospfd -d /usr/local/sbin/bgpd -d /usr/local/bin/vtysh -b - + * Changes in zebra-0.89 * Changes in lib @@ -754,7 +754,7 @@ value. it is available. ** Reflect IPv6 interface's address change to protocol daemons. - + * Changes in zebra-0.88 * Changes in lib @@ -875,7 +875,7 @@ generating MRT compatible dump output. * Changes in vtysh ** VTY shell is now included into the distribution. - + * Changes in zebra-0.87 * Changes in lib @@ -968,7 +968,7 @@ bgp ASN. * Changes in zebra ** Better interface up/down event handle. - + * Changes in zebra-0.86 * Changes in lib @@ -1052,7 +1052,7 @@ fixed. ** Remove client structure when client dies. ** Take care static route when interface goes up/down. - + * Changes in zebra-0.85 * Changes in bgpd @@ -1075,7 +1075,7 @@ drastically improved. * Changes in ripd ** RIPv1 update is done by class-full manner. - + * Changes in zebra-0.84b * Changes in lib @@ -1094,14 +1094,14 @@ consume only one screen size memory. ** Fix debug output string. ** Add RIP peer handling. RIP peer are shown by "show ip protocols". - + * Changes in zebra-0.84a * Changes in bgpd ** Fix serious bug of BGP-4+ peering under IPv6 link-local address. Due to the bug BGP-4+ peering may not be established. - + * Changes in zebra-0.84 * Changes in lib @@ -1180,7 +1180,7 @@ consume only one screen size memory. this command, you have to configure neighbor with "neighbor A.B.C.D soft-reconfiguration inbound" beforehand. - + * Changes in zebra-0.83 * bgpd @@ -1192,7 +1192,7 @@ introduced in zebra-0.82. ** When bgpd send Notify message, don't use thread manager. It is now send to neighbor immediately. - + * Changes in zebra-0.82 ** Solaris 2.6 support is added by Michael Handler @@ -1243,7 +1243,7 @@ draft-ietf-idr-bgp4-cap-neg-04.txt. * Changes in ospf6d ** Many debug feature is added. - + * Changes in zebra-0.81 ** SNMP support is disabled in default.--enable-snmp option is added @@ -1252,7 +1252,7 @@ to configure script. * Changes in bgpd ** Fix FSM bug which introduced in zebra-0.80. - + * Changes in zebra-0.80 * access-list @@ -1515,7 +1515,7 @@ to configure script. From zebra-0.80, ripd will reload it's configuration file when ripd receives HUP signal. Other daemon such as bgpd, ospfd will support HUP signal treatment soon. - + * Changes in zebra-0.79 * Changes in zebra @@ -1551,7 +1551,7 @@ not work for NetBSD-currnet on SparcStation 10. * Changes in ospf6d ** Enclosed KAME specific part with #ifdef #endif - + * Changes in zebra-0.78 * Changes in lib @@ -1596,7 +1596,7 @@ RIP_METRIC_INFINITY with network byte order using htonl (). * Changes in ospf6d ** `ip6' statement in configuration is changed to `ipv6'. - + * Changes in zebra-0.77 * Changes in lib @@ -1667,7 +1667,7 @@ timeout, garbage timer. * Changes in ospf6d ** Redistribute route works. - + * Changes in zebra-0.76 * Changes in lib @@ -1677,7 +1677,7 @@ timeout, garbage timer. ** Include SERVICES file to the distribution ** Update zebra.texi to zebra-0.76. - + * Changes in zebra-0.75 * Changes in lib @@ -1724,7 +1724,7 @@ used when `next-hop-self'. ** Never include a neighbor in Hello packet, when the neighbor goes down. - + * Changes in zebra-0.74 * Changes in lib @@ -1785,7 +1785,7 @@ router. ** LSA data structure is changed. ** Call of log_rotate() is removed. - + * Changes in zebra-0.73 * Changes in lib @@ -1847,7 +1847,7 @@ DEFAULT_LOCAL_PREF(100). ** Clean up logging message. ** Reflect routing information to zebra daemon. - + * Changes in zebra-0.72 * Changes in lib @@ -1868,7 +1868,7 @@ set ipv6 nexthop local -> set ipv6 next-hop local * Changes in ospfd ** Fix bug of multiple `network area' directive crashes. - + * Changes in zebra-0.71 * Changes in lib @@ -1919,7 +1919,7 @@ NOTIFY Malformed AS path is send to the peer. * Chanegs in ospf6d ** Routing table code is rewritten. - + * Changes in zebra-0.70 * Changes in zebra @@ -1940,7 +1940,7 @@ nexthop is calculated by looking up IGP routing table. * Changes in ospfd ** DD null pointer bug is fixed. - + * Changes in zebra-0.69 * Changes in zebra @@ -1990,7 +1990,7 @@ peer. * Changes in ospfd ** LS request and LS update can be send and received. - + * Changes in zebra-0.68 * Changes in lib @@ -2023,7 +2023,7 @@ summary-only mode. * Changes in ospf6d ** router zebra related bug is fixed. - + * Changes in zebra-0.67 * Changes in lib @@ -2065,7 +2065,7 @@ it is fixed. * Changes in ospf6d ** `router zebra' is default behavior. - + * Changes in zebra-0.66 * Changes in zebra @@ -2109,7 +2109,7 @@ routes to the kernel, please configure like below: router zebra no redistribute ripng ! - + * Changes in zebra-0.65 * Changes in lib @@ -2161,7 +2161,7 @@ zebra. * Changes in ospf6d ** Bug fix about network vertex. - + * Changes in zebra-0.64.1. This is bug fix release. @@ -2199,7 +2199,7 @@ not work with previous version, sorry. ** Fix bug of no network IPV6_NETWORK. ** Important bug fix about intra-area-prefix-lsa. - + * Changes in zebra-0.64. * Changes in lib @@ -2238,7 +2238,7 @@ Barcenilla. ** There are many changes. If you have interested in ospf6d please visit ospf6d/README file. - + * Changes in zebra-0.63 first beta package. * Changes in lib @@ -2257,7 +2257,7 @@ visit ospf6d/README file. * Changes in ospf6d ** Now ospf6d can be compiled on both Linux and *BSD system. - + * Changes in zebra-19990420 snapshot ** `make dist' at top directory works now. @@ -2300,7 +2300,7 @@ router bgp ASN ** configure --enable-guile turns on zebra-guile build. ** (router-bgp ASN) allocates real bgp structre. - + * Changes in zebra-19990416 snapshot ** Set version to 0.60 for preparation of beta release. @@ -2331,7 +2331,7 @@ Bligh . * Changes in ospfd ** DR and BDR information is shown by `show ip ospf interface' command. - + * Changes in zebra-19990408 snapshot * Changes in bgpd @@ -2358,7 +2358,7 @@ kad@gibson.skif.net. ** With KAME stack, terminal interface is now bind AF_INET socket instead of AF_INET6 one. - + * Changes in zebra-19990403 snapshot * Changes in bgpd @@ -2377,7 +2377,7 @@ segment. This change is for announcement to gated under iBGP. ** Yasuhiro Ohara's ospf6d codes is imported. It is under development and can't be compiled on any platform. - + * Changes in zebra-19990327 snapshot * Changes in bgpd @@ -2422,7 +2422,7 @@ buffer when the address family is not supported and the length is big * Changes in ospfd ** Now ospfd receive OSPF packet. - + * Changes in zebra-19990319 snapshot * Changes in configuration and libraries @@ -2513,8 +2513,8 @@ several files are included in ospfd directory. ** ospf6d codes are merged from Yasuhiro Ohara 's ospfd work. Now codes are located in ospf6d directory. - + Local variables: mode: outline -paragraph-separate: "[ ]*$" +paragraph-separate: "[ ]*$" end: diff --git a/bgpd/bgp_advertise.c b/bgpd/bgp_advertise.c index 666218fa8..e0fa58d46 100644 --- a/bgpd/bgp_advertise.c +++ b/bgpd/bgp_advertise.c @@ -35,7 +35,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_packet.h" #include "bgpd/bgp_fsm.h" #include "bgpd/bgp_mplsvpn.h" - + /* BGP advertise attribute is used for pack same attribute update into one packet. To do that we maintain attribute hash in struct peer. */ @@ -79,7 +79,7 @@ baa_hash_cmp (const void *p1, const void *p2) return attrhash_cmp (baa1->attr, baa2->attr); } - + /* BGP update and withdraw information is stored in BGP advertise structure. This structure is referred from BGP adjacency information. */ @@ -151,7 +151,7 @@ bgp_advertise_unintern (struct hash *hash, struct bgp_advertise_attr *baa) baa_free (baa); } } - + /* BGP adjacency keeps minimal advertisement information. */ static void bgp_adj_out_free (struct bgp_adj_out *adj) @@ -327,7 +327,7 @@ bgp_adj_out_remove (struct bgp_node *rn, struct bgp_adj_out *adj, BGP_ADJ_OUT_DEL (rn, adj); bgp_adj_out_free (adj); } - + void bgp_adj_in_set (struct bgp_node *rn, struct peer *peer, struct attr *attr) { @@ -376,7 +376,7 @@ bgp_adj_in_unset (struct bgp_node *rn, struct peer *peer) bgp_adj_in_remove (rn, adj); bgp_unlock_node (rn); } - + void bgp_sync_init (struct peer *peer) { diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index a8b078ff3..e8559bea6 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -34,7 +34,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_aspath.h" #include "bgpd/bgp_debug.h" #include "bgpd/bgp_attr.h" - + /* Attr. Flags and Attr. Type Code. */ #define AS_HEADER_SIZE 2 @@ -90,7 +90,7 @@ static struct hash *ashash; /* Stream for SNMP. See aspath_snmp_pathseg */ static struct stream *snmp_stream; - + /* Callers are required to initialize the memory */ static as_t * assegment_data_new (int num) @@ -308,7 +308,7 @@ assegment_normalise (struct assegment *head) } return head; } - + static struct aspath * aspath_new (void) { @@ -1657,7 +1657,7 @@ aspath_count (void) { return ashash->count; } - + /* Theoretically, one as path can have: @@ -1811,7 +1811,7 @@ aspath_str2aspath (const char *str) return aspath; } - + /* Make hash value by raw aspath data. */ unsigned int aspath_key_make (void *p) @@ -1868,7 +1868,7 @@ aspath_finish (void) if (snmp_stream) stream_free (snmp_stream); } - + /* return and as path value */ const char * aspath_print (struct aspath *as) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index f284758ef..a1fd16545 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -38,7 +38,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_debug.h" #include "bgpd/bgp_packet.h" #include "bgpd/bgp_ecommunity.h" - + /* Attribute strings for logging. */ static const struct message attr_str [] = { @@ -73,7 +73,7 @@ static const struct message attr_flag_str[] = { BGP_ATTR_FLAG_EXTLEN, "Extended Length" }, }; static const size_t attr_flag_str_max = array_size(attr_flag_str); - + static struct hash *cluster_hash; static void * @@ -207,7 +207,7 @@ cluster_finish (void) hash_free (cluster_hash); cluster_hash = NULL; } - + /* Unknown transit attribute. */ static struct hash *transit_hash; @@ -283,7 +283,7 @@ transit_finish (void) hash_free (transit_hash); transit_hash = NULL; } - + /* Attribute hash routines. */ static struct hash *attrhash; @@ -2055,7 +2055,7 @@ bgp_attr_check (struct peer *peer, struct attr *attr) } return BGP_ATTR_PARSE_PROCEED; } - + int stream_put_prefix (struct stream *, struct prefix *); size_t diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c index 6c9976e3b..b91ab81fa 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -30,7 +30,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_aspath.h" #include "bgpd/bgp_regex.h" #include "bgpd/bgp_clist.h" - + /* Lookup master structure for community-list or extcommunity-list. */ struct community_list_master * @@ -262,7 +262,7 @@ community_list_empty_p (struct community_list *list) { return (list->head == NULL && list->tail == NULL) ? 1 : 0; } - + /* Add community-list entry to the list. */ static void community_list_entry_add (struct community_list *list, @@ -329,7 +329,7 @@ community_list_entry_lookup (struct community_list *list, const void *arg, } return NULL; } - + /* Internal function to perform regular expression match for community attribute. */ static int @@ -590,7 +590,7 @@ community_list_dup_check (struct community_list *list, } return 0; } - + /* Set community-list. */ int community_list_set (struct community_list_handler *ch, diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c index 2820f17c7..0ffafb7a0 100644 --- a/bgpd/bgp_damp.c +++ b/bgpd/bgp_damp.c @@ -42,7 +42,7 @@ static struct bgp_damp_config *damp = &bgp_damp_cfg; used list. */ #define BGP_DAMP_LIST_ADD(N,A) BGP_INFO_ADD(N,A,no_reuse_list) #define BGP_DAMP_LIST_DEL(N,A) BGP_INFO_DEL(N,A,no_reuse_list) - + /* Calculate reuse list index by penalty value. */ static int bgp_reuse_index (int penalty) @@ -86,7 +86,7 @@ bgp_reuse_list_delete (struct bgp_damp_info *bdi) else damp->reuse_list[bdi->index] = bdi->next; } - + /* Return decayed penalty value. */ int bgp_damp_decay (time_t tdiff, int penalty) diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 726dd862b..1d0976977 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -290,7 +290,7 @@ bgp_notify_print(struct peer *peer, struct bgp_notify *bgp_notify, code_str, subcode_str, bgp_notify->length, bgp_notify->data ? bgp_notify->data : ""); } - + /* Debug option setting interface. */ unsigned long bgp_debug_option = 0; diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index edb725a97..a3c9526fd 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -33,7 +33,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_route.h" #include "bgpd/bgp_attr.h" #include "bgpd/bgp_dump.h" - + enum bgp_dump_type { BGP_DUMP_ALL, @@ -89,7 +89,7 @@ struct bgp_dump bgp_dump_routes; /* Dump whole BGP table is very heavy process. */ struct thread *t_bgp_dump_routes; - + /* Some define for BGP packet dump. */ static FILE * bgp_dump_open_file (struct bgp_dump *bgp_dump) @@ -535,7 +535,7 @@ bgp_dump_packet (struct peer *peer, int type, struct stream *packet) if (type == BGP_MSG_UPDATE) bgp_dump_packet_func (&bgp_dump_updates, peer, packet); } - + static unsigned int bgp_dump_parse_time (const char *str) { @@ -845,7 +845,7 @@ config_write_bgp_dump (struct vty *vty) } return 0; } - + /* Initialize BGP packet dump functionality. */ void bgp_dump_init (void) diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c index 5722425e1..8a326a8bb 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -31,7 +31,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA /* Hash of community attribute. */ static struct hash *ecomhash; - + /* Allocate a new ecommunities. */ static struct ecommunity * ecommunity_new (void) @@ -277,7 +277,7 @@ ecommunity_finish (void) hash_free (ecomhash); ecomhash = NULL; } - + /* Extended Communities token enum. */ enum ecommunity_token { diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c index 8ee62b013..fd8ece659 100644 --- a/bgpd/bgp_filter.c +++ b/bgpd/bgp_filter.c @@ -84,7 +84,7 @@ struct as_list struct as_filter *head; struct as_filter *tail; }; - + /* ip as-path access-list 10 permit AS1. */ static struct as_list_master as_list_master = @@ -370,7 +370,7 @@ as_list_filter_delete (struct as_list *aslist, struct as_filter *asfilter) if (as_list_master.delete_hook) (*as_list_master.delete_hook) (); } - + static int as_filter_match (struct as_filter *asfilter, struct aspath *aspath) { @@ -412,7 +412,7 @@ as_list_delete_hook (void (*func) (void)) { as_list_master.delete_hook = func; } - + static int as_list_dup_check (struct as_list *aslist, struct as_filter *new) { diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index fba942769..112c34a19 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -43,7 +43,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #ifdef HAVE_SNMP #include "bgpd/bgp_snmp.h" #endif /* HAVE_SNMP */ - + /* BGP FSM (finite state machine) has three types of functions. Type one is thread functions. Type two is event functions. Type three is FSM functions. Timer functions are set by bgp_timer_set @@ -928,7 +928,7 @@ bgp_ignore (struct peer *peer) zlog (peer->log, LOG_DEBUG, "%s [FSM] bgp_ignore called", peer->host); return 0; } - + /* Finite State Machine structure */ static const struct { int (*func) (struct peer *); diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 1be65043b..5026b5eaa 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -171,7 +171,7 @@ Report bugs to %s\n", progname, ZEBRA_BUG_ADDRESS); exit (status); } - + /* SIGHUP handler. */ void sighup (void) @@ -314,7 +314,7 @@ bgp_exit (int status) exit (status); } - + /* Main routine of bgpd. Treatment of argument and start bgp finite state machine is handled at here. */ int diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index 6c7cf54c0..c0527447a 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -47,7 +47,7 @@ struct bgp_listener union sockunion su; struct thread *thread; }; - + /* * Set MD5 key for the socket, for the given IPv4 peer address. * If the password is NULL or zero-length, the option will be disabled. diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index e23155c7e..5b1d13ac8 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -45,7 +45,7 @@ struct bgp_nexthop_cache *zlookup_query (struct in_addr); #ifdef HAVE_IPV6 struct bgp_nexthop_cache *zlookup_query_ipv6 (struct in6_addr *); #endif /* HAVE_IPV6 */ - + /* Only one BGP scan thread are activated at the same time. */ static struct thread *bgp_scan_thread = NULL; @@ -68,7 +68,7 @@ static struct bgp_table *bgp_connected_table[AFI_MAX]; /* BGP nexthop lookup query client. */ struct zclient *zlookup = NULL; - + /* Add nexthop to the end of the list. */ static void bnc_nexthop_add (struct bgp_nexthop_cache *bnc, struct nexthop *nexthop) @@ -109,7 +109,7 @@ bnc_free (struct bgp_nexthop_cache *bnc) bnc_nexthop_free (bnc); XFREE (MTYPE_BGP_NEXTHOP_CACHE, bnc); } - + static int bgp_nexthop_same (struct nexthop *next1, struct nexthop *next2) { @@ -623,7 +623,7 @@ bgp_address_del (struct prefix *p) } } - + struct bgp_connected_ref { unsigned int refcnt; @@ -781,7 +781,7 @@ bgp_nexthop_self (struct attr *attr) return 0; } - + static struct bgp_nexthop_cache * zlookup_read (void) { @@ -1243,7 +1243,7 @@ bgp_multiaccess_check_v4 (struct in_addr nexthop, char *peer) return 0; } - + DEFUN (bgp_scan_time, bgp_scan_time_cmd, "bgp scan-time <5-60>", diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index d5f24170c..80651f155 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -49,7 +49,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_vty.h" int stream_put_prefix (struct stream *, struct prefix *); - + /* Set up BGP packet marker and packet type. */ static int bgp_packet_set_marker (struct stream *s, u_char type) @@ -1166,7 +1166,7 @@ bgp_capability_send (struct peer *peer, afi_t afi, safi_t safi, BGP_WRITE_ON (peer->t_write, bgp_write, peer->fd); } - + /* RFC1771 6.8 Connection collision detection. */ static int bgp_collision_detect (struct peer *new, struct in_addr remote_id) @@ -2381,7 +2381,7 @@ bgp_capability_receive (struct peer *peer, bgp_size_t size) /* Parse packet. */ return bgp_capability_msg_parse (peer, pnt, size); } - + /* BGP read utility function. */ static int bgp_read_packet (struct peer *peer) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index a919b54e9..f421ca5eb 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -59,7 +59,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA /* Extern from bgp_dump.c */ extern const char *bgp_origin_str[]; extern const char *bgp_origin_long_str[]; - + static struct bgp_node * bgp_afi_node_get (struct bgp_table *table, afi_t afi, safi_t safi, struct prefix *p, struct prefix_rd *prd) @@ -89,7 +89,7 @@ bgp_afi_node_get (struct bgp_table *table, afi_t afi, safi_t safi, struct prefix return rn; } - + /* Allocate bgp_info_extra */ static struct bgp_info_extra * bgp_info_extra_new (void) @@ -683,7 +683,7 @@ bgp_cluster_filter (struct peer *peer, struct attr *attr) } return 0; } - + static int bgp_input_modifier (struct peer *peer, struct prefix *p, struct attr *attr, afi_t afi, safi_t safi) @@ -721,7 +721,7 @@ bgp_input_modifier (struct peer *peer, struct prefix *p, struct attr *attr, } return RMAP_PERMIT; } - + static int bgp_export_modifier (struct peer *rsclient, struct peer *peer, struct prefix *p, struct attr *attr, afi_t afi, safi_t safi) @@ -793,7 +793,7 @@ bgp_import_modifier (struct peer *rsclient, struct peer *peer, } return RMAP_PERMIT; } - + static int bgp_announce_check (struct bgp_info *ri, struct peer *peer, struct prefix *p, struct attr *attr, afi_t afi, safi_t safi) @@ -2468,7 +2468,7 @@ bgp_withdraw (struct peer *peer, struct prefix *p, struct attr *attr, return 0; } - + void bgp_default_originate (struct peer *peer, afi_t afi, safi_t safi, int withdraw) { @@ -2571,7 +2571,7 @@ bgp_default_originate (struct peer *peer, afi_t afi, safi_t safi, int withdraw) bgp_attr_extra_free (&attr); aspath_unintern (&aspath); } - + static void bgp_announce_table (struct peer *peer, afi_t afi, safi_t safi, struct bgp_table *table, int rsclient) @@ -2642,7 +2642,7 @@ bgp_announce_route_all (struct peer *peer) for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++) bgp_announce_route (peer, afi, safi); } - + static void bgp_soft_reconfig_table_rsclient (struct peer *rsclient, afi_t afi, safi_t safi, struct bgp_table *table, struct prefix_rd *prd) @@ -2686,7 +2686,7 @@ bgp_soft_reconfig_rsclient (struct peer *rsclient, afi_t afi, safi_t safi) bgp_soft_reconfig_table_rsclient (rsclient, afi, safi, table, &prd); } } - + static void bgp_soft_reconfig_table (struct peer *peer, afi_t afi, safi_t safi, struct bgp_table *table, struct prefix_rd *prd) @@ -2744,7 +2744,7 @@ bgp_soft_reconfig_in (struct peer *peer, afi_t afi, safi_t safi) bgp_soft_reconfig_table (peer, afi, safi, table, &prd); } } - + struct bgp_clear_node_queue { @@ -3038,7 +3038,7 @@ bgp_clear_stale_route (struct peer *peer, afi_t afi, safi_t safi) } } } - + /* Delete all kernel routes. */ void bgp_cleanup_routes (void) @@ -3079,7 +3079,7 @@ bgp_reset (void) access_list_reset (); prefix_list_reset (); } - + /* Parse NLRI stream. Withdraw NLRI is recognized by NULL attr value. */ int @@ -3242,7 +3242,7 @@ bgp_nlri_sanity_check (struct peer *peer, int afi, u_char *pnt, } return 0; } - + static struct bgp_static * bgp_static_new (void) { @@ -4009,7 +4009,7 @@ bgp_static_unset_vpnv4 (struct vty *vty, const char *ip_str, return CMD_SUCCESS; } - + DEFUN (bgp_network, bgp_network_cmd, "network A.B.C.D/M", @@ -4467,7 +4467,7 @@ ALIAS_DEPRECATED (no_ipv6_bgp_network, "AS-Path hopcount limit attribute\n" "AS-Pathlimit TTL, in number of AS-Path hops\n") #endif /* HAVE_IPV6 */ - + /* Aggreagete address: advertise-map Set condition to advertise attribute @@ -5378,7 +5378,7 @@ ALIAS (no_ipv6_aggregate_address_summary_only, "Aggregate prefix\n" "Filter more specific routes from updates\n") #endif /* HAVE_IPV6 */ - + /* Redistribute route treatment. */ void bgp_redistribute_add (struct prefix *p, const struct in_addr *nexthop, @@ -5578,7 +5578,7 @@ bgp_redistribute_withdraw (struct bgp *bgp, afi_t afi, int type) } } } - + /* Static function to display route. */ static void route_vty_out_route (struct prefix *p, struct vty *vty) @@ -7103,7 +7103,7 @@ DEFUN (show_ipv6_mbgp_prefix, return bgp_show_route (vty, NULL, argv[0], AFI_IP6, SAFI_MULTICAST, NULL, 1); } #endif - + static int bgp_show_regexp (struct vty *vty, int argc, const char **argv, afi_t afi, @@ -7247,7 +7247,7 @@ DEFUN (show_ipv6_mbgp_regexp, bgp_show_type_regexp); } #endif /* HAVE_IPV6 */ - + static int bgp_show_prefix_list (struct vty *vty, const char *prefix_list_str, afi_t afi, safi_t safi, enum bgp_show_type type) @@ -7362,7 +7362,7 @@ DEFUN (show_ipv6_mbgp_prefix_list, bgp_show_type_prefix_list); } #endif /* HAVE_IPV6 */ - + static int bgp_show_filter_list (struct vty *vty, const char *filter, afi_t afi, safi_t safi, enum bgp_show_type type) @@ -7476,7 +7476,7 @@ DEFUN (show_ipv6_mbgp_filter_list, bgp_show_type_filter_list); } #endif /* HAVE_IPV6 */ - + static int bgp_show_route_map (struct vty *vty, const char *rmap_str, afi_t afi, safi_t safi, enum bgp_show_type type) @@ -7561,7 +7561,7 @@ ALIAS (show_bgp_route_map, "Address family\n" "Display routes matching the route-map\n" "A route-map to match on\n") - + DEFUN (show_ip_bgp_cidr_only, show_ip_bgp_cidr_only_cmd, "show ip bgp cidr-only", @@ -7605,7 +7605,7 @@ DEFUN (show_ip_bgp_ipv4_cidr_only, return bgp_show (vty, NULL, AFI_IP, SAFI_UNICAST, bgp_show_type_cidr_only, NULL); } - + DEFUN (show_ip_bgp_community_all, show_ip_bgp_community_all_cmd, "show ip bgp community", @@ -7683,7 +7683,7 @@ DEFUN (show_ipv6_mbgp_community_all, bgp_show_type_community_all, NULL); } #endif /* HAVE_IPV6 */ - + static int bgp_show_community (struct vty *vty, const char *view_name, int argc, const char **argv, int exact, afi_t afi, safi_t safi) @@ -8875,7 +8875,7 @@ ALIAS (show_ipv6_mbgp_community_exact, "Do not export to next AS (well-known community)\n" "Exact match of the communities") #endif /* HAVE_IPV6 */ - + static int bgp_show_community_list (struct vty *vty, const char *com, int exact, afi_t afi, safi_t safi) @@ -9062,7 +9062,7 @@ DEFUN (show_ipv6_mbgp_community_list_exact, return bgp_show_community_list (vty, argv[0], 1, AFI_IP6, SAFI_MULTICAST); } #endif /* HAVE_IPV6 */ - + static int bgp_show_prefix_longer (struct vty *vty, const char *prefix, afi_t afi, safi_t safi, enum bgp_show_type type) @@ -9254,7 +9254,7 @@ peer_lookup_in_view (struct vty *vty, const char *view_name, return peer; } - + enum bgp_stats { BGP_STATS_MAXBITLEN = 0, @@ -9602,7 +9602,7 @@ ALIAS (show_bgp_statistics_view, "Address family\n" "Address Family modifier\n" "BGP RIB advertisement statistics\n") - + enum bgp_pcounts { PCOUNT_ADJ_IN = 0, @@ -10142,7 +10142,7 @@ DEFUN (ipv6_mbgp_neighbor_advertised_route, return peer_adj_routes (vty, peer, AFI_IP6, SAFI_MULTICAST, 0); } #endif /* HAVE_IPV6 */ - + DEFUN (show_ip_bgp_view_neighbor_received_routes, show_ip_bgp_view_neighbor_received_routes_cmd, "show ip bgp view WORD neighbors (A.B.C.D|X:X::X:X) received-routes", @@ -10519,7 +10519,7 @@ ALIAS (show_bgp_view_neighbor_received_prefix_filter, "Display information received from a BGP neighbor\n" "Display the prefixlist filter\n") #endif /* HAVE_IPV6 */ - + static int bgp_show_neighbor_route (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, enum bgp_show_type type) @@ -11671,7 +11671,7 @@ ALIAS (show_bgp_view_ipv6_safi_rsclient_prefix, "IP prefix /, e.g., 3ffe::/16\n") #endif /* HAVE_IPV6 */ - + struct bgp_table *bgp_distance_table; struct bgp_distance @@ -11948,7 +11948,7 @@ DEFUN (no_bgp_distance_source_access_list, bgp_distance_unset (vty, argv[0], argv[1], argv[2]); return CMD_SUCCESS; } - + DEFUN (bgp_damp_set, bgp_damp_set_cmd, "bgp dampening <1-45> <1-20000> <1-20000> <1-255>", @@ -12043,7 +12043,7 @@ DEFUN (show_ip_bgp_flap_statistics, return bgp_show (vty, NULL, AFI_IP, SAFI_UNICAST, bgp_show_type_flap_statistics, NULL); } - + /* Display specified route of BGP table. */ static int bgp_clear_damp_route (struct vty *vty, const char *view_name, @@ -12207,7 +12207,7 @@ DEFUN (clear_ip_bgp_dampening_address_mask, return bgp_clear_damp_route (vty, NULL, prefix_str, AFI_IP, SAFI_UNICAST, NULL, 0); } - + static int bgp_config_write_network_vpnv4 (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi, int *write) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 40f207653..6dc88b3aa 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -100,7 +100,7 @@ o Local extention set as-path exclude : Done */ - + /* 'match peer (A.B.C.D|X:X::X:X)' */ /* Compares the peer specified in the 'match peer' clause with the peer @@ -240,7 +240,7 @@ struct route_map_rule_cmd route_match_ip_address_cmd = route_match_ip_address_compile, route_match_ip_address_free }; - + /* `match ip next-hop IP_ADDRESS' */ /* Match function return 1 if match is success else return zero. */ @@ -292,7 +292,7 @@ struct route_map_rule_cmd route_match_ip_next_hop_cmd = route_match_ip_next_hop_compile, route_match_ip_next_hop_free }; - + /* `match ip route-source ACCESS-LIST' */ /* Match function return 1 if match is success else return zero. */ @@ -350,7 +350,7 @@ struct route_map_rule_cmd route_match_ip_route_source_cmd = route_match_ip_route_source_compile, route_match_ip_route_source_free }; - + /* `match ip address prefix-list PREFIX_LIST' */ static route_map_result_t @@ -390,7 +390,7 @@ struct route_map_rule_cmd route_match_ip_address_prefix_list_cmd = route_match_ip_address_prefix_list_compile, route_match_ip_address_prefix_list_free }; - + /* `match ip next-hop prefix-list PREFIX_LIST' */ static route_map_result_t @@ -437,7 +437,7 @@ struct route_map_rule_cmd route_match_ip_next_hop_prefix_list_cmd = route_match_ip_next_hop_prefix_list_compile, route_match_ip_next_hop_prefix_list_free }; - + /* `match ip route-source prefix-list PREFIX_LIST' */ static route_map_result_t @@ -490,7 +490,7 @@ struct route_map_rule_cmd route_match_ip_route_source_prefix_list_cmd = route_match_ip_route_source_prefix_list_compile, route_match_ip_route_source_prefix_list_free }; - + /* `match metric METRIC' */ /* Match function return 1 if match is success else return zero. */ @@ -555,7 +555,7 @@ struct route_map_rule_cmd route_match_metric_cmd = route_match_metric_compile, route_match_metric_free }; - + /* `match as-path ASPATH' */ /* Match function for as-path match. I assume given object is */ @@ -603,7 +603,7 @@ struct route_map_rule_cmd route_match_aspath_cmd = route_match_aspath_compile, route_match_aspath_free }; - + /* `match community COMMUNIY' */ struct rmap_community { @@ -687,7 +687,7 @@ struct route_map_rule_cmd route_match_community_cmd = route_match_community_compile, route_match_community_free }; - + /* Match function for extcommunity match. */ static route_map_result_t route_match_ecommunity (void *rule, struct prefix *prefix, @@ -736,10 +736,10 @@ struct route_map_rule_cmd route_match_ecommunity_cmd = route_match_ecommunity_compile, route_match_ecommunity_free }; - + /* `match nlri` and `set nlri` are replaced by `address-family ipv4` and `address-family vpnv4'. */ - + /* `match origin' */ static route_map_result_t route_match_origin (void *rule, struct prefix *prefix, @@ -964,7 +964,7 @@ struct route_map_rule_cmd route_set_ip_nexthop_cmd = route_set_ip_nexthop_compile, route_set_ip_nexthop_free }; - + /* `set local-preference LOCAL_PREF' */ /* Set local preference. */ @@ -1031,7 +1031,7 @@ struct route_map_rule_cmd route_set_local_pref_cmd = route_set_local_pref_compile, route_set_local_pref_free, }; - + /* `set weight WEIGHT' */ /* Set weight. */ @@ -1100,7 +1100,7 @@ struct route_map_rule_cmd route_set_weight_cmd = route_set_weight_compile, route_set_weight_free, }; - + /* `set metric METRIC' */ /* Set metric to attribute. */ @@ -1200,7 +1200,7 @@ struct route_map_rule_cmd route_set_metric_cmd = route_set_metric_compile, route_set_metric_free, }; - + /* `set as-path prepend ASPATH' */ /* For AS path prepend mechanism. */ @@ -1256,7 +1256,7 @@ struct route_map_rule_cmd route_set_aspath_prepend_cmd = route_set_aspath_prepend_compile, route_set_aspath_prepend_free, }; - + /* `set as-path exclude ASn' */ /* For ASN exclude mechanism. @@ -1314,7 +1314,7 @@ struct route_map_rule_cmd route_set_aspath_exclude_cmd = route_set_aspath_exclude_compile, route_set_aspath_exclude_free, }; - + /* `set community COMMUNITY' */ struct rmap_com_set { @@ -1438,7 +1438,7 @@ struct route_map_rule_cmd route_set_community_cmd = route_set_community_compile, route_set_community_free, }; - + /* `set comm-list (<1-99>|<100-500>|WORD) delete' */ /* For community set mechanism. */ @@ -1527,7 +1527,7 @@ struct route_map_rule_cmd route_set_community_delete_cmd = route_set_community_delete_compile, route_set_community_delete_free, }; - + /* `set extcommunity rt COMMUNITY' */ /* For community set mechanism. */ @@ -1659,7 +1659,7 @@ struct route_map_rule_cmd route_set_ecommunity_soo_cmd = route_set_ecommunity_soo_compile, route_set_ecommunity_soo_free, }; - + /* `set origin ORIGIN' */ /* For origin set. */ @@ -1713,7 +1713,7 @@ struct route_map_rule_cmd route_set_origin_cmd = route_set_origin_compile, route_set_origin_free, }; - + /* `set atomic-aggregate' */ /* For atomic aggregate set. */ @@ -1754,7 +1754,7 @@ struct route_map_rule_cmd route_set_atomic_aggregate_cmd = route_set_atomic_aggregate_compile, route_set_atomic_aggregate_free, }; - + /* `set aggregator as AS A.B.C.D' */ struct aggregator { @@ -1813,7 +1813,7 @@ struct route_map_rule_cmd route_set_aggregator_as_cmd = route_set_aggregator_as_compile, route_set_aggregator_as_free, }; - + #ifdef HAVE_IPV6 /* `match ipv6 address IP_ACCESS_LIST' */ @@ -1855,7 +1855,7 @@ struct route_map_rule_cmd route_match_ipv6_address_cmd = route_match_ipv6_address_compile, route_match_ipv6_address_free }; - + /* `match ipv6 next-hop IP_ADDRESS' */ static route_map_result_t @@ -1917,7 +1917,7 @@ struct route_map_rule_cmd route_match_ipv6_next_hop_cmd = route_match_ipv6_next_hop_compile, route_match_ipv6_next_hop_free }; - + /* `match ipv6 address prefix-list PREFIX_LIST' */ static route_map_result_t @@ -1957,7 +1957,7 @@ struct route_map_rule_cmd route_match_ipv6_address_prefix_list_cmd = route_match_ipv6_address_prefix_list_compile, route_match_ipv6_address_prefix_list_free }; - + /* `set ipv6 nexthop global IP_ADDRESS' */ /* Set nexthop to object. ojbect must be pointer to struct attr. */ @@ -2021,7 +2021,7 @@ struct route_map_rule_cmd route_set_ipv6_nexthop_global_cmd = route_set_ipv6_nexthop_global_compile, route_set_ipv6_nexthop_global_free }; - + /* `set ipv6 nexthop local IP_ADDRESS' */ /* Set nexthop to object. ojbect must be pointer to struct attr. */ @@ -2086,7 +2086,7 @@ struct route_map_rule_cmd route_set_ipv6_nexthop_local_cmd = route_set_ipv6_nexthop_local_free }; #endif /* HAVE_IPV6 */ - + /* `set vpnv4 nexthop A.B.C.D' */ static route_map_result_t @@ -2142,7 +2142,7 @@ struct route_map_rule_cmd route_set_vpnv4_nexthop_cmd = route_set_vpnv4_nexthop_compile, route_set_vpnv4_nexthop_free }; - + /* `set originator-id' */ /* For origin set. */ @@ -2199,7 +2199,7 @@ struct route_map_rule_cmd route_set_originator_id_cmd = route_set_originator_id_compile, route_set_originator_id_free, }; - + /* Add bgp route map rule. */ static int bgp_route_match_add (struct vty *vty, struct route_map_index *index, @@ -2408,7 +2408,7 @@ bgp_route_map_update (const char *unused) } } } - + DEFUN (match_peer, match_peer_cmd, "match peer (A.B.C.D|X:X::X:X)", @@ -3562,7 +3562,7 @@ ALIAS (no_set_aggregator_as, "AS number\n" "IP address of aggregator\n") - + #ifdef HAVE_IPV6 DEFUN (match_ipv6_address, match_ipv6_address_cmd, @@ -3833,7 +3833,7 @@ ALIAS (no_match_pathlimit_as, "BGP AS-Pathlimit attribute\n" "Match Pathlimit ASN\n") - + /* Initialization of route map. */ void bgp_route_map_init (void) diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c index c8f2aa54b..79aaa03a6 100644 --- a/bgpd/bgp_snmp.c +++ b/bgpd/bgp_snmp.c @@ -38,7 +38,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_route.h" #include "bgpd/bgp_fsm.h" #include "bgpd/bgp_snmp.h" - + /* BGP4-MIB described in RFC1657. */ #define BGP4MIB 1,3,6,1,2,1,15 @@ -112,7 +112,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #define OCTET_STRING ASN_OCTET_STR #define IPADDRESS ASN_IPADDRESS #define GAUGE32 ASN_UNSIGNED - + /* Declare static local variables for convenience. */ SNMP_LOCAL_VARIABLES @@ -242,7 +242,7 @@ struct variable bgp_variables[] = 3, {6, 1, 14}}, }; - + static u_char * bgpVersion (struct variable *v, oid name[], size_t *length, int exact, size_t *var_len, WriteMethod **write_method) @@ -835,7 +835,7 @@ bgp4PathAttrTable (struct variable *v, oid name[], size_t *length, } return NULL; } - + /* BGP Traps. */ struct trap_object bgpTrapList[] = { diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index b4d765afa..3c6973b0b 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -314,7 +314,7 @@ DEFUN_DEPRECATED (neighbor_version, { return CMD_SUCCESS; } - + /* "router bgp" commands. */ DEFUN (router_bgp, router_bgp_cmd, @@ -364,7 +364,7 @@ ALIAS (router_bgp, AS_STR "BGP view\n" "view name\n") - + /* "no router bgp" commands. */ DEFUN (no_router_bgp, no_router_bgp_cmd, @@ -405,7 +405,7 @@ ALIAS (no_router_bgp, AS_STR "BGP view\n" "view name\n") - + /* BGP router-id. */ DEFUN (bgp_router_id, @@ -476,7 +476,7 @@ ALIAS (no_bgp_router_id, BGP_STR "Override configured router identifier\n" "Manually configured router identifier\n") - + /* BGP Cluster ID. */ DEFUN (bgp_cluster_id, @@ -546,7 +546,7 @@ ALIAS (no_bgp_cluster_id, BGP_STR "Configure Route-Reflector Cluster-id\n" "Route-Reflector Cluster-id in IP address format\n") - + DEFUN (bgp_confederation_identifier, bgp_confederation_identifier_cmd, "bgp confederation identifier " CMD_AS_RANGE, @@ -596,7 +596,7 @@ ALIAS (no_bgp_confederation_identifier, "AS confederation parameters\n" "AS number\n" "Set routing domain confederation AS\n") - + DEFUN (bgp_confederation_peers, bgp_confederation_peers_cmd, "bgp confederation peers ." CMD_AS_RANGE, @@ -650,7 +650,7 @@ DEFUN (no_bgp_confederation_peers, } return CMD_SUCCESS; } - + /* Maximum-paths configuration */ DEFUN (bgp_maxpaths, bgp_maxpaths_cmd, @@ -793,7 +793,7 @@ bgp_config_write_maxpaths (struct vty *vty, struct bgp *bgp, afi_t afi, return 0; } - + /* BGP timers. */ DEFUN (bgp_timers, @@ -849,7 +849,7 @@ ALIAS (no_bgp_timers, "BGP timers\n" "Keepalive interval\n" "Holdtime\n") - + DEFUN (bgp_client_to_client_reflection, bgp_client_to_client_reflection_cmd, "bgp client-to-client reflection", @@ -906,7 +906,7 @@ DEFUN (no_bgp_always_compare_med, bgp_flag_unset (bgp, BGP_FLAG_ALWAYS_COMPARE_MED); return CMD_SUCCESS; } - + /* "bgp deterministic-med" configuration. */ DEFUN (bgp_deterministic_med, bgp_deterministic_med_cmd, @@ -1037,7 +1037,7 @@ DEFUN (no_bgp_fast_external_failover, bgp_flag_set (bgp, BGP_FLAG_NO_FAST_EXT_FAILOVER); return CMD_SUCCESS; } - + /* "bgp enforce-first-as" configuration. */ DEFUN (bgp_enforce_first_as, bgp_enforce_first_as_cmd, @@ -1065,7 +1065,7 @@ DEFUN (no_bgp_enforce_first_as, bgp_flag_unset (bgp, BGP_FLAG_ENFORCE_FIRST_AS); return CMD_SUCCESS; } - + /* "bgp bestpath compare-routerid" configuration. */ DEFUN (bgp_bestpath_compare_router_id, bgp_bestpath_compare_router_id_cmd, @@ -1095,7 +1095,7 @@ DEFUN (no_bgp_bestpath_compare_router_id, bgp_flag_unset (bgp, BGP_FLAG_COMPARE_ROUTER_ID); return CMD_SUCCESS; } - + /* "bgp bestpath as-path ignore" configuration. */ DEFUN (bgp_bestpath_aspath_ignore, bgp_bestpath_aspath_ignore_cmd, @@ -1127,7 +1127,7 @@ DEFUN (no_bgp_bestpath_aspath_ignore, bgp_flag_unset (bgp, BGP_FLAG_ASPATH_IGNORE); return CMD_SUCCESS; } - + /* "bgp bestpath as-path confed" configuration. */ DEFUN (bgp_bestpath_aspath_confed, bgp_bestpath_aspath_confed_cmd, @@ -1159,7 +1159,7 @@ DEFUN (no_bgp_bestpath_aspath_confed, bgp_flag_unset (bgp, BGP_FLAG_ASPATH_CONFED); return CMD_SUCCESS; } - + /* "bgp bestpath as-path multipath-relax" configuration. */ DEFUN (bgp_bestpath_aspath_multipath_relax, bgp_bestpath_aspath_multipath_relax_cmd, @@ -1191,7 +1191,7 @@ DEFUN (no_bgp_bestpath_aspath_multipath_relax, bgp_flag_unset (bgp, BGP_FLAG_ASPATH_MULTIPATH_RELAX); return CMD_SUCCESS; } - + /* "bgp log-neighbor-changes" configuration. */ DEFUN (bgp_log_neighbor_changes, bgp_log_neighbor_changes_cmd, @@ -1219,7 +1219,7 @@ DEFUN (no_bgp_log_neighbor_changes, bgp_flag_unset (bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES); return CMD_SUCCESS; } - + /* "bgp bestpath med" configuration. */ DEFUN (bgp_bestpath_med, bgp_bestpath_med_cmd, @@ -1317,7 +1317,7 @@ ALIAS (no_bgp_bestpath_med2, "MED attribute\n" "Treat missing MED as the least preferred one\n" "Compare MED among confederation paths\n") - + /* "no bgp default ipv4-unicast". */ DEFUN (no_bgp_default_ipv4_unicast, no_bgp_default_ipv4_unicast_cmd, @@ -1347,7 +1347,7 @@ DEFUN (bgp_default_ipv4_unicast, bgp_flag_unset (bgp, BGP_FLAG_NO_DEFAULT_IPV4); return CMD_SUCCESS; } - + /* "bgp import-check" configuration. */ DEFUN (bgp_network_import_check, bgp_network_import_check_cmd, @@ -1377,7 +1377,7 @@ DEFUN (no_bgp_network_import_check, bgp_flag_unset (bgp, BGP_FLAG_IMPORT_CHECK); return CMD_SUCCESS; } - + DEFUN (bgp_default_local_preference, bgp_default_local_preference_cmd, "bgp default local-preference <0-4294967295>", @@ -1421,7 +1421,7 @@ ALIAS (no_bgp_default_local_preference, "Configure BGP defaults\n" "local preference (higher=more preferred)\n" "Configure default local preference value\n") - + static int peer_remote_as_vty (struct vty *vty, const char *peer_str, const char *as_str, afi_t afi, safi_t safi) @@ -1481,7 +1481,7 @@ DEFUN (neighbor_remote_as, { return peer_remote_as_vty (vty, argv[0], argv[1], AFI_IP, SAFI_UNICAST); } - + DEFUN (neighbor_peer_group, neighbor_peer_group_cmd, "neighbor WORD peer-group", @@ -1586,7 +1586,7 @@ DEFUN (no_neighbor_peer_group_remote_as, } return CMD_SUCCESS; } - + DEFUN (neighbor_local_as, neighbor_local_as_cmd, NEIGHBOR_CMD2 "local-as " CMD_AS_RANGE, @@ -1696,7 +1696,7 @@ ALIAS (no_neighbor_local_as, "AS number used as local AS\n" "Do not prepend local-as to updates from ebgp peers\n" "Do not prepend local-as to updates from ibgp peers\n") - + DEFUN (neighbor_password, neighbor_password_cmd, NEIGHBOR_CMD2 "password LINE", @@ -1734,7 +1734,7 @@ DEFUN (no_neighbor_password, ret = peer_password_unset (peer); return bgp_vty_return (vty, ret); } - + DEFUN (neighbor_activate, neighbor_activate_cmd, NEIGHBOR_CMD2 "activate", @@ -1773,7 +1773,7 @@ DEFUN (no_neighbor_activate, return bgp_vty_return (vty, ret); } - + DEFUN (neighbor_set_peer_group, neighbor_set_peer_group_cmd, NEIGHBOR_CMD "peer-group WORD", @@ -1855,7 +1855,7 @@ DEFUN (no_neighbor_set_peer_group, return bgp_vty_return (vty, ret); } - + static int peer_flag_modify_vty (struct vty *vty, const char *ip_str, u_int16_t flag, int set) @@ -1908,7 +1908,7 @@ DEFUN (no_neighbor_passive, { return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_PASSIVE); } - + /* neighbor shutdown. */ DEFUN (neighbor_shutdown, neighbor_shutdown_cmd, @@ -1930,7 +1930,7 @@ DEFUN (no_neighbor_shutdown, { return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_SHUTDOWN); } - + /* Deprecated neighbor capability route-refresh. */ DEFUN_DEPRECATED (neighbor_capability_route_refresh, neighbor_capability_route_refresh_cmd, @@ -1954,7 +1954,7 @@ DEFUN_DEPRECATED (no_neighbor_capability_route_refresh, { return CMD_SUCCESS; } - + /* neighbor capability dynamic. */ DEFUN (neighbor_capability_dynamic, neighbor_capability_dynamic_cmd, @@ -1978,7 +1978,7 @@ DEFUN (no_neighbor_capability_dynamic, { return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_DYNAMIC_CAPABILITY); } - + /* neighbor dont-capability-negotiate */ DEFUN (neighbor_dont_capability_negotiate, neighbor_dont_capability_negotiate_cmd, @@ -2000,7 +2000,7 @@ DEFUN (no_neighbor_dont_capability_negotiate, { return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_DONT_CAPABILITY); } - + static int peer_af_flag_modify_vty (struct vty *vty, const char *peer_str, afi_t afi, safi_t safi, u_int32_t flag, int set) @@ -2033,7 +2033,7 @@ peer_af_flag_unset_vty (struct vty *vty, const char *peer_str, afi_t afi, { return peer_af_flag_modify_vty (vty, peer_str, afi, safi, flag, 0); } - + /* neighbor capability orf prefix-list. */ DEFUN (neighbor_capability_orf_prefix, neighbor_capability_orf_prefix_cmd, @@ -2089,7 +2089,7 @@ DEFUN (no_neighbor_capability_orf_prefix, return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty), bgp_node_safi (vty), flag); } - + /* neighbor next-hop-self. */ DEFUN (neighbor_nexthop_self, neighbor_nexthop_self_cmd, @@ -2113,7 +2113,7 @@ DEFUN (no_neighbor_nexthop_self, return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty), bgp_node_safi (vty), PEER_FLAG_NEXTHOP_SELF); } - + /* neighbor remove-private-AS. */ DEFUN (neighbor_remove_private_as, neighbor_remove_private_as_cmd, @@ -2139,7 +2139,7 @@ DEFUN (no_neighbor_remove_private_as, bgp_node_safi (vty), PEER_FLAG_REMOVE_PRIVATE_AS); } - + /* neighbor send-community. */ DEFUN (neighbor_send_community, neighbor_send_community_cmd, @@ -2165,7 +2165,7 @@ DEFUN (no_neighbor_send_community, bgp_node_safi (vty), PEER_FLAG_SEND_COMMUNITY); } - + /* neighbor send-community extended. */ DEFUN (neighbor_send_community_type, neighbor_send_community_type_cmd, @@ -2217,7 +2217,7 @@ DEFUN (no_neighbor_send_community_type, (PEER_FLAG_SEND_COMMUNITY | PEER_FLAG_SEND_EXT_COMMUNITY)); } - + /* neighbor soft-reconfig. */ DEFUN (neighbor_soft_reconfiguration, neighbor_soft_reconfiguration_cmd, @@ -2245,7 +2245,7 @@ DEFUN (no_neighbor_soft_reconfiguration, bgp_node_afi (vty), bgp_node_safi (vty), PEER_FLAG_SOFT_RECONFIG); } - + DEFUN (neighbor_route_reflector_client, neighbor_route_reflector_client_cmd, NEIGHBOR_CMD2 "route-reflector-client", @@ -2277,7 +2277,7 @@ DEFUN (no_neighbor_route_reflector_client, bgp_node_safi (vty), PEER_FLAG_REFLECTOR_CLIENT); } - + static int peer_rsclient_set_vty (struct vty *vty, const char *peer_str, int afi, int safi) @@ -2425,7 +2425,7 @@ peer_rsclient_unset_vty (struct vty *vty, const char *peer_str, return CMD_SUCCESS; } - + /* neighbor route-server-client. */ DEFUN (neighbor_route_server_client, neighbor_route_server_client_cmd, @@ -2449,7 +2449,7 @@ DEFUN (no_neighbor_route_server_client, return peer_rsclient_unset_vty (vty, argv[0], bgp_node_afi(vty), bgp_node_safi(vty)); } - + DEFUN (neighbor_nexthop_local_unchanged, neighbor_nexthop_local_unchanged_cmd, NEIGHBOR_CMD2 "nexthop-local unchanged", @@ -2462,7 +2462,7 @@ DEFUN (neighbor_nexthop_local_unchanged, bgp_node_safi (vty), PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED ); } - + DEFUN (no_neighbor_nexthop_local_unchanged, no_neighbor_nexthop_local_unchanged_cmd, NO_NEIGHBOR_CMD2 "nexthop-local unchanged", @@ -2476,7 +2476,7 @@ DEFUN (no_neighbor_nexthop_local_unchanged, bgp_node_safi (vty), PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED ); } - + DEFUN (neighbor_attr_unchanged, neighbor_attr_unchanged_cmd, NEIGHBOR_CMD2 "attribute-unchanged", @@ -2833,7 +2833,7 @@ DEFUN_DEPRECATED (neighbor_transparent_nexthop, bgp_node_safi (vty), PEER_FLAG_NEXTHOP_UNCHANGED); } - + /* EBGP multihop configuration. */ static int peer_ebgp_multihop_set_vty (struct vty *vty, const char *ip_str, @@ -2907,7 +2907,7 @@ ALIAS (no_neighbor_ebgp_multihop, NEIGHBOR_ADDR_STR2 "Allow EBGP neighbors not on directly connected networks\n" "maximum hop count\n") - + /* disable-connected-check */ DEFUN (neighbor_disable_connected_check, neighbor_disable_connected_check_cmd, @@ -2946,7 +2946,7 @@ ALIAS (no_neighbor_disable_connected_check, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Enforce EBGP neighbors perform multihop\n") - + DEFUN (neighbor_description, neighbor_description_cmd, NEIGHBOR_CMD2 "description .LINE", @@ -3001,7 +3001,7 @@ ALIAS (no_neighbor_description, NEIGHBOR_ADDR_STR2 "Neighbor specific description\n" "Up to 80 characters describing this neighbor\n") - + /* Neighbor update-source. */ static int peer_update_source_vty (struct vty *vty, const char *peer_str, @@ -3056,7 +3056,7 @@ DEFUN (no_neighbor_update_source, { return peer_update_source_vty (vty, argv[0], NULL); } - + static int peer_default_originate_set_vty (struct vty *vty, const char *peer_str, afi_t afi, safi_t safi, @@ -3123,7 +3123,7 @@ ALIAS (no_neighbor_default_originate, "Originate default route to this neighbor\n" "Route-map to specify criteria to originate default\n" "route-map name\n") - + /* Set neighbor's BGP port. */ static int peer_port_vty (struct vty *vty, const char *ip_str, int afi, @@ -3183,7 +3183,7 @@ ALIAS (no_neighbor_port, NEIGHBOR_ADDR_STR "Neighbor's BGP port\n" "TCP port number\n") - + /* neighbor weight. */ static int peer_weight_set_vty (struct vty *vty, const char *ip_str, @@ -3248,7 +3248,7 @@ ALIAS (no_neighbor_weight, NEIGHBOR_ADDR_STR2 "Set default weight for routes from this neighbor\n" "default weight\n") - + /* Override capability negotiation. */ DEFUN (neighbor_override_capability, neighbor_override_capability_cmd, @@ -3270,7 +3270,7 @@ DEFUN (no_neighbor_override_capability, { return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_OVERRIDE_CAPABILITY); } - + DEFUN (neighbor_strict_capability, neighbor_strict_capability_cmd, NEIGHBOR_CMD "strict-capability-match", @@ -3291,7 +3291,7 @@ DEFUN (no_neighbor_strict_capability, { return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_STRICT_CAP_MATCH); } - + static int peer_timers_set_vty (struct vty *vty, const char *ip_str, const char *keep_str, const char *hold_str) @@ -3312,7 +3312,7 @@ peer_timers_set_vty (struct vty *vty, const char *ip_str, return bgp_vty_return (vty, ret); } - + static int peer_timers_unset_vty (struct vty *vty, const char *ip_str) { @@ -3350,7 +3350,7 @@ DEFUN (no_neighbor_timers, { return peer_timers_unset_vty (vty, argv[0]); } - + static int peer_timers_connect_set_vty (struct vty *vty, const char *ip_str, const char *time_str) @@ -3418,7 +3418,7 @@ ALIAS (no_neighbor_timers_connect, "BGP per neighbor timers\n" "BGP connect timer\n" "Connect timer\n") - + static int peer_advertise_interval_vty (struct vty *vty, const char *ip_str, const char *time_str, int set) @@ -3472,7 +3472,7 @@ ALIAS (no_neighbor_advertise_interval, NEIGHBOR_ADDR_STR "Minimum interval between sending BGP routing updates\n" "time in seconds\n") - + /* neighbor interface */ static int peer_interface_vty (struct vty *vty, const char *ip_str, const char *str) @@ -3514,7 +3514,7 @@ DEFUN (no_neighbor_interface, { return peer_interface_vty (vty, argv[0], NULL); } - + /* Set distribute list to the peer. */ static int peer_distribute_set_vty (struct vty *vty, const char *ip_str, @@ -3595,7 +3595,7 @@ DEFUN (no_neighbor_distribute_list, return peer_distribute_unset_vty (vty, argv[0], bgp_node_afi (vty), bgp_node_safi (vty), argv[2]); } - + /* Set prefix list to the peer. */ static int peer_prefix_list_set_vty (struct vty *vty, const char *ip_str, afi_t afi, @@ -3672,7 +3672,7 @@ DEFUN (no_neighbor_prefix_list, return peer_prefix_list_unset_vty (vty, argv[0], bgp_node_afi (vty), bgp_node_safi (vty), argv[2]); } - + static int peer_aslist_set_vty (struct vty *vty, const char *ip_str, afi_t afi, safi_t safi, @@ -3749,7 +3749,7 @@ DEFUN (no_neighbor_filter_list, return peer_aslist_unset_vty (vty, argv[0], bgp_node_afi (vty), bgp_node_safi (vty), argv[2]); } - + /* Set route-map to the peer. */ static int peer_route_map_set_vty (struct vty *vty, const char *ip_str, @@ -3838,7 +3838,7 @@ DEFUN (no_neighbor_route_map, return peer_route_map_unset_vty (vty, argv[0], bgp_node_afi (vty), bgp_node_safi (vty), argv[2]); } - + /* Set unsuppress-map to the peer. */ static int peer_unsuppress_map_set_vty (struct vty *vty, const char *ip_str, afi_t afi, @@ -3897,7 +3897,7 @@ DEFUN (no_neighbor_unsuppress_map, return peer_unsuppress_map_unset_vty (vty, argv[0], bgp_node_afi (vty), bgp_node_safi (vty)); } - + static int peer_maximum_prefix_set_vty (struct vty *vty, const char *ip_str, afi_t afi, safi_t safi, const char *num_str, @@ -4107,7 +4107,7 @@ ALIAS (no_neighbor_maximum_prefix, "Threshold value (%) at which to generate a warning msg\n" "Restart bgp connection after limit is exceeded\n" "Restart interval in minutes") - + /* "neighbor allowas-in" */ DEFUN (neighbor_allowas_in, neighbor_allowas_in_cmd, @@ -4162,7 +4162,7 @@ DEFUN (no_neighbor_allowas_in, return bgp_vty_return (vty, ret); } - + DEFUN (neighbor_ttl_security, neighbor_ttl_security_cmd, NEIGHBOR_CMD2 "ttl-security hops <1-254>", @@ -4198,7 +4198,7 @@ DEFUN (no_neighbor_ttl_security, return bgp_vty_return (vty, peer_ttl_security_hops_unset (peer)); } - + /* Address family configuration. */ DEFUN (address_family_ipv4, address_family_ipv4_cmd, @@ -4282,7 +4282,7 @@ DEFUN (exit_address_family, vty->node = BGP_NODE; return CMD_SUCCESS; } - + /* BGP clear sort. */ enum clear_sort { @@ -4636,7 +4636,7 @@ ALIAS (clear_ip_bgp_as, BGP_STR "Address family\n" "Clear peers with the AS number\n") - + /* Outbound soft-reconfiguration */ DEFUN (clear_ip_bgp_all_soft_out, clear_ip_bgp_all_soft_out_cmd, @@ -5263,7 +5263,7 @@ ALIAS (clear_bgp_as_soft_out, "Address family\n" "Clear peers with the AS number\n" "Soft reconfig outbound update\n") - + /* Inbound soft-reconfiguration */ DEFUN (clear_ip_bgp_all_soft_in, clear_ip_bgp_all_soft_in_cmd, @@ -6225,7 +6225,7 @@ ALIAS (clear_bgp_as_in_prefix_filter, "Clear peers with the AS number\n" "Soft reconfig inbound update\n" "Push out prefix-list ORF and do inbound soft reconfig\n") - + /* Both soft-reconfiguration */ DEFUN (clear_ip_bgp_all_soft, clear_ip_bgp_all_soft_cmd, @@ -6599,7 +6599,7 @@ ALIAS (clear_bgp_as_soft, "Address family\n" "Clear peers with the AS number\n" "Soft reconfig\n") - + /* RS-client soft reconfiguration. */ #ifdef HAVE_IPV6 DEFUN (clear_bgp_all_rsclient, @@ -7278,7 +7278,7 @@ DEFUN (show_ipv6_mbgp_summary, return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST); } #endif /* HAVE_IPV6 */ - + const char * afi_safi_print (afi_t afi, safi_t safi) { @@ -8188,7 +8188,7 @@ ALIAS (show_ip_bgp_instance_neighbors_peer, "Detailed information on TCP and BGP neighbor connections\n" "Neighbor to display information about\n" "Neighbor to display information about\n") - + /* Show BGP's AS paths internal data. There are both `show ip bgp paths' and `show ip mbgp paths'. Those functions results are the same.*/ @@ -8221,7 +8221,7 @@ DEFUN (show_ip_bgp_ipv4_paths, return CMD_SUCCESS; } - + #include "hash.h" static void @@ -8264,7 +8264,7 @@ DEFUN (show_ip_bgp_attr_info, attr_show_all (vty); return CMD_SUCCESS; } - + static int bgp_write_rsclient_summary (struct vty *vty, struct peer *rsclient, afi_t afi, safi_t safi) @@ -8585,7 +8585,7 @@ ALIAS (show_bgp_instance_ipv6_safi_rsclient_summary, "Summary of all Route Server Clients\n") #endif /* HAVE IPV6 */ - + /* Redistribute VTY commands. */ DEFUN (bgp_redistribute_ipv4, @@ -8799,7 +8799,7 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_metric, "Default metric\n" "Route map reference\n" "Pointer to route-map entries\n") - + #ifdef HAVE_IPV6 DEFUN (bgp_redistribute_ipv6, bgp_redistribute_ipv6_cmd, @@ -9014,7 +9014,7 @@ ALIAS (no_bgp_redistribute_ipv6_rmap_metric, "Route map reference\n" "Pointer to route-map entries\n") #endif /* HAVE_IPV6 */ - + int bgp_config_write_redistribute (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi, int *write) @@ -9047,7 +9047,7 @@ bgp_config_write_redistribute (struct vty *vty, struct bgp *bgp, afi_t afi, } return *write; } - + /* BGP node structure. */ static struct cmd_node bgp_node = { @@ -9090,7 +9090,7 @@ static struct cmd_node bgp_vpnv4_node = "%s(config-router-af)# ", 1 }; - + static void community_list_vty (void); void @@ -10231,7 +10231,7 @@ bgp_vty_init (void) /* Community-list. */ community_list_vty (); } - + #include "memory.h" #include "bgp_regex.h" #include "bgp_clist.h" @@ -10630,7 +10630,7 @@ DEFUN (show_ip_community_list_arg, return CMD_SUCCESS; } - + static int extcommunity_list_set_vty (struct vty *vty, int argc, const char **argv, int style, int reject_all_digit_name) @@ -10980,7 +10980,7 @@ DEFUN (show_ip_extcommunity_list_arg, return CMD_SUCCESS; } - + /* Return configuration string of community-list entry. */ static const char * community_list_config_str (struct community_entry *entry) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 0f212321a..f18d916f1 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA. */ #include "bgpd/bgp_fsm.h" #include "bgpd/bgp_debug.h" #include "bgpd/bgp_mpath.h" - + /* All information about zebra. */ struct zclient *zclient = NULL; struct in_addr router_id_zebra; @@ -381,7 +381,7 @@ zebra_read_ipv6 (int command, struct zclient *zclient, zebra_size_t length) return 0; } #endif /* HAVE_IPV6 */ - + struct interface * if_lookup_by_ipv4 (struct in_addr *addr) { @@ -943,7 +943,7 @@ bgp_zebra_withdraw (struct prefix *p, struct bgp_info *info, safi_t safi) } #endif /* HAVE_IPV6 */ } - + /* Other routes redistribution into BGP. */ int bgp_redistribute_set (struct bgp *bgp, afi_t afi, int type) @@ -1069,7 +1069,7 @@ bgp_redistribute_metric_unset (struct bgp *bgp, afi_t afi, int type) return 1; } - + void bgp_zclient_reset (void) { diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 2fe300c5a..19b96fa93 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -61,7 +61,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #ifdef HAVE_SNMP #include "bgpd/bgp_snmp.h" #endif /* HAVE_SNMP */ - + /* BGP process wide configuration. */ static struct bgp_master bgp_master; @@ -72,7 +72,7 @@ struct bgp_master *bm; /* BGP community-list. */ struct community_list_handler *bgp_clist; - + /* BGP global flag manipulation. */ int bgp_option_set (int flag) @@ -115,7 +115,7 @@ bgp_option_check (int flag) { return CHECK_FLAG (bm->options, flag); } - + /* BGP flag manipulation. */ int bgp_flag_set (struct bgp *bgp, int flag) @@ -136,7 +136,7 @@ bgp_flag_check (struct bgp *bgp, int flag) { return CHECK_FLAG (bgp->flags, flag); } - + /* Internal function to set BGP structure configureation flag. */ static void bgp_config_set (struct bgp *bgp, int config) @@ -155,7 +155,7 @@ bgp_config_check (struct bgp *bgp, int config) { return CHECK_FLAG (bgp->config, config); } - + /* Set BGP router identifier. */ int bgp_router_id_set (struct bgp *bgp, struct in_addr *id) @@ -242,7 +242,7 @@ bgp_cluster_id_unset (struct bgp *bgp) } return 0; } - + /* time_t value that is monotonicly increasing * and uneffected by adjustments to system clock */ @@ -273,7 +273,7 @@ bgp_timers_unset (struct bgp *bgp) return 0; } - + /* BGP confederation configuration. */ int bgp_confederation_id_set (struct bgp *bgp, as_t as) @@ -485,7 +485,7 @@ bgp_confederation_peers_remove (struct bgp *bgp, as_t as) return 0; } - + /* Local preference configuration. */ int bgp_default_local_preference_set (struct bgp *bgp, u_int32_t local_pref) @@ -508,7 +508,7 @@ bgp_default_local_preference_unset (struct bgp *bgp) return 0; } - + /* If peer is RSERVER_CLIENT in at least one address family and is not member of a peer_group for that family, return 1. Used to check wether the peer is included in list bgp->rsclient. */ @@ -1325,7 +1325,7 @@ peer_delete (struct peer *peer) return 0; } - + static int peer_group_cmp (struct peer_group *g1, struct peer_group *g2) { @@ -1926,7 +1926,7 @@ peer_group_unbind (struct bgp *bgp, struct peer *peer, return 0; } - + /* BGP instance creation by `router bgp' commands. */ static struct bgp * bgp_create (as_t *as, const char *name) @@ -2181,7 +2181,7 @@ bgp_free (struct bgp *bgp) } XFREE (MTYPE_BGP, bgp); } - + struct peer * peer_lookup (struct bgp *bgp, union sockunion *su) { @@ -2250,7 +2250,7 @@ peer_lookup_with_open (union sockunion *su, as_t remote_as, } return NULL; } - + /* If peer is configured at least one address family return 1. */ int peer_active (struct peer *peer) @@ -2276,7 +2276,7 @@ peer_active_nego (struct peer *peer) return 1; return 0; } - + /* peer_flag_change_type. */ enum peer_change_type { @@ -2695,7 +2695,7 @@ peer_af_flag_unset (struct peer *peer, afi_t afi, safi_t safi, u_int32_t flag) { return peer_af_flag_modify (peer, afi, safi, flag, 0); } - + /* EBGP multihop configuration. */ int peer_ebgp_multihop_set (struct peer *peer, int ttl) @@ -2794,7 +2794,7 @@ peer_ebgp_multihop_unset (struct peer *peer) } return 0; } - + /* Neighbor description. */ int peer_description_set (struct peer *peer, char *desc) @@ -2817,7 +2817,7 @@ peer_description_unset (struct peer *peer) return 0; } - + /* Neighbor update-source. */ int peer_update_source_if_set (struct peer *peer, const char *ifname) @@ -3037,7 +3037,7 @@ peer_update_source_unset (struct peer *peer) } return 0; } - + int peer_default_originate_set (struct peer *peer, afi_t afi, safi_t safi, const char *rmap) @@ -3142,7 +3142,7 @@ peer_default_originate_unset (struct peer *peer, afi_t afi, safi_t safi) } return 0; } - + int peer_port_set (struct peer *peer, u_int16_t port) { @@ -3156,7 +3156,7 @@ peer_port_unset (struct peer *peer) peer->port = BGP_PORT_DEFAULT; return 0; } - + /* neighbor weight. */ int peer_weight_set (struct peer *peer, u_int16_t weight) @@ -3204,7 +3204,7 @@ peer_weight_unset (struct peer *peer) } return 0; } - + int peer_timers_set (struct peer *peer, u_int32_t keepalive, u_int32_t holdtime) { @@ -3274,7 +3274,7 @@ peer_timers_unset (struct peer *peer) return 0; } - + int peer_timers_connect_set (struct peer *peer, u_int32_t connect) { @@ -3309,7 +3309,7 @@ peer_timers_connect_unset (struct peer *peer) return 0; } - + int peer_advertise_interval_set (struct peer *peer, u_int32_t routeadv) { @@ -3342,7 +3342,7 @@ peer_advertise_interval_unset (struct peer *peer) return 0; } - + /* neighbor interface */ int peer_interface_set (struct peer *peer, const char *str) @@ -3363,7 +3363,7 @@ peer_interface_unset (struct peer *peer) return 0; } - + /* Allow-as in. */ int peer_allowas_in_set (struct peer *peer, afi_t afi, safi_t safi, int allow_num) @@ -3424,7 +3424,7 @@ peer_allowas_in_unset (struct peer *peer, afi_t afi, safi_t safi) } return 0; } - + int peer_local_as_set (struct peer *peer, as_t as, int no_prepend, int replace_as) { @@ -3552,7 +3552,7 @@ peer_local_as_unset (struct peer *peer) } return 0; } - + /* Set password for authenticating with the peer. */ int peer_password_set (struct peer *peer, const char *password) @@ -3657,7 +3657,7 @@ peer_password_unset (struct peer *peer) return 0; } - + /* Set distribute list to the peer. */ int peer_distribute_set (struct peer *peer, afi_t afi, safi_t safi, int direct, @@ -3817,7 +3817,7 @@ peer_distribute_update (struct access_list *access) } } } - + /* Set prefix list to the peer. */ int peer_prefix_list_set (struct peer *peer, afi_t afi, safi_t safi, int direct, @@ -3976,7 +3976,7 @@ peer_prefix_list_update (struct prefix_list *plist) } } } - + int peer_aslist_set (struct peer *peer, afi_t afi, safi_t safi, int direct, const char *name) @@ -4130,7 +4130,7 @@ peer_aslist_update (void) } } } - + /* Set route-map to the peer. */ int peer_route_map_set (struct peer *peer, afi_t afi, safi_t safi, int direct, @@ -4238,7 +4238,7 @@ peer_route_map_unset (struct peer *peer, afi_t afi, safi_t safi, int direct) } return 0; } - + /* Set unsuppress-map to the peer. */ int peer_unsuppress_map_set (struct peer *peer, afi_t afi, safi_t safi, @@ -4320,7 +4320,7 @@ peer_unsuppress_map_unset (struct peer *peer, afi_t afi, safi_t safi) } return 0; } - + int peer_maximum_prefix_set (struct peer *peer, afi_t afi, safi_t safi, u_int32_t max, u_char threshold, @@ -4547,7 +4547,7 @@ peer_ttl_security_hops_unset (struct peer *peer) return peer_ebgp_multihop_unset (opeer); } - + int peer_clear (struct peer *peer) { @@ -4652,7 +4652,7 @@ peer_clear_soft (struct peer *peer, afi_t afi, safi_t safi, } return 0; } - + /* Display peer uptime.*/ /* XXX: why does this function return char * when it takes buffer? */ char * @@ -4697,7 +4697,7 @@ peer_uptime (time_t uptime2, char *buf, size_t len) tm->tm_yday/7, tm->tm_yday - ((tm->tm_yday/7) * 7), tm->tm_hour); return buf; } - + static void bgp_config_write_filter (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi) @@ -5394,7 +5394,7 @@ bgp_master_init (void) bm->start_time = bgp_clock (); } - + void bgp_init (void) { diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 688f459f2..a1b1273ba 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -854,7 +854,7 @@ extern struct peer *peer_create_accept (struct bgp *); extern char *peer_uptime (time_t, char *, size_t); extern int bgp_config_write (struct vty *); extern void bgp_config_write_family_header (struct vty *, afi_t, safi_t, int *); - + extern void bgp_master_init (void); extern void bgp_init (void); diff --git a/doc/mpls/opaque_lsa.txt b/doc/mpls/opaque_lsa.txt index 7d5c7fed4..ae89ee34b 100644 --- a/doc/mpls/opaque_lsa.txt +++ b/doc/mpls/opaque_lsa.txt @@ -20,7 +20,7 @@ | (Callback functions) | +----------------------+ - + 2. Self-originated Opaque-LSAs per LSA-type. 2.1 Type-11 (AS-external) Opaque-LSAs @@ -110,7 +110,7 @@ : | +-------------+ : : --- : :..........................................................................: - + 2.2 Type-10 (area-local) Opaque-LSAs struct @@ -204,7 +204,7 @@ : | +-------------+ : : --- : :..........................................................................: - + 2.3 Type-9 (link-local) Opaque-LSAs struct @@ -300,7 +300,7 @@ : +-------------+ : :..........................................................................: - + 3. Internal structures for MPLS-TE parameter management. struct diff --git a/lib/command.c b/lib/command.c index a23736441..7249c6530 100644 --- a/lib/command.c +++ b/lib/command.c @@ -183,7 +183,7 @@ print_version (const char *progname) printf ("%s\n", QUAGGA_COPYRIGHT); } - + /* Utility function to concatenate argv argument into a single string with inserting ' ' character between each argument. */ char * diff --git a/lib/distribute.c b/lib/distribute.c index 8d6f63774..ba8043cf9 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -34,7 +34,7 @@ struct hash *disthash; /* Hook functions. */ void (*distribute_add_hook) (struct distribute *); void (*distribute_delete_hook) (struct distribute *); - + static struct distribute * distribute_new (void) { @@ -133,7 +133,7 @@ distribute_cmp (const struct distribute *dist1, const struct distribute *dist2) return 1; return 0; } - + /* Set access-list name to the distribute list. */ static struct distribute * distribute_list_set (const char *ifname, enum distribute_type type, diff --git a/lib/filter.c b/lib/filter.c index 693418242..96605c7d5 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -110,7 +110,7 @@ static struct access_master access_master_ipv6 = NULL, }; #endif /* HAVE_IPV6 */ - + static struct access_master * access_master_get (afi_t afi) { @@ -208,7 +208,7 @@ filter_match_zebra (struct filter *mfilter, struct prefix *p) else return 0; } - + /* Allocate new access list structure. */ static struct access_list * access_list_new (void) @@ -501,7 +501,7 @@ access_list_filter_delete (struct access_list *access, struct filter *filter) if (master->delete_hook) (*master->delete_hook) (access); } - + /* deny Specify packets to reject permit Specify packets to forward diff --git a/lib/getopt.c b/lib/getopt.c index c784fb6cc..064909d31 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -23,7 +23,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - + /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO @@ -193,7 +193,7 @@ static enum /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; - + #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. @@ -243,7 +243,7 @@ extern int strlen (const char *); #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ - + /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have @@ -456,7 +456,7 @@ _getopt_initialize (argc, argv, optstring) return optstring; } - + /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. @@ -986,7 +986,7 @@ getopt (argc, argv, optstring) #endif /* REALLY_NEED_PLAIN_GETOPT */ #endif /* Not ELIDE_CODE. */ - + #ifdef TEST /* Compile with -DTEST to make an executable for use in testing diff --git a/lib/getopt1.c b/lib/getopt1.c index 985f12c58..fa766747a 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - + #ifdef HAVE_CONFIG_H #include #endif @@ -95,7 +95,7 @@ getopt_long_only (argc, argv, options, long_options, opt_index) #endif /* Not ELIDE_CODE. */ - + #ifdef TEST #include diff --git a/lib/if.c b/lib/if.c index 6348403b6..18e2fb314 100644 --- a/lib/if.c +++ b/lib/if.c @@ -35,7 +35,7 @@ #include "buffer.h" #include "str.h" #include "log.h" - + /* Master list of interfaces. */ struct list *iflist; @@ -45,7 +45,7 @@ struct if_master int (*if_new_hook) (struct interface *); int (*if_delete_hook) (struct interface *); } if_master; - + /* Compare interface names, returning an integer greater than, equal to, or * less than 0, (following the strcmp convention), according to the * relationship between ifp1 and ifp2. Interface names consist of an @@ -513,7 +513,7 @@ DEFUN (no_interface_desc, return CMD_SUCCESS; } - + #ifdef SUNOS_5 /* Need to handle upgrade from SUNWzebra to Quagga. SUNWzebra created * a seperate struct interface for each logical interface, so config @@ -555,7 +555,7 @@ if_sunwzebra_get (const char *name, size_t nlen) return if_get_by_name_len (name, nlen); } #endif /* SUNOS_5 */ - + DEFUN (interface, interface_cmd, "interface IFNAME", @@ -806,7 +806,7 @@ if_indextoname (unsigned int ifindex, char *name) return ifp->name; } #endif - + #if 0 /* this route_table of struct connected's is unused * however, it would be good to use a route_table rather than * a list.. diff --git a/lib/if_rmap.c b/lib/if_rmap.c index 7d049b872..e4a83de8b 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -32,7 +32,7 @@ struct hash *ifrmaphash; /* Hook functions. */ static void (*if_rmap_add_hook) (struct if_rmap *) = NULL; static void (*if_rmap_delete_hook) (struct if_rmap *) = NULL; - + static struct if_rmap * if_rmap_new (void) { @@ -122,7 +122,7 @@ if_rmap_hash_cmp (const void *arg1, const void* arg2) return strcmp (if_rmap1->ifname, if_rmap2->ifname) == 0; } - + static struct if_rmap * if_rmap_set (const char *ifname, enum if_rmap_type type, const char *routemap_name) @@ -273,7 +273,7 @@ ALIAS (no_if_rmap, "Route map for input filtering\n" "Route map for output filtering\n" "Route map interface name\n") - + /* Configuration write function. */ int config_write_if_rmap (struct vty *vty) diff --git a/lib/keychain.c b/lib/keychain.c index 6719cebf7..762c46298 100644 --- a/lib/keychain.c +++ b/lib/keychain.c @@ -226,7 +226,7 @@ key_delete (struct keychain *keychain, struct key *key) free (key->string); key_free (key); } - + DEFUN (key_chain, key_chain_cmd, "key chain WORD", @@ -531,7 +531,7 @@ key_lifetime_infinite_set (struct vty *vty, struct key_range *krange, return CMD_SUCCESS; } - + DEFUN (accept_lifetime_day_month_day_month, accept_lifetime_day_month_day_month_cmd, "accept-lifetime HH:MM:SS <1-31> MONTH <1993-2035> HH:MM:SS <1-31> MONTH <1993-2035>", @@ -689,7 +689,7 @@ DEFUN (accept_lifetime_duration_month_day, return key_lifetime_duration_set (vty, &key->accept, argv[0], argv[2], argv[1], argv[3], argv[4]); } - + DEFUN (send_lifetime_day_month_day_month, send_lifetime_day_month_day_month_cmd, "send-lifetime HH:MM:SS <1-31> MONTH <1993-2035> HH:MM:SS <1-31> MONTH <1993-2035>", @@ -847,7 +847,7 @@ DEFUN (send_lifetime_duration_month_day, return key_lifetime_duration_set (vty, &key->send, argv[0], argv[2], argv[1], argv[3], argv[4]); } - + static struct cmd_node keychain_node = { KEYCHAIN_NODE, diff --git a/lib/linklist.c b/lib/linklist.c index 485a80bee..370b2fa61 100644 --- a/lib/linklist.c +++ b/lib/linklist.c @@ -23,7 +23,7 @@ #include "linklist.h" #include "memory.h" - + /* Allocate new list. */ struct list * list_new (void) @@ -51,7 +51,7 @@ listnode_free (struct listnode *node) { XFREE (MTYPE_LINK_NODE, node); } - + /* Add new data to the list. */ void listnode_add (struct list *list, void *val) @@ -242,7 +242,7 @@ listnode_lookup (struct list *list, void *data) return node; return NULL; } - + /* Delete the node from list. For ospfd and ospf6d. */ void list_delete_node (struct list *list, struct listnode *node) @@ -258,7 +258,7 @@ list_delete_node (struct list *list, struct listnode *node) list->count--; listnode_free (node); } - + /* ospf_spf.c */ void list_add_node_prev (struct list *list, struct listnode *current, void *val) diff --git a/lib/log.c b/lib/log.c index 55a3b052d..1058844b7 100644 --- a/lib/log.c +++ b/lib/log.c @@ -69,7 +69,7 @@ const char *zlog_priority[] = }; - + /* For time string format. */ size_t @@ -145,7 +145,7 @@ time_print(FILE *fp, struct timestamp_control *ctl) fprintf(fp, "%s ", ctl->buf); } - + /* va_list version of zlog. */ static void vzlog (struct zlog *zl, int priority, const char *format, va_list args) @@ -619,7 +619,7 @@ _zlog_assert_failed (const char *assertion, const char *file, abort(); } - + /* Open log stream */ struct zlog * openzlog (const char *progname, zlog_proto_t protocol, @@ -756,7 +756,7 @@ zlog_rotate (struct zlog *zl) return 1; } - + /* Message lookup function. */ const char * lookup (const struct message *mes, int key) diff --git a/lib/memory.c b/lib/memory.c index 684ebcff5..620bdee51 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -32,7 +32,7 @@ static void alloc_inc (int); static void alloc_dec (int); static void log_memstats(int log_priority); - + static const struct message mstr [] = { { MTYPE_THREAD, "thread" }, @@ -42,7 +42,7 @@ static const struct message mstr [] = { MTYPE_IF, "interface" }, { 0, NULL }, }; - + /* Fatal memory allocation error occured. */ static void __attribute__ ((noreturn)) zerror (const char *fname, int type, size_t size) @@ -150,7 +150,7 @@ zstrdup (int type, const char *str) alloc_inc (type); return dup; } - + #ifdef MEMORY_LOG static struct { @@ -259,7 +259,7 @@ alloc_dec (int type) { mstat[type].alloc--; } - + /* Looking up memory status from vty interface. */ #include "vector.h" #include "vty.h" @@ -558,7 +558,7 @@ memory_init (void) install_element (ENABLE_NODE, &show_memory_ospf6_cmd); install_element (ENABLE_NODE, &show_memory_isis_cmd); } - + /* Stats querying from users */ /* Return a pointer to a human friendly string describing * the byte count passed in. E.g: diff --git a/lib/plist.c b/lib/plist.c index 0f802a83b..7416ebd2f 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -110,7 +110,7 @@ static struct prefix_master prefix_master_orf = NULL, NULL, }; - + static struct prefix_master * prefix_master_get (afi_t afi) { @@ -621,7 +621,7 @@ prefix_list_print (struct prefix_list *plist) } } } - + /* Retrun 1 when plist already include pentry policy. */ static struct prefix_list_entry * prefix_entry_dup_check (struct prefix_list *plist, @@ -1165,7 +1165,7 @@ vty_clear_prefix_list (struct vty *vty, afi_t afi, const char *name, } return CMD_SUCCESS; } - + DEFUN (ip_prefix_list, ip_prefix_list_cmd, "ip prefix-list WORD (deny|permit) (A.B.C.D/M|any)", @@ -1759,7 +1759,7 @@ DEFUN (clear_ip_prefix_list_name_prefix, { return vty_clear_prefix_list (vty, AFI_IP, argv[0], argv[1]); } - + #ifdef HAVE_IPV6 DEFUN (ipv6_prefix_list, ipv6_prefix_list_cmd, @@ -2355,7 +2355,7 @@ DEFUN (clear_ipv6_prefix_list_name_prefix, return vty_clear_prefix_list (vty, AFI_IP6, argv[0], argv[1]); } #endif /* HAVE_IPV6 */ - + /* Configuration write function. */ static int config_write_prefix_afi (afi_t afi, struct vty *vty) diff --git a/lib/prefix.c b/lib/prefix.c index a3b1adf8f..dbfdc8301 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -27,7 +27,7 @@ #include "sockunion.h" #include "memory.h" #include "log.h" - + /* Maskbit. */ static const u_char maskbit[] = {0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff}; @@ -186,7 +186,7 @@ prefix6_bit (const struct in6_addr *prefix, const u_char prefixlen) { return prefix_bit((const u_char *) &prefix->s6_addr, prefixlen); } - + /* Address Famiy Identifier to Address Family converter. */ int afi2family (afi_t afi) @@ -494,7 +494,7 @@ prefix_ipv4_any (const struct prefix_ipv4 *p) { return (p->prefix.s_addr == 0 && p->prefixlen == 0); } - + #ifdef HAVE_IPV6 /* Allocate a new ip version 6 route */ diff --git a/lib/privs.c b/lib/privs.c index 69606f57c..e182543a6 100644 --- a/lib/privs.c +++ b/lib/privs.c @@ -47,7 +47,7 @@ struct _pset { typedef cap_value_t pvalue_t; typedef struct _pset pset_t; typedef cap_t pstorage_t; - + #elif defined (HAVE_SOLARIS_CAPABILITIES) typedef priv_t pvalue_t; typedef priv_set_t pset_t; @@ -56,7 +56,7 @@ typedef priv_set_t *pstorage_t; #error "HAVE_CAPABILITIES defined, but neither LCAPS nor Solaris Capabilties!" #endif /* HAVE_LCAPS */ #endif /* HAVE_CAPABILITIES */ - + /* the default NULL state we report is RAISED, but could be LOWERED if * zprivs_terminate is called and the NULL handler is installed. */ @@ -139,7 +139,7 @@ static struct [ZCAP_FOWNER] = { 1, (pvalue_t []) { PRIV_FILE_OWNER }, }, #endif /* HAVE_SOLARIS_CAPABILITIES */ }; - + #ifdef HAVE_LCAPS /* Linux forms of capabilities methods */ /* convert zebras privileges to system capabilities */ @@ -339,7 +339,7 @@ zprivs_caps_terminate (void) cap_free (zprivs_state.caps); } #elif defined (HAVE_SOLARIS_CAPABILITIES) /* !HAVE_LCAPS */ - + /* Solaris specific capability/privilege methods * * Resources: @@ -556,7 +556,7 @@ zprivs_caps_terminate (void) #error "Neither Solaris nor Linux capabilities, dazed and confused..." #endif /* HAVE_LCAPS */ #endif /* HAVE_CAPABILITIES */ - + int zprivs_change_uid (zebra_privs_ops_t op) { diff --git a/lib/regex-gnu.h b/lib/regex-gnu.h index d88ab92bd..4cee464f2 100644 --- a/lib/regex-gnu.h +++ b/lib/regex-gnu.h @@ -165,7 +165,7 @@ typedef unsigned long int reg_syntax_t; stored in the pattern buffer, so changing this does not affect already-compiled regexps. */ extern reg_syntax_t re_syntax_options; - + /* Define combinations of the above bits for the standard possibilities. (The [[[ comments delimit what gets put into the Texinfo file, so don't delete them!) */ @@ -234,7 +234,7 @@ extern reg_syntax_t re_syntax_options; | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) /* [[[end syntaxes]]] */ - + /* Maximum number of duplicates an interval can allow. Some systems (erroneously) define this in other header files, but we want our value, so remove any previous define. */ @@ -309,7 +309,7 @@ typedef enum REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ } reg_errcode_t; - + /* This data structure represents a compiled pattern. Before calling the pattern compiler, the fields `buffer', `allocated', `fastmap', `translate', and `no_sub' can be set. After the pattern has been @@ -389,7 +389,7 @@ struct re_pattern_buffer }; typedef struct re_pattern_buffer regex_t; - + /* Type for byte offsets within the string. POSIX mandates this. */ typedef int regoff_t; @@ -420,7 +420,7 @@ typedef struct regoff_t rm_so; /* Byte offset from string's start to substring's start. */ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ } regmatch_t; - + /* Declarations for routines. */ /* To avoid duplicating every routine declaration -- once with a @@ -532,7 +532,7 @@ extern void regfree _RE_ARGS ((regex_t *__preg)); #endif /* C++ */ #endif /* regex.h */ - + /* Local variables: make-backup-files: t diff --git a/lib/regex.c b/lib/regex.c index a22e03f6b..122f44764 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -209,7 +209,7 @@ init_syntax_once () # define SYNTAX(c) re_syntax_table[c] #endif /* not emacs */ - + /* Get the interface, including the syntax bits. */ #include @@ -279,7 +279,7 @@ init_syntax_once () /* As in Harbison and Steele. */ # define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128) #endif - + /* Should we use malloc or alloca? If REGEX_MALLOC is not defined, we use `alloca' instead of `malloc'. This is because using malloc in re_search* or re_match* could cause memory leaks when C-g is used in @@ -388,7 +388,7 @@ static int re_match_2_internal PARAMS ((struct re_pattern_buffer *bufp, int pos, struct re_registers *regs, int stop)); - + /* These are the command codes that appear in compiled regular expressions. Some opcodes are followed by argument bytes. A command code can specify any interpretation whatsoever for its @@ -527,7 +527,7 @@ typedef enum notsyntaxspec #endif /* emacs */ } re_opcode_t; - + /* Common operations on the compiled pattern. */ /* Store NUMBER in two contiguous bytes starting at DESTINATION. */ @@ -604,7 +604,7 @@ extract_number_and_incr (destination, source) # endif /* not EXTRACT_MACROS */ #endif /* DEBUG */ - + /* If DEBUG is defined, Regex prints many voluminous messages about what it is doing (if the variable `debug' is nonzero). If linked with the main program in `iregex.c', you can enter patterns and strings @@ -977,7 +977,7 @@ printchar (c) # define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) #endif /* not DEBUG */ - + /* Set by `re_set_syntax' to the current regexp syntax to recognize. Can also be assigned to arbitrarily: each pattern buffer stores its own syntax, so it can be changed between regex compilations. */ @@ -1011,7 +1011,7 @@ re_set_syntax (syntax) #ifdef _LIBC weak_alias (__re_set_syntax, re_set_syntax) #endif - + /* This table gives an error message for each of the error codes listed in regex.h. Obviously the order here has to be same as there. POSIX doesn't require that we do anything for REG_NOERROR, @@ -1091,7 +1091,7 @@ static const size_t re_error_msgid_idx[] = REG_ESIZE_IDX, REG_ERPAREN_IDX }; - + /* Avoiding alloca during matching, to placate r_alloc. */ /* Define MATCH_MAY_ALLOCATE unless we need to make sure that the @@ -1129,7 +1129,7 @@ static const size_t re_error_msgid_idx[] = # undef MATCH_MAY_ALLOCATE #endif - + /* Failure stack declarations and macros; both re_compile_fastmap and re_match_2 use a failure stack. These have to be macros because of REGEX_ALLOCATE_STACK. */ @@ -1495,7 +1495,7 @@ typedef struct } /* POP_FAILURE_POINT */ - + /* Structure for per-register (a.k.a. per-group) information. Other register information, such as the starting and ending positions (which are addresses), and the list of @@ -1555,7 +1555,7 @@ typedef union static char reg_unset_dummy; #define REG_UNSET_VALUE (®_unset_dummy) #define REG_UNSET(e) ((e) == REG_UNSET_VALUE) - + /* Subroutine declarations and macros for regex_compile. */ static reg_errcode_t regex_compile _RE_ARGS ((const char *pattern, size_t size, @@ -1809,7 +1809,7 @@ typedef struct || STREQ (string, "punct") || STREQ (string, "graph") \ || STREQ (string, "cntrl") || STREQ (string, "blank")) #endif - + #ifndef MATCH_MAY_ALLOCATE /* If we cannot allocate large objects within re_match_2_internal, @@ -1857,7 +1857,7 @@ regex_grow_registers (num_regs) } #endif /* not MATCH_MAY_ALLOCATE */ - + static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type compile_stack, regnum_t regnum)); @@ -2991,7 +2991,7 @@ regex_compile (pattern, size, syntax, bufp) return REG_NOERROR; } /* regex_compile */ - + /* Subroutines for `regex_compile'. */ /* Store OP at LOC followed by two-byte integer parameter ARG. */ @@ -3178,7 +3178,7 @@ compile_range (p_ptr, pend, translate, syntax, b) return REG_NOERROR; } - + /* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible characters can start a string that matches the pattern. This fastmap @@ -3484,7 +3484,7 @@ re_compile_fastmap (bufp) #ifdef _LIBC weak_alias (__re_compile_fastmap, re_compile_fastmap) #endif - + /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use this memory for recording register information. STARTS and ENDS @@ -3522,7 +3522,7 @@ re_set_registers (bufp, regs, num_regs, starts, ends) #ifdef _LIBC weak_alias (__re_set_registers, re_set_registers) #endif - + /* Searching routines. */ /* Like re_search_2, below, but only one string is specified, and @@ -3704,7 +3704,7 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) #ifdef _LIBC weak_alias (__re_search_2, re_search_2) #endif - + /* This converts PTR, a pointer into one of the search strings `string1' and `string2' into an offset from the beginning of that string. */ #define POINTER_TO_OFFSET(ptr) \ @@ -3783,7 +3783,7 @@ weak_alias (__re_search_2, re_search_2) to actually save any registers when none are active. */ #define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH) #define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1) - + /* Matching routines. */ #ifndef emacs /* Emacs never uses this. */ @@ -5248,7 +5248,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) return -1; /* Failure to match. */ } /* re_match_2 */ - + /* Subroutine definitions for re_match_2. */ @@ -5511,7 +5511,7 @@ bcmp_translate (s1, s2, len, translate) } return 0; } - + /* Entry points for GNU code. */ /* re_compile_pattern is the GNU regular expression compiler: it @@ -5552,7 +5552,7 @@ re_compile_pattern (pattern, length, bufp) #ifdef _LIBC weak_alias (__re_compile_pattern, re_compile_pattern) #endif - + /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ @@ -5623,7 +5623,7 @@ re_exec (s) } #endif /* _REGEX_RE_COMP */ - + /* POSIX.2 functions. Don't define these for Emacs. */ #ifndef emacs diff --git a/lib/routemap.c b/lib/routemap.c index 4f4e6d620..1e1510ebd 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -28,7 +28,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "command.h" #include "vty.h" #include "log.h" - + /* Vector for route match rules. */ static vector route_match_vec; @@ -72,7 +72,7 @@ route_map_rule_delete (struct route_map_rule_list *, static void route_map_index_delete (struct route_map_index *, int); - + /* New route map allocation. Please note route map's name must be specified. */ static struct route_map * @@ -420,7 +420,7 @@ route_map_rule_new (void) new = XCALLOC (MTYPE_ROUTE_MAP_RULE, sizeof (struct route_map_rule)); return new; } - + /* Install rule command to the match list. */ void route_map_install_match (struct route_map_rule_cmd *cmd) @@ -898,7 +898,7 @@ route_map_finish (void) vector_free (route_set_vec); route_set_vec = NULL; } - + /* VTY related functions. */ DEFUN (route_map, route_map_cmd, diff --git a/lib/smux.c b/lib/smux.c index 074664001..70be49289 100644 --- a/lib/smux.c +++ b/lib/smux.c @@ -78,7 +78,7 @@ struct subtree enum smux_event {SMUX_SCHEDULE, SMUX_CONNECT, SMUX_READ}; void smux_event (enum smux_event, int); - + /* SMUX socket. */ int smux_sock = -1; @@ -114,7 +114,7 @@ static struct cmd_node smux_node = /* thread master */ static struct thread_master *master; - + static int oid_compare_part (oid *o1, int o1_len, oid *o2, int o2_len) { @@ -132,7 +132,7 @@ oid_compare_part (oid *o1, int o1_len, oid *o2, int o2_len) return 0; } - + static void smux_oid_dump (const char *prefix, const oid *oid, size_t oid_len) { @@ -1230,7 +1230,7 @@ smux_stop (void) smux_sock = -1; } } - + void @@ -1251,7 +1251,7 @@ smux_event (enum smux_event event, int sock) break; } } - + static int smux_str2oid (const char *str, oid *oid, size_t *oid_len) { diff --git a/lib/stream.c b/lib/stream.c index 9a6fcbcf2..0fc3c3b11 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -196,7 +196,7 @@ stream_resize (struct stream *s, size_t newsize) return s->size; } - + size_t stream_get_getp (struct stream *s) { @@ -285,7 +285,7 @@ stream_forward_endp (struct stream *s, size_t size) s->endp += size; } - + /* Copy from stream to destination. */ void stream_get (void *dst, struct stream *s, size_t size) @@ -492,7 +492,7 @@ stream_get_ipv4 (struct stream *s) return l; } - + /* Copy to source to stream. * * XXX: This uses CHECK_SIZE and hence has funny semantics -> Size will wrap @@ -731,7 +731,7 @@ stream_put_prefix (struct stream *s, struct prefix *p) return psize; } - + /* Read size from fd. */ int stream_read (struct stream *s, int fd, size_t size) @@ -937,7 +937,7 @@ stream_flush (struct stream *s, int fd) return nbytes; } - + /* Stream first in first out queue. */ struct stream_fifo * diff --git a/lib/table.c b/lib/table.c index 19b5d1b18..220e9b81e 100644 --- a/lib/table.c +++ b/lib/table.c @@ -29,7 +29,7 @@ static void route_node_delete (struct route_node *); static void route_table_free (struct route_table *); - + /* * route_table_init_with_delegate diff --git a/lib/thread.c b/lib/thread.c index e2a37b149..468edd90c 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -45,7 +45,7 @@ extern int agentx_enabled; #include #endif - + /* Recent absolute time of day */ struct timeval recent_time; static struct timeval last_recent_time; @@ -54,9 +54,9 @@ static struct timeval relative_time; static struct timeval relative_time_base; /* init flag */ static unsigned short timers_inited; - + static struct hash *cpu_record = NULL; - + /* Struct timeval's tv_usec one second value. */ #define TIMER_SECOND_MICRO 1000000L @@ -108,7 +108,7 @@ timeval_elapsed (struct timeval a, struct timeval b) return (((a.tv_sec - b.tv_sec) * TIMER_SECOND_MICRO) + (a.tv_usec - b.tv_usec)); } - + #if !defined(HAVE_CLOCK_MONOTONIC) && !defined(__APPLE__) static void quagga_gettimeofday_relative_adjust (void) @@ -247,7 +247,7 @@ recent_relative_time (void) { return relative_time; } - + static unsigned int cpu_record_hash_key (struct cpu_thread_history *a) { @@ -496,7 +496,7 @@ DEFUN(clear_thread_cpu, cpu_record_clear (filter); return CMD_SUCCESS; } - + static int thread_timer_cmp(void *a, void *b) { diff --git a/lib/vty.c b/lib/vty.c index 9908b0236..114135760 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -57,7 +57,7 @@ static void vty_event (enum event, int, struct vty *); /* Extern host structure from command.c */ extern struct host host; - + /* Vector which store each vty structure. */ static vector vtyvec; @@ -89,7 +89,7 @@ static u_char restricted_mode = 0; /* Integrated configuration file path */ char integrate_default[] = SYSCONFDIR INTEGRATE_DEFAULT_CONFIG; - + /* VTY standard output function. */ int vty_out (struct vty *vty, const char *format, ...) @@ -455,7 +455,7 @@ vty_command (struct vty *vty, char *buf) return ret; } - + static const char telnet_backward_char = 0x08; static const char telnet_space_char = ' '; @@ -2494,7 +2494,7 @@ vty_config_unlock (struct vty *vty) } return vty->config; } - + /* Master of the threads. */ static struct thread_master *master; @@ -2551,7 +2551,7 @@ vty_event (enum event event, int sock, struct vty *vty) break; } } - + DEFUN (config_who, config_who_cmd, "who", diff --git a/lib/zclient.c b/lib/zclient.c index d3165962d..20188f6ab 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -32,7 +32,7 @@ #include "zclient.h" #include "memory.h" #include "table.h" - + /* Zebra client events. */ enum event {ZCLIENT_SCHEDULE, ZCLIENT_READ, ZCLIENT_CONNECT}; @@ -45,7 +45,7 @@ char *zclient_serv_path = NULL; /* This file local debug flag. */ int zclient_debug = 0; - + /* Allocate zclient structure. */ struct zclient * zclient_new () @@ -413,7 +413,7 @@ zclient_connect (struct thread *t) return zclient_start (zclient); } - + /* * "xdr_encode"-like interface that allows daemon (client) to send * a message to zebra server for a route that needs to be @@ -816,7 +816,7 @@ zebra_interface_address_read (int type, struct stream *s) return ifc; } - + /* Zebra client message read function. */ static int zclient_read (struct thread *thread) diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index 54404ab87..bb79900e5 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -787,7 +787,7 @@ ospf6_abr_reimport (struct ospf6_area *oa) } - + /* Display functions */ static char * ospf6_inter_area_prefix_lsa_get_prefix_str (struct ospf6_lsa *lsa, char *buf, diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 9a4e30e14..4b4ca1304 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -288,7 +288,7 @@ ospf6_area_disable (struct ospf6_area *oa) THREAD_OFF (oa->thread_intra_prefix_lsa); } - + void ospf6_area_show (struct vty *vty, struct ospf6_area *oa) { diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index c414970b8..6ba6cdf6b 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -151,7 +151,7 @@ ospf6_as_external_lsa_originate (struct ospf6_route *route) ospf6_lsa_originate_process (lsa, ospf6); } - + void ospf6_asbr_lsa_add (struct ospf6_lsa *lsa) { @@ -342,7 +342,7 @@ ospf6_asbr_lsentry_remove (struct ospf6_route *asbr_entry) } - + /* redistribute function */ static void @@ -748,7 +748,7 @@ ospf6_redistribute_show_config (struct vty *vty) } - + /* Routemap Functions */ static route_map_result_t ospf6_routemap_rule_match_address_prefixlist (void *rule, @@ -1168,7 +1168,7 @@ ospf6_routemap_init (void) install_element (RMAP_NODE, &ospf6_routemap_no_set_forwarding_cmd); } - + /* Display functions */ static char * ospf6_as_external_lsa_get_prefix_str (struct ospf6_lsa *lsa, char *buf, diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 4bc615518..f0ef79093 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -516,7 +516,7 @@ ospf6_interface_state_change (u_char next_state, struct ospf6_interface *oi) } - + /* DR Election, RFC2328 section 9.4 */ #define IS_ELIGIBLE(n) \ @@ -673,7 +673,7 @@ dr_election (struct ospf6_interface *oi) return next_state; } - + /* Interface State Machine */ int interface_up (struct thread *thread) @@ -843,7 +843,7 @@ interface_down (struct thread *thread) return 0; } - + /* show specified interface structure */ static int ospf6_interface_show (struct vty *vty, struct interface *ifp) diff --git a/ospf6d/ospf6_interface.h b/ospf6d/ospf6_interface.h index 34f752330..95a377fbb 100644 --- a/ospf6d/ospf6_interface.h +++ b/ospf6d/ospf6_interface.h @@ -142,7 +142,7 @@ extern const char *ospf6_interface_state_str[]; #define OSPF6_REFERENCE_BANDWIDTH 100000 /* Kbps */ - + /* Function Prototypes */ extern struct ospf6_interface *ospf6_interface_lookup_by_ifindex (int); diff --git a/ospf6d/ospf6_intra.h b/ospf6d/ospf6_intra.h index e909da23d..c9660b6a5 100644 --- a/ospf6d/ospf6_intra.h +++ b/ospf6d/ospf6_intra.h @@ -153,7 +153,7 @@ struct ospf6_intra_prefix_lsa /* followed by ospf6 prefix(es) */ }; - + #define OSPF6_ROUTER_LSA_SCHEDULE(oa) \ do { \ if (! (oa)->thread_router_lsa \ diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index 4aa2b12ff..2e6153557 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -658,7 +658,7 @@ ospf6_lsa_unlock (struct ospf6_lsa *lsa) ospf6_lsa_delete (lsa); } - + /* ospf6 lsa expiry */ int ospf6_lsa_expire (struct thread *thread) @@ -744,7 +744,7 @@ ospf6_lsa_refresh (struct thread *thread) return 0; } - + /* Fletcher Checksum -- Refer to RFC1008. */ @@ -790,7 +790,7 @@ ospf6_lsa_terminate (void) { vector_free (ospf6_lsa_handler_vector); } - + static char * ospf6_lsa_handler_name (struct ospf6_lsa_handler *h) { diff --git a/ospf6d/ospf6_lsa.h b/ospf6d/ospf6_lsa.h index aed89df29..a85ca66dc 100644 --- a/ospf6d/ospf6_lsa.h +++ b/ospf6d/ospf6_lsa.h @@ -209,7 +209,7 @@ extern struct ospf6_lsa_handler unknown_handler; continue; \ } - + /* Function Prototypes */ extern const char *ospf6_lstype_name (u_int16_t type); extern const char *ospf6_lstype_short_name (u_int16_t type); diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 0756ef34c..ecc96f714 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -2326,7 +2326,7 @@ ospf6_lsack_send_interface (struct thread *thread) return 0; } - + /* Commands */ DEFUN (debug_ospf6_message, debug_ospf6_message_cmd, @@ -2400,7 +2400,7 @@ ALIAS (debug_ospf6_message, "Debug only receiving message\n" ) - + DEFUN (no_debug_ospf6_message, no_debug_ospf6_message_cmd, "no debug ospf6 message (unknown|hello|dbdesc|lsreq|lsupdate|lsack|all)", diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index fb209fdfa..7f6c6c5cd 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -615,7 +615,7 @@ inactivity_timer (struct thread *thread) } - + /* vty functions */ /* show neighbor structure */ static void diff --git a/ospf6d/ospf6_neighbor.h b/ospf6d/ospf6_neighbor.h index 888218980..65c43fd2e 100644 --- a/ospf6d/ospf6_neighbor.h +++ b/ospf6d/ospf6_neighbor.h @@ -148,7 +148,7 @@ static const char *ospf6_neighbor_event_string (int event) extern const char *ospf6_neighbor_state_str[]; - + /* Function Prototypes */ int ospf6_neighbor_cmp (void *va, void *vb); void ospf6_neighbor_dbex_init (struct ospf6_neighbor *on); diff --git a/ospf6d/ospf6_network.h b/ospf6d/ospf6_network.h index 0526b3e1c..947834d56 100644 --- a/ospf6d/ospf6_network.h +++ b/ospf6d/ospf6_network.h @@ -22,7 +22,7 @@ #ifndef OSPF6_NETWORK_H #define OSPF6_NETWORK_H - + extern int ospf6_sock; extern struct in6_addr allspfrouters6; diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 5f1869ac0..9e6b33e54 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -780,7 +780,7 @@ ospf6_route_table_delete (struct ospf6_route_table *table) XFREE (MTYPE_OSPF6_ROUTE, table); } - + /* VTY commands */ void ospf6_route_show (struct vty *vty, struct ospf6_route *route) diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index 8ee63fe6a..85f70647f 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -274,7 +274,7 @@ ospf6_zebra_read_ipv6 (int command, struct zclient *zclient, - + DEFUN (show_zebra, show_zebra_cmd, "show zebra", @@ -602,7 +602,7 @@ ospf6_zebra_init (void) } /* Debug */ - + DEFUN (debug_ospf6_zebra_sendrecv, debug_ospf6_zebra_sendrecv_cmd, "debug ospf6 zebra (send|recv)", diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index 3fdbda18e..3cdd5c116 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -77,7 +77,7 @@ route_prev (struct route_node *node) return prev; } - + /* show database functions */ DEFUN (show_version_ospf6, show_version_ospf6_cmd, diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h index 0c86386a7..78ae1a14b 100644 --- a/ospf6d/ospf6d.h +++ b/ospf6d/ospf6d.h @@ -127,7 +127,7 @@ extern struct thread_master *master; return CMD_SUCCESS; \ } - + /* Function Prototypes */ extern struct route_node *route_prev (struct route_node *node); diff --git a/ospfclient/COPYING b/ospfclient/COPYING index a43ea2126..b8cf3a1ab 100644 --- a/ospfclient/COPYING +++ b/ospfclient/COPYING @@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index 4770275d4..4bb70b6a9 100644 --- a/ospfd/ospf_abr.c +++ b/ospfd/ospf_abr.c @@ -50,7 +50,7 @@ #include "ospfd/ospf_ase.h" #include "ospfd/ospf_zebra.h" #include "ospfd/ospf_dump.h" - + static struct ospf_area_range * ospf_area_range_new (struct prefix_ipv4 *p) { diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c index 7e7c84fd4..7e9412c88 100644 --- a/ospfd/ospf_asbr.c +++ b/ospfd/ospf_asbr.c @@ -44,7 +44,7 @@ #include "ospfd/ospf_zebra.h" #include "ospfd/ospf_dump.h" - + /* Remove external route. */ void ospf_external_route_remove (struct ospf *ospf, struct prefix_ipv4 *p) @@ -96,7 +96,7 @@ ospf_external_route_lookup (struct ospf *ospf, return NULL; } - + /* Add an External info for AS-external-LSA. */ struct external_info * ospf_external_info_new (u_char type) @@ -234,7 +234,7 @@ ospf_external_info_find_lsa (struct ospf *ospf, return lsa; } - + /* Update ASBR status. */ void ospf_asbr_status_update (struct ospf *ospf, u_char status) diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 7e11e2513..ef023366a 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -143,7 +143,7 @@ unsigned long term_debug_ospf_lsa = 0; unsigned long term_debug_ospf_zebra = 0; unsigned long term_debug_ospf_nssa = 0; - + const char * ospf_redist_string(u_int route_type) @@ -218,7 +218,7 @@ ospf_if_name_string (struct ospf_interface *oi) return buf; } - + void ospf_nbr_state_message (struct ospf_neighbor *nbr, char *buf, size_t size) { @@ -746,7 +746,7 @@ ospf_packet_dump (struct stream *s) stream_set_getp (s, gp); } - + /* [no] debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) [send|recv [detail]] @@ -956,7 +956,7 @@ ALIAS (no_debug_ospf_packet, "Packet received\n" "Detail Information\n") - + DEFUN (debug_ospf_ism, debug_ospf_ism_cmd, "debug ospf ism", @@ -1058,7 +1058,7 @@ ALIAS (no_debug_ospf_ism, "ISM Event Information\n" "ISM Timer Information\n") - + DEFUN (debug_ospf_nsm, debug_ospf_nsm_cmd, "debug ospf nsm", @@ -1161,7 +1161,7 @@ ALIAS (no_debug_ospf_nsm, "NSM Event Information\n" "NSM Timer Information\n") - + DEFUN (debug_ospf_lsa, debug_ospf_lsa_cmd, "debug ospf lsa", @@ -1274,7 +1274,7 @@ ALIAS (no_debug_ospf_lsa, "LSA Install/Delete\n" "LSA Refres\n") - + DEFUN (debug_ospf_zebra, debug_ospf_zebra_cmd, "debug ospf zebra", @@ -1366,7 +1366,7 @@ ALIAS (no_debug_ospf_zebra, "OSPF Zebra information\n" "Zebra interface\n" "Zebra redistribute\n") - + DEFUN (debug_ospf_event, debug_ospf_event_cmd, "debug ospf event", @@ -1421,7 +1421,7 @@ DEFUN (no_debug_ospf_nssa, return CMD_SUCCESS; } - + DEFUN (show_debugging_ospf, show_debugging_ospf_cmd, "show debugging ospf", diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index 2ebae89ac..2c33b00ef 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -49,7 +49,7 @@ #include "ospfd/ospf_dump.h" extern struct zclient *zclient; - + /* Do the LSA acking specified in table 19, Section 13.5, row 2 * This get called from ospf_flood_out_interface. Declared inline * for speed. */ @@ -757,7 +757,7 @@ ospf_flood_through (struct ospf *ospf, return (lsa_ack_flag); } - + /* Management functions for neighbor's Link State Request list. */ void @@ -835,7 +835,7 @@ ospf_ls_request_new (struct lsa_header *lsah) return new; } - + /* Management functions for neighbor's ls-retransmit list. */ unsigned long ospf_ls_retransmit_count (struct ospf_neighbor *nbr) @@ -973,7 +973,7 @@ ospf_ls_retransmit_delete_nbr_as (struct ospf *ospf, struct ospf_lsa *lsa) ospf_ls_retransmit_delete_nbr_if (oi, lsa); } - + /* Sets ls_age to MaxAge and floods throu the area. When we implement ASE routing, there will be anothe function flushing an LSA from the whole domain. */ diff --git a/ospfd/ospf_ia.c b/ospfd/ospf_ia.c index 6a8c3c631..b2d0faeb7 100644 --- a/ospfd/ospf_ia.c +++ b/ospfd/ospf_ia.c @@ -193,7 +193,7 @@ ospf_ia_router_route (struct ospf *ospf, struct route_table *rtrs, listnode_add (rn->info, new_or); } - + static int process_summary_lsa (struct ospf_area *area, struct route_table *rt, struct route_table *rtrs, struct ospf_lsa *lsa) diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index a37dde12e..0f02cc821 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -49,7 +49,7 @@ #include "ospfd/ospf_snmp.h" #endif /* HAVE_SNMP */ - + int ospf_if_get_output_cost (struct ospf_interface *oi) { @@ -334,7 +334,7 @@ ospf_if_free (struct ospf_interface *oi) XFREE (MTYPE_OSPF_IF, oi); } - + /* * check if interface with given address is configured and * return it if yes. special treatment for PtP networks. @@ -489,7 +489,7 @@ ospf_if_lookup_recv_if (struct ospf *ospf, struct in_addr src, return match; } - + void ospf_if_stream_set (struct ospf_interface *oi) { @@ -518,7 +518,7 @@ ospf_if_stream_unset (struct ospf_interface *oi) } } - + static struct ospf_if_params * ospf_new_if_params (void) { @@ -825,7 +825,7 @@ ospf_if_down (struct ospf_interface *oi) return 1; } - + /* Virtual Link related functions. */ struct ospf_vl_data * @@ -1194,7 +1194,7 @@ ospf_vls_in_area (struct ospf_area *area) return c; } - + struct crypt_key * ospf_crypt_key_new () { diff --git a/ospfd/ospf_ism.c b/ospfd/ospf_ism.c index fa7d97f2f..9649df8dc 100644 --- a/ospfd/ospf_ism.c +++ b/ospfd/ospf_ism.c @@ -44,7 +44,7 @@ #include "ospfd/ospf_flood.h" #include "ospfd/ospf_abr.h" #include "ospfd/ospf_snmp.h" - + /* elect DR and BDR. Refer to RFC2319 section 9.4 */ static struct ospf_neighbor * ospf_dr_election_sub (struct list *routers) @@ -245,7 +245,7 @@ ospf_dr_election (struct ospf_interface *oi) return new_state; } - + int ospf_hello_timer (struct thread *thread) { diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index 967cdb580..fef6b162f 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -50,7 +50,7 @@ #include "ospfd/ospf_ase.h" #include "ospfd/ospf_zebra.h" - + u_int32_t get_metric (u_char *metric) { @@ -61,7 +61,7 @@ get_metric (u_char *metric) return m; } - + struct timeval tv_adjust (struct timeval a) { @@ -159,7 +159,7 @@ ospf_lsa_refresh_delay (struct ospf_lsa *lsa) return delay; } - + int get_age (struct ospf_lsa *lsa) { @@ -171,7 +171,7 @@ get_age (struct ospf_lsa *lsa) return age; } - + /* Fletcher Checksum -- Refer to RFC1008. */ /* All the offsets are zero-based. The offsets in the RFC1008 are @@ -205,7 +205,7 @@ ospf_lsa_checksum_valid (struct lsa_header *lsa) } - + /* Create OSPF LSA. */ struct ospf_lsa * ospf_lsa_new () @@ -341,7 +341,7 @@ ospf_lsa_data_free (struct lsa_header *lsah) XFREE (MTYPE_OSPF_LSA_DATA, lsah); } - + /* LSA general functions. */ const char * @@ -393,7 +393,7 @@ lsa_header_set (struct stream *s, u_char options, stream_forward_endp (s, OSPF_LSA_HEADER_SIZE); } - + /* router-LSA related functions. */ /* Get router-LSA flags. */ @@ -746,7 +746,7 @@ ospf_router_lsa_body_set (struct stream *s, struct ospf_area *area) /* Set # of links here. */ stream_putw_at (s, putp, cnt); } - + static int ospf_stub_router_timer (struct thread *t) { @@ -803,7 +803,7 @@ ospf_stub_router_check (struct ospf_area *area) OSPF_AREA_TIMER_ON (area->t_stub_router, ospf_stub_router_timer, area->ospf->stub_router_startup_time); } - + /* Create new router-LSA. */ static struct ospf_lsa * ospf_router_lsa_new (struct ospf_area *area) @@ -1005,7 +1005,7 @@ ospf_router_lsa_update (struct ospf *ospf) return 0; } - + /* network-LSA related functions. */ /* Originate Network-LSA. */ static void @@ -1184,7 +1184,7 @@ ospf_network_lsa_refresh (struct ospf_lsa *lsa) return new; } - + static void stream_put_ospf_metric (struct stream *s, u_int32_t metric_value) { @@ -1343,7 +1343,7 @@ ospf_summary_lsa_refresh (struct ospf *ospf, struct ospf_lsa *lsa) return new; } - + /* summary-ASBR-LSA related functions. */ static void ospf_summary_asbr_lsa_body_set (struct stream *s, struct prefix *p, @@ -2377,7 +2377,7 @@ ospf_external_lsa_refresh (struct ospf *ospf, struct ospf_lsa *lsa, return new; } - + /* LSA installation functions. */ /* Install router-LSA to an area. */ @@ -2802,7 +2802,7 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi, return new; } - + int ospf_check_nbr_status (struct ospf *ospf) { @@ -2827,7 +2827,7 @@ ospf_check_nbr_status (struct ospf *ospf) return 1; } - + static int ospf_maxage_lsa_remover (struct thread *thread) @@ -3539,7 +3539,7 @@ ospf_lsa_unique_id (struct ospf *ospf, return id; } - + #define LSA_ACTION_FLOOD_AREA 1 #define LSA_ACTION_FLUSH_AREA 2 @@ -3602,7 +3602,7 @@ ospf_schedule_lsa_flush_area (struct ospf_area *area, struct ospf_lsa *lsa) thread_add_event (master, ospf_lsa_action, data, 0); } - + /* LSA Refreshment functions. */ struct ospf_lsa * ospf_lsa_refresh (struct ospf *ospf, struct ospf_lsa *lsa) diff --git a/ospfd/ospf_lsdb.c b/ospfd/ospf_lsdb.c index aad979a74..f7cf60fd0 100644 --- a/ospfd/ospf_lsdb.c +++ b/ospfd/ospf_lsdb.c @@ -31,7 +31,7 @@ #include "ospfd/ospf_asbr.h" #include "ospfd/ospf_lsa.h" #include "ospfd/ospf_lsdb.h" - + struct ospf_lsdb * ospf_lsdb_new () { diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index c68aa4dd3..82735b731 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -132,7 +132,7 @@ Report bugs to %s\n", progname, ZEBRA_BUG_ADDRESS); } exit (status); } - + /* SIGHUP handler. */ static void sighup (void) @@ -174,7 +174,7 @@ struct quagga_signal_t ospf_signals[] = .handler = &sigint, }, }; - + /* OSPFd main routine. */ int main (int argc, char **argv) diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index bcabd5f70..0e6814e22 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -50,7 +50,7 @@ #include "ospfd/ospf_snmp.h" static void nsm_clear_adj (struct ospf_neighbor *); - + /* OSPF NSM Timer functions. */ static int ospf_inactivity_timer (struct thread *thread) @@ -156,7 +156,7 @@ nsm_should_adj (struct ospf_neighbor *nbr) return 0; } - + /* OSPF NSM functions. */ static int nsm_packet_received (struct ospf_neighbor *nbr) @@ -258,7 +258,7 @@ ospf_db_summary_clear (struct ospf_neighbor *nbr) } } - + /* The area link state database consists of the router-LSAs, network-LSAs and summary-LSAs contained in the area structure, diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index cce56fc62..efdf8263b 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -323,7 +323,7 @@ ospf_packet_max (struct ospf_interface *oi) return max; } - + static int ospf_check_md5_digest (struct ospf_interface *oi, struct ospf_header *ospfh) { @@ -438,7 +438,7 @@ ospf_make_md5_digest (struct ospf_interface *oi, struct ospf_packet *op) return OSPF_AUTH_MD5_SIZE; } - + static int ospf_ls_req_timer (struct thread *thread) { @@ -2136,7 +2136,7 @@ ospf_ls_ack (struct ip *iph, struct ospf_header *ospfh, return; } - + static struct stream * ospf_recv_packet (int fd, struct interface **ifp, struct stream *ibuf) { diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c index 1daf0d6aa..7f7b15786 100644 --- a/ospfd/ospf_snmp.c +++ b/ospfd/ospf_snmp.c @@ -48,7 +48,7 @@ #include "ospfd/ospf_ism.h" #include "ospfd/ospf_dump.h" #include "ospfd/ospf_snmp.h" - + /* OSPF2-MIB. */ #define OSPF2MIB 1,3,6,1,2,1,14 @@ -204,7 +204,7 @@ #define TIMETICKS ASN_TIMETICKS #define IPADDRESS ASN_IPADDRESS #define STRING ASN_OCTET_STR - + /* Declare static local variables for convenience. */ SNMP_LOCAL_VARIABLES @@ -501,7 +501,7 @@ struct variable ospf_variables[] = {OSPFAREAAGGREGATEEFFECT, INTEGER, RWRITE, ospfAreaAggregateEntry, 3, {14, 1, 6}} }; - + /* The administrative status of OSPF. When OSPF is enbled on at least one interface return 1. */ static int @@ -1407,7 +1407,7 @@ ospfHostEntry (struct variable *v, oid *name, size_t *length, int exact, } return NULL; } - + struct list *ospf_snmp_iflist; struct ospf_snmp_if @@ -1911,7 +1911,7 @@ ospfIfMetricEntry (struct variable *v, oid *name, size_t *length, int exact, } return NULL; } - + struct route_table *ospf_snmp_vl_table; void @@ -2127,7 +2127,7 @@ ospfVirtIfEntry (struct variable *v, oid *name, size_t *length, int exact, } return NULL; } - + static struct ospf_neighbor * ospf_snmp_nbr_lookup (struct ospf *ospf, struct in_addr *nbr_addr, unsigned int *ifindex) @@ -2360,7 +2360,7 @@ ospfNbrEntry (struct variable *v, oid *name, size_t *length, int exact, } return NULL; } - + static u_char * ospfVirtNbrEntry (struct variable *v, oid *name, size_t *length, int exact, size_t *var_len, WriteMethod **write_method) @@ -2419,7 +2419,7 @@ ospfVirtNbrEntry (struct variable *v, oid *name, size_t *length, int exact, } return NULL; } - + static struct ospf_lsa * ospfExtLsdbLookup (struct variable *v, oid *name, size_t *length, u_char *type, struct in_addr *ls_id, struct in_addr *router_id, int exact) @@ -2572,7 +2572,7 @@ ospfExtLsdbEntry (struct variable *v, oid *name, size_t *length, int exact, } return NULL; } - + static u_char * ospfAreaAggregateEntry (struct variable *v, oid *name, size_t *length, int exact, size_t *var_len, WriteMethod **write_method) @@ -2608,7 +2608,7 @@ ospfAreaAggregateEntry (struct variable *v, oid *name, size_t *length, } return NULL; } - + /* OSPF Traps. */ #define IFSTATECHANGE 16 #define VIRTIFSTATECHANGE 1 diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c index bd9564d9e..c40fc33ef 100644 --- a/ospfd/ospf_spf.c +++ b/ospfd/ospf_spf.c @@ -52,7 +52,7 @@ static void ospf_vertex_free (void *); * dynamically allocated at begin of ospf_spf_calculate */ static struct list vertex_list = { .del = ospf_vertex_free }; - + /* Heap related functions, for the managment of the candidates, to * be used with pqueue. */ static int @@ -90,7 +90,7 @@ update_stat (void *node , int position) /* Set the status of the vertex, when its position changes. */ *(v->stat) = position; } - + static struct vertex_nexthop * vertex_nexthop_new (void) { @@ -134,7 +134,7 @@ ospf_canonical_nexthops_free (struct vertex *root) vertex_nexthop_free (vp->nexthop); } } - + /* TODO: Parent list should be excised, in favour of maintaining only * vertex_nexthop, with refcounts. */ @@ -159,7 +159,7 @@ vertex_parent_free (void *p) { XFREE (MTYPE_OSPF_VERTEX_PARENT, p); } - + static struct vertex * ospf_vertex_new (struct ospf_lsa *lsa) { @@ -276,7 +276,7 @@ ospf_vertex_add_parent (struct vertex *v) listnode_add (vp->parent->children, v); } } - + static void ospf_spf_init (struct ospf_area *area) { @@ -1254,7 +1254,7 @@ ospf_spf_calculate (struct ospf_area *area, struct route_table *new_table, zlog_debug ("ospf_spf_calculate: Stop. %ld vertices", mtype_stats_alloc(MTYPE_OSPF_VERTEX)); } - + /* Timer for SPF calculation. */ static int ospf_spf_calculate_timer (struct thread *thread) diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index ee8c90190..8bfcaa829 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -49,7 +49,7 @@ #include "ospfd/ospf_vty.h" #include "ospfd/ospf_dump.h" - + static const char *ospf_network_type_str[] = { "Null", @@ -61,7 +61,7 @@ static const char *ospf_network_type_str[] = "LOOPBACK" }; - + /* Utility functions. */ static int ospf_str2area_id (const char *str, struct in_addr *area_id, int *format) @@ -94,7 +94,7 @@ ospf_str2area_id (const char *str, struct in_addr *area_id, int *format) return 0; } - + static int str2metric (const char *str, int *metric) { @@ -142,7 +142,7 @@ ospf_oi_count (struct interface *ifp) return i; } - + DEFUN (router_ospf, router_ospf_cmd, "router ospf", @@ -490,7 +490,7 @@ DEFUN (no_ospf_network_area, return CMD_SUCCESS; } - + DEFUN (ospf_area_range, ospf_area_range_cmd, "area (A.B.C.D|<0-4294967295>) range A.B.C.D/M", @@ -634,7 +634,7 @@ ALIAS (no_ospf_area_range, "Advertise this range (default)\n" "User specified metric for this range\n" "Advertised metric for this range\n") - + DEFUN (ospf_area_range_substitute, ospf_area_range_substitute_cmd, "area (A.B.C.D|<0-4294967295>) range A.B.C.D/M substitute A.B.C.D/M", @@ -686,7 +686,7 @@ DEFUN (no_ospf_area_range_substitute, return CMD_SUCCESS; } - + /* Command Handler Logic in VLink stuff is delicate!! ALTER AT YOUR OWN RISK!!!! @@ -1382,7 +1382,7 @@ ALIAS (no_ospf_area_vlink, VLINK_HELPSTR_AUTHTYPE_SIMPLE VLINK_HELPSTR_AUTH_MD5) - + DEFUN (ospf_area_shortcut, ospf_area_shortcut_cmd, "area (A.B.C.D|<0-4294967295>) shortcut (default|enable|disable)", @@ -1450,7 +1450,7 @@ DEFUN (no_ospf_area_shortcut, return CMD_SUCCESS; } - + DEFUN (ospf_area_stub, ospf_area_stub_cmd, "area (A.B.C.D|<0-4294967295>) stub", @@ -1971,7 +1971,7 @@ DEFUN (no_ospf_area_filter_list, return CMD_SUCCESS; } - + DEFUN (ospf_area_authentication_message_digest, ospf_area_authentication_message_digest_cmd, "area (A.B.C.D|<0-4294967295>) authentication message-digest", @@ -2042,7 +2042,7 @@ DEFUN (no_ospf_area_authentication, return CMD_SUCCESS; } - + DEFUN (ospf_abr_type, ospf_abr_type_cmd, "ospf abr-type (cisco|ibm|shortcut|standard)", @@ -2206,7 +2206,7 @@ ALIAS (no_ospf_compatible_rfc1583, NO_STR "OSPF specific commands\n" "Disable the RFC1583Compatibility flag\n") - + static int ospf_timers_spf_set (struct vty *vty, unsigned int delay, unsigned int hold, @@ -2297,7 +2297,7 @@ ALIAS_DEPRECATED (no_ospf_timers_throttle_spf, NO_STR "Adjust routing timers\n" "OSPF SPF timers\n") - + DEFUN (ospf_neighbor, ospf_neighbor_cmd, "neighbor A.B.C.D", @@ -2430,7 +2430,7 @@ ALIAS (no_ospf_neighbor, "Dead Neighbor Polling interval\n" "Seconds\n") - + DEFUN (ospf_refresh_timer, ospf_refresh_timer_cmd, "refresh timer <10-1800>", "Adjust refresh parameters\n" @@ -2548,7 +2548,7 @@ const char *ospf_shortcut_mode_descr_str[] = }; - + static void show_ip_ospf_area (struct vty *vty, struct ospf_area *area) { @@ -2800,7 +2800,7 @@ DEFUN (show_ip_ospf, return CMD_SUCCESS; } - + static void show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf, struct interface *ifp) @@ -3429,7 +3429,7 @@ DEFUN (show_ip_ospf_neighbor_int_detail, return CMD_SUCCESS; } - + /* Show functions */ static int show_lsa_summary (struct vty *vty, struct ospf_lsa *lsa, int self) @@ -4302,7 +4302,7 @@ ALIAS (show_ip_ospf_database_type_adv_router, OSPF_LSA_TYPES_DESC "Self-originated link states\n") - + DEFUN (ip_ospf_authentication_args, ip_ospf_authentication_args_addr_cmd, "ip ospf authentication (null|message-digest) A.B.C.D", @@ -6262,7 +6262,7 @@ ALIAS (no_ip_ospf_mtu_ignore, "IP Information\n" "OSPF interface commands\n" "Disable mtu mismatch detection\n") - + DEFUN (ospf_max_metric_router_lsa_admin, ospf_max_metric_router_lsa_admin_cmd, "max-metric router-lsa administrative", @@ -6431,7 +6431,7 @@ config_write_stub_router (struct vty *vty, struct ospf *ospf) } return; } - + static void show_ip_ospf_route_network (struct vty *vty, struct route_table *rt) { @@ -6650,7 +6650,7 @@ DEFUN (show_ip_ospf_route, return CMD_SUCCESS; } - + const char *ospf_abr_type_str[] = { "unknown", @@ -6679,7 +6679,7 @@ area_id2str (char *buf, int length, struct ospf_area *area) sprintf (buf, "%lu", (unsigned long) ntohl (area->area_id.s_addr)); } - + const char *ospf_int_type_str[] = { "unknown", /* should never be used. */ @@ -7113,7 +7113,7 @@ config_write_virtual_link (struct vty *vty, struct ospf *ospf) return 0; } - + static int config_write_ospf_redistribute (struct vty *vty, struct ospf *ospf) { @@ -7406,7 +7406,7 @@ ospf_vty_show_init (void) install_element (ENABLE_NODE, &show_ip_ospf_border_routers_cmd); } - + /* ospfd's interface node. */ static struct cmd_node interface_node = { @@ -7558,7 +7558,7 @@ static struct cmd_node ospf_node = 1 }; - + /* Install OSPF related vty commands. */ void ospf_vty_init (void) diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index b5268a3bd..b6d3260b4 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -918,7 +918,7 @@ ospf_zebra_read_ipv4 (int command, struct zclient *zclient, return 0; } - + int ospf_distribute_list_out_set (struct ospf *ospf, int type, const char *name) diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 538bc0940..dd57f645b 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -53,7 +53,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "ospfd/ospf_route.h" #include "ospfd/ospf_ase.h" - + /* OSPF process wide configuration. */ static struct ospf_master ospf_master; @@ -64,7 +64,7 @@ struct ospf_master *om; extern struct zclient *zclient; extern struct in_addr router_id_zebra; - + static void ospf_remove_vls_through_area (struct ospf *, struct ospf_area *); static void ospf_network_free (struct ospf *, struct ospf_network *); static void ospf_area_free (struct ospf_area *); @@ -76,7 +76,7 @@ static int ospf_network_match_iface (const struct connected *, static void ospf_finish_final (struct ospf *); #define OSPF_EXTERNAL_LSA_ORIGINATE_DELAY 1 - + void ospf_router_id_update (struct ospf *ospf) { @@ -139,7 +139,7 @@ ospf_router_id_update (struct ospf *ospf) ospf_if_update (ospf, ifp); } } - + /* For OSPF area sort by area id. */ static int ospf_area_id_cmp (struct ospf_area *a1, struct ospf_area *a2) @@ -279,7 +279,7 @@ ospf_get () return ospf; } - + /* Handle the second half of deferred shutdown. This is called either * from the deferred-shutdown timer thread, or directly through * ospf_deferred_shutdown_check. @@ -354,7 +354,7 @@ ospf_deferred_shutdown_check (struct ospf *ospf) timeout); return; } - + /* Shut down the entire process */ void ospf_terminate (void) @@ -563,7 +563,7 @@ ospf_finish_final (struct ospf *ospf) XFREE (MTYPE_OSPF_TOP, ospf); } - + /* allocate new OSPF Area object */ static struct ospf_area * ospf_area_new (struct ospf *ospf, struct in_addr area_id) @@ -719,7 +719,7 @@ ospf_area_del_if (struct ospf_area *area, struct ospf_interface *oi) listnode_delete (area->oiflist, oi); } - + /* Config network statement related functions. */ static struct ospf_network * ospf_network_new (struct in_addr area_id, int format) @@ -987,7 +987,7 @@ ospf_remove_vls_through_area (struct ospf *ospf, struct ospf_area *area) ospf_vl_delete (ospf, vl_data); } - + static const struct message ospf_area_type_msg[] = { { OSPF_AREA_DEFAULT, "Default" }, @@ -1350,7 +1350,7 @@ ospf_timers_refresh_unset (struct ospf *ospf) return 1; } - + static struct ospf_nbr_nbma * ospf_nbr_nbma_new (void) { diff --git a/ripd/rip_debug.c b/ripd/rip_debug.c index 662e5843a..a267874ad 100644 --- a/ripd/rip_debug.c +++ b/ripd/rip_debug.c @@ -27,7 +27,7 @@ unsigned long rip_debug_event = 0; unsigned long rip_debug_packet = 0; unsigned long rip_debug_zebra = 0; - + DEFUN (show_debugging_rip, show_debugging_rip_cmd, "show debugging rip", diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 810b71c0d..22cef4540 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -41,7 +41,7 @@ #include "ripd/ripd.h" #include "ripd/rip_debug.h" #include "ripd/rip_interface.h" - + /* static prototypes */ static void rip_enable_apply (struct interface *); static void rip_passive_interface_apply (struct interface *); @@ -49,7 +49,7 @@ static int rip_if_down(struct interface *ifp); static int rip_enable_if_lookup (const char *ifname); static int rip_enable_network_lookup2 (struct connected *connected); static void rip_enable_apply_all (void); - + struct message ri_version_msg[] = { {RI_RIP_VERSION_1, "1"}, @@ -68,7 +68,7 @@ struct route_table *rip_enable_network; /* Vector to store passive-interface name. */ static int passive_default; /* are we in passive-interface default mode? */ vector Vrip_passive_nondefault; - + /* Join to the RIP version 2 multicast group. */ static int ipv4_multicast_join (int sock, @@ -109,7 +109,7 @@ ipv4_multicast_leave (int sock, return ret; } - + /* Allocate new RIP's interface configuration. */ static struct rip_interface * rip_interface_new (void) @@ -754,7 +754,7 @@ rip_interface_address_delete (int command, struct zclient *zclient, return 0; } - + /* Check interface is enabled by network statement. */ /* Check wether the interface has at least a connected prefix that * is within the ripng_enable_network table. */ @@ -1142,7 +1142,7 @@ rip_clean_network () vector_slot (rip_enable_interface, i) = NULL; } } - + /* Utility function for looking up passive interface settings. */ static int rip_passive_nondefault_lookup (const char *ifname) @@ -1229,7 +1229,7 @@ rip_passive_nondefault_clean (void) } rip_passive_interface_apply_all (); } - + /* RIP enable network or interface configuration. */ DEFUN (rip_network, rip_network_cmd, @@ -1913,7 +1913,7 @@ DEFUN (no_rip_passive_interface, else return rip_passive_nondefault_unset (vty, ifname); } - + /* Write rip configuration of each interface. */ static int rip_interface_config_write (struct vty *vty) diff --git a/ripd/rip_main.c b/ripd/rip_main.c index a512fbc2d..e81e61b80 100644 --- a/ripd/rip_main.c +++ b/ripd/rip_main.c @@ -126,7 +126,7 @@ Report bugs to %s\n", progname, ZEBRA_BUG_ADDRESS); exit (status); } - + /* SIGHUP handler. */ static void sighup (void) @@ -183,7 +183,7 @@ static struct quagga_signal_t ripd_signals[] = .handler = &sigint, }, }; - + /* Main routine of ripd. */ int main (int argc, char **argv) diff --git a/ripd/rip_peer.c b/ripd/rip_peer.c index fd912ebad..6a3add640 100644 --- a/ripd/rip_peer.c +++ b/ripd/rip_peer.c @@ -32,7 +32,7 @@ /* Linked list of RIP peer. */ struct list *peer_list; - + static struct rip_peer * rip_peer_new (void) { diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c index cb87ea555..37a986c50 100644 --- a/ripd/rip_routemap.c +++ b/ripd/rip_routemap.c @@ -32,7 +32,7 @@ #include "plist.h" #include "ripd/ripd.h" - + struct rip_metric_modifier { enum @@ -160,7 +160,7 @@ rip_route_map_update (const char *notused) } } } - + /* `match metric METRIC' */ /* Match function return 1 if match is success else return zero. */ static route_map_result_t @@ -323,7 +323,7 @@ static struct route_map_rule_cmd route_match_ip_next_hop_cmd = route_match_ip_next_hop_compile, route_match_ip_next_hop_free }; - + /* `match ip next-hop prefix-list PREFIX_LIST' */ static route_map_result_t @@ -370,7 +370,7 @@ static struct route_map_rule_cmd route_match_ip_next_hop_prefix_list_cmd = route_match_ip_next_hop_prefix_list_compile, route_match_ip_next_hop_prefix_list_free }; - + /* `match ip address IP_ACCESS_LIST' */ /* Match function should return 1 if match is success else return @@ -416,7 +416,7 @@ static struct route_map_rule_cmd route_match_ip_address_cmd = route_match_ip_address_compile, route_match_ip_address_free }; - + /* `match ip address prefix-list PREFIX_LIST' */ static route_map_result_t @@ -507,7 +507,7 @@ struct route_map_rule_cmd route_match_tag_cmd = route_match_tag_compile, route_match_tag_free }; - + /* `set metric METRIC' */ /* Set metric to attribute. */ @@ -718,7 +718,7 @@ static struct route_map_rule_cmd route_set_tag_cmd = route_set_tag_compile, route_set_tag_free }; - + #define MATCH_STR "Match values from routing table\n" #define SET_STR "Set values in destination routing protocol\n" diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c index 090ebfae2..2df815b03 100644 --- a/ripd/rip_snmp.c +++ b/ripd/rip_snmp.c @@ -33,7 +33,7 @@ #include "smux.h" #include "ripd/ripd.h" - + /* RIPv2-MIB. */ #define RIPV2MIB 1,3,6,1,2,1,23 @@ -76,7 +76,7 @@ #define TIMETICKS ASN_TIMETICKS #define IPADDRESS ASN_IPADDRESS #define STRING ASN_OCTET_STR - + /* Define SNMP local variables. */ SNMP_LOCAL_VARIABLES @@ -149,7 +149,7 @@ struct variable rip_variables[] = }; extern struct thread_master *master; - + static u_char * rip2Globals (struct variable *v, oid name[], size_t *length, int exact, size_t *var_len, WriteMethod **write_method) diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c index 199e85e8c..1f6ef6120 100644 --- a/ripd/rip_zebra.c +++ b/ripd/rip_zebra.c @@ -33,7 +33,7 @@ /* All information about zebra. */ struct zclient *zclient = NULL; - + /* RIPd to zebra command interface. */ void rip_zebra_ipv4_add (struct prefix_ipv4 *p, struct in_addr *nexthop, @@ -196,7 +196,7 @@ rip_routemap_unset (int type, const char *name) return 0; } - + /* Redistribution types */ static struct { int type; @@ -551,7 +551,7 @@ DEFUN (no_rip_redistribute_type_metric_routemap, return CMD_WARNING; } - + /* Default information originate. */ DEFUN (rip_default_information_originate, @@ -597,7 +597,7 @@ DEFUN (no_rip_default_information_originate, return CMD_SUCCESS; } - + /* RIP configuration write function. */ static int config_write_zebra (struct vty *vty) diff --git a/ripd/ripd.c b/ripd/ripd.c index 01bd69eca..dfeb951c5 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -61,20 +61,20 @@ long rip_global_route_changes = 0; /* RIP queries. */ long rip_global_queries = 0; - + /* Prototypes. */ static void rip_event (enum rip_event, int); static void rip_output_process (struct connected *, struct sockaddr_in *, int, u_char); static int rip_triggered_update (struct thread *); static int rip_update_jitter (unsigned long); - + /* RIP output routes type. */ enum { rip_all_route, rip_changed_route }; - + /* RIP command strings. */ static const struct message rip_msg[] = { @@ -86,7 +86,7 @@ static const struct message rip_msg[] = {RIP_POLL_ENTRY, "POLL ENTRY"}, {0, NULL}, }; - + /* Utility function to set boradcast option to the socket. */ static int sockopt_broadcast (int sock) @@ -2774,7 +2774,7 @@ rip_request_send (struct sockaddr_in *to, struct interface *ifp, } return sizeof (rip_packet); } - + static int rip_update_jitter (unsigned long time) { @@ -2828,7 +2828,7 @@ rip_event (enum rip_event event, int sock) break; } } - + DEFUN (router_rip, router_rip_cmd, "router rip", @@ -3104,7 +3104,7 @@ ALIAS (no_rip_timers, "Routing information timeout timer. Default is 180.\n" "Garbage collection timer. Default is 120.\n") - + struct route_table *rip_distance_table; struct rip_distance @@ -3372,7 +3372,7 @@ DEFUN (no_rip_distance_source_access_list, rip_distance_unset (vty, argv[0], argv[1], argv[2]); return CMD_SUCCESS; } - + /* Print out routes update time. */ static void rip_vty_out_uptime (struct vty *vty, struct rip_info *rinfo) @@ -3696,7 +3696,7 @@ static struct cmd_node rip_node = "%s(config-router)# ", 1 }; - + /* Distribute-list update functions. */ static void rip_distribute_update (struct distribute *dist) @@ -3787,7 +3787,7 @@ rip_distribute_update_all_wrapper(struct access_list *notused) { rip_distribute_update_all(NULL); } - + /* Delete all added rip route. */ void rip_clean (void) diff --git a/ripngd/ripng_debug.c b/ripngd/ripng_debug.c index 33a7cf69f..c1eb39ba2 100644 --- a/ripngd/ripng_debug.c +++ b/ripngd/ripng_debug.c @@ -28,7 +28,7 @@ unsigned long ripng_debug_event = 0; unsigned long ripng_debug_packet = 0; unsigned long ripng_debug_zebra = 0; - + DEFUN (show_debugging_ripng, show_debugging_ripng_cmd, "show debugging ripng", diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c index 6718fff21..8717bfb0e 100644 --- a/ripngd/ripng_interface.c +++ b/ripngd/ripng_interface.c @@ -38,7 +38,7 @@ #include "ripngd/ripngd.h" #include "ripngd/ripng_debug.h" - + /* If RFC2133 definition is used. */ #ifndef IPV6_JOIN_GROUP #define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP @@ -505,7 +505,7 @@ ripng_interface_address_delete (int command, struct zclient *zclient, return 0; } - + /* RIPng enable interface vector. */ vector ripng_enable_if; @@ -812,7 +812,7 @@ ripng_enable_apply_all (void) for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp)) ripng_enable_apply (ifp); } - + /* Clear all network and neighbor configuration */ void ripng_clean_network () @@ -835,7 +835,7 @@ ripng_clean_network () vector_slot (ripng_enable_if, i) = NULL; } } - + /* Vector to store passive-interface name. */ vector Vripng_passive_interface; @@ -1103,7 +1103,7 @@ DEFUN (no_ripng_passive_interface, { return ripng_passive_interface_unset (vty, argv[0]); } - + static struct ripng_interface * ri_new (void) { diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c index 7525a2676..acc980ded 100644 --- a/ripngd/ripng_main.c +++ b/ripngd/ripng_main.c @@ -127,7 +127,7 @@ Report bugs to %s\n", progname, ZEBRA_BUG_ADDRESS); } exit (status); } - + /* SIGHUP handler. */ static void sighup (void) @@ -182,7 +182,7 @@ struct quagga_signal_t ripng_signals[] = .handler = &sigint, }, }; - + /* RIPngd main routine. */ int main (int argc, char **argv) diff --git a/ripngd/ripng_peer.c b/ripngd/ripng_peer.c index c04456b8a..b12e14604 100644 --- a/ripngd/ripng_peer.c +++ b/ripngd/ripng_peer.c @@ -38,7 +38,7 @@ /* Linked list of RIPng peer. */ struct list *peer_list; - + static struct ripng_peer * ripng_peer_new (void) { diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c index 0f5cca350..f4fadb67e 100644 --- a/ripngd/ripng_routemap.c +++ b/ripngd/ripng_routemap.c @@ -29,7 +29,7 @@ #include "sockunion.h" #include "ripngd/ripngd.h" - + struct rip_metric_modifier { enum @@ -42,7 +42,7 @@ struct rip_metric_modifier u_char metric; }; - + static int ripng_route_match_add (struct vty *vty, struct route_map_index *index, const char *command, const char *arg) @@ -130,7 +130,7 @@ ripng_route_set_delete (struct vty *vty, struct route_map_index *index, } return CMD_SUCCESS; } - + /* `match metric METRIC' */ /* Match function return 1 if match is success else return zero. */ static route_map_result_t @@ -184,7 +184,7 @@ static struct route_map_rule_cmd route_match_metric_cmd = route_match_metric_compile, route_match_metric_free }; - + /* `match interface IFNAME' */ /* Match function return 1 if match is success else return zero. */ static route_map_result_t @@ -284,7 +284,7 @@ static struct route_map_rule_cmd route_match_tag_cmd = route_match_tag_compile, route_match_tag_free }; - + /* `set metric METRIC' */ /* Set metric to attribute. */ @@ -496,7 +496,7 @@ static struct route_map_rule_cmd route_set_tag_cmd = route_set_tag_compile, route_set_tag_free }; - + #define MATCH_STR "Match values from routing table\n" #define SET_STR "Set values in destination routing protocol\n" diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c index 8e7660626..68f37be32 100644 --- a/ripngd/ripng_zebra.c +++ b/ripngd/ripng_zebra.c @@ -41,7 +41,7 @@ int ripng_interface_add (int, struct zclient *, zebra_size_t); int ripng_interface_delete (int, struct zclient *, zebra_size_t); int ripng_interface_address_add (int, struct zclient *, zebra_size_t); int ripng_interface_address_delete (int, struct zclient *, zebra_size_t); - + void ripng_zebra_ipv6_add (struct prefix_ipv6 *p, struct in6_addr *nexthop, unsigned int ifindex, u_char metric) @@ -206,7 +206,7 @@ ripng_redistribute_routemap_unset (int type) ripng->route_map[type].name = NULL; ripng->route_map[type].map = NULL; } - + /* Redistribution types */ static struct { int type; diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 318f600ef..941c3a068 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -95,7 +95,7 @@ ripng_info_free (struct ripng_info *rinfo) { XFREE (MTYPE_RIPNG_ROUTE, rinfo); } - + /* Create ripng socket. */ static int ripng_make_socket (void) @@ -1886,7 +1886,7 @@ ripng_request (struct interface *ifp) NULL, ifp); } - + static int ripng_update_jitter (int time) { @@ -1928,7 +1928,7 @@ ripng_event (enum ripng_event event, int sock) break; } } - + /* Print out routes update time. */ static void @@ -2767,7 +2767,7 @@ ripng_distribute_update_all_wrapper (struct access_list *notused) { ripng_distribute_update_all(NULL); } - + /* delete all the added ripng routes. */ void ripng_clean() diff --git a/tests/main.c b/tests/main.c index 2d8cb0c59..5e7bdcb15 100644 --- a/tests/main.c +++ b/tests/main.c @@ -95,8 +95,8 @@ Report bugs to %s\n", progname, ZEBRA_BUG_ADDRESS); } exit (status); } - - + + /* main routine. */ int main (int argc, char **argv) diff --git a/tests/test-checksum.c b/tests/test-checksum.c index fc4eb02d0..921b58c40 100644 --- a/tests/test-checksum.c +++ b/tests/test-checksum.c @@ -24,7 +24,7 @@ typedef uint16_t testoff_t; /* Fletcher Checksum -- Refer to RFC1008. */ #define MODX 4102 - + /* Accumulator phase of checksum */ static struct acc_vals @@ -263,7 +263,7 @@ struct reductions_t { { .name = "isisd-mody", .f = reduce_isisd_mody }, { NULL, NULL }, }; - + /* The original ospfd checksum */ static u_int16_t ospfd_checksum (u_char *buffer, testsz_t len, testoff_t off) diff --git a/tests/test-privs.c b/tests/test-privs.c index a888ea0fc..beae81f69 100644 --- a/tests/test-privs.c +++ b/tests/test-privs.c @@ -74,7 +74,7 @@ Report bugs to %s\n", progname, ZEBRA_BUG_ADDRESS); } exit (status); } - + struct thread_master *master; /* main routine. */ int diff --git a/zebra/connected.c b/zebra/connected.c index 4802f2ba0..c4f87f4cb 100644 --- a/zebra/connected.c +++ b/zebra/connected.c @@ -36,7 +36,7 @@ #include "zebra/interface.h" #include "zebra/connected.h" extern struct zebra_t zebrad; - + /* communicate the withdrawal of a connected address */ static void connected_withdraw (struct connected *ifc) @@ -96,7 +96,7 @@ connected_announce (struct interface *ifp, struct connected *ifc) #endif } } - + /* If same interface address is already exist... */ struct connected * connected_check (struct interface *ifp, struct prefix *p) diff --git a/zebra/if_proc.c b/zebra/if_proc.c index 3aec530bf..2dbc47261 100644 --- a/zebra/if_proc.c +++ b/zebra/if_proc.c @@ -198,7 +198,7 @@ interface_list_proc () fclose(fp); return 0; } - + #if defined(HAVE_IPV6) && defined(HAVE_PROC_NET_IF_INET6) #ifndef _PATH_PROC_NET_IF_INET6 diff --git a/zebra/interface.c b/zebra/interface.c index 155ee0294..7e1d3dd86 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1206,7 +1206,7 @@ ALIAS (no_bandwidth_if, NO_STR "Set bandwidth informational parameter\n" "Bandwidth in kilobits\n") - + static int ip_address_install (struct vty *vty, struct interface *ifp, const char *addr_str, const char *peer_str, diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c index 50525043d..0d31050c5 100644 --- a/zebra/irdp_packet.c +++ b/zebra/irdp_packet.c @@ -184,7 +184,7 @@ parse_irdp_packet(char *p, inet_ntoa (src)); } } - + static int irdp_recvmsg (int sock, u_char *buf, int size, int *ifindex) { @@ -222,7 +222,7 @@ irdp_recvmsg (int sock, u_char *buf, int size, int *ifindex) return ret; } - + int irdp_read_raw(struct thread *r) { struct interface *ifp; @@ -264,7 +264,7 @@ int irdp_read_raw(struct thread *r) return ret; } - + void send_packet(struct interface *ifp, struct stream *s, diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 37b2ae231..3dbeb98bc 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -252,7 +252,7 @@ af_check (int family) #endif /* HAVE_IPV6 */ return 0; } - + /* Dump routing table flag for debug purpose. */ static void rtm_flag_dump (int flag) @@ -557,7 +557,7 @@ ifm_read (struct if_msghdr *ifm) return 0; } - + /* Address read from struct ifa_msghdr. */ static void ifam_read_mesg (struct ifa_msghdr *ifm, @@ -751,7 +751,7 @@ ifam_read (struct ifa_msghdr *ifam) return 0; } - + /* Interface function for reading kernel routing table information. */ static int rtm_read_mesg (struct rt_msghdr *rtm, @@ -1128,7 +1128,7 @@ rtm_write (int message, return ZEBRA_ERR_NOERROR; } - + #include "thread.h" #include "zebra/zserv.h" diff --git a/zebra/main.c b/zebra/main.c index 523b1911c..d7f2a108b 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -151,7 +151,7 @@ usage (char *progname, int status) exit (status); } - + /* SIGHUP handler. */ static void sighup (void) @@ -203,7 +203,7 @@ struct quagga_signal_t zebra_signals[] = .handler = &sigint, }, }; - + /* Main startup routine. */ int main (int argc, char **argv) diff --git a/zebra/rt_ioctl.c b/zebra/rt_ioctl.c index 404a7c696..e175d1e27 100644 --- a/zebra/rt_ioctl.c +++ b/zebra/rt_ioctl.c @@ -332,7 +332,7 @@ kernel_delete_ipv4 (struct prefix *p, struct rib *rib) { return kernel_ioctl_ipv4 (SIOCDELRT, p, rib, AF_INET); } - + #ifdef HAVE_IPV6 /* Below is hack for GNU libc definition and Linux 2.1.X header. */ diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 6a802f690..452ea6421 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -1848,7 +1848,7 @@ kernel_delete_ipv6_old (struct prefix_ipv6 *dest, struct in6_addr *gate, dest->prefixlen, gate, index, flags, table); } #endif /* HAVE_IPV6 */ - + /* Interface address modification. */ static int netlink_address (int cmd, int family, struct interface *ifp, diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 91d7b3241..21ca6da99 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -66,7 +66,7 @@ static void rtadv_event (enum rtadv_event, int); static int if_join_all_router (int, struct interface *); static int if_leave_all_router (int, struct interface *); - + /* Structure which hold status of router advertisement. */ struct rtadv { @@ -80,7 +80,7 @@ struct rtadv }; struct rtadv *rtadv = NULL; - + static struct rtadv * rtadv_new (void) { @@ -580,7 +580,7 @@ rtadv_make_socket (void) return sock; } - + static struct rtadv_prefix * rtadv_prefix_new (void) { diff --git a/zebra/test_main.c b/zebra/test_main.c index c6951729f..f98bb4199 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -103,7 +103,7 @@ usage (char *progname, int status) exit (status); } - + static unsigned int test_ifindex = 0; /* testrib commands */ @@ -149,7 +149,7 @@ test_cmd_init (void) { install_element (INTERFACE_NODE, &test_interface_state_cmd); } - + /* SIGHUP handler. */ static void sighup (void) @@ -195,7 +195,7 @@ struct quagga_signal_t zebra_signals[] = .handler = &sigint, }, }; - + /* Main startup routine. */ int main (int argc, char **argv) diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 8835ef37f..dc7e1ca19 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -71,7 +71,7 @@ static const struct [ZEBRA_ROUTE_BABEL] = {ZEBRA_ROUTE_BABEL, 95}, /* no entry/default: 150 */ }; - + /* Vector for routing table. */ static vector vrf_vector; @@ -176,7 +176,7 @@ vrf_static_table (afi_t afi, safi_t safi, u_int32_t id) return vrf->stable[afi][safi]; } - + /* * nexthop_type_to_str */ @@ -1090,7 +1090,7 @@ nexthop_active_update (struct route_node *rn, struct rib *rib, int set) return rib->nexthop_active_num; } - + static void rib_install_kernel (struct route_node *rn, struct rib *rib) @@ -2283,7 +2283,7 @@ rib_delete_ipv4 (int type, int flags, struct prefix_ipv4 *p, route_unlock_node (rn); return 0; } - + /* Install static route into rib. */ static void static_install_ipv4 (struct prefix *p, struct static_ipv4 *si) @@ -2596,7 +2596,7 @@ static_delete_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname, return 1; } - + #ifdef HAVE_IPV6 static int rib_bogus_ipv6 (int type, struct prefix_ipv6 *p, @@ -2857,7 +2857,7 @@ rib_delete_ipv6 (int type, int flags, struct prefix_ipv6 *p, route_unlock_node (rn); return 0; } - + /* Install static route into rib. */ static void static_install_ipv6 (struct prefix *p, struct static_ipv6 *si) @@ -3155,7 +3155,7 @@ static_delete_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate, return 1; } #endif /* HAVE_IPV6 */ - + /* RIB update function. */ void rib_update (void) @@ -3176,7 +3176,7 @@ rib_update (void) rib_queue_add (&zebrad, rn); } - + /* Remove all routes which comes from non main table. */ static void rib_weed_table (struct route_table *table) @@ -3205,7 +3205,7 @@ rib_weed_tables (void) rib_weed_table (vrf_table (AFI_IP, SAFI_UNICAST, 0)); rib_weed_table (vrf_table (AFI_IP6, SAFI_UNICAST, 0)); } - + /* Delete self installed routes after zebra is relaunched. */ static void rib_sweep_table (struct route_table *table) @@ -3301,7 +3301,7 @@ rib_close (void) rib_close_table (vrf_table (AFI_IP, SAFI_UNICAST, 0)); rib_close_table (vrf_table (AFI_IP6, SAFI_UNICAST, 0)); } - + /* Routing information base initialize. */ void rib_init (void) diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 39c7e1bff..b0dca088b 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -123,7 +123,7 @@ zebra_route_set_delete (struct vty *vty, struct route_map_index *index, return CMD_SUCCESS; } - + /* `match interface IFNAME' */ /* Match function return 1 if match is success else return zero. */ static route_map_result_t @@ -467,7 +467,7 @@ static struct route_map_rule_cmd route_match_ip_next_hop_cmd = route_match_ip_next_hop_compile, route_match_ip_next_hop_free }; - + /* `match ip next-hop prefix-list PREFIX_LIST' */ static route_map_result_t @@ -525,7 +525,7 @@ static struct route_map_rule_cmd route_match_ip_next_hop_prefix_list_cmd = route_match_ip_next_hop_prefix_list_compile, route_match_ip_next_hop_prefix_list_free }; - + /* `match ip address IP_ACCESS_LIST' */ /* Match function should return 1 if match is success else return @@ -571,7 +571,7 @@ static struct route_map_rule_cmd route_match_ip_address_cmd = route_match_ip_address_compile, route_match_ip_address_free }; - + /* `match ip address prefix-list PREFIX_LIST' */ static route_map_result_t @@ -612,7 +612,7 @@ static struct route_map_rule_cmd route_match_ip_address_prefix_list_cmd = route_match_ip_address_prefix_list_free }; - + /* `set src A.B.C.D' */ /* Set src. */ diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c index e06e1443d..f0d3e7e58 100644 --- a/zebra/zebra_snmp.c +++ b/zebra/zebra_snmp.c @@ -34,7 +34,7 @@ #include "zebra/rib.h" #include "zebra/zserv.h" - + #define IPFWMIB 1,3,6,1,2,1,4,24 /* ipForwardTable */ @@ -78,7 +78,7 @@ #define ROWSTATUS ASN_INTEGER #define IPADDRESS ASN_IPADDRESS #define OBJECTIDENTIFIER ASN_OBJECT_ID - + extern struct zebra_t zebrad; oid ipfw_oid [] = { IPFWMIB }; @@ -130,7 +130,7 @@ struct variable zebra_variables[] = {IPCIDRROUTESTATUS, ROWSTATUS, RONLY, ipCidrTable, 3, {4, 1, 16}} }; - + static u_char * ipFwNumber (struct variable *v, oid objid[], size_t *objid_len, int exact, size_t *val_len, WriteMethod **write_method) diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index f4946f461..baa60db9a 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1210,7 +1210,7 @@ DEFUN (show_ip_mroute, return CMD_SUCCESS; } - + #ifdef HAVE_IPV6 /* General fucntion for IPv6 static route. */ static int diff --git a/zebra/zserv.c b/zebra/zserv.c index 55ac6e4fb..ca17c2c6d 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -42,7 +42,7 @@ #include "zebra/redistribute.h" #include "zebra/debug.h" #include "zebra/ipforward.h" - + /* Event list of zebra. */ enum event { ZEBRA_SERV, ZEBRA_READ, ZEBRA_WRITE }; @@ -51,7 +51,7 @@ extern struct zebra_t zebrad; static void zebra_event (enum event event, int sock, struct zserv *client); extern struct zebra_privs_t zserv_privs; - + static void zebra_client_close (struct zserv *client); static int @@ -661,7 +661,7 @@ zsend_ipv4_import_lookup (struct zserv *client, struct prefix_ipv4 *p) return zebra_server_send_message(client); } - + /* Router-id is updated. Send ZEBRA_ROUTER_ID_ADD to client. */ int zsend_router_id_update (struct zserv *client, struct prefix *p) @@ -690,7 +690,7 @@ zsend_router_id_update (struct zserv *client, struct prefix *p) return zebra_server_send_message(client); } - + /* Register zebra server interface information. Send current all interface and address information. */ static int @@ -1539,7 +1539,7 @@ zebra_serv_un (const char *path) zebra_event (ZEBRA_SERV, sock, NULL); } - + static void zebra_event (enum event event, int sock, struct zserv *client) @@ -1558,7 +1558,7 @@ zebra_event (enum event event, int sock, struct zserv *client) break; } } - + /* Display default rtm_table for all clients. */ DEFUN (show_table, show_table_cmd, @@ -1658,7 +1658,7 @@ static struct cmd_node table_node = "", /* This node has no interface. */ 1 }; - + /* Only display ip forwarding is enabled or not. */ DEFUN (show_ip_forwarding, show_ip_forwarding_cmd, @@ -1779,7 +1779,7 @@ static struct cmd_node forwarding_node = 1 }; - + /* Initialisation of zebra and installation of commands. */ void zebra_init (void) -- 2.39.2