# # Makefile for meter, GNU autoconfig version # GF= @GFLAG@ PF= # Set GFLAG for source debug support ( -g) # Set PFLAG for profiling using gprof (-pg) #USE_OCX_BGP= -DNETFLOW=9 # Uncomment above line to build OCxMON ASN lookup into NeTraMet meter # NOTE: To run the meter you need a 'bgp.txt' file # (get one using SHOW IP BGP on a Cisco router running BGP) # You also need to set the environment variable DEFAULT_AS # e.g. setenv DEFAULT_AS 9431 # NETFLOW bits: # 1 = NF_ASN_ATT We have S/D ASN only # 2 = NF_OTHER_ATT We have nf_meterID and S/D Prefix # 4 = NF_CISCO_DATA Packet handler builds pkt from NetFlow record # 8 = NF_OCX_BGP Meter will get ASN by BGP lookup (OCxMON code) # CORAL bits: # 1 = CR_DATA Data is coming from a CoralReef source # Object modules built by default: # NeTraMet Unix RTFM meter # NetFlowMet RTFM meter using Cisco NetFlow data # NetFwd NetFlow forwarding utility (not a meter) # LfapMet RTFM Meter using Riverstone LFAP data # # Other specialised modules: # crl_ntm CoralReef RTFM meter (requires libpcap and CoralReef # (configured with Dag support)) # dd_ntm RTFM meter taking Dag input from dagsnap via /dev/dag* # dag_ntm RTFM meter taking Dag input from dagpppoe via Unix pipe # (usually stdin) SHELL= /bin/sh INSTALL=@INSTALL@ RM=rm -f SRC= @top_srcdir@/src/meter SINCLUDE= @top_srcdir@/src/snmplib MINCLUDE= @top_srcdir@/src/meter TINCLUDE= @top_srcdir@/src/meter/tcpdump NTCONF= @top_srcdir@/ntm_conf.h CRI_DIR= ../../../Coral/include CRL_DIR= ../../../Coral/lib # Assumes Coral installed in ~/ (rather than in /usr/local) DAGI_DIR= /usr/local/dag/include #DAGI_DIR= /home/nevil/dag-2.2.1s/include # dag.h required to compiler dag_reset() PCAP_LIB= # Blank means "use libpcap.a in . or in system libraries" #PCAP_LIB= -L/home/nevil/lib SNMPH = $(SINCLUDE)/ausnmp.h \ $(SINCLUDE)/asn1.h $(SINCLUDE)/mib.h $(SINCLUDE)/parse.h \ $(SINCLUDE)/snmp.h $(SINCLUDE)/snmpapi.h \ $(SINCLUDE)/snmpclnt.h $(SINCLUDE)/snmpimpl.h METERH = $(MINCLUDE)/flowhash.h $(MINCLUDE)/met_vars.h \ $(MINCLUDE)/decnet.h $(MINCLUDE)/pktsnap.h \ $(MINCLUDE)/flowdata.h $(MINCLUDE)/lfapmet.h PKTH = $(TINCLUDE)/pcap.h $(TINCLUDE)/pcap-int.h \ $(TINCLUDE)/llc.h $(TINCLUDE)/fddi.h CORALH= $(CRI_DIR)/libcoral.h DAGH= $(DAGI_DIR)/dag.h NO_PCAP_PROGS= NetFlowMet LfapMet NetFwd PCAP_PROGS= NeTraMet TARG = @METER_TARGET@ NTMLIBS= @top_srcdir@/src/snmplib/libsnmp.a \ @top_srcdir@/src/bgp/libbgp.a LIBS= -L@top_srcdir@/src/snmplib -lsnmp \ -L@top_srcdir@/src/bgp -lbgp \ @LIBS@ PCAP_LIBS= $(PCAP_LIB) @PCAP@ CFLAGS= $(GF) $(PF) -I$(SINCLUDE) -I$(MINCLUDE) -I$(TINCLUDE) -I@top_srcdir@ \ -DNETRAMET -D@OS@ @DEFS@ CC= @CC@ prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ sbindir=@sbindir@ libexecdir=@libexecdir@ all: $(TARG) meter_ux.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/meter_ux.c ${CC} $(CFLAGS) $(USE_OCX_BGP) -c $(SRC)/meter_ux.c flowhash.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/flowhash.c ${CC} $(CFLAGS) $(USE_OCX_BGP) -c $(SRC)/flowhash.c met_vars.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/met_vars.c ${CC} $(CFLAGS) $(USE_OCX_BGP) -c $(SRC)/met_vars.c NeTraMet: flowhash.o met_vars.o meter_ux.o ${NTMLIBS} ${CC} -o $@ ${PF} meter_ux.o flowhash.o met_vars.o ${LIBS} ${PCAP_LIBS} meter_nf.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/meter_ux.c ${CC} -o $@ $(CFLAGS) -DNETFLOW=7 -c $(SRC)/meter_ux.c flowhash_nf.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/flowhash.c ${CC} -o $@ $(CFLAGS) -DNETFLOW=7 -c $(SRC)/flowhash.c met_vars_nf.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/met_vars.c ${CC} -o $@ $(CFLAGS) -DNETFLOW=7 -c $(SRC)/met_vars.c NetFlowMet: flowhash_nf.o met_vars_nf.o meter_nf.o ${NTMLIBS} ${CC} -o $@ ${PF} meter_nf.o flowhash_nf.o met_vars_nf.o ${LIBS} meter_lfap.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/meter_ux.c $(SRC)/lfapmet.c ${CC} -o $@ $(CFLAGS) -DLFAP_METER -c $(SRC)/meter_ux.c flowhash_lfap.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/flowhash.c ${CC} -o $@ $(CFLAGS) -DLFAP_METER -c $(SRC)/flowhash.c met_vars_lfap.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/met_vars.c ${CC} -o $@ $(CFLAGS) -DLFAP_METER -c $(SRC)/met_vars.c LfapMet: flowhash_lfap.o met_vars_lfap.o meter_lfap.o ${NTMLIBS} ${CC} -o $@ ${PF} meter_lfap.o flowhash_lfap.o met_vars_lfap.o ${LIBS} meter_cr.o: $(NTCONF) $(SNMPH) $(METERH) $(CORALH) $(SRC)/meter_ux.c ${CC} -o $@ $(CFLAGS) -I$(CRI_DIR) -DCORAL=1 -c $(SRC)/meter_ux.c flowhash_cr.o: $(NTCONF) $(SNMPH) $(METERH) $(CORALH) $(SRC)/flowhash.c ${CC} -o $@ $(CFLAGS) -I$(CRI_DIR) -DCORAL=1 -c $(SRC)/flowhash.c met_vars_cr.o: $(NTCONF) $(SNMPH) $(METERH) $(CORALH) $(SRC)/met_vars.c ${CC} -o $@ $(CFLAGS) -I$(CRI_DIR) -DCORAL=1 -c $(SRC)/met_vars.c crl_ntm: flowhash_cr.o met_vars_cr.o meter_cr.o ${NTMLIBS} ${CC} -o $@ $(PF) -L/usr/lib -L$(CRL_DIR) meter_cr.o flowhash_cr.o met_vars_cr.o -lcoral -lz ${LIBS} ${PCAP_LIBS} meter_dd.o: $(NTCONF) $(SNMPH) $(METERH) $(DAGH) $(SRC)/meter_ux.c ${CC} -o $@ $(CFLAGS) -I$(DAGI_DIR) -DDAG_DIRECT -c $(SRC)/meter_ux.c flowhash_dd.o: $(NTCONF) $(SNMPH) $(METERH) $(DAGH) $(SRC)/flowhash.c ${CC} -o $@ $(CFLAGS) -I$(DAGI_DIR) -DDAG_DIRECT -c $(SRC)/flowhash.c met_vars_dd.o: $(NTCONF) $(SNMPH) $(METERH) $(DAGH) $(SRC)/met_vars.c ${CC} -o $@ $(CFLAGS) -I$(DAGI_DIR) -DDAG_DIRECT -c $(SRC)/met_vars.c dd_ntm: flowhash_dd.o met_vars_dd.o meter_dd.o ${NTMLIBS} ${CC} -o $@ ${PF} meter_dd.o flowhash_dd.o met_vars_dd.o ${LIBS} meter_dag.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/meter_ux.c ${CC} -o $@ $(CFLAGS) -DDAG=3 -c $(SRC)/meter_ux.c flowhash_dag.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/flowhash.c ${CC} -o $@ $(CFLAGS) -DDAG=3 -c $(SRC)/flowhash.c met_vars_dag.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/met_vars.c ${CC} -o $@ $(CFLAGS) -DDAG=3 -c $(SRC)/met_vars.c dag_ntm: flowhash_dag.o met_vars_dag.o meter_dag.o ${NTMLIBS} ${CC} -o $@ ${PF} meter_dag.o flowhash_dag.o met_vars_dag.o ${LIBS} nf_fwd.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/nf_fwd.c ${CC} $(CFLAGS) -c $(SRC)/nf_fwd.c NetFwd: nf_fwd.o ${CC} -o $@ nf_fwd.o ${LIBS} pk_trace.o: $(NTCONF) $(SRC)/pk_trace.c ${CC} $(CFLAGS) -c $(SRC)/pk_trace.c ptrace: pk_trace.o ${CC} -o $@ pk_trace.o ${LIBS} asn_test.o: $(NTCONF) $(SNMPH) $(SRC)/asn_test.c $(CC) $(CFLAGS) -c $(SRC)/asn_test.c asn_test: asn_test.o $(SNMPLIB) $(CC) -o $@ asn_test.o $(SNMPLIB) if_list.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/if_list.c # Cygwin/WinDump ${CC} $(CFLAGS) -c $(SRC)/if_list.c if_list: if_list.o ${CC} -o $@ if_list.o ${LIBS} ${PCAP_LIBS} look_tst.o: $(NTCONF) $(SNMPH) $(METERH) $(SRC)/look_tst.c # Cygwin/WinDump ${CC} $(CFLAGS) -c $(SRC)/look_tst.c look_tst: look_tst.o ${CC} -o $@ look_tst.o ${LIBS} ${PCAP_LIBS} clean: $(RM) *.o ${TARG} *.exe *~ *.bak *core distclean: clean $(RM) Makefile \#* install: @($(INSTALL) -d $(bindir)) @(for i in $(TARG); do \ echo "Installing $$i";\ $(INSTALL) $$i $(bindir); \ done) # $Log: Makefile.in,v $ # Revision 1.1.1.2.2.10 2002/02/23 01:57:26 nevil # Moving srl examples to examples/ directory. Modified examples/Makefile.in # # Revision 1.1.1.2.2.6 2000/08/08 19:44:49 nevil # 44b8 release # # Revision 1.1.1.2.2.4 2000/06/06 03:38:16 nevil # Combine NEW_ATR with TCP_ATR, various bug fixes # # Revision 1.1.1.2.2.1 2000/01/12 02:57:07 nevil # Implement 'packet pair matched' turnaroundtime distribution attributes. # Fix ASN-related bugs in NeTraMet, distribution-related bugs in fd_filter. # # Revision 1.1.1.2 1999/10/03 21:06:21 nevil # *** empty log message *** # # Revision 1.1.1.1.2.7 1999/09/29 22:29:13 nevil # Changes (mainly changing // to /* comments) for Irix # # Revision 1.1.1.1.2.6 1999/09/29 02:42:46 nevil # Fix problems discovered on PC meters # - Use NETRAMET compile-time variable to leave out C++ declarations # - Clean up mistakes in porting OCX_BGP code from meter_pc to meter_oc # # Revision 1.1.1.1.2.5 1999/05/26 02:41:37 nevil # Integrate V6 and ASN code into PC versions of the meter. # This required a rework of the makefiles, using @cflags.opt files # to provide a much longer command line to the Borland C compiler. # # Revision 1.1.1.1.2.4 1999/02/16 03:42:17 nevil # *** empty log message *** # # Revision 1.1.1.1.2.3 1999/02/16 00:10:52 nevil # Make sure globals are declared when TCP_ATR=0 # # Revision 1.1.1.1.2.2 1999/02/15 21:24:06 nevil # Distribution file for 4.3b9 # # Revision 1.1.1.1.2.1 1998/11/25 03:30:10 nevil # Fix endian problems in NetFlowMet # # Revision 1.1.1.1 1998/11/16 03:57:28 nevil # Import of NeTraMet 4.3b3 # # Revision 1.1.1.1 1998/11/16 03:22:01 nevil # Import of release 4.3b3 # # Revision 1.1.1.1 1998/10/28 20:31:26 nevil # Import of NeTraMet 4.3b1 # # Revision 1.1.3.1.2.3 1998/10/27 04:39:16 nevil # 4.3b1 release # # Revision 1.1.3.1.2.2 1998/10/22 20:47:24 nevil # Incorporate snmp and apps bug fixes. # # Revision 1.1.3.1.2.1 1998/10/19 22:32:42 nevil # Meter improvements, mostly arising from developments for the # OCxMON meter. These are documented in notes_oc.txt # # Revision 1.1.3.1 1998/10/13 02:48:46 nevil # Import of Nicolai's 4.2.2 # # Revision 1.2 1998/10/08 17:01:52 nguba # Make distclean did not remove the Makefiles. Fixed. # # Revision 1.1 1998/10/08 16:44:09 nguba # apps, meter, manager and snmplib directories abolished! Now all the # Makefiles, object code and binaries are in their source directories. # # Revision 1.3 1998/10/07 09:28:47 nguba # Distclean now cleans log and flow files too # # Revision 1.2 1998/10/05 14:21:03 nguba # Changed simple install mechanism from cp [file] ../bin into full blown # BSD type install using the BSD install program. #