diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am index 6e36a950d6..611dbb8558 100644 --- a/bgpd/Makefile.am +++ b/bgpd/Makefile.am @@ -93,11 +93,11 @@ noinst_HEADERS = \ $(BGP_VNC_RFAPI_HD) bgpd_SOURCES = bgp_main.c -bgpd_LDADD = libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ @LIBM@ +bgpd_LDADD = libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ @LIBM@ bgpd_LDFLAGS = $(BGP_VNC_RFP_LD_FLAGS) bgp_btoa_SOURCES = bgp_btoa.c -bgp_btoa_LDADD = libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ @LIBM@ +bgp_btoa_LDADD = libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ @LIBM@ bgp_btoa_LDFLAGS = $(BGP_VNC_RFP_LD_FLAGS) examplesdir = $(exampledir) diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index aa752280cf..e1204f55a1 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -69,6 +69,14 @@ bgp_find_nexthop (struct bgp_info *path, int connected) if (!bnc) return 0; + /* + * We are cheating here. Views have no associated underlying + * ability to detect nexthops. So when we have a view + * just tell everyone the nexthop is valid + */ + if (path->peer && path->peer->bgp->inst_type == BGP_INSTANCE_TYPE_VIEW) + return 1; + if (connected && !(CHECK_FLAG(bnc->flags, BGP_NEXTHOP_CONNECTED))) return 0; @@ -196,7 +204,6 @@ bgp_find_or_add_nexthop (struct bgp *bgp, afi_t afi, struct bgp_info *ri, bnc = rn->info; bgp_unlock_node (rn); - if (is_bgp_static_route) { SET_FLAG(bnc->flags, BGP_STATIC_ROUTE); @@ -239,10 +246,13 @@ bgp_find_or_add_nexthop (struct bgp *bgp, afi_t afi, struct bgp_info *ri, UNSET_FLAG(bnc->flags, BGP_NEXTHOP_REGISTERED); UNSET_FLAG(bnc->flags, BGP_NEXTHOP_VALID); } - - if (!CHECK_FLAG(bnc->flags, BGP_NEXTHOP_REGISTERED)) + if (bgp->inst_type == BGP_INSTANCE_TYPE_VIEW) + { + bnc->flags |= BGP_NEXTHOP_REGISTERED; + bnc->flags |= BGP_NEXTHOP_VALID; + } + else if (!CHECK_FLAG(bnc->flags, BGP_NEXTHOP_REGISTERED)) register_zebra_rnh(bnc, is_bgp_static_route); - if (ri && ri->nexthop != bnc) { /* Unlink from existing nexthop cache, if any. This will also free @@ -260,7 +270,15 @@ bgp_find_or_add_nexthop (struct bgp *bgp, afi_t afi, struct bgp_info *ri, else if (peer) bnc->nht_info = (void *)peer; /* NHT peer reference */ - return (bgp_isvalid_nexthop(bnc)); + /* + * We are cheating here. Views have no associated underlying + * ability to detect nexthops. So when we have a view + * just tell everyone the nexthop is valid + */ + if (bgp->inst_type == BGP_INSTANCE_TYPE_VIEW) + return 1; + else + return (bgp_isvalid_nexthop(bnc)); } void diff --git a/bgpd/rfp-example/rfptest/Makefile.am b/bgpd/rfp-example/rfptest/Makefile.am index a1001e4ef1..f5db852dbb 100644 --- a/bgpd/rfp-example/rfptest/Makefile.am +++ b/bgpd/rfp-example/rfptest/Makefile.am @@ -48,5 +48,5 @@ sbin_PROGRAMS = $(RFPTEST_BIN) examplesdir = $(exampledir) -rfptest_LDADD = $(top_builddir)/lib/libzebra.la $(BGP_VNC_RFP_LIB) +rfptest_LDADD = $(top_builddir)/lib/libfrr.la $(BGP_VNC_RFP_LIB) dist_examples_DATA = diff --git a/common.am b/common.am index c6da3d75e8..d01d673ae6 100644 --- a/common.am +++ b/common.am @@ -32,7 +32,7 @@ Q_PROTOBUF_SRCS = $(Q_PROTOBUF_CFILES) $(Q_PROTOBUF_HFILES) # Q_FRR_PB_CLIENT_LDOPTS = $(top_srcdir)/qpb/libfrr_pb.la $(Q_PROTOBUF_C_CLIENT_LDOPTS) -Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfpm_pb.la $(Q_FRR_PB_CLIENT_LDOPTS) +Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfrrfpm_pb.la $(Q_FRR_PB_CLIENT_LDOPTS) endif # HAVE_PROTOBUF diff --git a/configure.ac b/configure.ac index e7ff01f300..4eebe67bb3 100755 --- a/configure.ac +++ b/configure.ac @@ -1688,7 +1688,7 @@ AC_CONFIG_FILES([Makefile lib/Makefile qpb/Makefile zebra/Makefile ripd/Makefile doc/Makefile ospfclient/Makefile tests/Makefile m4/Makefile pimd/Makefile tests/bgpd.tests/Makefile - tests/libzebra.tests/Makefile + tests/libfrr.tests/Makefile redhat/Makefile tools/Makefile cumulus/Makefile diff --git a/debian/frr.lintian-overrides b/debian/frr.lintian-overrides index 42a51b5e69..e21bd9256d 100644 --- a/debian/frr.lintian-overrides +++ b/debian/frr.lintian-overrides @@ -1,4 +1,3 @@ -frr: non-dev-pkg-with-shlib-symlink usr/lib/libospfapiclient.so.0.0.0 usr/lib/libospfapiclient.so -frr: non-dev-pkg-with-shlib-symlink usr/lib/libospf.so.0.0.0 usr/lib/libospf.so -frr: non-dev-pkg-with-shlib-symlink usr/lib/libzebra.so.0.0.0 usr/lib/libzebra.so -frr: package-name-doesnt-match-sonames libospf0 libospfapiclient0 libzebra0 +frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrrospfapiclient.so.0.0.0 usr/lib/libfrrospfapiclient.so +frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrr.so.0.0.0 usr/lib/libfrr.so +frr: package-name-doesnt-match-sonames libfrrospf0 libfrrospfapiclient0 libfrr0 diff --git a/fpm/Makefile.am b/fpm/Makefile.am index 83ab31ce3f..1f46ac6db2 100644 --- a/fpm/Makefile.am +++ b/fpm/Makefile.am @@ -5,8 +5,8 @@ AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib $(Q PROTOBUF_INCLUDES=-I$(top_srcdir) PROTOBUF_PACKAGE = fpm -lib_LTLIBRARIES = libfpm_pb.la -libfpm_pb_la_LDFLAGS = -version-info 0:0:0 +lib_LTLIBRARIES = libfrrfpm_pb.la +libfrrfpm_pb_la_LDFLAGS = -version-info 0:0:0 if HAVE_PROTOBUF protobuf_srcs = @@ -15,13 +15,13 @@ protobuf_srcs_nodist = \ fpm.pb-c.c endif -libfpm_pb_la_SOURCES = \ +libfrrfpm_pb_la_SOURCES = \ fpm.h \ fpm_pb.h \ fpm_pb.c \ $(protobuf_srcs) -nodist_libfpm_pb_la_SOURCES = $(protobuf_srcs_nodist) +nodist_libfrrfpm_pb_la_SOURCES = $(protobuf_srcs_nodist) CLEANFILES = $(Q_CLEANFILES) diff --git a/isisd/Makefile.am b/isisd/Makefile.am index 89a39ef065..c97385f87a 100644 --- a/isisd/Makefile.am +++ b/isisd/Makefile.am @@ -31,7 +31,7 @@ isisd_SOURCES = \ isis_main.c $(libisis_a_SOURCES) \ isis_bpf.c isis_dlpi.c isis_pfpacket.c -isisd_LDADD = ../lib/libzebra.la @LIBCAP@ +isisd_LDADD = ../lib/libfrr.la @LIBCAP@ examplesdir = $(exampledir) dist_examples_DATA = isisd.conf.sample diff --git a/ldpd/Makefile.am b/ldpd/Makefile.am index 6dc7c077de..42e54138aa 100644 --- a/ldpd/Makefile.am +++ b/ldpd/Makefile.am @@ -27,7 +27,7 @@ ldp_vty_cmds.c: $(srcdir)/ldp_vty.xml $(srcdir)/../tools/xml2cli.pl @PERL@ $(srcdir)/../tools/xml2cli.pl $(srcdir)/ldp_vty.xml > $@ ldpd_SOURCES = ldpd.c -ldpd_LDADD = libldp.a ../lib/libzebra.la @LIBCAP@ +ldpd_LDADD = libldp.a ../lib/libfrr.la @LIBCAP@ examplesdir = $(exampledir) dist_examples_DATA = ldpd.conf.sample diff --git a/lib/Makefile.am b/lib/Makefile.am index b6de2c2cd6..780d4bc1b8 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -10,10 +10,10 @@ command_lex.h: command_lex.c @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) command_lex.c; else :; fi command_parse.lo: command_lex.h -lib_LTLIBRARIES = libzebra.la -libzebra_la_LDFLAGS = -version-info 0:0:0 +lib_LTLIBRARIES = libfrr.la +libfrr_la_LDFLAGS = -version-info 0:0:0 -libzebra_la_SOURCES = \ +libfrr_la_SOURCES = \ network.c pid_output.c getopt.c getopt1.c \ checksum.c vector.c linklist.c vty.c \ graph.c command_parse.y command_lex.l command_match.c \ @@ -33,7 +33,7 @@ libzebra_la_SOURCES = \ BUILT_SOURCES = route_types.h gitversion.h command_parse.h command_lex.h -libzebra_la_LIBADD = @LIBCAP@ +libfrr_la_LIBADD = @LIBCAP@ pkginclude_HEADERS = \ buffer.h checksum.h filter.h getopt.h hash.h \ @@ -58,7 +58,7 @@ noinst_HEADERS = \ noinst_PROGRAMS = grammar_sandbox grammar_sandbox_SOURCES = grammar_sandbox_main.c -grammar_sandbox_LDADD = libzebra.la +grammar_sandbox_LDADD = libfrr.la EXTRA_DIST = \ queue.h \ diff --git a/lib/linklist.h b/lib/linklist.h index e99e50f4fa..052025a86c 100644 --- a/lib/linklist.h +++ b/lib/linklist.h @@ -137,7 +137,7 @@ extern void list_add_list (struct list *, struct list *); /* Deprecated: 20050406 */ #if !defined(QUAGGA_NO_DEPRECATED_INTERFACES) -#warning "Using deprecated libzebra interfaces" +#warning "Using deprecated libfrr interfaces" #define LISTNODE_ADD(L,N) LISTNODE_ATTACH(L,N) #define LISTNODE_DELETE(L,N) LISTNODE_DETACH(L,N) #define nextnode(X) ((X) = (X)->next) diff --git a/lib/memory.c b/lib/memory.c index b1dc01ed97..ad55366f64 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -19,11 +19,12 @@ #include #include "memory.h" +#include "log.h" static struct memgroup *mg_first = NULL; struct memgroup **mg_insert = &mg_first; -DEFINE_MGROUP(LIB, "libzebra") +DEFINE_MGROUP(LIB, "libfrr") DEFINE_MTYPE(LIB, TMP, "Temporary memory") static inline void diff --git a/lib/thread.c b/lib/thread.c index 28245d11a2..c1558a83e1 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -362,8 +362,8 @@ thread_master_create (void) #if defined(HAVE_POLL) rv->handler.pfdsize = rv->fd_limit; rv->handler.pfdcount = 0; - rv->handler.pfds = (struct pollfd *) malloc (sizeof (struct pollfd) * rv->handler.pfdsize); - memset (rv->handler.pfds, 0, sizeof (struct pollfd) * rv->handler.pfdsize); + rv->handler.pfds = XCALLOC (MTYPE_THREAD_MASTER, + sizeof (struct pollfd) * rv->handler.pfdsize); #endif return rv; } diff --git a/lib/thread.h b/lib/thread.h index a0801e1ecd..49964e7743 100644 --- a/lib/thread.h +++ b/lib/thread.h @@ -243,7 +243,7 @@ extern int thread_should_yield (struct thread *); /* set yield time for thread */ extern void thread_set_yield_time (struct thread *, unsigned long); -/* Internal libzebra exports */ +/* Internal libfrr exports */ extern void thread_getrusage (RUSAGE_T *); extern void thread_cmd_init (void); diff --git a/ospf6d/Makefile.am b/ospf6d/Makefile.am index 7551503dae..06fc7a30af 100644 --- a/ospf6d/Makefile.am +++ b/ospf6d/Makefile.am @@ -28,7 +28,7 @@ noinst_HEADERS = \ ospf6d_SOURCES = \ ospf6_main.c $(libospf6_a_SOURCES) -ospf6d_LDADD = ../lib/libzebra.la @LIBCAP@ +ospf6d_LDADD = ../lib/libfrr.la @LIBCAP@ examplesdir = $(exampledir) dist_examples_DATA = ospf6d.conf.sample diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index c458098099..8998799cf6 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -717,7 +717,7 @@ interface_up (struct thread *thread) if (IS_OSPF6_DEBUG_INTERFACE) zlog_debug ("Interface %s has no link local address, can't execute [InterfaceUp]", oi->interface->name); - return 0; + return 0; } /* Recompute cost */ diff --git a/ospfclient/Makefile.am b/ospfclient/Makefile.am index 1fca431a10..28dc65d165 100644 --- a/ospfclient/Makefile.am +++ b/ospfclient/Makefile.am @@ -1,16 +1,17 @@ ## Automake.am for OSPF API client +AUTOMAKE_OPTIONS = subdir-objects AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib AM_CFLAGS = $(WERROR) -lib_LTLIBRARIES = libospfapiclient.la -libospfapiclient_la_LDFLAGS = -version-info 0:0:0 -libospfapiclient_la_LIBADD = ../ospfd/libospf.la ../lib/libzebra.la +lib_LTLIBRARIES = libfrrospfapiclient.la +libfrrospfapiclient_la_LDFLAGS = -version-info 0:0:0 +libfrrospfapiclient_la_LIBADD = ../lib/libfrr.la sbin_PROGRAMS = ospfclient -libospfapiclient_la_SOURCES = \ - ospf_apiclient.c +libfrrospfapiclient_la_SOURCES = \ + ospf_apiclient.c ../ospfd/ospf_dump_api.c ../ospfd/ospf_api.c ospfapiheaderdir = $(pkgincludedir)/ospfapi @@ -20,8 +21,8 @@ ospfapiheader_HEADERS = \ ospfclient_SOURCES = \ ospfclient.c -ospfclient_LDADD = libospfapiclient.la \ - ../ospfd/libospf.la ../lib/libzebra.la @LIBCAP@ +ospfclient_LDADD = libfrrospfapiclient.la \ + ../lib/libfrr.la @LIBCAP@ ospfclient_CFLAGS = $(AM_CFLAGS) ospfclient_LDFLAGS = $(AM_LDFLAGS) diff --git a/ospfclient/ospf_apiclient.c b/ospfclient/ospf_apiclient.c index 453e05ce2e..1590b65384 100644 --- a/ospfclient/ospf_apiclient.c +++ b/ospfclient/ospf_apiclient.c @@ -49,7 +49,8 @@ #include "ospf_apiclient.h" -DEFINE_MTYPE_STATIC(OSPFD, OSPF_APICLIENT, "OSPF-API client") +DEFINE_MGROUP(OSPFCLIENT, "libospfapiclient") +DEFINE_MTYPE_STATIC(OSPFCLIENT, OSPF_APICLIENT, "OSPF-API client") /* Backlog for listen */ #define BACKLOG 5 diff --git a/ospfclient/ospfclient.c b/ospfclient/ospfclient.c index 1716ebeca7..9a77a64cc4 100644 --- a/ospfclient/ospfclient.c +++ b/ospfclient/ospfclient.c @@ -52,7 +52,7 @@ struct zebra_privs_t ospfd_privs = }; /* The following includes are specific to this application. For - example it uses threads from libzebra, however your application is + example it uses threads from libfrr, however your application is free to use any thread library (like pthreads). */ #include "ospfd/ospf_dump.h" /* for ospf_lsa_header_dump */ diff --git a/ospfd/Makefile.am b/ospfd/Makefile.am index 62db350c5b..71e0df0dc5 100644 --- a/ospfd/Makefile.am +++ b/ospfd/Makefile.am @@ -5,25 +5,23 @@ AM_CFLAGS = $(WERROR) DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 -lib_LTLIBRARIES = libospf.la -libospf_la_LDFLAGS = -version-info 0:0:0 -libospf_la_LIBADD = ../lib/libzebra.la - +noinst_LIBRARIES = libfrrospf.a sbin_PROGRAMS = ospfd -libospf_la_SOURCES = \ +libfrrospf_a_SOURCES = \ ospfd.c ospf_zebra.c ospf_interface.c ospf_ism.c ospf_neighbor.c \ ospf_nsm.c ospf_dump.c ospf_network.c ospf_packet.c ospf_lsa.c \ ospf_spf.c ospf_route.c ospf_ase.c ospf_abr.c ospf_ia.c ospf_flood.c \ ospf_lsdb.c ospf_asbr.c ospf_routemap.c ospf_snmp.c \ ospf_opaque.c ospf_te.c ospf_ri.c ospf_vty.c ospf_api.c ospf_apiserver.c \ - ospf_bfd.c ospf_memory.c + ospf_bfd.c ospf_memory.c ospf_dump_api.c ospfdheaderdir = $(pkgincludedir)/ospfd ospfdheader_HEADERS = \ ospf_api.h ospf_asbr.h ospf_dump.h ospf_lsa.h ospf_lsdb.h \ - ospf_nsm.h ospf_ism.h ospf_opaque.h ospfd.h + ospf_nsm.h ospf_ism.h ospf_opaque.h ospfd.h \ + ospf_dump_api.h noinst_HEADERS = \ ospf_interface.h ospf_neighbor.h ospf_network.h ospf_packet.h \ @@ -33,7 +31,7 @@ noinst_HEADERS = \ ospfd_SOURCES = ospf_main.c -ospfd_LDADD = libospf.la ../lib/libzebra.la @LIBCAP@ @LIBM@ +ospfd_LDADD = libfrrospf.a ../lib/libfrr.la @LIBCAP@ @LIBM@ EXTRA_DIST = OSPF-MIB.txt OSPF-TRAP-MIB.txt ChangeLog.opaque.txt diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index 4c31bad0a8..a54170e048 100644 --- a/ospfd/ospf_abr.c +++ b/ospfd/ospf_abr.c @@ -701,7 +701,7 @@ ospf_abr_translate_nssa (struct ospf_area *area, struct ospf_lsa *lsa) zlog_debug ("ospf_abr_translate_nssa(): Could not translate " "Type-7 for %s to Type-5", inet_ntoa (lsa->data->id)); - return 1; + return 1; } } @@ -948,11 +948,11 @@ ospf_abr_announce_network (struct ospf *ospf, zlog_debug ("ospf_abr_announce_network(): " "this is intra-area route to %s/%d", inet_ntoa (p->prefix), p->prefixlen); - if ((range = ospf_area_range_match (or_area, p)) - && !ospf_area_is_transit (area)) - ospf_abr_update_aggregate (range, or, area); - else - ospf_abr_announce_network_to_area (p, or->cost, area); + if ((range = ospf_area_range_match (or_area, p)) + && !ospf_area_is_transit (area)) + ospf_abr_update_aggregate (range, or, area); + else + ospf_abr_announce_network_to_area (p, or->cost, area); } } } diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 6e9e59f9b7..21b2855499 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -43,89 +43,6 @@ #include "ospfd/ospf_packet.h" #include "ospfd/ospf_network.h" -const struct message ospf_ism_state_msg[] = -{ - { ISM_DependUpon, "DependUpon" }, - { ISM_Down, "Down" }, - { ISM_Loopback, "Loopback" }, - { ISM_Waiting, "Waiting" }, - { ISM_PointToPoint, "Point-To-Point" }, - { ISM_DROther, "DROther" }, - { ISM_Backup, "Backup" }, - { ISM_DR, "DR" }, -}; -const int ospf_ism_state_msg_max = OSPF_ISM_STATE_MAX; - -const struct message ospf_nsm_state_msg[] = -{ - { NSM_DependUpon, "DependUpon" }, - { NSM_Deleted, "Deleted" }, - { NSM_Down, "Down" }, - { NSM_Attempt, "Attempt" }, - { NSM_Init, "Init" }, - { NSM_TwoWay, "2-Way" }, - { NSM_ExStart, "ExStart" }, - { NSM_Exchange, "Exchange" }, - { NSM_Loading, "Loading" }, - { NSM_Full, "Full" }, -}; -const int ospf_nsm_state_msg_max = OSPF_NSM_STATE_MAX; - -const struct message ospf_lsa_type_msg[] = -{ - { OSPF_UNKNOWN_LSA, "unknown" }, - { OSPF_ROUTER_LSA, "router-LSA" }, - { OSPF_NETWORK_LSA, "network-LSA" }, - { OSPF_SUMMARY_LSA, "summary-LSA" }, - { OSPF_ASBR_SUMMARY_LSA, "summary-LSA" }, - { OSPF_AS_EXTERNAL_LSA, "AS-external-LSA" }, - { OSPF_GROUP_MEMBER_LSA, "GROUP MEMBER LSA" }, - { OSPF_AS_NSSA_LSA, "NSSA-LSA" }, - { 8, "Type-8 LSA" }, - { OSPF_OPAQUE_LINK_LSA, "Link-Local Opaque-LSA" }, - { OSPF_OPAQUE_AREA_LSA, "Area-Local Opaque-LSA" }, - { OSPF_OPAQUE_AS_LSA, "AS-external Opaque-LSA" }, -}; -const int ospf_lsa_type_msg_max = OSPF_MAX_LSA; - -const struct message ospf_link_state_id_type_msg[] = -{ - { OSPF_UNKNOWN_LSA, "(unknown)" }, - { OSPF_ROUTER_LSA, "" }, - { OSPF_NETWORK_LSA, "(address of Designated Router)" }, - { OSPF_SUMMARY_LSA, "(summary Network Number)" }, - { OSPF_ASBR_SUMMARY_LSA, "(AS Boundary Router address)" }, - { OSPF_AS_EXTERNAL_LSA, "(External Network Number)" }, - { OSPF_GROUP_MEMBER_LSA, "(Group membership information)" }, - { OSPF_AS_NSSA_LSA, "(External Network Number for NSSA)" }, - { 8, "(Type-8 LSID)" }, - { OSPF_OPAQUE_LINK_LSA, "(Link-Local Opaque-Type/ID)" }, - { OSPF_OPAQUE_AREA_LSA, "(Area-Local Opaque-Type/ID)" }, - { OSPF_OPAQUE_AS_LSA, "(AS-external Opaque-Type/ID)" }, -}; -const int ospf_link_state_id_type_msg_max = OSPF_MAX_LSA; - -const struct message ospf_network_type_msg[] = -{ - { OSPF_IFTYPE_NONE, "NONE" }, - { OSPF_IFTYPE_POINTOPOINT, "Point-to-Point" }, - { OSPF_IFTYPE_BROADCAST, "Broadcast" }, - { OSPF_IFTYPE_NBMA, "NBMA" }, - { OSPF_IFTYPE_POINTOMULTIPOINT, "Point-to-MultiPoint" }, - { OSPF_IFTYPE_VIRTUALLINK, "Virtual-Link" }, -}; -const int ospf_network_type_msg_max = OSPF_IFTYPE_MAX; - -/* AuType */ -const struct message ospf_auth_type_str[] = -{ - { OSPF_AUTH_NULL, "Null" }, - { OSPF_AUTH_SIMPLE, "Simple" }, - { OSPF_AUTH_CRYPTOGRAPHIC, "Cryptographic" }, -}; -const size_t ospf_auth_type_str_max = sizeof (ospf_auth_type_str) / - sizeof (ospf_auth_type_str[0]); - /* Configuration debug option variables. */ unsigned long conf_debug_ospf_packet[5] = {0, 0, 0, 0, 0}; unsigned long conf_debug_ospf_event = 0; @@ -323,25 +240,6 @@ ospf_timer_dump (struct thread *t, char *buf, size_t size) return ospf_timeval_dump (&result, buf, size); } -#define OSPF_OPTION_STR_MAXLEN 24 - -char * -ospf_options_dump (u_char options) -{ - static char buf[OSPF_OPTION_STR_MAXLEN]; - - snprintf (buf, OSPF_OPTION_STR_MAXLEN, "*|%s|%s|%s|%s|%s|%s|%s", - (options & OSPF_OPTION_O) ? "O" : "-", - (options & OSPF_OPTION_DC) ? "DC" : "-", - (options & OSPF_OPTION_EA) ? "EA" : "-", - (options & OSPF_OPTION_NP) ? "N/P" : "-", - (options & OSPF_OPTION_MC) ? "MC" : "-", - (options & OSPF_OPTION_E) ? "E" : "-", - (options & OSPF_OPTION_MT) ? "M/T" : "-"); - - return buf; -} - static void ospf_packet_hello_dump (struct stream *s, u_int16_t length) { @@ -379,24 +277,6 @@ ospf_dd_flags_dump (u_char flags, char *buf, size_t size) return buf; } -void -ospf_lsa_header_dump (struct lsa_header *lsah) -{ - const char *lsah_type = LOOKUP (ospf_lsa_type_msg, lsah->type); - - zlog_debug (" LSA Header"); - zlog_debug (" LS age %d", ntohs (lsah->ls_age)); - zlog_debug (" Options %d (%s)", lsah->options, - ospf_options_dump (lsah->options)); - zlog_debug (" LS type %d (%s)", lsah->type, - (lsah->type ? lsah_type : "unknown type")); - zlog_debug (" Link State ID %s", inet_ntoa (lsah->id)); - zlog_debug (" Advertising Router %s", inet_ntoa (lsah->adv_router)); - zlog_debug (" LS sequence number 0x%lx", (u_long)ntohl (lsah->ls_seqnum)); - zlog_debug (" LS checksum 0x%x", ntohs (lsah->checksum)); - zlog_debug (" length %d", ntohs (lsah->length)); -} - static char * ospf_router_lsa_flags_dump (u_char flags, char *buf, size_t size) { diff --git a/ospfd/ospf_dump.h b/ospfd/ospf_dump.h index f843df03ae..9bed853eed 100644 --- a/ospfd/ospf_dump.h +++ b/ospfd/ospf_dump.h @@ -126,20 +126,16 @@ extern unsigned long term_debug_ospf_te; /* Message Strings. */ extern char *ospf_lsa_type_str[]; -extern const struct message ospf_auth_type_str[]; -extern const size_t ospf_auth_type_str_max; /* Prototypes. */ extern const char *ospf_area_name_string (struct ospf_area *); extern const char *ospf_area_desc_string (struct ospf_area *); extern const char *ospf_if_name_string (struct ospf_interface *); extern void ospf_nbr_state_message (struct ospf_neighbor *, char *, size_t); -extern char *ospf_options_dump (u_char); extern const char *ospf_timer_dump (struct thread *, char *, size_t); extern const char *ospf_timeval_dump (struct timeval *, char *, size_t); extern void ospf_ip_header_dump (struct ip *); extern void ospf_packet_dump (struct stream *); -extern void ospf_lsa_header_dump (struct lsa_header *); extern void debug_init (void); /* Appropriate buffer size to use with ospf_timer_dump and ospf_timeval_dump: */ diff --git a/ospfd/ospf_dump_api.c b/ospfd/ospf_dump_api.c new file mode 100644 index 0000000000..20e7740d32 --- /dev/null +++ b/ospfd/ospf_dump_api.c @@ -0,0 +1,151 @@ +/* + * OSPFd dump routine (parts used by ospfclient). + * Copyright (C) 1999, 2000 Toshiaki Takada + * + * This file is part of FreeRangeRouting (FRR). + * + * FRR is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2, or (at your option) any later version. + * + * FRR is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with FRR; see the file COPYING. If not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include + +#include "log.h" +#include "prefix.h" + +#include "ospf_dump_api.h" +#include "ospfd.h" +#include "ospf_asbr.h" +#include "ospf_lsa.h" +#include "ospf_nsm.h" +#include "ospf_ism.h" + +const struct message ospf_ism_state_msg[] = +{ + { ISM_DependUpon, "DependUpon" }, + { ISM_Down, "Down" }, + { ISM_Loopback, "Loopback" }, + { ISM_Waiting, "Waiting" }, + { ISM_PointToPoint, "Point-To-Point" }, + { ISM_DROther, "DROther" }, + { ISM_Backup, "Backup" }, + { ISM_DR, "DR" }, +}; +const int ospf_ism_state_msg_max = OSPF_ISM_STATE_MAX; + +const struct message ospf_nsm_state_msg[] = +{ + { NSM_DependUpon, "DependUpon" }, + { NSM_Deleted, "Deleted" }, + { NSM_Down, "Down" }, + { NSM_Attempt, "Attempt" }, + { NSM_Init, "Init" }, + { NSM_TwoWay, "2-Way" }, + { NSM_ExStart, "ExStart" }, + { NSM_Exchange, "Exchange" }, + { NSM_Loading, "Loading" }, + { NSM_Full, "Full" }, +}; +const int ospf_nsm_state_msg_max = OSPF_NSM_STATE_MAX; + +const struct message ospf_lsa_type_msg[] = +{ + { OSPF_UNKNOWN_LSA, "unknown" }, + { OSPF_ROUTER_LSA, "router-LSA" }, + { OSPF_NETWORK_LSA, "network-LSA" }, + { OSPF_SUMMARY_LSA, "summary-LSA" }, + { OSPF_ASBR_SUMMARY_LSA, "summary-LSA" }, + { OSPF_AS_EXTERNAL_LSA, "AS-external-LSA" }, + { OSPF_GROUP_MEMBER_LSA, "GROUP MEMBER LSA" }, + { OSPF_AS_NSSA_LSA, "NSSA-LSA" }, + { 8, "Type-8 LSA" }, + { OSPF_OPAQUE_LINK_LSA, "Link-Local Opaque-LSA" }, + { OSPF_OPAQUE_AREA_LSA, "Area-Local Opaque-LSA" }, + { OSPF_OPAQUE_AS_LSA, "AS-external Opaque-LSA" }, +}; +const int ospf_lsa_type_msg_max = OSPF_MAX_LSA; + +const struct message ospf_link_state_id_type_msg[] = +{ + { OSPF_UNKNOWN_LSA, "(unknown)" }, + { OSPF_ROUTER_LSA, "" }, + { OSPF_NETWORK_LSA, "(address of Designated Router)" }, + { OSPF_SUMMARY_LSA, "(summary Network Number)" }, + { OSPF_ASBR_SUMMARY_LSA, "(AS Boundary Router address)" }, + { OSPF_AS_EXTERNAL_LSA, "(External Network Number)" }, + { OSPF_GROUP_MEMBER_LSA, "(Group membership information)" }, + { OSPF_AS_NSSA_LSA, "(External Network Number for NSSA)" }, + { 8, "(Type-8 LSID)" }, + { OSPF_OPAQUE_LINK_LSA, "(Link-Local Opaque-Type/ID)" }, + { OSPF_OPAQUE_AREA_LSA, "(Area-Local Opaque-Type/ID)" }, + { OSPF_OPAQUE_AS_LSA, "(AS-external Opaque-Type/ID)" }, +}; +const int ospf_link_state_id_type_msg_max = OSPF_MAX_LSA; + +const struct message ospf_network_type_msg[] = +{ + { OSPF_IFTYPE_NONE, "NONE" }, + { OSPF_IFTYPE_POINTOPOINT, "Point-to-Point" }, + { OSPF_IFTYPE_BROADCAST, "Broadcast" }, + { OSPF_IFTYPE_NBMA, "NBMA" }, + { OSPF_IFTYPE_POINTOMULTIPOINT, "Point-to-MultiPoint" }, + { OSPF_IFTYPE_VIRTUALLINK, "Virtual-Link" }, +}; +const int ospf_network_type_msg_max = OSPF_IFTYPE_MAX; + +/* AuType */ +const struct message ospf_auth_type_str[] = +{ + { OSPF_AUTH_NULL, "Null" }, + { OSPF_AUTH_SIMPLE, "Simple" }, + { OSPF_AUTH_CRYPTOGRAPHIC, "Cryptographic" }, +}; +const size_t ospf_auth_type_str_max = sizeof (ospf_auth_type_str) / + sizeof (ospf_auth_type_str[0]); + +#define OSPF_OPTION_STR_MAXLEN 24 + +char * +ospf_options_dump (u_char options) +{ + static char buf[OSPF_OPTION_STR_MAXLEN]; + + snprintf (buf, OSPF_OPTION_STR_MAXLEN, "*|%s|%s|%s|%s|%s|%s|%s", + (options & OSPF_OPTION_O) ? "O" : "-", + (options & OSPF_OPTION_DC) ? "DC" : "-", + (options & OSPF_OPTION_EA) ? "EA" : "-", + (options & OSPF_OPTION_NP) ? "N/P" : "-", + (options & OSPF_OPTION_MC) ? "MC" : "-", + (options & OSPF_OPTION_E) ? "E" : "-", + (options & OSPF_OPTION_MT) ? "M/T" : "-"); + + return buf; +} + +void +ospf_lsa_header_dump (struct lsa_header *lsah) +{ + const char *lsah_type = LOOKUP (ospf_lsa_type_msg, lsah->type); + + zlog_debug (" LSA Header"); + zlog_debug (" LS age %d", ntohs (lsah->ls_age)); + zlog_debug (" Options %d (%s)", lsah->options, + ospf_options_dump (lsah->options)); + zlog_debug (" LS type %d (%s)", lsah->type, + (lsah->type ? lsah_type : "unknown type")); + zlog_debug (" Link State ID %s", inet_ntoa (lsah->id)); + zlog_debug (" Advertising Router %s", inet_ntoa (lsah->adv_router)); + zlog_debug (" LS sequence number 0x%lx", (u_long)ntohl (lsah->ls_seqnum)); + zlog_debug (" LS checksum 0x%x", ntohs (lsah->checksum)); + zlog_debug (" length %d", ntohs (lsah->length)); +} diff --git a/ospfd/ospf_dump_api.h b/ospfd/ospf_dump_api.h new file mode 100644 index 0000000000..c3ff1e3f54 --- /dev/null +++ b/ospfd/ospf_dump_api.h @@ -0,0 +1,43 @@ +/* + * OSPFd dump routine (parts used by ospfclient). + * Copyright (C) 1999 Toshiaki Takada + * + * This file is part of FreeRangeRouting (FRR). + * + * FRR is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2, or (at your option) any later version. + * + * FRR is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with FRR; see the file COPYING. If not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _ZEBRA_OSPF_DUMP_API_H +#define _ZEBRA_OSPF_DUMP_API_H + +#include "log.h" +struct lsa_header; + +extern const struct message ospf_ism_state_msg[]; +extern const struct message ospf_nsm_state_msg[]; +extern const struct message ospf_lsa_type_msg[]; +extern const struct message ospf_link_state_id_type_msg[]; +extern const struct message ospf_network_type_msg[]; +extern const struct message ospf_auth_type_str[]; +extern const int ospf_ism_state_msg_max; +extern const int ospf_nsm_state_msg_max; +extern const int ospf_lsa_type_msg_max; +extern const int ospf_link_state_id_type_msg_max; +extern const int ospf_network_type_msg_max; +extern const size_t ospf_auth_type_str_max; + +extern char *ospf_options_dump (u_char); +extern void ospf_lsa_header_dump (struct lsa_header *); + +#endif /* _ZEBRA_OSPF_DUMP_API_H */ diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 0398bc21b8..570734bd8c 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -114,8 +114,8 @@ ospf_router_id_update (struct ospf *ospf) else router_id = router_id_zebra; - - if (!IPV4_ADDR_SAME (&router_id_old, &router_id)) + + if (!IPV4_ADDR_SAME (&router_id_old, &router_id)) { for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi)) diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h index a9e3efeeab..8ebd3c4ec6 100644 --- a/ospfd/ospfd.h +++ b/ospfd/ospfd.h @@ -31,6 +31,7 @@ #include "log.h" #include "ospf_memory.h" +#include "ospf_dump_api.h" #define OSPF_VERSION 2 @@ -510,17 +511,7 @@ struct ospf_nbr_nbma /* Extern variables. */ extern struct ospf_master *om; -extern const struct message ospf_ism_state_msg[]; -extern const struct message ospf_nsm_state_msg[]; -extern const struct message ospf_lsa_type_msg[]; -extern const struct message ospf_link_state_id_type_msg[]; -extern const struct message ospf_network_type_msg[]; -extern const int ospf_ism_state_msg_max; -extern const int ospf_nsm_state_msg_max; -extern const int ospf_lsa_type_msg_max; -extern const int ospf_link_state_id_type_msg_max; extern const int ospf_redistributed_proto_max; -extern const int ospf_network_type_msg_max; extern struct zclient *zclient; extern struct thread_master *master; extern int ospf_zlog; diff --git a/pimd/Makefile.am b/pimd/Makefile.am index 314a744339..5c40d2ac64 100644 --- a/pimd/Makefile.am +++ b/pimd/Makefile.am @@ -72,8 +72,8 @@ pimd_SOURCES = \ test_igmpv3_join_SOURCES = \ test_igmpv3_join.c -pimd_LDADD = ../lib/libzebra.la @LIBCAP@ -test_igmpv3_join_LDADD = ../lib/libzebra.la +pimd_LDADD = ../lib/libfrr.la @LIBCAP@ +test_igmpv3_join_LDADD = ../lib/libfrr.la examplesdir = $(exampledir) dist_examples_DATA = pimd.conf.sample diff --git a/pimd/TODO b/pimd/TODO index 4c0f183100..57d2a17b5f 100644 --- a/pimd/TODO +++ b/pimd/TODO @@ -144,7 +144,7 @@ T22 DONE IGMP must be protected against adding looped MFC entries created by both source and receiver attached to the same interface. -T23 DONE libzebra crash after zclient_lookup_nexthop. +T23 DONE libfrr crash after zclient_lookup_nexthop. See mailing list post: http://lists.nongnu.org/archive/html/qpimd-users/2009-04/msg00008.html diff --git a/ripd/Makefile.am b/ripd/Makefile.am index e7073a7902..7967ff1535 100644 --- a/ripd/Makefile.am +++ b/ripd/Makefile.am @@ -21,7 +21,7 @@ noinst_HEADERS = \ ripd_SOURCES = \ rip_main.c $(librip_a_SOURCES) -ripd_LDADD = ../lib/libzebra.la @LIBCAP@ +ripd_LDADD = ../lib/libfrr.la @LIBCAP@ examplesdir = $(exampledir) dist_examples_DATA = ripd.conf.sample diff --git a/ripd/ripd.c b/ripd/ripd.c index 29a444be43..bcf4cd3347 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -2283,8 +2283,8 @@ rip_output_process (struct connected *ifc, struct sockaddr_in *to, { if (IS_RIP_DEBUG_PACKET) zlog_debug ("RIP %s/%d is filtered by route-map out", - inet_ntoa (p->prefix), p->prefixlen); - continue; + inet_ntoa (p->prefix), p->prefixlen); + continue; } } diff --git a/ripngd/Makefile.am b/ripngd/Makefile.am index c08e58a90c..3a4be999a7 100644 --- a/ripngd/Makefile.am +++ b/ripngd/Makefile.am @@ -21,7 +21,7 @@ noinst_HEADERS = \ ripngd_SOURCES = \ ripng_main.c $(libripng_a_SOURCES) -ripngd_LDADD = ../lib/libzebra.la @LIBCAP@ +ripngd_LDADD = ../lib/libfrr.la @LIBCAP@ examplesdir = $(exampledir) dist_examples_DATA = ripngd.conf.sample diff --git a/solaris/prototype.dev.in b/solaris/prototype.dev.in index dd3ae399ae..40d20515c3 100644 --- a/solaris/prototype.dev.in +++ b/solaris/prototype.dev.in @@ -1,12 +1,10 @@ i pkginfo=$abs_builddir/pkginfo.dev.full i depend=$abs_builddir/depend.dev i copying=$abs_top_srcdir/COPYING -f none @libdir@/libzebra.la=$DESTDIR/@libdir@/libzebra.la 0755 root bin -f none @libdir@/libzebra.a=$DESTDIR/@libdir@/libzebra.a 0644 root bin -f none @libdir@/libospf.la=$DESTDIR/@libdir@/libospf.la 0755 root bin -f none @libdir@/libospf.a=$DESTDIR/@libdir@/libospf.a 0644 root bin -f none @libdir@/libospfapiclient.la=$DESTDIR/@libdir@/libospfapiclient.la 0755 root bin -f none @libdir@/libospfapiclient.a=$DESTDIR/@libdir@/libospfapiclient.a 0644 root bin +f none @libdir@/libfrr.la=$DESTDIR/@libdir@/libfrr.la 0755 root bin +f none @libdir@/libfrr.a=$DESTDIR/@libdir@/libfrr.a 0644 root bin +f none @libdir@/libfrrospfapiclient.la=$DESTDIR/@libdir@/libfrrospfapiclient.la 0755 root bin +f none @libdir@/libfrrospfapiclient.a=$DESTDIR/@libdir@/libfrrospfapiclient.a 0644 root bin d none @includedir@=$DESTDIR/@includedir@ 0755 root bin d none @includedir@/frr=$DESTDIR/@includedir@/frr 0755 root bin d none @includedir@/frr/ospfd=$DESTDIR/@includedir@/frr/ospfd 0755 root bin diff --git a/solaris/prototype.libs.in b/solaris/prototype.libs.in index 71f4fd5cfc..bd8e3e4fe7 100644 --- a/solaris/prototype.libs.in +++ b/solaris/prototype.libs.in @@ -2,12 +2,9 @@ i pkginfo=$abs_builddir/pkginfo.libs.full i depend=$abs_builddir/depend.libs i copying=$abs_top_srcdir/COPYING d none @libdir@=$DESTDIR/@libdir@ 0755 root bin -s none @libdir@/libzebra.so.0=libzebra.so.0.0.0 -f none @libdir@/libzebra.so.0.0.0=$DESTDIR/@libdir@/libzebra.so.0.0.0 0755 root bin -s none @libdir@/libzebra.so=libzebra.so.0.0.0 -s none @libdir@/libospf.so.0=libospf.so.0.0.0 -f none @libdir@/libospf.so.0.0.0=$DESTDIR/@libdir@/libospf.so.0.0.0 0755 root bin -s none @libdir@/libospf.so=libospf.so.0.0.0 -f none @libdir@/libospfapiclient.so.0.0.0=$DESTDIR/@libdir@/libospfapiclient.so.0.0.0 0755 root bin -s none @libdir@/libospfapiclient.so.0=libospfapiclient.so.0.0.0 -s none @libdir@/libospfapiclient.so=libospfapiclient.so.0.0.0 +s none @libdir@/libfrr.so.0=libfrr.so.0.0.0 +f none @libdir@/libfrr.so.0.0.0=$DESTDIR/@libdir@/libfrr.so.0.0.0 0755 root bin +s none @libdir@/libfrr.so=libfrr.so.0.0.0 +f none @libdir@/libfrrospfapiclient.so.0.0.0=$DESTDIR/@libdir@/libfrrospfapiclient.so.0.0.0 0755 root bin +s none @libdir@/libfrrospfapiclient.so.0=libfrrospfapiclient.so.0.0.0 +s none @libdir@/libfrrospfapiclient.so=libfrrospfapiclient.so.0.0.0 diff --git a/tests/Makefile.am b/tests/Makefile.am index fe33bc5e57..bee9feaf1e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,14 +1,14 @@ AUTOMAKE_OPTIONS = dejagnu -DEJATOOL = libzebra +DEJATOOL = libfrr SUBDIRS = \ bgpd.tests \ - libzebra.tests + libfrr.tests EXTRA_DIST = \ config/unix.exp \ lib/bgpd.exp \ - lib/libzebra.exp \ + lib/libfrr.exp \ global-conf.exp \ testcommands.in \ testcommands.refout \ @@ -75,25 +75,25 @@ test_timer_correctness_SOURCES = test-timer-correctness.c prng.c test_timer_performance_SOURCES = test-timer-performance.c prng.c test_srcdest_table_SOURCES = test-srcdest-table.c prng.c -testcli_LDADD = ../lib/libzebra.la @LIBCAP@ -testsig_LDADD = ../lib/libzebra.la @LIBCAP@ -testsegv_LDADD = ../lib/libzebra.la @LIBCAP@ -testbuffer_LDADD = ../lib/libzebra.la @LIBCAP@ -testmemory_LDADD = ../lib/libzebra.la @LIBCAP@ -testprivs_LDADD = ../lib/libzebra.la @LIBCAP@ -teststream_LDADD = ../lib/libzebra.la @LIBCAP@ -heavy_LDADD = ../lib/libzebra.la @LIBCAP@ -lm -heavywq_LDADD = ../lib/libzebra.la @LIBCAP@ -lm -heavythread_LDADD = ../lib/libzebra.la @LIBCAP@ -lm -aspathtest_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ -lm -testbgpcap_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ -lm -ecommtest_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ -lm -testbgpmpattr_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ -lm -testchecksum_LDADD = ../lib/libzebra.la @LIBCAP@ -testbgpmpath_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ -lm -tabletest_LDADD = ../lib/libzebra.la @LIBCAP@ -lm -testnexthopiter_LDADD = ../lib/libzebra.la @LIBCAP@ -testcommands_LDADD = ../lib/libzebra.la @LIBCAP@ -test_timer_correctness_LDADD = ../lib/libzebra.la @LIBCAP@ -test_timer_performance_LDADD = ../lib/libzebra.la @LIBCAP@ -test_srcdest_table_LDADD = ../lib/libzebra.la @LIBCAP@ +testcli_LDADD = ../lib/libfrr.la @LIBCAP@ +testsig_LDADD = ../lib/libfrr.la @LIBCAP@ +testsegv_LDADD = ../lib/libfrr.la @LIBCAP@ +testbuffer_LDADD = ../lib/libfrr.la @LIBCAP@ +testmemory_LDADD = ../lib/libfrr.la @LIBCAP@ +testprivs_LDADD = ../lib/libfrr.la @LIBCAP@ +teststream_LDADD = ../lib/libfrr.la @LIBCAP@ +heavy_LDADD = ../lib/libfrr.la @LIBCAP@ -lm +heavywq_LDADD = ../lib/libfrr.la @LIBCAP@ -lm +heavythread_LDADD = ../lib/libfrr.la @LIBCAP@ -lm +aspathtest_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ -lm +testbgpcap_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ -lm +ecommtest_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ -lm +testbgpmpattr_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ -lm +testchecksum_LDADD = ../lib/libfrr.la @LIBCAP@ +testbgpmpath_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ -lm +tabletest_LDADD = ../lib/libfrr.la @LIBCAP@ -lm +testnexthopiter_LDADD = ../lib/libfrr.la @LIBCAP@ +testcommands_LDADD = ../lib/libfrr.la @LIBCAP@ +test_timer_correctness_LDADD = ../lib/libfrr.la @LIBCAP@ +test_timer_performance_LDADD = ../lib/libfrr.la @LIBCAP@ +test_srcdest_table_LDADD = ../lib/libfrr.la @LIBCAP@ diff --git a/tests/lib/libzebra.exp b/tests/lib/libfrr.exp similarity index 100% rename from tests/lib/libzebra.exp rename to tests/lib/libfrr.exp diff --git a/tests/libzebra.tests/Makefile.am b/tests/libfrr.tests/Makefile.am similarity index 100% rename from tests/libzebra.tests/Makefile.am rename to tests/libfrr.tests/Makefile.am diff --git a/tests/libzebra.tests/tabletest.exp b/tests/libfrr.tests/tabletest.exp similarity index 100% rename from tests/libzebra.tests/tabletest.exp rename to tests/libfrr.tests/tabletest.exp diff --git a/tests/libzebra.tests/test-timer-correctness.exp b/tests/libfrr.tests/test-timer-correctness.exp similarity index 100% rename from tests/libzebra.tests/test-timer-correctness.exp rename to tests/libfrr.tests/test-timer-correctness.exp diff --git a/tests/libzebra.tests/testcli.exp b/tests/libfrr.tests/testcli.exp similarity index 100% rename from tests/libzebra.tests/testcli.exp rename to tests/libfrr.tests/testcli.exp diff --git a/tests/libzebra.tests/testcommands.exp b/tests/libfrr.tests/testcommands.exp similarity index 100% rename from tests/libzebra.tests/testcommands.exp rename to tests/libfrr.tests/testcommands.exp diff --git a/tests/libzebra.tests/testnexthopiter.exp b/tests/libfrr.tests/testnexthopiter.exp similarity index 100% rename from tests/libzebra.tests/testnexthopiter.exp rename to tests/libfrr.tests/testnexthopiter.exp diff --git a/tests/libzebra.tests/teststream.exp b/tests/libfrr.tests/teststream.exp similarity index 100% rename from tests/libzebra.tests/teststream.exp rename to tests/libfrr.tests/teststream.exp diff --git a/tests/test-commands.c b/tests/test-commands.c index c86ffc5891..272e3d12b7 100644 --- a/tests/test-commands.c +++ b/tests/test-commands.c @@ -44,7 +44,7 @@ extern vector cmdvec; extern struct cmd_node vty_node; extern void test_init_cmd(void); /* provided in test-commands-defun.c */ -struct thread_master *master; /* dummy for libzebra*/ +struct thread_master *master; /* dummy for libfrr*/ static vector test_cmds; static char test_buf[32768]; diff --git a/tools/Makefile.am b/tools/Makefile.am index c5e8fe9c71..b2d56170c1 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -5,7 +5,7 @@ EXTRA_DIST = bin_PROGRAMS = permutations permutations_SOURCES = permutations.c -permutations_LDADD = ../lib/libzebra.la +permutations_LDADD = ../lib/libfrr.la sbin_SCRIPTS = frr-reload.py frr diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am index f689bae5cc..376f380a32 100644 --- a/vtysh/Makefile.am +++ b/vtysh/Makefile.am @@ -30,7 +30,7 @@ vtysh_SOURCES = vtysh_main.c vtysh.c vtysh_user.c vtysh_config.c nodist_vtysh_SOURCES = vtysh_cmd.c CLEANFILES = vtysh_cmd.c noinst_HEADERS = vtysh.h vtysh_user.h -vtysh_LDADD = ../lib/libzebra.la @LIBCAP@ @LIBREADLINE@ +vtysh_LDADD = ../lib/libfrr.la @LIBCAP@ @LIBREADLINE@ examplesdir = $(exampledir) dist_examples_DATA = vtysh.conf.sample diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h index 537f944a7a..39bf64f307 100644 --- a/vtysh/vtysh.h +++ b/vtysh/vtysh.h @@ -49,7 +49,7 @@ DECLARE_MGROUP(MVTYSH) /* vtysh local configuration file. */ #define VTYSH_DEFAULT_CONFIG "vtysh.conf" -#define QUAGGA_DEFAULT_CONFIG "Quagga.conf" +#define FRR_DEFAULT_CONFIG "Frr.conf" enum vtysh_write_integrated { WRITE_INTEGRATED_UNSPECIFIED, diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index 78b17be058..127cb70ad5 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -46,7 +46,7 @@ char *progname; /* Configuration file name and directory. */ static char vtysh_config_always[MAXPATHLEN] = SYSCONFDIR VTYSH_DEFAULT_CONFIG; -static char quagga_config_default[MAXPATHLEN] = SYSCONFDIR QUAGGA_DEFAULT_CONFIG; +static char quagga_config_default[MAXPATHLEN] = SYSCONFDIR FRR_DEFAULT_CONFIG; char *quagga_config = quagga_config_default; char history_file[MAXPATHLEN]; @@ -357,17 +357,17 @@ main (int argc, char **argv, char **env) /* * Overwrite location for Quagga.conf */ - vtysh_configfile_name = strrchr(QUAGGA_DEFAULT_CONFIG, '/'); + vtysh_configfile_name = strrchr(FRR_DEFAULT_CONFIG, '/'); if (vtysh_configfile_name) /* skip '/' */ vtysh_configfile_name++; else /* - * QUAGGA_DEFAULT_CONFIG configured with relative path + * FRR_DEFAULT_CONFIG configured with relative path * during config? Should really never happen for * sensible config */ - vtysh_configfile_name = (char *) QUAGGA_DEFAULT_CONFIG; + vtysh_configfile_name = (char *) FRR_DEFAULT_CONFIG; strlcpy(quagga_config_default, optarg, sizeof(vtysh_config_always)); strlcat(quagga_config_default, "/", sizeof(vtysh_config_always)); strlcat(quagga_config_default, vtysh_configfile_name, diff --git a/watchfrr/Makefile.am b/watchfrr/Makefile.am index 51851b0165..abe2266f20 100644 --- a/watchfrr/Makefile.am +++ b/watchfrr/Makefile.am @@ -10,4 +10,4 @@ sbin_PROGRAMS = watchfrr noinst_HEADERS = watchfrr.h watchfrr_SOURCES = watchfrr.c watchfrr_vty.c -watchfrr_LDADD = ../lib/libzebra.la @LIBCAP@ +watchfrr_LDADD = ../lib/libfrr.la @LIBCAP@ diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c index 122d6db6d7..f61dd3858b 100644 --- a/watchfrr/watchfrr.c +++ b/watchfrr/watchfrr.c @@ -62,7 +62,7 @@ #define PING_TOKEN "PING" -/* Needs to be global, referenced somewhere inside libzebra. */ +/* Needs to be global, referenced somewhere inside libfrr. */ struct thread_master *master; typedef enum { diff --git a/zebra/Makefile.am b/zebra/Makefile.am index 428090d488..1910e7b80f 100644 --- a/zebra/Makefile.am +++ b/zebra/Makefile.am @@ -62,9 +62,9 @@ noinst_HEADERS = \ zebra_ns.h zebra_vrf.h ioctl_solaris.h zebra_static.h zebra_mpls.h \ kernel_netlink.h if_netlink.h zebra_mroute.h -zebra_LDADD = $(otherobj) ../lib/libzebra.la $(LIBCAP) $(Q_FPM_PB_CLIENT_LDOPTS) +zebra_LDADD = $(otherobj) ../lib/libfrr.la $(LIBCAP) $(Q_FPM_PB_CLIENT_LDOPTS) -testzebra_LDADD = ../lib/libzebra.la $(LIBCAP) +testzebra_LDADD = ../lib/libfrr.la $(LIBCAP) zebra_DEPENDENCIES = $(otherobj) @@ -77,7 +77,7 @@ EXTRA_DIST = if_ioctl.c if_ioctl_solaris.c if_netlink.c \ zebra_mpls_netlink.c zebra_mpls_openbsd.c \ GNOME-SMI GNOME-PRODUCT-ZEBRA-MIB -client : client_main.o ../lib/libzebra.la +client : client_main.o ../lib/libfrr.la $(CC) -g -o client client_main.o ../liblzebra.la $(LIBS) $(LIB_IPV6) quaggaconfdir = $(sysconfdir) diff --git a/zebra/main.c b/zebra/main.c index a68e8adeb6..79c9ea7023 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -63,7 +63,7 @@ pid_t pid; /* VTY Socket prefix */ char vty_sock_path[MAXPATHLEN] = ZEBRA_VTYSH_PATH; -/* Pacify zclient.o in libzebra, which expects this variable. */ +/* Pacify zclient.o in libfrr, which expects this variable. */ struct thread_master *master; /* Route retain mode flag. */ diff --git a/zebra/test_main.c b/zebra/test_main.c index 8b4ead8bda..dea1df1697 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -56,7 +56,7 @@ int allow_delete = 0; /* zebra_rib's workqueue hold time. Private export for use by test code only */ extern int rib_process_hold_time; -/* Pacify zclient.o in libzebra, which expects this variable. */ +/* Pacify zclient.o in libfrr, which expects this variable. */ struct thread_master *master; /* Command line options. */