Skip to content

Commit

Permalink
dnsjit - initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jelu committed Jan 26, 2018
1 parent 1fcf227 commit b5e4ffe
Show file tree
Hide file tree
Showing 68 changed files with 6,923 additions and 160 deletions.
6 changes: 6 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BasedOnStyle: webkit
IndentWidth: 4
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignOperands: true
SortIncludes: false
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,43 @@ modules.order
Module.symvers
Mkfile.old
dkms.conf

# Automake
Makefile.in
aclocal.m4
ar-lib
autom4te.cache
compile
config.guess
config.sub
configure
depcomp
install-sh
ltmain.sh
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
missing
config.h.in
config.h.in~
test-driver

# Configure
Makefile
config.log
config.status
libtool
.deps
src/config.h
src/stamp-h1
build

# Project specific files
src/dnsjit
src/dnsjit.1
src/test/test-suite.log
src/test/test*.sh.log
src/test/test*.sh.trs
src/test/*.dist
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "src/pcap-thread"]
path = src/pcap-thread
url = https://github.com/DNS-OARC/pcap-thread.git
[submodule "src/omg-dns"]
path = src/omg-dns
url = https://github.com/DNS-OARC/omg-dns.git
[submodule "src/sllq"]
path = src/sllq
url = https://github.com/DNS-OARC/sllq.git
[submodule "src/luajit"]
path = src/luajit
url = http://luajit.org/git/luajit-2.0.git
Empty file added CHANGES
Empty file.
829 changes: 669 additions & 160 deletions LICENSE

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (c) 2018, OARC, Inc.
# All rights reserved.
#
# This file is part of dnsjit.
#
# dnsjit is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# dnsjit is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with dnsjit. If not, see <http://www.gnu.org/licenses/>.

ACLOCAL_AMFLAGS = -I m4 -I src/pcap-thread/m4

MAINTAINERCLEANFILES = $(srcdir)/Makefile.in \
$(srcdir)/src/config.h.in~ \
$(srcdir)/configure

SUBDIRS = src

dist_doc_DATA = CHANGES README.md LICENSE

EXTRA_DIST = m4

test: check

luaclean:
$(MAKE) -C "$(srcdir)/luajit" clean
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
# dnsjit

DNS engine based around LuaJIT for capturing, parsing, replaying and statstics gathering

# Copyright

Copyright (c) 2018, OARC, Inc.

All rights reserved.

```
This file is part of dnsjit.
dnsjit is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
dnsjit is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with dnsjit. If not, see <http://www.gnu.org/licenses/>.
```
20 changes: 20 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh -e
# Copyright (c) 2018, OARC, Inc.
# All rights reserved.
#
# This file is part of dnsjit.
#
# dnsjit is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# dnsjit is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with dnsjit. If not, see <http://www.gnu.org/licenses/>.

autoreconf --force --install --no-recursive --include=m4 --include=src/pcap-thread/m4
51 changes: 51 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (c) 2018, OARC, Inc.
# All rights reserved.
#
# This file is part of dnsjit.
#
# dnsjit is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# dnsjit is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with dnsjit. If not, see <http://www.gnu.org/licenses/>.

AC_PREREQ(2.61)
AC_INIT([dnsjit], [0.9.0], [[email protected]], [dnsjit], [https://github.com/DNS-OARC/dnsjit/issues])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AC_CONFIG_SRCDIR([src/dnsjit.c])
AC_CONFIG_HEADER([src/config.h])
AC_CONFIG_MACRO_DIR([m4])

# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_CANONICAL_HOST
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
LT_INIT([disable-static])

# Checks for support.
AC_CHECK_LIB([dl], [dlopen])
AC_CHECK_LIB([m], [sqrt])
AX_PTHREAD
AX_PCAP_THREAD_PCAP
AC_CHECK_LIB([ev], [ev_now], [], AC_MSG_ERROR([libev not found]))
AC_CHECK_HEADER([ev.h], [AC_CHECK_HEADERS([ev.h])], [AC_CHECK_HEADER([libev/ev.h], [AC_CHECK_HEADERS([libev/ev.h])], [AC_MSG_ERROR([libev header not found])])])
AC_SEARCH_LIBS([clock_gettime],[rt])
AC_CHECK_FUNCS([clock_nanosleep nanosleep])

# Checks for sizes
AC_CHECK_SIZEOF(void*)

# Output Makefiles
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT
26 changes: 26 additions & 0 deletions fmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh
# Copyright (c) 2018, OARC, Inc.
# All rights reserved.
#
# This file is part of dnsjit.
#
# dnsjit is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# dnsjit is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with dnsjit. If not, see <http://www.gnu.org/licenses/>.

clang-format-4.0 \
-style=file \
-i \
src/*.c \
`find src/core src/input src/filter src/output -name '*.c'` \
`find src/core src/input src/filter src/output -name '*.h'` \
`find src/core src/input src/filter src/output -name '*.hh'`
Empty file added m4/.placeholder
Empty file.
Loading

0 comments on commit b5e4ffe

Please sign in to comment.