summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in16
-rw-r--r--aclocal.m440
-rwxr-xr-xconfigure41
-rw-r--r--configure.ac9
-rw-r--r--include/dhcpv6.h8
-rw-r--r--include/icmpv6.h8
-rw-r--r--include/ip.h13
-rw-r--r--include/ipv6.h8
l---------m4/libtool.m41
l---------m4/ltoptions.m41
l---------m4/ltsugar.m41
l---------m4/ltversion.m41
l---------m4/lt~obsolete.m41
15 files changed, 138 insertions, 14 deletions
diff --git a/CHANGES b/CHANGES
index 3416ea1..cab73c3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-v0.3 - Mon Jan 28 16:20:24 ART 2013
+v0.3 - Thu Jan 31 16:47:27 ART 2013
- Added IPv6, ICMPv6 and DHCPv6 classes.
diff --git a/Makefile.am b/Makefile.am
index b452ef2..d88fba9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
AUTOMAKE_OPTIONS=subdir-objects
-ACLOCAL_AMFLAGS=${ACLOCAL_FLAGS}
+ACLOCAL_AMFLAGS=${ACLOCAL_FLAGS} -I m4
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
diff --git a/Makefile.in b/Makefile.in
index 076c342..9d6b196 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -37,10 +37,11 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
-DIST_COMMON = $(am__configure_deps) $(libtins_include_HEADERS) \
+DIST_COMMON = README $(am__configure_deps) $(libtins_include_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/libtins.pc.in $(top_srcdir)/configure AUTHORS TODO \
- config.guess config.sub depcomp install-sh ltmain.sh missing
+ $(srcdir)/libtins.pc.in $(top_srcdir)/configure AUTHORS THANKS \
+ TODO config.guess config.sub depcomp install-sh ltmain.sh \
+ missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -173,6 +174,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
@@ -250,7 +252,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = subdir-objects
-ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
+ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
@@ -345,7 +347,7 @@ all: all-am
.SUFFIXES: .cpp .lo .o .obj
am--refresh: Makefile
@:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -372,9 +374,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
-$(top_srcdir)/configure: $(am__configure_deps)
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
libtins.pc: $(top_builddir)/config.status $(srcdir)/libtins.pc.in
diff --git a/aclocal.m4 b/aclocal.m4
index a8e16e4..044862c 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -9206,6 +9206,46 @@ fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
diff --git a/configure b/configure
index 64e4142..6f3dcf2 100755
--- a/configure
+++ b/configure
@@ -624,6 +624,9 @@ CXXDEPMODE
ac_ct_CXX
CXXFLAGS
CXX
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
CPP
OTOOL64
OTOOL
@@ -743,6 +746,7 @@ enable_dependency_tracking
with_gnu_ld
with_sysroot
enable_libtool_lock
+enable_maintainer_mode
enable_c__11
with_pcap_include_path
with_pcap_lib_path
@@ -1387,6 +1391,8 @@ Optional Features:
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--disable-libtool-lock avoid locking (might break parallel builds)
+ --disable-maintainer-mode disable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
--enable-c++11 enable C++11 features
Optional Packages:
@@ -11402,6 +11408,30 @@ CC="$lt_save_CC"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=yes
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -15012,9 +15042,9 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -n "$debug"
then
- CXXFLAGS="-DTINS_DEBUG -g"
+ CXXFLAGS="$CXXFLAGS -DTINS_DEBUG -g"
else
- CXXFLAGS="-O3"
+ CXXFLAGS="$CXXFLAGS -O3"
fi
CXXFLAGS="$CXXFLAGS -Iinclude"
@@ -15092,6 +15122,7 @@ else
fi
+old_cppflags=$CPPFLAGS
CPPFLAGS=""
# Headers
@@ -15113,6 +15144,8 @@ fi
done
+CPPFLAGS=$old_cppflags
+
# Substitute options
@@ -15283,6 +15316,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/configure.ac b/configure.ac
index 759aeed..364f818 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,8 @@
AC_INIT([libtins], [0.3], [matias.fontanini@gmail.com], [libtins], [http://libtins.sourceforge.net])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
LT_INIT([disable-static])
+AC_CONFIG_MACRO_DIR([m4])
+AM_MAINTAINER_MODE([enable])
AC_PROG_CXX
AC_LANG(C++)
@@ -9,9 +11,9 @@ AC_PROG_LIBTOOL
if test -n "$debug"
then
- CXXFLAGS="-DTINS_DEBUG -g"
+ CXXFLAGS="$CXXFLAGS -DTINS_DEBUG -g"
else
- CXXFLAGS="-O3"
+ CXXFLAGS="$CXXFLAGS -O3"
fi
CXXFLAGS="$CXXFLAGS -Iinclude"
@@ -37,6 +39,7 @@ AC_ARG_WITH([pcap-lib-path],
AC_CHECK_LIB(pcap, pcap_loop, [], [AC_MSG_ERROR([pcap library is missing!])])
+old_cppflags=$CPPFLAGS
CPPFLAGS=""
# Headers
@@ -44,6 +47,8 @@ CPPFLAGS=""
LIBTINS_INCLUDE_DIR="include"
AC_CHECK_HEADERS([pcap.h], [], [AC_MSG_ERROR([libpcap headers are missing!])])
+CPPFLAGS=$old_cppflags
+
# Substitute options
AC_SUBST(CXXFLAGS)
diff --git a/include/dhcpv6.h b/include/dhcpv6.h
index 0997bf1..fe80ca0 100644
--- a/include/dhcpv6.h
+++ b/include/dhcpv6.h
@@ -504,6 +504,14 @@ public:
* \return The stored link address field.
*/
const ipaddress_type &link_address() const { return link_addr; }
+
+ /**
+ * \brief Getter for the DHCPv6 options.
+ *
+ * \return The stored options.
+ */
+ const options_type &options() const { return options_; }
+ ;
// Setters
/**
diff --git a/include/icmpv6.h b/include/icmpv6.h
index f171329..f262cd4 100644
--- a/include/icmpv6.h
+++ b/include/icmpv6.h
@@ -583,6 +583,14 @@ public:
return _dest_address;
}
+ /**
+ * \brief Getter for the ICMPv6 options.
+ * \return The stored options.
+ */
+ const options_type &options() const {
+ return _options;
+ }
+
// Setters
/**
diff --git a/include/ip.h b/include/ip.h
index 93ad541..688f892 100644
--- a/include/ip.h
+++ b/include/ip.h
@@ -215,6 +215,11 @@ namespace Tins {
typedef generic_route_option_type record_route_type;
/**
+ * The type used to store IP options.
+ */
+ typedef std::list<ip_option> options_type;
+
+ /**
* \brief Constructor for building the IP PDU.
*
* Both the destination and source IP address can be supplied.
@@ -318,6 +323,12 @@ namespace Tins {
*/
small_uint<4> version() const { return _ip.version; }
+ /**
+ * \brief Getter for the IP options.
+ * \return The stored options.
+ */
+ const options_type &options() const { return _ip_options; }
+
/* Setters */
/**
@@ -616,7 +627,7 @@ namespace Tins {
generic_route_option_type search_route_option(option_identifier id) const;
iphdr _ip;
- std::list<ip_option> _ip_options;
+ options_type _ip_options;
uint32_t _options_size, _padded_options_size;
};
}
diff --git a/include/ipv6.h b/include/ipv6.h
index e4bcc83..9aab25c 100644
--- a/include/ipv6.h
+++ b/include/ipv6.h
@@ -192,6 +192,14 @@ public:
return _header.dst_addr;
}
+ /**
+ * \brief Getter for the IPv6 extension headers.
+ * \return The stored headers.
+ */
+ const headers_type& headers() const {
+ return ext_headers;
+ }
+
// Setters
/**
diff --git a/m4/libtool.m4 b/m4/libtool.m4
new file mode 120000
index 0000000..f3504e9
--- /dev/null
+++ b/m4/libtool.m4
@@ -0,0 +1 @@
+/usr/share/aclocal/libtool.m4 \ No newline at end of file
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
new file mode 120000
index 0000000..b81279e
--- /dev/null
+++ b/m4/ltoptions.m4
@@ -0,0 +1 @@
+/usr/share/aclocal/ltoptions.m4 \ No newline at end of file
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
new file mode 120000
index 0000000..4d76cc7
--- /dev/null
+++ b/m4/ltsugar.m4
@@ -0,0 +1 @@
+/usr/share/aclocal/ltsugar.m4 \ No newline at end of file
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
new file mode 120000
index 0000000..5eb474f
--- /dev/null
+++ b/m4/ltversion.m4
@@ -0,0 +1 @@
+/usr/share/aclocal/ltversion.m4 \ No newline at end of file
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
new file mode 120000
index 0000000..de0b9f9
--- /dev/null
+++ b/m4/lt~obsolete.m4
@@ -0,0 +1 @@
+/usr/share/aclocal/lt~obsolete.m4 \ No newline at end of file