Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
jelu committed Jun 22, 2018
1 parent 1e47ebd commit 1d97df4
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 8 deletions.
13 changes: 11 additions & 2 deletions src/core/object/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,29 @@
#include <string.h>
#ifdef HAVE_ENDIAN_H
#include <endian.h>
#endif
#else
#ifdef HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif
#else
#ifdef HAVE_MACHINE_ENDIAN_H
#include <machine/endian.h>
#endif
#endif
#endif
#ifdef HAVE_BYTESWAP_H
#include <byteswap.h>
#endif
#ifndef bswap_16
#ifndef bswap16
#define bswap_16(x) swap16(x)
#define bswap_32(x) swap32(x)
#define bswap_64(x) swap64(x)
#else
#define bswap_16(x) bswap16(x)
#define bswap_32(x) bswap32(x)
#define bswap_64(x) bswap64(x)
#endif
#endif

#define _ERR_MALFORMED -2
#define _ERR_NEEDLABELS -3
Expand Down
13 changes: 11 additions & 2 deletions src/filter/layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,29 @@
#endif
#ifdef HAVE_ENDIAN_H
#include <endian.h>
#endif
#else
#ifdef HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif
#else
#ifdef HAVE_MACHINE_ENDIAN_H
#include <machine/endian.h>
#endif
#endif
#endif
#ifdef HAVE_BYTESWAP_H
#include <byteswap.h>
#endif
#ifndef bswap_16
#ifndef bswap16
#define bswap_16(x) swap16(x)
#define bswap_32(x) swap32(x)
#define bswap_64(x) swap64(x)
#else
#define bswap_16(x) bswap16(x)
#define bswap_32(x) bswap32(x)
#define bswap_64(x) bswap64(x)
#endif
#endif

#define N_IEEE802 3

Expand Down
13 changes: 11 additions & 2 deletions src/input/fpcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,29 @@
#include <stdio.h>
#ifdef HAVE_ENDIAN_H
#include <endian.h>
#endif
#else
#ifdef HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif
#else
#ifdef HAVE_MACHINE_ENDIAN_H
#include <machine/endian.h>
#endif
#endif
#endif
#ifdef HAVE_BYTESWAP_H
#include <byteswap.h>
#endif
#ifndef bswap_16
#ifndef bswap16
#define bswap_16(x) swap16(x)
#define bswap_32(x) swap32(x)
#define bswap_64(x) swap64(x)
#else
#define bswap_16(x) bswap16(x)
#define bswap_32(x) bswap32(x)
#define bswap_64(x) bswap64(x)
#endif
#endif

#define MAX_SNAPLEN 0x40000

Expand Down
13 changes: 11 additions & 2 deletions src/input/mmpcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,29 @@
#include <string.h>
#ifdef HAVE_ENDIAN_H
#include <endian.h>
#endif
#else
#ifdef HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif
#else
#ifdef HAVE_MACHINE_ENDIAN_H
#include <machine/endian.h>
#endif
#endif
#endif
#ifdef HAVE_BYTESWAP_H
#include <byteswap.h>
#endif
#ifndef bswap_16
#ifndef bswap16
#define bswap_16(x) swap16(x)
#define bswap_32(x) swap32(x)
#define bswap_64(x) swap64(x)
#else
#define bswap_16(x) bswap16(x)
#define bswap_32(x) bswap32(x)
#define bswap_64(x) bswap64(x)
#endif
#endif

static core_log_t _log = LOG_T_INIT("input.mmpcap");
static input_mmpcap_t _defaults = {
Expand Down

0 comments on commit 1d97df4

Please sign in to comment.