Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: C/C++ CI

on:
push:
branches: '*'
pull_request:
branches: '*'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install build-essential autoconf libtool libpcap-dev pkg-config

- name: autoreconf
run: autoreconf -i
- name: configure
run: ./configure
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck
138 changes: 138 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
if HAVE_NDP
SUBDIRS=nfbCInterface
else
SUBDIRS=
endif

SUBDIRS+=. tests
bin_PROGRAMS=ipfixprobe

if HAVE_NDP
AM_LDFLAGS=${srcdir}/nfbCInterface/libndpRI.la
ipfixprobe_ldflags=-lnuma -lnfb -lndpRI
else
ipfixprobe_ldflags=-lpcap
endif

ipfixprobe_CXXFLAGS=-std=c++98 -Wno-write-strings -I./nfbCInterface/include/


ipfixprobe_src=main.cpp \
ipfixprobe.h \
packet.h \
packetreceiver.h \
pcapreader.h \
flowexporter.h \
flowifc.h \
flowcache.h \
pcapreader.cpp \
nhtflowcache.cpp \
nhtflowcache.h \
stats.cpp \
stats.h \
flowcacheplugin.h \
httpplugin.cpp \
httpplugin.h \
rtspplugin.cpp \
rtspplugin.h \
sipplugin.cpp \
sipplugin.h \
httpsplugin.cpp \
httpsplugin.h \
smtpplugin.cpp \
smtpplugin.h \
dnsplugin.cpp \
dnsplugin.h \
passivednsplugin.cpp \
passivednsplugin.h \
ntpplugin.cpp \
ntpplugin.h \
ipaddr.h \
arpplugin.cpp \
arpplugin.h \
ipfixexporter.cpp \
ipfix-elements.h \
ipfixexporter.h \
xxhash.c \
xxhash.h \
dns.h \
conversion.h \
conversion.cpp \
pstatsplugin.h \
pstatsplugin.cpp \
ovpnplugin.h \
ovpnplugin.cpp \
byte-utils.h \
ssdpplugin.h \
ssdpplugin.cpp \
dnssdplugin.h \
dnssdplugin.cpp


if WITH_NEMEA
ipfixprobe_SOURCES=$(ipfixprobe_src) \
fields.c \
fields.h \
unirecexporter.h \
unirecexporter.cpp
else
ipfixprobe_SOURCES=$(ipfixprobe_src)
endif

pkgdocdir=${docdir}/ipfixprobe
pkgdoc_DATA=README.md
EXTRA_DIST=README.md \
traffic-samples/README.md \
traffic-samples/arp-sample.pcap \
traffic-samples/mixed-sample.pcap \
traffic-samples/dns-sample.pcap \
traffic-samples/dnssd-sample.pcap \
traffic-samples/http-sample.pcap \
traffic-samples/rtsp-sample.pcap \
traffic-samples/https-sample.pcap \
traffic-samples/ntp-sample.pcap \
traffic-samples/sip-sample.pcap \
traffic-samples/ssdp-sample.pcap \
traffic-samples/smtp-sample.pcap \
traffic-samples/ovpn-sample.pcap

bashcompl_DATA=ipfixprobe.bash


RPMDIR = RPMBUILD

if MAKE_RPMS
RPMFILENAME=$(PACKAGE_NAME)-$(VERSION)

.PHONY: srpm
srpm:
rm -rf "$(RPMDIR)/SOURCES/$(RPMFILENAME)"
mkdir -p $(RPMDIR)/BUILD/ $(RPMDIR)/SRPMS/ $(RPMDIR)/RPMS/ $(RPMDIR)/SOURCES
make ${AM_MAKEFLAGS} distdir='$(RPMDIR)/SOURCES/$(RPMFILENAME)' distdir
( cd "$(RPMDIR)/SOURCES/"; tar -z -c -f $(RPMFILENAME)-$(RELEASE).tar.gz $(RPMFILENAME); rm -rf $(RPMFILENAME); )
$(RPMBUILD) -bs $(PACKAGE_NAME).spec --define "_topdir `pwd`/$(RPMDIR)";

.PHONY: rpm
rpm: srpm
$(RPMBUILD) --define "_topdir `pwd`/$(RPMDIR)" --rebuild $(RPMDIR)/SRPMS/$(RPMFILENAME)-$(RELEASE).src.rpm;

.PHONY: rpm-nemea
rpm-nemea: srpm
$(RPMBUILD) --define "_topdir `pwd`/$(RPMDIR)" --rebuild $(RPMDIR)/SRPMS/$(RPMFILENAME)-$(RELEASE).src.rpm --with nemea;

.PHONY: rpm-ndp
rpm-ndp: srpm
$(RPMBUILD) --define "_topdir `pwd`/$(RPMDIR)" --rebuild $(RPMDIR)/SRPMS/$(RPMFILENAME)-$(RELEASE).src.rpm --with ndp;
else
endif

rpm-clean:
rm -rf $(RPMDIR)

if WITH_NEMEA
include ./aminclude.am
else
fields.h fields.c:
touch $@
endif

Loading