[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/lib/libnl/libnl-3.2.25/src/Makefile.am b/ap/lib/libnl/libnl-3.2.25/src/Makefile.am
new file mode 100644
index 0000000..f8ac4ca
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/Makefile.am
@@ -0,0 +1,106 @@
+# -*- Makefile -*-
+
+SUBDIRS = lib
+
+AM_CPPFLAGS = -I${top_srcdir}/include -I${top_builddir}/include -D_GNU_SOURCE -DSYSCONFDIR=\"$(sysconfdir)/libnl\"
+AM_CFLAGS = -Wall
+
+LDADD = \
+ ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+
+sbin_PROGRAMS = \
+ genl-ctrl-list \
+ nl-qdisc-add nl-qdisc-list nl-qdisc-delete \
+ nl-class-add nl-class-list nl-class-delete \
+ nl-cls-add nl-cls-list nl-cls-delete \
+ nl-classid-lookup \
+ nl-pktloc-lookup \
+ nl-link-list
+
+noinst_PROGRAMS = \
+ nf-ct-list nf-ct-add nf-log nf-queue nf-monitor \
+ nf-exp-list nf-exp-add nf-exp-delete \
+ nl-addr-add nl-addr-delete nl-addr-list \
+ nl-link-set nl-link-stats \
+ nl-link-ifindex2name nl-link-name2ifindex \
+ nl-neigh-add nl-neigh-delete nl-neigh-list \
+ nl-rule-list \
+ nl-neightbl-list \
+ nl-monitor \
+ nl-tctree-list \
+ nl-route-add nl-route-delete nl-route-get nl-route-list \
+ nl-fib-lookup \
+ nl-list-caches nl-list-sockets \
+ nl-util-addr \
+ nl-link-enslave \
+ nl-link-release \
+ idiag-socket-details
+
+genl_ctrl_list_SOURCES = genl-ctrl-list.c
+
+nf_ct_list_SOURCES = nf-ct-list.c
+nf_ct_add_SOURCES = nf-ct-add.c
+nf_log_SOURCES = nf-log.c
+nf_queue_SOURCES = nf-queue.c
+nf_monitor_SOURCES = nf-monitor.c
+
+nf_exp_list_SOURCES = nf-exp-list.c
+nf_exp_add_SOURCES = nf-exp-add.c
+nf_exp_delete_SOURCES = nf-exp-delete.c
+
+nl_addr_add_SOURCES = nl-addr-add.c
+nl_addr_delete_SOURCES = nl-addr-delete.c
+nl_addr_list_SOURCES = nl-addr-list.c
+
+nl_link_list_SOURCES = nl-link-list.c
+nl_link_set_SOURCES = nl-link-set.c
+nl_link_stats_SOURCES = nl-link-stats.c
+nl_link_ifindex2name_SOURCES = nl-link-ifindex2name.c
+nl_link_name2ifindex_SOURCES = nl-link-name2ifindex.c
+
+nl_monitor_SOURCES = nl-monitor.c
+
+nl_neigh_add_SOURCES = nl-neigh-add.c
+nl_neigh_delete_SOURCES = nl-neigh-delete.c
+nl_neigh_list_SOURCES = nl-neigh-list.c
+
+nl_neightbl_list_SOURCES = nl-neightbl-list.c
+
+nl_qdisc_add_SOURCES = nl-qdisc-add.c
+nl_qdisc_delete_SOURCES = nl-qdisc-delete.c
+nl_qdisc_list_SOURCES = nl-qdisc-list.c
+
+nl_class_add_SOURCES = nl-class-add.c
+nl_class_delete_SOURCES = nl-class-delete.c
+nl_class_list_SOURCES = nl-class-list.c
+
+nl_cls_add_SOURCES = nl-cls-add.c
+nl_cls_list_SOURCES = nl-cls-list.c
+nl_cls_delete_SOURCES = nl-cls-delete.c
+
+nl_route_add_SOURCES = nl-route-add.c
+nl_route_delete_SOURCES = nl-route-delete.c
+nl_route_get_SOURCES = nl-route-get.c
+nl_route_list_SOURCES = nl-route-list.c
+
+nl_rule_list_SOURCES = nl-rule-list.c
+
+nl_tctree_list_SOURCES = nl-tctree-list.c
+
+nl_fib_lookup_SOURCES = nl-fib-lookup.c
+
+nl_list_caches_SOURCES = nl-list-caches.c
+nl_list_sockets_SOURCES = nl-list-sockets.c
+
+nl_util_addr_SOURCES = nl-util-addr.c
+
+nl_pktloc_lookup_SOURCES = nl-pktloc-lookup.c
+
+nl_classid_lookup_SOURCES = nl-classid-lookup.c
+
+idiag_socket_details_SOURCES = idiag-socket-details.c
diff --git a/ap/lib/libnl/libnl-3.2.25/src/Makefile.in b/ap/lib/libnl/libnl-3.2.25/src/Makefile.in
new file mode 100644
index 0000000..b384fdf
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/Makefile.in
@@ -0,0 +1,1522 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# -*- Makefile -*-
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+sbin_PROGRAMS = genl-ctrl-list$(EXEEXT) nl-qdisc-add$(EXEEXT) \
+ nl-qdisc-list$(EXEEXT) nl-qdisc-delete$(EXEEXT) \
+ nl-class-add$(EXEEXT) nl-class-list$(EXEEXT) \
+ nl-class-delete$(EXEEXT) nl-cls-add$(EXEEXT) \
+ nl-cls-list$(EXEEXT) nl-cls-delete$(EXEEXT) \
+ nl-classid-lookup$(EXEEXT) nl-pktloc-lookup$(EXEEXT) \
+ nl-link-list$(EXEEXT)
+noinst_PROGRAMS = nf-ct-list$(EXEEXT) nf-ct-add$(EXEEXT) \
+ nf-log$(EXEEXT) nf-queue$(EXEEXT) nf-monitor$(EXEEXT) \
+ nf-exp-list$(EXEEXT) nf-exp-add$(EXEEXT) \
+ nf-exp-delete$(EXEEXT) nl-addr-add$(EXEEXT) \
+ nl-addr-delete$(EXEEXT) nl-addr-list$(EXEEXT) \
+ nl-link-set$(EXEEXT) nl-link-stats$(EXEEXT) \
+ nl-link-ifindex2name$(EXEEXT) nl-link-name2ifindex$(EXEEXT) \
+ nl-neigh-add$(EXEEXT) nl-neigh-delete$(EXEEXT) \
+ nl-neigh-list$(EXEEXT) nl-rule-list$(EXEEXT) \
+ nl-neightbl-list$(EXEEXT) nl-monitor$(EXEEXT) \
+ nl-tctree-list$(EXEEXT) nl-route-add$(EXEEXT) \
+ nl-route-delete$(EXEEXT) nl-route-get$(EXEEXT) \
+ nl-route-list$(EXEEXT) nl-fib-lookup$(EXEEXT) \
+ nl-list-caches$(EXEEXT) nl-list-sockets$(EXEEXT) \
+ nl-util-addr$(EXEEXT) nl-link-enslave$(EXEEXT) \
+ nl-link-release$(EXEEXT) idiag-socket-details$(EXEEXT)
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/build-aux/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/lib/defs.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)"
+PROGRAMS = $(noinst_PROGRAMS) $(sbin_PROGRAMS)
+am_genl_ctrl_list_OBJECTS = genl-ctrl-list.$(OBJEXT)
+genl_ctrl_list_OBJECTS = $(am_genl_ctrl_list_OBJECTS)
+genl_ctrl_list_LDADD = $(LDADD)
+genl_ctrl_list_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+am_idiag_socket_details_OBJECTS = idiag-socket-details.$(OBJEXT)
+idiag_socket_details_OBJECTS = $(am_idiag_socket_details_OBJECTS)
+idiag_socket_details_LDADD = $(LDADD)
+idiag_socket_details_DEPENDENCIES = \
+ ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nf_ct_add_OBJECTS = nf-ct-add.$(OBJEXT)
+nf_ct_add_OBJECTS = $(am_nf_ct_add_OBJECTS)
+nf_ct_add_LDADD = $(LDADD)
+nf_ct_add_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nf_ct_list_OBJECTS = nf-ct-list.$(OBJEXT)
+nf_ct_list_OBJECTS = $(am_nf_ct_list_OBJECTS)
+nf_ct_list_LDADD = $(LDADD)
+nf_ct_list_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nf_exp_add_OBJECTS = nf-exp-add.$(OBJEXT)
+nf_exp_add_OBJECTS = $(am_nf_exp_add_OBJECTS)
+nf_exp_add_LDADD = $(LDADD)
+nf_exp_add_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nf_exp_delete_OBJECTS = nf-exp-delete.$(OBJEXT)
+nf_exp_delete_OBJECTS = $(am_nf_exp_delete_OBJECTS)
+nf_exp_delete_LDADD = $(LDADD)
+nf_exp_delete_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nf_exp_list_OBJECTS = nf-exp-list.$(OBJEXT)
+nf_exp_list_OBJECTS = $(am_nf_exp_list_OBJECTS)
+nf_exp_list_LDADD = $(LDADD)
+nf_exp_list_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nf_log_OBJECTS = nf-log.$(OBJEXT)
+nf_log_OBJECTS = $(am_nf_log_OBJECTS)
+nf_log_LDADD = $(LDADD)
+nf_log_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nf_monitor_OBJECTS = nf-monitor.$(OBJEXT)
+nf_monitor_OBJECTS = $(am_nf_monitor_OBJECTS)
+nf_monitor_LDADD = $(LDADD)
+nf_monitor_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nf_queue_OBJECTS = nf-queue.$(OBJEXT)
+nf_queue_OBJECTS = $(am_nf_queue_OBJECTS)
+nf_queue_LDADD = $(LDADD)
+nf_queue_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_addr_add_OBJECTS = nl-addr-add.$(OBJEXT)
+nl_addr_add_OBJECTS = $(am_nl_addr_add_OBJECTS)
+nl_addr_add_LDADD = $(LDADD)
+nl_addr_add_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_addr_delete_OBJECTS = nl-addr-delete.$(OBJEXT)
+nl_addr_delete_OBJECTS = $(am_nl_addr_delete_OBJECTS)
+nl_addr_delete_LDADD = $(LDADD)
+nl_addr_delete_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_addr_list_OBJECTS = nl-addr-list.$(OBJEXT)
+nl_addr_list_OBJECTS = $(am_nl_addr_list_OBJECTS)
+nl_addr_list_LDADD = $(LDADD)
+nl_addr_list_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_class_add_OBJECTS = nl-class-add.$(OBJEXT)
+nl_class_add_OBJECTS = $(am_nl_class_add_OBJECTS)
+nl_class_add_LDADD = $(LDADD)
+nl_class_add_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_class_delete_OBJECTS = nl-class-delete.$(OBJEXT)
+nl_class_delete_OBJECTS = $(am_nl_class_delete_OBJECTS)
+nl_class_delete_LDADD = $(LDADD)
+nl_class_delete_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_class_list_OBJECTS = nl-class-list.$(OBJEXT)
+nl_class_list_OBJECTS = $(am_nl_class_list_OBJECTS)
+nl_class_list_LDADD = $(LDADD)
+nl_class_list_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_classid_lookup_OBJECTS = nl-classid-lookup.$(OBJEXT)
+nl_classid_lookup_OBJECTS = $(am_nl_classid_lookup_OBJECTS)
+nl_classid_lookup_LDADD = $(LDADD)
+nl_classid_lookup_DEPENDENCIES = \
+ ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_cls_add_OBJECTS = nl-cls-add.$(OBJEXT)
+nl_cls_add_OBJECTS = $(am_nl_cls_add_OBJECTS)
+nl_cls_add_LDADD = $(LDADD)
+nl_cls_add_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_cls_delete_OBJECTS = nl-cls-delete.$(OBJEXT)
+nl_cls_delete_OBJECTS = $(am_nl_cls_delete_OBJECTS)
+nl_cls_delete_LDADD = $(LDADD)
+nl_cls_delete_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_cls_list_OBJECTS = nl-cls-list.$(OBJEXT)
+nl_cls_list_OBJECTS = $(am_nl_cls_list_OBJECTS)
+nl_cls_list_LDADD = $(LDADD)
+nl_cls_list_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_fib_lookup_OBJECTS = nl-fib-lookup.$(OBJEXT)
+nl_fib_lookup_OBJECTS = $(am_nl_fib_lookup_OBJECTS)
+nl_fib_lookup_LDADD = $(LDADD)
+nl_fib_lookup_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+nl_link_enslave_SOURCES = nl-link-enslave.c
+nl_link_enslave_OBJECTS = nl-link-enslave.$(OBJEXT)
+nl_link_enslave_LDADD = $(LDADD)
+nl_link_enslave_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_link_ifindex2name_OBJECTS = nl-link-ifindex2name.$(OBJEXT)
+nl_link_ifindex2name_OBJECTS = $(am_nl_link_ifindex2name_OBJECTS)
+nl_link_ifindex2name_LDADD = $(LDADD)
+nl_link_ifindex2name_DEPENDENCIES = \
+ ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_link_list_OBJECTS = nl-link-list.$(OBJEXT)
+nl_link_list_OBJECTS = $(am_nl_link_list_OBJECTS)
+nl_link_list_LDADD = $(LDADD)
+nl_link_list_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_link_name2ifindex_OBJECTS = nl-link-name2ifindex.$(OBJEXT)
+nl_link_name2ifindex_OBJECTS = $(am_nl_link_name2ifindex_OBJECTS)
+nl_link_name2ifindex_LDADD = $(LDADD)
+nl_link_name2ifindex_DEPENDENCIES = \
+ ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+nl_link_release_SOURCES = nl-link-release.c
+nl_link_release_OBJECTS = nl-link-release.$(OBJEXT)
+nl_link_release_LDADD = $(LDADD)
+nl_link_release_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_link_set_OBJECTS = nl-link-set.$(OBJEXT)
+nl_link_set_OBJECTS = $(am_nl_link_set_OBJECTS)
+nl_link_set_LDADD = $(LDADD)
+nl_link_set_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_link_stats_OBJECTS = nl-link-stats.$(OBJEXT)
+nl_link_stats_OBJECTS = $(am_nl_link_stats_OBJECTS)
+nl_link_stats_LDADD = $(LDADD)
+nl_link_stats_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_list_caches_OBJECTS = nl-list-caches.$(OBJEXT)
+nl_list_caches_OBJECTS = $(am_nl_list_caches_OBJECTS)
+nl_list_caches_LDADD = $(LDADD)
+nl_list_caches_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_list_sockets_OBJECTS = nl-list-sockets.$(OBJEXT)
+nl_list_sockets_OBJECTS = $(am_nl_list_sockets_OBJECTS)
+nl_list_sockets_LDADD = $(LDADD)
+nl_list_sockets_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_monitor_OBJECTS = nl-monitor.$(OBJEXT)
+nl_monitor_OBJECTS = $(am_nl_monitor_OBJECTS)
+nl_monitor_LDADD = $(LDADD)
+nl_monitor_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_neigh_add_OBJECTS = nl-neigh-add.$(OBJEXT)
+nl_neigh_add_OBJECTS = $(am_nl_neigh_add_OBJECTS)
+nl_neigh_add_LDADD = $(LDADD)
+nl_neigh_add_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_neigh_delete_OBJECTS = nl-neigh-delete.$(OBJEXT)
+nl_neigh_delete_OBJECTS = $(am_nl_neigh_delete_OBJECTS)
+nl_neigh_delete_LDADD = $(LDADD)
+nl_neigh_delete_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_neigh_list_OBJECTS = nl-neigh-list.$(OBJEXT)
+nl_neigh_list_OBJECTS = $(am_nl_neigh_list_OBJECTS)
+nl_neigh_list_LDADD = $(LDADD)
+nl_neigh_list_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_neightbl_list_OBJECTS = nl-neightbl-list.$(OBJEXT)
+nl_neightbl_list_OBJECTS = $(am_nl_neightbl_list_OBJECTS)
+nl_neightbl_list_LDADD = $(LDADD)
+nl_neightbl_list_DEPENDENCIES = \
+ ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_pktloc_lookup_OBJECTS = nl-pktloc-lookup.$(OBJEXT)
+nl_pktloc_lookup_OBJECTS = $(am_nl_pktloc_lookup_OBJECTS)
+nl_pktloc_lookup_LDADD = $(LDADD)
+nl_pktloc_lookup_DEPENDENCIES = \
+ ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_qdisc_add_OBJECTS = nl-qdisc-add.$(OBJEXT)
+nl_qdisc_add_OBJECTS = $(am_nl_qdisc_add_OBJECTS)
+nl_qdisc_add_LDADD = $(LDADD)
+nl_qdisc_add_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_qdisc_delete_OBJECTS = nl-qdisc-delete.$(OBJEXT)
+nl_qdisc_delete_OBJECTS = $(am_nl_qdisc_delete_OBJECTS)
+nl_qdisc_delete_LDADD = $(LDADD)
+nl_qdisc_delete_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_qdisc_list_OBJECTS = nl-qdisc-list.$(OBJEXT)
+nl_qdisc_list_OBJECTS = $(am_nl_qdisc_list_OBJECTS)
+nl_qdisc_list_LDADD = $(LDADD)
+nl_qdisc_list_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_route_add_OBJECTS = nl-route-add.$(OBJEXT)
+nl_route_add_OBJECTS = $(am_nl_route_add_OBJECTS)
+nl_route_add_LDADD = $(LDADD)
+nl_route_add_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_route_delete_OBJECTS = nl-route-delete.$(OBJEXT)
+nl_route_delete_OBJECTS = $(am_nl_route_delete_OBJECTS)
+nl_route_delete_LDADD = $(LDADD)
+nl_route_delete_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_route_get_OBJECTS = nl-route-get.$(OBJEXT)
+nl_route_get_OBJECTS = $(am_nl_route_get_OBJECTS)
+nl_route_get_LDADD = $(LDADD)
+nl_route_get_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_route_list_OBJECTS = nl-route-list.$(OBJEXT)
+nl_route_list_OBJECTS = $(am_nl_route_list_OBJECTS)
+nl_route_list_LDADD = $(LDADD)
+nl_route_list_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_rule_list_OBJECTS = nl-rule-list.$(OBJEXT)
+nl_rule_list_OBJECTS = $(am_nl_rule_list_OBJECTS)
+nl_rule_list_LDADD = $(LDADD)
+nl_rule_list_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_tctree_list_OBJECTS = nl-tctree-list.$(OBJEXT)
+nl_tctree_list_OBJECTS = $(am_nl_tctree_list_OBJECTS)
+nl_tctree_list_LDADD = $(LDADD)
+nl_tctree_list_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+am_nl_util_addr_OBJECTS = nl-util-addr.$(OBJEXT)
+nl_util_addr_OBJECTS = $(am_nl_util_addr_OBJECTS)
+nl_util_addr_LDADD = $(LDADD)
+nl_util_addr_DEPENDENCIES = ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(genl_ctrl_list_SOURCES) $(idiag_socket_details_SOURCES) \
+ $(nf_ct_add_SOURCES) $(nf_ct_list_SOURCES) \
+ $(nf_exp_add_SOURCES) $(nf_exp_delete_SOURCES) \
+ $(nf_exp_list_SOURCES) $(nf_log_SOURCES) $(nf_monitor_SOURCES) \
+ $(nf_queue_SOURCES) $(nl_addr_add_SOURCES) \
+ $(nl_addr_delete_SOURCES) $(nl_addr_list_SOURCES) \
+ $(nl_class_add_SOURCES) $(nl_class_delete_SOURCES) \
+ $(nl_class_list_SOURCES) $(nl_classid_lookup_SOURCES) \
+ $(nl_cls_add_SOURCES) $(nl_cls_delete_SOURCES) \
+ $(nl_cls_list_SOURCES) $(nl_fib_lookup_SOURCES) \
+ nl-link-enslave.c $(nl_link_ifindex2name_SOURCES) \
+ $(nl_link_list_SOURCES) $(nl_link_name2ifindex_SOURCES) \
+ nl-link-release.c $(nl_link_set_SOURCES) \
+ $(nl_link_stats_SOURCES) $(nl_list_caches_SOURCES) \
+ $(nl_list_sockets_SOURCES) $(nl_monitor_SOURCES) \
+ $(nl_neigh_add_SOURCES) $(nl_neigh_delete_SOURCES) \
+ $(nl_neigh_list_SOURCES) $(nl_neightbl_list_SOURCES) \
+ $(nl_pktloc_lookup_SOURCES) $(nl_qdisc_add_SOURCES) \
+ $(nl_qdisc_delete_SOURCES) $(nl_qdisc_list_SOURCES) \
+ $(nl_route_add_SOURCES) $(nl_route_delete_SOURCES) \
+ $(nl_route_get_SOURCES) $(nl_route_list_SOURCES) \
+ $(nl_rule_list_SOURCES) $(nl_tctree_list_SOURCES) \
+ $(nl_util_addr_SOURCES)
+DIST_SOURCES = $(genl_ctrl_list_SOURCES) \
+ $(idiag_socket_details_SOURCES) $(nf_ct_add_SOURCES) \
+ $(nf_ct_list_SOURCES) $(nf_exp_add_SOURCES) \
+ $(nf_exp_delete_SOURCES) $(nf_exp_list_SOURCES) \
+ $(nf_log_SOURCES) $(nf_monitor_SOURCES) $(nf_queue_SOURCES) \
+ $(nl_addr_add_SOURCES) $(nl_addr_delete_SOURCES) \
+ $(nl_addr_list_SOURCES) $(nl_class_add_SOURCES) \
+ $(nl_class_delete_SOURCES) $(nl_class_list_SOURCES) \
+ $(nl_classid_lookup_SOURCES) $(nl_cls_add_SOURCES) \
+ $(nl_cls_delete_SOURCES) $(nl_cls_list_SOURCES) \
+ $(nl_fib_lookup_SOURCES) nl-link-enslave.c \
+ $(nl_link_ifindex2name_SOURCES) $(nl_link_list_SOURCES) \
+ $(nl_link_name2ifindex_SOURCES) nl-link-release.c \
+ $(nl_link_set_SOURCES) $(nl_link_stats_SOURCES) \
+ $(nl_list_caches_SOURCES) $(nl_list_sockets_SOURCES) \
+ $(nl_monitor_SOURCES) $(nl_neigh_add_SOURCES) \
+ $(nl_neigh_delete_SOURCES) $(nl_neigh_list_SOURCES) \
+ $(nl_neightbl_list_SOURCES) $(nl_pktloc_lookup_SOURCES) \
+ $(nl_qdisc_add_SOURCES) $(nl_qdisc_delete_SOURCES) \
+ $(nl_qdisc_list_SOURCES) $(nl_route_add_SOURCES) \
+ $(nl_route_delete_SOURCES) $(nl_route_get_SOURCES) \
+ $(nl_route_list_SOURCES) $(nl_rule_list_SOURCES) \
+ $(nl_tctree_list_SOURCES) $(nl_util_addr_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FLEX = @FLEX@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBNL_VERSION = @LIBNL_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_REVISION = @LT_REVISION@
+MAJ_VERSION = @MAJ_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MIC_VERSION = @MIC_VERSION@
+MIN_VERSION = @MIN_VERSION@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = lib
+AM_CPPFLAGS = -I${top_srcdir}/include -I${top_builddir}/include -D_GNU_SOURCE -DSYSCONFDIR=\"$(sysconfdir)/libnl\"
+AM_CFLAGS = -Wall
+LDADD = \
+ ${top_builddir}/src/lib/libnl-cli-3.la \
+ ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-idiag-3.la
+
+genl_ctrl_list_SOURCES = genl-ctrl-list.c
+nf_ct_list_SOURCES = nf-ct-list.c
+nf_ct_add_SOURCES = nf-ct-add.c
+nf_log_SOURCES = nf-log.c
+nf_queue_SOURCES = nf-queue.c
+nf_monitor_SOURCES = nf-monitor.c
+nf_exp_list_SOURCES = nf-exp-list.c
+nf_exp_add_SOURCES = nf-exp-add.c
+nf_exp_delete_SOURCES = nf-exp-delete.c
+nl_addr_add_SOURCES = nl-addr-add.c
+nl_addr_delete_SOURCES = nl-addr-delete.c
+nl_addr_list_SOURCES = nl-addr-list.c
+nl_link_list_SOURCES = nl-link-list.c
+nl_link_set_SOURCES = nl-link-set.c
+nl_link_stats_SOURCES = nl-link-stats.c
+nl_link_ifindex2name_SOURCES = nl-link-ifindex2name.c
+nl_link_name2ifindex_SOURCES = nl-link-name2ifindex.c
+nl_monitor_SOURCES = nl-monitor.c
+nl_neigh_add_SOURCES = nl-neigh-add.c
+nl_neigh_delete_SOURCES = nl-neigh-delete.c
+nl_neigh_list_SOURCES = nl-neigh-list.c
+nl_neightbl_list_SOURCES = nl-neightbl-list.c
+nl_qdisc_add_SOURCES = nl-qdisc-add.c
+nl_qdisc_delete_SOURCES = nl-qdisc-delete.c
+nl_qdisc_list_SOURCES = nl-qdisc-list.c
+nl_class_add_SOURCES = nl-class-add.c
+nl_class_delete_SOURCES = nl-class-delete.c
+nl_class_list_SOURCES = nl-class-list.c
+nl_cls_add_SOURCES = nl-cls-add.c
+nl_cls_list_SOURCES = nl-cls-list.c
+nl_cls_delete_SOURCES = nl-cls-delete.c
+nl_route_add_SOURCES = nl-route-add.c
+nl_route_delete_SOURCES = nl-route-delete.c
+nl_route_get_SOURCES = nl-route-get.c
+nl_route_list_SOURCES = nl-route-list.c
+nl_rule_list_SOURCES = nl-rule-list.c
+nl_tctree_list_SOURCES = nl-tctree-list.c
+nl_fib_lookup_SOURCES = nl-fib-lookup.c
+nl_list_caches_SOURCES = nl-list-caches.c
+nl_list_sockets_SOURCES = nl-list-sockets.c
+nl_util_addr_SOURCES = nl-util-addr.c
+nl_pktloc_lookup_SOURCES = nl-pktloc-lookup.c
+nl_classid_lookup_SOURCES = nl-classid-lookup.c
+idiag_socket_details_SOURCES = idiag-socket-details.c
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+ @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+genl-ctrl-list$(EXEEXT): $(genl_ctrl_list_OBJECTS) $(genl_ctrl_list_DEPENDENCIES) $(EXTRA_genl_ctrl_list_DEPENDENCIES)
+ @rm -f genl-ctrl-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(genl_ctrl_list_OBJECTS) $(genl_ctrl_list_LDADD) $(LIBS)
+
+idiag-socket-details$(EXEEXT): $(idiag_socket_details_OBJECTS) $(idiag_socket_details_DEPENDENCIES) $(EXTRA_idiag_socket_details_DEPENDENCIES)
+ @rm -f idiag-socket-details$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(idiag_socket_details_OBJECTS) $(idiag_socket_details_LDADD) $(LIBS)
+
+nf-ct-add$(EXEEXT): $(nf_ct_add_OBJECTS) $(nf_ct_add_DEPENDENCIES) $(EXTRA_nf_ct_add_DEPENDENCIES)
+ @rm -f nf-ct-add$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nf_ct_add_OBJECTS) $(nf_ct_add_LDADD) $(LIBS)
+
+nf-ct-list$(EXEEXT): $(nf_ct_list_OBJECTS) $(nf_ct_list_DEPENDENCIES) $(EXTRA_nf_ct_list_DEPENDENCIES)
+ @rm -f nf-ct-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nf_ct_list_OBJECTS) $(nf_ct_list_LDADD) $(LIBS)
+
+nf-exp-add$(EXEEXT): $(nf_exp_add_OBJECTS) $(nf_exp_add_DEPENDENCIES) $(EXTRA_nf_exp_add_DEPENDENCIES)
+ @rm -f nf-exp-add$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nf_exp_add_OBJECTS) $(nf_exp_add_LDADD) $(LIBS)
+
+nf-exp-delete$(EXEEXT): $(nf_exp_delete_OBJECTS) $(nf_exp_delete_DEPENDENCIES) $(EXTRA_nf_exp_delete_DEPENDENCIES)
+ @rm -f nf-exp-delete$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nf_exp_delete_OBJECTS) $(nf_exp_delete_LDADD) $(LIBS)
+
+nf-exp-list$(EXEEXT): $(nf_exp_list_OBJECTS) $(nf_exp_list_DEPENDENCIES) $(EXTRA_nf_exp_list_DEPENDENCIES)
+ @rm -f nf-exp-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nf_exp_list_OBJECTS) $(nf_exp_list_LDADD) $(LIBS)
+
+nf-log$(EXEEXT): $(nf_log_OBJECTS) $(nf_log_DEPENDENCIES) $(EXTRA_nf_log_DEPENDENCIES)
+ @rm -f nf-log$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nf_log_OBJECTS) $(nf_log_LDADD) $(LIBS)
+
+nf-monitor$(EXEEXT): $(nf_monitor_OBJECTS) $(nf_monitor_DEPENDENCIES) $(EXTRA_nf_monitor_DEPENDENCIES)
+ @rm -f nf-monitor$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nf_monitor_OBJECTS) $(nf_monitor_LDADD) $(LIBS)
+
+nf-queue$(EXEEXT): $(nf_queue_OBJECTS) $(nf_queue_DEPENDENCIES) $(EXTRA_nf_queue_DEPENDENCIES)
+ @rm -f nf-queue$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nf_queue_OBJECTS) $(nf_queue_LDADD) $(LIBS)
+
+nl-addr-add$(EXEEXT): $(nl_addr_add_OBJECTS) $(nl_addr_add_DEPENDENCIES) $(EXTRA_nl_addr_add_DEPENDENCIES)
+ @rm -f nl-addr-add$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_addr_add_OBJECTS) $(nl_addr_add_LDADD) $(LIBS)
+
+nl-addr-delete$(EXEEXT): $(nl_addr_delete_OBJECTS) $(nl_addr_delete_DEPENDENCIES) $(EXTRA_nl_addr_delete_DEPENDENCIES)
+ @rm -f nl-addr-delete$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_addr_delete_OBJECTS) $(nl_addr_delete_LDADD) $(LIBS)
+
+nl-addr-list$(EXEEXT): $(nl_addr_list_OBJECTS) $(nl_addr_list_DEPENDENCIES) $(EXTRA_nl_addr_list_DEPENDENCIES)
+ @rm -f nl-addr-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_addr_list_OBJECTS) $(nl_addr_list_LDADD) $(LIBS)
+
+nl-class-add$(EXEEXT): $(nl_class_add_OBJECTS) $(nl_class_add_DEPENDENCIES) $(EXTRA_nl_class_add_DEPENDENCIES)
+ @rm -f nl-class-add$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_class_add_OBJECTS) $(nl_class_add_LDADD) $(LIBS)
+
+nl-class-delete$(EXEEXT): $(nl_class_delete_OBJECTS) $(nl_class_delete_DEPENDENCIES) $(EXTRA_nl_class_delete_DEPENDENCIES)
+ @rm -f nl-class-delete$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_class_delete_OBJECTS) $(nl_class_delete_LDADD) $(LIBS)
+
+nl-class-list$(EXEEXT): $(nl_class_list_OBJECTS) $(nl_class_list_DEPENDENCIES) $(EXTRA_nl_class_list_DEPENDENCIES)
+ @rm -f nl-class-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_class_list_OBJECTS) $(nl_class_list_LDADD) $(LIBS)
+
+nl-classid-lookup$(EXEEXT): $(nl_classid_lookup_OBJECTS) $(nl_classid_lookup_DEPENDENCIES) $(EXTRA_nl_classid_lookup_DEPENDENCIES)
+ @rm -f nl-classid-lookup$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_classid_lookup_OBJECTS) $(nl_classid_lookup_LDADD) $(LIBS)
+
+nl-cls-add$(EXEEXT): $(nl_cls_add_OBJECTS) $(nl_cls_add_DEPENDENCIES) $(EXTRA_nl_cls_add_DEPENDENCIES)
+ @rm -f nl-cls-add$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_cls_add_OBJECTS) $(nl_cls_add_LDADD) $(LIBS)
+
+nl-cls-delete$(EXEEXT): $(nl_cls_delete_OBJECTS) $(nl_cls_delete_DEPENDENCIES) $(EXTRA_nl_cls_delete_DEPENDENCIES)
+ @rm -f nl-cls-delete$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_cls_delete_OBJECTS) $(nl_cls_delete_LDADD) $(LIBS)
+
+nl-cls-list$(EXEEXT): $(nl_cls_list_OBJECTS) $(nl_cls_list_DEPENDENCIES) $(EXTRA_nl_cls_list_DEPENDENCIES)
+ @rm -f nl-cls-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_cls_list_OBJECTS) $(nl_cls_list_LDADD) $(LIBS)
+
+nl-fib-lookup$(EXEEXT): $(nl_fib_lookup_OBJECTS) $(nl_fib_lookup_DEPENDENCIES) $(EXTRA_nl_fib_lookup_DEPENDENCIES)
+ @rm -f nl-fib-lookup$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_fib_lookup_OBJECTS) $(nl_fib_lookup_LDADD) $(LIBS)
+
+nl-link-enslave$(EXEEXT): $(nl_link_enslave_OBJECTS) $(nl_link_enslave_DEPENDENCIES) $(EXTRA_nl_link_enslave_DEPENDENCIES)
+ @rm -f nl-link-enslave$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_link_enslave_OBJECTS) $(nl_link_enslave_LDADD) $(LIBS)
+
+nl-link-ifindex2name$(EXEEXT): $(nl_link_ifindex2name_OBJECTS) $(nl_link_ifindex2name_DEPENDENCIES) $(EXTRA_nl_link_ifindex2name_DEPENDENCIES)
+ @rm -f nl-link-ifindex2name$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_link_ifindex2name_OBJECTS) $(nl_link_ifindex2name_LDADD) $(LIBS)
+
+nl-link-list$(EXEEXT): $(nl_link_list_OBJECTS) $(nl_link_list_DEPENDENCIES) $(EXTRA_nl_link_list_DEPENDENCIES)
+ @rm -f nl-link-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_link_list_OBJECTS) $(nl_link_list_LDADD) $(LIBS)
+
+nl-link-name2ifindex$(EXEEXT): $(nl_link_name2ifindex_OBJECTS) $(nl_link_name2ifindex_DEPENDENCIES) $(EXTRA_nl_link_name2ifindex_DEPENDENCIES)
+ @rm -f nl-link-name2ifindex$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_link_name2ifindex_OBJECTS) $(nl_link_name2ifindex_LDADD) $(LIBS)
+
+nl-link-release$(EXEEXT): $(nl_link_release_OBJECTS) $(nl_link_release_DEPENDENCIES) $(EXTRA_nl_link_release_DEPENDENCIES)
+ @rm -f nl-link-release$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_link_release_OBJECTS) $(nl_link_release_LDADD) $(LIBS)
+
+nl-link-set$(EXEEXT): $(nl_link_set_OBJECTS) $(nl_link_set_DEPENDENCIES) $(EXTRA_nl_link_set_DEPENDENCIES)
+ @rm -f nl-link-set$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_link_set_OBJECTS) $(nl_link_set_LDADD) $(LIBS)
+
+nl-link-stats$(EXEEXT): $(nl_link_stats_OBJECTS) $(nl_link_stats_DEPENDENCIES) $(EXTRA_nl_link_stats_DEPENDENCIES)
+ @rm -f nl-link-stats$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_link_stats_OBJECTS) $(nl_link_stats_LDADD) $(LIBS)
+
+nl-list-caches$(EXEEXT): $(nl_list_caches_OBJECTS) $(nl_list_caches_DEPENDENCIES) $(EXTRA_nl_list_caches_DEPENDENCIES)
+ @rm -f nl-list-caches$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_list_caches_OBJECTS) $(nl_list_caches_LDADD) $(LIBS)
+
+nl-list-sockets$(EXEEXT): $(nl_list_sockets_OBJECTS) $(nl_list_sockets_DEPENDENCIES) $(EXTRA_nl_list_sockets_DEPENDENCIES)
+ @rm -f nl-list-sockets$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_list_sockets_OBJECTS) $(nl_list_sockets_LDADD) $(LIBS)
+
+nl-monitor$(EXEEXT): $(nl_monitor_OBJECTS) $(nl_monitor_DEPENDENCIES) $(EXTRA_nl_monitor_DEPENDENCIES)
+ @rm -f nl-monitor$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_monitor_OBJECTS) $(nl_monitor_LDADD) $(LIBS)
+
+nl-neigh-add$(EXEEXT): $(nl_neigh_add_OBJECTS) $(nl_neigh_add_DEPENDENCIES) $(EXTRA_nl_neigh_add_DEPENDENCIES)
+ @rm -f nl-neigh-add$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_neigh_add_OBJECTS) $(nl_neigh_add_LDADD) $(LIBS)
+
+nl-neigh-delete$(EXEEXT): $(nl_neigh_delete_OBJECTS) $(nl_neigh_delete_DEPENDENCIES) $(EXTRA_nl_neigh_delete_DEPENDENCIES)
+ @rm -f nl-neigh-delete$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_neigh_delete_OBJECTS) $(nl_neigh_delete_LDADD) $(LIBS)
+
+nl-neigh-list$(EXEEXT): $(nl_neigh_list_OBJECTS) $(nl_neigh_list_DEPENDENCIES) $(EXTRA_nl_neigh_list_DEPENDENCIES)
+ @rm -f nl-neigh-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_neigh_list_OBJECTS) $(nl_neigh_list_LDADD) $(LIBS)
+
+nl-neightbl-list$(EXEEXT): $(nl_neightbl_list_OBJECTS) $(nl_neightbl_list_DEPENDENCIES) $(EXTRA_nl_neightbl_list_DEPENDENCIES)
+ @rm -f nl-neightbl-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_neightbl_list_OBJECTS) $(nl_neightbl_list_LDADD) $(LIBS)
+
+nl-pktloc-lookup$(EXEEXT): $(nl_pktloc_lookup_OBJECTS) $(nl_pktloc_lookup_DEPENDENCIES) $(EXTRA_nl_pktloc_lookup_DEPENDENCIES)
+ @rm -f nl-pktloc-lookup$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_pktloc_lookup_OBJECTS) $(nl_pktloc_lookup_LDADD) $(LIBS)
+
+nl-qdisc-add$(EXEEXT): $(nl_qdisc_add_OBJECTS) $(nl_qdisc_add_DEPENDENCIES) $(EXTRA_nl_qdisc_add_DEPENDENCIES)
+ @rm -f nl-qdisc-add$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_qdisc_add_OBJECTS) $(nl_qdisc_add_LDADD) $(LIBS)
+
+nl-qdisc-delete$(EXEEXT): $(nl_qdisc_delete_OBJECTS) $(nl_qdisc_delete_DEPENDENCIES) $(EXTRA_nl_qdisc_delete_DEPENDENCIES)
+ @rm -f nl-qdisc-delete$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_qdisc_delete_OBJECTS) $(nl_qdisc_delete_LDADD) $(LIBS)
+
+nl-qdisc-list$(EXEEXT): $(nl_qdisc_list_OBJECTS) $(nl_qdisc_list_DEPENDENCIES) $(EXTRA_nl_qdisc_list_DEPENDENCIES)
+ @rm -f nl-qdisc-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_qdisc_list_OBJECTS) $(nl_qdisc_list_LDADD) $(LIBS)
+
+nl-route-add$(EXEEXT): $(nl_route_add_OBJECTS) $(nl_route_add_DEPENDENCIES) $(EXTRA_nl_route_add_DEPENDENCIES)
+ @rm -f nl-route-add$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_route_add_OBJECTS) $(nl_route_add_LDADD) $(LIBS)
+
+nl-route-delete$(EXEEXT): $(nl_route_delete_OBJECTS) $(nl_route_delete_DEPENDENCIES) $(EXTRA_nl_route_delete_DEPENDENCIES)
+ @rm -f nl-route-delete$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_route_delete_OBJECTS) $(nl_route_delete_LDADD) $(LIBS)
+
+nl-route-get$(EXEEXT): $(nl_route_get_OBJECTS) $(nl_route_get_DEPENDENCIES) $(EXTRA_nl_route_get_DEPENDENCIES)
+ @rm -f nl-route-get$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_route_get_OBJECTS) $(nl_route_get_LDADD) $(LIBS)
+
+nl-route-list$(EXEEXT): $(nl_route_list_OBJECTS) $(nl_route_list_DEPENDENCIES) $(EXTRA_nl_route_list_DEPENDENCIES)
+ @rm -f nl-route-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_route_list_OBJECTS) $(nl_route_list_LDADD) $(LIBS)
+
+nl-rule-list$(EXEEXT): $(nl_rule_list_OBJECTS) $(nl_rule_list_DEPENDENCIES) $(EXTRA_nl_rule_list_DEPENDENCIES)
+ @rm -f nl-rule-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_rule_list_OBJECTS) $(nl_rule_list_LDADD) $(LIBS)
+
+nl-tctree-list$(EXEEXT): $(nl_tctree_list_OBJECTS) $(nl_tctree_list_DEPENDENCIES) $(EXTRA_nl_tctree_list_DEPENDENCIES)
+ @rm -f nl-tctree-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_tctree_list_OBJECTS) $(nl_tctree_list_LDADD) $(LIBS)
+
+nl-util-addr$(EXEEXT): $(nl_util_addr_OBJECTS) $(nl_util_addr_DEPENDENCIES) $(EXTRA_nl_util_addr_DEPENDENCIES)
+ @rm -f nl-util-addr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(nl_util_addr_OBJECTS) $(nl_util_addr_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genl-ctrl-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idiag-socket-details.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nf-ct-add.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nf-ct-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nf-exp-add.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nf-exp-delete.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nf-exp-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nf-log.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nf-monitor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nf-queue.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-addr-add.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-addr-delete.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-addr-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-class-add.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-class-delete.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-class-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-classid-lookup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-cls-add.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-cls-delete.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-cls-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-fib-lookup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-link-enslave.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-link-ifindex2name.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-link-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-link-name2ifindex.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-link-release.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-link-set.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-link-stats.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-list-caches.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-list-sockets.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-monitor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-neigh-add.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-neigh-delete.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-neigh-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-neightbl-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-pktloc-lookup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-qdisc-add.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-qdisc-delete.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-qdisc-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-route-add.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-route-delete.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-route-get.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-route-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-rule-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-tctree-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl-util-addr.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(PROGRAMS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(sbindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ clean-sbinPROGRAMS mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-sbinPROGRAMS
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool \
+ clean-noinstPROGRAMS clean-sbinPROGRAMS cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-sbinPROGRAMS install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-sbinPROGRAMS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/ap/lib/libnl/libnl-3.2.25/src/genl-ctrl-list.c b/ap/lib/libnl/libnl-3.2.25/src/genl-ctrl-list.c
new file mode 100644
index 0000000..0895bcc
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/genl-ctrl-list.c
@@ -0,0 +1,71 @@
+/*
+ * src/genl-ctrl-list.c List Generic Netlink Families
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2012 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+
+static struct nl_cache *alloc_genl_family_cache(struct nl_sock *sk)
+{
+ return nl_cli_alloc_cache(sk, "generic netlink family",
+ genl_ctrl_alloc_cache);
+}
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: genl-ctrl-list [--details]\n"
+ "\n"
+ "Options\n"
+ " -d, --details Include detailed information in the list\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *family_cache;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_GENERIC);
+ family_cache = alloc_genl_family_cache(sock);
+
+ for (;;) {
+ int c, optidx = 0;
+ static struct option long_opts[] = {
+ { "details", 0, 0, 'd' },
+ { "format", 1, 0, 'f' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "df:hv", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'f': params.dp_type = nl_cli_parse_dumptype(optarg); break;
+ case 'd': params.dp_type = NL_DUMP_DETAILS; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ }
+ }
+
+ nl_cache_dump(family_cache, ¶ms);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/idiag-socket-details.c b/ap/lib/libnl/libnl-3.2.25/src/idiag-socket-details.c
new file mode 100644
index 0000000..9568676
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/idiag-socket-details.c
@@ -0,0 +1,90 @@
+/*
+ * src/idiag-socket-details.c List socket details
+ *
+ * This library 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 version 2 of the License.
+ *
+ * Copyright (c) 2013 Sassano Systems LLC <joe@sassanosystems.com>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/idiag/idiagnl.h>
+#include <netlink/idiag/msg.h>
+#include <linux/netlink.h>
+
+static void print_usage(void)
+{
+ printf(
+"Usage: idiag-socket-details [OPTION]\n"
+"\n"
+"Options\n"
+" --summary Show socket detail summary.\n"
+" --details Show socket details on multiple lines.\n"
+" --stats Show full socket statistics.\n"
+" -h, --help Show this help.\n"
+" -v, --version Show versioning information.\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *idiag_cache;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_nl_cb = NULL,
+ .dp_fd = stdout,
+ };
+ int err = 0;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_INET_DIAG);
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_SUMMARY = 257,
+ ARG_DETAILS = 258,
+ ARG_STATS = 259,
+ ARG_FAMILY,
+ };
+ static struct option long_opts[] = {
+ { "details", 0, 0, ARG_DETAILS },
+ { "summary", 0, 0, ARG_SUMMARY },
+ { "stats", 0, 0, ARG_STATS},
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "hv", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case '?': exit(NLE_INVAL);
+ case ARG_SUMMARY: params.dp_type = NL_DUMP_LINE; break;
+ case ARG_DETAILS: params.dp_type = NL_DUMP_DETAILS; break;
+ case ARG_STATS: params.dp_type = NL_DUMP_STATS; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ }
+ }
+
+ if ((err = idiagnl_msg_alloc_cache(sock, AF_INET, IDIAG_SS_ALL,
+ &idiag_cache))) {
+ nl_cli_fatal(err, "Unable to allocate idiag msg cache: %s",
+ nl_geterror(err));
+ }
+
+ nl_cache_mngt_provide(idiag_cache);
+
+ nl_cache_dump_filter(idiag_cache, ¶ms, NULL);
+
+ nl_cache_mngt_unprovide(idiag_cache);
+ nl_cache_free(idiag_cache);
+ nl_socket_free(sock);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/Makefile.am b/ap/lib/libnl/libnl-3.2.25/src/lib/Makefile.am
new file mode 100644
index 0000000..5161115
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/Makefile.am
@@ -0,0 +1,45 @@
+# -*- Makefile -*-
+
+AM_CPPFLAGS = -I${top_srcdir}/include -I${top_builddir}/include -D_GNU_SOURCE -DPKGLIBDIR=\"$(pkglibdir)\" -DSYSCONFDIR=\"$(sysconfdir)\" -rdynamic
+AM_CFLAGS = -Wall
+AM_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+NL_LIBADD = \
+ -L${top_builddir}/lib \
+ -ldl
+
+#nobase_pkglib_LTLIBRARIES = cls/basic.la cls/ematch/cmp.la
+#cls_basic_la_LDFLAGS = -module -version-info 2:0:0
+#cls_ematch_cmp_la_LDFLAGS = -module -version-info 2:0:0
+
+#cls/ematch_grammar.c: cls/ematch_grammar.l
+# $(LEX) --header-file=cls/ematch_grammar.h $(LFLAGS) -o $@ $^
+
+#cls/ematch_syntax.c: cls/ematch_syntax.y
+# $(YACC) -d $(YFLAGS) -o $@ $^
+
+#cls/pktloc_grammar.c: cls/pktloc_grammar.l
+# $(LEX) --header-file=cls/pktloc_grammar.h $(LFLAGS) -o $@ $^
+
+#cls/pktloc_syntax.c: cls/pktloc_syntax.y
+# $(YACC) -d $(YFLAGS) -o $@ $^
+
+#CLEANFILES = \
+# cls/ematch_grammar.c cls/ematch_grammar.h \
+# cls/ematch_syntax.c cls/ematch_syntax.h \
+# cls/pktloc_grammar.c cls/pktloc_grammar.h \
+# cls/pktloc_syntax.c cls/pktloc_syntax.h
+
+lib_LTLIBRARIES = \
+ libnl-cli-3.la
+
+libnl_cli_3_la_LIBADD = ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la ${NL_LIBADD}
+
+libnl_cli_3_la_SOURCES = \
+ utils.c addr.c ct.c link.c neigh.c rule.c route.c \
+ tc.c qdisc.c class.c cls.c exp.c
+# cls/ematch_syntax.c cls/ematch_grammar.c cls/ematch.c
+# cls/pktloc_syntax.c cls/pktloc_grammar.c cls/utils.c
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/Makefile.in b/ap/lib/libnl/libnl-3.2.25/src/lib/Makefile.in
new file mode 100644
index 0000000..876acba
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/Makefile.in
@@ -0,0 +1,705 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# -*- Makefile -*-
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/lib
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/build-aux/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/lib/defs.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libnl_cli_3_la_DEPENDENCIES = ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la $(am__DEPENDENCIES_1)
+am_libnl_cli_3_la_OBJECTS = utils.lo addr.lo ct.lo link.lo neigh.lo \
+ rule.lo route.lo tc.lo qdisc.lo class.lo cls.lo exp.lo
+libnl_cli_3_la_OBJECTS = $(am_libnl_cli_3_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libnl_cli_3_la_SOURCES)
+DIST_SOURCES = $(libnl_cli_3_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FLEX = @FLEX@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBNL_VERSION = @LIBNL_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_REVISION = @LT_REVISION@
+MAJ_VERSION = @MAJ_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MIC_VERSION = @MIC_VERSION@
+MIN_VERSION = @MIN_VERSION@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+YACC = @YACC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CPPFLAGS = -I${top_srcdir}/include -I${top_builddir}/include -D_GNU_SOURCE -DPKGLIBDIR=\"$(pkglibdir)\" -DSYSCONFDIR=\"$(sysconfdir)\" -rdynamic
+AM_CFLAGS = -Wall
+AM_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
+NL_LIBADD = \
+ -L${top_builddir}/lib \
+ -ldl
+
+
+#nobase_pkglib_LTLIBRARIES = cls/basic.la cls/ematch/cmp.la
+#cls_basic_la_LDFLAGS = -module -version-info 2:0:0
+#cls_ematch_cmp_la_LDFLAGS = -module -version-info 2:0:0
+
+#cls/ematch_grammar.c: cls/ematch_grammar.l
+# $(LEX) --header-file=cls/ematch_grammar.h $(LFLAGS) -o $@ $^
+
+#cls/ematch_syntax.c: cls/ematch_syntax.y
+# $(YACC) -d $(YFLAGS) -o $@ $^
+
+#cls/pktloc_grammar.c: cls/pktloc_grammar.l
+# $(LEX) --header-file=cls/pktloc_grammar.h $(LFLAGS) -o $@ $^
+
+#cls/pktloc_syntax.c: cls/pktloc_syntax.y
+# $(YACC) -d $(YFLAGS) -o $@ $^
+
+#CLEANFILES = \
+# cls/ematch_grammar.c cls/ematch_grammar.h \
+# cls/ematch_syntax.c cls/ematch_syntax.h \
+# cls/pktloc_grammar.c cls/pktloc_grammar.h \
+# cls/pktloc_syntax.c cls/pktloc_syntax.h
+lib_LTLIBRARIES = \
+ libnl-cli-3.la
+
+libnl_cli_3_la_LIBADD = ${top_builddir}/lib/libnl-3.la \
+ ${top_builddir}/lib/libnl-route-3.la \
+ ${top_builddir}/lib/libnl-nf-3.la \
+ ${top_builddir}/lib/libnl-genl-3.la ${NL_LIBADD}
+
+libnl_cli_3_la_SOURCES = \
+ utils.c addr.c ct.c link.c neigh.c rule.c route.c \
+ tc.c qdisc.c class.c cls.c exp.c
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/lib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+libnl-cli-3.la: $(libnl_cli_3_la_OBJECTS) $(libnl_cli_3_la_DEPENDENCIES) $(EXTRA_libnl_cli_3_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libnl_cli_3_la_OBJECTS) $(libnl_cli_3_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/class.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cls.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ct.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neigh.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qdisc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/route.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libLTLIBRARIES install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+# cls/ematch_syntax.c cls/ematch_grammar.c cls/ematch.c
+# cls/pktloc_syntax.c cls/pktloc_grammar.c cls/utils.c
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/addr.c b/ap/lib/libnl/libnl-3.2.25/src/lib/addr.c
new file mode 100644
index 0000000..a9c137b
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/addr.c
@@ -0,0 +1,135 @@
+/*
+ * src/lib/addr.c Address Helpers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2008-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+/**
+ * @ingroup cli
+ * @defgroup cli_addr Addresses
+ *
+ * @{
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/addr.h>
+
+struct rtnl_addr *nl_cli_addr_alloc(void)
+{
+ struct rtnl_addr *addr;
+
+ addr = rtnl_addr_alloc();
+ if (!addr)
+ nl_cli_fatal(ENOMEM, "Unable to allocate address object");
+
+ return addr;
+}
+
+void nl_cli_addr_parse_family(struct rtnl_addr *addr, char *arg)
+{
+ int family;
+
+ if ((family = nl_str2af(arg)) != AF_UNSPEC)
+ rtnl_addr_set_family(addr, family);
+}
+
+void nl_cli_addr_parse_local(struct rtnl_addr *addr, char *arg)
+{
+ struct nl_addr *a;
+ int err;
+
+ a = nl_cli_addr_parse(arg, rtnl_addr_get_family(addr));
+ if ((err = rtnl_addr_set_local(addr, a)) < 0)
+ nl_cli_fatal(err, "Unable to set local address: %s",
+ nl_geterror(err));
+
+ nl_addr_put(a);
+}
+
+void nl_cli_addr_parse_dev(struct rtnl_addr *addr, struct nl_cache *link_cache,
+ char *arg)
+{
+ int ival;
+
+ if (!(ival = rtnl_link_name2i(link_cache, arg)))
+ nl_cli_fatal(ENOENT, "Link \"%s\" does not exist", arg);
+
+ rtnl_addr_set_ifindex(addr, ival);
+}
+
+void nl_cli_addr_parse_label(struct rtnl_addr *addr, char *arg)
+{
+ int err;
+
+ if ((err = rtnl_addr_set_label(addr, arg)) < 0)
+ nl_cli_fatal(err, "Unable to set address label: %s",
+ nl_geterror(err));
+}
+
+void nl_cli_addr_parse_peer(struct rtnl_addr *addr, char *arg)
+{
+ struct nl_addr *a;
+ int err;
+
+ a = nl_cli_addr_parse(arg, rtnl_addr_get_family(addr));
+ if ((err = rtnl_addr_set_peer(addr, a)) < 0)
+ nl_cli_fatal(err, "Unable to set peer address: %s",
+ nl_geterror(err));
+
+ nl_addr_put(a);
+}
+
+void nl_cli_addr_parse_scope(struct rtnl_addr *addr, char *arg)
+{
+ int ival;
+
+ if ((ival = rtnl_str2scope(arg)) < 0)
+ nl_cli_fatal(EINVAL, "Unknown address scope \"%s\"", arg);
+
+ rtnl_addr_set_scope(addr, ival);
+}
+
+void nl_cli_addr_parse_broadcast(struct rtnl_addr *addr, char *arg)
+{
+ struct nl_addr *a;
+ int err;
+
+ a = nl_cli_addr_parse(arg, rtnl_addr_get_family(addr));
+ if ((err = rtnl_addr_set_broadcast(addr, a)) < 0)
+ nl_cli_fatal(err, "Unable to set broadcast address: %s",
+ nl_geterror(err));
+
+ nl_addr_put(a);
+}
+
+static uint32_t parse_lifetime(const char *arg)
+{
+ uint64_t msecs;
+ int err;
+
+ if (!strcasecmp(arg, "forever"))
+ return 0xFFFFFFFFU;
+
+ if ((err = nl_str2msec(arg, &msecs)) < 0)
+ nl_cli_fatal(err, "Unable to parse time string \"%s\": %s",
+ arg, nl_geterror(err));
+
+ return (msecs / 1000);
+}
+
+void nl_cli_addr_parse_preferred(struct rtnl_addr *addr, char *arg)
+{
+ rtnl_addr_set_preferred_lifetime(addr, parse_lifetime(arg));
+}
+
+void nl_cli_addr_parse_valid(struct rtnl_addr *addr, char *arg)
+{
+ rtnl_addr_set_valid_lifetime(addr, parse_lifetime(arg));
+}
+
+/** @} */
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/class.c b/ap/lib/libnl/libnl-3.2.25/src/lib/class.c
new file mode 100644
index 0000000..96f60cd
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/class.c
@@ -0,0 +1,45 @@
+/*
+ * src/lib/class.c CLI Class Helpers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2010-2011 Thomas Graf <tgraf@suug.ch>
+ */
+
+/**
+ * @ingroup cli
+ * @defgroup cli_class Traffic Classes
+ * @{
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/class.h>
+
+struct rtnl_class *nl_cli_class_alloc(void)
+{
+ struct rtnl_class *class;
+
+ if (!(class = rtnl_class_alloc()))
+ nl_cli_fatal(ENOMEM, "Unable to allocate class object");
+
+ return class;
+}
+
+struct nl_cache *nl_cli_class_alloc_cache(struct nl_sock *sock, int ifindex)
+{
+ struct nl_cache *cache;
+ int err;
+
+ if ((err = rtnl_class_alloc_cache(sock, ifindex, &cache)) < 0)
+ nl_cli_fatal(err, "Unable to allocate class cache: %s",
+ nl_geterror(err));
+
+ nl_cache_mngt_provide(cache);
+
+ return cache;
+}
+
+/** @} */
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/cls.c b/ap/lib/libnl/libnl-3.2.25/src/lib/cls.c
new file mode 100644
index 0000000..86d775d
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/cls.c
@@ -0,0 +1,71 @@
+/*
+ * src/lib/cls.c CLI Classifier Helpers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2010-2011 Thomas Graf <tgraf@suug.ch>
+ */
+
+/**
+ * @ingroup cli
+ * @defgroup cli_cls Classifiers
+ * @{
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/cls.h>
+#include <netlink/route/cls/ematch.h>
+
+struct rtnl_cls *nl_cli_cls_alloc(void)
+{
+ struct rtnl_cls *cls;
+
+ if (!(cls = rtnl_cls_alloc()))
+ nl_cli_fatal(ENOMEM, "Unable to allocate classifier object");
+
+ return cls;
+}
+
+struct nl_cache *nl_cli_cls_alloc_cache(struct nl_sock *sock, int ifindex,
+ uint32_t parent)
+{
+ struct nl_cache *cache;
+ int err;
+
+ if ((err = rtnl_cls_alloc_cache(sock, ifindex, parent, &cache)) < 0)
+ nl_cli_fatal(err, "Unable to allocate classifier cache: %s",
+ nl_geterror(err));
+
+ return cache;
+}
+
+void nl_cli_cls_parse_proto(struct rtnl_cls *cls, char *arg)
+{
+ int proto;
+
+ if ((proto = nl_str2ether_proto(arg)) < 0)
+ nl_cli_fatal(proto, "Unknown protocol \"%s\".", arg);
+
+ rtnl_cls_set_protocol(cls, proto);
+}
+
+struct rtnl_ematch_tree *nl_cli_cls_parse_ematch(struct rtnl_cls *cls, char *arg)
+{
+ struct rtnl_ematch_tree *tree;
+ char *errstr = NULL;
+ int err;
+
+ if ((err = rtnl_ematch_parse_expr(arg, &errstr, &tree)) < 0)
+ nl_cli_fatal(err, "Unable to parse ematch expression: %s",
+ errstr);
+
+ if (errstr)
+ free(errstr);
+
+ return tree;
+}
+
+/** @} */
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/ct.c b/ap/lib/libnl/libnl-3.2.25/src/lib/ct.c
new file mode 100644
index 0000000..c903878
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/ct.c
@@ -0,0 +1,168 @@
+/*
+ * src/lib/ct.c CLI Conntrack Helpers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2008-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+/**
+ * @ingroup cli
+ * @defgroup cli_ct Connection Tracking
+ *
+ * @{
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/ct.h>
+
+struct nfnl_ct *nl_cli_ct_alloc(void)
+{
+ struct nfnl_ct *ct;
+
+ ct = nfnl_ct_alloc();
+ if (!ct)
+ nl_cli_fatal(ENOMEM, "Unable to allocate conntrack object");
+
+ return ct;
+}
+
+struct nl_cache *nl_cli_ct_alloc_cache(struct nl_sock *sk)
+{
+ return nl_cli_alloc_cache(sk, "conntrack", nfnl_ct_alloc_cache);
+}
+
+void nl_cli_ct_parse_family(struct nfnl_ct *ct, char *arg)
+{
+ int family;
+
+ if ((family = nl_str2af(arg)) == AF_UNSPEC)
+ nl_cli_fatal(EINVAL,
+ "Unable to nl_cli_ct_parse family \"%s\": %s",
+ arg, nl_geterror(NLE_INVAL));
+
+ nfnl_ct_set_family(ct, family);
+}
+
+void nl_cli_ct_parse_protocol(struct nfnl_ct *ct, char *arg)
+{
+ int proto;
+
+ if ((proto = nl_str2ip_proto(arg)) < 0)
+ nl_cli_fatal(proto,
+ "Unable to nl_cli_ct_parse protocol \"%s\": %s",
+ arg, nl_geterror(proto));
+
+ nfnl_ct_set_proto(ct, proto);
+}
+
+void nl_cli_ct_parse_mark(struct nfnl_ct *ct, char *arg)
+{
+ uint32_t mark = nl_cli_parse_u32(arg);
+ nfnl_ct_set_mark(ct, mark);
+}
+
+void nl_cli_ct_parse_timeout(struct nfnl_ct *ct, char *arg)
+{
+ uint32_t timeout = nl_cli_parse_u32(arg);
+ nfnl_ct_set_timeout(ct, timeout);
+}
+
+void nl_cli_ct_parse_id(struct nfnl_ct *ct, char *arg)
+{
+ uint32_t id = nl_cli_parse_u32(arg);
+ nfnl_ct_set_id(ct, id);
+}
+
+void nl_cli_ct_parse_use(struct nfnl_ct *ct, char *arg)
+{
+ uint32_t use = nl_cli_parse_u32(arg);
+ nfnl_ct_set_use(ct, use);
+}
+
+void nl_cli_ct_parse_src(struct nfnl_ct *ct, int reply, char *arg)
+{
+ int err;
+ struct nl_addr *a = nl_cli_addr_parse(arg, nfnl_ct_get_family(ct));
+ if ((err = nfnl_ct_set_src(ct, reply, a)) < 0)
+ nl_cli_fatal(err, "Unable to set source address: %s",
+ nl_geterror(err));
+}
+
+void nl_cli_ct_parse_dst(struct nfnl_ct *ct, int reply, char *arg)
+{
+ int err;
+ struct nl_addr *a = nl_cli_addr_parse(arg, nfnl_ct_get_family(ct));
+ if ((err = nfnl_ct_set_dst(ct, reply, a)) < 0)
+ nl_cli_fatal(err, "Unable to set destination address: %s",
+ nl_geterror(err));
+}
+
+void nl_cli_ct_parse_src_port(struct nfnl_ct *ct, int reply, char *arg)
+{
+ uint32_t port = nl_cli_parse_u32(arg);
+ nfnl_ct_set_src_port(ct, reply, port);
+}
+
+void nl_cli_ct_parse_dst_port(struct nfnl_ct *ct, int reply, char *arg)
+{
+ uint32_t port = nl_cli_parse_u32(arg);
+ nfnl_ct_set_dst_port(ct, reply, port);
+}
+
+void nl_cli_ct_parse_tcp_state(struct nfnl_ct *ct, char *arg)
+{
+ int state;
+
+ if ((state = nfnl_ct_str2tcp_state(arg)) < 0)
+ nl_cli_fatal(state,
+ "Unable to nl_cli_ct_parse tcp state \"%s\": %s",
+ arg, nl_geterror(state));
+
+ nfnl_ct_set_tcp_state(ct, state);
+}
+
+void nl_cli_ct_parse_status(struct nfnl_ct *ct, char *arg)
+{
+ int status;
+
+ if ((status = nfnl_ct_str2status(arg)) < 0)
+ nl_cli_fatal(status,
+ "Unable to nl_cli_ct_parse flags \"%s\": %s",
+ arg, nl_geterror(status));
+
+ nfnl_ct_set_status(ct, status);
+}
+
+void nl_cli_ct_parse_zone(struct nfnl_ct *ct, char *arg)
+{
+ uint32_t zone = nl_cli_parse_u32(arg);
+ nfnl_ct_set_zone(ct, zone);
+}
+
+#if 0
+ } else if (arg_match("origicmpid")) {
+ if (argc > ++idx)
+ nfnl_ct_set_icmp_id(ct, 0, strtoul(argv[idx++], NULL, 0));
+ } else if (arg_match("origicmptype")) {
+ if (argc > ++idx)
+ nfnl_ct_set_icmp_type(ct, 0, strtoul(argv[idx++], NULL, 0));
+ } else if (arg_match("origicmpcode")) {
+ if (argc > ++idx)
+ nfnl_ct_set_icmp_code(ct, 0, strtoul(argv[idx++], NULL, 0));
+ } else if (arg_match("replyicmpid")) {
+ if (argc > ++idx)
+ nfnl_ct_set_icmp_id(ct, 1, strtoul(argv[idx++], NULL, 0));
+ } else if (arg_match("replyicmptype")) {
+ if (argc > ++idx)
+ nfnl_ct_set_icmp_type(ct, 1, strtoul(argv[idx++], NULL, 0));
+ } else if (arg_match("replyicmpcode")) {
+ if (argc > ++idx)
+ nfnl_ct_set_icmp_code(ct, 1, strtoul(argv[idx++], NULL, 0));
+ }
+#endif
+
+/** @} */
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/exp.c b/ap/lib/libnl/libnl-3.2.25/src/lib/exp.c
new file mode 100644
index 0000000..a7a74f5
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/exp.c
@@ -0,0 +1,165 @@
+/*
+ * src/lib/exp.c CLI Expectation Helpers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2008-2009 Thomas Graf <tgraf@suug.ch>
+ * Copyright (c) 2012 Rich Fought <rich.fought@watchguard.com>
+ */
+
+/**
+ * @ingroup cli
+ * @defgroup cli_exp Expectation Tracking
+ *
+ * @{
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/exp.h>
+
+struct nfnl_exp *nl_cli_exp_alloc(void)
+{
+ struct nfnl_exp *exp;
+
+ exp = nfnl_exp_alloc();
+ if (!exp)
+ nl_cli_fatal(ENOMEM, "Unable to allocate expectation object");
+
+ return exp;
+}
+
+struct nl_cache *nl_cli_exp_alloc_cache(struct nl_sock *sk)
+{
+ return nl_cli_alloc_cache(sk, "expectation", nfnl_exp_alloc_cache);
+}
+
+void nl_cli_exp_parse_family(struct nfnl_exp *exp, char *arg)
+{
+ int family;
+
+ if ((family = nl_str2af(arg)) == AF_UNSPEC)
+ nl_cli_fatal(EINVAL,
+ "Unable to nl_cli_exp_parse family \"%s\": %s",
+ arg, nl_geterror(NLE_INVAL));
+
+ nfnl_exp_set_family(exp, family);
+}
+
+void nl_cli_exp_parse_timeout(struct nfnl_exp *exp, char *arg)
+{
+ uint32_t timeout = nl_cli_parse_u32(arg);
+ nfnl_exp_set_timeout(exp, timeout);
+}
+
+void nl_cli_exp_parse_id(struct nfnl_exp *exp, char *arg)
+{
+ uint32_t id = nl_cli_parse_u32(arg);
+ nfnl_exp_set_id(exp, id);
+}
+
+void nl_cli_exp_parse_helper_name(struct nfnl_exp *exp, char *arg)
+{
+ nfnl_exp_set_helper_name(exp, arg);
+}
+
+void nl_cli_exp_parse_zone(struct nfnl_exp *exp, char *arg)
+{
+ uint32_t zone = nl_cli_parse_u32(arg);
+ nfnl_exp_set_zone(exp, zone);
+}
+
+void nl_cli_exp_parse_flags(struct nfnl_exp *exp, char *arg)
+{
+ uint32_t flags = nl_cli_parse_u32(arg);
+ nfnl_exp_set_flags(exp, flags);
+}
+
+void nl_cli_exp_parse_class(struct nfnl_exp *exp, char *arg)
+{
+ uint32_t class = nl_cli_parse_u32(arg);
+ nfnl_exp_set_class(exp, class);
+}
+
+void nl_cli_exp_parse_nat_dir(struct nfnl_exp *exp, char *arg)
+{
+ uint32_t nat_dir = nl_cli_parse_u32(arg);
+ nfnl_exp_set_nat_dir(exp, nat_dir);
+}
+
+void nl_cli_exp_parse_fn(struct nfnl_exp *exp, char *arg)
+{
+ nfnl_exp_set_fn(exp, arg);
+}
+
+void nl_cli_exp_parse_src(struct nfnl_exp *exp, int tuple, char *arg)
+{
+ int err;
+ struct nl_addr *a = nl_cli_addr_parse(arg, nfnl_exp_get_family(exp));
+ if ((err = nfnl_exp_set_src(exp, tuple, a)) < 0)
+ nl_cli_fatal(err, "Unable to set source address: %s",
+ nl_geterror(err));
+}
+
+void nl_cli_exp_parse_dst(struct nfnl_exp *exp, int tuple, char *arg)
+{
+ int err;
+ struct nl_addr *a = nl_cli_addr_parse(arg, nfnl_exp_get_family(exp));
+ if ((err = nfnl_exp_set_dst(exp, tuple, a)) < 0)
+ nl_cli_fatal(err, "Unable to set destination address: %s",
+ nl_geterror(err));
+}
+
+void nl_cli_exp_parse_l4protonum(struct nfnl_exp *exp, int tuple, char *arg)
+{
+ int l4protonum;
+
+ if ((l4protonum = nl_str2ip_proto(arg)) < 0)
+ nl_cli_fatal(l4protonum,
+ "Unable to nl_cli_exp_parse protocol \"%s\": %s",
+ arg, nl_geterror(l4protonum));
+
+ nfnl_exp_set_l4protonum(exp, tuple, l4protonum);
+}
+
+void nl_cli_exp_parse_src_port(struct nfnl_exp *exp, int tuple, char *arg)
+{
+ uint32_t sport = nl_cli_parse_u32(arg);
+ uint16_t dport = nfnl_exp_get_dst_port(exp, tuple);
+ nfnl_exp_set_ports(exp, tuple, sport, dport);
+}
+
+void nl_cli_exp_parse_dst_port(struct nfnl_exp *exp, int tuple, char *arg)
+{
+ uint32_t dport = nl_cli_parse_u32(arg);
+ uint16_t sport = nfnl_exp_get_src_port(exp, tuple);
+ nfnl_exp_set_ports(exp, tuple, sport, dport);
+}
+
+void nl_cli_exp_parse_icmp_id(struct nfnl_exp *exp, int tuple, char *arg)
+{
+ uint32_t id = nl_cli_parse_u32(arg);
+ uint8_t type = nfnl_exp_get_icmp_type(exp, tuple);
+ uint8_t code = nfnl_exp_get_icmp_code(exp, tuple);
+ nfnl_exp_set_icmp(exp, tuple, id, type, code);
+}
+
+void nl_cli_exp_parse_icmp_type(struct nfnl_exp *exp, int tuple, char *arg)
+{
+ uint32_t type = nl_cli_parse_u32(arg);
+ uint16_t id = nfnl_exp_get_icmp_id(exp, tuple);
+ uint8_t code = nfnl_exp_get_icmp_code(exp, tuple);
+ nfnl_exp_set_icmp(exp, tuple, id, type, code);
+}
+
+void nl_cli_exp_parse_icmp_code(struct nfnl_exp *exp, int tuple, char *arg)
+{
+ uint32_t code = nl_cli_parse_u32(arg);
+ uint16_t id = nfnl_exp_get_icmp_id(exp, tuple);
+ uint8_t type = nfnl_exp_get_icmp_type(exp, tuple);
+ nfnl_exp_set_icmp(exp, tuple, id, type, code);
+}
+
+/** @} */
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/link.c b/ap/lib/libnl/libnl-3.2.25/src/lib/link.c
new file mode 100644
index 0000000..5bce824
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/link.c
@@ -0,0 +1,101 @@
+/*
+ * src/lib/link.c CLI Link Helpers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2008-2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+/**
+ * @ingroup cli
+ * @defgroup cli_link Links
+ *
+ * @{
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+#include <linux/if.h>
+
+struct rtnl_link *nl_cli_link_alloc(void)
+{
+ struct rtnl_link *link;
+
+ link = rtnl_link_alloc();
+ if (!link)
+ nl_cli_fatal(ENOMEM, "Unable to allocate link object");
+
+ return link;
+}
+
+struct nl_cache *nl_cli_link_alloc_cache_family(struct nl_sock *sock, int family)
+{
+ struct nl_cache *cache;
+ int err;
+
+ if ((err = rtnl_link_alloc_cache(sock, family, &cache)) < 0)
+ nl_cli_fatal(err, "Unable to allocate link cache: %s",
+ nl_geterror(err));
+
+ nl_cache_mngt_provide(cache);
+
+ return cache;
+}
+
+struct nl_cache *nl_cli_link_alloc_cache(struct nl_sock *sock)
+{
+ return nl_cli_link_alloc_cache_family(sock, AF_UNSPEC);
+}
+
+void nl_cli_link_parse_family(struct rtnl_link *link, char *arg)
+{
+ int family;
+
+ if ((family = nl_str2af(arg)) < 0)
+ nl_cli_fatal(EINVAL,
+ "Unable to translate address family \"%s\"", arg);
+
+ rtnl_link_set_family(link, family);
+}
+
+void nl_cli_link_parse_name(struct rtnl_link *link, char *arg)
+{
+ rtnl_link_set_name(link, arg);
+}
+
+void nl_cli_link_parse_mtu(struct rtnl_link *link, char *arg)
+{
+ uint32_t mtu = nl_cli_parse_u32(arg);
+ rtnl_link_set_mtu(link, mtu);
+}
+
+void nl_cli_link_parse_ifindex(struct rtnl_link *link, char *arg)
+{
+ uint32_t index = nl_cli_parse_u32(arg);
+ rtnl_link_set_ifindex(link, index);
+}
+
+void nl_cli_link_parse_txqlen(struct rtnl_link *link, char *arg)
+{
+ uint32_t qlen = nl_cli_parse_u32(arg);
+ rtnl_link_set_txqlen(link, qlen);
+}
+
+void nl_cli_link_parse_weight(struct rtnl_link *link, char *arg)
+{
+}
+
+void nl_cli_link_parse_ifalias(struct rtnl_link *link, char *arg)
+{
+ if (strlen(arg) > IFALIASZ)
+ nl_cli_fatal(ERANGE,
+ "Link ifalias too big, must not exceed %u in length.",
+ IFALIASZ);
+
+ rtnl_link_set_ifalias(link, arg);
+}
+
+/** @} */
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/neigh.c b/ap/lib/libnl/libnl-3.2.25/src/lib/neigh.c
new file mode 100644
index 0000000..4518e46
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/neigh.c
@@ -0,0 +1,88 @@
+/*
+ * src/lib/neigh.c CLI Neighbour Helpers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2008-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+/**
+ * @ingroup cli
+ * @defgroup cli_neigh Neighbour
+ *
+ * @{
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/neigh.h>
+
+struct rtnl_neigh *nl_cli_neigh_alloc(void)
+{
+ struct rtnl_neigh *neigh;
+
+ neigh = rtnl_neigh_alloc();
+ if (!neigh)
+ nl_cli_fatal(ENOMEM, "Unable to allocate neighbour object");
+
+ return neigh;
+}
+
+void nl_cli_neigh_parse_dst(struct rtnl_neigh *neigh, char *arg)
+{
+ struct nl_addr *a;
+ int err;
+
+ a = nl_cli_addr_parse(arg, rtnl_neigh_get_family(neigh));
+ if ((err = rtnl_neigh_set_dst(neigh, a)) < 0)
+ nl_cli_fatal(err, "Unable to set local address: %s",
+ nl_geterror(err));
+
+ nl_addr_put(a);
+}
+
+void nl_cli_neigh_parse_lladdr(struct rtnl_neigh *neigh, char *arg)
+{
+ struct nl_addr *a;
+
+ a = nl_cli_addr_parse(arg, AF_UNSPEC);
+ rtnl_neigh_set_lladdr(neigh, a);
+ nl_addr_put(a);
+}
+
+void nl_cli_neigh_parse_dev(struct rtnl_neigh *neigh,
+ struct nl_cache *link_cache, char *arg)
+{
+ int ival;
+
+ if (!(ival = rtnl_link_name2i(link_cache, arg)))
+ nl_cli_fatal(ENOENT, "Link \"%s\" does not exist", arg);
+
+ rtnl_neigh_set_ifindex(neigh, ival);
+}
+
+void nl_cli_neigh_parse_family(struct rtnl_neigh *neigh, char *arg)
+{
+ int family;
+
+ if ((family = nl_str2af(arg)) == AF_UNSPEC)
+ nl_cli_fatal(EINVAL,
+ "Unable to translate address family \"%s\"", arg);
+
+ rtnl_neigh_set_family(neigh, family);
+}
+
+void nl_cli_neigh_parse_state(struct rtnl_neigh *neigh, char *arg)
+{
+ int state;
+
+ if ((state = rtnl_neigh_str2state(arg)) < 0)
+ nl_cli_fatal(state, "Unable to translate state \"%s\": %s",
+ arg, state);
+
+ rtnl_neigh_set_state(neigh, state);
+}
+
+/** @} */
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/qdisc.c b/ap/lib/libnl/libnl-3.2.25/src/lib/qdisc.c
new file mode 100644
index 0000000..ccf7d26
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/qdisc.c
@@ -0,0 +1,32 @@
+/*
+ * src/lib/qdisc.c CLI QDisc Helpers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2008-2011 Thomas Graf <tgraf@suug.ch>
+ */
+
+/**
+ * @ingroup cli
+ * @defgroup cli_qdisc Queueing Disciplines
+ * @{
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/qdisc.h>
+#include <netlink/route/class.h>
+
+struct rtnl_qdisc *nl_cli_qdisc_alloc(void)
+{
+ struct rtnl_qdisc *qdisc;
+
+ if (!(qdisc = rtnl_qdisc_alloc()))
+ nl_cli_fatal(ENOMEM, "Unable to allocate qdisc object");
+
+ return qdisc;
+}
+
+/** @} */
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/route.c b/ap/lib/libnl/libnl-3.2.25/src/lib/route.c
new file mode 100644
index 0000000..cd3e897
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/route.c
@@ -0,0 +1,278 @@
+/*
+ * src/lib/route.c CLI Route Helpers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2008-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+/**
+ * @ingroup cli
+ * @defgroup cli_route Routing
+ *
+ * @{
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/route.h>
+
+struct rtnl_route *nl_cli_route_alloc(void)
+{
+ struct rtnl_route *route;
+
+ route = rtnl_route_alloc();
+ if (!route)
+ nl_cli_fatal(ENOMEM, "Unable to allocate route object");
+
+ return route;
+}
+
+struct nl_cache *nl_cli_route_alloc_cache(struct nl_sock *sk, int flags)
+{
+ struct nl_cache *cache;
+ int err;
+
+ if ((err = rtnl_route_alloc_cache(sk, AF_UNSPEC, flags, &cache)) < 0)
+ nl_cli_fatal(err, "Unable to allocate route cache: %s\n",
+ nl_geterror(err));
+
+ nl_cache_mngt_provide(cache);
+
+ return cache;
+}
+
+void nl_cli_route_parse_family(struct rtnl_route *route, char *arg)
+{
+ int family;
+
+ if ((family = nl_str2af(arg)) != AF_UNSPEC)
+ rtnl_route_set_family(route, family);
+}
+
+void nl_cli_route_parse_dst(struct rtnl_route *route, char *arg)
+{
+ struct nl_addr *addr;
+ int err;
+
+ addr = nl_cli_addr_parse(arg, rtnl_route_get_family(route));
+ if ((err = rtnl_route_set_dst(route, addr)) < 0)
+ nl_cli_fatal(err, "Unable to set destination address: %s",
+ nl_geterror(err));
+
+ nl_addr_put(addr);
+}
+
+void nl_cli_route_parse_src(struct rtnl_route *route, char *arg)
+{
+ struct nl_addr *addr;
+ int err;
+
+ addr = nl_cli_addr_parse(arg, rtnl_route_get_family(route));
+ if ((err = rtnl_route_set_src(route, addr)) < 0)
+ nl_cli_fatal(err, "Unable to set source address: %s",
+ nl_geterror(err));
+
+ nl_addr_put(addr);
+}
+
+void nl_cli_route_parse_pref_src(struct rtnl_route *route, char *arg)
+{
+ struct nl_addr *addr;
+ int err;
+
+ addr = nl_cli_addr_parse(arg, rtnl_route_get_family(route));
+ if ((err = rtnl_route_set_pref_src(route, addr)) < 0)
+ nl_cli_fatal(err, "Unable to set preferred source address: %s",
+ nl_geterror(err));
+
+ nl_addr_put(addr);
+}
+
+void nl_cli_route_parse_metric(struct rtnl_route *route, char *subopts)
+{
+ /* strict equal order to RTAX_* */
+ static char *const tokens[] = {
+ "unspec",
+ "lock",
+ "mtu",
+ "window",
+ "rtt",
+ "rttvar",
+ "sstresh",
+ "cwnd",
+ "advmss",
+ "reordering",
+ "hoplimit",
+ "initcwnd",
+ "features",
+ NULL,
+ };
+ unsigned long lval;
+ char *arg, *endptr;
+
+ while (*subopts != '\0') {
+ int ret = getsubopt(&subopts, tokens, &arg);
+ if (ret == -1)
+ nl_cli_fatal(EINVAL, "Unknown metric token \"%s\"", arg);
+
+ if (ret == 0)
+ nl_cli_fatal(EINVAL, "Invalid metric \"%s\"", tokens[ret]);
+
+ if (arg == NULL)
+ nl_cli_fatal(EINVAL, "Metric \"%s\", no value given", tokens[ret]);
+
+ lval = strtoul(arg, &endptr, 0);
+ if (endptr == arg)
+ nl_cli_fatal(EINVAL, "Metric \"%s\", value not numeric", tokens[ret]);
+
+ if ((ret = rtnl_route_set_metric(route, ret, lval)) < 0)
+ nl_cli_fatal(ret, "Unable to set metric: %s",
+ nl_geterror(ret));
+ }
+}
+
+void nl_cli_route_parse_nexthop(struct rtnl_route *route, char *subopts,
+ struct nl_cache *link_cache)
+{
+ enum {
+ NH_DEV,
+ NH_VIA,
+ NH_WEIGHT,
+ };
+ static char *const tokens[] = {
+ "dev",
+ "via",
+ "weight",
+ NULL,
+ };
+ struct rtnl_nexthop *nh;
+ unsigned long lval;
+ struct nl_addr *addr;
+ int ival;
+ char *arg, *endptr;
+
+ if (!(nh = rtnl_route_nh_alloc()))
+ nl_cli_fatal(ENOMEM, "Out of memory");
+
+ while (*subopts != '\0') {
+ int ret = getsubopt(&subopts, tokens, &arg);
+ if (ret == -1)
+ nl_cli_fatal(EINVAL, "Unknown nexthop token \"%s\"", arg);
+
+ if (arg == NULL)
+ nl_cli_fatal(EINVAL, "Missing argument to option \"%s\"\n",
+ tokens[ret]);
+
+ switch (ret) {
+ case NH_DEV:
+ if (!(ival = rtnl_link_name2i(link_cache, arg)))
+ nl_cli_fatal(ENOENT,"Link \"%s\" does not exist", arg);
+
+ rtnl_route_nh_set_ifindex(nh, ival);
+ break;
+
+ case NH_VIA:
+ addr = nl_cli_addr_parse(arg,rtnl_route_get_family(route));
+ rtnl_route_nh_set_gateway(nh, addr);
+ nl_addr_put(addr);
+ break;
+
+ case NH_WEIGHT:
+ lval = strtoul(arg, &endptr, 0);
+ if (endptr == arg)
+ nl_cli_fatal(EINVAL,
+ "Invalid weight \"%s\", not numeric",
+ arg);
+ rtnl_route_nh_set_weight(nh, lval);
+ break;
+ }
+ }
+
+ rtnl_route_add_nexthop(route, nh);
+}
+
+void nl_cli_route_parse_table(struct rtnl_route *route, char *arg)
+{
+ unsigned long lval;
+ char *endptr;
+ int table;
+
+ lval = strtoul(arg, &endptr, 0);
+ if (endptr == arg) {
+ if ((table = rtnl_route_str2table(arg)) < 0)
+ nl_cli_fatal(EINVAL, "Unknown table name \"%s\"", arg);
+ }
+ else {
+ table = lval;
+ }
+
+ rtnl_route_set_table(route, table);
+}
+
+void nl_cli_route_parse_prio(struct rtnl_route *route, char *arg)
+{
+ unsigned long lval;
+ char *endptr;
+
+ lval = strtoul(arg, &endptr, 0);
+ if (endptr == arg)
+ nl_cli_fatal(EINVAL, "Invalid priority value, not numeric");
+ rtnl_route_set_priority(route, lval);
+}
+
+void nl_cli_route_parse_scope(struct rtnl_route *route, char *arg)
+{
+ int ival;
+
+ if ((ival = rtnl_str2scope(arg)) < 0)
+ nl_cli_fatal(EINVAL, "Unknown routing scope \"%s\"", arg);
+
+ rtnl_route_set_scope(route, ival);
+}
+
+void nl_cli_route_parse_protocol(struct rtnl_route *route, char *arg)
+{
+ unsigned long lval;
+ char *endptr;
+ int proto;
+
+ lval = strtoul(arg, &endptr, 0);
+ if (endptr == arg) {
+ if ((proto = rtnl_route_str2proto(arg)) < 0)
+ nl_cli_fatal(EINVAL,
+ "Unknown routing protocol name \"%s\"",
+ arg);
+ }
+ else {
+ proto = lval;
+ }
+
+ rtnl_route_set_protocol(route, proto);
+}
+
+void nl_cli_route_parse_type(struct rtnl_route *route, char *arg)
+{
+ int ival;
+
+ if ((ival = nl_str2rtntype(arg)) < 0)
+ nl_cli_fatal(EINVAL, "Unknown routing type \"%s\"", arg);
+
+ if ((ival = rtnl_route_set_type(route, ival)) < 0)
+ nl_cli_fatal(ival, "Unable to set routing type: %s",
+ nl_geterror(ival));
+}
+
+void nl_cli_route_parse_iif(struct rtnl_route *route, char *arg, struct nl_cache *link_cache)
+{
+ int ival;
+
+ if (!(ival = rtnl_link_name2i(link_cache, arg)))
+ nl_cli_fatal(ENOENT, "Link \"%s\" does not exist", arg);
+
+ rtnl_route_set_iif(route, ival);
+}
+
+/** @} */
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/rule.c b/ap/lib/libnl/libnl-3.2.25/src/lib/rule.c
new file mode 100644
index 0000000..96f1d4c
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/rule.c
@@ -0,0 +1,55 @@
+/*
+ * src/lib/rule.c CLI Routing Rule Helpers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2008-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+/**
+ * @ingroup cli
+ * @defgroup cli_rule Routing Rules
+ *
+ * @{
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/rule.h>
+
+struct rtnl_rule *nl_cli_rule_alloc(void)
+{
+ struct rtnl_rule *rule;
+
+ rule = rtnl_rule_alloc();
+ if (!rule)
+ nl_cli_fatal(ENOMEM, "Unable to allocate rule object");
+
+ return rule;
+}
+
+struct nl_cache *nl_cli_rule_alloc_cache(struct nl_sock *sk)
+{
+ struct nl_cache *cache;
+ int err;
+
+ if ((err = rtnl_rule_alloc_cache(sk, AF_UNSPEC, &cache)) < 0)
+ nl_cli_fatal(err, "Unable to allocate routing rule cache: %s\n",
+ nl_geterror(err));
+
+ nl_cache_mngt_provide(cache);
+
+ return cache;
+}
+
+void nl_cli_rule_parse_family(struct rtnl_rule *rule, char *arg)
+{
+ int family;
+
+ if ((family = nl_str2af(arg)) != AF_UNSPEC)
+ rtnl_rule_set_family(rule, family);
+}
+
+/** @} */
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/tc.c b/ap/lib/libnl/libnl-3.2.25/src/lib/tc.c
new file mode 100644
index 0000000..dde729f
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/tc.c
@@ -0,0 +1,165 @@
+/*
+ * src/lib/tc.c CLI Traffic Control Helpers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/tc.h>
+#include <netlink-private/route/tc-api.h>
+
+/**
+ * @ingroup cli
+ * @defgroup cli_tc Traffic Control
+ * @{
+ */
+void nl_cli_tc_parse_dev(struct rtnl_tc *tc, struct nl_cache *link_cache, char *name)
+{
+ struct rtnl_link *link;
+
+ link = rtnl_link_get_by_name(link_cache, name);
+ if (!link)
+ nl_cli_fatal(ENOENT, "Link \"%s\" does not exist.", name);
+
+ rtnl_tc_set_link(tc, link);
+ rtnl_link_put(link);
+}
+
+void nl_cli_tc_parse_parent(struct rtnl_tc *tc, char *arg)
+{
+ uint32_t parent;
+ int err;
+
+ if ((err = rtnl_tc_str2handle(arg, &parent)) < 0)
+ nl_cli_fatal(err, "Unable to parse handle \"%s\": %s",
+ arg, nl_geterror(err));
+
+ rtnl_tc_set_parent(tc, parent);
+}
+
+void nl_cli_tc_parse_handle(struct rtnl_tc *tc, char *arg, int create)
+{
+ uint32_t handle, parent;
+ int err;
+
+ parent = rtnl_tc_get_parent(tc);
+
+ if ((err = rtnl_tc_str2handle(arg, &handle)) < 0) {
+ if (err == -NLE_OBJ_NOTFOUND && create)
+ err = rtnl_classid_generate(arg, &handle, parent);
+
+ if (err < 0)
+ nl_cli_fatal(err, "Unable to parse handle \"%s\": %s",
+ arg, nl_geterror(err));
+ }
+
+ rtnl_tc_set_handle(tc, handle);
+}
+
+void nl_cli_tc_parse_mtu(struct rtnl_tc *tc, char *arg)
+{
+ rtnl_tc_set_mtu(tc, nl_cli_parse_u32(arg));
+}
+
+void nl_cli_tc_parse_mpu(struct rtnl_tc *tc, char *arg)
+{
+ rtnl_tc_set_mpu(tc, nl_cli_parse_u32(arg));
+}
+
+void nl_cli_tc_parse_overhead(struct rtnl_tc *tc, char *arg)
+{
+ rtnl_tc_set_overhead(tc, nl_cli_parse_u32(arg));
+}
+
+void nl_cli_tc_parse_kind(struct rtnl_tc *tc, char *arg)
+{
+ rtnl_tc_set_kind(tc, arg);
+}
+
+void nl_cli_tc_parse_linktype(struct rtnl_tc *tc, char *arg)
+{
+ int type;
+
+ if ((type = nl_str2llproto(arg)) < 0)
+ nl_cli_fatal(type, "Unable to parse linktype \"%s\": %s",
+ arg, nl_geterror(type));
+
+ rtnl_tc_set_linktype(tc, type);
+}
+
+static NL_LIST_HEAD(tc_modules);
+
+static struct nl_cli_tc_module *__nl_cli_tc_lookup(struct rtnl_tc_ops *ops)
+{
+ struct nl_cli_tc_module *tm;
+
+ nl_list_for_each_entry(tm, &tc_modules, tm_list)
+ if (tm->tm_ops == ops)
+ return tm;
+
+ return NULL;
+}
+
+struct nl_cli_tc_module *nl_cli_tc_lookup(struct rtnl_tc_ops *ops)
+{
+ struct nl_cli_tc_module *tm;
+
+ if ((tm = __nl_cli_tc_lookup(ops)))
+ return tm;
+
+ switch (ops->to_type) {
+ case RTNL_TC_TYPE_QDISC:
+ case RTNL_TC_TYPE_CLASS:
+ nl_cli_load_module("cli/qdisc", ops->to_kind);
+ break;
+
+ case RTNL_TC_TYPE_CLS:
+ nl_cli_load_module("cli/cls", ops->to_kind);
+ break;
+
+ default:
+ nl_cli_fatal(EINVAL, "BUG: unhandled TC object type %d",
+ ops->to_type);
+ }
+
+ if (!(tm = __nl_cli_tc_lookup(ops))) {
+ nl_cli_fatal(EINVAL, "Application bug: The shared library for "
+ "the tc object \"%s\" was successfully loaded but it "
+ "seems that module did not register itself",
+ ops->to_kind);
+ }
+
+ return tm;
+}
+
+void nl_cli_tc_register(struct nl_cli_tc_module *tm)
+{
+ struct rtnl_tc_ops *ops;
+
+ if (!(ops = rtnl_tc_lookup_ops(tm->tm_type, tm->tm_name))) {
+ nl_cli_fatal(ENOENT, "Unable to register CLI TC module "
+ "\"%s\": No matching libnl TC module found.", tm->tm_name);
+ }
+
+ if (__nl_cli_tc_lookup(ops)) {
+ nl_cli_fatal(EEXIST, "Unable to register CLI TC module "
+ "\"%s\": Module already registered.", tm->tm_name);
+ }
+
+ tm->tm_ops = ops;
+
+ nl_list_add_tail(&tm->tm_list, &tc_modules);
+}
+
+void nl_cli_tc_unregister(struct nl_cli_tc_module *tm)
+{
+ nl_list_del(&tm->tm_list);
+}
+
+
+/** @} */
diff --git a/ap/lib/libnl/libnl-3.2.25/src/lib/utils.c b/ap/lib/libnl/libnl-3.2.25/src/lib/utils.c
new file mode 100644
index 0000000..e5eacde
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/lib/utils.c
@@ -0,0 +1,196 @@
+/*
+ * src/utils.c Utilities
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+/**
+ * @defgroup cli Command Line Interface API
+ *
+ * @{
+ *
+ * These modules provide an interface for text based applications. The
+ * functions provided are wrappers for their libnl equivalent with
+ * added error handling. The functions check for allocation failures,
+ * invalid input, and unknown types and will print error messages
+ * accordingly via nl_cli_fatal().
+ */
+
+#include <netlink/cli/utils.h>
+
+/**
+ * Parse a text based 32 bit unsigned integer argument
+ * @arg arg Integer in text form.
+ *
+ * Tries to convert the number provided in arg to a uint32_t. Will call
+ * nl_cli_fatal() if the conversion fails.
+ *
+ * @return 32bit unsigned integer.
+ */
+uint32_t nl_cli_parse_u32(const char *arg)
+{
+ unsigned long lval;
+ char *endptr;
+
+ lval = strtoul(arg, &endptr, 0);
+ if (endptr == arg || lval == ULONG_MAX)
+ nl_cli_fatal(EINVAL, "Unable to parse \"%s\", not a number.",
+ arg);
+
+ return (uint32_t) lval;
+}
+
+void nl_cli_print_version(void)
+{
+ printf("libnl tools version %s\n", LIBNL_VERSION);
+ printf(
+ "Copyright (C) 2003-2010 Thomas Graf <tgraf@redhat.com>\n"
+ "\n"
+ "This program comes with ABSOLUTELY NO WARRANTY. This is free \n"
+ "software, and you are welcome to redistribute it under certain\n"
+ "conditions. See the GNU General Public License for details.\n"
+ );
+
+ exit(0);
+}
+
+/**
+ * Print error message and quit application
+ * @arg err Error code.
+ * @arg fmt Error message.
+ *
+ * Prints the formatted error message to stderr and quits the application
+ * using the provided error code.
+ */
+void nl_cli_fatal(int err, const char *fmt, ...)
+{
+ va_list ap;
+ char buf[256];
+
+ fprintf(stderr, "Error: ");
+
+ if (fmt) {
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ fprintf(stderr, "\n");
+ } else
+ fprintf(stderr, "%s\n", strerror_r(err, buf, sizeof(buf)));
+
+ exit(abs(err));
+}
+
+int nl_cli_connect(struct nl_sock *sk, int protocol)
+{
+ int err;
+
+ if ((err = nl_connect(sk, protocol)) < 0)
+ nl_cli_fatal(err, "Unable to connect netlink socket: %s",
+ nl_geterror(err));
+
+ return err;
+}
+
+struct nl_sock *nl_cli_alloc_socket(void)
+{
+ struct nl_sock *sock;
+
+ if (!(sock = nl_socket_alloc()))
+ nl_cli_fatal(ENOBUFS, "Unable to allocate netlink socket");
+
+ return sock;
+}
+
+struct nl_addr *nl_cli_addr_parse(const char *str, int family)
+{
+ struct nl_addr *addr;
+ int err;
+
+ if ((err = nl_addr_parse(str, family, &addr)) < 0)
+ nl_cli_fatal(err, "Unable to parse address \"%s\": %s",
+ str, nl_geterror(err));
+
+ return addr;
+}
+
+int nl_cli_parse_dumptype(const char *str)
+{
+ if (!strcasecmp(str, "brief"))
+ return NL_DUMP_LINE;
+ else if (!strcasecmp(str, "details") || !strcasecmp(str, "detailed"))
+ return NL_DUMP_DETAILS;
+ else if (!strcasecmp(str, "stats"))
+ return NL_DUMP_STATS;
+ else
+ nl_cli_fatal(EINVAL, "Invalid dump type \"%s\".\n", str);
+
+ return 0;
+}
+
+int nl_cli_confirm(struct nl_object *obj, struct nl_dump_params *params,
+ int default_yes)
+{
+ nl_object_dump(obj, params);
+
+ for (;;) {
+ char buf[32] = { 0 };
+ int answer;
+
+ printf("Delete? (%c/%c) ",
+ default_yes ? 'Y' : 'y',
+ default_yes ? 'n' : 'N');
+
+ if (!fgets(buf, sizeof(buf), stdin)) {
+ fprintf(stderr, "Error while reading\n.");
+ continue;
+ }
+
+ switch ((answer = tolower(buf[0]))) {
+ case '\n':
+ answer = default_yes ? 'y' : 'n';
+ case 'y':
+ case 'n':
+ return answer == 'y';
+ }
+
+ fprintf(stderr, "Invalid input, try again.\n");
+ }
+
+ return 0;
+
+}
+
+struct nl_cache *nl_cli_alloc_cache(struct nl_sock *sock, const char *name,
+ int (*ac)(struct nl_sock *, struct nl_cache **))
+{
+ struct nl_cache *cache;
+ int err;
+
+ if ((err = ac(sock, &cache)) < 0)
+ nl_cli_fatal(err, "Unable to allocate %s cache: %s",
+ name, nl_geterror(err));
+
+ nl_cache_mngt_provide(cache);
+
+ return cache;
+}
+
+void nl_cli_load_module(const char *prefix, const char *name)
+{
+ char path[FILENAME_MAX+1];
+ void *handle;
+
+ snprintf(path, sizeof(path), "%s/%s/%s.so",
+ PKGLIBDIR, prefix, name);
+
+ if (!(handle = dlopen(path, RTLD_NOW)))
+ nl_cli_fatal(ENOENT, "Unable to load module \"%s\": %s\n",
+ path, dlerror());
+}
+
+/** @} */
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nf-ct-add.c b/ap/lib/libnl/libnl-3.2.25/src/nf-ct-add.c
new file mode 100644
index 0000000..8ad4c53
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nf-ct-add.c
@@ -0,0 +1,142 @@
+/*
+ * src/nf-ct-list.c List Conntrack Entries
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ * Copyright (c) 2007 Philip Craig <philipc@snapgear.com>
+ * Copyright (c) 2007 Secure Computing Corporation
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/ct.h>
+
+static int quiet = 0;
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nf-ct-add [OPTION]... [CONNTRACK ENTRY]\n"
+ "\n"
+ "Options\n"
+ " -q, --quiet Do not print informal notifications.\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Conntrack Selection\n"
+ " -p, --proto=PROTOCOL Protocol\n"
+ " --orig-src=ADDR Original source address\n"
+ " --orig-sport=PORT Original source port\n"
+ " --orig-dst=ADDR Original destination address\n"
+ " --orig-dport=PORT Original destination port\n"
+ " --reply-src=ADDR Reply source address\n"
+ " --reply-sport=PORT Reply source port\n"
+ " --reply-dst=ADDR Reply destination address\n"
+ " --reply-dport=PORT Reply destination port\n"
+ " -F, --family=FAMILY Address family\n"
+ " --mark=NUM Mark value\n"
+ " --timeout=NUM Timeout value\n"
+ " --status Bitset representing status of connection.\n"
+ " --zone=NUM Zone value\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nfnl_ct *ct;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err, nlflags = NLM_F_CREATE;
+
+ ct = nl_cli_ct_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_ORIG_SRC = 257,
+ ARG_ORIG_SPORT = 258,
+ ARG_ORIG_DST,
+ ARG_ORIG_DPORT,
+ ARG_REPLY_SRC,
+ ARG_REPLY_SPORT,
+ ARG_REPLY_DST,
+ ARG_REPLY_DPORT,
+ ARG_MARK,
+ ARG_TIMEOUT,
+ ARG_STATUS,
+ ARG_ZONE,
+ };
+ static struct option long_opts[] = {
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "proto", 1, 0, 'p' },
+ { "orig-src", 1, 0, ARG_ORIG_SRC },
+ { "orig-sport", 1, 0, ARG_ORIG_SPORT },
+ { "orig-dst", 1, 0, ARG_ORIG_DST },
+ { "orig-dport", 1, 0, ARG_ORIG_DPORT },
+ { "reply-src", 1, 0, ARG_REPLY_SRC },
+ { "reply-sport", 1, 0, ARG_REPLY_SPORT },
+ { "reply-dst", 1, 0, ARG_REPLY_DST },
+ { "reply-dport", 1, 0, ARG_REPLY_DPORT },
+ { "family", 1, 0, 'F' },
+ { "mark", 1, 0, ARG_MARK },
+ { "timeout", 1, 0, ARG_TIMEOUT },
+ { "status", 1, 0, ARG_STATUS },
+ { "zone", 1, 0, ARG_ZONE },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "46q:hv:p:F:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case '?': exit(NLE_INVAL);
+ case 'q': quiet = 1; break;
+ case '4': nfnl_ct_set_family(ct, AF_INET); break;
+ case '6': nfnl_ct_set_family(ct, AF_INET6); break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'p': nl_cli_ct_parse_protocol(ct, optarg); break;
+ case ARG_ORIG_SRC: nl_cli_ct_parse_src(ct, 0, optarg); break;
+ case ARG_ORIG_SPORT: nl_cli_ct_parse_src_port(ct, 0, optarg); break;
+ case ARG_ORIG_DST: nl_cli_ct_parse_dst(ct, 0, optarg); break;
+ case ARG_ORIG_DPORT: nl_cli_ct_parse_dst_port(ct, 0, optarg); break;
+ case ARG_REPLY_SRC: nl_cli_ct_parse_src(ct, 1, optarg); break;
+ case ARG_REPLY_SPORT: nl_cli_ct_parse_src_port(ct, 1, optarg); break;
+ case ARG_REPLY_DST: nl_cli_ct_parse_dst(ct, 1, optarg); break;
+ case ARG_REPLY_DPORT: nl_cli_ct_parse_dst_port(ct, 1, optarg); break;
+ case 'F': nl_cli_ct_parse_family(ct, optarg); break;
+ case ARG_MARK: nl_cli_ct_parse_mark(ct, optarg); break;
+ case ARG_TIMEOUT: nl_cli_ct_parse_timeout(ct, optarg); break;
+ case ARG_STATUS: nl_cli_ct_parse_status(ct, optarg); break;
+ case ARG_ZONE: nl_cli_ct_parse_zone(ct, optarg); break;
+ }
+ }
+
+ if (!quiet) {
+ printf("Adding ");
+ nl_object_dump(OBJ_CAST(ct), ¶ms);
+ }
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_NETFILTER);
+
+ if ((err = nfnl_ct_add(sock, ct, nlflags)) < 0)
+ nl_cli_fatal(err, "Unable to add conntrack: %s", nl_geterror(err));
+
+ if (!quiet) {
+ printf("Added ");
+ nl_object_dump(OBJ_CAST(ct), ¶ms);
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nf-ct-list.c b/ap/lib/libnl/libnl-3.2.25/src/nf-ct-list.c
new file mode 100644
index 0000000..5f72998
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nf-ct-list.c
@@ -0,0 +1,136 @@
+/*
+ * src/nf-ct-list.c List Conntrack Entries
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ * Copyright (c) 2007 Philip Craig <philipc@snapgear.com>
+ * Copyright (c) 2007 Secure Computing Corporation
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/ct.h>
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nf-ct-list [OPTION]... [CONNTRACK ENTRY]\n"
+ "\n"
+ "Options\n"
+ " -f, --format=TYPE Output format { brief | details | stats }\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Conntrack Selection\n"
+ " -i, --id=NUM Identifier\n"
+ " -p, --proto=PROTOCOL Protocol\n"
+ " --tcp-state=STATE TCP connection state\n"
+ " --orig-src=ADDR Original source address\n"
+ " --orig-sport=PORT Original source port\n"
+ " --orig-dst=ADDR Original destination address\n"
+ " --orig-dport=PORT Original destination port\n"
+ " --reply-src=ADDR Reply source address\n"
+ " --reply-sport=PORT Reply source port\n"
+ " --reply-dst=ADDR Reply destination address\n"
+ " --reply-dport=PORT Reply destination port\n"
+ " -F, --family=FAMILY Address family\n"
+ " --mark=NUM Mark value\n"
+ " --timeout=NUM Timeout value\n"
+ " --refcnt=NUM Use counter value\n"
+ " --flags Flags\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *ct_cache;
+ struct nfnl_ct *ct;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+
+ ct = nl_cli_ct_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_MARK = 257,
+ ARG_TCP_STATE = 258,
+ ARG_ORIG_SRC,
+ ARG_ORIG_SPORT,
+ ARG_ORIG_DST,
+ ARG_ORIG_DPORT,
+ ARG_REPLY_SRC,
+ ARG_REPLY_SPORT,
+ ARG_REPLY_DST,
+ ARG_REPLY_DPORT,
+ ARG_TIMEOUT,
+ ARG_REFCNT,
+ ARG_FLAGS,
+ };
+ static struct option long_opts[] = {
+ { "format", 1, 0, 'f' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "id", 1, 0, 'i' },
+ { "proto", 1, 0, 'p' },
+ { "tcp-state", 1, 0, ARG_TCP_STATE },
+ { "orig-src", 1, 0, ARG_ORIG_SRC },
+ { "orig-sport", 1, 0, ARG_ORIG_SPORT },
+ { "orig-dst", 1, 0, ARG_ORIG_DST },
+ { "orig-dport", 1, 0, ARG_ORIG_DPORT },
+ { "reply-src", 1, 0, ARG_REPLY_SRC },
+ { "reply-sport", 1, 0, ARG_REPLY_SPORT },
+ { "reply-dst", 1, 0, ARG_REPLY_DST },
+ { "reply-dport", 1, 0, ARG_REPLY_DPORT },
+ { "family", 1, 0, 'F' },
+ { "mark", 1, 0, ARG_MARK },
+ { "timeout", 1, 0, ARG_TIMEOUT },
+ { "refcnt", 1, 0, ARG_REFCNT },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "46f:hvi:p:F:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case '?': exit(NLE_INVAL);
+ case '4': nfnl_ct_set_family(ct, AF_INET); break;
+ case '6': nfnl_ct_set_family(ct, AF_INET6); break;
+ case 'f': params.dp_type = nl_cli_parse_dumptype(optarg); break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'i': nl_cli_ct_parse_id(ct, optarg); break;
+ case 'p': nl_cli_ct_parse_protocol(ct, optarg); break;
+ case ARG_TCP_STATE: nl_cli_ct_parse_tcp_state(ct, optarg); break;
+ case ARG_ORIG_SRC: nl_cli_ct_parse_src(ct, 0, optarg); break;
+ case ARG_ORIG_SPORT: nl_cli_ct_parse_src_port(ct, 0, optarg); break;
+ case ARG_ORIG_DST: nl_cli_ct_parse_dst(ct, 0, optarg); break;
+ case ARG_ORIG_DPORT: nl_cli_ct_parse_dst_port(ct, 0, optarg); break;
+ case ARG_REPLY_SRC: nl_cli_ct_parse_src(ct, 1, optarg); break;
+ case ARG_REPLY_SPORT: nl_cli_ct_parse_src_port(ct, 1, optarg); break;
+ case ARG_REPLY_DST: nl_cli_ct_parse_dst(ct, 1, optarg); break;
+ case ARG_REPLY_DPORT: nl_cli_ct_parse_dst_port(ct, 1, optarg); break;
+ case 'F': nl_cli_ct_parse_family(ct, optarg); break;
+ case ARG_MARK: nl_cli_ct_parse_mark(ct, optarg); break;
+ case ARG_TIMEOUT: nl_cli_ct_parse_timeout(ct, optarg); break;
+ case ARG_REFCNT: nl_cli_ct_parse_use(ct, optarg); break;
+ case ARG_FLAGS: nl_cli_ct_parse_status(ct, optarg); break;
+ }
+ }
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_NETFILTER);
+ ct_cache = nl_cli_ct_alloc_cache(sock);
+
+ nl_cache_dump_filter(ct_cache, ¶ms, OBJ_CAST(ct));
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nf-exp-add.c b/ap/lib/libnl/libnl-3.2.25/src/nf-exp-add.c
new file mode 100644
index 0000000..4b7f9d9
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nf-exp-add.c
@@ -0,0 +1,187 @@
+/*
+ * src/nf-exp-add.c Create an expectation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ * Copyright (c) 2007 Philip Craig <philipc@snapgear.com>
+ * Copyright (c) 2007 Secure Computing Corporation
+ * Copyright (c) 2012 Rich Fought <rich.fought@watchguard.com>
+ *
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/exp.h>
+
+static int quiet = 0;
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nf-exp-list [OPTION]... [CONNTRACK ENTRY]\n"
+ "\n"
+ "Options\n"
+ " --replace Replace the address if it exists.\n"
+ " -q, --quiet Do not print informal notifications.\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Expectation Selection\n"
+ " -i, --id=NUM Identifier\n"
+ " --expect-proto=PROTOCOL Expectation protocol\n"
+ " --expect-src=ADDR Expectation source address\n"
+ " --expect-sport=PORT Expectation source port\n"
+ " --expect-dst=ADDR Expectation destination address\n"
+ " --expect-dport=PORT Expectation destination port\n"
+ " --master-proto=PROTOCOL Master conntrack protocol\n"
+ " --master-src=ADDR Master conntrack source address\n"
+ " --master-sport=PORT Master conntrack source port\n"
+ " --master-dst=ADDR Master conntrack destination address\n"
+ " --master-dport=PORT Master conntrack destination port\n"
+ " --mask-proto=PROTOCOL Mask protocol\n"
+ " --mask-src=ADDR Mask source address\n"
+ " --mask-sport=PORT Mask source port\n"
+ " --mask-dst=ADDR Mask destination address\n"
+ " --mask-dport=PORT Mask destination port\n"
+ " -F, --family=FAMILY Address family\n"
+ " --timeout=NUM Timeout value\n"
+ " --helper=STRING Helper Name\n"
+ " --flags Flags (Kernel 2.6.37)\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nfnl_exp *exp;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err, nlflags = NLM_F_CREATE;
+
+ exp = nl_cli_exp_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_MARK = 270,
+ ARG_TCP_STATE = 271,
+ ARG_EXPECT_PROTO,
+ ARG_EXPECT_SRC,
+ ARG_EXPECT_SPORT,
+ ARG_EXPECT_DST,
+ ARG_EXPECT_DPORT,
+ ARG_MASTER_PROTO,
+ ARG_MASTER_SRC,
+ ARG_MASTER_SPORT,
+ ARG_MASTER_DST,
+ ARG_MASTER_DPORT,
+ ARG_MASK_PROTO,
+ ARG_MASK_SRC,
+ ARG_MASK_SPORT,
+ ARG_MASK_DST,
+ ARG_MASK_DPORT,
+ ARG_NAT_PROTO,
+ ARG_NAT_SRC,
+ ARG_NAT_SPORT,
+ ARG_NAT_DST,
+ ARG_NAT_DPORT,
+ ARG_NAT_DIR,
+ ARG_TIMEOUT,
+ ARG_HELPER_NAME,
+ ARG_REPLACE,
+ ARG_FLAGS,
+ };
+ static struct option long_opts[] = {
+ { "replace", 1, 0, ARG_REPLACE },
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "id", 1, 0, 'i' },
+ { "expect-proto", 1, 0, ARG_EXPECT_PROTO },
+ { "expect-src", 1, 0, ARG_EXPECT_SRC },
+ { "expect-sport", 1, 0, ARG_EXPECT_SPORT },
+ { "expect-dst", 1, 0, ARG_EXPECT_DST },
+ { "expect-dport", 1, 0, ARG_EXPECT_DPORT },
+ { "master-proto", 1, 0, ARG_MASTER_PROTO },
+ { "master-src", 1, 0, ARG_MASTER_SRC },
+ { "master-sport", 1, 0, ARG_MASTER_SPORT },
+ { "master-dst", 1, 0, ARG_MASTER_DST },
+ { "master-dport", 1, 0, ARG_MASTER_DPORT },
+ { "mask-proto", 1, 0, ARG_MASK_PROTO },
+ { "mask-src", 1, 0, ARG_MASK_SRC },
+ { "mask-sport", 1, 0, ARG_MASK_SPORT },
+ { "mask-dst", 1, 0, ARG_MASK_DST },
+ { "mask-dport", 1, 0, ARG_MASK_DPORT },
+ { "nat-proto", 1, 0, ARG_NAT_PROTO },
+ { "nat-src", 1, 0, ARG_NAT_SRC },
+ { "nat-sport", 1, 0, ARG_NAT_SPORT },
+ { "nat-dst", 1, 0, ARG_NAT_DST },
+ { "nat-dport", 1, 0, ARG_NAT_DPORT },
+ { "nat-dir", 1, 0, ARG_NAT_DIR },
+ { "family", 1, 0, 'F' },
+ { "timeout", 1, 0, ARG_TIMEOUT },
+ { "helper", 1, 0, ARG_HELPER_NAME },
+ { "flags", 1, 0, ARG_FLAGS},
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "46f:hvi:p:F:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case '?': exit(NLE_INVAL);
+ case ARG_REPLACE: nlflags |= NLM_F_REPLACE; break;
+ case 'q': quiet = 1; break;
+ case '4': nfnl_exp_set_family(exp, AF_INET); break;
+ case '6': nfnl_exp_set_family(exp, AF_INET6); break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'i': nl_cli_exp_parse_id(exp, optarg); break;
+ case ARG_EXPECT_PROTO: nl_cli_exp_parse_l4protonum(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_EXPECT_SRC: nl_cli_exp_parse_src(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_EXPECT_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_EXPECT_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_EXPECT_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_MASTER_PROTO: nl_cli_exp_parse_l4protonum(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASTER_SRC: nl_cli_exp_parse_src(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASTER_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASTER_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASTER_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASK_PROTO: nl_cli_exp_parse_l4protonum(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
+ case ARG_MASK_SRC: nl_cli_exp_parse_src(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
+ case ARG_MASK_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
+ case ARG_MASK_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
+ case ARG_MASK_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
+ case ARG_NAT_PROTO: nl_cli_exp_parse_l4protonum(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
+ case ARG_NAT_SRC: nl_cli_exp_parse_src(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
+ case ARG_NAT_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
+ case ARG_NAT_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
+ case ARG_NAT_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_NAT, optarg); break;
+ case ARG_NAT_DIR: nl_cli_exp_parse_nat_dir(exp, optarg); break;
+ case 'F': nl_cli_exp_parse_family(exp, optarg); break;
+ case ARG_TIMEOUT: nl_cli_exp_parse_timeout(exp, optarg); break;
+ case ARG_HELPER_NAME: nl_cli_exp_parse_helper_name(exp, optarg); break;
+ case ARG_FLAGS: nl_cli_exp_parse_flags(exp, optarg); break;
+ }
+ }
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_NETFILTER);
+
+ if ((err = nfnl_exp_add(sock, exp, nlflags)) < 0)
+ nl_cli_fatal(err, "Unable to add expectation: %s", nl_geterror(err));
+
+ if (!quiet) {
+ printf("Added ");
+ nl_object_dump(OBJ_CAST(exp), ¶ms);
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nf-exp-delete.c b/ap/lib/libnl/libnl-3.2.25/src/nf-exp-delete.c
new file mode 100644
index 0000000..2ec45ae
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nf-exp-delete.c
@@ -0,0 +1,165 @@
+/*
+ * src/nf-exp-delete.c Delete an expectation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ * Copyright (c) 2007 Philip Craig <philipc@snapgear.com>
+ * Copyright (c) 2007 Secure Computing Corporation
+ * Copyright (c) 2012 Rich Fought <rich.fought@watchguard.com>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/exp.h>
+
+static int quiet = 0;
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nf-exp-list [OPTION]... [CONNTRACK ENTRY]\n"
+ "\n"
+ "Options\n"
+ " --replace Replace the address if it exists.\n"
+ " -q, --quiet Do not print informal notifications.\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Expectation Selection\n"
+ " -i, --id=NUM Identifier\n"
+ " --expect-proto=PROTOCOL Expectation protocol\n"
+ " --expect-src=ADDR Expectation source address\n"
+ " --expect-sport=PORT Expectation source port\n"
+ " --expect-dst=ADDR Expectation destination address\n"
+ " --expect-dport=PORT Expectation destination port\n"
+ " --master-proto=PROTOCOL Master conntrack protocol\n"
+ " --master-src=ADDR Master conntrack source address\n"
+ " --master-sport=PORT Master conntrack source port\n"
+ " --master-dst=ADDR Master conntrack destination address\n"
+ " --master-dport=PORT Master conntrack destination port\n"
+ " --mask-proto=PROTOCOL Mask protocol\n"
+ " --mask-src=ADDR Mask source address\n"
+ " --mask-sport=PORT Mask source port\n"
+ " --mask-dst=ADDR Mask destination address\n"
+ " --mask-dport=PORT Mask destination port\n"
+ " -F, --family=FAMILY Address family\n"
+ " --timeout=NUM Timeout value\n"
+ " --helper=STRING Helper Name\n"
+ " --flags Flags\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nfnl_exp *exp;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err, nlflags = 0;
+
+ exp = nl_cli_exp_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_MARK = 270,
+ ARG_TCP_STATE = 271,
+ ARG_EXPECT_PROTO,
+ ARG_EXPECT_SRC,
+ ARG_EXPECT_SPORT,
+ ARG_EXPECT_DST,
+ ARG_EXPECT_DPORT,
+ ARG_MASTER_PROTO,
+ ARG_MASTER_SRC,
+ ARG_MASTER_SPORT,
+ ARG_MASTER_DST,
+ ARG_MASTER_DPORT,
+ ARG_MASK_PROTO,
+ ARG_MASK_SRC,
+ ARG_MASK_SPORT,
+ ARG_MASK_DST,
+ ARG_MASK_DPORT,
+ ARG_TIMEOUT,
+ ARG_HELPER_NAME,
+ ARG_FLAGS,
+ };
+ static struct option long_opts[] = {
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "id", 1, 0, 'i' },
+ { "expect-proto", 1, 0, ARG_EXPECT_PROTO },
+ { "expect-src", 1, 0, ARG_EXPECT_SRC },
+ { "expect-sport", 1, 0, ARG_EXPECT_SPORT },
+ { "expect-dst", 1, 0, ARG_EXPECT_DST },
+ { "expect-dport", 1, 0, ARG_EXPECT_DPORT },
+ { "master-proto", 1, 0, ARG_MASTER_PROTO },
+ { "master-src", 1, 0, ARG_MASTER_SRC },
+ { "master-sport", 1, 0, ARG_MASTER_SPORT },
+ { "master-dst", 1, 0, ARG_MASTER_DST },
+ { "master-dport", 1, 0, ARG_MASTER_DPORT },
+ { "mask-proto", 1, 0, ARG_MASK_PROTO },
+ { "mask-src", 1, 0, ARG_MASK_SRC },
+ { "mask-sport", 1, 0, ARG_MASK_SPORT },
+ { "mask-dst", 1, 0, ARG_MASK_DST },
+ { "mask-dport", 1, 0, ARG_MASK_DPORT },
+ { "family", 1, 0, 'F' },
+ { "timeout", 1, 0, ARG_TIMEOUT },
+ { "helper", 1, 0, ARG_HELPER_NAME },
+ { "flags", 1, 0, ARG_FLAGS},
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "46f:hvi:p:F:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case '?': exit(NLE_INVAL);
+ case 'q': quiet = 1; break;
+ case '4': nfnl_exp_set_family(exp, AF_INET); break;
+ case '6': nfnl_exp_set_family(exp, AF_INET6); break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'i': nl_cli_exp_parse_id(exp, optarg); break;
+ case ARG_EXPECT_PROTO: nl_cli_exp_parse_l4protonum(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_EXPECT_SRC: nl_cli_exp_parse_src(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_EXPECT_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_EXPECT_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_EXPECT_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_MASTER_PROTO: nl_cli_exp_parse_l4protonum(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASTER_SRC: nl_cli_exp_parse_src(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASTER_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASTER_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASTER_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASK_PROTO: nl_cli_exp_parse_l4protonum(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
+ case ARG_MASK_SRC: nl_cli_exp_parse_src(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
+ case ARG_MASK_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
+ case ARG_MASK_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
+ case ARG_MASK_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_MASK, optarg); break;
+ case 'F': nl_cli_exp_parse_family(exp, optarg); break;
+ case ARG_TIMEOUT: nl_cli_exp_parse_timeout(exp, optarg); break;
+ case ARG_HELPER_NAME: nl_cli_exp_parse_helper_name(exp, optarg); break;
+ case ARG_FLAGS: nl_cli_exp_parse_flags(exp, optarg); break;
+ }
+ }
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_NETFILTER);
+
+ if ((err = nfnl_exp_del(sock, exp, nlflags)) < 0)
+ nl_cli_fatal(err, "Unable to delete expectation: %s", nl_geterror(err));
+
+ if (!quiet) {
+ printf("Deleted ");
+ nl_object_dump(OBJ_CAST(exp), ¶ms);
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nf-exp-list.c b/ap/lib/libnl/libnl-3.2.25/src/nf-exp-list.c
new file mode 100644
index 0000000..1c6ec69
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nf-exp-list.c
@@ -0,0 +1,137 @@
+/*
+ * src/nf-exp-list.c List Expectation Entries
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ * Copyright (c) 2007 Philip Craig <philipc@snapgear.com>
+ * Copyright (c) 2007 Secure Computing Corporation
+ * Copyright (c) 2012 Rich Fought <rich.fought@watchguard.com>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/exp.h>
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nf-exp-list [OPTION]... [EXPECTATION ENTRY]\n"
+ "\n"
+ "Options\n"
+ " -f, --format=TYPE Output format { brief | details }\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Expectation Selection\n"
+ " -i, --id=NUM Identifier\n"
+ " --expect-proto=PROTOCOL Expectation protocol\n"
+ " --expect-src=ADDR Expectation source address\n"
+ " --expect-sport=PORT Expectation source port\n"
+ " --expect-dst=ADDR Expectation destination address\n"
+ " --expect-dport=PORT Expectation destination port\n"
+ " --master-proto=PROTOCOL Master conntrack protocol\n"
+ " --master-src=ADDR Master conntrack source address\n"
+ " --master-sport=PORT Master conntrack source port\n"
+ " --master-dst=ADDR Master conntrack destination address\n"
+ " --master-dport=PORT Master conntrack destination port\n"
+ " -F, --family=FAMILY Address family\n"
+ " --timeout=NUM Timeout value\n"
+ " --helper=STRING Helper Name\n"
+ //" --flags Flags\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *exp_cache;
+ struct nfnl_exp *exp;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+
+ exp = nl_cli_exp_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_MARK = 270,
+ ARG_TCP_STATE = 271,
+ ARG_EXPECT_PROTO,
+ ARG_EXPECT_SRC,
+ ARG_EXPECT_SPORT,
+ ARG_EXPECT_DST,
+ ARG_EXPECT_DPORT,
+ ARG_MASTER_PROTO,
+ ARG_MASTER_SRC,
+ ARG_MASTER_SPORT,
+ ARG_MASTER_DST,
+ ARG_MASTER_DPORT,
+ ARG_TIMEOUT,
+ ARG_HELPER_NAME,
+ ARG_FLAGS,
+ };
+ static struct option long_opts[] = {
+ { "format", 1, 0, 'f' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "id", 1, 0, 'i' },
+ { "expect-proto", 1, 0, ARG_EXPECT_PROTO },
+ { "expect-src", 1, 0, ARG_EXPECT_SRC },
+ { "expect-sport", 1, 0, ARG_EXPECT_SPORT },
+ { "expect-dst", 1, 0, ARG_EXPECT_DST },
+ { "expect-dport", 1, 0, ARG_EXPECT_DPORT },
+ { "master-proto", 1, 0, ARG_MASTER_PROTO },
+ { "master-src", 1, 0, ARG_MASTER_SRC },
+ { "master-sport", 1, 0, ARG_MASTER_SPORT },
+ { "master-dst", 1, 0, ARG_MASTER_DST },
+ { "master-dport", 1, 0, ARG_MASTER_DPORT },
+ { "family", 1, 0, 'F' },
+ { "timeout", 1, 0, ARG_TIMEOUT },
+ { "helper", 1, 0, ARG_HELPER_NAME },
+ { "flags", 1, 0, ARG_FLAGS},
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "46f:hvi:p:F:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case '?': exit(NLE_INVAL);
+ case '4': nfnl_exp_set_family(exp, AF_INET); break;
+ case '6': nfnl_exp_set_family(exp, AF_INET6); break;
+ case 'f': params.dp_type = nl_cli_parse_dumptype(optarg); break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'i': nl_cli_exp_parse_id(exp, optarg); break;
+ case ARG_EXPECT_PROTO: nl_cli_exp_parse_l4protonum(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_EXPECT_SRC: nl_cli_exp_parse_src(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_EXPECT_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_EXPECT_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_EXPECT_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_EXPECT, optarg); break;
+ case ARG_MASTER_PROTO: nl_cli_exp_parse_l4protonum(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASTER_SRC: nl_cli_exp_parse_src(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASTER_SPORT: nl_cli_exp_parse_src_port(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASTER_DST: nl_cli_exp_parse_dst(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case ARG_MASTER_DPORT: nl_cli_exp_parse_dst_port(exp, NFNL_EXP_TUPLE_MASTER, optarg); break;
+ case 'F': nl_cli_exp_parse_family(exp, optarg); break;
+ case ARG_TIMEOUT: nl_cli_exp_parse_timeout(exp, optarg); break;
+ case ARG_HELPER_NAME: nl_cli_exp_parse_helper_name(exp, optarg); break;
+ case ARG_FLAGS: nl_cli_exp_parse_flags(exp, optarg); break;
+ }
+ }
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_NETFILTER);
+ exp_cache = nl_cli_exp_alloc_cache(sock);
+
+ nl_cache_dump_filter(exp_cache, ¶ms, OBJ_CAST(exp));
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nf-log.c b/ap/lib/libnl/libnl-3.2.25/src/nf-log.c
new file mode 100644
index 0000000..913ba16
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nf-log.c
@@ -0,0 +1,147 @@
+/*
+ * src/nf-log.c Monitor netfilter log events
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch>
+ * Copyright (c) 2007 Philip Craig <philipc@snapgear.com>
+ * Copyright (c) 2007 Secure Computing Corporation
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+#include <linux/netfilter/nfnetlink_log.h>
+#include <netlink/netfilter/nfnl.h>
+#include <netlink/netfilter/log.h>
+
+static struct nfnl_log *alloc_log(void)
+{
+ struct nfnl_log *log;
+
+ log = nfnl_log_alloc();
+ if (!log)
+ nl_cli_fatal(ENOMEM, "Unable to allocate log object");
+
+ return log;
+}
+
+static void obj_input(struct nl_object *obj, void *arg)
+{
+ struct nl_dump_params dp = {
+ .dp_type = NL_DUMP_STATS,
+ .dp_fd = stdout,
+ .dp_dump_msgtype = 1,
+ };
+
+ nl_object_dump(obj, &dp);
+}
+
+static int event_input(struct nl_msg *msg, void *arg)
+{
+ if (nl_msg_parse(msg, &obj_input, NULL) < 0)
+ fprintf(stderr, "<<EVENT>> Unknown message type\n");
+
+ /* Exit nl_recvmsgs_def() and return to the main select() */
+ return NL_STOP;
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *nf_sock;
+ struct nl_sock *rt_sock;
+ struct nl_cache *link_cache;
+ struct nfnl_log *log;
+ enum nfnl_log_copy_mode copy_mode;
+ uint32_t copy_range;
+ int err;
+ int family;
+
+ nf_sock = nl_cli_alloc_socket();
+ nl_socket_disable_seq_check(nf_sock);
+ nl_socket_modify_cb(nf_sock, NL_CB_VALID, NL_CB_CUSTOM, event_input, NULL);
+
+ if ((argc > 1 && !strcasecmp(argv[1], "-h")) || argc < 3) {
+ printf("Usage: nf-log family group [ copy_mode ] "
+ "[copy_range] \n");
+ return 2;
+ }
+
+ nl_cli_connect(nf_sock, NETLINK_NETFILTER);
+
+ family = nl_str2af(argv[1]);
+ if (family == AF_UNSPEC)
+ nl_cli_fatal(NLE_INVAL, "Unknown family \"%s\": %s",
+ argv[1], nl_geterror(family));
+
+ nfnl_log_pf_unbind(nf_sock, family);
+ if ((err = nfnl_log_pf_bind(nf_sock, family)) < 0)
+ nl_cli_fatal(err, "Unable to bind logger: %s",
+ nl_geterror(err));
+
+ log = alloc_log();
+ nfnl_log_set_group(log, atoi(argv[2]));
+
+ copy_mode = NFNL_LOG_COPY_META;
+ if (argc > 3) {
+ copy_mode = nfnl_log_str2copy_mode(argv[3]);
+ if (copy_mode < 0)
+ nl_cli_fatal(copy_mode,
+ "Unable to parse copy mode \"%s\": %s",
+ argv[3], nl_geterror(copy_mode));
+ }
+ nfnl_log_set_copy_mode(log, copy_mode);
+
+ copy_range = 0xFFFF;
+ if (argc > 4)
+ copy_range = atoi(argv[4]);
+ nfnl_log_set_copy_range(log, copy_range);
+
+ if ((err = nfnl_log_create(nf_sock, log)) < 0)
+ nl_cli_fatal(err, "Unable to bind instance: %s",
+ nl_geterror(err));
+
+ {
+ struct nl_dump_params dp = {
+ .dp_type = NL_DUMP_STATS,
+ .dp_fd = stdout,
+ .dp_dump_msgtype = 1,
+ };
+
+ printf("log params: ");
+ nl_object_dump((struct nl_object *) log, &dp);
+ }
+
+ rt_sock = nl_cli_alloc_socket();
+ nl_cli_connect(rt_sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(rt_sock);
+
+ while (1) {
+ fd_set rfds;
+ int nffd, rtfd, maxfd, retval;
+
+ FD_ZERO(&rfds);
+
+ maxfd = nffd = nl_socket_get_fd(nf_sock);
+ FD_SET(nffd, &rfds);
+
+ rtfd = nl_socket_get_fd(rt_sock);
+ FD_SET(rtfd, &rfds);
+ if (maxfd < rtfd)
+ maxfd = rtfd;
+
+ /* wait for an incoming message on the netlink nf_socket */
+ retval = select(maxfd+1, &rfds, NULL, NULL, NULL);
+
+ if (retval) {
+ if (FD_ISSET(nffd, &rfds))
+ nl_recvmsgs_default(nf_sock);
+ if (FD_ISSET(rtfd, &rfds))
+ nl_recvmsgs_default(rt_sock);
+ }
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nf-monitor.c b/ap/lib/libnl/libnl-3.2.25/src/nf-monitor.c
new file mode 100644
index 0000000..fe99af4
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nf-monitor.c
@@ -0,0 +1,105 @@
+/*
+ * src/nf-monitor.c Monitor netfilter events
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch>
+ * Copyright (c) 2007 Philip Craig <philipc@snapgear.com>
+ * Copyright (c) 2007 Secure Computing Corporation
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/netfilter/nfnl.h>
+
+static void obj_input(struct nl_object *obj, void *arg)
+{
+ struct nl_dump_params dp = {
+ .dp_type = NL_DUMP_STATS,
+ .dp_fd = stdout,
+ .dp_dump_msgtype = 1,
+ };
+
+ nl_object_dump(obj, &dp);
+}
+
+static int event_input(struct nl_msg *msg, void *arg)
+{
+ if (nl_msg_parse(msg, &obj_input, NULL) < 0)
+ fprintf(stderr, "<<EVENT>> Unknown message type\n");
+
+ /* Exit nl_recvmsgs_def() and return to the main select() */
+ return NL_STOP;
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ int err;
+ int i, idx;
+
+ static const struct {
+ enum nfnetlink_groups gr_id;
+ const char* gr_name;
+ } groups[] = {
+ { NFNLGRP_CONNTRACK_NEW, "ct-new" },
+ { NFNLGRP_CONNTRACK_UPDATE, "ct-update" },
+ { NFNLGRP_CONNTRACK_DESTROY, "ct-destroy" },
+ { NFNLGRP_NONE, NULL }
+ };
+
+ sock = nl_cli_alloc_socket();
+ nl_socket_disable_seq_check(sock);
+ nl_socket_modify_cb(sock, NL_CB_VALID, NL_CB_CUSTOM, event_input, NULL);
+
+ if (argc > 1 && !strcasecmp(argv[1], "-h")) {
+ printf("Usage: nf-monitor [<groups>]\n");
+
+ printf("Known groups:");
+ for (i = 0; groups[i].gr_id != NFNLGRP_NONE; i++)
+ printf(" %s", groups[i].gr_name);
+ printf("\n");
+ return 2;
+ }
+
+ nl_cli_connect(sock, NETLINK_NETFILTER);
+
+ for (idx = 1; argc > idx; idx++) {
+ for (i = 0; groups[i].gr_id != NFNLGRP_NONE; i++) {
+ if (strcmp(argv[idx], groups[i].gr_name))
+ continue;
+
+ err = nl_socket_add_membership(sock, groups[i].gr_id);
+ if (err < 0)
+ nl_cli_fatal(err,
+ "Unable to add membership: %s",
+ nl_geterror(err));
+ break;
+ }
+
+ if (groups[i].gr_id == NFNLGRP_NONE)
+ nl_cli_fatal(NLE_OBJ_NOTFOUND, "Unknown group: \"%s\"",
+ argv[idx]);
+ }
+
+ while (1) {
+ fd_set rfds;
+ int fd, retval;
+
+ fd = nl_socket_get_fd(sock);
+
+ FD_ZERO(&rfds);
+ FD_SET(fd, &rfds);
+ /* wait for an incoming message on the netlink socket */
+ retval = select(fd+1, &rfds, NULL, NULL, NULL);
+
+ if (retval) {
+ /* FD_ISSET(fd, &rfds) will be true */
+ nl_recvmsgs_default(sock);
+ }
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nf-queue.c b/ap/lib/libnl/libnl-3.2.25/src/nf-queue.c
new file mode 100644
index 0000000..922d9c8
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nf-queue.c
@@ -0,0 +1,149 @@
+/*
+ * src/nf-queue.c Monitor netfilter queue events
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2007, 2008 Patrick McHardy <kaber@trash.net>
+ * Copyright (c) 2010 Karl Hiramoto <karl@hiramoto.org>
+ */
+
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+#include <netinet/in.h>
+#include <linux/netfilter.h>
+#include <linux/netfilter/nfnetlink_queue.h>
+#include <netlink/netfilter/nfnl.h>
+#include <netlink/netfilter/queue.h>
+#include <netlink/netfilter/queue_msg.h>
+
+static struct nl_sock *nf_sock;
+
+static struct nfnl_queue *alloc_queue(void)
+{
+ struct nfnl_queue *queue;
+
+ queue = nfnl_queue_alloc();
+ if (!queue)
+ nl_cli_fatal(ENOMEM, "Unable to allocate queue object");
+
+ return queue;
+}
+
+
+static void obj_input(struct nl_object *obj, void *arg)
+{
+ struct nfnl_queue_msg *msg = (struct nfnl_queue_msg *) obj;
+ struct nl_dump_params dp = {
+ .dp_type = NL_DUMP_STATS,
+ .dp_fd = stdout,
+ .dp_dump_msgtype = 1,
+ };
+
+ nfnl_queue_msg_set_verdict(msg, NF_ACCEPT);
+ nl_object_dump(obj, &dp);
+ nfnl_queue_msg_send_verdict(nf_sock, msg);
+}
+
+static int event_input(struct nl_msg *msg, void *arg)
+{
+ if (nl_msg_parse(msg, &obj_input, NULL) < 0)
+ fprintf(stderr, "<<EVENT>> Unknown message type\n");
+
+ /* Exit nl_recvmsgs_def() and return to the main select() */
+ return NL_STOP;
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *rt_sock;
+ struct nl_cache *link_cache;
+ struct nfnl_queue *queue;
+ enum nfnl_queue_copy_mode copy_mode;
+ uint32_t copy_range;
+ int err = 1;
+ int family;
+
+ nf_sock = nfnl_queue_socket_alloc();
+ if (nf_sock == NULL)
+ nl_cli_fatal(ENOBUFS, "Unable to allocate netlink socket");
+
+ nl_socket_disable_seq_check(nf_sock);
+ nl_socket_modify_cb(nf_sock, NL_CB_VALID, NL_CB_CUSTOM, event_input, NULL);
+
+ if ((argc > 1 && !strcasecmp(argv[1], "-h")) || argc < 3) {
+ printf("Usage: nf-queue family group [ copy_mode ] "
+ "[ copy_range ]\n");
+ printf("family: [ inet | inet6 | ... ] \n");
+ printf("group: the --queue-num arg that you gave to iptables\n");
+ printf("copy_mode: [ none | meta | packet ] \n");
+ return 2;
+ }
+
+ nl_cli_connect(nf_sock, NETLINK_NETFILTER);
+
+ if ((family = nl_str2af(argv[1])) == AF_UNSPEC)
+ nl_cli_fatal(NLE_INVAL, "Unknown family \"%s\"", argv[1]);
+
+ nfnl_queue_pf_unbind(nf_sock, family);
+ if ((err = nfnl_queue_pf_bind(nf_sock, family)) < 0)
+ nl_cli_fatal(err, "Unable to bind logger: %s",
+ nl_geterror(err));
+
+ queue = alloc_queue();
+ nfnl_queue_set_group(queue, atoi(argv[2]));
+
+ copy_mode = NFNL_QUEUE_COPY_PACKET;
+ if (argc > 3) {
+ copy_mode = nfnl_queue_str2copy_mode(argv[3]);
+ if (copy_mode < 0)
+ nl_cli_fatal(copy_mode,
+ "Unable to parse copy mode \"%s\": %s",
+ argv[3], nl_geterror(copy_mode));
+ }
+ nfnl_queue_set_copy_mode(queue, copy_mode);
+
+ copy_range = 0xFFFF;
+ if (argc > 4)
+ copy_range = atoi(argv[4]);
+ nfnl_queue_set_copy_range(queue, copy_range);
+
+ if ((err = nfnl_queue_create(nf_sock, queue)) < 0)
+ nl_cli_fatal(err, "Unable to bind queue: %s", nl_geterror(err));
+
+ rt_sock = nl_cli_alloc_socket();
+ nl_cli_connect(rt_sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(rt_sock);
+
+ nl_socket_set_buffer_size(nf_sock, 1024*127, 1024*127);
+
+ while (1) {
+ fd_set rfds;
+ int nffd, rtfd, maxfd, retval;
+
+ FD_ZERO(&rfds);
+
+ maxfd = nffd = nl_socket_get_fd(nf_sock);
+ FD_SET(nffd, &rfds);
+
+ rtfd = nl_socket_get_fd(rt_sock);
+ FD_SET(rtfd, &rfds);
+ if (maxfd < rtfd)
+ maxfd = rtfd;
+
+ /* wait for an incoming message on the netlink socket */
+ retval = select(maxfd+1, &rfds, NULL, NULL, NULL);
+
+ if (retval) {
+ if (FD_ISSET(nffd, &rfds))
+ nl_recvmsgs_default(nf_sock);
+ if (FD_ISSET(rtfd, &rfds))
+ nl_recvmsgs_default(rt_sock);
+ }
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-addr-add.c b/ap/lib/libnl/libnl-3.2.25/src/nl-addr-add.c
new file mode 100644
index 0000000..52995ec
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-addr-add.c
@@ -0,0 +1,120 @@
+/*
+ * src/nl-addr-add.c Add addresses
+ *
+ * This library 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 version 2 of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/addr.h>
+#include <netlink/cli/link.h>
+
+static int quiet = 0;
+
+static void print_usage(void)
+{
+ printf(
+"Usage: nl-addr-add [OPTION]... [ADDRESS]\n"
+"\n"
+"Options\n"
+" --replace Replace the address if it exists.\n"
+" -q, --quiet Do not print informal notifications.\n"
+" -h, --help Show this help.\n"
+" -v, --version Show versioning information.\n"
+"\n"
+"Address Options\n"
+" -a, --local=ADDR Address to be considered local.\n"
+" -d, --dev=DEV Device the address should be assigned to.\n"
+" --family=FAMILY Address family (normally autodetected).\n"
+" --broadcast=ADDR Broadcast address of network (IPv4).\n"
+" --peer=ADDR Peer address (IPv4).\n"
+" --label=STRING Additional address label (IPv4).\n"
+" --scope=SCOPE Scope of local address (IPv4).\n"
+" --preferred=TIME Preferred lifetime (IPv6).\n"
+" --valid=TIME Valid lifetime (IPv6).\n"
+ );
+
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct rtnl_addr *addr;
+ struct nl_cache *link_cache;
+ struct nl_dump_params dp = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err, nlflags = NLM_F_CREATE;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ addr = nl_cli_addr_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_FAMILY = 257,
+ ARG_LABEL = 258,
+ ARG_PEER,
+ ARG_SCOPE,
+ ARG_BROADCAST,
+ ARG_REPLACE,
+ ARG_PREFERRED,
+ ARG_VALID,
+ };
+ static struct option long_opts[] = {
+ { "replace", 0, 0, ARG_REPLACE },
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "local", 1, 0, 'a' },
+ { "dev", 1, 0, 'd' },
+ { "family", 1, 0, ARG_FAMILY },
+ { "label", 1, 0, ARG_LABEL },
+ { "peer", 1, 0, ARG_PEER },
+ { "scope", 1, 0, ARG_SCOPE },
+ { "broadcast", 1, 0, ARG_BROADCAST },
+ { "preferred", 1, 0, ARG_PREFERRED },
+ { "valid", 1, 0, ARG_VALID },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "qhva:d:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case '?': exit(NLE_INVAL);
+ case ARG_REPLACE: nlflags |= NLM_F_REPLACE; break;
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'a': nl_cli_addr_parse_local(addr, optarg); break;
+ case 'd': nl_cli_addr_parse_dev(addr, link_cache, optarg); break;
+ case ARG_FAMILY: nl_cli_addr_parse_family(addr, optarg); break;
+ case ARG_LABEL: nl_cli_addr_parse_label(addr, optarg); break;
+ case ARG_PEER: nl_cli_addr_parse_peer(addr, optarg); break;
+ case ARG_SCOPE: nl_cli_addr_parse_scope(addr, optarg); break;
+ case ARG_BROADCAST: nl_cli_addr_parse_broadcast(addr, optarg); break;
+ case ARG_PREFERRED: nl_cli_addr_parse_preferred(addr, optarg); break;
+ case ARG_VALID: nl_cli_addr_parse_valid(addr, optarg); break;
+ }
+ }
+
+ if ((err = rtnl_addr_add(sock, addr, nlflags)) < 0)
+ nl_cli_fatal(err, "Unable to add address: %s",
+ nl_geterror(err));
+
+ if (!quiet) {
+ printf("Added ");
+ nl_object_dump(OBJ_CAST(addr), &dp);
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-addr-delete.c b/ap/lib/libnl/libnl-3.2.25/src/nl-addr-delete.c
new file mode 100644
index 0000000..2849c01
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-addr-delete.c
@@ -0,0 +1,140 @@
+/*
+ * src/nl-addr-delete.c Delete addresses
+ *
+ * This library 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 version 2 of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/addr.h>
+#include <netlink/cli/link.h>
+
+static struct nl_sock *sock;
+static int interactive = 0, default_yes = 0, quiet = 0;
+static int deleted = 0;
+
+static void print_usage(void)
+{
+ printf(
+"Usage: nl-addr-delete [OPTION]... [ADDRESS]\n"
+"\n"
+"Options\n"
+" -i, --interactive Run interactively.\n"
+" --yes Set default answer to yes.\n"
+" -q, --quiet Do not print informal notifications.\n"
+" -h, --help Show this help.\n"
+" -v, --version Show versioning information.\n"
+"\n"
+"Address Options\n"
+" -a, --local=ADDR Local address.\n"
+" -d, --dev=DEV Associated network device.\n"
+" --family=FAMILY Family of local address.\n"
+" --label=STRING Address label (IPv4).\n"
+" --peer=ADDR Peer address (IPv4).\n"
+" --scope=SCOPE Address scope (IPv4).\n"
+" --broadcast=ADDR Broadcast address of network (IPv4).\n"
+" --valid-lifetime=TS Valid lifetime before route expires (IPv6).\n"
+" --preferred=TIME Preferred lifetime (IPv6).\n"
+" --valid=TIME Valid lifetime (IPv6).\n"
+ );
+
+ exit(0);
+}
+
+static void delete_cb(struct nl_object *obj, void *arg)
+{
+ struct rtnl_addr *addr = nl_object_priv(obj);
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err;
+
+ if (interactive && !nl_cli_confirm(obj, ¶ms, default_yes))
+ return;
+
+ if ((err = rtnl_addr_delete(sock, addr, 0)) < 0)
+ nl_cli_fatal(err, "Unable to delete address: %s\n",
+ nl_geterror(err));
+
+ if (!quiet) {
+ printf("Deleted ");
+ nl_object_dump(obj, ¶ms);
+ }
+
+ deleted++;
+}
+
+int main(int argc, char *argv[])
+{
+ struct rtnl_addr *addr;
+ struct nl_cache *link_cache, *addr_cache;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ addr_cache = nl_cli_addr_alloc_cache(sock);
+ addr = nl_cli_addr_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_FAMILY = 257,
+ ARG_LABEL = 258,
+ ARG_YES,
+ ARG_PEER,
+ ARG_SCOPE,
+ ARG_BROADCAST,
+ ARG_PREFERRED,
+ ARG_VALID,
+ };
+ static struct option long_opts[] = {
+ { "interactive", 0, 0, 'i' },
+ { "yes", 0, 0, ARG_YES },
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "local", 1, 0, 'a' },
+ { "dev", 1, 0, 'd' },
+ { "family", 1, 0, ARG_FAMILY },
+ { "label", 1, 0, ARG_LABEL },
+ { "peer", 1, 0, ARG_PEER },
+ { "scope", 1, 0, ARG_SCOPE },
+ { "broadcast", 1, 0, ARG_BROADCAST },
+ { "preferred", 1, 0, ARG_PREFERRED },
+ { "valid", 1, 0, ARG_VALID },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "iqhva:d:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'i': interactive = 1; break;
+ case ARG_YES: default_yes = 1; break;
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'a': nl_cli_addr_parse_local(addr, optarg); break;
+ case 'd': nl_cli_addr_parse_dev(addr, link_cache, optarg); break;
+ case ARG_FAMILY: nl_cli_addr_parse_family(addr, optarg); break;
+ case ARG_LABEL: nl_cli_addr_parse_label(addr, optarg); break;
+ case ARG_PEER: nl_cli_addr_parse_peer(addr, optarg); break;
+ case ARG_SCOPE: nl_cli_addr_parse_scope(addr, optarg); break;
+ case ARG_BROADCAST: nl_cli_addr_parse_broadcast(addr, optarg); break;
+ case ARG_PREFERRED: nl_cli_addr_parse_preferred(addr, optarg); break;
+ case ARG_VALID: nl_cli_addr_parse_valid(addr, optarg); break;
+ }
+ }
+
+ nl_cache_foreach_filter(addr_cache, OBJ_CAST(addr), delete_cb, NULL);
+
+ if (!quiet)
+ printf("Deleted %d addresses\n", deleted);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-addr-list.c b/ap/lib/libnl/libnl-3.2.25/src/nl-addr-list.c
new file mode 100644
index 0000000..20995a8
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-addr-list.c
@@ -0,0 +1,196 @@
+/*
+ * src/nl-addr-list.c List addresses
+ *
+ * This library 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 version 2 of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/addr.h>
+#include <netlink/cli/link.h>
+
+static void print_usage(void)
+{
+ printf(
+"Usage: nl-addr-list [OPTION]... [ADDRESS]\n"
+"\n"
+"Options\n"
+" --details Show details on multiple lines.\n"
+" --env Print address details in sh env variable syntax.\n"
+" --prefix=STRING Prefix each printed line.\n"
+" -h, --help Show this help.\n"
+" -v, --version Show versioning information.\n"
+"\n"
+"Address Selection\n"
+" -a, --local=ADDR Local address.\n"
+" -d, --dev=DEV Associated network device.\n"
+" --family=FAMILY Family of local address.\n"
+" --label=STRING Address label (IPv4).\n"
+" --peer=ADDR Peer address (IPv4).\n"
+" --scope=SCOPE Address scope (IPv4).\n"
+" --broadcast=ADDR Broadcast address of network (IPv4).\n"
+" --valid-lifetime=TS Valid lifetime before route expires (IPv6).\n"
+" --preferred=TIME Preferred lifetime (IPv6).\n"
+" --valid=TIME Valid lifetime (IPv6).\n"
+ );
+ exit(0);
+}
+
+static char *prefix;
+
+static void print_prefix(struct nl_dump_params *p, int line)
+{
+ if (prefix)
+ nl_dump(p, "%s", prefix);
+}
+
+static void env_dump(struct nl_object *obj, void *arg)
+{
+ struct nl_dump_params *p = arg;
+ struct rtnl_addr *addr = (struct rtnl_addr *) obj;
+ struct nl_cache *link_cache;
+ struct nl_addr *a;
+ static int index = 0;
+ char buf[128], pfx[32], *s;
+
+ snprintf(pfx, sizeof(pfx), "ADDR%d", index++);
+
+ nl_dump_line(p, "%s_FAMILY=%s\n", pfx,
+ nl_af2str(rtnl_addr_get_family(addr), buf, sizeof(buf)));
+
+ nl_dump_line(p, "%s_LOCAL=%s\n", pfx,
+ nl_addr2str(rtnl_addr_get_local(addr), buf, sizeof(buf)));
+
+ nl_dump_line(p, "%s_IFINDEX=%u\n", pfx, rtnl_addr_get_ifindex(addr));
+ link_cache = nl_cache_mngt_require_safe("route/link");
+ if (link_cache)
+ nl_dump_line(p, "%s_IFNAME=%s\n", pfx,
+ rtnl_link_i2name(link_cache,
+ rtnl_addr_get_ifindex(addr),
+ buf, sizeof(buf)));
+
+ if ((a = rtnl_addr_get_peer(addr)))
+ nl_dump_line(p, "%s_PEER=%s\n", pfx,
+ nl_addr2str(a, buf, sizeof(buf)));
+
+ if ((a = rtnl_addr_get_broadcast(addr)))
+ nl_dump_line(p, "%s_BROADCAST=%s\n", pfx,
+ nl_addr2str(a, buf, sizeof(buf)));
+
+ nl_dump_line(p, "%s_SCOPE=%s\n", pfx,
+ rtnl_scope2str(rtnl_addr_get_scope(addr),
+ buf, sizeof(buf)));
+
+ if ((s = rtnl_addr_get_label(addr)))
+ nl_dump_line(p, "%s_LABEL=%s\n", pfx, s);
+
+ rtnl_addr_flags2str(rtnl_addr_get_flags(addr), buf, sizeof(buf));
+ if (buf[0])
+ nl_dump_line(p, "%s_FLAGS=%s\n", pfx, buf);
+
+ nl_dump_line(p, "%s_CACHEINFO_VALID=%u\n", pfx,
+ rtnl_addr_get_valid_lifetime(addr));
+
+ if (link_cache)
+ nl_cache_put(link_cache);
+
+#if 0
+ if (addr->ce_mask & ADDR_ATTR_CACHEINFO) {
+ struct rtnl_addr_cacheinfo *ci = &addr->a_cacheinfo;
+
+ nl_dump_line(p, "ADDR_CACHEINFO_PREFERRED=%u\n",
+ ci->aci_prefered);
+
+ nl_dump_line(p, "ADDR_CACHEINFO_CREATED=%u\n", ci->aci_cstamp);
+ nl_dump_line(p, "ADDR_CACHEINFO_LASTUPDATE=%u\n",
+ ci->aci_tstamp);
+ }
+#endif
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct rtnl_addr *addr;
+ struct nl_cache *link_cache, *addr_cache;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_nl_cb = print_prefix,
+ .dp_fd = stdout,
+ };
+ int dump_env = 0;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ addr_cache = nl_cli_addr_alloc_cache(sock);
+ addr = nl_cli_addr_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_FAMILY = 257,
+ ARG_LABEL = 258,
+ ARG_PEER,
+ ARG_SCOPE,
+ ARG_BROADCAST,
+ ARG_DETAILS,
+ ARG_ENV,
+ ARG_PREFIX,
+ ARG_PREFERRED,
+ ARG_VALID,
+ };
+ static struct option long_opts[] = {
+ { "details", 0, 0, ARG_DETAILS },
+ { "env", 0, 0, ARG_ENV },
+ { "prefix", 1, 0, ARG_PREFIX },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "local", 1, 0, 'a' },
+ { "dev", 1, 0, 'd' },
+ { "family", 1, 0, ARG_FAMILY },
+ { "label", 1, 0, ARG_LABEL },
+ { "peer", 1, 0, ARG_PEER },
+ { "scope", 1, 0, ARG_SCOPE },
+ { "broadcast", 1, 0, ARG_BROADCAST },
+ { "preferred", 1, 0, ARG_PREFERRED },
+ { "valid", 1, 0, ARG_VALID },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "46hva:d:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case '?': exit(NLE_INVAL);
+ case '4': rtnl_addr_set_family(addr, AF_INET); break;
+ case '6': rtnl_addr_set_family(addr, AF_INET6); break;
+ case ARG_DETAILS: params.dp_type = NL_DUMP_DETAILS; break;
+ case ARG_ENV: dump_env = 1; break;
+ case ARG_PREFIX: prefix = strdup(optarg); break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'a': nl_cli_addr_parse_local(addr, optarg); break;
+ case 'd': nl_cli_addr_parse_dev(addr, link_cache, optarg); break;
+ case ARG_FAMILY: nl_cli_addr_parse_family(addr, optarg); break;
+ case ARG_LABEL: nl_cli_addr_parse_label(addr, optarg); break;
+ case ARG_PEER: nl_cli_addr_parse_peer(addr, optarg); break;
+ case ARG_SCOPE: nl_cli_addr_parse_scope(addr, optarg); break;
+ case ARG_BROADCAST: nl_cli_addr_parse_broadcast(addr, optarg); break;
+ case ARG_PREFERRED: nl_cli_addr_parse_preferred(addr, optarg); break;
+ case ARG_VALID: nl_cli_addr_parse_valid(addr, optarg); break;
+ }
+ }
+
+ if (dump_env)
+ nl_cache_foreach_filter(addr_cache, OBJ_CAST(addr), env_dump,
+ ¶ms);
+ else
+ nl_cache_dump_filter(addr_cache, ¶ms, OBJ_CAST(addr));
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-class-add.c b/ap/lib/libnl/libnl-3.2.25/src/nl-class-add.c
new file mode 100644
index 0000000..b9a17dc
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-class-add.c
@@ -0,0 +1,155 @@
+/*
+ * src/nl-class-add.c Add/Update/Replace Traffic Class
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/tc.h>
+#include <netlink/cli/qdisc.h>
+#include <netlink/cli/class.h>
+#include <netlink/cli/link.h>
+
+#include <netlink-private/route/tc-api.h>
+
+static int quiet = 0;
+
+static void print_usage(void)
+{
+ printf(
+"Usage: nl-class-add [OPTIONS]... class [CONFIGURATION]...\n"
+"\n"
+"OPTIONS\n"
+" -q, --quiet Do not print informal notifications.\n"
+" -h, --help Show this help text.\n"
+" -v, --version Show versioning information.\n"
+" --update Update class if it exists.\n"
+" --update-only Only update class, never create it.\n"
+" -d, --dev=DEV Network device the class should be attached to.\n"
+" -i, --id=ID ID of new class (default: auto-generated)\n"
+" -p, --parent=ID ID of parent { root | ingress | class-ID }\n"
+" --mtu=SIZE Overwrite MTU (default: MTU of network device)\n"
+" --mpu=SIZE Minimum packet size on the link (default: 0).\n"
+" --overhead=SIZE Overhead in bytes per packet (default: 0).\n"
+" --linktype=TYPE Overwrite linktype (default: type of network device)\n"
+"\n"
+"CONFIGURATION\n"
+" -h, --help Show help text of class specific options.\n"
+"\n"
+"EXAMPLE\n"
+" $ nl-class-add --dev=eth1 --parent=root htb --rate=100mbit\n"
+"\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct rtnl_class *class;
+ struct rtnl_tc *tc;
+ struct nl_cache *link_cache;
+ struct nl_dump_params dp = {
+ .dp_type = NL_DUMP_DETAILS,
+ .dp_fd = stdout,
+ };
+ struct nl_cli_tc_module *tm;
+ struct rtnl_tc_ops *ops;
+ int err, flags = NLM_F_CREATE | NLM_F_EXCL;
+ char *kind, *id = NULL;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+
+ link_cache = nl_cli_link_alloc_cache(sock);
+
+ class = nl_cli_class_alloc();
+ tc = (struct rtnl_tc *) class;
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_UPDATE = 257,
+ ARG_UPDATE_ONLY = 258,
+ ARG_MTU,
+ ARG_MPU,
+ ARG_OVERHEAD,
+ ARG_LINKTYPE,
+ };
+ static struct option long_opts[] = {
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "dev", 1, 0, 'd' },
+ { "parent", 1, 0, 'p' },
+ { "id", 1, 0, 'i' },
+ { "update", 0, 0, ARG_UPDATE },
+ { "update-only", 0, 0, ARG_UPDATE_ONLY },
+ { "mtu", 1, 0, ARG_MTU },
+ { "mpu", 1, 0, ARG_MPU },
+ { "overhead", 1, 0, ARG_OVERHEAD },
+ { "linktype", 1, 0, ARG_LINKTYPE },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "+qhvd:p:i:",
+ long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
+ case 'p': nl_cli_tc_parse_parent(tc, optarg); break;
+ case 'i': id = strdup(optarg); break;
+ case ARG_UPDATE: flags = NLM_F_CREATE; break;
+ case ARG_UPDATE_ONLY: flags = 0; break;
+ case ARG_MTU: nl_cli_tc_parse_mtu(tc, optarg); break;
+ case ARG_MPU: nl_cli_tc_parse_mpu(tc, optarg); break;
+ case ARG_OVERHEAD: nl_cli_tc_parse_overhead(tc, optarg); break;
+ case ARG_LINKTYPE: nl_cli_tc_parse_linktype(tc, optarg); break;
+ }
+ }
+
+ if (optind >= argc)
+ print_usage();
+
+ if (!rtnl_tc_get_ifindex(tc))
+ nl_cli_fatal(EINVAL, "You must specify a network device (--dev=XXX)");
+
+ if (!rtnl_tc_get_parent(tc))
+ nl_cli_fatal(EINVAL, "You must specify a parent (--parent=XXX)");
+
+ if (id) {
+ nl_cli_tc_parse_handle(tc, id, 1);
+ free(id);
+ }
+
+ kind = argv[optind++];
+ rtnl_tc_set_kind(tc, kind);
+
+ if (!(ops = rtnl_tc_get_ops(tc)))
+ nl_cli_fatal(ENOENT, "Unknown class \"%s\"", kind);
+
+ if (!(tm = nl_cli_tc_lookup(ops)))
+ nl_cli_fatal(ENOTSUP, "class type \"%s\" not supported.", kind);
+
+ tm->tm_parse_argv(tc, argc, argv);
+
+ if (!quiet) {
+ printf("Adding ");
+ nl_object_dump(OBJ_CAST(class), &dp);
+ }
+
+ if ((err = rtnl_class_add(sock, class, flags)) < 0)
+ nl_cli_fatal(EINVAL, "Unable to add class: %s", nl_geterror(err));
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-class-delete.c b/ap/lib/libnl/libnl-3.2.25/src/nl-class-delete.c
new file mode 100644
index 0000000..37657a4
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-class-delete.c
@@ -0,0 +1,128 @@
+/*
+ * src/nl-class-delete.c Delete Traffic Classes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/class.h>
+#include <netlink/cli/link.h>
+
+static int quiet = 0, default_yes = 0, deleted = 0, interactive = 0;
+static struct nl_sock *sock;
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-class-delete [OPTION]... [class]\n"
+ "\n"
+ "OPTIONS\n"
+ " --interactive Run interactively.\n"
+ " --yes Set default answer to yes.\n"
+ " -q, --quiet Do not print informal notifications.\n"
+ " -h, --help Show this help text and exit.\n"
+ " -v, --version Show versioning information and exit.\n"
+ "\n"
+ " -d, --dev=DEV Device the class is attached to.\n"
+ " -p, --parent=ID Identifier of parent qdisc/class.\n"
+ " -i, --id=ID Identifier\n"
+ " -k, --kind=NAME Kind of class (e.g. pfifo_fast)\n"
+ "\n"
+ "EXAMPLE\n"
+ " # Delete all classes on eth0 attached to parent 1:\n"
+ " $ nl-class-delete --dev eth0 --parent 1:\n"
+ "\n"
+ );
+
+ exit(0);
+}
+
+static void delete_cb(struct nl_object *obj, void *arg)
+{
+ struct rtnl_class *class = nl_object_priv(obj);
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err;
+
+ if (interactive && !nl_cli_confirm(obj, ¶ms, default_yes))
+ return;
+
+ if ((err = rtnl_class_delete(sock, class)) < 0)
+ nl_cli_fatal(err, "Unable to delete class: %s\n", nl_geterror(err));
+
+ if (!quiet) {
+ printf("Deleted ");
+ nl_object_dump(obj, ¶ms);
+ }
+
+ deleted++;
+}
+
+int main(int argc, char *argv[])
+{
+ struct rtnl_class *class;
+ struct rtnl_tc *tc;
+ struct nl_cache *link_cache, *class_cache;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ class = nl_cli_class_alloc();
+ tc = (struct rtnl_tc *) class;
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_YES = 257,
+ ARG_INTERACTIVE = 258,
+ };
+ static struct option long_opts[] = {
+ { "interactive", 0, 0, ARG_INTERACTIVE },
+ { "yes", 0, 0, ARG_YES },
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "dev", 1, 0, 'd' },
+ { "parent", 1, 0, 'p' },
+ { "id", 1, 0, 'i' },
+ { "kind", 1, 0, 'k' },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "qhvd:p:i:k:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case '?': nl_cli_fatal(EINVAL, "Invalid options");
+ case ARG_INTERACTIVE: interactive = 1; break;
+ case ARG_YES: default_yes = 1; break;
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
+ case 'p': nl_cli_tc_parse_parent(tc, optarg); break;
+ case 'i': nl_cli_tc_parse_handle(tc, optarg, 0); break;
+ case 'k': nl_cli_tc_parse_kind(tc, optarg); break;
+ }
+ }
+
+ if (!rtnl_tc_get_ifindex(tc))
+ nl_cli_fatal(EINVAL, "You must specify a network device (--dev=XXX)");
+
+ class_cache = nl_cli_class_alloc_cache(sock, rtnl_tc_get_ifindex(tc));
+
+ nl_cache_foreach_filter(class_cache, OBJ_CAST(class), delete_cb, NULL);
+
+ if (!quiet)
+ printf("Deleted %d classs\n", deleted);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-class-list.c b/ap/lib/libnl/libnl-3.2.25/src/nl-class-list.c
new file mode 100644
index 0000000..c2423fb
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-class-list.c
@@ -0,0 +1,117 @@
+/*
+ * src/nl-class-list.c List Traffic Classes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/tc.h>
+#include <netlink/cli/class.h>
+#include <netlink/cli/link.h>
+
+static struct nl_sock *sock;
+
+static struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+};
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-class-list [OPTION]...\n"
+ "\n"
+ "OPTIONS\n"
+ " --details Show details\n"
+ " --stats Show statistics\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ " -d, --dev=DEV Device the class is attached to. (default: all)\n"
+ " -p, --parent=ID Identifier of parent class.\n"
+ " -i, --id=ID Identifier.\n"
+ " -k, --kind=NAME Kind of class (e.g. pfifo_fast)\n"
+ "\n"
+ "EXAMPLE\n"
+ " # Display statistics of all classes on eth0\n"
+ " $ nl-class-list --stats --dev=eth0\n"
+ "\n"
+ );
+ exit(0);
+}
+
+static void __dump_class(int ifindex, struct rtnl_class *filter)
+{
+ struct nl_cache *cache;
+
+ cache = nl_cli_class_alloc_cache(sock, ifindex);
+ nl_cache_dump_filter(cache, ¶ms, OBJ_CAST(filter));
+}
+
+static void dump_class(struct nl_object *obj, void *arg)
+{
+ struct rtnl_link *link = nl_object_priv(obj);
+
+ __dump_class(rtnl_link_get_ifindex(link), arg);
+}
+
+int main(int argc, char *argv[])
+{
+ struct rtnl_class *class;
+ struct rtnl_tc *tc;
+ struct nl_cache *link_cache;
+ int ifindex;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ class = nl_cli_class_alloc();
+ tc = (struct rtnl_tc *) class;
+
+ params.dp_fd = stdout;
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_DETAILS = 257,
+ ARG_STATS = 258,
+ };
+ static struct option long_opts[] = {
+ { "details", 0, 0, ARG_DETAILS },
+ { "stats", 0, 0, ARG_STATS },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "dev", 1, 0, 'd' },
+ { "parent", 1, 0, 'p' },
+ { "id", 1, 0, 'i' },
+ { "kind", 1, 0, 'k' },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "hvd:p:i:k:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case ARG_DETAILS: params.dp_type = NL_DUMP_DETAILS; break;
+ case ARG_STATS: params.dp_type = NL_DUMP_STATS; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
+ case 'p': nl_cli_tc_parse_parent(tc, optarg); break;
+ case 'i': nl_cli_tc_parse_handle(tc, optarg, 0); break;
+ case 'k': nl_cli_tc_parse_kind(tc, optarg); break;
+ }
+ }
+
+ if ((ifindex = rtnl_tc_get_ifindex(tc)))
+ __dump_class(ifindex, class);
+ else
+ nl_cache_foreach(link_cache, dump_class, class);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-classid-lookup.c b/ap/lib/libnl/libnl-3.2.25/src/nl-classid-lookup.c
new file mode 100644
index 0000000..1d45d0b
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-classid-lookup.c
@@ -0,0 +1,87 @@
+/*
+ * src/nl-classid-lookup.c Lookup classid
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+
+static void print_usage(void)
+{
+ printf(
+"Usage: nl-classid-lookup [OPTIONS]... NAME\n"
+"\n"
+"OPTIONS\n"
+" -h, --help Show this help text.\n"
+" -v, --version Show versioning information.\n"
+" -r, --reverse Do a reverse lookup, i.e. classid to name.\n"
+" --raw Print the raw classid, not pretty printed.\n"
+"\n"
+"EXAMPLE\n"
+" $ nl-classid-lookup low_latency\n"
+" $ nl-classid-lookup -r 1:12\n"
+"\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ uint32_t classid;
+ char *name;
+ int err, reverse = 0, raw = 0;
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_RAW = 257,
+ };
+ static struct option long_opts[] = {
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "reverse", 0, 0, 'r' },
+ { "raw", 0, 0, ARG_RAW },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "hvr", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'r': reverse = 1; break;
+ case ARG_RAW: raw = 1; break;
+ }
+ }
+
+ if (optind >= argc)
+ print_usage();
+
+ name = argv[optind++];
+
+ /*
+ * We use rtnl_tc_str2handle() even while doing a reverse lookup. This
+ * allows for name -> name lookups. This is intentional, it does not
+ * do any harm and avoids duplicating a lot of code.
+ */
+ if ((err = rtnl_tc_str2handle(name, &classid)) < 0)
+ nl_cli_fatal(err, "Unable to lookup classid \"%s\": %s",
+ name, nl_geterror(err));
+
+ if (reverse) {
+ char buf[64];
+ printf("%s\n", rtnl_tc_handle2str(classid, buf, sizeof(buf)));
+ } else if (raw)
+ printf("%#x\n", classid);
+ else
+ printf("%x:%x\n", TC_H_MAJ(classid) >> 16, TC_H_MIN(classid));
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-cls-add.c b/ap/lib/libnl/libnl-3.2.25/src/nl-cls-add.c
new file mode 100644
index 0000000..6acb320
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-cls-add.c
@@ -0,0 +1,163 @@
+/*
+ * src/nl-cls-add.c Add classifier
+ *
+ * This library 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 version 2 of the License.
+ *
+ * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/tc.h>
+#include <netlink/cli/cls.h>
+#include <netlink/cli/link.h>
+
+#include <netlink-private/route/tc-api.h>
+
+static int quiet = 0;
+
+static void print_usage(void)
+{
+ printf(
+"Usage: nl-cls-add [OPTIONS]... classifier [CONFIGURATION]...\n"
+"\n"
+"OPTIONS\n"
+" -q, --quiet Do not print informal notifications.\n"
+" -h, --help Show this help text.\n"
+" -v, --version Show versioning information.\n"
+" --update Update classifier if it exists.\n"
+" --update-only Only update classifier, never create it.\n"
+" -d, --dev=DEV Network device the classifier should be attached to.\n"
+" -i, --id=ID ID of new classifier (default: auto-generated)\n"
+" -p, --parent=ID ID of parent { root | ingress | class-ID }\n"
+" --protocol=PROTO Protocol to match (default: all)\n"
+" --prio=PRIO Priority (default: 0)\n"
+" --mtu=SIZE Overwrite MTU (default: MTU of network device)\n"
+" --mpu=SIZE Minimum packet size on the link (default: 0).\n"
+" --overhead=SIZE Overhead in bytes per packet (default: 0).\n"
+" --linktype=TYPE Overwrite linktype (default: type of network device)\n"
+"\n"
+"CONFIGURATION\n"
+" -h, --help Show help text of classifier specific options.\n"
+"\n"
+"EXAMPLE\n"
+" $ nl-cls-add --dev=eth1 --parent=q_root basic --target c_www\n"
+"\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct rtnl_cls *cls;
+ struct rtnl_tc *tc;
+ struct nl_cache *link_cache;
+ struct nl_dump_params dp = {
+ .dp_type = NL_DUMP_DETAILS,
+ .dp_fd = stdout,
+ };
+ struct nl_cli_tc_module *tm;
+ struct rtnl_tc_ops *ops;
+ int err, flags = NLM_F_CREATE | NLM_F_EXCL;
+ char *kind, *id = NULL;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+
+ link_cache = nl_cli_link_alloc_cache(sock);
+
+ cls = nl_cli_cls_alloc();
+ tc = (struct rtnl_tc *) cls;
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_UPDATE = 257,
+ ARG_UPDATE_ONLY = 258,
+ ARG_MTU,
+ ARG_MPU,
+ ARG_OVERHEAD,
+ ARG_LINKTYPE,
+ ARG_PROTO,
+ ARG_PRIO,
+ };
+ static struct option long_opts[] = {
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "dev", 1, 0, 'd' },
+ { "parent", 1, 0, 'p' },
+ { "id", 1, 0, 'i' },
+ { "proto", 1, 0, ARG_PROTO },
+ { "prio", 1, 0, ARG_PRIO },
+ { "update", 0, 0, ARG_UPDATE },
+ { "update-only", 0, 0, ARG_UPDATE_ONLY },
+ { "mtu", 1, 0, ARG_MTU },
+ { "mpu", 1, 0, ARG_MPU },
+ { "overhead", 1, 0, ARG_OVERHEAD },
+ { "linktype", 1, 0, ARG_LINKTYPE },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "+qhvd:p:i:",
+ long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
+ case 'p': nl_cli_tc_parse_parent(tc, optarg); break;
+ case 'i': id = strdup(optarg); break;
+ case ARG_UPDATE: flags = NLM_F_CREATE; break;
+ case ARG_UPDATE_ONLY: flags = 0; break;
+ case ARG_MTU: nl_cli_tc_parse_mtu(tc, optarg); break;
+ case ARG_MPU: nl_cli_tc_parse_mpu(tc, optarg); break;
+ case ARG_OVERHEAD: nl_cli_tc_parse_overhead(tc, optarg); break;
+ case ARG_LINKTYPE: nl_cli_tc_parse_linktype(tc, optarg); break;
+ case ARG_PROTO: nl_cli_cls_parse_proto(cls, optarg); break;
+ case ARG_PRIO:
+ rtnl_cls_set_prio(cls, nl_cli_parse_u32(optarg));
+ break;
+ }
+ }
+
+ if (optind >= argc)
+ print_usage();
+
+ if (!rtnl_tc_get_ifindex(tc))
+ nl_cli_fatal(EINVAL, "You must specify a network device (--dev=XXX)");
+
+ if (!rtnl_tc_get_parent(tc))
+ nl_cli_fatal(EINVAL, "You must specify a parent (--parent=XXX)");
+
+ if (id) {
+ nl_cli_tc_parse_handle(tc, id, 1);
+ free(id);
+ }
+
+ kind = argv[optind++];
+ rtnl_tc_set_kind(tc, kind);
+
+ if (!(ops = rtnl_tc_get_ops(tc)))
+ nl_cli_fatal(ENOENT, "Unknown classifier \"%s\".", kind);
+
+ if (!(tm = nl_cli_tc_lookup(ops)))
+ nl_cli_fatal(ENOTSUP, "Classifier type \"%s\" not supported.", kind);
+
+ tm->tm_parse_argv(tc, argc, argv);
+
+ if (!quiet) {
+ printf("Adding ");
+ nl_object_dump(OBJ_CAST(cls), &dp);
+ }
+
+ if ((err = rtnl_cls_add(sock, cls, flags)) < 0)
+ nl_cli_fatal(EINVAL, "Unable to add classifier: %s", nl_geterror(err));
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-cls-delete.c b/ap/lib/libnl/libnl-3.2.25/src/nl-cls-delete.c
new file mode 100644
index 0000000..2b3db1f
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-cls-delete.c
@@ -0,0 +1,155 @@
+/*
+ * src/nl-cls-delete.c Delete Classifier
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2008-2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/cls.h>
+#include <netlink/cli/link.h>
+
+static int quiet = 0, default_yes = 0, deleted = 0, interactive = 0;
+static struct nl_sock *sock;
+
+static void print_usage(void)
+{
+ printf(
+"Usage: nl-cls-delete [OPTION]... [class]\n"
+"\n"
+"OPTIONS\n"
+" --interactive Run interactively.\n"
+" --yes Set default answer to yes.\n"
+" -q, --quiet Do not print informal notifications.\n"
+" -h, --help Show this help text and exit.\n"
+" -v, --version Show versioning information and exit.\n"
+"\n"
+" -d, --dev=DEV Device the classifer is attached to.\n"
+" -p, --parent=ID Identifier of parent qdisc/class.\n"
+" -i, --id=ID Identifier\n"
+" -k, --kind=NAME Kind of classifier (e.g. basic, u32, fw)\n"
+" --protocol=PROTO Protocol to match (default: all)\n"
+" --prio=PRIO Priority (default: 0)\n"
+"\n"
+"EXAMPLE\n"
+" # Delete all classifiers on eth0 attached to parent q_root:\n"
+" $ nl-cls-delete --dev eth0 --parent q_root:\n"
+"\n"
+ );
+
+ exit(0);
+}
+
+static void delete_cb(struct nl_object *obj, void *arg)
+{
+ struct rtnl_cls *cls = nl_object_priv(obj);
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err;
+
+ if (interactive && !nl_cli_confirm(obj, ¶ms, default_yes))
+ return;
+
+ if ((err = rtnl_cls_delete(sock, cls, 0)) < 0)
+ nl_cli_fatal(err, "Unable to delete classifier: %s\n",
+ nl_geterror(err));
+
+ if (!quiet) {
+ printf("Deleted ");
+ nl_object_dump(obj, ¶ms);
+ }
+
+ deleted++;
+}
+
+static void __delete_link(int ifindex, struct rtnl_cls *filter)
+{
+ struct nl_cache *cache;
+ uint32_t parent = rtnl_tc_get_parent((struct rtnl_tc *) filter);
+
+ cache = nl_cli_cls_alloc_cache(sock, ifindex, parent);
+ nl_cache_foreach_filter(cache, OBJ_CAST(filter), delete_cb, NULL);
+ nl_cache_free(cache);
+}
+
+static void delete_link(struct nl_object *obj, void *arg)
+{
+ struct rtnl_link *link = nl_object_priv(obj);
+
+ __delete_link(rtnl_link_get_ifindex(link), arg);
+}
+
+int main(int argc, char *argv[])
+{
+ struct rtnl_cls *cls;
+ struct rtnl_tc *tc;
+ struct nl_cache *link_cache;
+ int ifindex;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ cls = nl_cli_cls_alloc();
+ tc = (struct rtnl_tc *) cls;
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_YES = 257,
+ ARG_INTERACTIVE = 258,
+ ARG_PROTO,
+ ARG_PRIO,
+ };
+ static struct option long_opts[] = {
+ { "interactive", 0, 0, ARG_INTERACTIVE },
+ { "yes", 0, 0, ARG_YES },
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "dev", 1, 0, 'd' },
+ { "parent", 1, 0, 'p' },
+ { "id", 1, 0, 'i' },
+ { "kind", 1, 0, 'k' },
+ { "proto", 1, 0, ARG_PROTO },
+ { "prio", 1, 0, ARG_PRIO },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "qhvd:p:i:k:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case '?': nl_cli_fatal(EINVAL, "Invalid options");
+ case ARG_INTERACTIVE: interactive = 1; break;
+ case ARG_YES: default_yes = 1; break;
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
+ case 'p': nl_cli_tc_parse_parent(tc, optarg); break;
+ case 'i': nl_cli_tc_parse_handle(tc, optarg, 0); break;
+ case 'k': nl_cli_tc_parse_kind(tc, optarg); break;
+ case ARG_PROTO: nl_cli_cls_parse_proto(cls, optarg); break;
+ case ARG_PRIO:
+ rtnl_cls_set_prio(cls, nl_cli_parse_u32(optarg));
+ break;
+ }
+ }
+
+ if ((ifindex = rtnl_tc_get_ifindex(tc)))
+ __delete_link(ifindex, cls);
+ else
+ nl_cache_foreach(link_cache, delete_link, cls);
+
+ if (!quiet)
+ printf("Deleted %d classs\n", deleted);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-cls-list.c b/ap/lib/libnl/libnl-3.2.25/src/nl-cls-list.c
new file mode 100644
index 0000000..5072585
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-cls-list.c
@@ -0,0 +1,129 @@
+/*
+ * src/nl-cls-list.c List classifiers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2008-2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/tc.h>
+#include <netlink/cli/cls.h>
+#include <netlink/cli/link.h>
+
+static struct nl_sock *sock;
+
+static struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+};
+
+static void print_usage(void)
+{
+ printf(
+"Usage: nl-cls-list [OPTION]...\n"
+"\n"
+"OPTIONS\n"
+" --details Show details\n"
+" --stats Show statistics\n"
+" -h, --help Show this help\n"
+" -v, --version Show versioning information\n"
+"\n"
+" -d, --dev=DEV Device the classifier is attached to. (default: all)\n"
+" -p, --parent=ID Identifier of parent class.\n"
+" -i, --id=ID Identifier.\n"
+" -k, --kind=NAME Kind of classifier (e.g. basic, u32, fw)\n"
+" --protocol=PROTO Protocol to match (default: all)\n"
+" --prio=PRIO Priority (default: 0)\n"
+"\n"
+"EXAMPLE\n"
+" # Display statistics of all classes on eth0\n"
+" $ nl-cls-list --stats --dev=eth0\n"
+"\n"
+ );
+ exit(0);
+}
+
+static void __dump_link(int ifindex, struct rtnl_cls *filter)
+{
+ struct nl_cache *cache;
+ uint32_t parent = rtnl_tc_get_parent((struct rtnl_tc *) filter);
+
+ cache = nl_cli_cls_alloc_cache(sock, ifindex, parent);
+ nl_cache_dump_filter(cache, ¶ms, OBJ_CAST(filter));
+ nl_cache_free(cache);
+}
+
+static void dump_link(struct nl_object *obj, void *arg)
+{
+ struct rtnl_link *link = nl_object_priv(obj);
+
+ __dump_link(rtnl_link_get_ifindex(link), arg);
+}
+
+int main(int argc, char *argv[])
+{
+ struct rtnl_cls *cls;
+ struct rtnl_tc *tc;
+ struct nl_cache *link_cache;
+ int ifindex;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ cls = nl_cli_cls_alloc();
+ tc = (struct rtnl_tc *) cls;
+
+ params.dp_fd = stdout;
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_DETAILS = 257,
+ ARG_STATS = 258,
+ ARG_PROTO,
+ ARG_PRIO,
+ };
+ static struct option long_opts[] = {
+ { "details", 0, 0, ARG_DETAILS },
+ { "stats", 0, 0, ARG_STATS },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "dev", 1, 0, 'd' },
+ { "parent", 1, 0, 'p' },
+ { "id", 1, 0, 'i' },
+ { "kind", 1, 0, 'k' },
+ { "proto", 1, 0, ARG_PROTO },
+ { "prio", 1, 0, ARG_PRIO },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "hvd:p:i:k:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case ARG_DETAILS: params.dp_type = NL_DUMP_DETAILS; break;
+ case ARG_STATS: params.dp_type = NL_DUMP_STATS; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
+ case 'p': nl_cli_tc_parse_parent(tc, optarg); break;
+ case 'i': nl_cli_tc_parse_handle(tc, optarg, 0); break;
+ case 'k': nl_cli_tc_parse_kind(tc, optarg); break;
+ case ARG_PROTO: nl_cli_cls_parse_proto(cls, optarg); break;
+ case ARG_PRIO:
+ rtnl_cls_set_prio(cls, nl_cli_parse_u32(optarg));
+ break;
+ }
+ }
+
+ if ((ifindex = rtnl_tc_get_ifindex(tc)))
+ __dump_link(ifindex, cls);
+ else
+ nl_cache_foreach(link_cache, dump_link, cls);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-fib-lookup.c b/ap/lib/libnl/libnl-3.2.25/src/nl-fib-lookup.c
new file mode 100644
index 0000000..705cf32
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-fib-lookup.c
@@ -0,0 +1,109 @@
+/*
+ * src/nl-fib-lookup.c FIB Route Lookup
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-fib-lookup [options] <addr>\n"
+ "Options:\n"
+ " -t, --table <table> Table id\n"
+ " -f, --fwmark <int> Firewall mark\n"
+ " -s, --scope <scope> Routing scope\n"
+ " -T, --tos <int> Type of Service\n");
+ exit(1);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *nlh;
+ struct nl_cache *result;
+ struct flnl_request *request;
+ struct nl_addr *addr;
+ struct nl_dump_params params = {
+ .dp_fd = stdout,
+ .dp_type = NL_DUMP_DETAILS,
+ };
+ int table = RT_TABLE_UNSPEC, scope = RT_SCOPE_UNIVERSE;
+ int tos = 0, err = 1;
+ uint64_t fwmark = 0;
+
+ while (1) {
+ static struct option long_opts[] = {
+ {"table", 1, 0, 't'},
+ {"fwmark", 1, 0, 'f'},
+ {"scope", 1, 0, 's'},
+ {"tos", 1, 0, 'T'},
+ {"help", 0, 0, 'h'},
+ {0, 0, 0, 0},
+ };
+ int c, idx = 0;
+
+ c = getopt_long(argc, argv, "t:f:s:T:h", long_opts, &idx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 't':
+ table = strtoul(optarg, NULL, 0);
+ break;
+ case 'f':
+ fwmark = strtoul(optarg, NULL, 0);
+ break;
+ case 's':
+ scope = strtoul(optarg, NULL, 0);
+ break;
+ case 'T':
+ tos = strtoul(optarg, NULL, 0);
+ break;
+ default:
+ print_usage();
+ }
+ }
+
+ if (optind >= argc)
+ print_usage();
+
+ nlh = nl_cli_alloc_socket();
+
+ if ((err = nl_addr_parse(argv[optind], AF_INET, &addr)) < 0)
+ nl_cli_fatal(err, "Unable to parse address \"%s\": %s\n",
+ argv[optind], nl_geterror(err));
+
+ result = flnl_result_alloc_cache();
+ if (!result)
+ nl_cli_fatal(ENOMEM, "Unable to allocate cache");
+
+ request = flnl_request_alloc();
+ if (!request)
+ nl_cli_fatal(ENOMEM, "Unable to allocate request");
+
+ flnl_request_set_table(request, table);
+ flnl_request_set_fwmark(request, fwmark);
+ flnl_request_set_scope(request, scope);
+ flnl_request_set_tos(request, tos);
+
+ err = flnl_request_set_addr(request, addr);
+ nl_addr_put(addr);
+ if (err < 0)
+ nl_cli_fatal(err, "Unable to send request: %s", nl_geterror(err));
+
+ nl_cli_connect(nlh, NETLINK_FIB_LOOKUP);
+
+ err = flnl_lookup(nlh, request, result);
+ if (err < 0)
+ nl_cli_fatal(err, "Unable to lookup: %s\n", nl_geterror(err));
+
+ nl_cache_dump(result, ¶ms);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-link-enslave.c b/ap/lib/libnl/libnl-3.2.25/src/nl-link-enslave.c
new file mode 100644
index 0000000..2b5d47d
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-link-enslave.c
@@ -0,0 +1,50 @@
+/*
+ * src/nl-link-enslave.c Enslave a link
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2011 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+#include <netlink/route/link/bonding.h>
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *link_cache;
+ struct rtnl_link *master, *slave;
+ int err;
+
+ if (argc < 3) {
+ fprintf(stderr, "Usage: nl-link-enslave master slave\n");
+ return 1;
+ }
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+
+ if (!(master = rtnl_link_get_by_name(link_cache, argv[1]))) {
+ fprintf(stderr, "Unknown link: %s\n", argv[1]);
+ return 1;
+ }
+
+ if (!(slave = rtnl_link_get_by_name(link_cache, argv[2]))) {
+ fprintf(stderr, "Unknown link: %s\n", argv[2]);
+ return 1;
+ }
+
+ if ((err = rtnl_link_bond_enslave(sock, master, slave)) < 0) {
+ fprintf(stderr, "Unable to enslave %s to %s: %s\n",
+ argv[2], argv[1], nl_geterror(err));
+ return 1;
+ }
+
+ return 0;
+}
+
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-link-ifindex2name.c b/ap/lib/libnl/libnl-3.2.25/src/nl-link-ifindex2name.c
new file mode 100644
index 0000000..68e5158
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-link-ifindex2name.c
@@ -0,0 +1,44 @@
+/*
+ * src/nl-link-ifindex2name.c Transform a interface index to its name
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+
+static void print_usage(void)
+{
+ printf("Usage: nl-link-ifindex2name <ifindex>\n");
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *link_cache;
+ char name[IFNAMSIZ];
+ uint32_t ifindex;
+
+ if (argc < 2)
+ print_usage();
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+
+ ifindex = nl_cli_parse_u32(argv[1]);
+
+ if (!rtnl_link_i2name(link_cache, ifindex, name, sizeof(name)))
+ nl_cli_fatal(ENOENT, "Interface index %d does not exist",
+ ifindex);
+
+ printf("%s\n", name);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-link-list.c b/ap/lib/libnl/libnl-3.2.25/src/nl-link-list.c
new file mode 100644
index 0000000..b5c98b4
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-link-list.c
@@ -0,0 +1,98 @@
+/*
+ * src/nl-link-dump.c Dump link attributes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+
+static void print_usage(void)
+{
+ printf(
+"Usage: nl-link-list [OPTIONS]... \n"
+"\n"
+"OPTIONS\n"
+" --details Show detailed information of each link\n"
+" --stats Show statistics, implies --details\n"
+" -h, --help Show this help text.\n"
+" -v, --version Show versioning information.\n"
+"\n"
+" -n, --name=NAME Name of link\n"
+" -i, --index Interface index (unique identifier)\n"
+" --family=NAME Link address family\n"
+" --mtu=NUM MTU value\n"
+" --txqlen=NUM TX queue length\n"
+" --weight=NUM Weight\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *link_cache;
+ struct rtnl_link *link;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link = nl_cli_link_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_FAMILY = 257,
+ ARG_MTU = 258,
+ ARG_TXQLEN,
+ ARG_WEIGHT,
+ ARG_DETAILS,
+ ARG_STATS,
+ };
+ static struct option long_opts[] = {
+ { "details", 0, 0, ARG_DETAILS },
+ { "stats", 0, 0, ARG_STATS },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "name", 1, 0, 'n' },
+ { "index", 1, 0, 'i' },
+ { "family", 1, 0, ARG_FAMILY },
+ { "mtu", 1, 0, ARG_MTU },
+ { "txqlen", 1, 0, ARG_TXQLEN },
+ { "weight", 1, 0, ARG_WEIGHT },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "hvn:i:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case ARG_DETAILS: params.dp_type = NL_DUMP_DETAILS; break;
+ case ARG_STATS: params.dp_type = NL_DUMP_STATS; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'n': nl_cli_link_parse_name(link, optarg); break;
+ case 'i': nl_cli_link_parse_ifindex(link, optarg); break;
+ case ARG_FAMILY: nl_cli_link_parse_family(link, optarg); break;
+ case ARG_MTU: nl_cli_link_parse_mtu(link, optarg); break;
+ case ARG_TXQLEN: nl_cli_link_parse_txqlen(link, optarg); break;
+ case ARG_WEIGHT: nl_cli_link_parse_weight(link, optarg); break;
+ }
+ }
+
+ link_cache = nl_cli_link_alloc_cache_family(sock,
+ rtnl_link_get_family(link));
+
+ nl_cache_dump_filter(link_cache, ¶ms, OBJ_CAST(link));
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-link-name2ifindex.c b/ap/lib/libnl/libnl-3.2.25/src/nl-link-name2ifindex.c
new file mode 100644
index 0000000..b8ae4bc
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-link-name2ifindex.c
@@ -0,0 +1,41 @@
+/*
+ * src/nl-link-name2ifindex.c Transform a interface name to its index
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+
+static void print_usage(void)
+{
+ printf("Usage: nl-link-name2ifindex <name>\n");
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *link_cache;
+ uint32_t ifindex;
+
+ if (argc < 2)
+ print_usage();
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+
+ if (!(ifindex = rtnl_link_name2i(link_cache, argv[1])))
+ nl_cli_fatal(ENOENT, "Interface \"%s\" does not exist",
+ argv[1]);
+
+ printf("%u\n", ifindex);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-link-release.c b/ap/lib/libnl/libnl-3.2.25/src/nl-link-release.c
new file mode 100644
index 0000000..4c9f15a
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-link-release.c
@@ -0,0 +1,45 @@
+/*
+ * src/nl-link-release.c release a link
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2011 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+#include <netlink/route/link/bonding.h>
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *link_cache;
+ struct rtnl_link *slave;
+ int err;
+
+ if (argc < 2) {
+ fprintf(stderr, "Usage: nl-link-release slave\n");
+ return 1;
+ }
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+
+ if (!(slave = rtnl_link_get_by_name(link_cache, argv[1]))) {
+ fprintf(stderr, "Unknown link: %s\n", argv[1]);
+ return 1;
+ }
+
+ if ((err = rtnl_link_bond_release(sock, slave)) < 0) {
+ fprintf(stderr, "Unable to release slave %s: %s\n",
+ argv[1], nl_geterror(err));
+ return 1;
+ }
+
+ return 0;
+}
+
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-link-set.c b/ap/lib/libnl/libnl-3.2.25/src/nl-link-set.c
new file mode 100644
index 0000000..bbb60f9
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-link-set.c
@@ -0,0 +1,137 @@
+/*
+ * src/nl-link-set.c Set link attributes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+
+static struct nl_sock *sock;
+static int quiet = 0;
+
+#if 0
+ " changes := [link LINK]\n"
+ " [master MASTER] [qdisc QDISC] [addr ADDR] [broadcast BRD]\n"
+ " [{ up | down }] [{ arp | noarp }] [{ promisc | nopromisc }]\n"
+ " [{ dynamic | nodynamic }] [{ multicast | nomulticast }]\n"
+ " [{ trailers | notrailers }] [{ allmulticast | noallmulticast }]\n");
+#endif
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-link-set [OPTION]... [LINK]\n"
+ "\n"
+ "Options\n"
+ " -q, --quiet Do not print informal notifications\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Selecting the Link\n"
+ " -n, --name=NAME link name\n"
+ " -i, --index interface index\n"
+ "Change Options\n"
+ " --rename=NAME rename interface\n"
+ " --mtu=NUM MTU value\n"
+ " --txqlen=NUM TX queue length\n"
+ " --weight=NUM weight\n"
+ " --ifalias=NAME alias name (SNMP IfAlias)\n"
+ " --state=up/down set interface up/down\n"
+ );
+ exit(0);
+}
+
+static void set_cb(struct nl_object *obj, void *arg)
+{
+ struct rtnl_link *link = nl_object_priv(obj);
+ struct rtnl_link *change = arg;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err;
+
+ if ((err = rtnl_link_change(sock, link, change, 0)) < 0)
+ nl_cli_fatal(err, "Unable to change link: %s",
+ nl_geterror(err));
+
+ if (!quiet) {
+ printf("Changed ");
+ nl_object_dump(OBJ_CAST(link), ¶ms);
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_cache *link_cache;
+ struct rtnl_link *link, *change;
+ int ok = 0;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ link = nl_cli_link_alloc();
+ change = nl_cli_link_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_RENAME = 257,
+ ARG_MTU = 258,
+ ARG_TXQLEN,
+ ARG_WEIGHT,
+ ARG_IFALIAS,
+ ARG_STATE,
+ };
+ static struct option long_opts[] = {
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "name", 1, 0, 'n' },
+ { "index", 1, 0, 'i' },
+ { "rename", 1, 0, ARG_RENAME },
+ { "mtu", 1, 0, ARG_MTU },
+ { "txqlen", 1, 0, ARG_TXQLEN },
+ { "weight", 1, 0, ARG_WEIGHT },
+ { "ifalias", 1, 0, ARG_IFALIAS },
+ { "state", 1, 0, ARG_STATE },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "qhvn:i:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'n': ok++; nl_cli_link_parse_name(link, optarg); break;
+ case 'i': ok++; nl_cli_link_parse_ifindex(link, optarg); break;
+ case ARG_RENAME: nl_cli_link_parse_name(change, optarg); break;
+ case ARG_MTU: nl_cli_link_parse_mtu(change, optarg); break;
+ case ARG_TXQLEN: nl_cli_link_parse_txqlen(change, optarg); break;
+ case ARG_WEIGHT: nl_cli_link_parse_weight(change, optarg); break;
+ case ARG_IFALIAS: nl_cli_link_parse_ifalias(change, optarg); break;
+ case ARG_STATE:
+ if(!strcmp(optarg, "up"))
+ rtnl_link_set_flags(change, IFF_UP);
+ else if(!strcmp(optarg, "down"))
+ rtnl_link_unset_flags(change, IFF_UP);
+ break;
+ }
+ }
+
+ if (!ok)
+ print_usage();
+
+ nl_cache_foreach_filter(link_cache, OBJ_CAST(link), set_cb, change);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-link-stats.c b/ap/lib/libnl/libnl-3.2.25/src/nl-link-stats.c
new file mode 100644
index 0000000..4dfca86
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-link-stats.c
@@ -0,0 +1,119 @@
+/*
+ * src/nl-link-stats.c Retrieve link statistics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-link-stats [OPTION]... [LINK] [ListOfStats]\n"
+ "\n"
+ "Options\n"
+ " -l, --list List available statistic names\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Link Options\n"
+ " -n, --name=NAME link name\n"
+ " -i, --index=NUM interface index\n"
+ );
+ exit(0);
+}
+
+static void list_stat_names(void)
+{
+ char buf[64];
+ int i;
+
+ for (i = 0; i < RTNL_LINK_STATS_MAX; i++)
+ printf("%s\n", rtnl_link_stat2str(i, buf, sizeof(buf)));
+
+ exit(0);
+}
+
+static int gargc;
+
+static void dump_stat(struct rtnl_link *link, int id)
+{
+ uint64_t st = rtnl_link_get_stat(link, id);
+ char buf[64];
+
+ printf("%s.%s %" PRIu64 "\n", rtnl_link_get_name(link),
+ rtnl_link_stat2str(id, buf, sizeof(buf)), st);
+}
+
+static void dump_stats(struct nl_object *obj, void *arg)
+{
+ struct rtnl_link *link = (struct rtnl_link *) obj;
+ char **argv = arg;
+
+ if (optind >= gargc) {
+ int i;
+
+ for (i = 0; i < RTNL_LINK_STATS_MAX; i++)
+ dump_stat(link, i);
+ } else {
+ while (optind < gargc) {
+ int id = rtnl_link_str2stat(argv[optind]);
+
+ if (id < 0)
+ fprintf(stderr, "Warning: Unknown statistic "
+ "\"%s\"\n", argv[optind]);
+ else
+ dump_stat(link, id);
+
+ optind++;
+ }
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *link_cache;
+ struct rtnl_link *link;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ link = nl_cli_link_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ static struct option long_opts[] = {
+ { "list", 0, 0, 'l' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "name", 1, 0, 'n' },
+ { "index", 1, 0, 'i' },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "lhvn:i:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'l': list_stat_names(); break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'n': nl_cli_link_parse_name(link, optarg); break;
+ case 'i': nl_cli_link_parse_ifindex(link, optarg); break;
+ }
+ }
+
+ gargc = argc;
+ nl_cache_foreach_filter(link_cache, OBJ_CAST(link), dump_stats, argv);
+
+ return 0;
+}
+
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-list-caches.c b/ap/lib/libnl/libnl-3.2.25/src/nl-list-caches.c
new file mode 100644
index 0000000..853d8a4
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-list-caches.c
@@ -0,0 +1,117 @@
+/*
+ * nl-list-caches.c List registered cache types
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink-private/netlink.h>
+#include <netlink/cli/utils.h>
+
+static void print_usage(void)
+{
+ fprintf(stderr, "Usage: nl-list-caches\n");
+ exit(1);
+}
+
+static char *id_attr_list(struct nl_object_ops *ops, char *buf, size_t len)
+{
+ if (ops->oo_attrs2str != NULL)
+ return ops->oo_attrs2str(ops->oo_id_attrs, buf, len);
+ else {
+ memset(buf, 0, len);
+ return buf;
+ }
+}
+
+static void print(struct nl_cache_ops *ops, void *arg)
+{
+ char buf[64];
+
+ printf("%s:\n" \
+ " hdrsize: %d bytes\n" \
+ " protocol: %s\n" \
+ " request-update: %s\n" \
+ " msg-parser: %s\n",
+ ops->co_name, ops->co_hdrsize,
+ nl_nlfamily2str(ops->co_protocol, buf, sizeof(buf)),
+ ops->co_request_update ? "yes" : "no",
+ ops->co_msg_parser ? "yes" : "no");
+
+ if (ops->co_obj_ops) {
+ struct nl_object_ops *obj_ops = ops->co_obj_ops;
+ const char *dump_names[NL_DUMP_MAX+1] = {
+ "brief",
+ "detailed",
+ "stats",
+ };
+ int i;
+
+ printf(" cacheable object:\n" \
+ " name: %s:\n" \
+ " size: %zu bytes\n" \
+ " constructor: %s\n" \
+ " free-data: %s\n" \
+ " clone: %s\n" \
+ " compare: %s\n" \
+ " id attributes: %s\n" \
+ " dump: ",
+ obj_ops->oo_name, obj_ops->oo_size,
+ obj_ops->oo_constructor ? "yes" : "no",
+ obj_ops->oo_free_data ? "yes" : "no",
+ obj_ops->oo_clone ? "yes" : "no",
+ obj_ops->oo_compare ? "yes" : "no",
+ id_attr_list(obj_ops, buf, sizeof(buf)));
+
+ for (i = 0; i <= NL_DUMP_MAX; i++)
+ if (obj_ops->oo_dump[i])
+ printf("%s%s",
+ i == 0 ? "" : ", ",
+ dump_names[i]);
+
+ printf("\n");
+ }
+
+ if (ops->co_genl) {
+ struct genl_ops *genl_ops = ops->co_genl;
+
+ printf(" genl:\n" \
+ " name: %s\n" \
+ " user-hdr: %d\n" \
+ " id: %d\n",
+ genl_ops->o_name, genl_ops->o_hdrsize, genl_ops->o_id);
+
+ if (genl_ops->o_ncmds) {
+ int i;
+
+ printf(" cmds:\n");
+
+ for (i = 0; i < genl_ops->o_ncmds; i++) {
+ struct genl_cmd *cmd = &genl_ops->o_cmds[i];
+
+ printf(" %s:\n"
+ " id: %d\n" \
+ " maxattr: %d\n" \
+ " msg-parser: %s\n" \
+ " attr-policy: %s\n",
+ cmd->c_name, cmd->c_id, cmd->c_maxattr,
+ cmd->c_msg_parser ? "yes" : "no",
+ cmd->c_attr_policy ? "yes" : "no");
+ }
+ }
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ if (argc > 1 && !strcasecmp(argv[1], "-h"))
+ print_usage();
+
+ nl_cache_ops_foreach(print, NULL);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-list-sockets.c b/ap/lib/libnl/libnl-3.2.25/src/nl-list-sockets.c
new file mode 100644
index 0000000..c2fa1cd
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-list-sockets.c
@@ -0,0 +1,49 @@
+/*
+ * nl-list-sockets.c Pretty-print /proc/net/netlink
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+
+#define PROC_NETLINK "/proc/net/netlink"
+
+int main(int argc, char *argv[])
+{
+ FILE *fd;
+ char buf[2048], p[64];
+
+ fd = fopen(PROC_NETLINK, "r");
+ if (fd == NULL) {
+ perror("fopen");
+ return -1;
+ }
+
+ printf("Address Family PID Groups rmem "
+ "wmem CB refcnt\n");
+
+ while (fgets(buf, sizeof(buf), fd)) {
+ unsigned long sk, cb;
+ int ret, proto, pid, rmem, wmem, refcnt;
+ unsigned int groups;
+
+ ret = sscanf(buf, "%lx %d %d %08x %d %d %lx %d\n",
+ &sk, &proto, &pid, &groups, &rmem, &wmem,
+ &cb, &refcnt);
+ if (ret != 8)
+ continue;
+
+ printf("0x%016lx %-16s %-6d %08x %-6d %-6d 0x%08lx %d\n",
+ sk, nl_nlfamily2str(proto, p, sizeof(p)), pid,
+ groups, rmem, wmem, cb, refcnt);
+ }
+
+ fclose(fd);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-monitor.c b/ap/lib/libnl/libnl-3.2.25/src/nl-monitor.c
new file mode 100644
index 0000000..fdf6497
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-monitor.c
@@ -0,0 +1,115 @@
+/*
+ * src/nl-monitor.c Monitor events
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+
+static void obj_input(struct nl_object *obj, void *arg)
+{
+ struct nl_dump_params dp = {
+ .dp_type = NL_DUMP_STATS,
+ .dp_fd = stdout,
+ .dp_dump_msgtype = 1,
+ };
+
+ nl_object_dump(obj, &dp);
+}
+
+static int event_input(struct nl_msg *msg, void *arg)
+{
+ if (nl_msg_parse(msg, &obj_input, NULL) < 0)
+ fprintf(stderr, "<<EVENT>> Unknown message type\n");
+
+ /* Exit nl_recvmsgs_def() and return to the main select() */
+ return NL_STOP;
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *link_cache;
+ int err = 1;
+ int i, idx;
+
+ static const struct {
+ enum rtnetlink_groups gr_id;
+ const char* gr_name;
+ } known_groups[] = {
+ { RTNLGRP_LINK, "link" },
+ { RTNLGRP_NOTIFY, "notify" },
+ { RTNLGRP_NEIGH, "neigh" },
+ { RTNLGRP_TC, "tc" },
+ { RTNLGRP_IPV4_IFADDR, "ipv4-ifaddr" },
+ { RTNLGRP_IPV4_MROUTE, "ipv4-mroute" },
+ { RTNLGRP_IPV4_ROUTE, "ipv4-route" },
+ { RTNLGRP_IPV6_IFADDR, "ipv6-ifaddr" },
+ { RTNLGRP_IPV6_MROUTE, "ipv6-mroute" },
+ { RTNLGRP_IPV6_ROUTE, "ipv6-route" },
+ { RTNLGRP_IPV6_IFINFO, "ipv6-ifinfo" },
+ { RTNLGRP_DECnet_IFADDR, "decnet-ifaddr" },
+ { RTNLGRP_DECnet_ROUTE, "decnet-route" },
+ { RTNLGRP_IPV6_PREFIX, "ipv6-prefix" },
+ { RTNLGRP_NONE, NULL }
+ };
+
+ sock = nl_cli_alloc_socket();
+ nl_socket_disable_seq_check(sock);
+ nl_socket_modify_cb(sock, NL_CB_VALID, NL_CB_CUSTOM, event_input, NULL);
+
+ if (argc > 1 && !strcasecmp(argv[1], "-h")) {
+ printf("Usage: nl-monitor [<groups>]\n");
+
+ printf("Known groups:");
+ for (i = 0; known_groups[i].gr_id != RTNLGRP_NONE; i++)
+ printf(" %s", known_groups[i].gr_name);
+ printf("\n");
+ return 2;
+ }
+
+ nl_cli_connect(sock, NETLINK_ROUTE);
+
+ for (idx = 1; argc > idx; idx++) {
+ for (i = 0; known_groups[i].gr_id != RTNLGRP_NONE; i++) {
+ if (!strcmp(argv[idx], known_groups[i].gr_name)) {
+
+ if ((err = nl_socket_add_membership(sock, known_groups[i].gr_id)) < 0) {
+ nl_cli_fatal(err, "%s: %s\n", argv[idx],
+ nl_geterror(err));
+ }
+
+ break;
+ }
+ }
+ if (known_groups[i].gr_id == RTNLGRP_NONE)
+ fprintf(stderr, "Warning: Unknown group: %s\n", argv[idx]);
+ }
+
+ link_cache = nl_cli_link_alloc_cache(sock);
+
+ while (1) {
+ fd_set rfds;
+ int fd, retval;
+
+ fd = nl_socket_get_fd(sock);
+
+ FD_ZERO(&rfds);
+ FD_SET(fd, &rfds);
+ /* wait for an incoming message on the netlink socket */
+ retval = select(fd+1, &rfds, NULL, NULL, NULL);
+
+ if (retval) {
+ /* FD_ISSET(fd, &rfds) will be true */
+ nl_recvmsgs_default(sock);
+ }
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-neigh-add.c b/ap/lib/libnl/libnl-3.2.25/src/nl-neigh-add.c
new file mode 100644
index 0000000..4cddabe
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-neigh-add.c
@@ -0,0 +1,110 @@
+/*
+ * src/ nl-neigh-add.c Add a neighbour
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/neigh.h>
+#include <netlink/cli/link.h>
+
+static int quiet = 0;
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-neigh-add [OPTION]... NEIGHBOUR\n"
+ "\n"
+ "Options\n"
+ " --update-only Do not create neighbour, updates exclusively\n"
+ " --create-only Do not update neighbour if it exists already.\n"
+ " -q, --quiet Do not print informal notifications\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Neighbour Options\n"
+ " -a, --addr=ADDR Destination address of neighbour\n"
+ " -l, --lladdr=ADDR Link layer address of neighbour\n"
+ " -d, --dev=DEV Device the neighbour is connected to\n"
+ " --state=STATE Neighbour state, (default = permanent)\n"
+ "\n"
+ "Example\n"
+ " nl-neigh-add --create-only --addr=10.0.0.1 --dev=eth0 \\\n"
+ " --lladdr=AA:BB:CC:DD:EE:FF\n"
+ );
+
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct rtnl_neigh *neigh;
+ struct nl_cache *link_cache;
+ struct nl_dump_params dp = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err, ok = 0, nlflags = NLM_F_REPLACE | NLM_F_CREATE;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ neigh = nl_cli_neigh_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_UPDATE_ONLY = 257,
+ ARG_CREATE_ONLY = 258,
+ ARG_STATE,
+ };
+ static struct option long_opts[] = {
+ { "update-only", 0, 0, ARG_UPDATE_ONLY },
+ { "create-only", 0, 0, ARG_CREATE_ONLY },
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "addr", 1, 0, 'a' },
+ { "lladdr", 1, 0, 'l' },
+ { "dev", 1, 0, 'd' },
+ { "state", 1, 0, ARG_STATE },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "qhva:l:d:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case ARG_UPDATE_ONLY: nlflags &= ~NLM_F_CREATE; break;
+ case ARG_CREATE_ONLY: nlflags |= NLM_F_EXCL; break;
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'a': ok++; nl_cli_neigh_parse_dst(neigh, optarg); break;
+ case 'l': nl_cli_neigh_parse_lladdr(neigh, optarg); break;
+ case 'd': nl_cli_neigh_parse_dev(neigh, link_cache, optarg); break;
+ case ARG_STATE: nl_cli_neigh_parse_state(neigh, optarg); break;
+ }
+ }
+
+ if (!ok)
+ print_usage();
+
+ if ((err = rtnl_neigh_add(sock, neigh, nlflags)) < 0)
+ nl_cli_fatal(err, "Unable to add neighbour: %s",
+ nl_geterror(err));
+
+ if (!quiet) {
+ printf("Added ");
+ nl_object_dump(OBJ_CAST(neigh), &dp);
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-neigh-delete.c b/ap/lib/libnl/libnl-3.2.25/src/nl-neigh-delete.c
new file mode 100644
index 0000000..c418608
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-neigh-delete.c
@@ -0,0 +1,122 @@
+/*
+ * src/nl-neigh-delete.c Delete a neighbour
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/neigh.h>
+#include <netlink/cli/link.h>
+
+static int quiet = 0, default_yes = 0, deleted = 0, interactive = 0;
+static struct nl_sock *sock;
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-neigh-delete [OPTION]... [NEIGHBOUR]\n"
+ "\n"
+ "Options\n"
+ " -i, --interactive Run interactively\n"
+ " --yes Set default answer to yes\n"
+ " -q, --quiet Do not print informal notifications\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Neighbour Options\n"
+ " -a, --addr=ADDR Destination address of neighbour\n"
+ " -l, --lladdr=ADDR Link layer address of neighbour\n"
+ " -d, --dev=DEV Device the neighbour is connected to\n"
+ " --family=FAMILY Destination address family\n"
+ " --state=STATE Neighbour state, (default = permanent)\n"
+ );
+
+ exit(0);
+}
+
+static void delete_cb(struct nl_object *obj, void *arg)
+{
+ struct rtnl_neigh *neigh = nl_object_priv(obj);
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err;
+
+ if (interactive && !nl_cli_confirm(obj, ¶ms, default_yes))
+ return;
+
+ if ((err = rtnl_neigh_delete(sock, neigh, 0)) < 0)
+ nl_cli_fatal(err, "Unable to delete neighbour: %s\n",
+ nl_geterror(err));
+
+ if (!quiet) {
+ printf("Deleted ");
+ nl_object_dump(obj, ¶ms);
+ }
+
+ deleted++;
+}
+
+int main(int argc, char *argv[])
+{
+ struct rtnl_neigh *neigh;
+ struct nl_cache *link_cache, *neigh_cache;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ neigh_cache = nl_cli_neigh_alloc_cache(sock);
+ neigh = nl_cli_neigh_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_FAMILY = 257,
+ ARG_STATE = 258,
+ ARG_YES,
+ };
+ static struct option long_opts[] = {
+ { "interactive", 0, 0, 'i' },
+ { "yes", 0, 0, ARG_YES },
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "addr", 1, 0, 'a' },
+ { "lladdr", 1, 0, 'l' },
+ { "dev", 1, 0, 'd' },
+ { "family", 1, 0, ARG_FAMILY },
+ { "state", 1, 0, ARG_STATE },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "qhva:l:d:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'i': interactive = 1; break;
+ case ARG_YES: default_yes = 1; break;
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'a': nl_cli_neigh_parse_dst(neigh, optarg); break;
+ case 'l': nl_cli_neigh_parse_lladdr(neigh, optarg); break;
+ case 'd': nl_cli_neigh_parse_dev(neigh, link_cache, optarg); break;
+ case ARG_FAMILY: nl_cli_neigh_parse_family(neigh, optarg); break;
+ case ARG_STATE: nl_cli_neigh_parse_state(neigh, optarg); break;
+ }
+ }
+
+ nl_cache_foreach_filter(neigh_cache, OBJ_CAST(neigh), delete_cb, NULL);
+
+ if (!quiet)
+ printf("Deleted %d neighbours\n", deleted);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-neigh-list.c b/ap/lib/libnl/libnl-3.2.25/src/nl-neigh-list.c
new file mode 100644
index 0000000..ebf5486
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-neigh-list.c
@@ -0,0 +1,89 @@
+/*
+ * src/nl-neigh-list.c List Neighbours
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/neigh.h>
+#include <netlink/cli/link.h>
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-neigh-list [OPTION]... [NEIGHBOUR]\n"
+ "\n"
+ "Options\n"
+ " -f, --format=TYPE Output format { brief | details | stats }\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Neighbour Options\n"
+ " -a, --addr=ADDR Destination address of neighbour\n"
+ " -l, --lladdr=ADDR Link layer address of neighbour\n"
+ " -d, --dev=DEV Device the neighbour is connected to\n"
+ " --family=FAMILY Destination address family\n"
+ " --state=STATE Neighbour state, (default = permanent)\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct rtnl_neigh *neigh;
+ struct nl_cache *link_cache, *neigh_cache;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ neigh_cache = nl_cli_neigh_alloc_cache(sock);
+ neigh = nl_cli_neigh_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_FAMILY = 257,
+ ARG_STATE = 258,
+ };
+ static struct option long_opts[] = {
+ { "format", 1, 0, 'f' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "addr", 1, 0, 'a' },
+ { "lladdr", 1, 0, 'l' },
+ { "dev", 1, 0, 'd' },
+ { "family", 1, 0, ARG_FAMILY },
+ { "state", 1, 0, ARG_STATE },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "f:hva:l:d:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'f': params.dp_type = nl_cli_parse_dumptype(optarg); break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'a': nl_cli_neigh_parse_dst(neigh, optarg); break;
+ case 'l': nl_cli_neigh_parse_lladdr(neigh, optarg); break;
+ case 'd': nl_cli_neigh_parse_dev(neigh, link_cache, optarg); break;
+ case ARG_FAMILY: nl_cli_neigh_parse_family(neigh, optarg); break;
+ case ARG_STATE: nl_cli_neigh_parse_state(neigh, optarg); break;
+ }
+ }
+
+ nl_cache_dump_filter(neigh_cache, ¶ms, OBJ_CAST(neigh));
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-neightbl-list.c b/ap/lib/libnl/libnl-3.2.25/src/nl-neightbl-list.c
new file mode 100644
index 0000000..5010b92
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-neightbl-list.c
@@ -0,0 +1,66 @@
+/*
+ * src/nl-neightbl-list.c Dump neighbour tables
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-neightbl-list [OPTION]...\n"
+ "\n"
+ "Options\n"
+ " -f, --format=TYPE Output format { brief | details | stats }\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *link_cache, *neightbl_cache;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ neightbl_cache = nl_cli_alloc_cache(sock, "neighbour table",
+ rtnl_neightbl_alloc_cache);
+
+ for (;;) {
+ int c, optidx = 0;
+ static struct option long_opts[] = {
+ { "format", 1, 0, 'f' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "f:hv", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'f': params.dp_type = nl_cli_parse_dumptype(optarg); break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ }
+ }
+
+ nl_cache_dump(neightbl_cache, ¶ms);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-pktloc-lookup.c b/ap/lib/libnl/libnl-3.2.25/src/nl-pktloc-lookup.c
new file mode 100644
index 0000000..17c867b
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-pktloc-lookup.c
@@ -0,0 +1,154 @@
+/*
+ * src/nl-pktloc-lookup.c Lookup packet location alias
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/route/pktloc.h>
+
+static void print_usage(void)
+{
+printf(
+"Usage: nl-pktloc-lookup [OPTIONS] <name>\n"
+"\n"
+"OPTIONS\n"
+" -h, --help Show this help text.\n"
+" -v, --version Show versioning information.\n"
+" -l, --list List all packet location definitions.\n"
+" --u32=VALUE Print in iproute2's u32 selector style\n"
+"\n"
+"\n"
+"EXAMPLE\n"
+" $ nl-pktloc-lookup ip.dst\n"
+" $ nl-pktloc-lookup --list\n"
+"\n"
+);
+ exit(0);
+}
+
+static const char *align_txt[] = {
+ [TCF_EM_ALIGN_U8] = "u8",
+ [TCF_EM_ALIGN_U16] = "u16",
+ [TCF_EM_ALIGN_U32] = "u32"
+};
+
+static uint32_t align_mask[] = {
+ [TCF_EM_ALIGN_U8] = 0xff,
+ [TCF_EM_ALIGN_U16] = 0xffff,
+ [TCF_EM_ALIGN_U32] = 0xffffffff,
+};
+
+static const char *layer_txt[] = {
+ [TCF_LAYER_LINK] = "eth",
+ [TCF_LAYER_NETWORK] = "ip",
+ [TCF_LAYER_TRANSPORT] = "tcp"
+};
+
+static void dump_u32_style(struct rtnl_pktloc *loc, uint32_t value)
+{
+ if (loc->align > 4)
+ nl_cli_fatal(EINVAL, "u32 only supports alignments u8|u16|u32.");
+
+ if (loc->layer == TCF_LAYER_LINK)
+ nl_cli_fatal(EINVAL, "u32 does not support link "
+ "layer locations.");
+
+ if (loc->shift > 0)
+ nl_cli_fatal(EINVAL, "u32 does not support shifting.");
+
+ printf("%s %x %x at %s%u\n",
+ align_txt[loc->align],
+ value, loc->mask ? loc->mask : align_mask[loc->align],
+ loc->layer == TCF_LAYER_TRANSPORT ? "nexthdr+" : "",
+ loc->offset);
+}
+
+static char *get_align_txt(struct rtnl_pktloc *loc)
+{
+ static char buf[16];
+
+ if (loc->align <= 4)
+ strcpy(buf, align_txt[loc->align]);
+ else
+ snprintf(buf, sizeof(buf), "%u", loc->align);
+
+ return buf;
+}
+
+static void dump_loc(struct rtnl_pktloc *loc)
+{
+ printf("%s = %s at %s+%u & %#x >> %u\n",
+ loc->name, get_align_txt(loc), layer_txt[loc->layer],
+ loc->offset, loc->mask, loc->shift);
+}
+
+static void list_cb(struct rtnl_pktloc *loc, void *arg)
+{
+ printf("%-26s %-5s %3s+%-4u %#-10x %-8u %u\n",
+ loc->name, get_align_txt(loc), layer_txt[loc->layer],
+ loc->offset, loc->mask, loc->shift, loc->refcnt);
+}
+
+static void do_list(void)
+{
+ printf(
+"name align offset mask shift refcnt\n");
+ printf("---------------------------------------------------------\n");
+
+ rtnl_pktloc_foreach(&list_cb, NULL);
+}
+
+int main(int argc, char *argv[])
+{
+ struct rtnl_pktloc *loc;
+ int err, ustyle = 0;
+ uint32_t uvalue = 0;
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_U32 = 257,
+ };
+ static struct option long_opts[] = {
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "list", 0, 0, 'l' },
+ { "u32", 1, 0, ARG_U32 },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "hvl", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'l': do_list(); exit(0);
+ case ARG_U32:
+ ustyle = 1;
+ uvalue = nl_cli_parse_u32(optarg);
+ break;
+ }
+ }
+
+ if (optind >= argc)
+ print_usage();
+
+ if ((err = rtnl_pktloc_lookup(argv[optind++], &loc)) < 0)
+ nl_cli_fatal(err, "Unable to lookup packet location: %s",
+ nl_geterror(err));
+
+ if (ustyle)
+ dump_u32_style(loc, uvalue);
+ else
+ dump_loc(loc);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-qdisc-add.c b/ap/lib/libnl/libnl-3.2.25/src/nl-qdisc-add.c
new file mode 100644
index 0000000..c2a7c9f
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-qdisc-add.c
@@ -0,0 +1,146 @@
+/*
+ * src/nl-qdisc-add.c Add Queueing Discipline
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/tc.h>
+#include <netlink/cli/qdisc.h>
+#include <netlink/cli/link.h>
+
+#include <netlink-private/route/tc-api.h>
+
+static int quiet = 0;
+
+static void print_usage(void)
+{
+ printf(
+"Usage: nl-qdisc-add [OPTIONS]... QDISC [CONFIGURATION]...\n"
+"\n"
+"OPTIONS\n"
+" -q, --quiet Do not print informal notifications.\n"
+" -h, --help Show this help text.\n"
+" -v, --version Show versioning information.\n"
+" --update Update qdisc if it exists.\n"
+" --replace Replace or update qdisc if it exists.\n"
+" --update-only Only update qdisc, never create it.\n"
+" --replace-only Only replace or update qdisc, never create it.\n"
+" -d, --dev=DEV Network device the qdisc should be attached to.\n"
+" -i, --id=ID ID of new qdisc (default: auto-generated)r\n"
+" -p, --parent=ID ID of parent { root | ingress | QDISC-ID }\n"
+"\n"
+"CONFIGURATION\n"
+" -h, --help Show help text of qdisc specific options.\n"
+"\n"
+"EXAMPLE\n"
+" $ nl-qdisc-add --dev=eth1 --parent=root htb --rate=100mbit\n"
+"\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct rtnl_qdisc *qdisc;
+ struct rtnl_tc *tc;
+ struct nl_cache *link_cache;
+ struct nl_dump_params dp = {
+ .dp_type = NL_DUMP_DETAILS,
+ .dp_fd = stdout,
+ };
+ struct nl_cli_tc_module *tm;
+ struct rtnl_tc_ops *ops;
+ int err, flags = NLM_F_CREATE | NLM_F_EXCL;
+ char *kind, *id = NULL;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+
+ link_cache = nl_cli_link_alloc_cache(sock);
+
+ qdisc = nl_cli_qdisc_alloc();
+ tc = (struct rtnl_tc *) qdisc;
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_REPLACE = 257,
+ ARG_UPDATE = 258,
+ ARG_REPLACE_ONLY,
+ ARG_UPDATE_ONLY,
+ };
+ static struct option long_opts[] = {
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "dev", 1, 0, 'd' },
+ { "parent", 1, 0, 'p' },
+ { "id", 1, 0, 'i' },
+ { "replace", 0, 0, ARG_REPLACE },
+ { "update", 0, 0, ARG_UPDATE },
+ { "replace-only", 0, 0, ARG_REPLACE_ONLY },
+ { "update-only", 0, 0, ARG_UPDATE_ONLY },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "+qhvd:p:i:",
+ long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
+ case 'p': nl_cli_tc_parse_parent(tc, optarg); break;
+ case 'i': id = strdup(optarg); break;
+ case ARG_UPDATE: flags = NLM_F_CREATE; break;
+ case ARG_REPLACE: flags = NLM_F_CREATE | NLM_F_REPLACE; break;
+ case ARG_UPDATE_ONLY: flags = 0; break;
+ case ARG_REPLACE_ONLY: flags = NLM_F_REPLACE; break;
+ }
+ }
+
+ if (optind >= argc)
+ print_usage();
+
+ if (!rtnl_tc_get_ifindex(tc))
+ nl_cli_fatal(EINVAL, "You must specify a network device (--dev=XXX)");
+
+ if (!rtnl_tc_get_parent(tc))
+ nl_cli_fatal(EINVAL, "You must specify a parent");
+
+ if (id) {
+ nl_cli_tc_parse_handle(tc, id, 1);
+ free(id);
+ }
+
+ kind = argv[optind++];
+ rtnl_tc_set_kind(tc, kind);
+
+ if (!(ops = rtnl_tc_get_ops(tc)))
+ nl_cli_fatal(ENOENT, "Unknown qdisc \"%s\"", kind);
+
+ if (!(tm = nl_cli_tc_lookup(ops)))
+ nl_cli_fatal(ENOTSUP, "Qdisc type \"%s\" not supported.", kind);
+
+ tm->tm_parse_argv(tc, argc, argv);
+
+ if (!quiet) {
+ printf("Adding ");
+ nl_object_dump(OBJ_CAST(qdisc), &dp);
+ }
+
+ if ((err = rtnl_qdisc_add(sock, qdisc, flags)) < 0)
+ nl_cli_fatal(EINVAL, "Unable to add qdisc: %s", nl_geterror(err));
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-qdisc-delete.c b/ap/lib/libnl/libnl-3.2.25/src/nl-qdisc-delete.c
new file mode 100644
index 0000000..2f945bb
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-qdisc-delete.c
@@ -0,0 +1,144 @@
+/*
+ * src/nl-qdisc-delete.c Delete Queuing Disciplines
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/tc.h>
+#include <netlink/cli/qdisc.h>
+#include <netlink/cli/link.h>
+
+static int quiet = 0, default_yes = 0, deleted = 0, interactive = 0;
+static struct nl_sock *sock;
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-qdisc-delete [OPTION]... [QDISC]\n"
+ "\n"
+ "OPTIONS\n"
+ " --interactive Run interactively.\n"
+ " --yes Set default answer to yes.\n"
+ " -q, --quiet Do not print informal notifications.\n"
+ " -h, --help Show this help text and exit.\n"
+ " -v, --version Show versioning information and exit.\n"
+ "\n"
+ " -d, --dev=DEV Device the qdisc is attached to.\n"
+ " -p, --parent=ID Identifier of parent qdisc/class.\n"
+ " -i, --id=ID Identifier\n"
+ " -k, --kind=NAME Kind of qdisc (e.g. pfifo_fast)\n"
+ );
+
+ exit(0);
+}
+
+static void delete_cb(struct nl_object *obj, void *arg)
+{
+ struct rtnl_qdisc *qdisc = nl_object_priv(obj);
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err;
+
+ /* Ignore default qdiscs, unable to delete */
+ if (rtnl_tc_get_handle((struct rtnl_tc *) qdisc) == 0)
+ return;
+
+ if (interactive && !nl_cli_confirm(obj, ¶ms, default_yes))
+ return;
+
+ if ((err = rtnl_qdisc_delete(sock, qdisc)) < 0)
+ nl_cli_fatal(err, "Unable to delete qdisc: %s\n", nl_geterror(err));
+
+ if (!quiet) {
+ printf("Deleted ");
+ nl_object_dump(obj, ¶ms);
+ }
+
+ deleted++;
+}
+
+int main(int argc, char *argv[])
+{
+ struct rtnl_qdisc *qdisc;
+ struct rtnl_tc *tc;
+ struct nl_cache *link_cache, *qdisc_cache;
+ int nfilter = 0;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ qdisc_cache = nl_cli_qdisc_alloc_cache(sock);
+ qdisc = nl_cli_qdisc_alloc();
+ tc = (struct rtnl_tc *) qdisc;
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_YES = 257,
+ ARG_INTERACTIVE = 258,
+ };
+ static struct option long_opts[] = {
+ { "interactive", 0, 0, ARG_INTERACTIVE },
+ { "yes", 0, 0, ARG_YES },
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "dev", 1, 0, 'd' },
+ { "parent", 1, 0, 'p' },
+ { "id", 1, 0, 'i' },
+ { "kind", 1, 0, 'k' },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "qhvd:p:i:k:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case '?': nl_cli_fatal(EINVAL, "Invalid options");
+ case ARG_INTERACTIVE: interactive = 1; break;
+ case ARG_YES: default_yes = 1; break;
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'd':
+ nfilter++;
+ nl_cli_tc_parse_dev(tc, link_cache, optarg);
+ break;
+ case 'p':
+ nfilter++;
+ nl_cli_tc_parse_parent(tc, optarg);
+ break;
+ case 'i':
+ nfilter++;
+ nl_cli_tc_parse_handle(tc, optarg, 0);
+ break;
+ case 'k':
+ nfilter++;
+ nl_cli_tc_parse_kind(tc, optarg);
+ break;
+ }
+ }
+
+ if (nfilter == 0 && !interactive && !default_yes) {
+ nl_cli_fatal(EINVAL,
+ "You are attempting to delete all qdiscs on all devices.\n"
+ "If you want to proceed, run nl-qdisc-delete --yes.\n"
+ "Aborting...");
+ }
+
+ nl_cache_foreach_filter(qdisc_cache, OBJ_CAST(qdisc), delete_cb, NULL);
+
+ if (!quiet)
+ printf("Deleted %d qdiscs\n", deleted);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-qdisc-list.c b/ap/lib/libnl/libnl-3.2.25/src/nl-qdisc-list.c
new file mode 100644
index 0000000..5b0a3f0
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-qdisc-list.c
@@ -0,0 +1,183 @@
+/*
+ * src/nl-qdisc-list.c List Queueing Disciplines
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2010 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/tc.h>
+#include <netlink/cli/qdisc.h>
+#include <netlink/cli/class.h>
+#include <netlink/cli/cls.h>
+#include <netlink/cli/link.h>
+
+#define NUM_INDENT 4
+
+static struct nl_sock *sock;
+static int recursive = 0;
+static struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+};
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-qdisc-list [OPTION]... [QDISC]\n"
+ "\n"
+ "OPTIONS\n"
+ " --details Show details\n"
+ " --stats Show statistics\n"
+ " -r, --recursive Show recursive tree\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ " -d, --dev=DEV Device the qdisc is attached to. (default: all)\n"
+ " -p, --parent=ID Identifier of parent qdisc.\n"
+ " -i, --id=ID Identifier.\n"
+ " -k, --kind=NAME Kind of qdisc (e.g. pfifo_fast)\n"
+ "\n"
+ "EXAMPLE\n"
+ " # Display statistics of all qdiscs attached to eth0\n"
+ " $ nl-qdisc-list --details --dev=eth0\n"
+ "\n"
+ );
+ exit(0);
+}
+
+static void list_classes(int ifindex, uint32_t parent);
+static void list_qdiscs(int ifindex, uint32_t parent);
+
+static void list_class(struct nl_object *obj, void *arg)
+{
+ struct rtnl_tc *tc = nl_object_priv(obj);
+ nl_object_dump(obj, ¶ms);
+
+ list_classes(rtnl_tc_get_ifindex(tc), rtnl_tc_get_handle(tc));
+ list_qdiscs(rtnl_tc_get_ifindex(tc), rtnl_tc_get_handle(tc));
+}
+
+static void list_classes(int ifindex, uint32_t parent)
+{
+ struct nl_cache *class_cache;
+ struct rtnl_class *filter = nl_cli_class_alloc();
+
+ class_cache = nl_cli_class_alloc_cache(sock, ifindex);
+
+ rtnl_tc_set_parent((struct rtnl_tc *) filter, parent);
+ params.dp_prefix += NUM_INDENT;
+ nl_cache_foreach_filter(class_cache, OBJ_CAST(filter), list_class, NULL);
+ params.dp_prefix -= NUM_INDENT;
+
+ rtnl_class_put(filter);
+ nl_cache_free(class_cache);
+}
+
+static void list_cls(int ifindex, uint32_t parent)
+{
+ struct nl_cache *cls_cache;
+
+ cls_cache = nl_cli_cls_alloc_cache(sock, ifindex, parent);
+
+ params.dp_prefix += NUM_INDENT;
+ nl_cache_dump(cls_cache, ¶ms);
+ params.dp_prefix -= NUM_INDENT;
+
+ nl_cache_free(cls_cache);
+}
+
+static void list_qdisc(struct nl_object *obj, void *arg)
+{
+ struct rtnl_qdisc *qdisc = nl_object_priv(obj);
+ struct rtnl_tc *tc = (struct rtnl_tc *) qdisc;
+
+ nl_object_dump(obj, ¶ms);
+
+ list_cls(rtnl_tc_get_ifindex(tc), rtnl_tc_get_handle(tc));
+
+ if (rtnl_tc_get_parent(tc) == TC_H_ROOT) {
+ list_cls(rtnl_tc_get_ifindex(tc), TC_H_ROOT);
+ list_classes(rtnl_tc_get_ifindex(tc), TC_H_ROOT);
+ }
+
+ list_classes(rtnl_tc_get_ifindex(tc), rtnl_tc_get_handle(tc));
+}
+
+static void list_qdiscs(int ifindex, uint32_t parent)
+{
+ struct nl_cache *qdisc_cache;
+ struct rtnl_qdisc *filter = nl_cli_qdisc_alloc();
+
+ qdisc_cache = nl_cli_qdisc_alloc_cache(sock);
+
+ rtnl_tc_set_ifindex((struct rtnl_tc *) filter, ifindex);
+ rtnl_tc_set_parent((struct rtnl_tc *) filter, parent);
+ params.dp_prefix += NUM_INDENT;
+ nl_cache_foreach_filter(qdisc_cache, OBJ_CAST(filter), list_qdisc, NULL);
+ params.dp_prefix -= NUM_INDENT;
+
+ rtnl_qdisc_put(filter);
+ nl_cache_free(qdisc_cache);
+}
+
+int main(int argc, char *argv[])
+{
+ struct rtnl_qdisc *qdisc;
+ struct rtnl_tc *tc;
+ struct nl_cache *link_cache, *qdisc_cache;
+
+ params.dp_fd = stdout;
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ qdisc_cache = nl_cli_qdisc_alloc_cache(sock);
+ qdisc = nl_cli_qdisc_alloc();
+ tc = (struct rtnl_tc *) qdisc;
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_DETAILS = 257,
+ ARG_STATS = 258,
+ };
+ static struct option long_opts[] = {
+ { "details", 0, 0, ARG_DETAILS },
+ { "stats", 0, 0, ARG_STATS },
+ { "recursive", 0, 0, 'r' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "dev", 1, 0, 'd' },
+ { "parent", 1, 0, 'p' },
+ { "id", 1, 0, 'i' },
+ { "kind", 1, 0, 'k' },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "rhvd:p:i:k:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case ARG_DETAILS: params.dp_type = NL_DUMP_DETAILS; break;
+ case ARG_STATS: params.dp_type = NL_DUMP_STATS; break;
+ case 'r': recursive = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'd': nl_cli_tc_parse_dev(tc, link_cache, optarg); break;
+ case 'p': nl_cli_tc_parse_parent(tc, optarg); break;
+ case 'i': nl_cli_tc_parse_handle(tc, optarg, 0); break;
+ case 'k': nl_cli_tc_parse_kind(tc, optarg); break;
+ }
+ }
+
+ if (recursive)
+ nl_cache_foreach_filter(qdisc_cache, OBJ_CAST(qdisc), list_qdisc, NULL);
+ else
+ nl_cache_dump_filter(qdisc_cache, ¶ms, OBJ_CAST(qdisc));
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-route-add.c b/ap/lib/libnl/libnl-3.2.25/src/nl-route-add.c
new file mode 100644
index 0000000..d4aa767
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-route-add.c
@@ -0,0 +1,132 @@
+/*
+ * src/nl-route-add.c Route addition utility
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/route.h>
+#include <netlink/cli/link.h>
+
+static int quiet = 0;
+static struct nl_cache *link_cache, *route_cache;
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-route-add [OPTION]... [ROUTE]\n"
+ "\n"
+ "Options\n"
+ " -q, --quiet Do not print informal notifications\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Route Options\n"
+ " -d, --dst=ADDR destination prefix, e.g. 10.10.0.0/16\n"
+ " -n, --nexthop=NH nexthop configuration:\n"
+ " dev=DEV route via device\n"
+ " weight=WEIGHT weight of nexthop\n"
+ " flags=FLAGS\n"
+ " via=GATEWAY route via other node\n"
+ " realms=REALMS\n"
+ " e.g. dev=eth0,via=192.168.1.12\n"
+ " -t, --table=TABLE Routing table\n"
+ " --family=FAMILY Address family\n"
+ " --src=ADDR Source prefix\n"
+ " --iif=DEV Incomming interface\n"
+ " --pref-src=ADDR Preferred source address\n"
+ " --metrics=OPTS Metrics configurations\n"
+ " --priority=NUM Priotity\n"
+ " --scope=SCOPE Scope\n"
+ " --protocol=PROTO Protocol\n"
+ " --type=TYPE { unicast | local | broadcast | multicast }\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct rtnl_route *route;
+ struct nl_dump_params dp = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err = 1;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ route_cache = nl_cli_route_alloc_cache(sock, 0);
+ route = nl_cli_route_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_FAMILY = 257,
+ ARG_SRC = 258,
+ ARG_IIF,
+ ARG_PREF_SRC,
+ ARG_METRICS,
+ ARG_PRIORITY,
+ ARG_SCOPE,
+ ARG_PROTOCOL,
+ ARG_TYPE,
+ };
+ static struct option long_opts[] = {
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "dst", 1, 0, 'd' },
+ { "nexthop", 1, 0, 'n' },
+ { "table", 1, 0, 't' },
+ { "family", 1, 0, ARG_FAMILY },
+ { "src", 1, 0, ARG_SRC },
+ { "iif", 1, 0, ARG_IIF },
+ { "pref-src", 1, 0, ARG_PREF_SRC },
+ { "metrics", 1, 0, ARG_METRICS },
+ { "priority", 1, 0, ARG_PRIORITY },
+ { "scope", 1, 0, ARG_SCOPE },
+ { "protocol", 1, 0, ARG_PROTOCOL },
+ { "type", 1, 0, ARG_TYPE },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "qhvd:n:t:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'd': nl_cli_route_parse_dst(route, optarg); break;
+ case 'n': nl_cli_route_parse_nexthop(route, optarg, link_cache); break;
+ case 't': nl_cli_route_parse_table(route, optarg); break;
+ case ARG_FAMILY: nl_cli_route_parse_family(route, optarg); break;
+ case ARG_SRC: nl_cli_route_parse_src(route, optarg); break;
+ case ARG_IIF: nl_cli_route_parse_iif(route, optarg, link_cache); break;
+ case ARG_PREF_SRC: nl_cli_route_parse_pref_src(route, optarg); break;
+ case ARG_METRICS: nl_cli_route_parse_metric(route, optarg); break;
+ case ARG_PRIORITY: nl_cli_route_parse_prio(route, optarg); break;
+ case ARG_SCOPE: nl_cli_route_parse_scope(route, optarg); break;
+ case ARG_PROTOCOL: nl_cli_route_parse_protocol(route, optarg); break;
+ case ARG_TYPE: nl_cli_route_parse_type(route, optarg); break;
+ }
+ }
+
+ if ((err = rtnl_route_add(sock, route, NLM_F_EXCL)) < 0)
+ nl_cli_fatal(err, "Unable to add route: %s", nl_geterror(err));
+
+ if (!quiet) {
+ printf("Added ");
+ nl_object_dump(OBJ_CAST(route), &dp);
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-route-delete.c b/ap/lib/libnl/libnl-3.2.25/src/nl-route-delete.c
new file mode 100644
index 0000000..884fd7f
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-route-delete.c
@@ -0,0 +1,168 @@
+/*
+ * src/nl-route-delete.c Delete Routes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/route.h>
+#include <netlink/cli/link.h>
+
+static int interactive = 0, default_yes = 0, quiet = 0;
+static int deleted = 0;
+static struct nl_sock *sock;
+
+static void print_version(void)
+{
+ fprintf(stderr, "%s\n", LIBNL_STRING);
+ exit(0);
+}
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-route-delete [OPTION]... [ROUTE]\n"
+ "\n"
+ "Options\n"
+ " -i, --interactive Run interactively\n"
+ " --yes Set default answer to yes\n"
+ " -q, --quiet Do not print informal notifications\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Route Options\n"
+ " -d, --dst=ADDR destination prefix, e.g. 10.10.0.0/16\n"
+ " -n, --nexthop=NH nexthop configuration:\n"
+ " dev=DEV route via device\n"
+ " weight=WEIGHT weight of nexthop\n"
+ " flags=FLAGS\n"
+ " via=GATEWAY route via other node\n"
+ " realms=REALMS\n"
+ " e.g. dev=eth0,via=192.168.1.12\n"
+ " -t, --table=TABLE Routing table\n"
+ " --family=FAMILY Address family\n"
+ " --src=ADDR Source prefix\n"
+ " --iif=DEV Incomming interface\n"
+ " --pref-src=ADDR Preferred source address\n"
+ " --metrics=OPTS Metrics configurations\n"
+ " --priority=NUM Priotity\n"
+ " --scope=SCOPE Scope\n"
+ " --protocol=PROTO Protocol\n"
+ " --type=TYPE { unicast | local | broadcast | multicast }\n"
+ );
+ exit(0);
+}
+
+static void delete_cb(struct nl_object *obj, void *arg)
+{
+ struct rtnl_route *route = (struct rtnl_route *) obj;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+ int err;
+
+ if (interactive && !nl_cli_confirm(obj, ¶ms, default_yes))
+ return;
+
+ if ((err = rtnl_route_delete(sock, route, 0)) < 0)
+ nl_cli_fatal(err, "Unable to delete route: %s", nl_geterror(err));
+
+ if (!quiet) {
+ printf("Deleted ");
+ nl_object_dump(obj, ¶ms);
+ }
+
+ deleted++;
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_cache *link_cache, *route_cache;
+ struct rtnl_route *route;
+ int nf = 0;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ route_cache = nl_cli_route_alloc_cache(sock, 0);
+ route = nl_cli_route_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_FAMILY = 257,
+ ARG_SRC = 258,
+ ARG_IIF,
+ ARG_PREF_SRC,
+ ARG_METRICS,
+ ARG_PRIORITY,
+ ARG_SCOPE,
+ ARG_PROTOCOL,
+ ARG_TYPE,
+ ARG_YES,
+ };
+ static struct option long_opts[] = {
+ { "interactive", 0, 0, 'i' },
+ { "yes", 0, 0, ARG_YES },
+ { "quiet", 0, 0, 'q' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "dst", 1, 0, 'd' },
+ { "nexthop", 1, 0, 'n' },
+ { "table", 1, 0, 't' },
+ { "family", 1, 0, ARG_FAMILY },
+ { "src", 1, 0, ARG_SRC },
+ { "iif", 1, 0, ARG_IIF },
+ { "pref-src", 1, 0, ARG_PREF_SRC },
+ { "metrics", 1, 0, ARG_METRICS },
+ { "priority", 1, 0, ARG_PRIORITY },
+ { "scope", 1, 0, ARG_SCOPE },
+ { "protocol", 1, 0, ARG_PROTOCOL },
+ { "type", 1, 0, ARG_TYPE },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "iqhvd:n:t:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'i': interactive = 1; break;
+ case ARG_YES: default_yes = 1; break;
+ case 'q': quiet = 1; break;
+ case 'h': print_usage(); break;
+ case 'v': print_version(); break;
+ case 'd': nf++; nl_cli_route_parse_dst(route, optarg); break;
+ case 'n': nf++; nl_cli_route_parse_nexthop(route, optarg, link_cache); break;
+ case 't': nf++; nl_cli_route_parse_table(route, optarg); break;
+ case ARG_FAMILY: nf++; nl_cli_route_parse_family(route, optarg); break;
+ case ARG_SRC: nf++; nl_cli_route_parse_src(route, optarg); break;
+ case ARG_IIF: nf++; nl_cli_route_parse_iif(route, optarg, link_cache); break;
+ case ARG_PREF_SRC: nf++; nl_cli_route_parse_pref_src(route, optarg); break;
+ case ARG_METRICS: nf++; nl_cli_route_parse_metric(route, optarg); break;
+ case ARG_PRIORITY: nf++; nl_cli_route_parse_prio(route, optarg); break;
+ case ARG_SCOPE: nf++; nl_cli_route_parse_scope(route, optarg); break;
+ case ARG_PROTOCOL: nf++; nl_cli_route_parse_protocol(route, optarg); break;
+ case ARG_TYPE: nf++; nl_cli_route_parse_type(route, optarg); break;
+ }
+ }
+
+ if (nf == 0 && !interactive && !default_yes) {
+ fprintf(stderr, "You attempted to delete all routes in "
+ "non-interactive mode, aborting.\n");
+ exit(0);
+ }
+
+ nl_cache_foreach_filter(route_cache, OBJ_CAST(route), delete_cb, NULL);
+
+ if (!quiet)
+ printf("Deleted %d routes\n", deleted);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-route-get.c b/ap/lib/libnl/libnl-3.2.25/src/nl-route-get.c
new file mode 100644
index 0000000..9d9a448
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-route-get.c
@@ -0,0 +1,89 @@
+/*
+ * src/nl-route-get.c Get Route Attributes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/route.h>
+#include <netlink/cli/link.h>
+
+static void print_usage(void)
+{
+ printf("Usage: nl-route-get <addr>\n");
+ exit(1);
+}
+
+static void parse_cb(struct nl_object *obj, void *arg)
+{
+ //struct rtnl_route *route = (struct rtnl_route *) obj;
+ struct nl_dump_params params = {
+ .dp_fd = stdout,
+ .dp_type = NL_DUMP_DETAILS,
+ };
+
+ nl_object_dump(obj, ¶ms);
+}
+
+static int cb(struct nl_msg *msg, void *arg)
+{
+ int err;
+
+ if ((err = nl_msg_parse(msg, &parse_cb, NULL)) < 0)
+ nl_cli_fatal(err, "Unable to parse object: %s", nl_geterror(err));
+
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *link_cache, *route_cache;
+ struct nl_addr *dst;
+ int err = 1;
+
+ if (argc < 2 || !strcmp(argv[1], "-h"))
+ print_usage();
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ route_cache = nl_cli_route_alloc_cache(sock, 0);
+
+ dst = nl_cli_addr_parse(argv[1], AF_INET);
+
+ {
+ struct nl_msg *m;
+ struct rtmsg rmsg = {
+ .rtm_family = nl_addr_get_family(dst),
+ .rtm_dst_len = nl_addr_get_prefixlen(dst),
+ };
+
+ m = nlmsg_alloc_simple(RTM_GETROUTE, 0);
+ if (!m)
+ nl_cli_fatal(ENOMEM, "out of memory");
+ if (nlmsg_append(m, &rmsg, sizeof(rmsg), NLMSG_ALIGNTO) < 0)
+ nl_cli_fatal(ENOMEM, "out of memory");
+ if (nla_put_addr(m, RTA_DST, dst) < 0)
+ nl_cli_fatal(ENOMEM, "out of memory");
+
+ err = nl_send_auto_complete(sock, m);
+ nlmsg_free(m);
+ if (err < 0)
+ nl_cli_fatal(err, "%s", nl_geterror(err));
+
+ nl_socket_modify_cb(sock, NL_CB_VALID, NL_CB_CUSTOM, cb, NULL);
+
+ if (nl_recvmsgs_default(sock) < 0)
+ nl_cli_fatal(err, "%s", nl_geterror(err));
+ }
+
+ //nl_cache_dump(route_cache, ¶ms);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-route-list.c b/ap/lib/libnl/libnl-3.2.25/src/nl-route-list.c
new file mode 100644
index 0000000..e0e57be
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-route-list.c
@@ -0,0 +1,129 @@
+/*
+ * src/nl-route-list.c List route attributes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/route.h>
+#include <netlink/cli/link.h>
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-route-list [OPTION]... [ROUTE]\n"
+ "\n"
+ "Options\n"
+ " -c, --cache List the contents of the route cache\n"
+ " -f, --format=TYPE Output format { brief | details | stats }\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Route Options\n"
+ " -d, --dst=ADDR destination prefix, e.g. 10.10.0.0/16\n"
+ " -n, --nexthop=NH nexthop configuration:\n"
+ " dev=DEV route via device\n"
+ " weight=WEIGHT weight of nexthop\n"
+ " flags=FLAGS\n"
+ " via=GATEWAY route via other node\n"
+ " realms=REALMS\n"
+ " e.g. dev=eth0,via=192.168.1.12\n"
+ " -t, --table=TABLE Routing table\n"
+ " --family=FAMILY Address family\n"
+ " --src=ADDR Source prefix\n"
+ " --iif=DEV Incomming interface\n"
+ " --pref-src=ADDR Preferred source address\n"
+ " --metrics=OPTS Metrics configurations\n"
+ " --priority=NUM Priotity\n"
+ " --scope=SCOPE Scope\n"
+ " --protocol=PROTO Protocol\n"
+ " --type=TYPE { unicast | local | broadcast | multicast }\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *link_cache, *route_cache;
+ struct rtnl_route *route;
+ struct nl_dump_params params = {
+ .dp_fd = stdout,
+ .dp_type = NL_DUMP_LINE,
+ };
+ int print_cache = 0;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ route = nl_cli_route_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_FAMILY = 257,
+ ARG_SRC = 258,
+ ARG_IIF,
+ ARG_PREF_SRC,
+ ARG_METRICS,
+ ARG_PRIORITY,
+ ARG_SCOPE,
+ ARG_PROTOCOL,
+ ARG_TYPE,
+ };
+ static struct option long_opts[] = {
+ { "cache", 0, 0, 'c' },
+ { "format", 1, 0, 'f' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "dst", 1, 0, 'd' },
+ { "nexthop", 1, 0, 'n' },
+ { "table", 1, 0, 't' },
+ { "family", 1, 0, ARG_FAMILY },
+ { "src", 1, 0, ARG_SRC },
+ { "iif", 1, 0, ARG_IIF },
+ { "pref-src", 1, 0, ARG_PREF_SRC },
+ { "metrics", 1, 0, ARG_METRICS },
+ { "priority", 1, 0, ARG_PRIORITY },
+ { "scope", 1, 0, ARG_SCOPE },
+ { "protocol", 1, 0, ARG_PROTOCOL },
+ { "type", 1, 0, ARG_TYPE },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "cf:hvd:n:t:", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'c': print_cache = 1; break;
+ case 'f': params.dp_type = nl_cli_parse_dumptype(optarg); break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case 'd': nl_cli_route_parse_dst(route, optarg); break;
+ case 'n': nl_cli_route_parse_nexthop(route, optarg, link_cache); break;
+ case 't': nl_cli_route_parse_table(route, optarg); break;
+ case ARG_FAMILY: nl_cli_route_parse_family(route, optarg); break;
+ case ARG_SRC: nl_cli_route_parse_src(route, optarg); break;
+ case ARG_IIF: nl_cli_route_parse_iif(route, optarg, link_cache); break;
+ case ARG_PREF_SRC: nl_cli_route_parse_pref_src(route, optarg); break;
+ case ARG_METRICS: nl_cli_route_parse_metric(route, optarg); break;
+ case ARG_PRIORITY: nl_cli_route_parse_prio(route, optarg); break;
+ case ARG_SCOPE: nl_cli_route_parse_scope(route, optarg); break;
+ case ARG_PROTOCOL: nl_cli_route_parse_protocol(route, optarg); break;
+ case ARG_TYPE: nl_cli_route_parse_type(route, optarg); break;
+ }
+ }
+
+ route_cache = nl_cli_route_alloc_cache(sock,
+ print_cache ? ROUTE_CACHE_CONTENT : 0);
+
+ nl_cache_dump_filter(route_cache, ¶ms, OBJ_CAST(route));
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-rule-list.c b/ap/lib/libnl/libnl-3.2.25/src/nl-rule-list.c
new file mode 100644
index 0000000..8b474fa
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-rule-list.c
@@ -0,0 +1,77 @@
+/*
+ * src/nl-rule-dump.c Dump rule attributes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/rule.h>
+#include <netlink/cli/link.h>
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-rule-list [OPTION]... [ROUTE]\n"
+ "\n"
+ "Options\n"
+ " -c, --cache List the contents of the route cache\n"
+ " -f, --format=TYPE Output format { brief | details | stats }\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ "\n"
+ "Rule Options\n"
+ " --family Address family\n"
+ );
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct rtnl_rule *rule;
+ struct nl_cache *link_cache, *rule_cache;
+ struct nl_dump_params params = {
+ .dp_fd = stdout,
+ .dp_type = NL_DUMP_LINE,
+ };
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ rule_cache = nl_cli_rule_alloc_cache(sock);
+ rule = nl_cli_rule_alloc();
+
+ for (;;) {
+ int c, optidx = 0;
+ enum {
+ ARG_FAMILY = 257,
+ };
+ static struct option long_opts[] = {
+ { "format", 1, 0, 'f' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { "family", 1, 0, ARG_FAMILY },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "f:hv", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'f': params.dp_type = nl_cli_parse_dumptype(optarg); break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ case ARG_FAMILY: nl_cli_rule_parse_family(rule, optarg); break;
+ }
+ }
+
+ nl_cache_dump_filter(rule_cache, ¶ms, OBJ_CAST(rule));
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-tctree-list.c b/ap/lib/libnl/libnl-3.2.25/src/nl-tctree-list.c
new file mode 100644
index 0000000..d90cb28
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-tctree-list.c
@@ -0,0 +1,165 @@
+/*
+ * src/nl-tctree-list.c List Traffic Control Tree
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+#include <netlink/cli/link.h>
+#include <netlink/cli/qdisc.h>
+#include <netlink/cli/class.h>
+#include <linux/pkt_sched.h>
+
+static struct nl_sock *sock;
+static struct nl_cache *qdisc_cache, *class_cache;
+static struct nl_dump_params params = {
+ .dp_type = NL_DUMP_DETAILS,
+};
+
+static int ifindex;
+static void print_qdisc(struct nl_object *, void *);
+static void print_tc_childs(struct rtnl_tc *, void *);
+
+static void print_usage(void)
+{
+ printf(
+ "Usage: nl-tctree-list [OPTION]...\n"
+ "\n"
+ "Options\n"
+ " -f, --format=TYPE Output format { brief | details | stats }\n"
+ " -h, --help Show this help\n"
+ " -v, --version Show versioning information\n"
+ );
+ exit(0);
+}
+
+static void print_class(struct nl_object *obj, void *arg)
+{
+ struct rtnl_qdisc *leaf;
+ struct rtnl_class *class = (struct rtnl_class *) obj;
+ struct nl_cache *cls_cache;
+ uint32_t parent = rtnl_tc_get_handle((struct rtnl_tc *) class);
+
+ params.dp_prefix = (int)(long) arg;
+ nl_object_dump(obj, ¶ms);
+
+ leaf = rtnl_class_leaf_qdisc(class, qdisc_cache);
+ if (leaf)
+ print_qdisc((struct nl_object *) leaf, arg + 2);
+
+ print_tc_childs(TC_CAST(class), arg + 2);
+
+ if (rtnl_cls_alloc_cache(sock, ifindex, parent, &cls_cache) < 0)
+ return;
+
+ params.dp_prefix = (int)(long) arg + 2;
+ nl_cache_dump(cls_cache, ¶ms);
+ nl_cache_free(cls_cache);
+}
+
+static void print_tc_childs(struct rtnl_tc *tc, void *arg)
+{
+ struct rtnl_class *filter;
+
+ filter = nl_cli_class_alloc();
+
+ rtnl_tc_set_parent(TC_CAST(filter), rtnl_tc_get_handle(tc));
+ rtnl_tc_set_ifindex(TC_CAST(filter), rtnl_tc_get_ifindex(tc));
+
+ nl_cache_foreach_filter(class_cache, OBJ_CAST(filter), &print_class, arg);
+
+ rtnl_class_put(filter);
+}
+
+static void print_qdisc(struct nl_object *obj, void *arg)
+{
+ struct rtnl_qdisc *qdisc = (struct rtnl_qdisc *) obj;
+ struct nl_cache *cls_cache;
+ uint32_t parent = rtnl_tc_get_handle((struct rtnl_tc *) qdisc);
+
+ params.dp_prefix = (int)(long) arg;
+ nl_object_dump(obj, ¶ms);
+
+ print_tc_childs(TC_CAST(qdisc), arg + 2);
+
+ if (rtnl_cls_alloc_cache(sock, ifindex, parent, &cls_cache) < 0)
+ return;
+
+ params.dp_prefix = (int)(long) arg + 2;
+ nl_cache_dump(cls_cache, ¶ms);
+ nl_cache_free(cls_cache);
+}
+
+static void print_link(struct nl_object *obj, void *arg)
+{
+ struct rtnl_link *link = (struct rtnl_link *) obj;
+ struct rtnl_qdisc *qdisc;
+
+ ifindex = rtnl_link_get_ifindex(link);
+ params.dp_prefix = 0;
+ nl_object_dump(obj, ¶ms);
+
+ if (rtnl_class_alloc_cache(sock, ifindex, &class_cache) < 0)
+ return;
+
+ qdisc = rtnl_qdisc_get_by_parent(qdisc_cache, ifindex, TC_H_ROOT);
+ if (qdisc) {
+ print_qdisc((struct nl_object *) qdisc, (void *) 2);
+ rtnl_qdisc_put(qdisc);
+ }
+
+ qdisc = rtnl_qdisc_get_by_parent(qdisc_cache, ifindex, 0);
+ if (qdisc) {
+ print_qdisc((struct nl_object *) qdisc, (void *) 2);
+ rtnl_qdisc_put(qdisc);
+ }
+
+ qdisc = rtnl_qdisc_get_by_parent(qdisc_cache, ifindex, TC_H_INGRESS);
+ if (qdisc) {
+ print_qdisc((struct nl_object *) qdisc, (void *) 2);
+ rtnl_qdisc_put(qdisc);
+ }
+
+ nl_cache_free(class_cache);
+}
+
+int main(int argc, char *argv[])
+{
+ struct nl_cache *link_cache;
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_ROUTE);
+ link_cache = nl_cli_link_alloc_cache(sock);
+ qdisc_cache = nl_cli_qdisc_alloc_cache(sock);
+
+ params.dp_fd = stdout;
+
+ for (;;) {
+ int c, optidx = 0;
+ static struct option long_opts[] = {
+ { "format", 1, 0, 'f' },
+ { "help", 0, 0, 'h' },
+ { "version", 0, 0, 'v' },
+ { 0, 0, 0, 0 }
+ };
+
+ c = getopt_long(argc, argv, "f:hv", long_opts, &optidx);
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'f': params.dp_type = nl_cli_parse_dumptype(optarg); break;
+ case 'h': print_usage(); break;
+ case 'v': nl_cli_print_version(); break;
+ }
+ }
+
+ nl_cache_foreach(link_cache, &print_link, NULL);
+
+ return 0;
+}
diff --git a/ap/lib/libnl/libnl-3.2.25/src/nl-util-addr.c b/ap/lib/libnl/libnl-3.2.25/src/nl-util-addr.c
new file mode 100644
index 0000000..5f0738d
--- /dev/null
+++ b/ap/lib/libnl/libnl-3.2.25/src/nl-util-addr.c
@@ -0,0 +1,34 @@
+/*
+ * src/nl-util-addr.c Address Helper
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
+ */
+
+#include <netlink/cli/utils.h>
+
+int main(int argc, char *argv[])
+{
+ int err;
+ char host[256];
+ struct nl_addr *a;
+
+ if (argc < 2) {
+ fprintf(stderr, "Usage: nl-util-addr <address>\n");
+ return -1;
+ }
+
+ a = nl_cli_addr_parse(argv[1], AF_UNSPEC);
+ err = nl_addr_resolve(a, host, sizeof(host));
+ if (err != 0)
+ nl_cli_fatal(err, "Unable to resolve address \"%s\": %s",
+ argv[1], nl_geterror(err));
+
+ printf("%s\n", host);
+
+ return 0;
+}