summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2010-02-02 21:49:35 +0100
committerGreg Troxel <gdt@ir.bbn.com>2010-04-29 02:15:44 +0200
commit745bf05f58ff203f5e3878574016fb3b9ad5b450 (patch)
tree0c1019a61726211f4ade8f7ff21c579c95e7063a /isisd
parentospf6d: Fix crash when '[no] ipv6 ospf6 advertise prefix-list' is in startup-... (diff)
downloadfrr-745bf05f58ff203f5e3878574016fb3b9ad5b450.tar.xz
frr-745bf05f58ff203f5e3878574016fb3b9ad5b450.zip
isisd: change ISIS_METHOD to use C preprocessor
this fixes warnings from vtysh extract.pl by making sure the isis method files always 'work'. (previously, extract.pl would grab unselected isis method sources and then complain about missing headers)
Diffstat (limited to 'isisd')
-rw-r--r--isisd/Makefile.am11
-rw-r--r--isisd/isis_bpf.c3
-rw-r--r--isisd/isis_dlpi.c3
-rw-r--r--isisd/isis_pfpacket.c3
4 files changed, 12 insertions, 8 deletions
diff --git a/isisd/Makefile.am b/isisd/Makefile.am
index 9c3033906..26b8ee7c1 100644
--- a/isisd/Makefile.am
+++ b/isisd/Makefile.am
@@ -13,8 +13,6 @@ noinst_LIBRARIES = libisis.a
sbin_PROGRAMS = isisd
SUBDIRS = topology
-isis_method = @ISIS_METHOD@
-
libisis_a_SOURCES = \
isis_adjacency.c isis_lsp.c dict.c isis_circuit.c isis_pdu.c \
isis_tlv.c isisd.c isis_misc.c isis_zebra.c isis_dr.c \
@@ -30,13 +28,10 @@ noinst_HEADERS = \
include-netbsd/clnp.h include-netbsd/esis.h include-netbsd/iso.h
isisd_SOURCES = \
- isis_main.c $(libisis_a_SOURCES)
-
-isisd_LDADD = $(isis_method) @ISIS_TOPOLOGY_LIB@ ../lib/libzebra.la @LIBCAP@
-
-isisd_DEPENDENCIES = $(isis_method)
+ isis_main.c $(libisis_a_SOURCES) \
+ isis_bpf.c isis_dlpi.c isis_pfpacket.c
-EXTRA_DIST = isis_bpf.c isis_dlpi.c isis_pfpacket.c
+isisd_LDADD = @ISIS_TOPOLOGY_LIB@ ../lib/libzebra.la @LIBCAP@
examplesdir = $(exampledir)
dist_examples_DATA = isisd.conf.sample
diff --git a/isisd/isis_bpf.c b/isisd/isis_bpf.c
index 8c3602db3..05f11386c 100644
--- a/isisd/isis_bpf.c
+++ b/isisd/isis_bpf.c
@@ -21,6 +21,7 @@
*/
#include <zebra.h>
+#if ISIS_METHOD == ISIS_METHOD_BPF
#include <net/if.h>
#include <netinet/if_ether.h>
#include <sys/time.h>
@@ -339,3 +340,5 @@ isis_send_pdu_p2p (struct isis_circuit *circuit, int level)
{
return ISIS_OK;
}
+
+#endif /* ISIS_METHOD == ISIS_METHOD_BPF */
diff --git a/isisd/isis_dlpi.c b/isisd/isis_dlpi.c
index 3cbe0b4fc..fe872a952 100644
--- a/isisd/isis_dlpi.c
+++ b/isisd/isis_dlpi.c
@@ -21,6 +21,7 @@
*/
#include <zebra.h>
+#if ISIS_METHOD == ISIS_METHOD_DLPI
#include <net/if.h>
#include <netinet/if_ether.h>
#include <sys/types.h>
@@ -622,3 +623,5 @@ isis_send_pdu_bcast (struct isis_circuit *circuit, int level)
sock_buff, stream_get_endp (circuit->snd_stream) + LLC_LEN, 0);
return ISIS_OK;
}
+
+#endif /* ISIS_METHOD == ISIS_METHOD_DLPI */
diff --git a/isisd/isis_pfpacket.c b/isisd/isis_pfpacket.c
index 8752dba5a..9e4165e35 100644
--- a/isisd/isis_pfpacket.c
+++ b/isisd/isis_pfpacket.c
@@ -21,6 +21,7 @@
*/
#include <zebra.h>
+#if ISIS_METHOD == ISIS_METHOD_PFPACKET
#include <net/ethernet.h> /* the L2 protocols */
#include <netpacket/packet.h>
@@ -371,3 +372,5 @@ isis_send_pdu_p2p (struct isis_circuit *circuit, int level)
return ISIS_OK;
}
+
+#endif /* ISIS_METHOD == ISIS_METHOD_PFPACKET */