Skip to content

Commit

Permalink
add ipfix.c to support exporting IPFIX formated flow records.
Browse files Browse the repository at this point in the history
  • Loading branch information
irino committed Dec 10, 2012
1 parent bd8e31e commit 417e018
Show file tree
Hide file tree
Showing 6 changed files with 496 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CFLAGS+=-DEXPIRY_RB # Use red-black tree for expiry events
TARGETS=softflowd${EXEEXT} softflowctl${EXEEXT}

COMMON=convtime.o strlcpy.o strlcat.o closefrom.o daemon.o
SOFTFLOWD=softflowd.o log.o netflow1.o netflow5.o netflow9.o freelist.o
SOFTFLOWD=softflowd.o log.o netflow1.o netflow5.o netflow9.o ipfix.o freelist.o

all: $(TARGETS)

Expand Down
6 changes: 6 additions & 0 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
#include <inttypes.h>
#endif

#if defined(HAVE_SYS_ENDIAN_H)
#include <sys/endian.h>
#elif defined(HAVE_ENDIAN_H)
#include <endian.h>
#endif

/* The name of the program */
#define PROGNAME "softflowd"

Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ AC_ARG_WITH(chrootdir,
[ AC_DEFINE_UNQUOTED([PRIVDROP_CHROOT_DIR], ["${withval}"], [privdrop chroot directory]) ]
)

AC_CHECK_HEADERS(net/bpf.h pcap.h pcap-bpf.h)
AC_CHECK_HEADERS(net/bpf.h pcap.h pcap-bpf.h sys/endian.h endian.h)

dnl AC_CHECK_HEADERS(netinet/in_systm.h netinet/tcp.h netinet/udp.h)
dnl
Expand Down Expand Up @@ -87,7 +87,7 @@ AC_SEARCH_LIBS(gethostbyname, nsl)
AC_SEARCH_LIBS(socket, socket)
AC_CHECK_LIB(pcap, pcap_open_live)

AC_CHECK_FUNCS(closefrom daemon setresuid setreuid setresgid setgid strlcpy strlcat strsep)
AC_CHECK_FUNCS(closefrom daemon setresuid setreuid setresgid setgid strlcpy strlcat strsep htobe64 htonll)

AC_CHECK_TYPES([u_int64_t, int64_t, uint64_t, u_int32_t, int32_t, uint32_t])
AC_CHECK_TYPES([u_int16_t, int16_t, uint16_t, u_int8_t, int8_t, uint8_t])
Expand Down
Loading

0 comments on commit 417e018

Please sign in to comment.