Projects
openEuler:Mainline
libnl3
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:libnl3.spec
Changed
@@ -1,20 +1,10 @@ Name: libnl3 -Version: 3.5.0 -Release: 6 +Version: 3.7.0 +Release: 1 Summary: Providing APIs to netlink protocol based Linux kernel interfaces License: LGPLv2 URL: http://www.infradead.org/~tgr/libnl/ -Source: https://github.com/thom311/libnl/releases/download/libnl3_5_0/libnl-3.5.0.tar.gz - -Patch6000: backport-lib-add-include-netlink-private-nl-auto-h-header.patch -Patch6001: backport-lib-use-proper-int-type-for-id-attributes-in-nl_object_identical.patch -Patch6002: backport-route-link-add-RTNL_LINK_REASM_OVERLAPS-stat.patch -Patch6003: backport-route-link-Check-for-null-pointer-in-macvlan.patch -Patch6004: backport-rtnl-link-fix-leaking-rtnl_link_af_ops-in-link_msg_parser.patch -Patch6005: backport-rtnl-route-fix-NLE_NOMEM-handling-in-parse_multipath.patch -Patch9000: solve-redefinition-of-struct-ipv6_mreq.patch -Patch9001: add-a-test-test-add-route.patch -Patch9002: add-some-tests-about-addr-class-rule-neigh-qdisc.patch +Source: https://github.com/thom311/libnl/releases/download/libnl3_7_0/libnl-3.7.0.tar.gz BuildRequires: flex bison libtool autoconf automake swig Requires: %{name} = %{version}-%{release} @@ -99,6 +89,12 @@ %{python3_sitearch}/netlink-*.egg-info %changelog +* Wed Nov 9 2022 chengyechun <chengyechun1@huawei.com> - 3.7.0-1 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:update to libnl-3.7.0 + * Sat Dec 18 2021 chengyechun <chengyechun1@huawei.com> - 3.5.0-6 - Type:bugfix - ID:NA
View file
_service:tar_scm:add-a-test-test-add-route.patch
Deleted
@@ -1,44 +0,0 @@ -From 92d64e75d74aa7343769f9923d0a9294caa0cadd Mon Sep 17 00:00:00 2001 -From: chengyechun <chengyechun1@huawei.com> -Date: Thu, 16 Dec 2021 22:13:04 +0800 -Subject: PATCH add a test:test add route - ---- - tests/test-add-route.c | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - create mode 100644 tests/test-add-route.c - -diff --git a/tests/test-add-route.c b/tests/test-add-route.c -new file mode 100644 -index 0000000..b93db60 ---- /dev/null -+++ b/tests/test-add-route.c -@@ -0,0 +1,25 @@ -+#include <netlink/cli/utils.h> -+#include <netlink/cli/route.h> -+#include <netlink/cli/link.h> -+#include <linux/netlink.h> -+ -+ -+int main(int argc, char *argv) -+{ -+ struct nl_sock *sk; -+ struct rtnl_route *route; -+ struct nl_cache *link_cache, *route_cache; -+ char dst_addr = "10.10.10.0/23"; -+ char nexthop = "dev=eth0, via=10.10.10.10.1"; -+ int err; -+ sk = nl_cli_alloc_socket(); -+ nl_cli_connect(sk, NETLINK_ROUTE); -+ link_cache = nl_cli_link_alloc_cache(sk); -+ route_cache = nl_cli_route_alloc_cache(sk); -+ route = nl_cli_route_alloc(); -+ nl_Cli_route_parse_dst(route, dst_addr); -+ nl_cli_route_parse_nexthop(route, nexthop, link_cache); -+ if ((err = rtnl_route_add(sk, route, NLM_F_EXCL)) < 0) -+ nl_cli_fatal(err, "Unable to add route: %s", nl_geterror(err)); -+ return 0; -+} --- -2.23.0 -
View file
_service:tar_scm:add-some-tests-about-addr-class-rule-neigh-qdisc.patch
Deleted
@@ -1,533 +0,0 @@ -From f595a06ee2e7048b02bbdd4d69a9dd160f1819ef Mon Sep 17 00:00:00 2001 -From: chengyechun <chengyechun1@huawei.com> -Date: Sat, 18 Dec 2021 22:03:11 +0800 -Subject: PATCH add some tests - ---- - test-add-rule.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++ - test-addr-add.c | 23 ++++++++++++++++++++ - test-addr-delete.c | 23 ++++++++++++++++++++ - test-class-add.c | 40 +++++++++++++++++++++++++++++++++++ - test-class-delete.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - test-genl-connect.c | 29 ++++++++++++++++++++++++++ - test-link.c | 50 ++++++++++++++++++++++++++++++++++++++++++++ - test-neigh-add.c | 26 +++++++++++++++++++++++ - test-neigh-delete.c | 26 +++++++++++++++++++++++ - test-qdisc-add.c | 35 +++++++++++++++++++++++++++++++ - test-qdisc-delete.c | 35 +++++++++++++++++++++++++++++++ - test-route-delete.c | 25 ++++++++++++++++++++++ - 13 files changed, 434 insertions(+), 1 deletion(-) - create mode 100644 test-add-rule.c - create mode 100644 test-addr-add.c - create mode 100644 test-addr-delete.c - create mode 100644 test-class-add.c - create mode 100644 test-class-delete.c - create mode 100644 test-genl-connect.c - create mode 100644 test-link.c - create mode 100644 test-neigh-add.c - create mode 100644 test-neigh-delete.c - create mode 100644 test-qdisc-add.c - create mode 100644 test-qdisc-delete.c - create mode 100644 test-route-delete.c - -diff --git a/test-add-rule.c b/test-add-rule.c -new file mode 100644 -index 0000000..f18a520 ---- /dev/null -+++ b/test-add-rule.c -@@ -0,0 +1,54 @@ -+#include <netlink/route/rule.h> -+#include <netlink/netlink.h> -+#include <linux/netlink.h> -+ -+ -+#define IPv6 -+ -+int main(int argc, char *argv) -+{ -+ struct nl_sock *sk; -+ struct rtnl_rule *rule; -+ struct nl_addr *src, *dst; -+ char baddr4 = { 0x1, 0x2, 0x3, 0x4 }; -+ char baddr26 = { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6 }; -+ int err; -+ -+ src = nl_addr_build(AF_UNSPEC, baddr, 4); -+ dst = nl_addr_build(AF_UNSPEC, baddr2, 6); -+ -+ sk = nl_socket_alloc(); -+ if ((err = nl_connect(sk, NETLINK_ROUTE)) < 0) { -+ nl_perror(err, "Unable to connect socket"); -+ return err; -+ } -+ rule = rtnl_rule_alloc(); -+ rtnl_rule_set_family(rule, AF_INET); -+ rtnl_rule_set_prio(rule, 12); -+ rtnl_rule_set_mark(rule, 12); -+ rtnl_rule_set_mask(rule, 16); -+ rtnl_rule_set_table(rule, 254); -+ rtnl_rule_set_dsfield(rule, 4); -+ rtnl_rule_set_src(rule, src); -+ rtnl_rule_set_dst(rule, dst); -+ rtnl_rule_set_iif(rule, "enp2s2"); -+ rtnl_rule_set_oif(rule, "enp2s7") -+ rtnl_rule_set_action(rule, 2); -+ rtnl_rule_set_l3mdev(rule, 1); -+ rtnl_rule_set_protocol(rule, 4); -+ rtnl_rule_get_family(rule); -+ rtnl_rule_get_prio(rule); -+ rtnl_rule_get_mark(rule); -+ rtnl_rule_get_mask(rule); -+ rtnl_rule_get_table(rule); -+ rtnl_rule_get_dsfield(rule); -+ rtnl_rule_get_src(rule); -+ rtnl_rule_get_dst(rule); -+ rtnl_rule_get_iif(rule); -+ rtnl_rule_get_oif(rule) -+ rtnl_rule_get_action(rule); -+ rtnl_rule_get_l3mdev(rule); -+ rtnl_rule_get_protocol(rule); -+ rtnl_rule_add(sk, rule, 4); -+ return 0; -+} -diff --git a/test-addr-add.c b/test-addr-add.c -new file mode 100644 -index 0000000..e7a8483 ---- /dev/null -+++ b/test-addr-add.c -@@ -0,0 +1,23 @@ -+#include <netlink/cli/utils.h> -+#include <netlink/cli/addr.h> -+#include <netlink/cli/link.h> -+#include <linux/netlink.h> -+ -+ -+int main(int argc, char *argv) -+{ -+ struct nl_sock *sock; -+ struct rtnl_addr *addr; -+ struct nl_cache *link_cache; -+ 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(); -+ nl_cli_addr_parse_local(addr, "10.10.16.2"); -+ nl_cli_addr_parse_dev(addr, link_cache, "eth0"); -+ nl_cli_addr_parse_family(addr, "AF_INET"); -+ if ((err = rtnl_addr_add(sock, addr, nlflags)) < 0) -+ nl_cli_fatal(err, "Unable to add address: %s", nl_geterror(err)); -+ return 0; -+} -diff --git a/test-addr-delete.c b/test-addr-delete.c -new file mode 100644 -index 0000000..e1e392b ---- /dev/null -+++ b/test-addr-delete.c -@@ -0,0 +1,23 @@ -+#include <netlink/cli/utils.h> -+#include <netlink/cli/addr.h> -+#include <netlink/cli/link.h> -+#include <linux/netlink.h> -+ -+ -+int main(int argc, char *argv) -+{ -+ struct nl_sock *sock; -+ struct rtnl_addr *addr; -+ struct nl_cache *link_cache; -+ 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(); -+ nl_cli_addr_parse_local(addr, "10.10.16.2"); -+ nl_cli_addr_parse_dev(addr, link_cache, "eth0"); -+ nl_cli_addr_parse_family(addr, "AF_INET"); -+ if ((err = rtnl_addr_delete(sock, addr, nlflags)) < 0) -+ nl_cli_fatal(err, "Unable to delete address: %s", nl_geterror(err)); -+ return 0; -+} -diff --git a/test-class-add.c b/test-class-add.c -new file mode 100644 -index 0000000..3ab3449 ---- /dev/null -+++ b/test-class-add.c -@@ -0,0 +1,40 @@ -+#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> -+#include <linux/netlink.h> -+ -+ -+int main(int argc, char *argv) -+{ -+ struct nl_sock *sk; -+ struct rtnl_class *class; -+ struct rtnl_tc *tc; -+ struct nl_cache *link_cache; -+ struct nl_cli_tc_module *tm; -+ struct rtnl_tc_ops *ops; -+ int err, flags = NLM_C_CREATE | NLM_F_EXCL; -+ char kind = "htb"; -+ char *rate = {"--rate=100mbit"}; -+ sk = nl_cli_alloc_socket(); -+ nl_cli_connect(sk, NETLINK_ROUTE); -+ link_cache = nl_cli_link_alloc_cache(sk); -+ class = nl_cli_class_alloc(); -+ tc = (struct rtnl_tc *) class; -+ nl_cli_tc_prase_dev(tc, link_cache, "eth0"); -+ nl_cli_tc_parse_parent(tc, "root"); -+ if (!rtnl_tc_get_ifindex(tc)) -+ nl_cli_fatal(EINVAL, "You must specify a network device XXX"); -+ if (!rtnl_tc_get_parent(tc)) -+ nl_cli_fatal(EINVAL, "You must specify a parent XXX"); -+ 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, 1, rate); -+ if ((err = rtnl_class_add(sk, class, flags)) < 0) -+ nl_cli_fatal(EINVAL, "Unable to add class: %s", nl_geterror(err)); -+ return 0; -+} -diff --git a/test-class-delete.c b/test-class-delete.c -new file mode 100644 -index 0000000..0443b96 ---- /dev/null -+++ b/test-class-delete.c -@@ -0,0 +1,60 @@ -+#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> -+#include <linux/netlink.h> -+ -+ -+static int quiet = 0, default_yes = 0, deleted = 0, interactive = 0; -+static struct nl_sock *sock; -+ -+ -+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_LIVE, -+ .pd_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\n"); -+ nl_object_dump(obj, ¶ms); -+ }; -+ deleted++; -+} -+ -+int main(int argc, char *argv) -+{ -+ struct nl_sock *sk; -+ struct rtnl_class *class; -+ struct rtnl_tc *tc; -+ struct nl_cache *link_cache, class_cache; -+ struct rtnl_tc_ops *ops; -+ struct nl_cli_tc_module *tm; -+ char kind = "htb"; -+ sk = nl_cli_alloc_socket(); -+ nl_cli_connect(sk, NETLINK_ROUTE); -+ link_cache = nl_cli_link_alloc_cache(sk); -+ class = nl_cli_class_alloc(); -+ tc = (struct rtnl_tc *) class; -+ nl_cli_tc_prase_dev(tc, link_cache, "eth0"); -+ nl_cli_tc_parse_parent(tc, "root"); -+ if (!rtnl_tc_get_ifindex(tc)) -+ nl_cli_fatal(EINVAL, "You must specify a network device XXX"); -+ if (!rtnl_tc_get_parent(tc)) -+ nl_cli_fatal(EINVAL, "You must specify a parent XXX"); -+ 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); -+ class_cache = nl_cli_class_alloc(sk, rtnl_tc_get_ifindex(tc)); -+ nl_cache_foreach_filter(class_cache, OBJ_CAST(class), delete_b, NULL); -+ return 0; -+} -diff --git a/test-genl-connect.c b/test-genl-connect.c -new file mode 100644 -index 0000000..f1d9690 ---- /dev/null -+++ b/test-genl-connect.c -@@ -0,0 +1,29 @@ -+#include <linux/genetlink.h> -+#include <netlink/socket.h> -+#include <netlink/cli/utils.h> -+#include <stdio.h> -+ -+ -+int main(int argc, char *argv) -+{ -+ struct nl_sock *sk; -+ struct nl_cache *family_cache; -+ struct nl_dump_params params = { -+ .dp_type = NL_DUMP_LINE, -+ .dp_fd = stdout, -+ }; -+ int err; -+ -+ sk = nl_socket_alloc(); -+ if ((err = genl_connect(sk)) < 0) -+ printf("Unable create socket: %s", nl_geterror(err)); -+ nl_socket_enable_auto_ack(sk); -+ nl_socket_disable_auto_ack(sk); -+ nl_socket_set_buffer_size(sk, 2000, 2000); -+ nl_socket_get_fd(sk); -+ if ((err = nl_socket_add_membership(sk, 3456)) < 0) -+ printf("Unable join group 3456 %s", nl_geterror(err)); -+ family_cache = nl_cli_alloc_cache(sk, "generic netlink family", genl_ctrl_alloc_cache); -+ nl_cache_dump(family_cache, ¶ms); -+ return 0; -+} -diff --git a/test-link.c b/test-link.c -new file mode 100644 -index 0000000..87af00f ---- /dev/null -+++ b/test-link.c -@@ -0,0 +1,50 @@ -+#include <netlink/socket.h> -+#include <netlink/netlink.h> -+#include <netlink/cli/utils.h> -+#include <netlink/cli/link.h> -+#include <netlink/route/link.h> -+#include <unistd.h> -+ -+static int self_def_cb = NL_CB_DEBUG -+ -+int main(int argc, char *argv) -+{ -+ struct nl_sock *sk; -+ struct nl_cache *link_cache; -+ struct rtnl_link *link; -+ struct nl_addr *addr; -+ struct nl_cb *cb; -+ int err, ifindex, pid; -+ char *buf; -+ cb = nl_cb_alloc(self_def_cb); -+ if (!(sk = nl_socket_alloc_cb(cb))) -+ nl_cli_fatal(ENOBUFS, "Unable to allocate netlink socket"); -+ nl_cli_connect(sk, NETLINK_ROUTE); -+ nl_socket_disable_seq_check(sk); -+ nl_socket_disable_auto_ack(sk); -+ pid = getpid(); -+ nl_socket_set_local_port(sk, pid); -+ nl_join_groups(sk, pid); -+ nl_socket_drop_membership(sk, pid); -+ nl_socket_set_peer_port(sk, 0); -+ if (err = nl_socket_get_peer_port(sk)) -+ printf("peer_port:%d", err); -+ if (err = nl_socket_use_seq(sk)) -+ printf("sk->s_seq_next:%d", err); -+ link_cache = nl_cli_link_alloc_cache(sk); -+ link = nl_cli_link_alloc(); -+ if ((ifindex = rntl_link_get_ifindex(link)) == 0){ -+ printf("ifindex is not set, %d", ifindex); -+ rtnl_link_set_ifindex(link, 1); -+ }; -+ if (rtnl_link_get(link_cache, 1)){ -+ printf("now, link is cached"); -+ }else{ -+ nl_cache_add(link_cache, (struct nl_object *)link); -+ }; -+ rtnl_link_add(sk, link, AF_INET); -+ addr = rtnl_link_get_addr(link); -+ rtnl_link_get_type(link); -+ rtnl_link_put(link); -+ return 0; -+} -diff --git a/test-neigh-add.c b/test-neigh-add.c -new file mode 100644 -index 0000000..185edb4 ---- /dev/null -+++ b/test-neigh-add.c -@@ -0,0 +1,26 @@ -+#include <netlink/cli/utils.h> -+#include <netlink/cli/neigh.h> -+#include <netlink/cli/link.h> -+#include <linux/netlink.h> -+ -+ -+int main(int argc, char *argv) -+{ -+ struct nl_sock *sk; -+ struct rtnl_neigh *neigh; -+ struct nl_cache *link_cache; -+ int err, 0k = 0, nlflags = NLM_F_REPLACE | NLM_F_CREATE; -+ char dst_addr = "10.0.0.1"; -+ char dev = "eth0"; -+ char lladdr = "AA:BB:CC:DD:EE:FF"; -+ sk = nl_cli_alloc_socket(); -+ nl_cli_connect(sk, NETLINK_ROUTE); -+ link_cache = nl_cli_link_alloc_cache(sk); -+ neigh = nl_cli_neigh_alloc(); -+ nl_cli_neigh_parse_dst(neigh, dst_addr); -+ nl_cli_neigh_parse_lladdr(neigh, lladdr); -+ nl_cli_neigh_parse_dev(neigh, link_cache, dev); -+ if ((err = rtnl_neigh_add(sk, neigh, nlflags)) < 0) -+ nl_cli_fatal(err, "Unable to add neighbour: %s", nl_geterror(rrr)); -+ return 0; -+} -diff --git a/test-neigh-delete.c b/test-neigh-delete.c -new file mode 100644 -index 0000000..e4eeb4e ---- /dev/null -+++ b/test-neigh-delete.c -@@ -0,0 +1,26 @@ -+#include <netlink/cli/utils.h> -+#include <netlink/cli/neigh.h> -+#include <netlink/cli/link.h> -+#include <linux/netlink.h> -+ -+ -+int main(int argc, char *argv) -+{ -+ struct nl_sock *sk; -+ struct rtnl_neigh *neigh; -+ struct nl_cache *link_cache; -+ int err, 0k = 0, nlflags = NLM_F_REPLACE | NLM_F_CREATE; -+ char dst_addr = "10.0.0.1"; -+ char dev = "eth0"; -+ char lladdr = "AA:BB:CC:DD:EE:FF"; -+ sk = nl_cli_alloc_socket(); -+ nl_cli_connect(sk, NETLINK_ROUTE); -+ link_cache = nl_cli_link_alloc_cache(sk); -+ neigh = nl_cli_neigh_alloc(); -+ nl_cli_neigh_parse_dst(neigh, dst_addr); -+ nl_cli_neigh_parse_lladdr(neigh, lladdr); -+ nl_cli_neigh_parse_dev(neigh, link_cache, dev); -+ if ((err = rtnl_neigh_delete(sk, neigh, nlflags)) < 0) -+ nl_cli_fatal(err, "Unable to add neighbour: %s", nl_geterror(rrr)); -+ return 0; -+} -diff --git a/test-qdisc-add.c b/test-qdisc-add.c -new file mode 100644 -index 0000000..2e48ef5 ---- /dev/null -+++ b/test-qdisc-add.c -@@ -0,0 +1,35 @@ -+#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> -+#include <linux/netlink.h> -+ -+int main(int argc, char *argv) -+{ -+ struct nlk_sock *sk; -+ struct rtnl_qdisc *qdisc; -+ struct rtnl_tc *tc; -+ struct nl_cache *link_cache; -+ int err, flags = NLM_F_CREATE | NLM_F_EXCL; -+ struct nl_cli_tc_module *tm; -+ struct rtnl_tc_ops *ops; -+ char kind = "htb"; -+ sk = nl_cli_alloc_socket(); -+ nl_cli_connect(sk, NETLINK_ROUTE); -+ link_cache = nl_cli_link_alloc_cache(sk); -+ qdisc = nl_cli_qdisc_alloc(); -+ tc = (struct rtnl_tc *) qdisc; -+ nl_cli_tc_parse_dev(tc, link_cache, "eth0"); -+ nl_cli_tc_parse_parent(tc, "root"); -+ rtnl_tc_get_ifindex(tc); -+ rtnl_tc_get_handle(tc); -+ 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); -+ if ((err = rtnl_qdisc_add(sk, qdisc, flags)) < 0) -+ nl_cli_fatal(EINVAL, "Unable to add qdisc %s", nl_geterror(err)); -+ return 0; -+} -diff --git a/test-qdisc-delete.c b/test-qdisc-delete.c -new file mode 100644 -index 0000000..ab170e1 ---- /dev/null -+++ b/test-qdisc-delete.c -@@ -0,0 +1,35 @@ -+#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> -+#include <linux/netlink.h> -+ -+int main(int argc, char *argv) -+{ -+ struct nlk_sock *sk; -+ struct rtnl_qdisc *qdisc; -+ struct rtnl_tc *tc; -+ struct nl_cache *link_cache; -+ int err, flags = NLM_F_CREATE | NLM_F_EXCL; -+ struct nl_cli_tc_module *tm; -+ struct rtnl_tc_ops *ops; -+ char kind = "htb"; -+ sk = nl_cli_alloc_socket(); -+ nl_cli_connect(sk, NETLINK_ROUTE); -+ link_cache = nl_cli_link_alloc_cache(sk); -+ qdisc = nl_cli_qdisc_alloc(); -+ tc = (struct rtnl_tc *) qdisc; -+ nl_cli_tc_parse_dev(tc, link_cache, "eth0"); -+ nl_cli_tc_parse_parent(tc, "root"); -+ rtnl_tc_get_ifindex(tc); -+ rtnl_tc_get_handle(tc); -+ 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); -+ if ((err = rtnl_qdisc_delete(sk, qdisc)) < 0) -+ nl_cli_fatal(EINVAL, "Unable to delete qdisc %s", nl_geterror(err)); -+ return 0; -+} -diff --git a/test-route-delete.c b/test-route-delete.c -new file mode 100644 -index 0000000..a3b76c2 ---- /dev/null -+++ b/test-route-delete.c -@@ -0,0 +1,25 @@ -+#include <netlink/cli/utils.h> -+#include <netlink/cli/route.h> -+#include <netlink/cli/link.h> -+#include <linux/netlink.h> -+ -+ -+int main(int argc, char *argv) -+{ -+ struct nl_sock *sk; -+ struct rtnl_route *route; -+ struct nl_cache *link_cache; -+ char dst_addr = "10.10.16.0/23"; -+ char nexthop = "dev=eth0,via=10.10.16.1"; -+ int err; -+ -+ sk = nl_cli_allco_socket(); -+ nl_cli_connect(sk, NETLINK_ROUTE); -+ link_cahce = nl_cli_link_alloc_cache(sk); -+ route = nl_cli_route_alloc(); -+ nl_cli_route_parse_dst(route, dst_addr); -+ nl_cli_route_parse_nexthop(route, nexthop, link_cache); -+ if ((err = rtnl_route_delete(sk, route, NLM_F_EXCL)) < 0) -+ nl_cli_fatal(err, "Unable to add route: %s", nl_geterror(err)); -+ return 0; -+} --- -1.8.3.1 -
View file
_service:tar_scm:backport-lib-add-include-netlink-private-nl-auto-h-header.patch
Deleted
@@ -1,123 +0,0 @@ -From abb7391f38893af7d6108f97ac8597468f113a41 Mon Sep 17 00:00:00 2001 -From: Thomas Haller <thaller@redhat.com> -Date: Wed, 15 Apr 2020 12:42:05 +0200 -Subject: PATCH lib: add "include/netlink-private/nl-auto.h" header - -Conflict:NA -Reference:https://github.com/thom311/libnl/commit/abb7391f38893af7d6108f97ac8597468f113a41 - ---- - Makefile.am | 1 + - include/netlink-private/nl-auto.h | 60 +++++++++++++++++++++++++++++++ - include/netlink-private/utils.h | 14 ++------ - 3 files changed, 63 insertions(+), 12 deletions(-) - create mode 100644 include/netlink-private/nl-auto.h - -diff --git a/Makefile.am b/Makefile.am -index b2e87379..085da53f 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -261,6 +261,7 @@ noinst_HEADERS = \ - include/netlink-private/cache-api.h \ - include/netlink-private/genl.h \ - include/netlink-private/netlink.h \ -+ include/netlink-private/nl-auto.h \ - include/netlink-private/object-api.h \ - include/netlink-private/route/link/api.h \ - include/netlink-private/route/link/sriov.h \ -diff --git a/include/netlink-private/nl-auto.h b/include/netlink-private/nl-auto.h -new file mode 100644 -index 00000000..7b923f26 ---- /dev/null -+++ b/include/netlink-private/nl-auto.h -@@ -0,0 +1,60 @@ -+// SPDX-License-Identifier: LGPL-2.1+ -+ -+#ifndef NETLINK_NL_AUTO_H_ -+#define NETLINK_NL_AUTO_H_ -+ -+#define _nl_auto(fcn) __attribute__ ((__cleanup__(fcn))) -+ -+#define _NL_AUTO_DEFINE_FCN_VOID0(CastType, name, func) \ -+static inline void name(void *v) \ -+{ \ -+ if (*((CastType *) v)) \ -+ func(*((CastType *) v)); \ -+} -+ -+#define _NL_AUTO_DEFINE_FCN_TYPED0(CastType, name, func) \ -+static inline void name(CastType *v) \ -+{ \ -+ if (*v) \ -+ func(*v); \ -+} -+ -+#define _nl_auto_free _nl_auto(_nl_auto_free_fcn) -+_NL_AUTO_DEFINE_FCN_VOID0(void *, _nl_auto_free_fcn, free) -+ -+struct nl_addr; -+void nl_addr_put(struct nl_addr *); -+#define _nl_auto_nl_addr _nl_auto(_nl_auto_nl_addr_fcn) -+_NL_AUTO_DEFINE_FCN_TYPED0(struct nl_addr *, _nl_auto_nl_addr_fcn, nl_addr_put) -+ -+struct nl_msg; -+void nlmsg_free(struct nl_msg *); -+#define _nl_auto_nl_msg _nl_auto(_nl_auto_nl_msg_fcn) -+_NL_AUTO_DEFINE_FCN_TYPED0(struct nl_msg *, _nl_auto_nl_msg_fcn, nlmsg_free) -+ -+struct rtnl_link; -+void rtnl_link_put(struct rtnl_link *); -+#define _nl_auto_rtnl_link _nl_auto(_nl_auto_rtnl_link_fcn) -+_NL_AUTO_DEFINE_FCN_TYPED0(struct rtnl_link *, _nl_auto_rtnl_link_fcn, rtnl_link_put) -+ -+struct rtnl_route; -+void rtnl_route_put(struct rtnl_route *); -+#define _nl_auto_rtnl_route _nl_auto(_nl_auto_rtnl_route_fcn) -+_NL_AUTO_DEFINE_FCN_TYPED0(struct rtnl_route *, _nl_auto_rtnl_route_fcn, rtnl_route_put) -+ -+struct rtnl_nexthop; -+void rtnl_route_nh_free(struct rtnl_nexthop *); -+#define _nl_auto_rtnl_nexthop _nl_auto(_nl_auto_rtnl_nexthop_fcn) -+_NL_AUTO_DEFINE_FCN_TYPED0(struct rtnl_nexthop *, _nl_auto_rtnl_nexthop_fcn, rtnl_route_nh_free) -+ -+struct nl_cache; -+void nl_cache_put(struct nl_cache *); -+#define _nl_auto_nl_cache _nl_auto(_nl_auto_nl_cache_fcn) -+_NL_AUTO_DEFINE_FCN_TYPED0(struct nl_cache *, _nl_auto_nl_cache_fcn, nl_cache_put) -+ -+struct rtnl_link_af_ops; -+void rtnl_link_af_ops_put(struct rtnl_link_af_ops *); -+#define _nl_auto_rtnl_link_af_ops _nl_auto(_nl_auto_rtnl_link_af_ops_fcn) -+_NL_AUTO_DEFINE_FCN_TYPED0(struct rtnl_link_af_ops *, _nl_auto_rtnl_link_af_ops_fcn, rtnl_link_af_ops_put) -+ -+#endif /* NETLINK_NL_AUTO_H_ */ -diff --git a/include/netlink-private/utils.h b/include/netlink-private/utils.h -index 9c5a3d82..46e77451 100644 ---- a/include/netlink-private/utils.h -+++ b/include/netlink-private/utils.h -@@ -85,18 +85,6 @@ - - /*****************************************************************************/ - --#define _NL_AUTO_DEFINE_FCN_VOID0(CastType, name, func) \ --static inline void name (void *v) \ --{ \ -- if (*((CastType *) v)) \ -- func (*((CastType *) v)); \ --} -- --#define _nl_auto_free _nl_auto(_nl_auto_free_fcn) --_NL_AUTO_DEFINE_FCN_VOID0 (void *, _nl_auto_free_fcn, free) -- --/*****************************************************************************/ -- - extern const char *nl_strerror_l(int err); - - /*****************************************************************************/ -@@ -222,4 +210,6 @@ _nl_strncpy(char *dst, const char *src, size_t len) - return dst; - } - -+#include "nl-auto.h" -+ - #endif
View file
_service:tar_scm:backport-lib-use-proper-int-type-for-id-attributes-in-nl_object_identical.patch
Deleted
@@ -1,29 +0,0 @@ -From f9d0181ceb2fc7c54abf89eff4c6b57e8fe6dd97 Mon Sep 17 00:00:00 2001 -From: Thomas Haller <thaller@redhat.com> -Date: Fri, 17 Apr 2020 16:31:10 +0200 -Subject: PATCH lib: use proper int type for id attributes in - nl_object_identical() - -Conflict:NA -Reference:https://github.com/thom311/libnl/commit/f9d0181ceb2fc7c54abf89eff4c6b57e8fe6dd97 - ---- - lib/object.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/lib/object.c b/lib/object.c -index d15cd152..07a21d22 100644 ---- a/lib/object.c -+++ b/lib/object.c -@@ -314,8 +314,9 @@ int nl_object_identical(struct nl_object *a, struct nl_object *b) - return 0; - - if (ops->oo_id_attrs_get) { -- int req_attrs_a = ops->oo_id_attrs_get(a); -- int req_attrs_b = ops->oo_id_attrs_get(b); -+ uint32_t req_attrs_a = ops->oo_id_attrs_get(a); -+ uint32_t req_attrs_b = ops->oo_id_attrs_get(b); -+ - if (req_attrs_a != req_attrs_b) - return 0; - req_attrs = req_attrs_a;
View file
_service:tar_scm:backport-route-link-Check-for-null-pointer-in-macvlan.patch
Deleted
@@ -1,30 +0,0 @@ -From 01ea9a6224b77292e8506bf179729aeeaac30398 Mon Sep 17 00:00:00 2001 -From: Jan Slomski <jan.slomski@westermo.se> -Date: Wed, 21 Mar 2018 10:23:57 +0100 -Subject: PATCH route/link: Check for null pointer in macvlan - -In cases where link->l_info is not set, a null-ptr-exception -will be invoked. - -https://github.com/thom311/libnl/pull/238 - -Conflict:NA -Reference:https://github.com/thom311/libnl/commit/01ea9a6224b77292e8506bf179729aeeaac30398 -Reference:https://github.com/thom311/libnl/commit/9cc38dcaeb55b5729c6c97b47884cebbda72b693 ---- - lib/route/link/macvlan.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/lib/route/link/macvlan.c b/lib/route/link/macvlan.c -index a23fe6d8..3ccebf45 100644 ---- a/lib/route/link/macvlan.c -+++ b/lib/route/link/macvlan.c -@@ -149,6 +149,8 @@ static void macvlan_free(struct rtnl_link *link) - uint32_t i; - - mvi = link->l_info; -+ if (!mvi) -+ return; - - for (i = 0; i < mvi->mvi_maccount; i++) - nl_addr_put(mvi->mvi_macaddri);
View file
_service:tar_scm:backport-route-link-add-RTNL_LINK_REASM_OVERLAPS-stat.patch
Deleted
@@ -1,66 +0,0 @@ -From bab9e77c87d3b596e77d669b0a827b50e725bb62 Mon Sep 17 00:00:00 2001 -From: Ilya Pronin <ipronin@twitter.com> -Date: Fri, 3 Apr 2020 20:00:37 -0700 -Subject: PATCH route/link: add RTNL_LINK_REASM_OVERLAPS stat - -The new stat exposes IPSTATS_MIB_REASM_OVERLAPS link stat. However, the -original motivation for this change was fixing the issue with missing RX -packets link stat. - -The regression was introduced in version 3.5.0 with commit 73c1d047, -that added a new enum constant IPSTATS_MIB_REASM_OVERLAPS. Without this -patch, IPSTATS_MIB_REASM_OVERLAPS is missing from -map_stat_id_from_IPSTATS_MIB_v2 and is mapped by it to 0. This tricks -inet6_parse_protinfo() into erroneously overwriting RTNL_LINK_RX_PACKETS -stat, which happens to have value 0, when it tries to set -IPSTATS_MIB_REASM_OVERLAPS. - -Fixes: 73c1d0479643 ('Sync linux headers to 4.19.66') - -https://github.com/thom311/libnl/pull/235 - -Conflict:NA -Reference:https://github.com/thom311/libnl/commit/bab9e77c87d3b596e77d669b0a827b50e725bb62 - ---- - include/netlink/route/link.h | 1 + - lib/route/link.c | 1 + - lib/route/link/inet6.c | 1 + - 3 files changed, 3 insertions(+) - -diff --git a/include/netlink/route/link.h b/include/netlink/route/link.h -index 516d8e16..d0d6d2b5 100644 ---- a/include/netlink/route/link.h -+++ b/include/netlink/route/link.h -@@ -93,6 +93,7 @@ typedef enum { - RTNL_LINK_IP6_ECT0PKTS, /*!< IPv6 SNMP InECT0Pkts */ - RTNL_LINK_IP6_CEPKTS, /*!< IPv6 SNMP InCEPkts */ - RTNL_LINK_RX_NOHANDLER, /*!< Received packets dropped on inactive device */ -+ RTNL_LINK_REASM_OVERLAPS, /*!< SNMP ReasmOverlaps */ - __RTNL_LINK_STATS_MAX, - } rtnl_link_stat_id_t; - -diff --git a/lib/route/link.c b/lib/route/link.c -index 9439fe6d..ed6f4558 100644 ---- a/lib/route/link.c -+++ b/lib/route/link.c -@@ -3007,6 +3007,7 @@ static const struct trans_tbl link_stats = { - __ADD(RTNL_LINK_IP6_ECT0PKTS, Ip6_InECT0Pkts), - __ADD(RTNL_LINK_IP6_CEPKTS, Ip6_InCEPkts), - __ADD(RTNL_LINK_RX_NOHANDLER, rx_nohandler), -+ __ADD(RTNL_LINK_REASM_OVERLAPS, ReasmOverlaps), - }; - - char *rtnl_link_stat2str(int st, char *buf, size_t len) -diff --git a/lib/route/link/inet6.c b/lib/route/link/inet6.c -index c977b617..1ad49bf1 100644 ---- a/lib/route/link/inet6.c -+++ b/lib/route/link/inet6.c -@@ -135,6 +135,7 @@ static const uint8_t map_stat_id_from_IPSTATS_MIB_v2__IPSTATS_MIB_MAX = { - 33 = RTNL_LINK_IP6_ECT1PKTS, /* IPSTATS_MIB_ECT1PKTS */ - 34 = RTNL_LINK_IP6_ECT0PKTS, /* IPSTATS_MIB_ECT0PKTS */ - 35 = RTNL_LINK_IP6_CEPKTS, /* IPSTATS_MIB_CEPKTS */ -+ 36 = RTNL_LINK_REASM_OVERLAPS, /* IPSTATS_MIB_REASM_OVERLAPS */ - }; - - static int inet6_parse_protinfo(struct rtnl_link *link, struct nlattr *attr,
View file
_service:tar_scm:backport-rtnl-link-fix-leaking-rtnl_link_af_ops-in-link_msg_parser.patch
Deleted
@@ -1,25 +0,0 @@ -From 2957d8f6c8bf1189545a7b0c1a49c4ccb26984a1 Mon Sep 17 00:00:00 2001 -From: Thomas Haller <thaller@redhat.com> -Date: Wed, 15 Apr 2020 14:01:09 +0200 -Subject: PATCH rtnl/link: fix leaking rtnl_link_af_ops in link_msg_parser() - -Conflict:NA -Reference:https://github.com/thom311/libnl/commit/2957d8f6c8bf1189545a7b0c1a49c4ccb26984a1 - ---- - lib/route/link.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/lib/route/link.c b/lib/route/link.c -index 0ce4b0ab..b73a8c5f 100644 ---- a/lib/route/link.c -+++ b/lib/route/link.c -@@ -722,6 +722,8 @@ static int link_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, - int remaining; - - nla_for_each_nested(af_attr, tbIFLA_AF_SPEC, remaining) { -+ _nl_auto_rtnl_link_af_ops struct rtnl_link_af_ops *af_ops = NULL; -+ - af_ops = af_lookup_and_alloc(link, nla_type(af_attr)); - if (af_ops && af_ops->ao_parse_af) { - char *af_data = link->l_af_datanla_type(af_attr);
View file
_service:tar_scm:backport-rtnl-route-fix-NLE_NOMEM-handling-in-parse_multipath.patch
Deleted
@@ -1,40 +0,0 @@ -From fca338b9f453295037f96e8fe9236ebb4763dd25 Mon Sep 17 00:00:00 2001 -From: Thomas Haller <thaller@redhat.com> -Date: Wed, 15 Apr 2020 13:17:40 +0200 -Subject: PATCH rtnl/route: fix NLE_NOMEM handling in parse_multipath() - -Conflict:NA -Reference:https://github.com/thom311/libnl/commit/fca338b9f453295037f96e8fe9236ebb4763dd25 - ---- - lib/route/route_obj.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/lib/route/route_obj.c b/lib/route/route_obj.c -index b5cc4ed4..de56a76b 100644 ---- a/lib/route/route_obj.c -+++ b/lib/route/route_obj.c -@@ -1072,8 +1072,10 @@ static int parse_multipath(struct rtnl_route *route, struct nlattr *attr) - - addr = nl_addr_alloc_attr(ntbRTA_NEWDST, - route->rt_family); -- if (!addr) -+ if (!addr) { -+ err = -NLE_NOMEM; - goto errout; -+ } - - err = rtnl_route_nh_set_newdst(nh, addr); - nl_addr_put(addr); -@@ -1085,8 +1087,10 @@ static int parse_multipath(struct rtnl_route *route, struct nlattr *attr) - struct nl_addr *addr; - - addr = rtnl_route_parse_via(ntbRTA_VIA); -- if (!addr) -+ if (!addr) { -+ err = -NLE_NOMEM; - goto errout; -+ } - - err = rtnl_route_nh_set_via(nh, addr); - nl_addr_put(addr);
View file
_service:tar_scm:solve-redefinition-of-struct-ipv6_mreq.patch
Deleted
@@ -1,12 +0,0 @@ -diff -uNrp libnl-3.2.28/include/linux-private/linux/if_bridge.h libnl-3.2.28-new//include/linux-private/linux/if_bridge.h ---- libnl-3.2.28/include/linux-private/linux/if_bridge.h 2016-06-29 17:04:28.000000000 +0800 -+++ libnl-3.2.28-new//include/linux-private/linux/if_bridge.h 2016-11-26 13:46:11.000000000 +0800 -@@ -15,7 +15,7 @@ - - #include <linux/types.h> - #include <linux/if_ether.h> --#include <linux/in6.h> -+#include <netinet/in.h> - - #define SYSFS_BRIDGE_ATTR "bridge" - #define SYSFS_BRIDGE_FDB "brforward"
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="scm">git</param> <param name="url">git@gitee.com:src-openeuler/libnl3.git</param> - <param name="revision">46ec537afacce1eba7d12aa81ac7703df4dd8210</param> + <param name="revision">master</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
View file
_service:tar_scm:libnl-3.5.0.tar.gz/tests/check-addr.c
Deleted
@@ -1,214 +0,0 @@ -/* - * tests/check-addr.c nl_addr unit tests - * - * 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) 2013 Thomas Graf <tgraf@suug.ch> - */ - -#include <check.h> -#include <netlink/addr.h> - -#include "util.h" - -START_TEST(addr_alloc) -{ - struct nl_addr *addr; - - addr = nl_addr_alloc(16); - fail_if(addr == NULL, - "Allocation should not return NULL"); - - fail_if(nl_addr_iszero(addr) == 0, - "New empty address should be all zeros"); - - fail_if(nl_addr_get_family(addr) != AF_UNSPEC, - "New empty address should have family AF_UNSPEC"); - - fail_if(nl_addr_get_prefixlen(addr) != 0, - "New empty address should have prefix length 0"); - - fail_if(nl_addr_shared(addr), - "New empty address should not be shared"); - - fail_if(nl_addr_get(addr) != addr, - "nl_addr_get() should return pointer to address"); - - fail_if(nl_addr_shared(addr) == 0, - "Address should be shared after call to nl_addr_get()"); - - nl_addr_put(addr); - - fail_if(nl_addr_shared(addr), - "Address should not be shared after call to nl_addr_put()"); - - fail_if(nl_addr_fill_sockaddr(addr, NULL, 0) == 0, - "Socket address filling should fail for empty address"); - - nl_addr_put(addr); -} -END_TEST - -START_TEST(addr_binary_addr) -{ - struct nl_addr *addr, *addr2; - char baddr4 = { 0x1, 0x2, 0x3, 0x4 }; - char baddr26 = { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6 }; - - addr = nl_addr_alloc(4); - fail_if(addr == NULL, - "Allocation should not return NULL"); - - fail_if(nl_addr_set_binary_addr(addr, baddr, 4) < 0, - "Valid binary address should be settable"); - - fail_if(nl_addr_get_prefixlen(addr) != 0, - "Prefix length should be unchanged after nl_addr_set_binary_addr()"); - - fail_if(nl_addr_get_len(addr) != 4, - "Address length should be 4"); - - fail_if(nl_addr_set_binary_addr(addr, baddr2, 6) == 0, - "Should not be able to set binary address exceeding maximum length"); - - fail_if(nl_addr_get_len(addr) != 4, - "Address length should still be 4"); - - fail_if(nl_addr_guess_family(addr) != AF_INET, - "Binary address of length 4 should be guessed as AF_INET"); - - fail_if(memcmp(baddr, nl_addr_get_binary_addr(addr), 4) != 0, - "Binary address mismatches"); - - addr2 = nl_addr_build(AF_UNSPEC, baddr, 4); - fail_if(addr2 == NULL, - "Building of address should not fail"); - - nl_addr_set_prefixlen(addr, 32); - fail_if(nl_addr_get_prefixlen(addr) != 32, - "Prefix length should be successful changed after nl_addr_set_prefixlen()"); - - fail_if(nl_addr_cmp(addr, addr2), - "Addresses built from same binary address should match"); - - nl_addr_put(addr); - nl_addr_put(addr2); -} -END_TEST - -START_TEST(addr_parse4) -{ - struct nl_addr *addr4, *clone; - struct sockaddr_in sin; - socklen_t len = sizeof(sin); - char *addr_str = "10.0.0.1/16"; - char buf128; - - fail_if(nl_addr_parse(addr_str, AF_INET6, &addr4) == 0, - "Should not be able to parse IPv4 address in IPv6 mode"); - - fail_if(nl_addr_parse(addr_str, AF_UNSPEC, &addr4) != 0, - "Should be able to parse \"%s\"", addr_str); - - fail_if(nl_addr_get_family(addr4) != AF_INET, - "Address family should be AF_INET"); - - fail_if(nl_addr_get_prefixlen(addr4) != 16, - "Prefix length should be 16"); - - fail_if(nl_addr_iszero(addr4), - "Address should not be all zeroes"); - - clone = nl_addr_clone(addr4); - fail_if(clone == NULL, - "Cloned address should not be NULL"); - - fail_if(nl_addr_cmp(addr4, clone) != 0, - "Cloned address should not mismatch original"); - - fail_if(nl_addr_fill_sockaddr(addr4, (struct sockaddr *) &sin, &len) != 0, - "Should be able to fill socketaddr"); - - fail_if(strcmp(nl_addr2str(addr4, buf, sizeof(buf)), addr_str), - "Address translated back to string does not match original"); - - nl_addr_put(addr4); - nl_addr_put(clone); -} -END_TEST - -START_TEST(addr_parse6) -{ - struct nl_addr *addr6, *clone; - struct sockaddr_in6 sin; - socklen_t len = sizeof(sin); - char *addr_str = "2001:1:2::3/64"; - char buf128; - - fail_if(nl_addr_parse(addr_str, AF_INET, &addr6) == 0, - "Should not be able to parse IPv6 address in IPv4 mode"); - - fail_if(nl_addr_parse(addr_str, AF_UNSPEC, &addr6) != 0, - "Should be able to parse \"%s\"", addr_str); - - fail_if(nl_addr_get_family(addr6) != AF_INET6, - "Address family should be AF_INET6"); - - fail_if(nl_addr_get_prefixlen(addr6) != 64, - "Prefix length should be 64"); - - fail_if(nl_addr_iszero(addr6), - "Address should not be all zeroes"); - - clone = nl_addr_clone(addr6); - fail_if(clone == NULL, - "Cloned address should not be NULL"); - - fail_if(nl_addr_cmp(addr6, clone) != 0, - "Cloned address should not mismatch original"); - - fail_if(nl_addr_fill_sockaddr(addr6, (struct sockaddr *) &sin, &len) != 0, - "Should be able to fill socketaddr"); - - fail_if(strcmp(nl_addr2str(addr6, buf, sizeof(buf)), addr_str), - "Address translated back to string does not match original"); - - nl_addr_put(addr6); - nl_addr_put(clone); -} -END_TEST - -START_TEST(addr_info) -{ - struct nl_addr *addr; - char *addr_str = "127.0.0.1"; - struct addrinfo *result; - - fail_if(nl_addr_parse(addr_str, AF_UNSPEC, &addr) != 0, - "Parsing of valid address should not fail"); - - fail_if(nl_addr_info(addr, &result) != 0, - "getaddrinfo() on loopback address should work"); - - freeaddrinfo(result); - nl_addr_put(addr); -} -END_TEST - -Suite *make_nl_addr_suite(void) -{ - Suite *suite = suite_create("Abstract addresses"); - - TCase *tc_addr = tcase_create("Core"); - tcase_add_test(tc_addr, addr_alloc); - tcase_add_test(tc_addr, addr_binary_addr); - tcase_add_test(tc_addr, addr_parse4); - tcase_add_test(tc_addr, addr_parse6); - tcase_add_test(tc_addr, addr_info); - suite_add_tcase(suite, tc_addr); - - return suite; -}
View file
_service:tar_scm:libnl-3.5.0.tar.gz/tests/check-attr.c
Deleted
@@ -1,90 +0,0 @@ -/* - * tests/check-attr.c nla_attr unit tests - * - * 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) 2013 Thomas Graf <tgraf@suug.ch> - */ - -#include "util.h" -#include <netlink/attr.h> -#include <netlink/msg.h> - -#include <linux/netlink.h> - -START_TEST(attr_size) -{ - fail_if(nla_attr_size(0) != NLA_HDRLEN, - "Length of empty attribute should match header size"); - fail_if(nla_attr_size(1) != NLA_HDRLEN + 1, - "Length of 1 bytes payload should be NLA_HDRLEN + 1"); - fail_if(nla_attr_size(2) != NLA_HDRLEN + 2, - "Length of 2 bytes payload should be NLA_HDRLEN + 2"); - fail_if(nla_attr_size(3) != NLA_HDRLEN + 3, - "Length of 3 bytes payload should be NLA_HDRLEN + 3"); - fail_if(nla_attr_size(4) != NLA_HDRLEN + 4, - "Length of 4 bytes payload should be NLA_HDRLEN + 4"); - - fail_if(nla_total_size(1) != NLA_HDRLEN + 4, - "Total size of 1 bytes payload should result in 8 bytes"); - fail_if(nla_total_size(2) != NLA_HDRLEN + 4, - "Total size of 2 bytes payload should result in 8 bytes"); - fail_if(nla_total_size(3) != NLA_HDRLEN + 4, - "Total size of 3 bytes payload should result in 8 bytes"); - fail_if(nla_total_size(4) != NLA_HDRLEN + 4, - "Total size of 4 bytes payload should result in 8 bytes"); - - fail_if(nla_padlen(1) != 3, - "2 bytes of payload should result in 3 padding bytes"); - fail_if(nla_padlen(2) != 2, - "2 bytes of payload should result in 2 padding bytes"); - fail_if(nla_padlen(3) != 1, - "3 bytes of payload should result in 1 padding bytes"); - fail_if(nla_padlen(4) != 0, - "4 bytes of payload should result in 0 padding bytes"); - fail_if(nla_padlen(5) != 3, - "5 bytes of payload should result in 3 padding bytes"); -} -END_TEST - -START_TEST(msg_construct) -{ - struct nl_msg *msg; - struct nlmsghdr *nlh; - struct nlattr *a; - int i, rem; - - msg = nlmsg_alloc(); - fail_if(!msg, "Unable to allocate netlink message"); - - for (i = 1; i < 256; i++) { - fail_if(nla_put_u32(msg, i, i+1) != 0, - "Unable to add attribute %d", i); - } - - nlh = nlmsg_hdr(msg); - i = 1; - nlmsg_for_each_attr(a, nlh, 0, rem) { - fail_if(nla_type(a) != i, "Expected attribute %d", i); - i++; - fail_if(nla_get_u32(a) != i, "Expected attribute value %d", i); - } - - nlmsg_free(msg); -} -END_TEST - -Suite *make_nl_attr_suite(void) -{ - Suite *suite = suite_create("Netlink attributes"); - - TCase *nl_attr = tcase_create("Core"); - tcase_add_test(nl_attr, attr_size); - tcase_add_test(nl_attr, msg_construct); - suite_add_tcase(suite, nl_attr); - - return suite; -}
View file
_service:tar_scm:libnl-3.5.0.tar.gz/tests/check-ematch-tree-clone.c
Deleted
@@ -1,143 +0,0 @@ -#include <netlink-private/types.h> -#include <netlink/route/cls/ematch.h> - -#include <linux/netlink.h> - -#include <stdio.h> -#include <time.h> - -#include <check.h> -#include "util.h" - -#define MAX_DEPTH 6 -#define MAX_CHILDREN 5 - -static int current_depth = 0; -static int id = 1; -static long long array_size = 0; - -static int *src_result = NULL, *dst_result = NULL; - -static long long my_pow(long long x, long long y) -{ - int ret = x; - - if (y == 0) - return 1; - - if (y < 0 || x == 0) - return 0; - - while(--y) { - ret *= x; - } - - return ret; -} - -static long int generate_random(long int max) -{ - srandom(time(NULL) + id); - return (random() % max); -} - -static int build_children(struct nl_list_head *parent) -{ - int i, num = 0; - struct rtnl_ematch *child = NULL; - - if (!parent) - return 0; - - if (++current_depth > MAX_DEPTH) { - --current_depth; - return 0; - } - - num = generate_random(MAX_CHILDREN + 1); - for (i = 0; i < num; ++i) { - child = rtnl_ematch_alloc(); - if (!child) { - printf("Mem alloc error\n"); - exit(1); - } - build_children(&child->e_childs); - child->e_id = id++; - nl_list_add_tail(&child->e_list, parent); - } - - --current_depth; - return 0; -} - -static void build_src_cgroup(struct rtnl_ematch_tree *tree) -{ - build_children(&tree->et_list); -} - -static void dump_ematch_list(struct nl_list_head *head, int *result, int *index) -{ - struct rtnl_ematch *pos = NULL; - - nl_list_for_each_entry(pos, head, e_list) { - if (!nl_list_empty(&pos->e_childs)) - dump_ematch_list(&pos->e_childs, result, index); - result*index = pos->e_id; - (*index)++; - } -} - -static void dump_ematch_tree(struct rtnl_ematch_tree *tree, int *result, int *index) -{ - if (!tree) - return; - - dump_ematch_list(&tree->et_list, result, index); -} - -static int compare(int *r1, int *r2, int len) -{ - int i = 0; - for (i = 0; i < len; ++i) { - if (r1i != r2i) - return -1; - } - return 0; -} - -START_TEST(ematch_tree_clone) -{ - struct rtnl_ematch_tree *src = NULL, *dst = NULL; - int i = 0, j = 0; - - array_size = (MAX_DEPTH * my_pow(MAX_CHILDREN, MAX_DEPTH)) / 2; - src_result = calloc(4, array_size); - dst_result = calloc(4, array_size); - - src = rtnl_ematch_tree_alloc(2); - - build_src_cgroup(src); - dump_ematch_tree(src, src_result, &i); - - dst = rtnl_ematch_tree_clone(src); - dump_ematch_tree(dst, dst_result, &j); - - fail_if(!dst); - fail_if(i != j); - fail_if(compare(src_result, dst_result, i)); - - free(src_result); - free(dst_result); -} -END_TEST - -Suite *make_nl_ematch_tree_clone_suite(void) -{ - Suite *suite = suite_create("Clone ematch tree"); - - TCase *ematch_tree = tcase_create("Core"); - tcase_add_test(ematch_tree, ematch_tree_clone); - suite_add_tcase(suite, ematch_tree); - - return suite; -}
View file
_service:tar_scm:libnl-3.5.0.tar.gz/tests/util.h
Deleted
@@ -1,10 +0,0 @@ -#include <check.h> - -#define nl_fail_if(condition, error, message) \ - fail_if((condition), "nlerr=%d (%s): %s", \ - (error), nl_geterror(error), (message)) - -Suite *make_nl_attr_suite(void); -Suite *make_nl_addr_suite(void); -Suite *make_nl_ematch_tree_clone_suite(void); -
View file
_service:tar_scm:libnl-3.5.0.tar.gz/ChangeLog -> _service:tar_scm:libnl-3.7.0.tar.gz/ChangeLog
Changed
@@ -1,5 +1,5 @@ ChangeLog discontinued, git history can be found here: -http://git.infradead.org/users/tgr/libnl.git +https://github.com/thom311/libnl Summary of Changes from 1.0-pre6 to 1.0-pre7 ================================================ @@ -42,7 +42,7 @@ NL_SKIP o Fixed nl_recvmsgs() to stop reading after parsing if not in the middle of a multipart message. - o Fixed nl_recvmsgs() to not stop after receving an ACK + o Fixed nl_recvmsgs() to not stop after receiving an ACK o Fixed nl_recvmsgs() to not blindly discard remaining messages if a NLMSG_DONE message is received. @@ -205,7 +205,7 @@ o Removed non-reentrant translation routines, only bloating the code and too risky. o Fixed wrong version number from 1.0-pre1. - o Reenabled unfinished policer module. + o Re-enabled unfinished policer module. o Reworked TBF module, automatic caluclation of transmit times, limit setable via latency, automatic cell size calculation, options TLV generation. (untested) @@ -219,7 +219,7 @@ o Add empty install target to src/Makefile Simon Stelling <blubb@gentoo.org> - o Use LIBDIR instead of $(prefix)/lib for users to alllow librariers + o Use LIBDIR instead of $(prefix)/lib for users to allow librariers into $(prefix)/lib64. Summary of Changes from 0.5.0 to 1.0-pre1 @@ -231,7 +231,7 @@ Petr Gotthard <petr.gotthard@siemens.com>, Siemens AG Oesterreich o added class_build, rtnl_class_build_add_request, rtnl_class_add - o added HTB (Hierachical Token Bucket) class support + o added HTB (Hierarchical Token Bucket) class support o added nl_xmittime, nl_build_rtable o added nl_data_append to realloc a nl_data structure o added rtnl_rcopy_ratespec as reverse to rtnl_copy_ratespec @@ -248,9 +248,9 @@ o nl_cache_filter to manually filter on a object o partial routing support o routing rules support - o Propely set address family when setting addresses + o Properly set address family when setting addresses o debug flag and some rare messages, more to come - o make error mesage verboseness configureable + o make error message verboseness configurable o tc fixes to wait for ack o cleanup and adaption of address code to latest internal API o various cleanups
View file
_service:tar_scm:libnl-3.5.0.tar.gz/Makefile.am -> _service:tar_scm:libnl-3.7.0.tar.gz/Makefile.am
Changed
@@ -105,6 +105,7 @@ include/netlink/route/class.h \ include/netlink/route/classifier.h \ include/netlink/route/link.h \ + include/netlink/route/mdb.h \ include/netlink/route/neighbour.h \ include/netlink/route/neightbl.h \ include/netlink/route/netconf.h \ @@ -121,6 +122,7 @@ libnlinclude_netlink_route_act_HEADERS = \ include/netlink/route/act/gact.h \ include/netlink/route/act/mirred.h \ + include/netlink/route/act/nat.h \ include/netlink/route/act/skbedit.h \ include/netlink/route/act/vlan.h \ $(NULL) @@ -129,6 +131,7 @@ include/netlink/route/cls/basic.h \ include/netlink/route/cls/cgroup.h \ include/netlink/route/cls/ematch.h \ + include/netlink/route/cls/flower.h \ include/netlink/route/cls/fw.h \ include/netlink/route/cls/matchall.h \ include/netlink/route/cls/police.h \ @@ -151,7 +154,9 @@ include/netlink/route/link/inet.h \ include/netlink/route/link/inet6.h \ include/netlink/route/link/info-api.h \ + include/netlink/route/link/ip6gre.h \ include/netlink/route/link/ip6tnl.h \ + include/netlink/route/link/ip6vti.h \ include/netlink/route/link/ipgre.h \ include/netlink/route/link/ipip.h \ include/netlink/route/link/ipvlan.h \ @@ -162,6 +167,7 @@ include/netlink/route/link/ppp.h \ include/netlink/route/link/sit.h \ include/netlink/route/link/sriov.h \ + include/netlink/route/link/team.h \ include/netlink/route/link/veth.h \ include/netlink/route/link/vlan.h \ include/netlink/route/link/vrf.h \ @@ -203,6 +209,7 @@ include/netlink/cli/ct.h \ include/netlink/cli/exp.h \ include/netlink/cli/link.h \ + include/netlink/cli/mdb.h \ include/netlink/cli/neigh.h \ include/netlink/cli/qdisc.h \ include/netlink/cli/route.h \ @@ -253,6 +260,7 @@ include/linux-private/linux/socket.h \ include/linux-private/linux/tc_act/tc_gact.h \ include/linux-private/linux/tc_act/tc_mirred.h \ + include/linux-private/linux/tc_act/tc_nat.h \ include/linux-private/linux/tc_act/tc_skbedit.h \ include/linux-private/linux/tc_act/tc_vlan.h \ include/linux-private/linux/tc_ematch/tc_em_meta.h \ @@ -261,12 +269,14 @@ include/netlink-private/cache-api.h \ include/netlink-private/genl.h \ include/netlink-private/netlink.h \ + include/netlink-private/nl-auto.h \ include/netlink-private/object-api.h \ include/netlink-private/route/link/api.h \ include/netlink-private/route/link/sriov.h \ include/netlink-private/route/mpls.h \ include/netlink-private/route/nexthop-encap.h \ include/netlink-private/route/tc-api.h \ + include/netlink-private/route/utils.h \ include/netlink-private/socket.h \ include/netlink-private/tc.h \ include/netlink-private/types.h \ @@ -371,6 +381,7 @@ lib/route/act.c \ lib/route/act/gact.c \ lib/route/act/mirred.c \ + lib/route/act/nat.c \ lib/route/act/skbedit.c \ lib/route/act/vlan.c \ lib/route/addr.c \ @@ -385,6 +396,7 @@ lib/route/cls/ematch/meta.c \ lib/route/cls/ematch/nbyte.c \ lib/route/cls/ematch/text.c \ + lib/route/cls/flower.c \ lib/route/cls/fw.c \ lib/route/cls/mall.c \ lib/route/cls/police.c \ @@ -399,7 +411,9 @@ lib/route/link/ifb.c \ lib/route/link/inet.c \ lib/route/link/inet6.c \ + lib/route/link/ip6gre.c \ lib/route/link/ip6tnl.c \ + lib/route/link/ip6vti.c \ lib/route/link/ipgre.c \ lib/route/link/ipip.c \ lib/route/link/ipvlan.c \ @@ -409,11 +423,13 @@ lib/route/link/ppp.c \ lib/route/link/sit.c \ lib/route/link/sriov.c \ + lib/route/link/team.c \ lib/route/link/veth.c \ lib/route/link/vlan.c \ lib/route/link/vrf.c \ lib/route/link/vxlan.c \ lib/route/link/xfrmi.c \ + lib/route/mdb.c \ lib/route/neigh.c \ lib/route/neightbl.c \ lib/route/netconf.c \ @@ -832,7 +848,25 @@ lib/libnl-3.la \ lib/libnl-nf-3.la \ lib/libnl-genl-3.la \ - lib/libnl-route-3.la + lib/libnl-route-3.la \ + $(NULL) + +if WITH_CHECK +check_LTLIBRARIES += tests/libnl-test-util.la +endif + +tests_libnl_test_util_la_SOURCES = \ + tests/nl-test-util.h \ + tests/nl-test-util.c \ + $(NULL) +tests_libnl_test_util_la_CPPFLAGS = \ + $(tests_cppflags) \ + $(CHECK_CFLAGS) \ + $(NULL) +tests_libnl_test_util_la_LIBADD = \ + $(tests_ldadd) \ + $(CHECK_LIBS) \ + $(NULL) check_PROGRAMS += \ tests/test-complex-HTB-with-hash-filters \ @@ -913,11 +947,13 @@ check_PROGRAMS += \ tests/test-cache-mngr \ tests/test-genl \ - tests/test-nf-cache-mngr + tests/test-nf-cache-mngr \ + $(NULL) tests_cli_ldadd = \ $(tests_ldadd) \ - src/lib/libnl-cli-3.la + src/lib/libnl-cli-3.la \ + $(NULL) tests_test_cache_mngr_CPPFLAGS = $(tests_cppflags) tests_test_cache_mngr_LDADD = $(tests_cli_ldadd) @@ -932,11 +968,12 @@ endif tests_check_all_SOURCES = \ - tests/check-addr.c \ tests/check-all.c \ - tests/check-attr.c \ - tests/check-ematch-tree-clone.c \ - tests/util.h \ + tests/cksuite-all-addr.c \ + tests/cksuite-all-attr.c \ + tests/cksuite-all-ematch-tree-clone.c \ + tests/cksuite-all-netns.c \ + tests/cksuite-all.h \ $(NULL) tests_check_all_CPPFLAGS = \ @@ -945,7 +982,34 @@ tests_check_all_LDADD = \ $(tests_ldadd) \ - $(CHECK_LIBS) + tests/libnl-test-util.la \ + $(CHECK_LIBS) \ + $(NULL) + +if WITH_CHECK +if ENABLE_STATIC +check_programs += tests/check-direct +endif +endif + +tests_check_direct_SOURCES = \ + tests/check-direct.c \ + $(NULL) + +tests_check_direct_CPPFLAGS = \ + $(tests_cppflags) \ + $(CHECK_CFLAGS) \ + $(NULL) + +tests_check_direct_LDFLAGS = \ + -static \ + $(NULL) + +tests_check_direct_LDADD = \ + $(tests_ldadd) \ + tests/libnl-test-util.la \ + $(CHECK_LIBS) \ + $(NULL) ############################################################################### @@ -1021,3 +1085,11 @@ libnl-route-3.sym \ libnl-xfrm-3.sym \ $(NULL) + +############################################################################### + +check-progs: all $(check_PROGRAMS) $(check_LTLIBRARIES) + +############################################################################### + +.PHONY = check-progs
View file
_service:tar_scm:libnl-3.5.0.tar.gz/Makefile.in -> _service:tar_scm:libnl-3.7.0.tar.gz/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -117,11 +117,11 @@ tests/test-socket-creation$(EXEEXT) \ tests/test-u32-filter-with-actions$(EXEEXT) \ tests/test-cache-mngr$(EXEEXT) tests/test-genl$(EXEEXT) \ - tests/test-nf-cache-mngr$(EXEEXT) $(am__EXEEXT_5) + tests/test-nf-cache-mngr$(EXEEXT) $(am__EXEEXT_6) bin_PROGRAMS = $(am__EXEEXT_2) -sbin_PROGRAMS = $(am__EXEEXT_7) -noinst_PROGRAMS = $(am__EXEEXT_6) -TESTS = $(am__EXEEXT_5) +sbin_PROGRAMS = $(am__EXEEXT_8) +noinst_PROGRAMS = $(am__EXEEXT_7) +TESTS = $(am__EXEEXT_6) @ENABLE_CLI_FALSE@am__append_1 = $(lib_cli_ltlibraries_cls) \ @ENABLE_CLI_FALSE@ $(lib_cli_ltlibraries_qdisc) \ @ENABLE_CLI_FALSE@ src/lib/libnl-cli-3.la @@ -131,8 +131,10 @@ @ENABLE_CLI_INSTALL_BIN_FALSE@@ENABLE_CLI_INSTALL_SBIN_TRUE@@ENABLE_CLI_TRUE@am__append_5 = $(cli_programs) @ENABLE_CLI_INSTALL_BIN_FALSE@@ENABLE_CLI_INSTALL_SBIN_FALSE@@ENABLE_CLI_TRUE@am__append_6 = $(cli_programs) @ENABLE_CLI_FALSE@am__append_7 = $(cli_programs) -@WITH_CHECK_TRUE@am__append_8 = tests/check-all -@ENABLE_CLI_TRUE@am__append_9 = libnl-cli-3.0.pc +@WITH_CHECK_TRUE@am__append_8 = tests/libnl-test-util.la +@WITH_CHECK_TRUE@am__append_9 = tests/check-all +@ENABLE_STATIC_TRUE@@WITH_CHECK_TRUE@am__append_10 = tests/check-direct +@ENABLE_CLI_TRUE@am__append_11 = libnl-cli-3.0.pc subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ @@ -209,9 +211,10 @@ "$(DESTDIR)$(libnlinclude_netlink_xfrmdir)" @ENABLE_CLI_FALSE@am__EXEEXT_3 = $(am__EXEEXT_1) @WITH_CHECK_TRUE@am__EXEEXT_4 = tests/check-all$(EXEEXT) -am__EXEEXT_5 = $(am__EXEEXT_4) -@ENABLE_CLI_INSTALL_BIN_FALSE@@ENABLE_CLI_INSTALL_SBIN_FALSE@@ENABLE_CLI_TRUE@am__EXEEXT_6 = $(am__EXEEXT_1) -@ENABLE_CLI_INSTALL_BIN_FALSE@@ENABLE_CLI_INSTALL_SBIN_TRUE@@ENABLE_CLI_TRUE@am__EXEEXT_7 = $(am__EXEEXT_1) +@ENABLE_STATIC_TRUE@@WITH_CHECK_TRUE@am__EXEEXT_5 = tests/check-direct$(EXEEXT) +am__EXEEXT_6 = $(am__EXEEXT_4) $(am__EXEEXT_5) +@ENABLE_CLI_INSTALL_BIN_FALSE@@ENABLE_CLI_INSTALL_SBIN_FALSE@@ENABLE_CLI_TRUE@am__EXEEXT_7 = $(am__EXEEXT_1) +@ENABLE_CLI_INSTALL_BIN_FALSE@@ENABLE_CLI_INSTALL_SBIN_TRUE@@ENABLE_CLI_TRUE@am__EXEEXT_8 = $(am__EXEEXT_1) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(sbin_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -413,6 +416,7 @@ lib/route/libnl_route_3_la-act.lo \ lib/route/act/libnl_route_3_la-gact.lo \ lib/route/act/libnl_route_3_la-mirred.lo \ + lib/route/act/libnl_route_3_la-nat.lo \ lib/route/act/libnl_route_3_la-skbedit.lo \ lib/route/act/libnl_route_3_la-vlan.lo \ lib/route/libnl_route_3_la-addr.lo \ @@ -427,6 +431,7 @@ lib/route/cls/ematch/libnl_route_3_la-meta.lo \ lib/route/cls/ematch/libnl_route_3_la-nbyte.lo \ lib/route/cls/ematch/libnl_route_3_la-text.lo \ + lib/route/cls/libnl_route_3_la-flower.lo \ lib/route/cls/libnl_route_3_la-fw.lo \ lib/route/cls/libnl_route_3_la-mall.lo \ lib/route/cls/libnl_route_3_la-police.lo \ @@ -441,7 +446,9 @@ lib/route/link/libnl_route_3_la-ifb.lo \ lib/route/link/libnl_route_3_la-inet.lo \ lib/route/link/libnl_route_3_la-inet6.lo \ + lib/route/link/libnl_route_3_la-ip6gre.lo \ lib/route/link/libnl_route_3_la-ip6tnl.lo \ + lib/route/link/libnl_route_3_la-ip6vti.lo \ lib/route/link/libnl_route_3_la-ipgre.lo \ lib/route/link/libnl_route_3_la-ipip.lo \ lib/route/link/libnl_route_3_la-ipvlan.lo \ @@ -451,11 +458,13 @@ lib/route/link/libnl_route_3_la-ppp.lo \ lib/route/link/libnl_route_3_la-sit.lo \ lib/route/link/libnl_route_3_la-sriov.lo \ + lib/route/link/libnl_route_3_la-team.lo \ lib/route/link/libnl_route_3_la-veth.lo \ lib/route/link/libnl_route_3_la-vlan.lo \ lib/route/link/libnl_route_3_la-vrf.lo \ lib/route/link/libnl_route_3_la-vxlan.lo \ lib/route/link/libnl_route_3_la-xfrmi.lo \ + lib/route/libnl_route_3_la-mdb.lo \ lib/route/libnl_route_3_la-neigh.lo \ lib/route/libnl_route_3_la-neightbl.lo \ lib/route/libnl_route_3_la-netconf.lo \ @@ -524,282 +533,304 @@ $(LDFLAGS) -o $@ @ENABLE_CLI_FALSE@am_src_lib_libnl_cli_3_la_rpath = @ENABLE_CLI_TRUE@am_src_lib_libnl_cli_3_la_rpath = -rpath $(libdir) +am__DEPENDENCIES_1 = lib/libnl-3.la lib/libnl-nf-3.la \ + lib/libnl-genl-3.la lib/libnl-route-3.la +am__DEPENDENCIES_2 = +tests_libnl_test_util_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_2) +am_tests_libnl_test_util_la_OBJECTS = \ + tests/libnl_test_util_la-nl-test-util.lo +tests_libnl_test_util_la_OBJECTS = \ + $(am_tests_libnl_test_util_la_OBJECTS) +@WITH_CHECK_TRUE@am_tests_libnl_test_util_la_rpath = src_genl_ctrl_list_SOURCES = src/genl-ctrl-list.c src_genl_ctrl_list_OBJECTS = \ src/genl_ctrl_list-genl-ctrl-list.$(OBJEXT) -am__DEPENDENCIES_1 = src/lib/libnl-cli-3.la lib/libnl-3.la \ +am__DEPENDENCIES_3 = src/lib/libnl-cli-3.la lib/libnl-3.la \ lib/libnl-nf-3.la lib/libnl-genl-3.la lib/libnl-route-3.la \ lib/libnl-idiag-3.la -src_genl_ctrl_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_genl_ctrl_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_idiag_socket_details_SOURCES = src/idiag-socket-details.c src_idiag_socket_details_OBJECTS = \ src/idiag_socket_details-idiag-socket-details.$(OBJEXT) -src_idiag_socket_details_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_idiag_socket_details_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nf_ct_add_SOURCES = src/nf-ct-add.c src_nf_ct_add_OBJECTS = src/nf_ct_add-nf-ct-add.$(OBJEXT) -src_nf_ct_add_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nf_ct_add_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nf_ct_events_SOURCES = src/nf-ct-events.c src_nf_ct_events_OBJECTS = src/nf_ct_events-nf-ct-events.$(OBJEXT) -src_nf_ct_events_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nf_ct_events_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nf_ct_list_SOURCES = src/nf-ct-list.c src_nf_ct_list_OBJECTS = src/nf_ct_list-nf-ct-list.$(OBJEXT) -src_nf_ct_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nf_ct_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nf_exp_add_SOURCES = src/nf-exp-add.c src_nf_exp_add_OBJECTS = src/nf_exp_add-nf-exp-add.$(OBJEXT) -src_nf_exp_add_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nf_exp_add_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nf_exp_delete_SOURCES = src/nf-exp-delete.c src_nf_exp_delete_OBJECTS = src/nf_exp_delete-nf-exp-delete.$(OBJEXT) -src_nf_exp_delete_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nf_exp_delete_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nf_exp_list_SOURCES = src/nf-exp-list.c src_nf_exp_list_OBJECTS = src/nf_exp_list-nf-exp-list.$(OBJEXT) -src_nf_exp_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nf_exp_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nf_log_SOURCES = src/nf-log.c src_nf_log_OBJECTS = src/nf_log-nf-log.$(OBJEXT) -src_nf_log_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nf_log_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nf_monitor_SOURCES = src/nf-monitor.c src_nf_monitor_OBJECTS = src/nf_monitor-nf-monitor.$(OBJEXT) -src_nf_monitor_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nf_monitor_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nf_queue_SOURCES = src/nf-queue.c src_nf_queue_OBJECTS = src/nf_queue-nf-queue.$(OBJEXT) -src_nf_queue_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nf_queue_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_addr_add_SOURCES = src/nl-addr-add.c src_nl_addr_add_OBJECTS = src/nl_addr_add-nl-addr-add.$(OBJEXT) -src_nl_addr_add_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_addr_add_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_addr_delete_SOURCES = src/nl-addr-delete.c src_nl_addr_delete_OBJECTS = \ src/nl_addr_delete-nl-addr-delete.$(OBJEXT) -src_nl_addr_delete_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_addr_delete_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_addr_list_SOURCES = src/nl-addr-list.c src_nl_addr_list_OBJECTS = src/nl_addr_list-nl-addr-list.$(OBJEXT) -src_nl_addr_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_addr_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_class_add_SOURCES = src/nl-class-add.c src_nl_class_add_OBJECTS = src/nl_class_add-nl-class-add.$(OBJEXT) -src_nl_class_add_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_class_add_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_class_delete_SOURCES = src/nl-class-delete.c src_nl_class_delete_OBJECTS = \ src/nl_class_delete-nl-class-delete.$(OBJEXT) -src_nl_class_delete_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_class_delete_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_class_list_SOURCES = src/nl-class-list.c src_nl_class_list_OBJECTS = src/nl_class_list-nl-class-list.$(OBJEXT) -src_nl_class_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_class_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_classid_lookup_SOURCES = src/nl-classid-lookup.c src_nl_classid_lookup_OBJECTS = \ src/nl_classid_lookup-nl-classid-lookup.$(OBJEXT) -src_nl_classid_lookup_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_classid_lookup_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_cls_add_SOURCES = src/nl-cls-add.c src_nl_cls_add_OBJECTS = src/nl_cls_add-nl-cls-add.$(OBJEXT) -src_nl_cls_add_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_cls_add_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_cls_delete_SOURCES = src/nl-cls-delete.c src_nl_cls_delete_OBJECTS = src/nl_cls_delete-nl-cls-delete.$(OBJEXT) -src_nl_cls_delete_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_cls_delete_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_cls_list_SOURCES = src/nl-cls-list.c src_nl_cls_list_OBJECTS = src/nl_cls_list-nl-cls-list.$(OBJEXT) -src_nl_cls_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_cls_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_fib_lookup_SOURCES = src/nl-fib-lookup.c src_nl_fib_lookup_OBJECTS = src/nl_fib_lookup-nl-fib-lookup.$(OBJEXT) -src_nl_fib_lookup_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_fib_lookup_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_link_enslave_SOURCES = src/nl-link-enslave.c src_nl_link_enslave_OBJECTS = \ src/nl_link_enslave-nl-link-enslave.$(OBJEXT) -src_nl_link_enslave_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_link_enslave_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_link_ifindex2name_SOURCES = src/nl-link-ifindex2name.c src_nl_link_ifindex2name_OBJECTS = \ src/nl_link_ifindex2name-nl-link-ifindex2name.$(OBJEXT) -src_nl_link_ifindex2name_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_link_ifindex2name_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_link_list_SOURCES = src/nl-link-list.c src_nl_link_list_OBJECTS = src/nl_link_list-nl-link-list.$(OBJEXT) -src_nl_link_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_link_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_link_name2ifindex_SOURCES = src/nl-link-name2ifindex.c src_nl_link_name2ifindex_OBJECTS = \ src/nl_link_name2ifindex-nl-link-name2ifindex.$(OBJEXT) -src_nl_link_name2ifindex_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_link_name2ifindex_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_link_release_SOURCES = src/nl-link-release.c src_nl_link_release_OBJECTS = \ src/nl_link_release-nl-link-release.$(OBJEXT) -src_nl_link_release_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_link_release_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_link_set_SOURCES = src/nl-link-set.c src_nl_link_set_OBJECTS = src/nl_link_set-nl-link-set.$(OBJEXT) -src_nl_link_set_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_link_set_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_link_stats_SOURCES = src/nl-link-stats.c src_nl_link_stats_OBJECTS = src/nl_link_stats-nl-link-stats.$(OBJEXT) -src_nl_link_stats_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_link_stats_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_list_caches_SOURCES = src/nl-list-caches.c src_nl_list_caches_OBJECTS = \ src/nl_list_caches-nl-list-caches.$(OBJEXT) -src_nl_list_caches_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_list_caches_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_list_sockets_SOURCES = src/nl-list-sockets.c src_nl_list_sockets_OBJECTS = \ src/nl_list_sockets-nl-list-sockets.$(OBJEXT) -src_nl_list_sockets_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_list_sockets_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_monitor_SOURCES = src/nl-monitor.c src_nl_monitor_OBJECTS = src/nl_monitor-nl-monitor.$(OBJEXT) -src_nl_monitor_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_monitor_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_neigh_add_SOURCES = src/nl-neigh-add.c src_nl_neigh_add_OBJECTS = src/nl_neigh_add-nl-neigh-add.$(OBJEXT) -src_nl_neigh_add_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_neigh_add_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_neigh_delete_SOURCES = src/nl-neigh-delete.c src_nl_neigh_delete_OBJECTS = \ src/nl_neigh_delete-nl-neigh-delete.$(OBJEXT) -src_nl_neigh_delete_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_neigh_delete_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_neigh_list_SOURCES = src/nl-neigh-list.c src_nl_neigh_list_OBJECTS = src/nl_neigh_list-nl-neigh-list.$(OBJEXT) -src_nl_neigh_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_neigh_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_neightbl_list_SOURCES = src/nl-neightbl-list.c src_nl_neightbl_list_OBJECTS = \ src/nl_neightbl_list-nl-neightbl-list.$(OBJEXT) -src_nl_neightbl_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_neightbl_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_pktloc_lookup_SOURCES = src/nl-pktloc-lookup.c src_nl_pktloc_lookup_OBJECTS = \ src/nl_pktloc_lookup-nl-pktloc-lookup.$(OBJEXT) -src_nl_pktloc_lookup_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_pktloc_lookup_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_qdisc_add_SOURCES = src/nl-qdisc-add.c src_nl_qdisc_add_OBJECTS = src/nl_qdisc_add-nl-qdisc-add.$(OBJEXT) -src_nl_qdisc_add_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_qdisc_add_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_qdisc_delete_SOURCES = src/nl-qdisc-delete.c src_nl_qdisc_delete_OBJECTS = \ src/nl_qdisc_delete-nl-qdisc-delete.$(OBJEXT) -src_nl_qdisc_delete_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_qdisc_delete_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_qdisc_list_SOURCES = src/nl-qdisc-list.c src_nl_qdisc_list_OBJECTS = src/nl_qdisc_list-nl-qdisc-list.$(OBJEXT) -src_nl_qdisc_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_qdisc_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_route_add_SOURCES = src/nl-route-add.c src_nl_route_add_OBJECTS = src/nl_route_add-nl-route-add.$(OBJEXT) -src_nl_route_add_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_route_add_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_route_delete_SOURCES = src/nl-route-delete.c src_nl_route_delete_OBJECTS = \ src/nl_route_delete-nl-route-delete.$(OBJEXT) -src_nl_route_delete_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_route_delete_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_route_get_SOURCES = src/nl-route-get.c src_nl_route_get_OBJECTS = src/nl_route_get-nl-route-get.$(OBJEXT) -src_nl_route_get_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_route_get_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_route_list_SOURCES = src/nl-route-list.c src_nl_route_list_OBJECTS = src/nl_route_list-nl-route-list.$(OBJEXT) -src_nl_route_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_route_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_rule_list_SOURCES = src/nl-rule-list.c src_nl_rule_list_OBJECTS = src/nl_rule_list-nl-rule-list.$(OBJEXT) -src_nl_rule_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_rule_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_tctree_list_SOURCES = src/nl-tctree-list.c src_nl_tctree_list_OBJECTS = \ src/nl_tctree_list-nl-tctree-list.$(OBJEXT) -src_nl_tctree_list_DEPENDENCIES = $(am__DEPENDENCIES_1) +src_nl_tctree_list_DEPENDENCIES = $(am__DEPENDENCIES_3) src_nl_util_addr_SOURCES = src/nl-util-addr.c src_nl_util_addr_OBJECTS = src/nl_util_addr-nl-util-addr.$(OBJEXT) -src_nl_util_addr_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_tests_check_all_OBJECTS = tests/check_all-check-addr.$(OBJEXT) \ - tests/check_all-check-all.$(OBJEXT) \ - tests/check_all-check-attr.$(OBJEXT) \ - tests/check_all-check-ematch-tree-clone.$(OBJEXT) +src_nl_util_addr_DEPENDENCIES = $(am__DEPENDENCIES_3) +am_tests_check_all_OBJECTS = tests/check_all-check-all.$(OBJEXT) \ + tests/check_all-cksuite-all-addr.$(OBJEXT) \ + tests/check_all-cksuite-all-attr.$(OBJEXT) \ + tests/check_all-cksuite-all-ematch-tree-clone.$(OBJEXT) \ + tests/check_all-cksuite-all-netns.$(OBJEXT) tests_check_all_OBJECTS = $(am_tests_check_all_OBJECTS) -am__DEPENDENCIES_2 = -tests_check_all_DEPENDENCIES = $(tests_ldadd) $(am__DEPENDENCIES_2) +tests_check_all_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + tests/libnl-test-util.la $(am__DEPENDENCIES_2) +am_tests_check_direct_OBJECTS = \ + tests/check_direct-check-direct.$(OBJEXT) +tests_check_direct_OBJECTS = $(am_tests_check_direct_OBJECTS) +tests_check_direct_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + tests/libnl-test-util.la $(am__DEPENDENCIES_2) +tests_check_direct_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(tests_check_direct_LDFLAGS) \ + $(LDFLAGS) -o $@ tests_test_cache_mngr_SOURCES = tests/test-cache-mngr.c tests_test_cache_mngr_OBJECTS = \ tests/test_cache_mngr-test-cache-mngr.$(OBJEXT) -tests_test_cache_mngr_DEPENDENCIES = $(tests_cli_ldadd) +am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1) src/lib/libnl-cli-3.la +tests_test_cache_mngr_DEPENDENCIES = $(am__DEPENDENCIES_4) tests_test_complex_HTB_with_hash_filters_SOURCES = \ tests/test-complex-HTB-with-hash-filters.c tests_test_complex_HTB_with_hash_filters_OBJECTS = tests/test_complex_HTB_with_hash_filters-test-complex-HTB-with-hash-filters.$(OBJEXT) tests_test_complex_HTB_with_hash_filters_DEPENDENCIES = \ - $(tests_ldadd) + $(am__DEPENDENCIES_1) tests_test_create_bond_SOURCES = tests/test-create-bond.c tests_test_create_bond_OBJECTS = \ tests/test_create_bond-test-create-bond.$(OBJEXT) -tests_test_create_bond_DEPENDENCIES = $(tests_ldadd) +tests_test_create_bond_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_bridge_SOURCES = tests/test-create-bridge.c tests_test_create_bridge_OBJECTS = \ tests/test_create_bridge-test-create-bridge.$(OBJEXT) -tests_test_create_bridge_DEPENDENCIES = $(tests_ldadd) +tests_test_create_bridge_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_geneve_SOURCES = tests/test-create-geneve.c tests_test_create_geneve_OBJECTS = \ tests/test_create_geneve-test-create-geneve.$(OBJEXT) -tests_test_create_geneve_DEPENDENCIES = $(tests_ldadd) +tests_test_create_geneve_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_ifb_SOURCES = tests/test-create-ifb.c tests_test_create_ifb_OBJECTS = \ tests/test_create_ifb-test-create-ifb.$(OBJEXT) -tests_test_create_ifb_DEPENDENCIES = $(tests_ldadd) +tests_test_create_ifb_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_ip6tnl_SOURCES = tests/test-create-ip6tnl.c tests_test_create_ip6tnl_OBJECTS = \ tests/test_create_ip6tnl-test-create-ip6tnl.$(OBJEXT) -tests_test_create_ip6tnl_DEPENDENCIES = $(tests_ldadd) +tests_test_create_ip6tnl_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_ipgre_SOURCES = tests/test-create-ipgre.c tests_test_create_ipgre_OBJECTS = \ tests/test_create_ipgre-test-create-ipgre.$(OBJEXT) -tests_test_create_ipgre_DEPENDENCIES = $(tests_ldadd) +tests_test_create_ipgre_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_ipgretap_SOURCES = tests/test-create-ipgretap.c tests_test_create_ipgretap_OBJECTS = \ tests/test_create_ipgretap-test-create-ipgretap.$(OBJEXT) -tests_test_create_ipgretap_DEPENDENCIES = $(tests_ldadd) +tests_test_create_ipgretap_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_ipip_SOURCES = tests/test-create-ipip.c tests_test_create_ipip_OBJECTS = \ tests/test_create_ipip-test-create-ipip.$(OBJEXT) -tests_test_create_ipip_DEPENDENCIES = $(tests_ldadd) +tests_test_create_ipip_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_ipvlan_SOURCES = tests/test-create-ipvlan.c tests_test_create_ipvlan_OBJECTS = \ tests/test_create_ipvlan-test-create-ipvlan.$(OBJEXT) -tests_test_create_ipvlan_DEPENDENCIES = $(tests_ldadd) +tests_test_create_ipvlan_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_ipvti_SOURCES = tests/test-create-ipvti.c tests_test_create_ipvti_OBJECTS = \ tests/test_create_ipvti-test-create-ipvti.$(OBJEXT) -tests_test_create_ipvti_DEPENDENCIES = $(tests_ldadd) +tests_test_create_ipvti_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_macsec_SOURCES = tests/test-create-macsec.c tests_test_create_macsec_OBJECTS = \ tests/test_create_macsec-test-create-macsec.$(OBJEXT) -tests_test_create_macsec_DEPENDENCIES = $(tests_ldadd) +tests_test_create_macsec_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_macvlan_SOURCES = tests/test-create-macvlan.c tests_test_create_macvlan_OBJECTS = \ tests/test_create_macvlan-test-create-macvlan.$(OBJEXT) -tests_test_create_macvlan_DEPENDENCIES = $(tests_ldadd) +tests_test_create_macvlan_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_macvtap_SOURCES = tests/test-create-macvtap.c tests_test_create_macvtap_OBJECTS = \ tests/test_create_macvtap-test-create-macvtap.$(OBJEXT) -tests_test_create_macvtap_DEPENDENCIES = $(tests_ldadd) +tests_test_create_macvtap_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_sit_SOURCES = tests/test-create-sit.c tests_test_create_sit_OBJECTS = \ tests/test_create_sit-test-create-sit.$(OBJEXT) -tests_test_create_sit_DEPENDENCIES = $(tests_ldadd) +tests_test_create_sit_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_veth_SOURCES = tests/test-create-veth.c tests_test_create_veth_OBJECTS = \ tests/test_create_veth-test-create-veth.$(OBJEXT) -tests_test_create_veth_DEPENDENCIES = $(tests_ldadd) +tests_test_create_veth_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_vlan_SOURCES = tests/test-create-vlan.c tests_test_create_vlan_OBJECTS = \ tests/test_create_vlan-test-create-vlan.$(OBJEXT) -tests_test_create_vlan_DEPENDENCIES = $(tests_ldadd) +tests_test_create_vlan_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_vrf_SOURCES = tests/test-create-vrf.c tests_test_create_vrf_OBJECTS = \ tests/test_create_vrf-test-create-vrf.$(OBJEXT) -tests_test_create_vrf_DEPENDENCIES = $(tests_ldadd) +tests_test_create_vrf_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_vxlan_SOURCES = tests/test-create-vxlan.c tests_test_create_vxlan_OBJECTS = \ tests/test_create_vxlan-test-create-vxlan.$(OBJEXT) -tests_test_create_vxlan_DEPENDENCIES = $(tests_ldadd) +tests_test_create_vxlan_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_create_xfrmi_SOURCES = tests/test-create-xfrmi.c tests_test_create_xfrmi_OBJECTS = \ tests/test_create_xfrmi-test-create-xfrmi.$(OBJEXT) -tests_test_create_xfrmi_DEPENDENCIES = $(tests_ldadd) +tests_test_create_xfrmi_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_delete_link_SOURCES = tests/test-delete-link.c tests_test_delete_link_OBJECTS = \ tests/test_delete_link-test-delete-link.$(OBJEXT) -tests_test_delete_link_DEPENDENCIES = $(tests_ldadd) +tests_test_delete_link_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_genl_SOURCES = tests/test-genl.c tests_test_genl_OBJECTS = tests/test_genl-test-genl.$(OBJEXT) -tests_test_genl_DEPENDENCIES = $(tests_cli_ldadd) +tests_test_genl_DEPENDENCIES = $(am__DEPENDENCIES_4) tests_test_loopback_up_down_SOURCES = tests/test-loopback-up-down.c tests_test_loopback_up_down_OBJECTS = \ tests/test_loopback_up_down-test-loopback-up-down.$(OBJEXT) -tests_test_loopback_up_down_DEPENDENCIES = $(tests_ldadd) +tests_test_loopback_up_down_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_nf_cache_mngr_SOURCES = tests/test-nf-cache-mngr.c tests_test_nf_cache_mngr_OBJECTS = \ tests/test_nf_cache_mngr-test-nf-cache-mngr.$(OBJEXT) -tests_test_nf_cache_mngr_DEPENDENCIES = $(tests_cli_ldadd) +tests_test_nf_cache_mngr_DEPENDENCIES = $(am__DEPENDENCIES_4) tests_test_socket_creation_SOURCES = tests/test-socket-creation.c tests_test_socket_creation_OBJECTS = \ tests/test_socket_creation-test-socket-creation.$(OBJEXT) -tests_test_socket_creation_DEPENDENCIES = $(tests_ldadd) +tests_test_socket_creation_DEPENDENCIES = $(am__DEPENDENCIES_1) tests_test_u32_filter_with_actions_SOURCES = \ tests/test-u32-filter-with-actions.c tests_test_u32_filter_with_actions_OBJECTS = tests/test_u32_filter_with_actions-test-u32-filter-with-actions.$(OBJEXT) -tests_test_u32_filter_with_actions_DEPENDENCIES = $(tests_ldadd) +tests_test_u32_filter_with_actions_DEPENDENCIES = \ + $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -873,6 +904,7 @@ lib/route/$(DEPDIR)/libnl_route_3_la-classid.Plo \ lib/route/$(DEPDIR)/libnl_route_3_la-cls.Plo \ lib/route/$(DEPDIR)/libnl_route_3_la-link.Plo \ + lib/route/$(DEPDIR)/libnl_route_3_la-mdb.Plo \ lib/route/$(DEPDIR)/libnl_route_3_la-neigh.Plo \ lib/route/$(DEPDIR)/libnl_route_3_la-neightbl.Plo \ lib/route/$(DEPDIR)/libnl_route_3_la-netconf.Plo \ @@ -891,6 +923,7 @@ lib/route/$(DEPDIR)/libnl_route_3_la-tc.Plo \ lib/route/act/$(DEPDIR)/libnl_route_3_la-gact.Plo \ lib/route/act/$(DEPDIR)/libnl_route_3_la-mirred.Plo \ + lib/route/act/$(DEPDIR)/libnl_route_3_la-nat.Plo \ lib/route/act/$(DEPDIR)/libnl_route_3_la-skbedit.Plo \ lib/route/act/$(DEPDIR)/libnl_route_3_la-vlan.Plo \ lib/route/cls/$(DEPDIR)/libnl_route_3_la-basic.Plo \ @@ -898,6 +931,7 @@ lib/route/cls/$(DEPDIR)/libnl_route_3_la-ematch.Plo \ lib/route/cls/$(DEPDIR)/libnl_route_3_la-ematch_grammar.Plo \ lib/route/cls/$(DEPDIR)/libnl_route_3_la-ematch_syntax.Plo \ + lib/route/cls/$(DEPDIR)/libnl_route_3_la-flower.Plo \ lib/route/cls/$(DEPDIR)/libnl_route_3_la-fw.Plo \ lib/route/cls/$(DEPDIR)/libnl_route_3_la-mall.Plo \ lib/route/cls/$(DEPDIR)/libnl_route_3_la-police.Plo \ @@ -916,7 +950,9 @@ lib/route/link/$(DEPDIR)/libnl_route_3_la-ifb.Plo \ lib/route/link/$(DEPDIR)/libnl_route_3_la-inet.Plo \ lib/route/link/$(DEPDIR)/libnl_route_3_la-inet6.Plo \ + lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6gre.Plo \ lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6tnl.Plo \ + lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6vti.Plo \ lib/route/link/$(DEPDIR)/libnl_route_3_la-ipgre.Plo \ lib/route/link/$(DEPDIR)/libnl_route_3_la-ipip.Plo \ lib/route/link/$(DEPDIR)/libnl_route_3_la-ipvlan.Plo \ @@ -926,6 +962,7 @@ lib/route/link/$(DEPDIR)/libnl_route_3_la-ppp.Plo \ lib/route/link/$(DEPDIR)/libnl_route_3_la-sit.Plo \ lib/route/link/$(DEPDIR)/libnl_route_3_la-sriov.Plo \ + lib/route/link/$(DEPDIR)/libnl_route_3_la-team.Plo \ lib/route/link/$(DEPDIR)/libnl_route_3_la-veth.Plo \ lib/route/link/$(DEPDIR)/libnl_route_3_la-vlan.Plo \ lib/route/link/$(DEPDIR)/libnl_route_3_la-vrf.Plo \ @@ -1011,10 +1048,13 @@ src/lib/$(DEPDIR)/libnl_cli_3_la-rule.Plo \ src/lib/$(DEPDIR)/libnl_cli_3_la-tc.Plo \ src/lib/$(DEPDIR)/libnl_cli_3_la-utils.Plo \ - tests/$(DEPDIR)/check_all-check-addr.Po \ tests/$(DEPDIR)/check_all-check-all.Po \ - tests/$(DEPDIR)/check_all-check-attr.Po \ - tests/$(DEPDIR)/check_all-check-ematch-tree-clone.Po \ + tests/$(DEPDIR)/check_all-cksuite-all-addr.Po \ + tests/$(DEPDIR)/check_all-cksuite-all-attr.Po \ + tests/$(DEPDIR)/check_all-cksuite-all-ematch-tree-clone.Po \ + tests/$(DEPDIR)/check_all-cksuite-all-netns.Po \ + tests/$(DEPDIR)/check_direct-check-direct.Po \ + tests/$(DEPDIR)/libnl_test_util_la-nl-test-util.Plo \ tests/$(DEPDIR)/test_cache_mngr-test-cache-mngr.Po \ tests/$(DEPDIR)/test_complex_HTB_with_hash_filters-test-complex-HTB-with-hash-filters.Po \ tests/$(DEPDIR)/test_create_bond-test-create-bond.Po \ @@ -1071,7 +1111,8 @@ $(lib_libnl_route_3_la_SOURCES) \ $(nodist_lib_libnl_route_3_la_SOURCES) \ $(lib_libnl_xfrm_3_la_SOURCES) \ - $(src_lib_libnl_cli_3_la_SOURCES) src/genl-ctrl-list.c \ + $(src_lib_libnl_cli_3_la_SOURCES) \ + $(tests_libnl_test_util_la_SOURCES) src/genl-ctrl-list.c \ src/idiag-socket-details.c src/nf-ct-add.c src/nf-ct-events.c \ src/nf-ct-list.c src/nf-exp-add.c src/nf-exp-delete.c \ src/nf-exp-list.c src/nf-log.c src/nf-monitor.c src/nf-queue.c \ @@ -1089,7 +1130,7 @@ src/nl-route-add.c src/nl-route-delete.c src/nl-route-get.c \ src/nl-route-list.c src/nl-rule-list.c src/nl-tctree-list.c \ src/nl-util-addr.c $(tests_check_all_SOURCES) \ - tests/test-cache-mngr.c \ + $(tests_check_direct_SOURCES) tests/test-cache-mngr.c \ tests/test-complex-HTB-with-hash-filters.c \ tests/test-create-bond.c tests/test-create-bridge.c \ tests/test-create-geneve.c tests/test-create-ifb.c \ @@ -1112,7 +1153,8 @@ $(lib_libnl_3_la_SOURCES) $(lib_libnl_genl_3_la_SOURCES) \ $(lib_libnl_idiag_3_la_SOURCES) $(lib_libnl_nf_3_la_SOURCES) \ $(lib_libnl_route_3_la_SOURCES) $(lib_libnl_xfrm_3_la_SOURCES) \ - $(src_lib_libnl_cli_3_la_SOURCES) src/genl-ctrl-list.c \ + $(src_lib_libnl_cli_3_la_SOURCES) \ + $(tests_libnl_test_util_la_SOURCES) src/genl-ctrl-list.c \ src/idiag-socket-details.c src/nf-ct-add.c src/nf-ct-events.c \ src/nf-ct-list.c src/nf-exp-add.c src/nf-exp-delete.c \ src/nf-exp-list.c src/nf-log.c src/nf-monitor.c src/nf-queue.c \ @@ -1130,7 +1172,7 @@ src/nl-route-add.c src/nl-route-delete.c src/nl-route-get.c \ src/nl-route-list.c src/nl-rule-list.c src/nl-tctree-list.c \ src/nl-util-addr.c $(tests_check_all_SOURCES) \ - tests/test-cache-mngr.c \ + $(tests_check_direct_SOURCES) tests/test-cache-mngr.c \ tests/test-complex-HTB-with-hash-filters.c \ tests/test-create-bond.c tests/test-create-bridge.c \ tests/test-create-geneve.c tests/test-create-ifb.c \ @@ -1158,9 +1200,10 @@ include/netlink/cli/addr.h include/netlink/cli/class.h \ include/netlink/cli/cls.h include/netlink/cli/ct.h \ include/netlink/cli/exp.h include/netlink/cli/link.h \ - include/netlink/cli/neigh.h include/netlink/cli/qdisc.h \ - include/netlink/cli/route.h include/netlink/cli/rule.h \ - include/netlink/cli/tc.h include/netlink/cli/utils.h + include/netlink/cli/mdb.h include/netlink/cli/neigh.h \ + include/netlink/cli/qdisc.h include/netlink/cli/route.h \ + include/netlink/cli/rule.h include/netlink/cli/tc.h \ + include/netlink/cli/utils.h HEADERS = $(libnlinclude_netlink_HEADERS) \ $(libnlinclude_netlink_cli_HEADERS) \ $(libnlinclude_netlink_fib_lookup_HEADERS) \ @@ -1191,9 +1234,6 @@ 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 -CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope check recheck am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ @@ -1350,6 +1390,7 @@ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test @@ -1402,6 +1443,8 @@ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -1419,8 +1462,9 @@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -1431,8 +1475,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ FLEX = @FLEX@ GREP = @GREP@ INSTALL = @INSTALL@ @@ -1528,6 +1574,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1542,8 +1589,8 @@ lib/libnl-idiag-3.la lib/libnl-genl-3.la lib/libnl-nf-3.la \ lib/libnl-xfrm-3.la $(am__append_2) noinst_LTLIBRARIES = -check_LTLIBRARIES = $(am__append_1) -check_programs = $(am__append_8) +check_LTLIBRARIES = $(am__append_1) $(am__append_8) +check_programs = $(am__append_9) $(am__append_10) CLEANFILES = $(grammar_files_sources) $(grammar_files_headers) ############################################################################### @@ -1575,7 +1622,7 @@ pkgconfig_DATA = libnl-3.0.pc libnl-genl-3.0.pc libnl-idiag-3.0.pc \ libnl-nf-3.0.pc libnl-route-3.0.pc libnl-xfrm-3.0.pc $(NULL) \ - $(am__append_9) + $(am__append_11) warn_cppflags = \ -Wall \ -Wextra \ @@ -1655,6 +1702,7 @@ include/netlink/route/class.h \ include/netlink/route/classifier.h \ include/netlink/route/link.h \ + include/netlink/route/mdb.h \ include/netlink/route/neighbour.h \ include/netlink/route/neightbl.h \ include/netlink/route/netconf.h \ @@ -1672,6 +1720,7 @@ libnlinclude_netlink_route_act_HEADERS = \ include/netlink/route/act/gact.h \ include/netlink/route/act/mirred.h \ + include/netlink/route/act/nat.h \ include/netlink/route/act/skbedit.h \ include/netlink/route/act/vlan.h \ $(NULL) @@ -1681,6 +1730,7 @@ include/netlink/route/cls/basic.h \ include/netlink/route/cls/cgroup.h \ include/netlink/route/cls/ematch.h \ + include/netlink/route/cls/flower.h \ include/netlink/route/cls/fw.h \ include/netlink/route/cls/matchall.h \ include/netlink/route/cls/police.h \ @@ -1705,7 +1755,9 @@ include/netlink/route/link/inet.h \ include/netlink/route/link/inet6.h \ include/netlink/route/link/info-api.h \ + include/netlink/route/link/ip6gre.h \ include/netlink/route/link/ip6tnl.h \ + include/netlink/route/link/ip6vti.h \ include/netlink/route/link/ipgre.h \ include/netlink/route/link/ipip.h \ include/netlink/route/link/ipvlan.h \ @@ -1716,6 +1768,7 @@ include/netlink/route/link/ppp.h \ include/netlink/route/link/sit.h \ include/netlink/route/link/sriov.h \ + include/netlink/route/link/team.h \ include/netlink/route/link/veth.h \ include/netlink/route/link/vlan.h \ include/netlink/route/link/vrf.h \ @@ -1758,6 +1811,7 @@ @ENABLE_CLI_TRUE@ include/netlink/cli/ct.h \ @ENABLE_CLI_TRUE@ include/netlink/cli/exp.h \ @ENABLE_CLI_TRUE@ include/netlink/cli/link.h \ +@ENABLE_CLI_TRUE@ include/netlink/cli/mdb.h \ @ENABLE_CLI_TRUE@ include/netlink/cli/neigh.h \ @ENABLE_CLI_TRUE@ include/netlink/cli/qdisc.h \ @ENABLE_CLI_TRUE@ include/netlink/cli/route.h \ @@ -1807,6 +1861,7 @@ include/linux-private/linux/socket.h \ include/linux-private/linux/tc_act/tc_gact.h \ include/linux-private/linux/tc_act/tc_mirred.h \ + include/linux-private/linux/tc_act/tc_nat.h \ include/linux-private/linux/tc_act/tc_skbedit.h \ include/linux-private/linux/tc_act/tc_vlan.h \ include/linux-private/linux/tc_ematch/tc_em_meta.h \ @@ -1815,12 +1870,14 @@ include/netlink-private/cache-api.h \ include/netlink-private/genl.h \ include/netlink-private/netlink.h \ + include/netlink-private/nl-auto.h \ include/netlink-private/object-api.h \ include/netlink-private/route/link/api.h \ include/netlink-private/route/link/sriov.h \ include/netlink-private/route/mpls.h \ include/netlink-private/route/nexthop-encap.h \ include/netlink-private/route/tc-api.h \ + include/netlink-private/route/utils.h \ include/netlink-private/socket.h \ include/netlink-private/tc.h \ include/netlink-private/types.h \ @@ -1883,6 +1940,7 @@ lib/route/act.c \ lib/route/act/gact.c \ lib/route/act/mirred.c \ + lib/route/act/nat.c \ lib/route/act/skbedit.c \ lib/route/act/vlan.c \ lib/route/addr.c \ @@ -1897,6 +1955,7 @@ lib/route/cls/ematch/meta.c \ lib/route/cls/ematch/nbyte.c \ lib/route/cls/ematch/text.c \ + lib/route/cls/flower.c \ lib/route/cls/fw.c \ lib/route/cls/mall.c \ lib/route/cls/police.c \ @@ -1911,7 +1970,9 @@ lib/route/link/ifb.c \ lib/route/link/inet.c \ lib/route/link/inet6.c \ + lib/route/link/ip6gre.c \ lib/route/link/ip6tnl.c \ + lib/route/link/ip6vti.c \ lib/route/link/ipgre.c \ lib/route/link/ipip.c \ lib/route/link/ipvlan.c \ @@ -1921,11 +1982,13 @@ lib/route/link/ppp.c \ lib/route/link/sit.c \ lib/route/link/sriov.c \ + lib/route/link/team.c \ lib/route/link/veth.c \ lib/route/link/vlan.c \ lib/route/link/vrf.c \ lib/route/link/vxlan.c \ lib/route/link/xfrmi.c \ + lib/route/mdb.c \ lib/route/neigh.c \ lib/route/neightbl.c \ lib/route/netconf.c \ @@ -2329,7 +2392,23 @@ lib/libnl-3.la \ lib/libnl-nf-3.la \ lib/libnl-genl-3.la \ - lib/libnl-route-3.la + lib/libnl-route-3.la \ + $(NULL) + +tests_libnl_test_util_la_SOURCES = \ + tests/nl-test-util.h \ + tests/nl-test-util.c \ + $(NULL) + +tests_libnl_test_util_la_CPPFLAGS = \ + $(tests_cppflags) \ + $(CHECK_CFLAGS) \ + $(NULL) + +tests_libnl_test_util_la_LIBADD = \ + $(tests_ldadd) \ + $(CHECK_LIBS) \ + $(NULL) tests_test_complex_HTB_with_hash_filters_CPPFLAGS = $(tests_cppflags) tests_test_complex_HTB_with_hash_filters_LDADD = $(tests_ldadd) @@ -2381,7 +2460,8 @@ tests_test_u32_filter_with_actions_LDADD = $(tests_ldadd) tests_cli_ldadd = \ $(tests_ldadd) \ - src/lib/libnl-cli-3.la + src/lib/libnl-cli-3.la \ + $(NULL) tests_test_cache_mngr_CPPFLAGS = $(tests_cppflags) tests_test_cache_mngr_LDADD = $(tests_cli_ldadd) @@ -2390,11 +2470,12 @@ tests_test_nf_cache_mngr_CPPFLAGS = $(tests_cppflags) tests_test_nf_cache_mngr_LDADD = $(tests_cli_ldadd) tests_check_all_SOURCES = \ - tests/check-addr.c \ tests/check-all.c \ - tests/check-attr.c \ - tests/check-ematch-tree-clone.c \ - tests/util.h \ + tests/cksuite-all-addr.c \ + tests/cksuite-all-attr.c \ + tests/cksuite-all-ematch-tree-clone.c \ + tests/cksuite-all-netns.c \ + tests/cksuite-all.h \ $(NULL) tests_check_all_CPPFLAGS = \ @@ -2403,7 +2484,28 @@ tests_check_all_LDADD = \ $(tests_ldadd) \ - $(CHECK_LIBS) + tests/libnl-test-util.la \ + $(CHECK_LIBS) \ + $(NULL) + +tests_check_direct_SOURCES = \ + tests/check-direct.c \ + $(NULL) + +tests_check_direct_CPPFLAGS = \ + $(tests_cppflags) \ + $(CHECK_CFLAGS) \ + $(NULL) + +tests_check_direct_LDFLAGS = \ + -static \ + $(NULL) + +tests_check_direct_LDADD = \ + $(tests_ldadd) \ + tests/libnl-test-util.la \ + $(CHECK_LIBS) \ + $(NULL) ############################################################################### @@ -2421,6 +2523,9 @@ etc/pktloc \ etc/classid + +############################################################################### +.PHONY = check-progs all: all-am .SUFFIXES: @@ -2949,6 +3054,8 @@ lib/route/act/libnl_route_3_la-mirred.lo: \ lib/route/act/$(am__dirstamp) \ lib/route/act/$(DEPDIR)/$(am__dirstamp) +lib/route/act/libnl_route_3_la-nat.lo: lib/route/act/$(am__dirstamp) \ + lib/route/act/$(DEPDIR)/$(am__dirstamp) lib/route/act/libnl_route_3_la-skbedit.lo: \ lib/route/act/$(am__dirstamp) \ lib/route/act/$(DEPDIR)/$(am__dirstamp) @@ -2998,6 +3105,9 @@ lib/route/cls/ematch/libnl_route_3_la-text.lo: \ lib/route/cls/ematch/$(am__dirstamp) \ lib/route/cls/ematch/$(DEPDIR)/$(am__dirstamp) +lib/route/cls/libnl_route_3_la-flower.lo: \ + lib/route/cls/$(am__dirstamp) \ + lib/route/cls/$(DEPDIR)/$(am__dirstamp) lib/route/cls/libnl_route_3_la-fw.lo: lib/route/cls/$(am__dirstamp) \ lib/route/cls/$(DEPDIR)/$(am__dirstamp) lib/route/cls/libnl_route_3_la-mall.lo: lib/route/cls/$(am__dirstamp) \ @@ -3042,9 +3152,15 @@ lib/route/link/libnl_route_3_la-inet6.lo: \ lib/route/link/$(am__dirstamp) \ lib/route/link/$(DEPDIR)/$(am__dirstamp) +lib/route/link/libnl_route_3_la-ip6gre.lo: \ + lib/route/link/$(am__dirstamp) \ + lib/route/link/$(DEPDIR)/$(am__dirstamp) lib/route/link/libnl_route_3_la-ip6tnl.lo: \ lib/route/link/$(am__dirstamp) \ lib/route/link/$(DEPDIR)/$(am__dirstamp) +lib/route/link/libnl_route_3_la-ip6vti.lo: \ + lib/route/link/$(am__dirstamp) \ + lib/route/link/$(DEPDIR)/$(am__dirstamp) lib/route/link/libnl_route_3_la-ipgre.lo: \ lib/route/link/$(am__dirstamp) \ lib/route/link/$(DEPDIR)/$(am__dirstamp) @@ -3072,6 +3188,9 @@ lib/route/link/libnl_route_3_la-sriov.lo: \ lib/route/link/$(am__dirstamp) \ lib/route/link/$(DEPDIR)/$(am__dirstamp) +lib/route/link/libnl_route_3_la-team.lo: \ + lib/route/link/$(am__dirstamp) \ + lib/route/link/$(DEPDIR)/$(am__dirstamp) lib/route/link/libnl_route_3_la-veth.lo: \ lib/route/link/$(am__dirstamp) \ lib/route/link/$(DEPDIR)/$(am__dirstamp) @@ -3087,6 +3206,8 @@ lib/route/link/libnl_route_3_la-xfrmi.lo: \ lib/route/link/$(am__dirstamp) \ lib/route/link/$(DEPDIR)/$(am__dirstamp) +lib/route/libnl_route_3_la-mdb.lo: lib/route/$(am__dirstamp) \ + lib/route/$(DEPDIR)/$(am__dirstamp) lib/route/libnl_route_3_la-neigh.lo: lib/route/$(am__dirstamp) \ lib/route/$(DEPDIR)/$(am__dirstamp) lib/route/libnl_route_3_la-neightbl.lo: lib/route/$(am__dirstamp) \ @@ -3233,6 +3354,17 @@ src/lib/libnl-cli-3.la: $(src_lib_libnl_cli_3_la_OBJECTS) $(src_lib_libnl_cli_3_la_DEPENDENCIES) $(EXTRA_src_lib_libnl_cli_3_la_DEPENDENCIES) src/lib/$(am__dirstamp) $(AM_V_CCLD)$(src_lib_libnl_cli_3_la_LINK) $(am_src_lib_libnl_cli_3_la_rpath) $(src_lib_libnl_cli_3_la_OBJECTS) $(src_lib_libnl_cli_3_la_LIBADD) $(LIBS) +tests/$(am__dirstamp): + @$(MKDIR_P) tests + @: > tests/$(am__dirstamp) +tests/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tests/$(DEPDIR) + @: > tests/$(DEPDIR)/$(am__dirstamp) +tests/libnl_test_util_la-nl-test-util.lo: tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/libnl-test-util.la: $(tests_libnl_test_util_la_OBJECTS) $(tests_libnl_test_util_la_DEPENDENCIES) $(EXTRA_tests_libnl_test_util_la_DEPENDENCIES) tests/$(am__dirstamp) + $(AM_V_CCLD)$(LINK) $(am_tests_libnl_test_util_la_rpath) $(tests_libnl_test_util_la_OBJECTS) $(tests_libnl_test_util_la_LIBADD) $(LIBS) src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) @@ -3521,24 +3653,26 @@ src/nl-util-addr$(EXEEXT): $(src_nl_util_addr_OBJECTS) $(src_nl_util_addr_DEPENDENCIES) $(EXTRA_src_nl_util_addr_DEPENDENCIES) src/$(am__dirstamp) @rm -f src/nl-util-addr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(src_nl_util_addr_OBJECTS) $(src_nl_util_addr_LDADD) $(LIBS) -tests/$(am__dirstamp): - @$(MKDIR_P) tests - @: > tests/$(am__dirstamp) -tests/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/$(DEPDIR) - @: > tests/$(DEPDIR)/$(am__dirstamp) -tests/check_all-check-addr.$(OBJEXT): tests/$(am__dirstamp) \ - tests/$(DEPDIR)/$(am__dirstamp) tests/check_all-check-all.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) -tests/check_all-check-attr.$(OBJEXT): tests/$(am__dirstamp) \ +tests/check_all-cksuite-all-addr.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) -tests/check_all-check-ematch-tree-clone.$(OBJEXT): \ +tests/check_all-cksuite-all-attr.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +tests/check_all-cksuite-all-ematch-tree-clone.$(OBJEXT): \ tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp) +tests/check_all-cksuite-all-netns.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) tests/check-all$(EXEEXT): $(tests_check_all_OBJECTS) $(tests_check_all_DEPENDENCIES) $(EXTRA_tests_check_all_DEPENDENCIES) tests/$(am__dirstamp) @rm -f tests/check-all$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_check_all_OBJECTS) $(tests_check_all_LDADD) $(LIBS) +tests/check_direct-check-direct.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/check-direct$(EXEEXT): $(tests_check_direct_OBJECTS) $(tests_check_direct_DEPENDENCIES) $(EXTRA_tests_check_direct_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/check-direct$(EXEEXT) + $(AM_V_CCLD)$(tests_check_direct_LINK) $(tests_check_direct_OBJECTS) $(tests_check_direct_LDADD) $(LIBS) tests/test_cache_mngr-test-cache-mngr.$(OBJEXT): \ tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp) @@ -3736,6 +3870,7 @@ -rm -f src/lib/*.$(OBJEXT) -rm -f src/lib/*.lo -rm -f tests/*.$(OBJEXT) + -rm -f tests/*.lo distclean-compile: -rm -f *.tab.c @@ -3798,6 +3933,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@lib/route/$(DEPDIR)/libnl_route_3_la-classid.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/$(DEPDIR)/libnl_route_3_la-cls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/$(DEPDIR)/libnl_route_3_la-link.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@lib/route/$(DEPDIR)/libnl_route_3_la-mdb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/$(DEPDIR)/libnl_route_3_la-neigh.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/$(DEPDIR)/libnl_route_3_la-neightbl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/$(DEPDIR)/libnl_route_3_la-netconf.Plo@am__quote@ # am--include-marker @@ -3816,6 +3952,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@lib/route/$(DEPDIR)/libnl_route_3_la-tc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/act/$(DEPDIR)/libnl_route_3_la-gact.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/act/$(DEPDIR)/libnl_route_3_la-mirred.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@lib/route/act/$(DEPDIR)/libnl_route_3_la-nat.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/act/$(DEPDIR)/libnl_route_3_la-skbedit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/act/$(DEPDIR)/libnl_route_3_la-vlan.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/cls/$(DEPDIR)/libnl_route_3_la-basic.Plo@am__quote@ # am--include-marker @@ -3823,6 +3960,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@lib/route/cls/$(DEPDIR)/libnl_route_3_la-ematch.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/cls/$(DEPDIR)/libnl_route_3_la-ematch_grammar.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/cls/$(DEPDIR)/libnl_route_3_la-ematch_syntax.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@lib/route/cls/$(DEPDIR)/libnl_route_3_la-flower.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/cls/$(DEPDIR)/libnl_route_3_la-fw.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/cls/$(DEPDIR)/libnl_route_3_la-mall.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/cls/$(DEPDIR)/libnl_route_3_la-police.Plo@am__quote@ # am--include-marker @@ -3841,7 +3979,9 @@ @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-ifb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-inet.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-inet6.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6gre.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6tnl.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6vti.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-ipgre.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-ipip.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-ipvlan.Plo@am__quote@ # am--include-marker @@ -3851,6 +3991,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-ppp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-sit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-sriov.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-team.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-veth.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-vlan.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@lib/route/link/$(DEPDIR)/libnl_route_3_la-vrf.Plo@am__quote@ # am--include-marker @@ -3936,10 +4077,13 @@ @AMDEP_TRUE@@am__include@ @am__quote@src/lib/$(DEPDIR)/libnl_cli_3_la-rule.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/lib/$(DEPDIR)/libnl_cli_3_la-tc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/lib/$(DEPDIR)/libnl_cli_3_la-utils.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_all-check-addr.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_all-check-all.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_all-check-attr.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_all-check-ematch-tree-clone.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_all-cksuite-all-addr.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_all-cksuite-all-attr.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_all-cksuite-all-ematch-tree-clone.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_all-cksuite-all-netns.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/check_direct-check-direct.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/libnl_test_util_la-nl-test-util.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_cache_mngr-test-cache-mngr.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_complex_HTB_with_hash_filters-test-complex-HTB-with-hash-filters.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_create_bond-test-create-bond.Po@am__quote@ # am--include-marker @@ -4383,6 +4527,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/route/act/libnl_route_3_la-mirred.lo `test -f 'lib/route/act/mirred.c' || echo '$(srcdir)/'`lib/route/act/mirred.c +lib/route/act/libnl_route_3_la-nat.lo: lib/route/act/nat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/route/act/libnl_route_3_la-nat.lo -MD -MP -MF lib/route/act/$(DEPDIR)/libnl_route_3_la-nat.Tpo -c -o lib/route/act/libnl_route_3_la-nat.lo `test -f 'lib/route/act/nat.c' || echo '$(srcdir)/'`lib/route/act/nat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/route/act/$(DEPDIR)/libnl_route_3_la-nat.Tpo lib/route/act/$(DEPDIR)/libnl_route_3_la-nat.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/route/act/nat.c' object='lib/route/act/libnl_route_3_la-nat.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/route/act/libnl_route_3_la-nat.lo `test -f 'lib/route/act/nat.c' || echo '$(srcdir)/'`lib/route/act/nat.c + lib/route/act/libnl_route_3_la-skbedit.lo: lib/route/act/skbedit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/route/act/libnl_route_3_la-skbedit.lo -MD -MP -MF lib/route/act/$(DEPDIR)/libnl_route_3_la-skbedit.Tpo -c -o lib/route/act/libnl_route_3_la-skbedit.lo `test -f 'lib/route/act/skbedit.c' || echo '$(srcdir)/'`lib/route/act/skbedit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/route/act/$(DEPDIR)/libnl_route_3_la-skbedit.Tpo lib/route/act/$(DEPDIR)/libnl_route_3_la-skbedit.Plo @@ -4481,6 +4632,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/route/cls/ematch/libnl_route_3_la-text.lo `test -f 'lib/route/cls/ematch/text.c' || echo '$(srcdir)/'`lib/route/cls/ematch/text.c +lib/route/cls/libnl_route_3_la-flower.lo: lib/route/cls/flower.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/route/cls/libnl_route_3_la-flower.lo -MD -MP -MF lib/route/cls/$(DEPDIR)/libnl_route_3_la-flower.Tpo -c -o lib/route/cls/libnl_route_3_la-flower.lo `test -f 'lib/route/cls/flower.c' || echo '$(srcdir)/'`lib/route/cls/flower.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/route/cls/$(DEPDIR)/libnl_route_3_la-flower.Tpo lib/route/cls/$(DEPDIR)/libnl_route_3_la-flower.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/route/cls/flower.c' object='lib/route/cls/libnl_route_3_la-flower.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/route/cls/libnl_route_3_la-flower.lo `test -f 'lib/route/cls/flower.c' || echo '$(srcdir)/'`lib/route/cls/flower.c + lib/route/cls/libnl_route_3_la-fw.lo: lib/route/cls/fw.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/route/cls/libnl_route_3_la-fw.lo -MD -MP -MF lib/route/cls/$(DEPDIR)/libnl_route_3_la-fw.Tpo -c -o lib/route/cls/libnl_route_3_la-fw.lo `test -f 'lib/route/cls/fw.c' || echo '$(srcdir)/'`lib/route/cls/fw.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/route/cls/$(DEPDIR)/libnl_route_3_la-fw.Tpo lib/route/cls/$(DEPDIR)/libnl_route_3_la-fw.Plo @@ -4579,6 +4737,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/route/link/libnl_route_3_la-inet6.lo `test -f 'lib/route/link/inet6.c' || echo '$(srcdir)/'`lib/route/link/inet6.c +lib/route/link/libnl_route_3_la-ip6gre.lo: lib/route/link/ip6gre.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/route/link/libnl_route_3_la-ip6gre.lo -MD -MP -MF lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6gre.Tpo -c -o lib/route/link/libnl_route_3_la-ip6gre.lo `test -f 'lib/route/link/ip6gre.c' || echo '$(srcdir)/'`lib/route/link/ip6gre.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6gre.Tpo lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6gre.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/route/link/ip6gre.c' object='lib/route/link/libnl_route_3_la-ip6gre.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/route/link/libnl_route_3_la-ip6gre.lo `test -f 'lib/route/link/ip6gre.c' || echo '$(srcdir)/'`lib/route/link/ip6gre.c + lib/route/link/libnl_route_3_la-ip6tnl.lo: lib/route/link/ip6tnl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/route/link/libnl_route_3_la-ip6tnl.lo -MD -MP -MF lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6tnl.Tpo -c -o lib/route/link/libnl_route_3_la-ip6tnl.lo `test -f 'lib/route/link/ip6tnl.c' || echo '$(srcdir)/'`lib/route/link/ip6tnl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6tnl.Tpo lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6tnl.Plo @@ -4586,6 +4751,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/route/link/libnl_route_3_la-ip6tnl.lo `test -f 'lib/route/link/ip6tnl.c' || echo '$(srcdir)/'`lib/route/link/ip6tnl.c +lib/route/link/libnl_route_3_la-ip6vti.lo: lib/route/link/ip6vti.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/route/link/libnl_route_3_la-ip6vti.lo -MD -MP -MF lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6vti.Tpo -c -o lib/route/link/libnl_route_3_la-ip6vti.lo `test -f 'lib/route/link/ip6vti.c' || echo '$(srcdir)/'`lib/route/link/ip6vti.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6vti.Tpo lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6vti.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/route/link/ip6vti.c' object='lib/route/link/libnl_route_3_la-ip6vti.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/route/link/libnl_route_3_la-ip6vti.lo `test -f 'lib/route/link/ip6vti.c' || echo '$(srcdir)/'`lib/route/link/ip6vti.c + lib/route/link/libnl_route_3_la-ipgre.lo: lib/route/link/ipgre.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/route/link/libnl_route_3_la-ipgre.lo -MD -MP -MF lib/route/link/$(DEPDIR)/libnl_route_3_la-ipgre.Tpo -c -o lib/route/link/libnl_route_3_la-ipgre.lo `test -f 'lib/route/link/ipgre.c' || echo '$(srcdir)/'`lib/route/link/ipgre.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/route/link/$(DEPDIR)/libnl_route_3_la-ipgre.Tpo lib/route/link/$(DEPDIR)/libnl_route_3_la-ipgre.Plo @@ -4649,6 +4821,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/route/link/libnl_route_3_la-sriov.lo `test -f 'lib/route/link/sriov.c' || echo '$(srcdir)/'`lib/route/link/sriov.c +lib/route/link/libnl_route_3_la-team.lo: lib/route/link/team.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/route/link/libnl_route_3_la-team.lo -MD -MP -MF lib/route/link/$(DEPDIR)/libnl_route_3_la-team.Tpo -c -o lib/route/link/libnl_route_3_la-team.lo `test -f 'lib/route/link/team.c' || echo '$(srcdir)/'`lib/route/link/team.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/route/link/$(DEPDIR)/libnl_route_3_la-team.Tpo lib/route/link/$(DEPDIR)/libnl_route_3_la-team.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/route/link/team.c' object='lib/route/link/libnl_route_3_la-team.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/route/link/libnl_route_3_la-team.lo `test -f 'lib/route/link/team.c' || echo '$(srcdir)/'`lib/route/link/team.c + lib/route/link/libnl_route_3_la-veth.lo: lib/route/link/veth.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/route/link/libnl_route_3_la-veth.lo -MD -MP -MF lib/route/link/$(DEPDIR)/libnl_route_3_la-veth.Tpo -c -o lib/route/link/libnl_route_3_la-veth.lo `test -f 'lib/route/link/veth.c' || echo '$(srcdir)/'`lib/route/link/veth.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/route/link/$(DEPDIR)/libnl_route_3_la-veth.Tpo lib/route/link/$(DEPDIR)/libnl_route_3_la-veth.Plo @@ -4684,6 +4863,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/route/link/libnl_route_3_la-xfrmi.lo `test -f 'lib/route/link/xfrmi.c' || echo '$(srcdir)/'`lib/route/link/xfrmi.c +lib/route/libnl_route_3_la-mdb.lo: lib/route/mdb.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/route/libnl_route_3_la-mdb.lo -MD -MP -MF lib/route/$(DEPDIR)/libnl_route_3_la-mdb.Tpo -c -o lib/route/libnl_route_3_la-mdb.lo `test -f 'lib/route/mdb.c' || echo '$(srcdir)/'`lib/route/mdb.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/route/$(DEPDIR)/libnl_route_3_la-mdb.Tpo lib/route/$(DEPDIR)/libnl_route_3_la-mdb.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/route/mdb.c' object='lib/route/libnl_route_3_la-mdb.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/route/libnl_route_3_la-mdb.lo `test -f 'lib/route/mdb.c' || echo '$(srcdir)/'`lib/route/mdb.c + lib/route/libnl_route_3_la-neigh.lo: lib/route/neigh.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libnl_route_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/route/libnl_route_3_la-neigh.lo -MD -MP -MF lib/route/$(DEPDIR)/libnl_route_3_la-neigh.Tpo -c -o lib/route/libnl_route_3_la-neigh.lo `test -f 'lib/route/neigh.c' || echo '$(srcdir)/'`lib/route/neigh.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/route/$(DEPDIR)/libnl_route_3_la-neigh.Tpo lib/route/$(DEPDIR)/libnl_route_3_la-neigh.Plo @@ -5041,6 +5227,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_lib_libnl_cli_3_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/lib/libnl_cli_3_la-utils.lo `test -f 'src/lib/utils.c' || echo '$(srcdir)/'`src/lib/utils.c +tests/libnl_test_util_la-nl-test-util.lo: tests/nl-test-util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libnl_test_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libnl_test_util_la-nl-test-util.lo -MD -MP -MF tests/$(DEPDIR)/libnl_test_util_la-nl-test-util.Tpo -c -o tests/libnl_test_util_la-nl-test-util.lo `test -f 'tests/nl-test-util.c' || echo '$(srcdir)/'`tests/nl-test-util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/libnl_test_util_la-nl-test-util.Tpo tests/$(DEPDIR)/libnl_test_util_la-nl-test-util.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/nl-test-util.c' object='tests/libnl_test_util_la-nl-test-util.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libnl_test_util_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libnl_test_util_la-nl-test-util.lo `test -f 'tests/nl-test-util.c' || echo '$(srcdir)/'`tests/nl-test-util.c + src/genl_ctrl_list-genl-ctrl-list.o: src/genl-ctrl-list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_genl_ctrl_list_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/genl_ctrl_list-genl-ctrl-list.o -MD -MP -MF src/$(DEPDIR)/genl_ctrl_list-genl-ctrl-list.Tpo -c -o src/genl_ctrl_list-genl-ctrl-list.o `test -f 'src/genl-ctrl-list.c' || echo '$(srcdir)/'`src/genl-ctrl-list.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/genl_ctrl_list-genl-ctrl-list.Tpo src/$(DEPDIR)/genl_ctrl_list-genl-ctrl-list.Po @@ -5699,20 +5892,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_nl_util_addr_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/nl_util_addr-nl-util-addr.obj `if test -f 'src/nl-util-addr.c'; then $(CYGPATH_W) 'src/nl-util-addr.c'; else $(CYGPATH_W) '$(srcdir)/src/nl-util-addr.c'; fi` -tests/check_all-check-addr.o: tests/check-addr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-check-addr.o -MD -MP -MF tests/$(DEPDIR)/check_all-check-addr.Tpo -c -o tests/check_all-check-addr.o `test -f 'tests/check-addr.c' || echo '$(srcdir)/'`tests/check-addr.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-check-addr.Tpo tests/$(DEPDIR)/check_all-check-addr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check-addr.c' object='tests/check_all-check-addr.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-check-addr.o `test -f 'tests/check-addr.c' || echo '$(srcdir)/'`tests/check-addr.c - -tests/check_all-check-addr.obj: tests/check-addr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-check-addr.obj -MD -MP -MF tests/$(DEPDIR)/check_all-check-addr.Tpo -c -o tests/check_all-check-addr.obj `if test -f 'tests/check-addr.c'; then $(CYGPATH_W) 'tests/check-addr.c'; else $(CYGPATH_W) '$(srcdir)/tests/check-addr.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-check-addr.Tpo tests/$(DEPDIR)/check_all-check-addr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check-addr.c' object='tests/check_all-check-addr.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-check-addr.obj `if test -f 'tests/check-addr.c'; then $(CYGPATH_W) 'tests/check-addr.c'; else $(CYGPATH_W) '$(srcdir)/tests/check-addr.c'; fi` - tests/check_all-check-all.o: tests/check-all.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-check-all.o -MD -MP -MF tests/$(DEPDIR)/check_all-check-all.Tpo -c -o tests/check_all-check-all.o `test -f 'tests/check-all.c' || echo '$(srcdir)/'`tests/check-all.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-check-all.Tpo tests/$(DEPDIR)/check_all-check-all.Po @@ -5727,33 +5906,75 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-check-all.obj `if test -f 'tests/check-all.c'; then $(CYGPATH_W) 'tests/check-all.c'; else $(CYGPATH_W) '$(srcdir)/tests/check-all.c'; fi` -tests/check_all-check-attr.o: tests/check-attr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-check-attr.o -MD -MP -MF tests/$(DEPDIR)/check_all-check-attr.Tpo -c -o tests/check_all-check-attr.o `test -f 'tests/check-attr.c' || echo '$(srcdir)/'`tests/check-attr.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-check-attr.Tpo tests/$(DEPDIR)/check_all-check-attr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check-attr.c' object='tests/check_all-check-attr.o' libtool=no @AMDEPBACKSLASH@ +tests/check_all-cksuite-all-addr.o: tests/cksuite-all-addr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-cksuite-all-addr.o -MD -MP -MF tests/$(DEPDIR)/check_all-cksuite-all-addr.Tpo -c -o tests/check_all-cksuite-all-addr.o `test -f 'tests/cksuite-all-addr.c' || echo '$(srcdir)/'`tests/cksuite-all-addr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-cksuite-all-addr.Tpo tests/$(DEPDIR)/check_all-cksuite-all-addr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/cksuite-all-addr.c' object='tests/check_all-cksuite-all-addr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-cksuite-all-addr.o `test -f 'tests/cksuite-all-addr.c' || echo '$(srcdir)/'`tests/cksuite-all-addr.c + +tests/check_all-cksuite-all-addr.obj: tests/cksuite-all-addr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-cksuite-all-addr.obj -MD -MP -MF tests/$(DEPDIR)/check_all-cksuite-all-addr.Tpo -c -o tests/check_all-cksuite-all-addr.obj `if test -f 'tests/cksuite-all-addr.c'; then $(CYGPATH_W) 'tests/cksuite-all-addr.c'; else $(CYGPATH_W) '$(srcdir)/tests/cksuite-all-addr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-cksuite-all-addr.Tpo tests/$(DEPDIR)/check_all-cksuite-all-addr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/cksuite-all-addr.c' object='tests/check_all-cksuite-all-addr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-check-attr.o `test -f 'tests/check-attr.c' || echo '$(srcdir)/'`tests/check-attr.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-cksuite-all-addr.obj `if test -f 'tests/cksuite-all-addr.c'; then $(CYGPATH_W) 'tests/cksuite-all-addr.c'; else $(CYGPATH_W) '$(srcdir)/tests/cksuite-all-addr.c'; fi` -tests/check_all-check-attr.obj: tests/check-attr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-check-attr.obj -MD -MP -MF tests/$(DEPDIR)/check_all-check-attr.Tpo -c -o tests/check_all-check-attr.obj `if test -f 'tests/check-attr.c'; then $(CYGPATH_W) 'tests/check-attr.c'; else $(CYGPATH_W) '$(srcdir)/tests/check-attr.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-check-attr.Tpo tests/$(DEPDIR)/check_all-check-attr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check-attr.c' object='tests/check_all-check-attr.obj' libtool=no @AMDEPBACKSLASH@ +tests/check_all-cksuite-all-attr.o: tests/cksuite-all-attr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-cksuite-all-attr.o -MD -MP -MF tests/$(DEPDIR)/check_all-cksuite-all-attr.Tpo -c -o tests/check_all-cksuite-all-attr.o `test -f 'tests/cksuite-all-attr.c' || echo '$(srcdir)/'`tests/cksuite-all-attr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-cksuite-all-attr.Tpo tests/$(DEPDIR)/check_all-cksuite-all-attr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/cksuite-all-attr.c' object='tests/check_all-cksuite-all-attr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-check-attr.obj `if test -f 'tests/check-attr.c'; then $(CYGPATH_W) 'tests/check-attr.c'; else $(CYGPATH_W) '$(srcdir)/tests/check-attr.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-cksuite-all-attr.o `test -f 'tests/cksuite-all-attr.c' || echo '$(srcdir)/'`tests/cksuite-all-attr.c -tests/check_all-check-ematch-tree-clone.o: tests/check-ematch-tree-clone.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-check-ematch-tree-clone.o -MD -MP -MF tests/$(DEPDIR)/check_all-check-ematch-tree-clone.Tpo -c -o tests/check_all-check-ematch-tree-clone.o `test -f 'tests/check-ematch-tree-clone.c' || echo '$(srcdir)/'`tests/check-ematch-tree-clone.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-check-ematch-tree-clone.Tpo tests/$(DEPDIR)/check_all-check-ematch-tree-clone.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check-ematch-tree-clone.c' object='tests/check_all-check-ematch-tree-clone.o' libtool=no @AMDEPBACKSLASH@ +tests/check_all-cksuite-all-attr.obj: tests/cksuite-all-attr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-cksuite-all-attr.obj -MD -MP -MF tests/$(DEPDIR)/check_all-cksuite-all-attr.Tpo -c -o tests/check_all-cksuite-all-attr.obj `if test -f 'tests/cksuite-all-attr.c'; then $(CYGPATH_W) 'tests/cksuite-all-attr.c'; else $(CYGPATH_W) '$(srcdir)/tests/cksuite-all-attr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-cksuite-all-attr.Tpo tests/$(DEPDIR)/check_all-cksuite-all-attr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/cksuite-all-attr.c' object='tests/check_all-cksuite-all-attr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-check-ematch-tree-clone.o `test -f 'tests/check-ematch-tree-clone.c' || echo '$(srcdir)/'`tests/check-ematch-tree-clone.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-cksuite-all-attr.obj `if test -f 'tests/cksuite-all-attr.c'; then $(CYGPATH_W) 'tests/cksuite-all-attr.c'; else $(CYGPATH_W) '$(srcdir)/tests/cksuite-all-attr.c'; fi` -tests/check_all-check-ematch-tree-clone.obj: tests/check-ematch-tree-clone.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-check-ematch-tree-clone.obj -MD -MP -MF tests/$(DEPDIR)/check_all-check-ematch-tree-clone.Tpo -c -o tests/check_all-check-ematch-tree-clone.obj `if test -f 'tests/check-ematch-tree-clone.c'; then $(CYGPATH_W) 'tests/check-ematch-tree-clone.c'; else $(CYGPATH_W) '$(srcdir)/tests/check-ematch-tree-clone.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-check-ematch-tree-clone.Tpo tests/$(DEPDIR)/check_all-check-ematch-tree-clone.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check-ematch-tree-clone.c' object='tests/check_all-check-ematch-tree-clone.obj' libtool=no @AMDEPBACKSLASH@ +tests/check_all-cksuite-all-ematch-tree-clone.o: tests/cksuite-all-ematch-tree-clone.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-cksuite-all-ematch-tree-clone.o -MD -MP -MF tests/$(DEPDIR)/check_all-cksuite-all-ematch-tree-clone.Tpo -c -o tests/check_all-cksuite-all-ematch-tree-clone.o `test -f 'tests/cksuite-all-ematch-tree-clone.c' || echo '$(srcdir)/'`tests/cksuite-all-ematch-tree-clone.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-cksuite-all-ematch-tree-clone.Tpo tests/$(DEPDIR)/check_all-cksuite-all-ematch-tree-clone.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/cksuite-all-ematch-tree-clone.c' object='tests/check_all-cksuite-all-ematch-tree-clone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-check-ematch-tree-clone.obj `if test -f 'tests/check-ematch-tree-clone.c'; then $(CYGPATH_W) 'tests/check-ematch-tree-clone.c'; else $(CYGPATH_W) '$(srcdir)/tests/check-ematch-tree-clone.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-cksuite-all-ematch-tree-clone.o `test -f 'tests/cksuite-all-ematch-tree-clone.c' || echo '$(srcdir)/'`tests/cksuite-all-ematch-tree-clone.c + +tests/check_all-cksuite-all-ematch-tree-clone.obj: tests/cksuite-all-ematch-tree-clone.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-cksuite-all-ematch-tree-clone.obj -MD -MP -MF tests/$(DEPDIR)/check_all-cksuite-all-ematch-tree-clone.Tpo -c -o tests/check_all-cksuite-all-ematch-tree-clone.obj `if test -f 'tests/cksuite-all-ematch-tree-clone.c'; then $(CYGPATH_W) 'tests/cksuite-all-ematch-tree-clone.c'; else $(CYGPATH_W) '$(srcdir)/tests/cksuite-all-ematch-tree-clone.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-cksuite-all-ematch-tree-clone.Tpo tests/$(DEPDIR)/check_all-cksuite-all-ematch-tree-clone.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/cksuite-all-ematch-tree-clone.c' object='tests/check_all-cksuite-all-ematch-tree-clone.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-cksuite-all-ematch-tree-clone.obj `if test -f 'tests/cksuite-all-ematch-tree-clone.c'; then $(CYGPATH_W) 'tests/cksuite-all-ematch-tree-clone.c'; else $(CYGPATH_W) '$(srcdir)/tests/cksuite-all-ematch-tree-clone.c'; fi` + +tests/check_all-cksuite-all-netns.o: tests/cksuite-all-netns.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-cksuite-all-netns.o -MD -MP -MF tests/$(DEPDIR)/check_all-cksuite-all-netns.Tpo -c -o tests/check_all-cksuite-all-netns.o `test -f 'tests/cksuite-all-netns.c' || echo '$(srcdir)/'`tests/cksuite-all-netns.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-cksuite-all-netns.Tpo tests/$(DEPDIR)/check_all-cksuite-all-netns.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/cksuite-all-netns.c' object='tests/check_all-cksuite-all-netns.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-cksuite-all-netns.o `test -f 'tests/cksuite-all-netns.c' || echo '$(srcdir)/'`tests/cksuite-all-netns.c + +tests/check_all-cksuite-all-netns.obj: tests/cksuite-all-netns.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_all-cksuite-all-netns.obj -MD -MP -MF tests/$(DEPDIR)/check_all-cksuite-all-netns.Tpo -c -o tests/check_all-cksuite-all-netns.obj `if test -f 'tests/cksuite-all-netns.c'; then $(CYGPATH_W) 'tests/cksuite-all-netns.c'; else $(CYGPATH_W) '$(srcdir)/tests/cksuite-all-netns.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_all-cksuite-all-netns.Tpo tests/$(DEPDIR)/check_all-cksuite-all-netns.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/cksuite-all-netns.c' object='tests/check_all-cksuite-all-netns.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_all_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_all-cksuite-all-netns.obj `if test -f 'tests/cksuite-all-netns.c'; then $(CYGPATH_W) 'tests/cksuite-all-netns.c'; else $(CYGPATH_W) '$(srcdir)/tests/cksuite-all-netns.c'; fi` + +tests/check_direct-check-direct.o: tests/check-direct.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_direct_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_direct-check-direct.o -MD -MP -MF tests/$(DEPDIR)/check_direct-check-direct.Tpo -c -o tests/check_direct-check-direct.o `test -f 'tests/check-direct.c' || echo '$(srcdir)/'`tests/check-direct.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_direct-check-direct.Tpo tests/$(DEPDIR)/check_direct-check-direct.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check-direct.c' object='tests/check_direct-check-direct.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_direct_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_direct-check-direct.o `test -f 'tests/check-direct.c' || echo '$(srcdir)/'`tests/check-direct.c + +tests/check_direct-check-direct.obj: tests/check-direct.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_direct_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/check_direct-check-direct.obj -MD -MP -MF tests/$(DEPDIR)/check_direct-check-direct.Tpo -c -o tests/check_direct-check-direct.obj `if test -f 'tests/check-direct.c'; then $(CYGPATH_W) 'tests/check-direct.c'; else $(CYGPATH_W) '$(srcdir)/tests/check-direct.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/check_direct-check-direct.Tpo tests/$(DEPDIR)/check_direct-check-direct.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check-direct.c' object='tests/check_direct-check-direct.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_direct_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/check_direct-check-direct.obj `if test -f 'tests/check-direct.c'; then $(CYGPATH_W) 'tests/check-direct.c'; else $(CYGPATH_W) '$(srcdir)/tests/check-direct.c'; fi` tests/test_cache_mngr-test-cache-mngr.o: tests/test-cache-mngr.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_test_cache_mngr_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/test_cache_mngr-test-cache-mngr.o -MD -MP -MF tests/$(DEPDIR)/test_cache_mngr-test-cache-mngr.Tpo -c -o tests/test_cache_mngr-test-cache-mngr.o `test -f 'tests/test-cache-mngr.c' || echo '$(srcdir)/'`tests/test-cache-mngr.c @@ -6681,7 +6902,7 @@ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -6722,6 +6943,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/check-direct.log: tests/check-direct$(EXEEXT) + @p='tests/check-direct$(EXEEXT)'; \ + b='tests/check-direct'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ @@ -6736,7 +6964,6 @@ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -6795,6 +7022,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -6837,6 +7068,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -6852,7 +7085,7 @@ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -6910,6 +7143,16 @@ all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(MANS) $(DATA) $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES +install-checkPROGRAMS: install-libLTLIBRARIES + +install-sbinPROGRAMS: install-libLTLIBRARIES + +install-checkLTLIBRARIES: install-libLTLIBRARIES + +install-pkglibclsLTLIBRARIES: install-libLTLIBRARIES + +install-pkglibqdiscLTLIBRARIES: install-libLTLIBRARIES + installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkglib_clsdir)" "$(DESTDIR)$(pkglib_qdiscdir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgsysconfdir)" "$(DESTDIR)$(libnlinclude_netlinkdir)" "$(DESTDIR)$(libnlinclude_netlink_clidir)" "$(DESTDIR)$(libnlinclude_netlink_fib_lookupdir)" "$(DESTDIR)$(libnlinclude_netlink_genldir)" "$(DESTDIR)$(libnlinclude_netlink_idiagdir)" "$(DESTDIR)$(libnlinclude_netlink_netfilterdir)" "$(DESTDIR)$(libnlinclude_netlink_routedir)" "$(DESTDIR)$(libnlinclude_netlink_route_actdir)" "$(DESTDIR)$(libnlinclude_netlink_route_clsdir)" "$(DESTDIR)$(libnlinclude_netlink_route_cls_ematchdir)" "$(DESTDIR)$(libnlinclude_netlink_route_linkdir)" "$(DESTDIR)$(libnlinclude_netlink_route_qdiscdir)" "$(DESTDIR)$(libnlinclude_netlink_xfrmdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -7050,6 +7293,7 @@ -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-classid.Plo -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-cls.Plo -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-link.Plo + -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-mdb.Plo -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-neigh.Plo -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-neightbl.Plo -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-netconf.Plo @@ -7068,6 +7312,7 @@ -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-tc.Plo -rm -f lib/route/act/$(DEPDIR)/libnl_route_3_la-gact.Plo -rm -f lib/route/act/$(DEPDIR)/libnl_route_3_la-mirred.Plo + -rm -f lib/route/act/$(DEPDIR)/libnl_route_3_la-nat.Plo -rm -f lib/route/act/$(DEPDIR)/libnl_route_3_la-skbedit.Plo -rm -f lib/route/act/$(DEPDIR)/libnl_route_3_la-vlan.Plo -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-basic.Plo @@ -7075,6 +7320,7 @@ -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-ematch.Plo -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-ematch_grammar.Plo -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-ematch_syntax.Plo + -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-flower.Plo -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-fw.Plo -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-mall.Plo -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-police.Plo @@ -7093,7 +7339,9 @@ -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ifb.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-inet.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-inet6.Plo + -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6gre.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6tnl.Plo + -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6vti.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ipgre.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ipip.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ipvlan.Plo @@ -7103,6 +7351,7 @@ -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ppp.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-sit.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-sriov.Plo + -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-team.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-veth.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-vlan.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-vrf.Plo @@ -7188,10 +7437,13 @@ -rm -f src/lib/$(DEPDIR)/libnl_cli_3_la-rule.Plo -rm -f src/lib/$(DEPDIR)/libnl_cli_3_la-tc.Plo -rm -f src/lib/$(DEPDIR)/libnl_cli_3_la-utils.Plo - -rm -f tests/$(DEPDIR)/check_all-check-addr.Po -rm -f tests/$(DEPDIR)/check_all-check-all.Po - -rm -f tests/$(DEPDIR)/check_all-check-attr.Po - -rm -f tests/$(DEPDIR)/check_all-check-ematch-tree-clone.Po + -rm -f tests/$(DEPDIR)/check_all-cksuite-all-addr.Po + -rm -f tests/$(DEPDIR)/check_all-cksuite-all-attr.Po + -rm -f tests/$(DEPDIR)/check_all-cksuite-all-ematch-tree-clone.Po + -rm -f tests/$(DEPDIR)/check_all-cksuite-all-netns.Po + -rm -f tests/$(DEPDIR)/check_direct-check-direct.Po + -rm -f tests/$(DEPDIR)/libnl_test_util_la-nl-test-util.Plo -rm -f tests/$(DEPDIR)/test_cache_mngr-test-cache-mngr.Po -rm -f tests/$(DEPDIR)/test_complex_HTB_with_hash_filters-test-complex-HTB-with-hash-filters.Po -rm -f tests/$(DEPDIR)/test_create_bond-test-create-bond.Po @@ -7339,6 +7591,7 @@ -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-classid.Plo -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-cls.Plo -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-link.Plo + -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-mdb.Plo -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-neigh.Plo -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-neightbl.Plo -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-netconf.Plo @@ -7357,6 +7610,7 @@ -rm -f lib/route/$(DEPDIR)/libnl_route_3_la-tc.Plo -rm -f lib/route/act/$(DEPDIR)/libnl_route_3_la-gact.Plo -rm -f lib/route/act/$(DEPDIR)/libnl_route_3_la-mirred.Plo + -rm -f lib/route/act/$(DEPDIR)/libnl_route_3_la-nat.Plo -rm -f lib/route/act/$(DEPDIR)/libnl_route_3_la-skbedit.Plo -rm -f lib/route/act/$(DEPDIR)/libnl_route_3_la-vlan.Plo -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-basic.Plo @@ -7364,6 +7618,7 @@ -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-ematch.Plo -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-ematch_grammar.Plo -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-ematch_syntax.Plo + -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-flower.Plo -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-fw.Plo -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-mall.Plo -rm -f lib/route/cls/$(DEPDIR)/libnl_route_3_la-police.Plo @@ -7382,7 +7637,9 @@ -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ifb.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-inet.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-inet6.Plo + -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6gre.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6tnl.Plo + -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ip6vti.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ipgre.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ipip.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ipvlan.Plo @@ -7392,6 +7649,7 @@ -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-ppp.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-sit.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-sriov.Plo + -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-team.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-veth.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-vlan.Plo -rm -f lib/route/link/$(DEPDIR)/libnl_route_3_la-vrf.Plo @@ -7477,10 +7735,13 @@ -rm -f src/lib/$(DEPDIR)/libnl_cli_3_la-rule.Plo -rm -f src/lib/$(DEPDIR)/libnl_cli_3_la-tc.Plo -rm -f src/lib/$(DEPDIR)/libnl_cli_3_la-utils.Plo - -rm -f tests/$(DEPDIR)/check_all-check-addr.Po -rm -f tests/$(DEPDIR)/check_all-check-all.Po - -rm -f tests/$(DEPDIR)/check_all-check-attr.Po - -rm -f tests/$(DEPDIR)/check_all-check-ematch-tree-clone.Po + -rm -f tests/$(DEPDIR)/check_all-cksuite-all-addr.Po + -rm -f tests/$(DEPDIR)/check_all-cksuite-all-attr.Po + -rm -f tests/$(DEPDIR)/check_all-cksuite-all-ematch-tree-clone.Po + -rm -f tests/$(DEPDIR)/check_all-cksuite-all-netns.Po + -rm -f tests/$(DEPDIR)/check_direct-check-direct.Po + -rm -f tests/$(DEPDIR)/libnl_test_util_la-nl-test-util.Plo -rm -f tests/$(DEPDIR)/test_cache_mngr-test-cache-mngr.Po -rm -f tests/$(DEPDIR)/test_complex_HTB_with_hash_filters-test-complex-HTB-with-hash-filters.Po -rm -f tests/$(DEPDIR)/test_create_bond-test-create-bond.Po @@ -7554,14 +7815,15 @@ clean-pkglib_clsLTLIBRARIES clean-pkglib_qdiscLTLIBRARIES \ clean-sbinPROGRAMS cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS 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-libnlinclude_netlinkHEADERS \ + dist-xz dist-zip dist-zstd distcheck distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS 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-libnlinclude_netlinkHEADERS \ install-libnlinclude_netlink_cliHEADERS \ install-libnlinclude_netlink_fib_lookupHEADERS \ install-libnlinclude_netlink_genlHEADERS \ @@ -7635,6 +7897,10 @@ $(lib_libnl_route_3_la_OBJECTS): $(grammar_files_headers) +############################################################################### + +check-progs: all $(check_PROGRAMS) $(check_LTLIBRARIES) + # 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:
View file
_service:tar_scm:libnl-3.5.0.tar.gz/aclocal.m4 -> _service:tar_scm:libnl-3.7.0.tar.gz/aclocal.m4
Changed
@@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,8 +14,8 @@ m4_ifndef(AC_CONFIG_MACRO_DIRS, m4_defun(_AM_CONFIG_MACRO_DIRS, )m4_defun(AC_CONFIG_MACRO_DIRS, _AM_CONFIG_MACRO_DIRS($@))) m4_ifndef(AC_AUTOCONF_VERSION, m4_copy(m4_PACKAGE_VERSION, AC_AUTOCONF_VERSION))dnl -m4_if(m4_defn(AC_AUTOCONF_VERSION), 2.69,, -m4_warning(this file was generated for autoconf 2.69. +m4_if(m4_defn(AC_AUTOCONF_VERSION), 2.71,, +m4_warning(this file was generated for autoconf 2.71. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.)) @@ -364,7 +364,7 @@ AC_DEFINE(HAVE_$1, 1, Enable m4_tolower($1) support)) )dnl PKG_HAVE_DEFINE_WITH_MODULES -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -379,7 +379,7 @@ am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if($1, 1.16.1, , +m4_if($1, 1.16.5, , AC_FATAL(Do not call $0, use AM_INIT_AUTOMAKE($1).))dnl ) @@ -395,12 +395,12 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN(AM_SET_CURRENT_AUTOMAKE_VERSION, -AM_AUTOMAKE_VERSION(1.16.1)dnl +AM_AUTOMAKE_VERSION(1.16.5)dnl m4_ifndef(AC_AUTOCONF_VERSION, m4_copy(m4_PACKAGE_VERSION, AC_AUTOCONF_VERSION))dnl _AM_AUTOCONF_VERSION(m4_defn(AC_AUTOCONF_VERSION))) -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -462,7 +462,7 @@ # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -514,7 +514,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -545,7 +545,7 @@ Usually this means the macro was only invoked conditionally.) fi)) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -736,7 +736,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -775,7 +775,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE(Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).) fi @@ -802,7 +804,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -830,6 +832,10 @@ # release and drop the old call support. AC_DEFUN(AM_INIT_AUTOMAKE, AC_PREREQ(2.65)dnl +m4_ifdef(_$0_ALREADY_INIT, + m4_fatal($0 expanded multiple times +m4_defn(_$0_ALREADY_INIT)), + m4_define(_$0_ALREADY_INIT, m4_expansion_stack))dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow(^AM_A-Z+FLAGS$)dnl @@ -866,7 +872,7 @@ _AM_SET_OPTIONS($1)dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifdef(AC_PACKAGE_NAME, ok):m4_ifdef(AC_PACKAGE_VERSION, ok), + m4_ifset(AC_PACKAGE_NAME, ok):m4_ifset(AC_PACKAGE_VERSION, ok), ok:ok,, m4_fatal(AC_INIT should be called with package and version arguments))dnl AC_SUBST(PACKAGE, 'AC_PACKAGE_TARNAME')dnl @@ -918,6 +924,20 @@ m4_define(AC_PROG_OBJCXX, m4_defn(AC_PROG_OBJCXX)_AM_DEPENDENCIES(OBJCXX)))dnl ) +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi +AC_SUBST(CTAGS) +if test -z "$ETAGS"; then + ETAGS=etags +fi +AC_SUBST(ETAGS) +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi +AC_SUBST(CSCOPE) + AC_REQUIRE(AM_SILENT_RULES)dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This @@ -999,7 +1019,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME("$_am_arg")`/stamp-h$_am_stamp_count) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1020,7 +1040,7 @@ fi AC_SUBST(install_sh)) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1041,7 +1061,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1084,7 +1104,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1105,12 +1125,7 @@ AC_REQUIRE(AM_AUX_DIR_EXPAND)dnl AC_REQUIRE_AUX_FILE(missing)dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -1123,7 +1138,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1152,7 +1167,7 @@ AC_DEFUN(_AM_IF_OPTION, m4_ifset(_AM_MANGLE_OPTION($1), $2, $3)) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1199,7 +1214,7 @@ # For backward compatibility. AC_DEFUN_ONCE(AM_PROG_CC_C_O, AC_REQUIRE(AC_PROG_CC)) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1218,7 +1233,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1299,7 +1314,7 @@ rm -f conftest.file ) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1359,7 +1374,7 @@ _AM_SUBST_NOTMAKE(AM_BACKSLASH)dnl ) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1387,7 +1402,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST(INSTALL_STRIP_PROGRAM)) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1406,7 +1421,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it,
View file
_service:tar_scm:libnl-3.5.0.tar.gz/build-aux/ar-lib -> _service:tar_scm:libnl-3.7.0.tar.gz/build-aux/ar-lib
Changed
@@ -2,9 +2,9 @@ # Wrapper for Microsoft lib.exe me=ar-lib -scriptversion=2012-03-01.08; # UTC +scriptversion=2019-07-04.01; # UTC -# Copyright (C) 2010-2018 Free Software Foundation, Inc. +# Copyright (C) 2010-2021 Free Software Foundation, Inc. # Written by Peter Rosin <peda@lysator.liu.se>. # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -65,7 +65,7 @@ mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin) + cygwin | msys) file=`cygpath -m "$file" || echo "$file"` ;; wine) @@ -224,10 +224,11 @@ esac done else - $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member - do - $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $? - done + $AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \ + | while read member + do + $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $? + done fi elif test -n "$quick$replace"; then
View file
_service:tar_scm:libnl-3.5.0.tar.gz/build-aux/compile -> _service:tar_scm:libnl-3.7.0.tar.gz/build-aux/compile
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*)
View file
_service:tar_scm:libnl-3.5.0.tar.gz/build-aux/config.guess -> _service:tar_scm:libnl-3.7.0.tar.gz/build-aux/config.guess
Changed
@@ -1,12 +1,14 @@ -#! /bin/sh +#!/usr/bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2018-08-29' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-05-25' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -27,11 +29,19 @@ # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to <config-patches@gnu.org>. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -50,7 +60,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,6 +94,9 @@ exit 1 fi +# Just in case it came from the environment. +GUESS= + # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,12 +109,13 @@ tmp= # shellcheck disable=SC2172 -trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 -trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039 + # shellcheck disable=SC2039,SC3028 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || @@ -111,7 +125,7 @@ ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$driver" + CC_FOR_BUILD=$driver break fi done @@ -132,14 +146,12 @@ UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" @@ -148,24 +160,37 @@ LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #else + #elif defined(__GLIBC__) LIBC=gnu + #else + #include <stdarg.h> + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl + # Second heuristic to detect musl libc. + if "$LIBC" = unknown && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if "$LIBC" = unknown ; then + LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -177,12 +202,12 @@ # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -191,13 +216,13 @@ earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv0-9\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; @@ -218,7 +243,7 @@ ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv0-9/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -229,7 +254,7 @@ # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release='-gnu' ;; @@ -240,45 +265,57 @@ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; + *:OS108:*:*) + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=$UNAME_MACHINE-unknown-sortix + ;; + *:Twizzler:*:*) + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -292,7 +329,7 @@ # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in + case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -329,112 +366,121 @@ # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^PVTX//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^PVTX//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:AamigaOoSs:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:MmorphOoSs:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.012*:*|arm:riscix:1.012*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/^.*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/^.*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/^.*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/^.*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/^.*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/^.*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/^.*//'`" - case `isainfo -b` in - 32) - echo i386-pc-solaris2"$UNAME_REL" - ;; - 64) - echo x86_64-pc-solaris2"$UNAME_REL" - ;; - esac - exit ;; + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/^.*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/^.*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/^.*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -444,41 +490,41 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atariste:*MiNT:*:* | atariste:*mint:*:* | atariste:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atariste:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -506,75 +552,76 @@ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\(0-9*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if "$UNAME_PROCESSOR" = mc88100 || "$UNAME_PROCESSOR" = mc88110 + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then - if "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ - "$TARGET_BINARY_INTERFACE"x = x + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek430-90-9:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????:AIX?:12.1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) - if -x /usr/bin/oslevel ; then + if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build @@ -591,16 +638,16 @@ EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:4567) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then @@ -608,56 +655,56 @@ else IBM_ARCH=powerpc fi - if -x /usr/bin/lslpp ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/0-9*$/0/` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=rs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=romp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/34??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/34??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 9000/34678??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/^.*.0B*//'` - case "$UNAME_MACHINE" in + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/^.*.0B*//'` + case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/34??) HP_ARCH=m68k ;; 9000/6780-90-9) - if -x /usr/bin/getconf ; then + if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in + case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in + case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if "$HP_ARCH" = "" ; then + if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -696,7 +743,7 @@ test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if "$HP_ARCH" = hppa2.0w + if test "$HP_ARCH" = hppa2.0w then set_cc_for_build @@ -717,12 +764,12 @@ HP_ARCH=hppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/^.*.0B*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/^.*.0B*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -752,36 +799,36 @@ EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?79:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?79:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) - if -x /usr/sbin/sysversion ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -789,17 +836,18 @@ fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.^.*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.^.*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*A-Z90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\(A-Z90\)/\1/' \ @@ -807,114 +855,129 @@ -e 's/\.^.*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.^.*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.^.*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.^.*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.^.*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.^.*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.^.*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.^.*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.^.*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; F3001:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/-(.*//'`"-gnueabi + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/-(.*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/-(.*//'`"-gnueabihf + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/-(.*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi - exit ;; + ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in + case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/-(.*//'`" - exit ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/-(.*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/^.*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/^.*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,-/.*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,-/.*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^^/*/,,' | tr ":upper:" ":lower:"``echo "$UNAME_RELEASE"|sed -e 's/-(.*//'`-$LIBC" - exit ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^^/*/,,' | tr ":upper:" ":lower:"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/-(.*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix - exit ;; + GUESS=$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -925,183 +988,236 @@ esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + MIPS_ENDIAN= #else - CPU= + MIPS_ENDIAN= #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=or1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=sparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=hppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu^a-z*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __i386__ + ABI=x86 + #else + #ifdef __ILP32__ + ABI=x32 + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + x86) CPU=i686 ;; + x32) LIBCABI=${LIBC}x32 ;; + esac + fi + GUESS=$CPU-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=i386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.01*:* | i*86:LynxOS:4.02*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:678*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in @@ -1109,12 +1225,12 @@ *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" - exit ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1124,11 +1240,11 @@ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1136,31 +1252,31 @@ # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; M68*:*:R3V5678*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3345??:*:4.0:3.0 | 334??A:*:4.0:3.0 | 334??,*:*:4.0:3.0 | 334??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) @@ -1185,250 +1301,407 @@ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.01*:* | PowerPC:LynxOS:4.02*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SMBES:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; + ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R34000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if -d /usr/nec ; then - echo mips-nec-sysv"$UNAME_RELEASE" + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=i586-pc-haiku + ;; + ppc:Haiku:*:*) # Haiku running on Apple PowerPC + GUESS=powerpc-apple-haiku + ;; + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) + GUESS=$UNAME_MACHINE-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if "$CC_FOR_BUILD" != no_compiler_found ; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:0123456789*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=i386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - # shellcheck disable=SC2154 - if test "$cputype" = 386; then + if test "${cputype-}" = 386; then UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/-(.*//'`" - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/-(.*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=x86_64-unknown-onefs + ;; + *:Unleashed:*:*) + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" <<EOF +#ifdef _SEQUENT_ +#include <sys/types.h> +#include <sys/utsname.h> +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include <signal.h> +#if defined(_SIZE_T_) || defined(SIGLOST) +#include <sys/utsname.h> +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include <sys/param.h> + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \(0-9*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include <sys/param.h> +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + echo "$0: unable to guess system type" >&2 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <<EOF @@ -1445,9 +1718,17 @@ operating system you are using. If your script is old, overwrite *all* copies of config.guess and config.sub with the latest versions from: - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess + https://git.savannah.gnu.org/cgit/config.git/plain/config.guess and - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + https://git.savannah.gnu.org/cgit/config.git/plain/config.sub +EOF + +our_year=`echo $timestamp | sed 's,-.*,,'` +thisyear=`date +%Y` +# shellcheck disable=SC2003 +script_age=`expr "$thisyear" - "$our_year"` +if test "$script_age" -lt 3 ; then + cat >&2 <<EOF If $0 has already been updated, send the following data and any information you think might be pertinent to config-patches@gnu.org to @@ -1475,6 +1756,7 @@ UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF +fi exit 1
View file
_service:tar_scm:libnl-3.5.0.tar.gz/build-aux/config.sub -> _service:tar_scm:libnl-3.7.0.tar.gz/build-aux/config.sub
Changed
@@ -1,12 +1,14 @@ -#! /bin/sh +#!/usr/bin/sh # Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2018-08-29' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-01-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -33,7 +35,7 @@ # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -50,6 +52,13 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -67,7 +76,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -89,7 +98,7 @@ - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) @@ -111,9 +120,12 @@ esac # Split fields of configuration type -IFS="-" read -r field1 field2 field3 field4 <<EOF +# shellcheck disable=SC2162 +saved_IFS=$IFS +IFS="-" read field1 field2 field3 field4 <<EOF $1 EOF +IFS=$saved_IFS # Separate into logical components for further validation case $1 in @@ -123,37 +135,36 @@ ;; *-*-*-*) basic_machine=$field1-$field2 - os=$field3-$field4 + basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ - | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova*) basic_machine=$field1 - os=$maybe_os + basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown - os=linux-android + basic_os=linux-android ;; *) basic_machine=$field1-$field2 - os=$field3 + basic_os=$field3 ;; esac ;; *-*) - # A lone config we happen to match not fitting any patern + # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec - os= + basic_os= ;; *-*) # Second component is usually, but not always the OS @@ -161,7 +172,11 @@ # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 - os=$field2 + basic_os=$field2 + ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ @@ -174,11 +189,11 @@ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 - os= + basic_os= ;; *) basic_machine=$field1 - os=$field2 + basic_os=$field2 ;; esac ;; @@ -190,450 +205,451 @@ case $field1 in 386bsd) basic_machine=i386-pc - os=bsd + basic_os=bsd ;; a29khif) basic_machine=a29k-amd - os=udi + basic_os=udi ;; adobe68k) basic_machine=m68010-adobe - os=scout + basic_os=scout ;; alliant) basic_machine=fx80-alliant - os= + basic_os= ;; altos | altos3068) basic_machine=m68k-altos - os= + basic_os= ;; am29k) basic_machine=a29k-none - os=bsd + basic_os=bsd ;; amdahl) basic_machine=580-amdahl - os=sysv + basic_os=sysv ;; amiga) basic_machine=m68k-unknown - os= + basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown - os=amigaos + basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown - os=sysv4 + basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo - os=sysv + basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo - os=bsd + basic_os=bsd ;; aros) basic_machine=i386-pc - os=aros + basic_os=aros ;; aux) basic_machine=m68k-apple - os=aux + basic_os=aux ;; balance) basic_machine=ns32k-sequent - os=dynix + basic_os=dynix ;; blackfin) basic_machine=bfin-unknown - os=linux + basic_os=linux ;; cegcc) basic_machine=arm-unknown - os=cegcc + basic_os=cegcc ;; convex-c1) basic_machine=c1-convex - os=bsd + basic_os=bsd ;; convex-c2) basic_machine=c2-convex - os=bsd + basic_os=bsd ;; convex-c32) basic_machine=c32-convex - os=bsd + basic_os=bsd ;; convex-c34) basic_machine=c34-convex - os=bsd + basic_os=bsd ;; convex-c38) basic_machine=c38-convex - os=bsd + basic_os=bsd ;; cray) basic_machine=j90-cray - os=unicos + basic_os=unicos ;; crds | unos) basic_machine=m68k-crds - os= + basic_os= ;; da30) basic_machine=m68k-da30 - os= + basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec - os= + basic_os= ;; delta88) basic_machine=m88k-motorola - os=sysv3 + basic_os=sysv3 ;; dicos) basic_machine=i686-pc - os=dicos + basic_os=dicos ;; djgpp) basic_machine=i586-pc - os=msdosdjgpp + basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd - os=ebmon + basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson - os=ose + basic_os=ose ;; gmicro) basic_machine=tron-gmicro - os=sysv + basic_os=sysv ;; go32) basic_machine=i386-pc - os=go32 + basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi - os=hms + basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi - os=xray + basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi - os=hms + basic_os=hms ;; harris) basic_machine=m88k-harris - os=sysv3 + basic_os=sysv3 ;; - hp300) + hp300 | hp300hpux) basic_machine=m68k-hp + basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp - os=bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=hpux + basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp - os=osf + basic_os=osf ;; hppro) basic_machine=hppa1.1-hp - os=proelf + basic_os=proelf ;; i386mach) basic_machine=i386-mach - os=mach - ;; - vsta) - basic_machine=i386-pc - os=vsta + basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi - os=sysv + basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown - os=linux + basic_os=linux ;; magnum | m3230) basic_machine=mips-mips - os=sysv + basic_os=sysv ;; merlin) basic_machine=ns32k-utek - os=sysv + basic_os=sysv ;; mingw64) basic_machine=x86_64-pc - os=mingw64 + basic_os=mingw64 ;; mingw32) basic_machine=i686-pc - os=mingw32 + basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown - os=mingw32ce + basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k - os=coff + basic_os=coff ;; morphos) basic_machine=powerpc-unknown - os=morphos + basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown - os=moxiebox + basic_os=moxiebox ;; msdos) basic_machine=i386-pc - os=msdos + basic_os=msdos ;; msys) basic_machine=i686-pc - os=msys + basic_os=msys ;; mvs) basic_machine=i370-ibm - os=mvs + basic_os=mvs ;; nacl) basic_machine=le32-unknown - os=nacl + basic_os=nacl ;; ncr3000) basic_machine=i486-ncr - os=sysv4 + basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc - os=netbsd + basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel - os=linux + basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony - os=newsos + basic_os=newsos ;; news1000) basic_machine=m68030-sony - os=newsos + basic_os=newsos ;; necv70) basic_machine=v70-nec - os=sysv + basic_os=sysv ;; nh3000) basic_machine=m68k-harris - os=cxux + basic_os=cxux ;; nh45000) basic_machine=m88k-harris - os=cxux + basic_os=cxux ;; nindy960) basic_machine=i960-intel - os=nindy + basic_os=nindy ;; mon960) basic_machine=i960-intel - os=mon960 + basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq - os=nonstopux + basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm - os=os400 + basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson - os=ose + basic_os=ose ;; os68k) basic_machine=m68k-none - os=os68k + basic_os=os68k ;; paragon) basic_machine=i860-intel - os=osf + basic_os=osf ;; parisc) basic_machine=hppa-unknown - os=linux + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp ;; pw32) basic_machine=i586-unknown - os=pw32 + basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc - os=rdos + basic_os=rdos ;; rdos32) basic_machine=i386-pc - os=rdos + basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k - os=coff + basic_os=coff ;; sa29200) basic_machine=a29k-amd - os=udi + basic_os=udi ;; sei) basic_machine=mips-sei - os=seiux + basic_os=seiux ;; sequent) basic_machine=i386-sequent - os= + basic_os= ;; sps7) basic_machine=m68k-bull - os=sysv2 + basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem - os= + basic_os= ;; stratus) basic_machine=i860-stratus - os=sysv4 + basic_os=sysv4 ;; sun2) basic_machine=m68000-sun - os= + basic_os= ;; sun2os3) basic_machine=m68000-sun - os=sunos3 + basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun - os=sunos4 + basic_os=sunos4 ;; sun3) basic_machine=m68k-sun - os= + basic_os= ;; sun3os3) basic_machine=m68k-sun - os=sunos3 + basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun - os=sunos4 + basic_os=sunos4 ;; sun4) basic_machine=sparc-sun - os= + basic_os= ;; sun4os3) basic_machine=sparc-sun - os=sunos3 + basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun - os=sunos4 + basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun - os=solaris2 + basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun - os= + basic_os= ;; sv1) basic_machine=sv1-cray - os=unicos + basic_os=unicos ;; symmetry) basic_machine=i386-sequent - os=dynix + basic_os=dynix ;; t3e) basic_machine=alphaev5-cray - os=unicos + basic_os=unicos ;; t90) basic_machine=t90-cray - os=unicos + basic_os=unicos ;; toad1) basic_machine=pdp10-xkl - os=tops20 + basic_os=tops20 ;; tpf) basic_machine=s390x-ibm - os=tpf + basic_os=tpf ;; udi29k) basic_machine=a29k-amd - os=udi + basic_os=udi ;; ultra3) basic_machine=a29k-nyu - os=sym1 + basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec - os=none + basic_os=none ;; vaxv) basic_machine=vax-dec - os=sysv + basic_os=sysv ;; vms) basic_machine=vax-dec - os=vms + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta ;; vxworks960) basic_machine=i960-wrs - os=vxworks + basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs - os=vxworks + basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs - os=vxworks + basic_os=vxworks ;; xbox) basic_machine=i686-pc - os=mingw32 + basic_os=mingw32 ;; ymp) basic_machine=ymp-cray - os=unicos + basic_os=unicos ;; *) basic_machine=$1 - os= + basic_os= ;; esac ;; @@ -685,17 +701,17 @@ bluegene*) cpu=powerpc vendor=ibm - os=cnk + basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec - os=tops10 + basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec - os=tops20 + basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) @@ -705,7 +721,7 @@ dpx2*) cpu=m68k vendor=bull - os=sysv3 + basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k @@ -714,7 +730,7 @@ elxsi) cpu=elxsi vendor=elxsi - os=${os:-bsd} + basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 @@ -727,7 +743,7 @@ h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi - os=hiuxwe2 + basic_os=hiuxwe2 ;; hp3k90-90-9 | hp90-90-9) cpu=hppa1.0 @@ -770,36 +786,36 @@ i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - os=sysv32 + basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - os=sysv4 + basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - os=sysv + basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - os=solaris2 + basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray - os=${os:-unicos} + basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi - case $os in + case $basic_os in irix*) ;; *) - os=irix4 + basic_os=irix4 ;; esac ;; @@ -810,24 +826,26 @@ *mint | mint0-9* | *MiNT | *MiNT0-9*) cpu=m68k vendor=atari - os=mint + basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony - os=newsos + basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next - case $os in - nextstep* ) + case $basic_os in + openstep*) + ;; + nextstep*) ;; ns2*) - os=nextstep2 + basic_os=nextstep2 ;; *) - os=nextstep3 + basic_os=nextstep3 ;; esac ;; @@ -838,12 +856,12 @@ op50n-* | op60c-*) cpu=hppa1.1 vendor=oki - os=proelf + basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi - os=hiuxwe2 + basic_os=hiuxwe2 ;; pbd) cpu=sparc @@ -880,12 +898,12 @@ sde) cpu=mipsisa32 vendor=sde - os=${os:-elf} + basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs - os=vxworks + basic_os=vxworks ;; tower | tower-32) cpu=m68k @@ -902,7 +920,7 @@ w89k-*) cpu=hppa1.1 vendor=winbond - os=proelf + basic_os=proelf ;; none) cpu=none @@ -918,9 +936,12 @@ ;; *-*) - IFS="-" read -r cpu vendor <<EOF + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read cpu vendor <<EOF $basic_machine EOF + IFS=$saved_IFS ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -950,15 +971,15 @@ # Decode basic machines in the full and proper CPU-Company form. case $cpu-$vendor in - # Here we handle the default manufacturer of certain CPU types in cannonical form. It is in + # Here we handle the default manufacturer of certain CPU types in canonical form. It is in # some cases the only manufacturer, in others, it is the most popular. craynv-unknown) vendor=cray - os=${os:-unicosmp} + basic_os=${basic_os:-unicosmp} ;; c90-unknown | c90-cray) vendor=cray - os=${os:-unicos} + basic_os=${Basic_os:-unicos} ;; fx80-unknown) vendor=alliant @@ -999,10 +1020,15 @@ ;; # Here we normalize CPU types with a missing or matching vendor + armh-unknown | armh-alt) + cpu=armv7l + vendor=alt + basic_os=${basic_os:-linux-gnueabihf} + ;; dpx20-unknown | dpx20-bull) cpu=rs6000 vendor=bull - os=${os:-bosx} + basic_os=${basic_os:-bosx} ;; # Here we normalize CPU types irrespective of the vendor @@ -1011,7 +1037,7 @@ ;; blackfin-*) cpu=bfin - os=linux + basic_os=linux ;; c54x-*) cpu=tic54x @@ -1024,7 +1050,7 @@ ;; e500v12-*) cpu=powerpc - os=$os"spe" + basic_os=${basic_os}"spe" ;; mips3*-*) cpu=mips64 @@ -1034,7 +1060,7 @@ ;; m68knommu-*) cpu=m68k - os=linux + basic_os=linux ;; m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) cpu=s12z @@ -1044,7 +1070,7 @@ ;; parisc-*) cpu=hppa - os=linux + basic_os=linux ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) cpu=i586 @@ -1100,11 +1126,14 @@ xscale-* | xscaleebl-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; + arm64-* | aarch64le-*) + cpu=aarch64 + ;; - # Recognize the cannonical CPU Types that limit and/or modify the + # Recognize the canonical CPU Types that limit and/or modify the # company names they are paired with. cr16-*) - os=${os:-elf} + basic_os=${basic_os:-elf} ;; crisv32-* | etraxfs*-*) cpu=crisv32 @@ -1115,7 +1144,7 @@ vendor=axis ;; crx-*) - os=${os:-elf} + basic_os=${basic_os:-elf} ;; neo-tandem) cpu=neo @@ -1137,20 +1166,16 @@ cpu=nsx vendor=tandem ;; - s390-*) - cpu=s390 - vendor=ibm - ;; - s390x-*) - cpu=s390x - vendor=ibm + mipsallegrexel-sony) + cpu=mipsallegrexel + vendor=sony ;; tile*-*) - os=${os:-linux-gnu} + basic_os=${basic_os:-linux-gnu} ;; *) - # Recognize the cannonical CPU types that are allowed with any + # Recognize the canonical CPU types that are allowed with any # company name. case $cpu in 1750a | 580 \ @@ -1161,13 +1186,14 @@ | alpha64 | alpha64ev4-8 | alpha64ev56 | alpha64ev678 \ | alphapca567 | alpha64pca567 \ | am33_2.0 \ - | arc | arceb \ - | arm | armlbe | armelb | armv* \ + | amdgcn \ + | arc | arceb | arc32 | arc64 \ + | arm | armlbe | armelb | armv* \ | avr | avr32 \ | asmjs \ | ba \ | be32 | be64 \ - | bfin | bs2000 \ + | bfin | bpf | bs2000 \ | c123* | c30 | cjt90 | c4x \ | c8051 | clipper | craynv | csky | cydra \ | d10v | d30v | dlx | dsp16xx \ @@ -1181,14 +1207,15 @@ | k1om \ | le32 | le64 \ | lm32 \ + | loongarch32 | loongarch64 | loongarchx32 \ | m32c | m32r | m32rle \ - | m5200 | m68000 | m6800123460 | m68360 | m683?2 | m68k | v70 | w65 \ - | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ + | m5200 | m68000 | m6800123460 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | m88110 | m88k | maxq | mb | mcore | mep | metag \ | microblaze | microblazeel \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ - | mips64 | mips64el \ + | mips64 | mips64eb | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ @@ -1199,9 +1226,13 @@ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r3 | mipsisa32r3el \ + | mipsisa32r5 | mipsisa32r5el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r3 | mipsisa64r3el \ + | mipsisa64r5 | mipsisa64r5el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ @@ -1215,32 +1246,37 @@ | nds32 | nds32le | nds32be \ | nfp \ | nios | nios2 | nios2eb | nios2el \ - | none | np1 | ns16k | ns32k \ + | none | np1 | ns16k | ns32k | nvptx \ | open8 \ | or1k* \ | or32 \ | orion \ + | picochip \ | pdp10 | pdp11 | pj | pjl | pn | power \ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ | pru \ | pyramid \ - | riscv | riscv32 | riscv64 \ + | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ | rl78 | romp | rs6000 | rx \ + | s390 | s390x \ | score \ - | sh | sh1234 | sh24a | sh24aelb | sh23e | shelb | shlbe \ + | sh | shl \ + | sh1234 | sh24a | sh24aelb | sh23e | shelb | shlbe \ | sh1234elb | sh12345lbe | sh23ele | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | spu \ | tahoe \ + | thumbv7* \ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | tron \ | ubicom32 \ - | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | vax \ | visium \ - | wasm32 \ + | w65 \ + | wasm32 | wasm64 \ | we32k \ | x86 | x86_64 | xc16x | xgate | xps100 \ | xstormy16 | xtensa* \ @@ -1270,8 +1306,49 @@ # Decode manufacturer-specific aliases for certain operating systems. -if x$os != x +if test x$basic_os != x then + +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just +# set os. +case $basic_os in + gnu/linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` + ;; + nto-qnx*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + ;; + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read kernel os <<EOF +$basic_os +EOF + IFS=$saved_IFS + ;; + # Default OS when just kernel was specified + nto*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto|qnx|'` + ;; + linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|linux|gnu|'` + ;; + *) + kernel= + os=$basic_os + ;; +esac + +# Now, normalize the OS (knowing we just have one component, it's not a kernel, +# etc.) case $os in # First match some system type aliases that might get confused # with valid system types. @@ -1283,7 +1360,7 @@ os=cnk ;; solaris1 | solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` + os=`echo "$os" | sed -e 's|solaris1|sunos4|'` ;; solaris) os=solaris2 @@ -1291,9 +1368,6 @@ unixware*) os=sysv4.2uw ;; - gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; # es1800 is here to avoid being matched by es* (a different OS) es1800*) os=ose @@ -1315,12 +1389,9 @@ os=sco3.2v4 ;; sco3.2.4-9*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` ;; - sco3.2v4-9* | sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - ;; - scout) + sco*v* | scout) # Don't match below ;; sco*) @@ -1329,77 +1400,25 @@ psos*) os=psos ;; - # Now accept the basic system types. - # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. - # sysv* is not here because it comes later, after sysvr4. - gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ - | *vms* | esix* | aix* | cnk* | sunos | sunos34*\ - | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ - | sym* | kopensolaris* | plan9* \ - | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ - | aos* | aros* | cloudabi* | sortix* \ - | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ - | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ - | knetbsd* | mirbsd* | netbsd* \ - | bitrig* | openbsd* | solidbsd* | libertybsd* \ - | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ - | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ - | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ - | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ - | chorusrdb* | cegcc* | glidix* \ - | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ - | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ - | linux-newlib* | linux-musl* | linux-uclibc* \ - | uxpv* | beos* | mpeix* | udk* | moxiebox* \ - | interix* | uwin* | mks* | rhapsody* | darwin* \ - | openstep* | oskit* | conix* | pw32* | nonstopux* \ - | storm-chaos* | tops10* | tenex* | tops20* | its* \ - | os2* | vos* | palmos* | uclinux* | nucleus* \ - | morphos* | superux* | rtmk* | windiss* \ - | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ - | skyos* | haiku* | rdos* | toppers* | drops* | es* \ - | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ - | midnightbsd*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; qnx*) - case $cpu in - x86 | i*86) - ;; - *) - os=nto-$os - ;; - esac + os=qnx ;; hiux*) os=hiuxwe2 ;; - nto-qnx*) - ;; - nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - sim | xray | os68k* | v88r* \ - | windows* | osx | abug | netware* | os9* \ - | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) - ;; - linux-dietlibc) - os=linux-dietlibc - ;; - linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; lynx*178) os=lynxos178 ;; lynx*5) os=lynxos5 ;; + lynxos*) + # don't get caught up in next wildcard + ;; lynx*) os=lynxos ;; - mac*) + mac0-9*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; opened*) @@ -1444,12 +1463,9 @@ ns2) os=nextstep2 ;; - nsk*) - os=nsk - ;; # Preserve the version number of sinix5. sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` + os=`echo "$os" | sed -e 's|sinix|sysv|'` ;; sinix*) os=sysv4 @@ -1472,18 +1488,12 @@ sysvr4) os=sysv4 ;; - # This must come after sysvr4. - sysv*) - ;; ose*) os=ose ;; *mint | mint0-9* | *MiNT | MiNT0-9*) os=mint ;; - zvmoe) - os=zvmoe - ;; dicos*) os=dicos ;; @@ -1500,19 +1510,11 @@ ;; esac ;; - nacl*) - ;; - ios) - ;; - none) - ;; - *-eabi) - ;; *) - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 - exit 1 + # No normalization, but not necessarily accepted, that comes below. ;; esac + else # Here we handle the default operating systems that come with various machines. @@ -1525,6 +1527,7 @@ # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. +kernel= case $cpu-$vendor in score-*) os=elf @@ -1536,7 +1539,8 @@ os=riscix1.2 ;; arm*-rebel) - os=linux + kernel=linux + os=gnu ;; arm*-semi) os=aout @@ -1702,84 +1706,180 @@ os=none ;; esac + fi +# Now, validate our (potentially fixed-up) OS. +case $os in + # Sometimes we do "kernel-libc", so those need to count as OSes. + musl* | newlib* | relibc* | uclibc*) + ;; + # Likewise for "kernel-abi" + eabi* | gnueabi*) + ;; + # VxWorks passes extra cpu info in the 4th filed. + simlinux | simwindows | spe) + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos34* \ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ + | hiux* | abug | nacl* | netware* | windows* \ + | os9* | macos* | osx* | ios* \ + | mpw* | magic* | mmixware* | mon960* | lnews* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | mirbsd* | netbsd* | dicos* | openedition* | ose* \ + | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* | serenity* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | mint* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ + | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ + | fiwix* ) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v4-9* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + none) + ;; + *) + echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ + | linux-musl* | linux-relibc* | linux-uclibc* ) + ;; + uclinux-uclibc* ) + ;; + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; + nto-qnx*) + ;; + os2-emx) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + exit 1 + ;; +esac + # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) - case $os in - riscix*) + case $cpu-$os in + *-riscix*) vendor=acorn ;; - sunos*) + *-sunos*) vendor=sun ;; - cnk*|-aix*) + *-cnk* | *-aix*) vendor=ibm ;; - beos*) + *-beos*) vendor=be ;; - hpux*) + *-hpux*) vendor=hp ;; - mpeix*) + *-mpeix*) vendor=hp ;; - hiux*) + *-hiux*) vendor=hitachi ;; - unos*) + *-unos*) vendor=crds ;; - dgux*) + *-dgux*) vendor=dg ;; - luna*) + *-luna*) vendor=omron ;; - genix*) + *-genix*) vendor=ns ;; - clix*) + *-clix*) vendor=intergraph ;; - mvs* | opened*) + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) vendor=ibm ;; - os400*) + s390-* | s390x-*) vendor=ibm ;; - ptx*) + *-ptx*) vendor=sequent ;; - tpf*) + *-tpf*) vendor=ibm ;; - vxsim* | vxworks* | windiss*) + *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; - aux*) + *-aux*) vendor=apple ;; - hms*) + *-hms*) vendor=hitachi ;; - mpw* | macos*) + *-mpw* | *-macos*) vendor=apple ;; - *mint | mint0-9* | *MiNT | MiNT0-9*) + *-*mint | *-mint0-9* | *-*MiNT | *-MiNT0-9*) vendor=atari ;; - vos*) + *-vos*) vendor=stratus ;; esac ;; esac -echo "$cpu-$vendor-$os" +echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables:
View file
_service:tar_scm:libnl-3.5.0.tar.gz/build-aux/depcomp -> _service:tar_scm:libnl-3.7.0.tar.gz/build-aux/depcomp
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by
View file
_service:tar_scm:libnl-3.5.0.tar.gz/build-aux/install-sh -> _service:tar_scm:libnl-3.7.0.tar.gz/build-aux/install-sh
Changed
@@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2018-03-11.20; # UTC +scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,6 +69,11 @@ # Desired mode of installed file. mode=0755 +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -99,18 +104,28 @@ --version display version info and exit. -c (ignored) - -C install only if different (preserve the last data modification time) + -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -137,8 +152,13 @@ -o) chowncmd="$chownprog $2" shift;; + -p) cpprog="$cpprog -p";; + -s) stripcmd=$stripprog;; + -S) backupsuffix="$2" + shift;; + -t) is_target_a_directory=always dst_arg=$2 @@ -255,6 +275,10 @@ dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -301,22 +325,6 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *23672367) mkdir_umask=$umask;; - .*00202 | .0202 | .02) mkdir_umask=22;; - - *0-7) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -326,52 +334,49 @@ fi posix_mkdir=false - case $umask in - *1235670-70-7) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - # Note that $RANDOM variable is not portable (e.g. dash); Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p' feature. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; esac if @@ -382,7 +387,7 @@ then : else - # The umask is ridiculous, or mkdir does not conform to POSIX, + # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. @@ -411,7 +416,7 @@ prefixes= else if $posix_mkdir; then - (umask=$mkdir_umask && + (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 @@ -451,7 +456,18 @@ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -477,6 +493,13 @@ then rm -f "$dsttmp" else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -491,9 +514,9 @@ # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || + $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1
View file
_service:tar_scm:libnl-3.5.0.tar.gz/build-aux/ltmain.sh -> _service:tar_scm:libnl-3.7.0.tar.gz/build-aux/ltmain.sh
Changed
@@ -1,12 +1,12 @@ -#! /bin/sh +#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 +## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.4.6 +# libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.6 -package_revision=2.4.6 +VERSION=2.4.7 +package_revision=2.4.7 ## ------ ## @@ -64,34 +64,25 @@ # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2015-01-20.17; # UTC +scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2004-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# <https://opensource.org/license/MIT>, and GPL version 2 or later +# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# Please report bugs or propose patches to gary@gnu.org. +# Please report bugs or propose patches to: +# <https://github.com/gnulib-modules/bootstrap/issues> ## ------ ## @@ -139,9 +130,12 @@ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# These NLS vars are set unconditionally (bootstrap issue #24). Unset those +# in case the environment reset is needed later and the $save_* variant is not +# defined (see the code above). +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' @@ -159,6 +153,26 @@ fi +# func_unset VAR +# -------------- +# Portably unset VAR. +# In some shells, an 'unset VAR' statement leaves a non-zero return +# status if VAR is already unset, which might be problematic if the +# statement is used at the end of a function (thus poisoning its return +# value) or when 'set -e' is active (causing even a spurious abort of +# the script in this case). +func_unset () +{ + { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } +} + + +# Make sure CDPATH doesn't cause `cd` commands to output the target dir. +func_unset CDPATH + +# Make sure ${,E,F}GREP behave sanely. +func_unset GREP_OPTIONS + ## ------------------------- ## ## Locate command utilities. ## @@ -259,7 +273,7 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } @@ -295,7 +309,7 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } @@ -360,6 +374,35 @@ s/\\(^$_G_bs\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" +# require_check_ifs_backslash +# --------------------------- +# Check if we can use backslash as IFS='\' separator, and set +# $check_ifs_backshlash_broken to ':' or 'false'. +require_check_ifs_backslash=func_require_check_ifs_backslash +func_require_check_ifs_backslash () +{ + _G_save_IFS=$IFS + IFS='\' + _G_check_ifs_backshlash='a\\b' + for _G_i in $_G_check_ifs_backshlash + do + case $_G_i in + a) + check_ifs_backshlash_broken=false + ;; + '') + break + ;; + *) + check_ifs_backshlash_broken=: + break + ;; + esac + done + IFS=$_G_save_IFS + require_check_ifs_backslash=: +} + ## ----------------- ## ## Global variables. ## @@ -580,16 +623,16 @@ { $debug_cmd - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1=\$$1\\ \$func_quote_arg_result" } fi @@ -1091,85 +1134,203 @@ } -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () +# func_quote_portable EVAL ARG +# ---------------------------- +# Internal function to portably implement func_quote_arg. Note that we still +# keep attention to performance here so we as much as possible try to avoid +# calling sed binary (so far O(N) complexity as long as func_append is O(1)). +func_quote_portable () { $debug_cmd - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *\\\`\"\$*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + $require_check_ifs_backslash + + func_quote_portable_result=$2 + + # one-time-loop (easy break) + while true + do + if $1; then + func_quote_portable_result=`$ECHO "$2" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` + break fi - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *\\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ *|**|"") - _G_quoted_arg=\"$_G_unquoted_arg\" + # Quote for eval. + case $func_quote_portable_result in + *\\\`\"\$*) + # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string + # contains the shell wildcard characters. + case $check_ifs_backshlash_broken$func_quote_portable_result in + :*|*\\*\?*) + func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ + | $SED "$sed_quote_subst"` + break + ;; + esac + + func_quote_portable_old_IFS=$IFS + for _G_char in '\' '`' '"' '$' + do + # STATE($1) PREV($2) SEPARATOR($3) + set start "" "" + func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy + IFS=$_G_char + for _G_part in $func_quote_portable_result + do + case $1 in + quote) + func_append func_quote_portable_result "$3$2" + set quote "$_G_part" "\\$_G_char" + ;; + start) + set first "" "" + func_quote_portable_result= + ;; + first) + set quote "$_G_part" "" + ;; + esac + done + done + IFS=$func_quote_portable_old_IFS ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; + *) ;; esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift + break done + + func_quote_portable_unquoted_result=$func_quote_portable_result + case $func_quote_portable_result in + # double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # many bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *\\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ *|**|"") + func_quote_portable_result=\"$func_quote_portable_result\" + ;; + esac } -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd +# func_quotefast_eval ARG +# ----------------------- +# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', +# but optimized for speed. Result is stored in $func_quotefast_eval. +if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then + printf -v _GL_test_printf_tilde %q '~' + if test '\~' = "$_GL_test_printf_tilde"; then + func_quotefast_eval () + { + printf -v func_quotefast_eval_result %q "$1" + } + else + # Broken older Bash implementations. Make those faster too if possible. + func_quotefast_eval () + { + case $1 in + '~'*) + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + ;; + *) + printf -v func_quotefast_eval_result %q "$1" + ;; + esac + } + fi +else + func_quotefast_eval () + { + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + } +fi - case $1 in - *\\\`\"*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; + +# func_quote_arg MODEs ARG +# ------------------------ +# Quote one ARG to be evaled later. MODEs argument may contain zero or more +# specifiers listed below separated by ',' character. This function returns two +# values: +# i) func_quote_arg_result +# double-quoted (when needed), suitable for a subsequent eval +# ii) func_quote_arg_unquoted_result +# has all characters that are still active within double +# quotes backslashified. Available only if 'unquoted' is specified. +# +# Available modes: +# ---------------- +# 'eval' (default) +# - escape shell special characters +# 'expand' +# - the same as 'eval'; but do not quote variable references +# 'pretty' +# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might +# be used later in func_quote to get output like: 'echo "a b"' instead +# of 'echo a\ b'. This is slower than default on some shells. +# 'unquoted' +# - produce also $func_quote_arg_unquoted_result which does not contain +# wrapping double-quotes. +# +# Examples for 'func_quote_arg pretty,unquoted string': +# +# string | *_result | *_unquoted_result +# ------------+-----------------------+------------------- +# " | \" | \" +# a b | "a b" | a b +# "a b" | "\"a b\"" | \"a b\" +# * | "*" | * +# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" +# +# Examples for 'func_quote_arg pretty,unquoted,expand string': +# +# string | *_result | *_unquoted_result +# --------------+---------------------+-------------------- +# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" +func_quote_arg () +{ + _G_quote_expand=false + case ,$1, in + *,expand,*) + _G_quote_expand=: + ;; esac - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *\\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ *|**|"") - _G_arg=\"$_G_arg\" + case ,$1, in + *,pretty,*|*,expand,*|*,unquoted,*) + func_quote_portable $_G_quote_expand "$2" + func_quote_arg_result=$func_quote_portable_result + func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result + ;; + *) + # Faster quote-for-eval for some shells. + func_quotefast_eval "$2" + func_quote_arg_result=$func_quotefast_eval_result ;; esac +} + - func_quote_for_expand_result=$_G_arg +# func_quote MODEs ARGs... +# ------------------------ +# Quote all ARGs to be evaled later and join them into single command. See +# func_quote_arg's description for more info. +func_quote () +{ + $debug_cmd + _G_func_quote_mode=$1 ; shift + func_quote_result= + while test 0 -lt $#; do + func_quote_arg "$_G_func_quote_mode" "$1" + if test -n "$func_quote_result"; then + func_append func_quote_result " $func_quote_arg_result" + else + func_append func_quote_result "$func_quote_arg_result" + fi + shift + done } @@ -1215,8 +1376,8 @@ _G_cmd=$1 _G_fail_exp=${2-':'} - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" + func_quote_arg pretty,expand "$_G_cmd" + eval "func_notquiet $func_quote_arg_result" $opt_dry_run || { eval "$_G_cmd" @@ -1241,8 +1402,8 @@ _G_fail_exp=${2-':'} $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$_G_cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || { @@ -1369,30 +1530,26 @@ # End: #! /bin/sh -# Set a version string for this script. -scriptversion=2014-01-07.03; # UTC - # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2010-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# <https://opensource.org/license/MIT>, and GPL version 2 or later +# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# Please report bugs or propose patches to: +# <https://github.com/gnulib-modules/bootstrap/issues> -# Please report bugs or propose patches to gary@gnu.org. +# Set a version string for this script. +scriptversion=2019-02-19.15; # UTC ## ------ ## @@ -1415,7 +1572,7 @@ # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. +# starting with '# Written by ' and ending with '# Copyright'. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the @@ -1427,7 +1584,7 @@ # to display verbose messages only when your user has specified # '--verbose'. # -# After sourcing this file, you can plug processing for additional +# After sourcing this file, you can plug in processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. @@ -1476,8 +1633,8 @@ ## ------------------------- ## # This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. +# in the main code. A hook is just a list of function names that can be +# run in order later on. # func_hookable FUNC_NAME # ----------------------- @@ -1510,7 +1667,8 @@ # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +# Remove HOOK_FUNC from the list of hook functions to be called by +# FUNC_NAME. func_remove_hook () { $debug_cmd @@ -1519,10 +1677,28 @@ } +# func_propagate_result FUNC_NAME_A FUNC_NAME_B +# --------------------------------------------- +# If the *_result variable of FUNC_NAME_A _is set_, assign its value to +# *_result variable of FUNC_NAME_B. +func_propagate_result () +{ + $debug_cmd + + func_propagate_result_result=: + if eval "test \"\${${1}_result+set}\" = set" + then + eval "${2}_result=\$${1}_result" + else + func_propagate_result_result=false + fi +} + + # func_run_hooks FUNC_NAME ARG... # --------------------------------- # Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more +# It's assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. @@ -1532,22 +1708,19 @@ case " $hookable_fns " in *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; + *) func_fatal_error "'$1' does not support hook functions." ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + func_unset "${_G_hook}_result" + eval $_G_hook '${1+"$@"}' + func_propagate_result $_G_hook func_run_hooks + if $func_propagate_result_result; then + eval set dummy "$func_run_hooks_result"; shift + fi done - - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result } @@ -1557,10 +1730,18 @@ ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed -# options in '<hooked_function_name>_result', escaped suitably for -# 'eval'. Like this: +# full positional parameter list from your hook function. You may remove +# or edit any options that you action, and then pass back the remaining +# unprocessed options in '<hooked_function_name>_result', escaped +# suitably for 'eval'. +# +# The '<hooked_function_name>_result' variable is automatically unset +# before your hook gets called; for best performance, only set the +# *_result variable when necessary (i.e. don't call the 'func_quote' +# function unnecessarily because it can be an expensive operation on some +# machines). +# +# Like this: # # my_options_prep () # { @@ -1570,9 +1751,8 @@ # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). Leave +# # my_options_prep_result variable intact. # } # func_add_hook func_options_prep my_options_prep # @@ -1581,25 +1761,36 @@ # { # $debug_cmd # -# # Note that for efficiency, we parse as many options as we can +# args_changed=false +# +# # Note that, for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@" in case we need it later, +# # if $args_changed was set to 'true'. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# # Only call 'func_quote' here if we processed at least one argument. +# if $args_changed; then +# func_quote eval ${1+"$@"} +# my_silent_option_result=$func_quote_result +# fi # } # func_add_hook func_parse_options my_silent_option # @@ -1610,17 +1801,26 @@ # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." -# -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish ARG... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + func_run_hooks func_options ${1+"$@"} + func_propagate_result func_run_hooks func_options_finish +} + + # func_options ARG... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1630,17 +1830,27 @@ { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_options_quoted=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + func_unset func_${my_func}_result + func_unset func_run_hooks_result + eval func_$my_func '${1+"$@"}' + func_propagate_result func_$my_func func_options + if $func_propagate_result_result; then + eval set dummy "$func_options_result"; shift + _G_options_quoted=: + fi + done - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + $_G_options_quoted || { + # As we (func_options) are top-level options-parser function and + # nobody quoted "$@" for us yet, we need to do it explicitly for + # caller. + func_quote eval ${1+"$@"} + func_options_result=$func_quote_result + } } @@ -1649,9 +1859,8 @@ # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning. +# needs to propagate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before returning. func_hookable func_options_prep func_options_prep () { @@ -1662,9 +1871,7 @@ opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} - - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + func_propagate_result func_run_hooks func_options_prep } @@ -1676,25 +1883,32 @@ { $debug_cmd - func_parse_options_result= - + _G_parse_options_requote=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift + func_propagate_result func_run_hooks func_parse_options + if $func_propagate_result_result; then + eval set dummy "$func_parse_options_result"; shift + # Even though we may have changed "$@", we passed the "$@" array + # down into the hook and it quoted it for us (because we are in + # this if-branch). No need to quote it again. + _G_parse_options_requote=false + fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + # We expect that one of the options parsed in this function matches + # and thus we remove _G_opt from "$@" and need to re-quote. + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" + func_echo "enabling shell trace mode" >&2 $debug_cmd ;; @@ -1704,7 +1918,10 @@ ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_parse_options_requote=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1757,15 +1974,24 @@ shift ;; - --) break ;; + --) _G_parse_options_requote=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + if $_G_match_parse_options; then + _G_parse_options_requote=: + fi done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + if $_G_parse_options_requote; then + # save modified positional parameters for caller + func_quote eval ${1+"$@"} + func_parse_options_result=$func_quote_result + fi } @@ -1782,12 +2008,10 @@ test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} + func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result } @@ -1843,8 +2067,8 @@ # func_split_equals STRING # ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. +# Set func_split_equals_lhs and func_split_equals_rhs shell variables +# after splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ @@ -1859,8 +2083,9 @@ func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= + if test "x$func_split_equals_lhs" = "x$1"; then + func_split_equals_rhs= + fi }' else # ...otherwise fall back to using expr, which is often a shell builtin. @@ -1870,7 +2095,7 @@ func_split_equals_lhs=`expr "x$1" : 'x\(^=*\)'` func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ + test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x^=*=\(.*\)$'` } fi #func_split_equals @@ -1896,7 +2121,7 @@ { $debug_cmd - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt @@ -1938,31 +2163,44 @@ # func_version # ------------ # Echo version message to standard output and exit. +# The version message is extracted from the calling file's header +# comments, with leading '# ' stripped: +# 1. First display the progname and version +# 2. Followed by the header comment line matching /^# Written by / +# 3. Then a blank line followed by the first following line matching +# /^# Copyright / +# 4. Immediately followed by any lines between the previous matches, +# except lines preceding the intervening completely blank line. +# For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\) 0-9,-* ,-\(1-90-9* \)|\1 \2| - p + /^# Written by /!b + s|^# ||; p; n + + :fwd2blnk + /./ { + n + b fwd2blnk } - /^# Written by / { - s|^# || - p + p; n + + :holdwrnt + s|^# || + s|^# *$|| + /^Copyright /!{ + /./H + n + b holdwrnt } - /^warranty; /q' < "$progpath" + + s|\((C)\) 0-9,-* ,-\(1-90-9* \)|\1 \2| + G + s|\(\n\)\n*|\1|g + p; q' < "$progpath" exit $? } @@ -1972,12 +2210,12 @@ # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. -scriptversion='(GNU libtool) 2.4.6' +scriptversion='(GNU libtool) 2.4.7' # func_echo ARG... @@ -2068,7 +2306,7 @@ compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.6 + version: $progname (GNU libtool) 2.4.7 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2270,6 +2508,8 @@ nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2293,11 +2533,16 @@ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote eval ${1+"$@"} + libtool_options_prep_result=$func_quote_result + fi } func_add_hook func_options_prep libtool_options_prep @@ -2309,9 +2554,12 @@ { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2386,15 +2634,20 @@ func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote eval ${1+"$@"} + libtool_parse_options_result=$func_quote_result + fi } func_add_hook func_parse_options libtool_parse_options @@ -2415,17 +2668,10 @@ # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" - case $host in - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac + # Keeping compiler generated duplicates in $postdeps and $predeps is not + # harmful, and is necessary in a majority of systems that use it to satisfy + # symbol dependencies. + opt_duplicate_compiler_generated_deps=: $opt_help || { # Sanity checks first: @@ -2451,8 +2697,8 @@ } # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result + func_quote eval ${1+"$@"} + libtool_validate_options_result=$func_quote_result } func_add_hook func_validate_options libtool_validate_options @@ -3418,8 +3664,8 @@ esac done - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ + func_quote_arg pretty "$libobj" + test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '~#^*{};<>?"'"'"' &()|`$' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" @@ -3492,8 +3738,8 @@ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result + func_quote_arg pretty "$srcfile" + qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then @@ -3648,7 +3894,8 @@ -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler + -Wc,FLAG + -Xcompiler FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. @@ -3754,6 +4001,8 @@ -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wa,FLAG + -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) @@ -4096,8 +4345,8 @@ case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " + func_quote_arg pretty "$nonopt" + install_prog="$func_quote_arg_result " arg=$1 shift else @@ -4107,8 +4356,8 @@ # The real first argument should be the name of the installation program. # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *\\\ /cp\ *) install_cp=: ;; @@ -4165,12 +4414,12 @@ esac # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then - func_quote_for_eval "$arg2" + func_quote_arg pretty "$arg2" fi - func_append install_shared_prog " $func_quote_for_eval_result" + func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ @@ -4181,8 +4430,8 @@ if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" + func_quote_arg pretty "$install_override_mode" + func_append install_shared_prog " -m $func_quote_arg_result" fi fi @@ -4478,8 +4727,8 @@ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$relink_command" + eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else @@ -5258,7 +5507,8 @@ if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + func_quote_arg pretty "$ECHO" + qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -5268,7 +5518,7 @@ \$1 _LTECHO_EOF' } - ECHO=\"$qECHO\" + ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to @@ -6611,9 +6861,9 @@ while test "$#" -gt 0; do arg=$1 shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" + func_quote_arg pretty,unquoted "$arg" + qarg=$func_quote_arg_unquoted_result + func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then @@ -6849,6 +7099,13 @@ prev= continue ;; + xassembler) + func_append compiler_flags " -Xassembler $qarg" + prev= + func_append compile_command " -Xassembler $qarg" + func_append finalize_command " -Xassembler $qarg" + continue + ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" @@ -7019,7 +7276,7 @@ # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; @@ -7039,7 +7296,7 @@ esac elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -7069,8 +7326,20 @@ prev=xcompiler continue ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. + -pthread) + case $host in + *solaris2*) ;; + *) + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + ;; + esac + continue + ;; + -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" @@ -7211,9 +7480,9 @@ save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" + func_quote_arg pretty "$flag" + func_append arg " $func_quote_arg_result" + func_append compiler_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" @@ -7227,16 +7496,21 @@ save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" + func_quote_arg pretty "$flag" + func_append arg " $wl$func_quote_arg_result" + func_append compiler_flags " $wl$func_quote_arg_result" + func_append linker_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; + -Xassembler) + prev=xassembler + continue + ;; + -Xcompiler) prev=xcompiler continue @@ -7254,8 +7528,8 @@ # -msg_* for osf cc -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; # Flags to be passed through unchanged, with rationale: @@ -7274,12 +7548,15 @@ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang + # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC + # -Wa,* Pass flags directly to the assembler -64|-mips0-9|-r0-90-9*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t45*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*) + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" @@ -7300,15 +7577,15 @@ continue else # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result fi ;; # Some other compiler flag. -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; *.$objext) @@ -7428,8 +7705,8 @@ *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; esac # arg @@ -8634,7 +8911,7 @@ test CXX = "$tagname" && { case $host_os in linux*) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi @@ -8807,7 +9084,7 @@ # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) + darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor @@ -8898,7 +9175,7 @@ versuffix=.$current.$revision ;; - freebsd-elf) + freebsd-elf | midnightbsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision @@ -9124,7 +9401,7 @@ *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -9935,8 +10212,8 @@ for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10029,8 +10306,8 @@ eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10504,12 +10781,13 @@ elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty "$var_value" + relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote eval cd "`pwd`" + func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" + relink_command=$func_quote_arg_unquoted_result fi # Only actually do things if not in dry run mode. @@ -10749,13 +11027,15 @@ elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty,unquoted "$var_value" + relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote eval cd "`pwd`" + relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + func_quote_arg pretty,unquoted "$relink_command" + relink_command=$func_quote_arg_unquoted_result if test yes = "$hardcode_automatic"; then relink_command= fi
View file
_service:tar_scm:libnl-3.5.0.tar.gz/build-aux/missing -> _service:tar_scm:libnl-3.7.0.tar.gz/build-aux/missing
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify
View file
_service:tar_scm:libnl-3.5.0.tar.gz/build-aux/test-driver -> _service:tar_scm:libnl-3.7.0.tar.gz/build-aux/test-driver
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2021 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,11 +42,13 @@ { cat <<END Usage: - test-driver --test-name=NAME --log-file=PATH --trs-file=PATH - --expect-failure={yes|no} --color-tests={yes|no} - --enable-hard-errors={yes|no} -- + test-driver --test-name NAME --log-file PATH --trs-file PATH + --expect-failure {yes|no} --color-tests {yes|no} + --enable-hard-errors {yes|no} -- TEST-SCRIPT TEST-SCRIPT-ARGUMENTS + The '--test-name', '--log-file' and '--trs-file' options are mandatory. +See the GNU Automake documentation for information. END } @@ -103,8 +105,11 @@ trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 -# Test script is run here. -"$@" >$log_file 2>&1 +# Test script is run here. We create the file first, then append to it, +# to ameliorate tests themselves also writing to the log file. Our tests +# don't, but others can (automake bug#35762). +: >"$log_file" +"$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then @@ -126,7 +131,7 @@ # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>$log_file +echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name"
View file
_service:tar_scm:libnl-3.5.0.tar.gz/configure -> _service:tar_scm:libnl-3.7.0.tar.gz/configure
Changed
@@ -1,9 +1,10 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libnl 3.5.0. +# Generated by GNU Autoconf 2.71 for libnl 3.7.0. # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -14,14 +15,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -31,46 +34,46 @@ fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi +if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -79,13 +82,6 @@ fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -94,8 +90,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -107,30 +107,10 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -152,20 +132,22 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -185,12 +167,15 @@ as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO @@ -205,30 +190,38 @@ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -236,14 +229,21 @@ esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -261,18 +261,19 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." @@ -299,6 +300,7 @@ } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -316,6 +318,14 @@ as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -330,7 +340,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -339,7 +349,7 @@ X"$as_dir" : 'X\(//\)^/' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*^/\)\/\/*^/^/*\/*$/{ s//\1/ q @@ -378,12 +388,13 @@ # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -395,18 +406,27 @@ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR LINENO LOG_FD # ---------------------------------------- @@ -418,9 +438,9 @@ as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -447,7 +467,7 @@ $as_expr X/"$0" : '.*/\(^/^/*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\(^/^/*\)\/*$/{ s//\1/ q @@ -491,7 +511,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -505,6 +525,10 @@ exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -518,6 +542,13 @@ ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO("message") and AS_ECHO_N("message"), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -587,53 +618,51 @@ # Identity of this package. PACKAGE_NAME='libnl' PACKAGE_TARNAME='libnl' -PACKAGE_VERSION='3.5.0' -PACKAGE_STRING='libnl 3.5.0' +PACKAGE_VERSION='3.7.0' +PACKAGE_STRING='libnl 3.7.0' PACKAGE_BUGREPORT='' PACKAGE_URL='http://www.infradead.org/~tgr/libnl/' # Factoring default headers for most tests. ac_includes_default="\ -#include <stdio.h> -#ifdef HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -# include <sys/stat.h> +#include <stddef.h> +#ifdef HAVE_STDIO_H +# include <stdio.h> #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # include <stdlib.h> -# include <stddef.h> -#else -# ifdef HAVE_STDLIB_H -# include <stdlib.h> -# endif #endif #ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include <memory.h> -# endif # include <string.h> #endif -#ifdef HAVE_STRINGS_H -# include <strings.h> -#endif #ifdef HAVE_INTTYPES_H # include <inttypes.h> #endif #ifdef HAVE_STDINT_H # include <stdint.h> #endif +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif #ifdef HAVE_UNISTD_H # include <unistd.h> #endif" +ac_header_c_list= enable_option_checking=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS subdirs +ENABLE_STATIC_FALSE +ENABLE_STATIC_TRUE DISABLE_PTHREADS_FALSE DISABLE_PTHREADS_TRUE ENABLE_CLI_INSTALL_SBIN_FALSE @@ -652,7 +681,6 @@ PKG_CONFIG YACC FLEX -CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL @@ -663,6 +691,7 @@ RANLIB DLLTOOL OBJDUMP +FILECMD LN_S NM ac_ct_DUMPBIN @@ -710,6 +739,9 @@ AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V +CSCOPE +ETAGS +CTAGS am__untar am__tar AMTAR @@ -752,6 +784,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -799,7 +832,6 @@ LIBS CPPFLAGS LT_SYS_LIBRARY_PATH -CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR @@ -843,6 +875,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -872,8 +905,6 @@ *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -914,9 +945,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*^-+._$as_cr_alnum" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/-+./_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/-+./_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -940,9 +971,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\(^=*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*^-+._$as_cr_alnum" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/-+./_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/-+./_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1095,6 +1126,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1144,9 +1184,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\(^=*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*^-+._$as_cr_alnum" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/-+./_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/-+./_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1160,9 +1200,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*^-+._$as_cr_alnum" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/-+./_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/-+./_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1206,9 +1246,9 @@ *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*^-._$as_cr_alnum" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1224,7 +1264,7 @@ case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1232,7 +1272,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1288,7 +1328,7 @@ X"$as_myself" : 'X\(//\)^/' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*^/\)\/\/*^/^/*\/*$/{ s//\1/ q @@ -1345,7 +1385,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libnl 3.5.0 to adapt to many kinds of systems. +\`configure' configures libnl 3.7.0 to adapt to many kinds of systems. Usage: $0 OPTION... VAR=VALUE... @@ -1385,6 +1425,7 @@ --sysconfdir=DIR read-only single-machine data PREFIX/etc --sharedstatedir=DIR modifiable architecture-independent data PREFIX/com --localstatedir=DIR modifiable single-machine data PREFIX/var + --runstatedir=DIR modifiable per-process data LOCALSTATEDIR/run --libdir=DIR object code libraries EPREFIX/lib --includedir=DIR C header files PREFIX/include --oldincludedir=DIR C header files for non-gcc /usr/include @@ -1415,7 +1456,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libnl 3.5.0:";; + short | recursive ) echo "Configuration of libnl 3.7.0:";; esac cat <<\_ACEOF @@ -1466,7 +1507,6 @@ you have headers in a nonstandard directory <include dir> LT_SYS_LIBRARY_PATH User-defined run-time library search path. - CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path @@ -1496,9 +1536,9 @@ case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.\\/||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.\\/||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/^\\/*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/^\\/*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1526,7 +1566,8 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1534,7 +1575,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1543,10 +1584,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libnl configure 3.5.0 -generated by GNU Autoconf 2.69 +libnl configure 3.7.0 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1563,14 +1604,14 @@ ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1578,14 +1619,15 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1601,14 +1643,14 @@ ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1616,17 +1658,18 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1648,120 +1691,44 @@ ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case <limits.h> declares $2. @@ -1769,16 +1736,9 @@ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif + which can conflict with char $2 (); below. */ +#include <limits.h> #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -1796,122 +1756,56 @@ #endif int -main () +main (void) { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*? '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\(^$ac_unsafe_a^$ac_unsafe_z*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac -} # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libnl $as_me 3.5.0, which was -generated by GNU Autoconf 2.69. Invocation command line was +It was created by libnl $as_me 3.7.0, which was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -1944,8 +1838,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -1980,7 +1878,7 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2015,11 +1913,13 @@ # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2030,8 +1930,8 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2055,7 +1955,7 @@ ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2063,14 +1963,14 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2078,15 +1978,15 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2094,8 +1994,8 @@ echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2109,63 +2009,48 @@ # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2175,19 +2060,434 @@ # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in \\/* | ?:\\/* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif + +#include <stddef.h> +#include <stdarg.h> +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return pi; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not \xHH hex character constants. + These do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array '\''\x00'\'' == 0 ? 1 : -1; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_arrayFOO(a) == '\''x'\'' ? 1 : -1; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' + +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv0 || f (e, argv, 1) != argv1); +' + +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif + +#include <stdbool.h> +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->datai = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_arrayni.number; + dynamic_array0 = argv00; + dynamic_arrayni.number - 1 = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar0 == '\''x'\'' + || dynamic_arrayni.number - 1 != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int100), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" + +# Auxiliary files required by this configure script. +ac_aux_files="config.guess config.sub ltmain.sh compile ar-lib missing install-sh" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}/build-aux" + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2198,12 +2498,12 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -2212,24 +2512,24 @@ ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -2239,11 +2539,12 @@ fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2258,39 +2559,13 @@ ac_config_headers="$ac_config_headers lib/defs.h" -ac_aux_dir= -for ac_dir in build-aux "$srcdir"/build-aux; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 -fi -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +am__api_version='1.16' -am__api_version='1.16' -# Find a good install program. We prefer a C program (faster), + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install @@ -2304,20 +2579,25 @@ # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${ac_cv_path_install+y} +then : + printf %s "(cached) " >&6 +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /cC/* | \ + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + # Account for fact that we put trailing slashes in our PATH walk. +case $as_dir in #(( + ./ | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; @@ -2327,13 +2607,13 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else @@ -2341,12 +2621,12 @@ echo one > conftest.one echo two > conftest.two mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -2362,7 +2642,7 @@ rm -rf conftest.one conftest.two conftest.dir fi - if test "${ac_cv_path_install+set}" = set; then + if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -2372,8 +2652,8 @@ INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2383,8 +2663,8 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -2438,8 +2718,8 @@ as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= @@ -2458,26 +2738,23 @@ # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/\\$/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` +program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` + # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + + if test x"${MISSING+set}" != xset; then + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then @@ -2497,11 +2774,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -2509,11 +2787,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2524,11 +2806,11 @@ fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2537,11 +2819,12 @@ ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -2549,11 +2832,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2564,11 +2851,11 @@ fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -2576,8 +2863,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -2589,25 +2876,31 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 +printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${ac_cv_path_mkdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ + as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue + case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir ('*'coreutils) '* | \ + 'BusyBox '* | \ 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done @@ -2618,7 +2911,7 @@ fi test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then + if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a @@ -2628,18 +2921,19 @@ MKDIR_P="$ac_install_sh -d" fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AWK+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else @@ -2647,11 +2941,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2662,24 +2960,25 @@ fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +printf "%s\n" "$AWK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/^a-zA-Z0-9_/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/^a-zA-Z0-9_/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -2695,12 +2994,12 @@ rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2714,7 +3013,8 @@ rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : +if test ${enable_silent_rules+y} +then : enableval=$enable_silent_rules; fi @@ -2724,12 +3024,13 @@ *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +printf %s "checking whether $am_make supports nested variables... " >&6; } +if test ${am_cv_make_support_nested_variables+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -2741,8 +3042,8 @@ am_cv_make_support_nested_variables=no fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' @@ -2774,17 +3075,13 @@ # Define the identity of the package. PACKAGE='libnl' - VERSION='3.5.0' + VERSION='3.7.0' -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF +printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF +printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. @@ -2824,6 +3121,20 @@ +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi + +if test -z "$ETAGS"; then + ETAGS=etags +fi + +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi + + # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile @@ -2868,7 +3179,8 @@ fi # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : +if test ${enable_silent_rules+y} +then : enableval=$enable_silent_rules; fi @@ -2878,12 +3190,13 @@ *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +printf %s "checking whether $am_make supports nested variables... " >&6; } +if test ${am_cv_make_support_nested_variables+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -2895,8 +3208,8 @@ am_cv_make_support_nested_variables=no fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' @@ -2906,12 +3219,21 @@ fi AM_BACKSLASH='\' + + + + + + + + + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out @@ -2947,11 +3269,12 @@ fi done rm -f confinc.* confmf.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -$as_echo "${_am_result}" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : +if test ${enable_dependency_tracking+y} +then : enableval=$enable_dependency_tracking; fi @@ -2977,11 +3300,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2989,11 +3313,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3004,11 +3332,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3017,11 +3345,12 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3029,11 +3358,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3044,11 +3377,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3056,8 +3389,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3070,11 +3403,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3082,11 +3416,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3097,11 +3435,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3110,11 +3448,12 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3123,15 +3462,19 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3147,18 +3490,18 @@ # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3169,11 +3512,12 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3181,11 +3525,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3196,11 +3544,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3213,11 +3561,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3225,11 +3574,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3240,11 +3593,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3256,8 +3609,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3265,25 +3618,129 @@ fi fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +fi + + +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3293,7 +3750,7 @@ cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -3301,7 +3758,7 @@ /* end confdefs.h. */ int -main () +main (void) { ; @@ -3313,9 +3770,9 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest^ *//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest^ *//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -3336,11 +3793,12 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3357,7 +3815,7 @@ # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '^.*\(\..*\)'` fi @@ -3373,44 +3831,46 @@ done test "$ac_cv_exeext" = no && ac_cv_exeext= -else +else $as_nop ac_file='' fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3424,15 +3884,15 @@ * ) break;; esac done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -3441,7 +3901,7 @@ /* end confdefs.h. */ #include <stdio.h> int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -3453,8 +3913,8 @@ ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -3462,10 +3922,10 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -3473,39 +3933,40 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3519,11 +3980,12 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3532,31 +3994,32 @@ break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3566,29 +4029,33 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -3597,57 +4064,60 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -3662,94 +4132,144 @@ CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return pi; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array '\x00' == 0 ? 1 : -1; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_arrayFOO(a) == 'x' ? 1 : -1; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv0 || f (e, argv, 1) != argv1; - ; - return 0; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -3758,21 +4278,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=c + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +printf %s "checking whether $CC understands -c and -o together... " >&6; } +if test ${am_cv_prog_cc_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3800,8 +4322,8 @@ rm -f core conftest* unset am_i fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. @@ -3819,11 +4341,12 @@ depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +printf %s "checking dependency style of $depcc... " >&6; } +if test ${am_cv_CC_dependencies_compiler_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -3930,8 +4453,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -3946,16 +4469,18 @@ -if test -n "$ac_tool_prefix"; then + + if test -n "$ac_tool_prefix"; then for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -3963,11 +4488,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3978,11 +4507,11 @@ fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3995,11 +4524,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -4007,11 +4537,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4022,11 +4556,11 @@ fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4038,8 +4572,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -4048,11 +4582,12 @@ : ${AR=ar} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 -$as_echo_n "checking the archiver ($AR) interface... " >&6; } -if ${am_cv_ar_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 +printf %s "checking the archiver ($AR) interface... " >&6; } +if test ${am_cv_ar_interface+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4064,12 +4599,13 @@ /* end confdefs.h. */ int some_variable = 0; _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=ar @@ -4078,7 +4614,7 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=lib @@ -4089,7 +4625,7 @@ rm -f conftest.lib libconftest.a fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4097,8 +4633,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 -$as_echo "$am_cv_ar_interface" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 +printf "%s\n" "$am_cv_ar_interface" >&6; } case $am_cv_ar_interface in ar) @@ -4120,13 +4656,13 @@ MAJ_VERSION=3 -MIN_VERSION=5 +MIN_VERSION=7 MIC_VERSION=0 -LIBNL_GIT_SHA=7b167ef85f6eb4d7faca349302478b2dc121e309 +LIBNL_GIT_SHA=1bb416213c7038d0da9a6f5141c611f6dbcefedc -LIBNL_VERSION=3.5.0 +LIBNL_VERSION=3.7.0 LT_CURRENT=226 @@ -4144,11 +4680,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4156,11 +4693,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4171,11 +4712,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4184,11 +4725,12 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4196,11 +4738,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4211,11 +4757,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -4223,8 +4769,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4237,11 +4783,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4249,11 +4796,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4264,11 +4815,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4277,11 +4828,12 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4290,15 +4842,19 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4314,18 +4870,18 @@ # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4336,11 +4892,12 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4348,11 +4905,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4363,11 +4924,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4380,11 +4941,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4392,11 +4954,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4407,11 +4973,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4423,34 +4989,138 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi +else + CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4460,20 +5130,21 @@ cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -4483,29 +5154,33 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -4514,57 +5189,60 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4579,94 +5257,144 @@ CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return pi; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array '\x00' == 0 ? 1 : -1; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_arrayFOO(a) == 'x' ? 1 : -1; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv0 || f (e, argv, 1) != argv1; - ; - return 0; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -4675,21 +5403,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=c + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +printf %s "checking whether $CC understands -c and -o together... " >&6; } +if test ${am_cv_prog_cc_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -4717,8 +5447,8 @@ rm -f core conftest* unset am_i fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. @@ -4736,11 +5466,12 @@ depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +printf %s "checking dependency style of $depcc... " >&6; } +if test ${am_cv_CC_dependencies_compiler_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -4847,8 +5578,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -4866,14 +5597,15 @@ case `pwd` in *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac -macro_version='2.4.6' -macro_revision='2.4.6' +macro_version='2.4.7' +macro_revision='2.4.7' + @@ -4889,26 +5621,29 @@ ltmain=$ac_aux_dir/ltmain.sh -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else + + + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -4927,21 +5662,22 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -4981,8 +5717,8 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +printf %s "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -5008,12 +5744,12 @@ } case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; + printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +printf "%s\n" "printf" >&6; } ;; + print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +printf "%s\n" "print -r" >&6; } ;; + *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +printf "%s\n" "cat" >&6; } ;; esac @@ -5029,11 +5765,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" @@ -5047,10 +5784,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED @@ -5059,13 +5801,13 @@ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" + printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5093,8 +5835,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -5111,11 +5853,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -5123,10 +5866,15 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP @@ -5135,13 +5883,13 @@ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5169,16 +5917,17 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else @@ -5189,10 +5938,15 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP @@ -5201,13 +5955,13 @@ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5236,16 +5990,17 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +printf %s "checking for fgrep... " >&6; } +if test ${ac_cv_path_FGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else @@ -5256,10 +6011,15 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in fgrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP @@ -5268,13 +6028,13 @@ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" + printf "%s\n" 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5303,8 +6063,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +printf "%s\n" "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -5329,17 +6089,18 @@ # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : +if test ${with_gnu_ld+y} +then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else +else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -5368,15 +6129,16 @@ ;; esac elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${lt_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -5405,18 +6167,19 @@ LD=$lt_cv_path_LD if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${lt_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) @@ -5427,8 +6190,8 @@ ;; esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -5439,11 +6202,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test ${lt_cv_path_NM+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM @@ -5468,13 +6232,13 @@ mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -5493,8 +6257,8 @@ : ${lt_cv_path_NM=no} fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +printf "%s\n" "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else @@ -5507,11 +6271,12 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DUMPBIN+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else @@ -5519,11 +6284,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5534,11 +6303,11 @@ fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +printf "%s\n" "$DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5551,11 +6320,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DUMPBIN+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else @@ -5563,11 +6333,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5578,11 +6352,11 @@ fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5594,15 +6368,15 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -5623,11 +6397,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +printf %s "checking the name lister ($NM) interface... " >&6; } +if test ${lt_cv_nm_interface+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) @@ -5643,26 +6418,27 @@ fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +printf "%s\n" "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +printf "%s\n" "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +printf %s "checking the maximum length of command line arguments... " >&6; } +if test ${lt_cv_sys_max_cmd_len+y} +then : + printf %s "(cached) " >&6 +else $as_nop i=0 teststring=ABCD @@ -5704,7 +6480,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -5747,7 +6523,7 @@ sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.* //'` + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.* //'` else lt_cv_sys_max_cmd_len=32768 fi @@ -5789,11 +6565,11 @@ fi if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 +printf "%s\n" "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -5837,11 +6613,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +printf %s "checking how to convert $build file names to $host format... " >&6; } +if test ${lt_cv_to_host_file_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $host in *-*-mingw* ) case $build in @@ -5877,18 +6654,19 @@ fi to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +printf %s "checking how to convert $build file names to toolchain format... " >&6; } +if test ${lt_cv_to_tool_file_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in @@ -5904,22 +6682,23 @@ fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +printf %s "checking for $LD option to reload object files... " >&6; } +if test ${lt_cv_ld_reload_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; @@ -5950,13 +6729,122 @@ if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. +set dummy ${ac_tool_prefix}file; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FILECMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$FILECMD"; then + ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_FILECMD="${ac_tool_prefix}file" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +FILECMD=$ac_cv_prog_FILECMD +if test -n "$FILECMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 +printf "%s\n" "$FILECMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_FILECMD"; then + ac_ct_FILECMD=$FILECMD + # Extract the first word of "file", so it can be a program name with args. +set dummy file; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_FILECMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_FILECMD"; then + ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_FILECMD="file" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD +if test -n "$ac_ct_FILECMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 +printf "%s\n" "$ac_ct_FILECMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_FILECMD" = x; then + FILECMD=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FILECMD=$ac_ct_FILECMD + fi +else + FILECMD="$ac_cv_prog_FILECMD" +fi + + + + + + + +if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else @@ -5964,11 +6852,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5979,11 +6871,11 @@ fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +printf "%s\n" "$OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5992,11 +6884,12 @@ ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else @@ -6004,11 +6897,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6019,11 +6916,11 @@ fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -6031,8 +6928,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -6051,11 +6948,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +printf %s "checking how to recognize dependent libraries... " >&6; } +if test ${lt_cv_deplibs_check_method+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' @@ -6081,7 +6979,7 @@ bsdi45*) lt_cv_deplibs_check_method='file_magic ELF 0-90-9*-bit MLSB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -6115,14 +7013,14 @@ lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i3-986 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -6136,7 +7034,7 @@ ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s0-90-90-9|ELF-0-90-9) shared object file - IA64' @@ -6183,7 +7081,7 @@ newos6*) lt_cv_deplibs_check_method='file_magic ELF 0-90-9*-bit MLSB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -6251,8 +7149,8 @@ esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no @@ -6296,11 +7194,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else @@ -6308,11 +7207,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6323,11 +7226,11 @@ fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +printf "%s\n" "$DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6336,11 +7239,12 @@ ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else @@ -6348,11 +7252,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6363,11 +7271,11 @@ fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -6375,8 +7283,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -6396,11 +7304,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +printf %s "checking how to associate runtime and link libraries... " >&6; } +if test ${lt_cv_sharedlib_from_linklib_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in @@ -6423,8 +7332,8 @@ esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -6439,11 +7348,12 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6451,11 +7361,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6466,11 +7380,11 @@ fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6483,11 +7397,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6495,11 +7410,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6510,11 +7429,11 @@ fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6526,8 +7445,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6535,42 +7454,60 @@ fi : ${AR=ar} -: ${AR_FLAGS=cru} +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because thats what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else + + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. + + + + + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +printf %s "checking for archiver @FILE support... " >&6; } +if test ${lt_cv_ar_at_file+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. @@ -6578,7 +7515,7 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ @@ -6587,11 +7524,11 @@ rm -f conftest.* libconftest.a fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +printf "%s\n" "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= @@ -6608,11 +7545,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -6620,11 +7558,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6635,11 +7577,11 @@ fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6648,11 +7590,12 @@ ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -6660,11 +7603,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6675,11 +7622,11 @@ fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -6687,8 +7634,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -6707,11 +7654,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -6719,11 +7667,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6734,11 +7686,11 @@ fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6747,11 +7699,12 @@ ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -6759,11 +7712,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6774,11 +7731,11 @@ fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -6786,8 +7743,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -6876,11 +7833,12 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +printf %s "checking command to parse $NM output from $compiler object... " >&6; } +if test ${lt_cv_sys_global_symbol_pipe+y} +then : + printf %s "(cached) " >&6 +else $as_nop # These are sane defaults that work on at least a few old systems. # They come from Ultrix. What could be older than Ultrix?!! ;) @@ -6935,7 +7893,7 @@ if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -6953,20 +7911,20 @@ # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -6990,7 +7948,7 @@ if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, + # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ @@ -7008,9 +7966,9 @@ " s1~prfx {split(s1,t,\"@\"); print f,t1,substr(t1,length(prfx))}"\ " ' prfx=^$ac_symprfx" else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.* \($symcode$symcode*\) *$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.* \($symcode$symcode*\) *$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -7032,14 +7990,14 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then @@ -7108,7 +8066,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi @@ -7143,11 +8101,11 @@ lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +printf "%s\n" "failed" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +printf "%s\n" "ok" >&6; } fi # Response file support. @@ -7193,13 +8151,14 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +printf %s "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : +if test ${with_sysroot+y} +then : withval=$with_sysroot; -else +else $as_nop with_sysroot=no fi @@ -7212,29 +8171,30 @@ fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +printf "%s\n" "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +printf "%s\n" "${lt_sysroot:-no}" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +printf %s "checking for a working dd... " >&6; } +if test ${ac_cv_path_lt_DD+y} +then : + printf %s "(cached) " >&6 +else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} @@ -7245,10 +8205,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in dd + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ @@ -7268,15 +8233,16 @@ rm -f conftest.i conftest2.i conftest.out fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +printf "%s\n" "$ac_cv_path_lt_DD" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +printf %s "checking how to truncate binary pipes... " >&6; } +if test ${lt_cv_truncate_bin+y} +then : + printf %s "(cached) " >&6 +else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= @@ -7287,8 +8253,8 @@ rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +printf "%s\n" "$lt_cv_truncate_bin" >&6; } @@ -7311,7 +8277,8 @@ } # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : +if test ${enable_libtool_lock+y} +then : enableval=$enable_libtool_lock; fi @@ -7327,9 +8294,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -7347,10 +8314,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -7362,7 +8329,7 @@ ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -7385,10 +8352,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -7396,7 +8363,7 @@ emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -7404,7 +8371,7 @@ emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -7426,16 +8393,16 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -7489,11 +8456,12 @@ # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +printf %s "checking whether the C compiler needs -belf... " >&6; } +if test ${lt_cv_cc_needs_belf+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7504,19 +8472,20 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_cc_needs_belf=yes -else +else $as_nop lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7525,8 +8494,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS @@ -7539,9 +8508,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -7576,11 +8545,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else @@ -7588,11 +8558,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7603,11 +8577,11 @@ fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +printf "%s\n" "$MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7616,11 +8590,12 @@ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else @@ -7628,11 +8603,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7643,11 +8622,11 @@ fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then @@ -7655,8 +8634,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL @@ -7666,11 +8645,12 @@ fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test ${lt_cv_path_mainfest_tool+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out @@ -7680,8 +8660,8 @@ fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -7696,11 +8676,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else @@ -7708,11 +8689,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7723,11 +8708,11 @@ fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +printf "%s\n" "$DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7736,11 +8721,12 @@ ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else @@ -7748,11 +8734,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7763,11 +8753,11 @@ fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then @@ -7775,8 +8765,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL @@ -7788,11 +8778,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else @@ -7800,11 +8791,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7815,11 +8810,11 @@ fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +printf "%s\n" "$NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7828,11 +8823,12 @@ ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else @@ -7840,11 +8836,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7855,11 +8855,11 @@ fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +printf "%s\n" "$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then @@ -7867,8 +8867,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT @@ -7880,11 +8880,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LIPO+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else @@ -7892,11 +8893,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7907,11 +8912,11 @@ fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +printf "%s\n" "$LIPO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7920,11 +8925,12 @@ ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_LIPO+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else @@ -7932,11 +8938,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7947,11 +8957,11 @@ fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +printf "%s\n" "$ac_ct_LIPO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then @@ -7959,8 +8969,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO @@ -7972,11 +8982,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else @@ -7984,11 +8995,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7999,11 +9014,11 @@ fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +printf "%s\n" "$OTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8012,11 +9027,12 @@ ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else @@ -8024,11 +9040,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8039,11 +9059,11 @@ fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +printf "%s\n" "$ac_ct_OTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then @@ -8051,8 +9071,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL @@ -8064,11 +9084,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else @@ -8076,11 +9097,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8091,11 +9116,11 @@ fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +printf "%s\n" "$OTOOL64" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8104,11 +9129,12 @@ ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else @@ -8116,11 +9142,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8131,11 +9161,11 @@ fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +printf "%s\n" "$ac_ct_OTOOL64" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then @@ -8143,8 +9173,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 @@ -8179,11 +9209,12 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +printf %s "checking for -single_module linker flag... " >&6; } +if test ${lt_cv_apple_cc_single_mod+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override @@ -8212,14 +9243,15 @@ rm -f conftest.* fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +printf %s "checking for -exported_symbols_list linker flag... " >&6; } +if test ${lt_cv_ld_exported_symbols_list+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym @@ -8228,39 +9260,41 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_ld_exported_symbols_list=yes -else +else $as_nop lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +printf %s "checking for -force_load linker flag... " >&6; } +if test ${lt_cv_ld_force_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 + $AR $AR_FLAGS libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -8280,24 +9314,19 @@ rm -rf conftest.dSYM fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +printf "%s\n" "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.012) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin91*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.012,.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.012,*|,*powerpc*-darwin5-8*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -8352,286 +9381,43 @@ esac } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes +ac_header= ac_cache= +for ac_item in $ac_header_c_list do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - done - ac_cv_prog_CPP=$CPP -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : -int -main () -{ +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - @@ -8647,7 +9433,8 @@ # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : +if test ${enable_shared+y} +then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -8665,7 +9452,7 @@ IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_shared=yes fi @@ -8678,7 +9465,8 @@ # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : +if test ${enable_static+y} +then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -8696,7 +9484,7 @@ IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_static=yes fi @@ -8710,7 +9498,8 @@ # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : +if test ${with_pic+y} +then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; @@ -8727,7 +9516,7 @@ IFS=$lt_save_ifs ;; esac -else +else $as_nop pic_mode=default fi @@ -8739,7 +9528,8 @@ # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : +if test ${enable_fast_install+y} +then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -8757,7 +9547,7 @@ IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_fast_install=yes fi @@ -8771,11 +9561,12 @@ shared_archive_member_spec= case $host,$enable_shared in power*-*-aix5-9*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +printf %s "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : +if test ${with_aix_soname+y} +then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; @@ -8784,18 +9575,19 @@ ;; esac lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + if test ${lt_cv_with_aix_soname+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +printf "%s\n" "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', @@ -8877,11 +9669,12 @@ setopt NO_GLOB_SUBST fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +printf %s "checking for objdir... " >&6; } +if test ${lt_cv_objdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then @@ -8892,17 +9685,15 @@ fi rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF +printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h @@ -8923,8 +9714,8 @@ ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -8948,11 +9739,12 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +printf %s "checking for ${ac_tool_prefix}file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAGIC_CMD in \\/* | ?:\\/*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9001,11 +9793,11 @@ MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9014,11 +9806,12 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +printf %s "checking for file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAGIC_CMD in \\/* | ?:\\/*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9067,11 +9860,11 @@ MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9156,11 +9949,12 @@ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test ${lt_cv_prog_compiler_rtti_exceptions+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9191,8 +9985,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -9433,7 +10227,7 @@ lt_prog_compiler_static='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ 1-7.* | *Sun*Fortran*\ 8.0-3*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' @@ -9549,26 +10343,28 @@ ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9599,8 +10395,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in @@ -9628,11 +10424,12 @@ # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -9656,8 +10453,8 @@ LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : @@ -9671,11 +10468,12 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -9718,19 +10516,20 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -9773,8 +10572,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } @@ -9782,19 +10581,19 @@ hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -9806,8 +10605,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= @@ -9851,15 +10650,15 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -9911,7 +10710,7 @@ whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ 01.* | *\ 2.0-9.* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -10023,6 +10822,7 @@ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes + file_list_spec='@' ;; interix3-9*) @@ -10037,7 +10837,7 @@ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -10080,7 +10880,7 @@ compiler_needs_object=yes ;; esac - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes @@ -10092,7 +10892,7 @@ if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi @@ -10108,7 +10908,7 @@ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -10240,7 +11040,7 @@ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\(^B*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\(^B*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -10362,21 +11162,23 @@ if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10391,7 +11193,7 @@ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10415,21 +11217,23 @@ if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10444,7 +11248,7 @@ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10507,12 +11311,12 @@ cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl*) - # Native MSVC + cl* | icl*) + # Native MSVC or ICC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes @@ -10553,7 +11357,7 @@ fi' ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. @@ -10594,8 +11398,8 @@ output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -10629,7 +11433,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -10695,11 +11499,12 @@ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +printf %s "checking if $CC understands -b... " >&6; } +if test ${lt_cv_prog_compiler__b+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" @@ -10723,8 +11528,8 @@ LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -10764,28 +11569,30 @@ # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test ${lt_cv_irix_exported_symbol+y} +then : + printf %s "(cached) " >&6 +else $as_nop save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_irix_exported_symbol=yes -else +else $as_nop lt_cv_irix_exported_symbol=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi @@ -10877,6 +11684,7 @@ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes + file_list_spec='@' ;; osf3*) @@ -11065,8 +11873,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +printf "%s\n" "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -11102,18 +11910,19 @@ # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +printf %s "checking whether -lc should be explicitly linked in... " >&6; } +if test ${lt_cv_archive_cmds_need_lc+y} +then : + printf %s "(cached) " >&6 +else $as_nop $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -11131,7 +11940,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no @@ -11145,8 +11954,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac @@ -11305,8 +12114,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in @@ -11568,7 +12377,7 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/./-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/./-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; @@ -11578,14 +12387,14 @@ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/./-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/./-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/./-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -11604,7 +12413,7 @@ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\(a-zA-Z\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\(a-zA-Z\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -11641,7 +12450,7 @@ ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/./-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -11674,7 +12483,7 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -11867,9 +12676,10 @@ shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_shlibpath_overrides_runpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -11879,19 +12689,21 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : +if ac_fn_c_try_link "$LINENO" +then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null +then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -12126,8 +12938,8 @@ dynamic_linker=no ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -12248,8 +13060,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || @@ -12273,8 +13085,8 @@ # directories. hardcode_action=unsupported fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then @@ -12318,11 +13130,12 @@ darwin*) # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12331,32 +13144,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else +else $as_nop lt_cv_dlopen=dyld lt_cv_dlopen_libs= @@ -12376,14 +13188,16 @@ *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : +if test "x$ac_cv_func_shl_load" = xyes +then : lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +printf %s "checking for shl_load in -ldld... " >&6; } +if test ${ac_cv_lib_dld_shl_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12392,41 +13206,42 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char shl_load (); int -main () +main (void) { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_shl_load=yes -else +else $as_nop ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes +then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else +else $as_nop ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : +if test "x$ac_cv_func_dlopen" = xyes +then : lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12435,37 +13250,37 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +printf %s "checking for dlopen in -lsvld... " >&6; } +if test ${ac_cv_lib_svld_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12474,37 +13289,37 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_svld_dlopen=yes -else +else $as_nop ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +printf %s "checking for dld_link in -ldld... " >&6; } +if test ${ac_cv_lib_dld_dld_link+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12513,30 +13328,29 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dld_link (); int -main () +main (void) { return dld_link (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_dld_link=yes -else +else $as_nop ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes +then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -12575,11 +13389,12 @@ save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +printf %s "checking whether a program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else @@ -12658,7 +13473,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -12676,16 +13491,17 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +printf %s "checking whether a statically linked program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self_static+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else @@ -12764,7 +13580,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -12782,8 +13598,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS @@ -12821,32 +13637,43 @@ striplib= old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +printf %s "checking whether stripping libraries is possible... " >&6; } +if test -z "$STRIP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +else + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + fi + ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; + esac + fi fi @@ -12861,13 +13688,13 @@ # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +printf %s "checking if libtool supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +printf "%s\n" "$can_build_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +printf %s "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -12891,15 +13718,15 @@ fi ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +printf "%s\n" "$enable_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +printf %s "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +printf "%s\n" "$enable_static" >&6; } @@ -12940,11 +13767,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FLEX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FLEX+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$FLEX"; then ac_cv_prog_FLEX="$FLEX" # Let the user override the test. else @@ -12952,11 +13780,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_FLEX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -12967,11 +13799,11 @@ fi FLEX=$ac_cv_prog_FLEX if test -n "$FLEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5 -$as_echo "$FLEX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5 +printf "%s\n" "$FLEX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -12982,11 +13814,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_YACC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_YACC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else @@ -12994,11 +13827,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13009,11 +13846,11 @@ fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 -$as_echo "$YACC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +printf "%s\n" "$YACC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -13021,16 +13858,17 @@ done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __cplusplus @@ -13043,7 +13881,7 @@ /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. + /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -13071,7 +13909,7 @@ iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap3; } bx; struct s *b = &bx; b->j = 5; @@ -13087,47 +13925,50 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_const=yes -else +else $as_nop ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -$as_echo "#define const /**/" >>confdefs.h +printf "%s\n" "#define const /**/" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +printf %s "checking for inline... " >&6; } +if test ${ac_cv_c_inline+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } +static $ac_kw foo_t static_foo (void) {return 0; } +$ac_kw foo_t foo (void) {return 0; } #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_inline=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +printf "%s\n" "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -13156,11 +13997,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $PKG_CONFIG in \\/* | ?:\\/*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. @@ -13170,11 +14012,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13186,11 +14032,11 @@ fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s\n" "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -13199,11 +14045,12 @@ ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_PKG_CONFIG in \\/* | ?:\\/*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. @@ -13213,11 +14060,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13229,11 +14080,11 @@ fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then @@ -13241,8 +14092,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG @@ -13254,30 +14105,30 @@ fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHECK" >&5 -$as_echo_n "checking for CHECK... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CHECK" >&5 +printf %s "checking for CHECK... " >&6; } if test -n "$CHECK_CFLAGS"; then pkg_cv_CHECK_CFLAGS="$CHECK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.0\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "check >= 0.9.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CHECK_CFLAGS=`$PKG_CONFIG --cflags "check >= 0.9.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -13291,10 +14142,10 @@ pkg_cv_CHECK_LIBS="$CHECK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.0\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "check >= 0.9.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CHECK_LIBS=`$PKG_CONFIG --libs "check >= 0.9.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -13308,8 +14159,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -13324,20 +14175,20 @@ # Put the nasty error message in config.log where it belongs echo "$CHECK_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Disabling building of unit tests" >&5 -$as_echo "$as_me: WARNING: *** Disabling building of unit tests" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** Disabling building of unit tests" >&5 +printf "%s\n" "$as_me: WARNING: *** Disabling building of unit tests" >&2;} has_check="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Disabling building of unit tests" >&5 -$as_echo "$as_me: WARNING: *** Disabling building of unit tests" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** Disabling building of unit tests" >&5 +printf "%s\n" "$as_me: WARNING: *** Disabling building of unit tests" >&2;} has_check="no" else CHECK_CFLAGS=$pkg_cv_CHECK_CFLAGS CHECK_LIBS=$pkg_cv_CHECK_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } has_check="yes" fi if test "$has_check" = 'yes'; then @@ -13351,18 +14202,20 @@ # Check whether --with-pkgconfigdir was given. -if test "${with_pkgconfigdir+set}" = set; then : +if test ${with_pkgconfigdir+y} +then : withval=$with_pkgconfigdir; pkgconfigdir="$withval" -else +else $as_nop pkgconfigdir='${libdir}/pkgconfig' fi # Check whether --enable-cli was given. -if test "${enable_cli+set}" = set; then : +if test ${enable_cli+y} +then : enableval=$enable_cli; enable_cli="$enableval" -else +else $as_nop enable_cli="yes" fi @@ -13396,23 +14249,19 @@ fi -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi -done - # Check whether --enable-pthreads was given. -if test "${enable_pthreads+set}" = set; then : +if test ${enable_pthreads+y} +then : enableval=$enable_pthreads; enable_pthreads="$enableval" -else +else $as_nop enable_pthreads="yes" fi @@ -13426,14 +14275,15 @@ if test "x$enable_pthreads" = "xno"; then -$as_echo "#define DISABLE_PTHREADS 1" >>confdefs.h +printf "%s\n" "#define DISABLE_PTHREADS 1" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock in -lpthread" >&5 -$as_echo_n "checking for pthread_mutex_lock in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_mutex_lock+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock in -lpthread" >&5 +printf %s "checking for pthread_mutex_lock in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_mutex_lock+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13442,52 +14292,59 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_mutex_lock (); int -main () +main (void) { return pthread_mutex_lock (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_mutex_lock=yes -else +else $as_nop ac_cv_lib_pthread_pthread_mutex_lock=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_mutex_lock" >&6; } -if test "x$ac_cv_lib_pthread_pthread_mutex_lock" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREAD 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_lock" >&6; } +if test "x$ac_cv_lib_pthread_pthread_mutex_lock" = xyes +then : + printf "%s\n" "#define HAVE_LIBPTHREAD 1" >>confdefs.h LIBS="-lpthread $LIBS" -else +else $as_nop as_fn_error $? "libpthread is required" "$LINENO" 5 fi fi + if test "$enable_static" != "no"; then + ENABLE_STATIC_TRUE= + ENABLE_STATIC_FALSE='#' +else + ENABLE_STATIC_TRUE='#' + ENABLE_STATIC_FALSE= +fi + + # Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : +if test ${enable_debug+y} +then : enableval=$enable_debug; enable_debug="$enableval" -else +else $as_nop enable_debug="yes" fi if test "x$enable_debug" = "xyes"; then -$as_echo "#define NL_DEBUG 1" >>confdefs.h +printf "%s\n" "#define NL_DEBUG 1" >>confdefs.h fi @@ -13496,16 +14353,12 @@ subdirs="$subdirs doc" -for ac_func in strerror_l -do : - ac_fn_c_check_func "$LINENO" "strerror_l" "ac_cv_func_strerror_l" -if test "x$ac_cv_func_strerror_l" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRERROR_L 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "strerror_l" "ac_cv_func_strerror_l" +if test "x$ac_cv_func_strerror_l" = xyes +then : + printf "%s\n" "#define HAVE_STRERROR_L 1" >>confdefs.h fi -done ac_config_files="$ac_config_files Makefile libnl-3.0.pc libnl-route-3.0.pc libnl-genl-3.0.pc libnl-nf-3.0.pc libnl-cli-3.0.pc libnl-xfrm-3.0.pc libnl-idiag-3.0.pc python/setup.py include/netlink/version.h" @@ -13513,13 +14366,13 @@ ac_errcount=0 if test -z "$YACC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bison not found. Please install before continuing." >&5 -$as_echo "$as_me: WARNING: bison not found. Please install before continuing." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: bison not found. Please install before continuing." >&5 +printf "%s\n" "$as_me: WARNING: bison not found. Please install before continuing." >&2;} ac_errcount=$((ac_errcount + 1)) fi if test -z "$FLEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: flex not found. Please install before continuing." >&5 -$as_echo "$as_me: WARNING: flex not found. Please install before continuing." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: flex not found. Please install before continuing." >&5 +printf "%s\n" "$as_me: WARNING: flex not found. Please install before continuing." >&2;} ac_errcount=$((ac_errcount + 1)) fi if test $ac_errcount -gt 0; then @@ -13553,8 +14406,8 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -13584,15 +14437,15 @@ /^ac_cv_env_/b end t clear :clear - s/^\(^=*\)=\(.*{}.*\)$/test "${\1+set}" = set || &/ + s/^\(^=*\)=\(.*{}.*\)$/test ${\1+y} || &/ t end s/^\(^=*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -13606,8 +14459,8 @@ fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -13624,7 +14477,7 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -13635,14 +14488,14 @@ LTLIBOBJS=$ac_ltlibobjs -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 +printf "%s\n" "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -13683,13 +14536,17 @@ as_fn_error $? "conditional \"DISABLE_PTHREADS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_STATIC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -13712,14 +14569,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -13729,46 +14588,46 @@ fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi +if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -13777,13 +14636,6 @@ fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -13792,8 +14644,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -13805,30 +14661,10 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR LINENO LOG_FD @@ -13841,13 +14677,14 @@ as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -13874,18 +14711,20 @@ { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -13897,12 +14736,13 @@ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -13933,7 +14773,7 @@ $as_expr X/"$0" : '.*/\(^/^/*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\(^/^/*\)\/*$/{ s//\1/ q @@ -13955,6 +14795,10 @@ as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -13968,6 +14812,12 @@ ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO("message") and AS_ECHO_N("message"), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -14009,7 +14859,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -14018,7 +14868,7 @@ X"$as_dir" : 'X\(//\)^/' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*^/\)\/\/*^/^/*\/*$/{ s//\1/ q @@ -14080,8 +14930,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libnl $as_me 3.5.0, which was -generated by GNU Autoconf 2.69. Invocation command line was +This file was extended by libnl $as_me 3.7.0, which was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -14144,14 +14994,16 @@ libnl home page: <http://www.infradead.org/~tgr/libnl/>." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/\\""\`\$/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libnl config.status 3.5.0 -configured by $0, generated by GNU Autoconf 2.69, +libnl config.status 3.7.0 +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -14191,15 +15043,15 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -14207,7 +15059,7 @@ --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -14216,7 +15068,7 @@ as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -14244,7 +15096,7 @@ if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -14258,7 +15110,7 @@ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -14310,6 +15162,7 @@ lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' @@ -14318,6 +15171,7 @@ DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' @@ -14438,6 +15292,7 @@ lt_SP2NL \ lt_NL2SP \ reload_flag \ +FILECMD \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ @@ -14446,7 +15301,6 @@ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ -AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ @@ -14583,9 +15437,9 @@ # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -14921,7 +15775,7 @@ esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -14929,17 +15783,17 @@ # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^^:*/||;s|:^:*/|, |g' + printf "%s\n" "$*" | sed 's|^^:*/||;s|:^:*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/\\\\&|/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -14956,7 +15810,7 @@ X"$ac_file" : 'X\(//\)^/' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*^/\)\/\/*^/^/*\/*$/{ s//\1/ q @@ -14980,9 +15834,9 @@ case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.\\/||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.\\/||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/^\\/*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/^\\/*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -15044,8 +15898,8 @@ case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -15089,9 +15943,9 @@ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^ *datarootdir *:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -15107,20 +15961,20 @@ # if test x"$ac_file" != x-; then { - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -15140,7 +15994,7 @@ X"$_am_arg" : 'X\(//\)^/' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | +printf "%s\n" X"$_am_arg" | sed '/^X\(.*^/\)\/\/*^/^/*\/*$/{ s//\1/ q @@ -15160,8 +16014,8 @@ s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} + :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -15187,7 +16041,7 @@ for am_mf do # Strip MF so we end up with the name of the file. - am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line @@ -15199,7 +16053,7 @@ X"$am_mf" : 'X\(//\)^/' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$am_mf" | +printf "%s\n" X"$am_mf" | sed '/^X\(.*^/\)\/\/*^/^/*\/*$/{ s//\1/ q @@ -15221,7 +16075,7 @@ $as_expr X/"$am_mf" : '.*/\(^/^/*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$am_mf" | +printf "%s\n" X/"$am_mf" | sed '/^.*\/\(^/^/*\)\/*$/{ s//\1/ q @@ -15246,10 +16100,12 @@ (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } @@ -15396,6 +16252,9 @@ # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd +# A file(cmd) program that detects file types. +FILECMD=$lt_FILECMD + # An object symbol dumper. OBJDUMP=$lt_OBJDUMP @@ -15420,8 +16279,11 @@ # The archiver. AR=$lt_AR +# Flags to create an archive (by configure). +lt_ar_flags=$lt_ar_flags + # Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS +AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec @@ -15789,6 +16651,7 @@ esac + ltmain=$ac_aux_dir/ltmain.sh @@ -15796,7 +16659,7 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -15877,7 +16740,7 @@ ;; *) case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_sub_configure_args " '$ac_arg'" ;; esac @@ -15887,7 +16750,7 @@ # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" @@ -15908,17 +16771,17 @@ test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 - $as_echo "$ac_msg" >&6 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 + printf "%s\n" "$ac_msg" >&6 as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.\\/||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.\\/||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/^\\/*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/^\\/*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -15948,17 +16811,15 @@ cd "$ac_dir" - # Check for guested configure; otherwise get Cygnus style configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure - elif test -f "$ac_srcdir/configure.in"; then - # This should be Cygnus configure. - ac_sub_configure=$ac_aux_dir/configure else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 -$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 +printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi @@ -15971,8 +16832,8 @@ ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 -$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +printf "%s\n" "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || @@ -15983,8 +16844,8 @@ done fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi @@ -16011,3 +16872,4 @@ echo "" echo "-------------------------------------------------------------------------------" +
View file
_service:tar_scm:libnl-3.5.0.tar.gz/configure.ac -> _service:tar_scm:libnl-3.7.0.tar.gz/configure.ac
Changed
@@ -1,18 +1,12 @@ -# -# configure.in -# -# 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. +# SPDX-License-Identifier: LGPL-2.1-only + # # Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch> # - # copied from glib m4_define(libnl_major_version, 3) -m4_define(libnl_minor_version, 5) +m4_define(libnl_minor_version, 7) m4_define(libnl_micro_version, 0) m4_define(libnl_git_sha, m4_esyscmd( ( -d ./.git/ && "$(readlink -f ./.git/)" = "$(readlink -f "$(git rev-parse --git-dir 2>/dev/null)" 2>/dev/null)" && git rev-parse --verify -q HEAD 2>/dev/null ) || true )) @@ -113,6 +107,8 @@ AC_CHECK_LIB(pthread, pthread_mutex_lock, , AC_MSG_ERROR(libpthread is required)) fi +AM_CONDITIONAL(ENABLE_STATIC, test "$enable_static" != "no") + AC_ARG_ENABLE(debug, AS_HELP_STRING(--disable-debug, Do not include debugging statements), enable_debug="$enableval", enable_debug="yes")
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/linux-private/linux/if_bridge.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/linux-private/linux/if_bridge.h
Changed
@@ -243,6 +243,7 @@ union { __be32 ip4; struct in6_addr ip6; + unsigned char mac_addrETH_ALEN; } u; __be16 proto; } addr;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/linux-private/linux/if_link.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/linux-private/linux/if_link.h
Changed
@@ -455,6 +455,7 @@ IFLA_MACSEC_REPLAY_PROTECT, IFLA_MACSEC_VALIDATION, IFLA_MACSEC_PAD, + IFLA_MACSEC_OFFLOAD, __IFLA_MACSEC_MAX, };
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/linux-private/linux/if_vlan.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/linux-private/linux/if_vlan.h
Changed
@@ -32,10 +32,11 @@ }; enum vlan_flags { - VLAN_FLAG_REORDER_HDR = 0x1, - VLAN_FLAG_GVRP = 0x2, - VLAN_FLAG_LOOSE_BINDING = 0x4, - VLAN_FLAG_MVRP = 0x8, + VLAN_FLAG_REORDER_HDR = 0x1, + VLAN_FLAG_GVRP = 0x2, + VLAN_FLAG_LOOSE_BINDING = 0x4, + VLAN_FLAG_MVRP = 0x8, + VLAN_FLAG_BRIDGE_BINDING = 0x10, }; enum vlan_name_types {
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/linux-private/linux/netfilter/nfnetlink_log.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/linux-private/linux/netfilter/nfnetlink_log.h
Changed
@@ -33,6 +33,15 @@ __aligned_be64 usec; }; +enum nfulnl_vlan_attr { + NFULA_VLAN_UNSPEC, + NFULA_VLAN_PROTO, /* __be16 skb vlan_proto */ + NFULA_VLAN_TCI, /* __be16 skb htons(vlan_tci) */ + __NFULA_VLAN_MAX, +}; + +#define NFULA_VLAN_MAX (__NFULA_VLAN_MAX + 1) + enum nfulnl_attr_type { NFULA_UNSPEC, NFULA_PACKET_HDR, @@ -54,6 +63,8 @@ NFULA_HWLEN, /* hardware header length */ NFULA_CT, /* nf_conntrack_netlink.h */ NFULA_CT_INFO, /* enum ip_conntrack_info */ + NFULA_VLAN, /* nested attribute: packet vlan info */ + NFULA_L2HDR, /* full L2 header */ __NFULA_MAX };
View file
_service:tar_scm:libnl-3.7.0.tar.gz/include/linux-private/linux/tc_act/tc_nat.h
Added
@@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef __LINUX_TC_NAT_H +#define __LINUX_TC_NAT_H + +#include <linux/pkt_cls.h> +#include <linux/types.h> + +enum { + TCA_NAT_UNSPEC, + TCA_NAT_PARMS, + TCA_NAT_TM, + TCA_NAT_PAD, + __TCA_NAT_MAX +}; +#define TCA_NAT_MAX (__TCA_NAT_MAX - 1) + +#define TCA_NAT_FLAG_EGRESS 1 + +struct tc_nat { + tc_gen; + __be32 old_addr; + __be32 new_addr; + __be32 mask; + __u32 flags; +}; + +#endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink-private/cache-api.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/cache-api.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink-private/cache-api.h Caching API - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink-private/genl.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/genl.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink-private/genl.h Local Generic Netlink Interface - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink-private/netlink.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/netlink.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink-private/netlink.h Local Netlink Interface - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -65,6 +59,7 @@ #include <netlink-private/object-api.h> #include <netlink-private/cache-api.h> #include <netlink-private/types.h> +#include <netlink-private/utils.h> #define NSEC_PER_SEC 1000000000L
View file
_service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/nl-auto.h
Added
@@ -0,0 +1,102 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +#ifndef NETLINK_NL_AUTO_H_ +#define NETLINK_NL_AUTO_H_ + +#include <stdlib.h> + +#define _nl_auto(fcn) __attribute__ ((__cleanup__(fcn))) + +#define _NL_AUTO_DEFINE_FCN_VOID0(CastType, name, func) \ +static inline void name(void *v) \ +{ \ + if (*((CastType *) v)) \ + func(*((CastType *) v)); \ +} \ +struct _nl_dummy_for_tailing_semicolon + +#define _NL_AUTO_DEFINE_FCN_STRUCT(CastType, name, func) \ +static inline void name(CastType *v) \ +{ \ + if (v) \ + func(v); \ +} \ +struct _nl_dummy_for_tailing_semicolon + +#define _NL_AUTO_DEFINE_FCN_TYPED0(CastType, name, func) \ +static inline void name(CastType *v) \ +{ \ + if (*v) \ + func(*v); \ +} \ +struct _nl_dummy_for_tailing_semicolon + +#define _nl_auto_free _nl_auto(_nl_auto_free_fcn) +_NL_AUTO_DEFINE_FCN_VOID0(void *, _nl_auto_free_fcn, free); + +struct nl_addr; +void nl_addr_put(struct nl_addr *); +#define _nl_auto_nl_addr _nl_auto(_nl_auto_nl_addr_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct nl_addr *, _nl_auto_nl_addr_fcn, nl_addr_put); + +struct nl_data; +void nl_data_free(struct nl_data *data); +#define _nl_auto_nl_data _nl_auto(_nl_auto_nl_data_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct nl_data *, _nl_auto_nl_data_fcn, nl_data_free); + +struct nl_msg; +void nlmsg_free(struct nl_msg *); +#define _nl_auto_nl_msg _nl_auto(_nl_auto_nl_msg_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct nl_msg *, _nl_auto_nl_msg_fcn, nlmsg_free); + +struct rtnl_link; +void rtnl_link_put(struct rtnl_link *); +#define _nl_auto_rtnl_link _nl_auto(_nl_auto_rtnl_link_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct rtnl_link *, _nl_auto_rtnl_link_fcn, rtnl_link_put); + +struct rtnl_route; +void rtnl_route_put(struct rtnl_route *); +#define _nl_auto_rtnl_route _nl_auto(_nl_auto_rtnl_route_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct rtnl_route *, _nl_auto_rtnl_route_fcn, rtnl_route_put); + +struct rtnl_mdb; +void rtnl_mdb_put(struct rtnl_mdb *); +#define _nl_auto_rtnl_mdb _nl_auto(_nl_auto_rtnl_mdb_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct rtnl_mdb *, _nl_auto_rtnl_mdb_fcn, rtnl_mdb_put); + +struct rtnl_nexthop; +void rtnl_route_nh_free(struct rtnl_nexthop *); +#define _nl_auto_rtnl_nexthop _nl_auto(_nl_auto_rtnl_nexthop_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct rtnl_nexthop *, _nl_auto_rtnl_nexthop_fcn, rtnl_route_nh_free); + +struct nl_cache; +void nl_cache_put(struct nl_cache *); +#define _nl_auto_nl_cache _nl_auto(_nl_auto_nl_cache_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct nl_cache *, _nl_auto_nl_cache_fcn, nl_cache_put); + +struct rtnl_link_af_ops; +void rtnl_link_af_ops_put(struct rtnl_link_af_ops *); +#define _nl_auto_rtnl_link_af_ops _nl_auto(_nl_auto_rtnl_link_af_ops_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct rtnl_link_af_ops *, _nl_auto_rtnl_link_af_ops_fcn, rtnl_link_af_ops_put); + +struct rtnl_act; +void rtnl_act_put(struct rtnl_act *); +#define _nl_auto_rtnl_act _nl_auto(_nl_auto_rtnl_act_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct rtnl_act *, _nl_auto_rtnl_act_fcn, rtnl_act_put); + +struct rtnl_ematch_tree; +void rtnl_ematch_tree_free(struct rtnl_ematch_tree *); +#define _nl_auto_rtnl_ematch_tree _nl_auto(_nl_auto_rtnl_ematch_tree_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct rtnl_ematch_tree *, _nl_auto_rtnl_ematch_tree_fcn, rtnl_ematch_tree_free); + +struct rtnl_cls; +void rtnl_cls_put(struct rtnl_cls *); +#define _nl_auto_rtnl_cls _nl_auto(_nl_auto_rtnl_cls_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct rtnl_cls *, _nl_auto_rtnl_cls_fcn, rtnl_cls_put); + +struct nl_sock; +void nl_socket_free(struct nl_sock *); +#define _nl_auto_nl_socket _nl_auto(_nl_auto_nl_socket_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(struct nl_sock *, _nl_auto_nl_socket_fcn, nl_socket_free); + +#endif /* NETLINK_NL_AUTO_H_ */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink-private/object-api.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/object-api.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink-private/object-api.c Object API - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink-private/route/link/api.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/route/link/api.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink-private/route/link/api.h Link Modules API - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -68,6 +62,7 @@ }; extern struct rtnl_link_info_ops *rtnl_link_info_ops_lookup(const char *); +extern void rtnl_link_info_ops_get(struct rtnl_link_info_ops *); extern void rtnl_link_info_ops_put(struct rtnl_link_info_ops *); extern int rtnl_link_register_info(struct rtnl_link_info_ops *); extern int rtnl_link_unregister_info(struct rtnl_link_info_ops *);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink-private/route/link/sriov.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/route/link/sriov.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * include/netlink-private/route/link/sriov.h SRIOV VF Info - * - * 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) 2016 Intel Corp. All rights reserved. * Copyright (c) 2016 Jef Oliver <jef.oliver@intel.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink-private/route/tc-api.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/route/tc-api.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink-private/route/tc-api.h Traffic Control API - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/route/utils.h
Added
@@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +#ifndef NETLINK_ROUTE_UTILS_PRIV_H_ +#define NETLINK_ROUTE_UTILS_PRIV_H_ + +extern const uint8_t *const _nltst_map_stat_id_from_IPSTATS_MIB_v2; + +#endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink-private/socket.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/socket.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink-private/socket.h Private declarations for socket - * - * 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) 2014 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink-private/tc.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/tc.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink-private/tc.h Local Traffic Control Interface - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink-private/types.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/types.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink-private/types.h Netlink Types (Private) - * - * 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-2013 Thomas Graf <tgraf@suug.ch> * Copyright (c) 2013 Sassano Systems LLC <joe@sassanosystems.com> */ @@ -33,6 +27,9 @@ #include <linux/tc_act/tc_vlan.h> #include <linux/sock_diag.h> #include <linux/fib_rules.h> +#include <linux/if_ether.h> + +#include <netinet/in.h> #define NL_SOCK_PASSCRED (1<<1) #define NL_OWN_PORT (1<<2) @@ -616,6 +613,27 @@ int m_mask; }; +struct rtnl_flower +{ + struct rtnl_act *cf_act; + int cf_mask; + uint32_t cf_flags; + uint16_t cf_proto; + uint16_t cf_vlan_id; + uint16_t cf_vlan_ethtype; + uint8_t cf_vlan_prio; + uint8_t cf_src_macETH_ALEN; + uint8_t cf_src_mac_maskETH_ALEN; + uint8_t cf_dst_macETH_ALEN; + uint8_t cf_dst_mac_maskETH_ALEN; + in_addr_t cf_ipv4_src; + in_addr_t cf_ipv4_src_mask; + in_addr_t cf_ipv4_dst; + in_addr_t cf_ipv4_dst_mask; + uint8_t cf_ip_dscp; + uint8_t cf_ip_dscp_mask; +}; + struct rtnl_cgroup { struct rtnl_ematch_tree *cg_ematch; @@ -1015,6 +1033,14 @@ uint32_t log_msg_gid; uint32_t log_msg_seq; uint32_t log_msg_seq_global; + uint16_t log_msg_hwtype; + uint16_t log_msg_hwlen; + void * log_msg_hwheader; + int log_msg_hwheader_len; + uint16_t log_msg_vlan_tag; + uint16_t log_msg_vlan_proto; + uint32_t log_msg_ct_info; + struct nfnl_ct * log_msg_ct; }; struct nfnl_queue { @@ -1237,6 +1263,11 @@ struct nl_addr* encap_oa; }; +struct xfrmnl_user_offload { + int ifindex; + uint8_t flags; +}; + struct xfrmnl_sa { NLHDR_COMMON @@ -1266,6 +1297,7 @@ struct xfrmnl_replay_state replay_state; struct xfrmnl_replay_state_esn* replay_state_esn; uint8_t hard; + struct xfrmnl_user_offload* user_offload; }; struct xfrmnl_usersa_flush { @@ -1338,4 +1370,19 @@ uint32_t v_flags; }; +struct rtnl_mdb { + NLHDR_COMMON + uint32_t ifindex; + + struct nl_list_head mdb_entry_list; +}; + +struct rtnl_mdb_entry { + struct nl_list_head mdb_list; + struct nl_addr *addr; + uint32_t ifindex; + uint16_t vid; + uint16_t proto; + uint8_t state; +}; #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink-private/utils.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink-private/utils.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink-private/utils.h Local Utility Functions - * - * 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> */ @@ -13,6 +7,13 @@ #define NETLINK_UTILS_PRIV_H_ #include <byteswap.h> +#include <assert.h> +#include <unistd.h> +#include <errno.h> +#include <string.h> +#include <stdbool.h> +#include <netinet/in.h> +#include <arpa/inet.h> #if __BYTE_ORDER == __BIG_ENDIAN #define ntohll(x) (x) @@ -71,6 +72,23 @@ /*****************************************************************************/ +#ifdef thread_local +#define _nl_thread_local thread_local +/* + * Don't break on glibc < 2.16 that doesn't define __STDC_NO_THREADS__ + * see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53769 + */ +#elif __STDC_VERSION__ >= 201112L && \ + !(defined(__STDC_NO_THREADS__) || \ + (defined(__GNU_LIBRARY__) && __GLIBC__ == 2 && \ + __GLIBC_MINOR__ < 16)) +#define _nl_thread_local _Thread_local +#else +#define _nl_thread_local __thread +#endif + +/*****************************************************************************/ + #define _NL_STATIC_ASSERT(cond) ((void) sizeof (char(cond) ? 1 : -1)) /*****************************************************************************/ @@ -81,17 +99,45 @@ #define _nl_assert(cond) do { if (0) { assert(cond); } } while (0) #endif +#define _nl_assert_not_reached() assert(0) + /*****************************************************************************/ -#define _NL_AUTO_DEFINE_FCN_VOID0(CastType, name, func) \ -static inline void name (void *v) \ -{ \ - if (*((CastType *) v)) \ - func (*((CastType *) v)); \ -} +#define _nl_assert_addr_family_or_unspec(addr_family) \ + do { \ + typeof(addr_family) _addr_family = (addr_family); \ + \ + _nl_assert(_addr_family == AF_UNSPEC || \ + _addr_family == AF_INET || \ + _addr_family == AF_INET6); \ + } while (0) + +#define _nl_assert_addr_family(addr_family) \ + do { \ + typeof(addr_family) _addr_family = (addr_family); \ + \ + _nl_assert(_addr_family == AF_INET || \ + _addr_family == AF_INET6); \ + } while (0) + +/*****************************************************************************/ + +#define _NL_SWAP(pa, pb) \ + do { \ + typeof(*(pa)) *_pa = (pa); \ + typeof(*(pb)) *_pb = (pb); \ + typeof(*_pa) _tmp; \ + \ + _nl_assert(_pa); \ + _nl_assert(_pb); \ + _tmp = *_pa; \ + *_pa = *_pb; \ + *_pb = _tmp; \ + } while (0) + +/*****************************************************************************/ -#define _nl_auto_free _nl_auto(_nl_auto_free_fcn) -_NL_AUTO_DEFINE_FCN_VOID0 (void *, _nl_auto_free_fcn, free) +#define _NL_N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)0)) /*****************************************************************************/ @@ -163,11 +209,21 @@ /*****************************************************************************/ +static inline bool _nl_streq(const char *a, const char *b) +{ + return !strcmp(a, b); +} + +static inline bool _nl_streq0(const char *a, const char *b) +{ + return a == b || (a && b && _nl_streq(a, b)); +} + static inline char * _nl_strncpy_trunc(char *dst, const char *src, size_t len) { /* we don't use/reimplement strlcpy(), because we want the fill-all-with-NUL - * behavior of strncpy(). This is just strncpy() with gracefully handling trunction + * behavior of strncpy(). This is just strncpy() with gracefully handling truncation * (and disabling the "-Wstringop-truncation" warning). * * Note that truncation is silently accepted. @@ -192,32 +248,146 @@ } static inline char * -_nl_strncpy(char *dst, const char *src, size_t len) +_nl_strncpy_assert(char *dst, const char *src, size_t len) { /* we don't use/reimplement strlcpy(), because we want the fill-all-with-NUL - * behavior of strncpy(). This is just strncpy() with gracefully handling trunction + * behavior of strncpy(). This is just strncpy() with assertion against truncation * (and disabling the "-Wstringop-truncation" warning). * * Note that truncation is still a bug and there is an _nl_assert() * against that. */ + _NL_PRAGMA_WARNING_DISABLE ("-Wstringop-truncation"); + _NL_PRAGMA_WARNING_DISABLE ("-Wstringop-overflow"); + if (len > 0) { _nl_assert(dst); _nl_assert(src); strncpy(dst, src, len); - /* Truncation is a bug and we assert against it. But note that this - * assertion is disabled by default because we cannot be sure that - * there are not wrong uses of _nl_strncpy() where truncation might - * happen (wrongly!!). */ - _nl_assert (memchr(dst, '\0', len)); + _nl_assert (dstlen - 1 == '\0'); dstlen - 1 = '\0'; } + _NL_PRAGMA_WARNING_REENABLE; + _NL_PRAGMA_WARNING_REENABLE; + return dst; } +#include "nl-auto.h" + +#define _NL_RETURN_ON_ERR(cmd) \ + do { \ + int _err; \ + \ + _err = (cmd); \ + if (_err < 0) \ + return _err; \ + } while (0) + +#define _NL_RETURN_E_ON_ERR(e, cmd) \ + do { \ + int _err; \ + \ + _err = (cmd); \ + if (_err < 0) { \ + _NL_STATIC_ASSERT((e) > 0); \ + return -(e); \ + } \ + } while (0) + +/* _NL_RETURN_ON_PUT_ERR() shall only be used with a put command (nla_put or nlmsg_append). + * These commands can either fail with a regular error code (which gets propagated) + * or with -NLE_NOMEM. However, they don't really try to allocate memory, so we don't + * want to propagate -NLE_NOMEM. Instead, we coerce such failure to -NLE_MSGSIZE. */ +#define _NL_RETURN_ON_PUT_ERR(put_cmd) \ + do { \ + int _err; \ + \ + _err = (put_cmd); \ + if (_err < 0) { \ + if (_err == -NLE_NOMEM) { \ + /* nla_put() returns -NLE_NOMEM in case of out of buffer size. We don't + * want to propagate that error and map it to -NLE_MSGSIZE. */ \ + return -NLE_MSGSIZE; \ + } \ + /* any other error can only be due to invalid parameters. Propagate the + * error, however also assert that it cannot be reached. */ \ + _nl_assert_not_reached (); \ + return _err; \ + } else \ + _nl_assert (_err == 0); \ + } while (0) + +static inline int +_nl_close(int fd) +{ + int r; + + r = close(fd); + _nl_assert(r == 0 || fd < 0 || errno != EBADF); + return r; +} + +static inline void * +_nl_memdup(const void *ptr, size_t len) +{ + void *p; + + if (len == 0) { + /* malloc() leaves it implementation defined whether to return NULL. + * Callers rely on returning NULL if len is zero. */ + return NULL; + } + + p = malloc(len); + if (!p) + return NULL; + memcpy(p, ptr, len); + return p; +} + +#define _nl_memdup_ptr(ptr) ((__typeof__(ptr)) _nl_memdup((ptr), sizeof(*(ptr)))) + +/*****************************************************************************/ + +typedef union { + in_addr_t addr4; + struct in_addr a4; + struct in6_addr a6; +} _NLIPAddr; + +static inline char *_nl_inet_ntop(int addr_family, const void *addr, + char bufstatic INET_ADDRSTRLEN) +{ + char *r; + + _nl_assert_addr_family(addr_family); + _nl_assert(addr); + + /* inet_ntop() is documented to fail, but if we pass a known address family + * and a suitably large buffer, it cannot. Assert for that. */ + + r = (char *)inet_ntop(addr_family, addr, buf, + (addr_family == AF_INET) ? INET_ADDRSTRLEN : + INET6_ADDRSTRLEN); + _nl_assert(r == buf); + _nl_assert(strlen(r) < ((addr_family == AF_INET) ? INET_ADDRSTRLEN : + INET6_ADDRSTRLEN)); + + return r; +} + +static inline char *_nl_inet_ntop_dup(int addr_family, const void *addr) +{ + return (char *)_nl_inet_ntop(addr_family, addr, + malloc((addr_family == AF_INET) ? + INET_ADDRSTRLEN : + INET6_ADDRSTRLEN)); +} + #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/addr.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/addr.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/addr.h Abstract Address - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/attr.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/attr.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/attr.h Netlink 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cache-api.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cache-api.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cache-api.h Caching API - * - * 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) 2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cache.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cache.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cache.h Caching Module - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cli/addr.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/addr.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cli/addr.h CLI 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> */ @@ -14,6 +8,10 @@ #include <netlink/route/addr.h> +#ifdef __cplusplus +extern "C" { +#endif + #define nl_cli_addr_alloc_cache(sk) \ nl_cli_alloc_cache((sk), "address", rtnl_addr_alloc_cache) @@ -29,4 +27,8 @@ extern void nl_cli_addr_parse_preferred(struct rtnl_addr *, char *); extern void nl_cli_addr_parse_valid(struct rtnl_addr *, char *); +#ifdef __cplusplus +} +#endif + #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cli/class.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/class.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cli/class.h 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 Thomas Graf <tgraf@suug.ch> */ @@ -15,7 +9,15 @@ #include <netlink/route/class.h> #include <netlink/cli/tc.h> +#ifdef __cplusplus +extern "C" { +#endif + extern struct rtnl_class *nl_cli_class_alloc(void); extern struct nl_cache *nl_cli_class_alloc_cache(struct nl_sock *, int); +#ifdef __cplusplus +} +#endif + #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cli/cls.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/cls.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cli/cls.h 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 Thomas Graf <tgraf@suug.ch> */ @@ -15,10 +9,18 @@ #include <netlink/route/classifier.h> #include <netlink/cli/tc.h> +#ifdef __cplusplus +extern "C" { +#endif + extern struct rtnl_cls * nl_cli_cls_alloc(void); extern struct nl_cache * nl_cli_cls_alloc_cache(struct nl_sock *, int, uint32_t); extern void nl_cli_cls_parse_proto(struct rtnl_cls *, char *); extern struct rtnl_ematch_tree *nl_cli_cls_parse_ematch(struct rtnl_cls *, char *); +#ifdef __cplusplus +} +#endif + #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cli/ct.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/ct.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cli/ct.h CLI Conntrack 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) 2008-2009 Thomas Graf <tgraf@suug.ch> */ @@ -15,6 +9,10 @@ #include <netlink/netfilter/ct.h> #include <linux/netfilter/nf_conntrack_common.h> +#ifdef __cplusplus +extern "C" { +#endif + extern struct nfnl_ct *nl_cli_ct_alloc(void); extern struct nl_cache *nl_cli_ct_alloc_cache(struct nl_sock *); @@ -32,4 +30,8 @@ extern void nl_cli_ct_parse_status(struct nfnl_ct *, char *); extern void nl_cli_ct_parse_zone(struct nfnl_ct *, char *); +#ifdef __cplusplus +} +#endif + #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cli/exp.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/exp.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cli/exp.h CLI Expectation 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) 2012 Rich Fought <Rich.Fought@watchguard.com> * Copyright (c) 2008-2009 Thomas Graf <tgraf@suug.ch> */ @@ -16,6 +10,10 @@ #include <netlink/netfilter/exp.h> #include <linux/netfilter/nf_conntrack_common.h> +#ifdef __cplusplus +extern "C" { +#endif + extern struct nfnl_exp *nl_cli_exp_alloc(void); extern struct nl_cache *nl_cli_exp_alloc_cache(struct nl_sock *); @@ -38,5 +36,8 @@ extern void nl_cli_exp_parse_icmp_type(struct nfnl_exp *, int, char *); extern void nl_cli_exp_parse_icmp_code(struct nfnl_exp *, int, char *); +#ifdef __cplusplus +} +#endif #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cli/link.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/link.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cli/link.h 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> */ @@ -15,6 +9,10 @@ #include <netlink/route/link.h> #include <netlink/cli/utils.h> +#ifdef __cplusplus +extern "C" { +#endif + extern struct rtnl_link *nl_cli_link_alloc(void); extern struct nl_cache *nl_cli_link_alloc_cache_family(struct nl_sock *, int); extern struct nl_cache *nl_cli_link_alloc_cache_family_flags(struct nl_sock *, int, @@ -31,4 +29,8 @@ extern void nl_cli_link_parse_weight(struct rtnl_link *, char *); extern void nl_cli_link_parse_ifalias(struct rtnl_link *, char *); +#ifdef __cplusplus +} +#endif + #endif
View file
_service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/mdb.h
Added
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +#ifndef __NETLINK_CLI_MDB_H_ +#define __NETLINK_CLI_MDB_H_ + +#include <netlink/route/mdb.h> + +#define nl_cli_mdb_alloc_cache(sk) \ + nl_cli_alloc_cache_flags((sk), "mdb", NL_CACHE_AF_ITER, rtnl_mdb_alloc_cache) + +#endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cli/neigh.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/neigh.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cli/neighbour.h 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> */ @@ -14,6 +8,10 @@ #include <netlink/route/neighbour.h> +#ifdef __cplusplus +extern "C" { +#endif + #define nl_cli_neigh_alloc_cache(sk) \ nl_cli_alloc_cache_flags((sk), "neighbour", NL_CACHE_AF_ITER, \ rtnl_neigh_alloc_cache_flags) @@ -25,4 +23,8 @@ extern void nl_cli_neigh_parse_family(struct rtnl_neigh *, char *); extern void nl_cli_neigh_parse_state(struct rtnl_neigh *, char *); +#ifdef __cplusplus +} +#endif + #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cli/qdisc.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/qdisc.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cli/qdisc.h 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> */ @@ -14,10 +8,18 @@ #include <netlink/route/qdisc.h> +#ifdef __cplusplus +extern "C" { +#endif + #define nl_cli_qdisc_alloc_cache(sk) \ nl_cli_alloc_cache((sk), "queueing disciplines", \ rtnl_qdisc_alloc_cache) extern struct rtnl_qdisc *nl_cli_qdisc_alloc(void); +#ifdef __cplusplus +} +#endif + #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cli/route.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/route.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cli//route.h 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> */ @@ -14,6 +8,10 @@ #include <netlink/route/route.h> +#ifdef __cplusplus +extern "C" { +#endif + extern struct rtnl_route *nl_cli_route_alloc(void); extern struct nl_cache *nl_cli_route_alloc_cache(struct nl_sock *, int); @@ -31,4 +29,8 @@ extern void nl_cli_route_parse_type(struct rtnl_route *, char *); extern void nl_cli_route_parse_iif(struct rtnl_route *, char *, struct nl_cache *); +#ifdef __cplusplus +} +#endif + #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cli/rule.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/rule.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cli/rule.h 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> */ @@ -14,8 +8,16 @@ #include <netlink/route/rule.h> +#ifdef __cplusplus +extern "C" { +#endif + extern struct rtnl_rule *nl_cli_rule_alloc(void); extern struct nl_cache *nl_cli_rule_alloc_cache(struct nl_sock *); extern void nl_cli_rule_parse_family(struct rtnl_rule *, char *); +#ifdef __cplusplus +} +#endif + #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cli/tc.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/tc.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/cli/tc.h 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-2011 Thomas Graf <tgraf@suug.ch> */ @@ -14,6 +8,10 @@ #include <netlink/route/tc.h> +#ifdef __cplusplus +extern "C" { +#endif + struct rtnl_tc_ops; extern void nl_cli_tc_parse_dev(struct rtnl_tc *, struct nl_cache *, char *); @@ -38,4 +36,8 @@ extern void nl_cli_tc_register(struct nl_cli_tc_module *); extern void nl_cli_tc_unregister(struct nl_cli_tc_module *); +#ifdef __cplusplus +} +#endif + #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/cli/utils.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/cli/utils.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * src/utils.h 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/data.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/data.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/data.h Abstract Data - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/errno.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/errno.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/errno.h Error Numbers - * - * 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 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/fib_lookup/lookup.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/fib_lookup/lookup.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/fib_lookup/fib_lookup.h FIB 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-2008 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/fib_lookup/request.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/fib_lookup/request.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/fib_lookup/request.h FIB Lookup Request - * - * 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-2006 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/genl/ctrl.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/genl/ctrl.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/genl/ctrl.h Generic Netlink Controller - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/genl/family.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/genl/family.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/genl/family.h Generic Netlink Family - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/genl/genl.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/genl/genl.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/genl/genl.h Generic 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-2012 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/genl/mngt.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/genl/mngt.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/genl/mngt.h Generic Netlink Management - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/handlers.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/handlers.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/handlers.c default netlink message handlers - * - * 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-2006 Thomas Graf <tgraf@suug.ch> */ @@ -39,7 +33,7 @@ * nl_recvmsgs() callback for message processing customization * @ingroup cb * @arg msg netlink message being processed - * @arg arg argument passwd on through caller + * @arg arg argument passed on through caller */ typedef int (*nl_recvmsg_msg_cb_t)(struct nl_msg *msg, void *arg); @@ -60,7 +54,7 @@ * @ingroup cb */ enum nl_cb_action { - /** Proceed with wathever would come next */ + /** Proceed with whatever would come next */ NL_OK, /** Skip this message */ NL_SKIP, @@ -99,7 +93,7 @@ NL_CB_OVERRUN, /** Message wants to be skipped */ NL_CB_SKIPPED, - /** Message is an acknowledge */ + /** Message is an acknowledgement */ NL_CB_ACK, /** Called for every message received */ NL_CB_MSG_IN,
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/hashtable.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/hashtable.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/hashtable.h Netlink hashtable 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) 2012 Cumulus Networks, Inc */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/idiag/idiagnl.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/idiag/idiagnl.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/idiag/idiagnl.h Inetdiag 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) 2013 Sassano Systems LLC <joe@sassanosystems.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/idiag/meminfo.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/idiag/meminfo.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/idiag/meminfo.h Inetdiag Netlink Memory Info - * - * 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) 2013 Sassano Systems LLC <joe@sassanosystems.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/idiag/msg.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/idiag/msg.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/idiag/msg.h Inetdiag Netlink Message - * - * 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) 2013 Sassano Systems LLC <joe@sassanosystems.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/idiag/req.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/idiag/req.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/idiag/req.h Inetdiag Netlink Request - * - * 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) 2013 Sassano Systems LLC <joe@sassanosystems.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/idiag/vegasinfo.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/idiag/vegasinfo.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/idiag/vegasinfo.h Inetdiag Netlink TCP Vegas Info - * - * 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) 2013 Sassano Systems LLC <joe@sassanosystems.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/list.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/list.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/list.h Netlink List 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-2006 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/msg.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/msg.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/msg.c Netlink Messages Interface - * - * 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-2006 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/netfilter/ct.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/netfilter/ct.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/netfilter/ct.h Conntrack - * - * 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 @@ -18,6 +12,7 @@ #include <netlink/addr.h> #include <netlink/cache.h> #include <netlink/msg.h> +#include <netlink/attr.h> #ifdef __cplusplus extern "C" { @@ -37,6 +32,7 @@ extern int nfnlmsg_ct_group(struct nlmsghdr *); extern int nfnlmsg_ct_parse(struct nlmsghdr *, struct nfnl_ct **); +extern int nfnlmsg_ct_parse_nested(struct nlattr *, struct nfnl_ct **); extern void nfnl_ct_get(struct nfnl_ct *); extern void nfnl_ct_put(struct nfnl_ct *);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/netfilter/exp.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/netfilter/exp.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/netfilter/exp.h Conntrack 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-2008 Thomas Graf <tgraf@suug.ch> * Copyright (c) 2007 Philip Craig <philipc@snapgear.com> * Copyright (c) 2007 Secure Computing Corporation
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/netfilter/log.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/netfilter/log.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/netfilter/log.h Netfilter Log - * - * 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-2006 Thomas Graf <tgraf@suug.ch> * Copyright (c) 2007 Philip Craig <philipc@snapgear.com> * Copyright (c) 2007 Secure Computing Corporation @@ -36,6 +30,7 @@ enum nfnl_log_flags { NFNL_LOG_FLAG_SEQ = 0x1, NFNL_LOG_FLAG_SEQ_GLOBAL = 0x2, + NFNL_LOG_FLAG_CONNTRACK = 0x4, }; /* General */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/netfilter/log_msg.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/netfilter/log_msg.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/netfilter/log_msg.h Netfilter Log Message - * - * 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 @@ -23,6 +17,7 @@ struct nlmsghdr; struct nfnl_log_msg; +struct nfnl_ct; extern struct nl_object_ops log_msg_obj_ops; @@ -90,6 +85,36 @@ extern int nfnl_log_msg_test_seq_global(const struct nfnl_log_msg *); extern uint32_t nfnl_log_msg_get_seq_global(const struct nfnl_log_msg *); +extern void nfnl_log_msg_set_hwtype(struct nfnl_log_msg *, uint16_t); +extern int nfnl_log_msg_test_hwtype(const struct nfnl_log_msg *); +extern uint16_t nfnl_log_msg_get_hwtype(const struct nfnl_log_msg *); + +extern void nfnl_log_msg_set_hwlen(struct nfnl_log_msg *, uint16_t); +extern int nfnl_log_msg_test_hwlen(const struct nfnl_log_msg *); +extern uint16_t nfnl_log_msg_get_hwlen(const struct nfnl_log_msg *); + +extern int nfnl_log_msg_set_hwheader(struct nfnl_log_msg *, void *, int); +extern int nfnl_log_msg_test_hwheader(const struct nfnl_log_msg *); +extern const void * nfnl_log_msg_get_hwheader(const struct nfnl_log_msg *, int *); + +extern void nfnl_log_msg_set_vlan_proto(struct nfnl_log_msg *, uint16_t); +extern int nfnl_log_msg_test_vlan_proto(const struct nfnl_log_msg *); +extern uint16_t nfnl_log_msg_get_vlan_proto(const struct nfnl_log_msg *); +extern void nfnl_log_msg_set_vlan_tag(struct nfnl_log_msg *, uint16_t); +extern int nfnl_log_msg_test_vlan_tag(const struct nfnl_log_msg *); +extern uint16_t nfnl_log_msg_get_vlan_tag(const struct nfnl_log_msg *); +extern uint16_t nfnl_log_msg_get_vlan_id(const struct nfnl_log_msg *); +extern uint16_t nfnl_log_msg_get_vlan_cfi(const struct nfnl_log_msg *); +extern uint16_t nfnl_log_msg_get_vlan_prio(const struct nfnl_log_msg *); + +extern void nfnl_log_msg_set_ct_info(struct nfnl_log_msg *, uint32_t); +extern int nfnl_log_msg_test_ct_info(const struct nfnl_log_msg *); +extern uint32_t nfnl_log_msg_get_ct_info(const struct nfnl_log_msg *); + +extern void nfnl_log_msg_set_ct(struct nfnl_log_msg *, struct nfnl_ct *); +extern int nfnl_log_msg_test_ct(const struct nfnl_log_msg *); +extern struct nfnl_ct * nfnl_log_msg_get_ct(const struct nfnl_log_msg *); + #ifdef __cplusplus } #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/netfilter/netfilter.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/netfilter/netfilter.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/netfilter/netfilter.h Netfilter generic functions - * - * 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 Patrick McHardy <kaber@trash.net> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/netfilter/nfnl.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/netfilter/nfnl.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/nfnl/nfnl.h Netfilter 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-2008 Thomas Graf <tgraf@suug.ch> * Copyright (c) 2007 Philip Craig <philipc@snapgear.com> * Copyright (c) 2007 Secure Computing Corporation
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/netfilter/queue.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/netfilter/queue.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/netfilter/queue.h Netfilter Queue - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/netfilter/queue_msg.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/netfilter/queue_msg.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/netfilter/queue_msg.h Netfilter Queue Messages - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/netlink-compat.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/netlink-compat.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/netlink-compat.h Netlink Compatability - * - * 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-2006 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/netlink.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/netlink.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/netlink.h Netlink Interface - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/object-api.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/object-api.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/object-api.h Object API - * - * 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) 2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/object.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/object.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/object.c Generic Cacheable Object - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/act/gact.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/act/gact.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/act/gact.h gact action - * - * 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) 2016 Sushma Sitaram <sushma.sitaram@intel.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/act/mirred.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/act/mirred.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/cls/mirred.h mirred action - * - * 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) 2013 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/act/nat.h
Added
@@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ +/* + * Copyright (c) 2016 Magnus Öberg <magnus.oberg@westermo.se> + */ + +#ifndef NETLINK_NAT_H_ +#define NETLINK_NAT_H_ + +#include <netlink/netlink.h> +#include <netlink/cache.h> +#include <netlink/route/action.h> +#include <linux/tc_act/tc_nat.h> + +#include <netinet/in.h> + +#ifdef __cplusplus +extern "C" { +#endif + +extern int rtnl_nat_set_old_addr(struct rtnl_act *act, in_addr_t addr); +extern int rtnl_nat_get_old_addr(struct rtnl_act *act, in_addr_t *addr); +extern int rtnl_nat_set_new_addr(struct rtnl_act *act, in_addr_t addr); +extern int rtnl_nat_get_new_addr(struct rtnl_act *act, in_addr_t *addr); +extern int rtnl_nat_set_mask(struct rtnl_act *act, in_addr_t bitmask); +extern int rtnl_nat_get_mask(struct rtnl_act *act, in_addr_t *bitmask); +extern int rtnl_nat_set_flags(struct rtnl_act *act, uint32_t flags); +extern int rtnl_nat_get_flags(struct rtnl_act *act, uint32_t *flags); +extern int rtnl_nat_set_action(struct rtnl_act *act, int action); +extern int rtnl_nat_get_action(struct rtnl_act *act, int *action); + +#ifdef __cplusplus +} +#endif + +#endif /* NETLINK_NAT_H */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/act/skbedit.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/act/skbedit.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/act/skbedit.h skbedit action - * - * 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) 2015 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/act/vlan.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/act/vlan.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/act/vlan.h vlan action - * - * 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) 2018 Volodymyr Bendiuga <volodymyr.bendiuga@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/action.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/action.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/action.h Actions - * - * 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) 2013 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/addr.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/addr.h
Changed
@@ -1,14 +1,8 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/addr.c rtnetlink addr layer - * - * 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-2011 Thomas Graf <tgraf@suug.ch> - * Copyright (c) 2003-2006 Baruch Even <baruch@ev-en.org>, - * Mediatrix Telecom, inc. <ericb@mediatrix.com> + * Copyright (c) 2003-2006 Baruch Even <baruch@ev-en.org> + * Copyright (c) 2003-2006 Mediatrix Telecom, inc. <ericb@mediatrix.com> */ #ifndef NETADDR_ADDR_H_
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/class.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/class.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/class.h 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) 2003-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/classifier.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/classifier.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/classifier.h 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) 2003-2011 Thomas Graf <tgraf@suug.ch> */ @@ -26,6 +20,10 @@ extern int rtnl_cls_alloc_cache(struct nl_sock *, int, uint32_t, struct nl_cache **); +extern struct rtnl_cls *rtnl_cls_find_by_handle(struct nl_cache *cache, int ifindex, + uint32_t parent, uint32_t handle); +extern struct rtnl_cls *rtnl_cls_find_by_prio(struct nl_cache *cache, int ifindex, + uint32_t parent, uint16_t prio); extern void rtnl_cls_cache_set_tc_params(struct nl_cache *, int, uint32_t);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/cls/basic.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/cls/basic.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/cls/basic.h Basic 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/cls/cgroup.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/cls/cgroup.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/cls/cgroup.h Control Groups 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) 2009-2010 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/cls/ematch.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/cls/ematch.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/cls/ematch.h Extended Matches - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/cls/ematch/cmp.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/cls/ematch/cmp.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/cls/ematch/cmp.h Simple Comparison - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/cls/ematch/meta.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/cls/ematch/meta.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/cls/ematch/meta.h Metadata Match - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/cls/ematch/nbyte.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/cls/ematch/nbyte.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/cls/ematch/nbyte.h N-Byte Comparison - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/cls/ematch/text.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/cls/ematch/text.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/cls/ematch/text.h Text Search - * - * 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> */
View file
_service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/cls/flower.h
Added
@@ -0,0 +1,59 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ +/* + * Copyright (c) 2018 Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se> + */ + +#ifndef NETLINK_FLOWER_H_ +#define NETLINK_FLOWER_H_ + +#include <netlink/netlink.h> +#include <netlink/cache.h> +#include <netlink/route/classifier.h> +#include <netlink/route/action.h> + +#ifdef __cplusplus +extern "C" { +#endif + +extern int rtnl_flower_set_proto(struct rtnl_cls *cls, uint16_t); +extern int rtnl_flower_get_proto(struct rtnl_cls *cls, uint16_t *); + +extern int rtnl_flower_set_vlan_id(struct rtnl_cls *, uint16_t); +extern int rtnl_flower_get_vlan_id(struct rtnl_cls *, uint16_t *); + +extern int rtnl_flower_set_vlan_prio(struct rtnl_cls *, uint8_t); +extern int rtnl_flower_get_vlan_prio(struct rtnl_cls *, uint8_t *); + +extern int rtnl_flower_set_vlan_ethtype(struct rtnl_cls *, uint16_t); + +extern int rtnl_flower_set_dst_mac(struct rtnl_cls *, unsigned char *, + unsigned char *); +extern int rtnl_flower_get_dst_mac(struct rtnl_cls *, unsigned char *, + unsigned char *); + +extern int rtnl_flower_set_src_mac(struct rtnl_cls *, unsigned char *, + unsigned char *); +extern int rtnl_flower_get_src_mac(struct rtnl_cls *, unsigned char *, + unsigned char *); + +extern int rtnl_flower_set_ip_dscp(struct rtnl_cls *, uint8_t, uint8_t); +extern int rtnl_flower_get_ip_dscp(struct rtnl_cls *, uint8_t *, uint8_t *); + +extern int rtnl_flower_set_ipv4_src(struct rtnl_cls *, in_addr_t, in_addr_t); +extern int rtnl_flower_get_ipv4_src(struct rtnl_cls *, in_addr_t *, + in_addr_t *); +extern int rtnl_flower_set_ipv4_dst(struct rtnl_cls *, in_addr_t, in_addr_t); +extern int rtnl_flower_get_ipv4_dst(struct rtnl_cls *, in_addr_t *, + in_addr_t *); + +extern int rtnl_flower_set_flags(struct rtnl_cls *, int); + +extern int rtnl_flower_append_action(struct rtnl_cls *, struct rtnl_act *); +extern int rtnl_flower_del_action(struct rtnl_cls *, struct rtnl_act *); +extern struct rtnl_act* rtnl_flower_get_action(struct rtnl_cls *); + +#ifdef __cplusplus +} +#endif + +#endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/cls/fw.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/cls/fw.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/cls/fw.h fw 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) 2003-2006 Thomas Graf <tgraf@suug.ch> * Copyright (c) 2006 Petr Gotthard <petr.gotthard@siemens.com> * Copyright (c) 2006 Siemens AG Oesterreich
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/cls/matchall.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/cls/matchall.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/cls/matchall.h matchall 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) 2017 Volodymyr Bendiuga <volodymyr.bendiuga@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/cls/police.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/cls/police.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/cls/police.h Policer - * - * 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-2006 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/cls/u32.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/cls/u32.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/cls/u32.h u32 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) 2003-2006 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link.h Links (Interfaces) - * - * 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> */ @@ -35,70 +29,71 @@ * @ingroup link */ typedef enum { - RTNL_LINK_RX_PACKETS, /*!< Packets received */ - RTNL_LINK_TX_PACKETS, /*!< Packets sent */ - RTNL_LINK_RX_BYTES, /*!< Bytes received */ - RTNL_LINK_TX_BYTES, /*!< Bytes sent */ - RTNL_LINK_RX_ERRORS, /*!< Receive errors */ - RTNL_LINK_TX_ERRORS, /*!< Send errors */ - RTNL_LINK_RX_DROPPED, /*!< Received packets dropped */ - RTNL_LINK_TX_DROPPED, /*!< Packets dropped during transmit */ - RTNL_LINK_RX_COMPRESSED, /*!< Compressed packets received */ - RTNL_LINK_TX_COMPRESSED, /*!< Compressed packets sent */ - RTNL_LINK_RX_FIFO_ERR, /*!< Receive FIFO errors */ - RTNL_LINK_TX_FIFO_ERR, /*!< Send FIFO errors */ - RTNL_LINK_RX_LEN_ERR, /*!< Length errors */ - RTNL_LINK_RX_OVER_ERR, /*!< Over errors */ - RTNL_LINK_RX_CRC_ERR, /*!< CRC errors */ - RTNL_LINK_RX_FRAME_ERR, /*!< Frame errors */ - RTNL_LINK_RX_MISSED_ERR, /*!< Missed errors */ - RTNL_LINK_TX_ABORT_ERR, /*!< Aborted errors */ - RTNL_LINK_TX_CARRIER_ERR, /*!< Carrier errors */ - RTNL_LINK_TX_HBEAT_ERR, /*!< Heartbeat errors */ - RTNL_LINK_TX_WIN_ERR, /*!< Window errors */ - RTNL_LINK_COLLISIONS, /*!< Send collisions */ - RTNL_LINK_MULTICAST, /*!< Multicast */ - RTNL_LINK_IP6_INPKTS, /*!< IPv6 SNMP InReceives */ - RTNL_LINK_IP6_INHDRERRORS, /*!< IPv6 SNMP InHdrErrors */ - RTNL_LINK_IP6_INTOOBIGERRORS, /*!< IPv6 SNMP InTooBigErrors */ - RTNL_LINK_IP6_INNOROUTES, /*!< IPv6 SNMP InNoRoutes */ - RTNL_LINK_IP6_INADDRERRORS, /*!< IPv6 SNMP InAddrErrors */ - RTNL_LINK_IP6_INUNKNOWNPROTOS, /*!< IPv6 SNMP InUnknownProtos */ - RTNL_LINK_IP6_INTRUNCATEDPKTS, /*!< IPv6 SNMP InTruncatedPkts */ - RTNL_LINK_IP6_INDISCARDS, /*!< IPv6 SNMP InDiscards */ - RTNL_LINK_IP6_INDELIVERS, /*!< IPv6 SNMP InDelivers */ - RTNL_LINK_IP6_OUTFORWDATAGRAMS, /*!< IPv6 SNMP OutForwDatagrams */ - RTNL_LINK_IP6_OUTPKTS, /*!< IPv6 SNMP OutRequests */ - RTNL_LINK_IP6_OUTDISCARDS, /*!< IPv6 SNMP OutDiscards */ - RTNL_LINK_IP6_OUTNOROUTES, /*!< IPv6 SNMP OutNoRoutes */ - RTNL_LINK_IP6_REASMTIMEOUT, /*!< IPv6 SNMP ReasmTimeout */ - RTNL_LINK_IP6_REASMREQDS, /*!< IPv6 SNMP ReasmReqds */ - RTNL_LINK_IP6_REASMOKS, /*!< IPv6 SNMP ReasmOKs */ - RTNL_LINK_IP6_REASMFAILS, /*!< IPv6 SNMP ReasmFails */ - RTNL_LINK_IP6_FRAGOKS, /*!< IPv6 SNMP FragOKs */ - RTNL_LINK_IP6_FRAGFAILS, /*!< IPv6 SNMP FragFails */ - RTNL_LINK_IP6_FRAGCREATES, /*!< IPv6 SNMP FragCreates */ - RTNL_LINK_IP6_INMCASTPKTS, /*!< IPv6 SNMP InMcastPkts */ - RTNL_LINK_IP6_OUTMCASTPKTS, /*!< IPv6 SNMP OutMcastPkts */ - RTNL_LINK_IP6_INBCASTPKTS, /*!< IPv6 SNMP InBcastPkts */ - RTNL_LINK_IP6_OUTBCASTPKTS, /*!< IPv6 SNMP OutBcastPkts */ - RTNL_LINK_IP6_INOCTETS, /*!< IPv6 SNMP InOctets */ - RTNL_LINK_IP6_OUTOCTETS, /*!< IPv6 SNMP OutOctets */ - RTNL_LINK_IP6_INMCASTOCTETS, /*!< IPv6 SNMP InMcastOctets */ - RTNL_LINK_IP6_OUTMCASTOCTETS, /*!< IPv6 SNMP OutMcastOctets */ - RTNL_LINK_IP6_INBCASTOCTETS, /*!< IPv6 SNMP InBcastOctets */ - RTNL_LINK_IP6_OUTBCASTOCTETS, /*!< IPv6 SNMP OutBcastOctets */ - RTNL_LINK_ICMP6_INMSGS, /*!< ICMPv6 SNMP InMsgs */ - RTNL_LINK_ICMP6_INERRORS, /*!< ICMPv6 SNMP InErrors */ - RTNL_LINK_ICMP6_OUTMSGS, /*!< ICMPv6 SNMP OutMsgs */ - RTNL_LINK_ICMP6_OUTERRORS, /*!< ICMPv6 SNMP OutErrors */ - RTNL_LINK_ICMP6_CSUMERRORS, /*!< ICMPv6 SNMP InCsumErrors */ - RTNL_LINK_IP6_CSUMERRORS, /*!< IPv6 SNMP InCsumErrors */ - RTNL_LINK_IP6_NOECTPKTS, /*!< IPv6 SNMP InNoECTPkts */ - RTNL_LINK_IP6_ECT1PKTS, /*!< IPv6 SNMP InECT1Pkts */ - RTNL_LINK_IP6_ECT0PKTS, /*!< IPv6 SNMP InECT0Pkts */ - RTNL_LINK_IP6_CEPKTS, /*!< IPv6 SNMP InCEPkts */ - RTNL_LINK_RX_NOHANDLER, /*!< Received packets dropped on inactive device */ + RTNL_LINK_RX_PACKETS, /*!< Packets received */ + RTNL_LINK_TX_PACKETS, /*!< Packets sent */ + RTNL_LINK_RX_BYTES, /*!< Bytes received */ + RTNL_LINK_TX_BYTES, /*!< Bytes sent */ + RTNL_LINK_RX_ERRORS, /*!< Receive errors */ + RTNL_LINK_TX_ERRORS, /*!< Send errors */ + RTNL_LINK_RX_DROPPED, /*!< Received packets dropped */ + RTNL_LINK_TX_DROPPED, /*!< Packets dropped during transmit */ + RTNL_LINK_RX_COMPRESSED, /*!< Compressed packets received */ + RTNL_LINK_TX_COMPRESSED, /*!< Compressed packets sent */ + RTNL_LINK_RX_FIFO_ERR, /*!< Receive FIFO errors */ + RTNL_LINK_TX_FIFO_ERR, /*!< Send FIFO errors */ + RTNL_LINK_RX_LEN_ERR, /*!< Length errors */ + RTNL_LINK_RX_OVER_ERR, /*!< Over errors */ + RTNL_LINK_RX_CRC_ERR, /*!< CRC errors */ + RTNL_LINK_RX_FRAME_ERR, /*!< Frame errors */ + RTNL_LINK_RX_MISSED_ERR, /*!< Missed errors */ + RTNL_LINK_TX_ABORT_ERR, /*!< Aborted errors */ + RTNL_LINK_TX_CARRIER_ERR, /*!< Carrier errors */ + RTNL_LINK_TX_HBEAT_ERR, /*!< Heartbeat errors */ + RTNL_LINK_TX_WIN_ERR, /*!< Window errors */ + RTNL_LINK_COLLISIONS, /*!< Send collisions */ + RTNL_LINK_MULTICAST, /*!< Multicast */ + RTNL_LINK_IP6_INPKTS, /*!< IPv6 SNMP InReceives */ + RTNL_LINK_IP6_INHDRERRORS, /*!< IPv6 SNMP InHdrErrors */ + RTNL_LINK_IP6_INTOOBIGERRORS, /*!< IPv6 SNMP InTooBigErrors */ + RTNL_LINK_IP6_INNOROUTES, /*!< IPv6 SNMP InNoRoutes */ + RTNL_LINK_IP6_INADDRERRORS, /*!< IPv6 SNMP InAddrErrors */ + RTNL_LINK_IP6_INUNKNOWNPROTOS, /*!< IPv6 SNMP InUnknownProtos */ + RTNL_LINK_IP6_INTRUNCATEDPKTS, /*!< IPv6 SNMP InTruncatedPkts */ + RTNL_LINK_IP6_INDISCARDS, /*!< IPv6 SNMP InDiscards */ + RTNL_LINK_IP6_INDELIVERS, /*!< IPv6 SNMP InDelivers */ + RTNL_LINK_IP6_OUTFORWDATAGRAMS, /*!< IPv6 SNMP OutForwDatagrams */ + RTNL_LINK_IP6_OUTPKTS, /*!< IPv6 SNMP OutRequests */ + RTNL_LINK_IP6_OUTDISCARDS, /*!< IPv6 SNMP OutDiscards */ + RTNL_LINK_IP6_OUTNOROUTES, /*!< IPv6 SNMP OutNoRoutes */ + RTNL_LINK_IP6_REASMTIMEOUT, /*!< IPv6 SNMP ReasmTimeout */ + RTNL_LINK_IP6_REASMREQDS, /*!< IPv6 SNMP ReasmReqds */ + RTNL_LINK_IP6_REASMOKS, /*!< IPv6 SNMP ReasmOKs */ + RTNL_LINK_IP6_REASMFAILS, /*!< IPv6 SNMP ReasmFails */ + RTNL_LINK_IP6_FRAGOKS, /*!< IPv6 SNMP FragOKs */ + RTNL_LINK_IP6_FRAGFAILS, /*!< IPv6 SNMP FragFails */ + RTNL_LINK_IP6_FRAGCREATES, /*!< IPv6 SNMP FragCreates */ + RTNL_LINK_IP6_INMCASTPKTS, /*!< IPv6 SNMP InMcastPkts */ + RTNL_LINK_IP6_OUTMCASTPKTS, /*!< IPv6 SNMP OutMcastPkts */ + RTNL_LINK_IP6_INBCASTPKTS, /*!< IPv6 SNMP InBcastPkts */ + RTNL_LINK_IP6_OUTBCASTPKTS, /*!< IPv6 SNMP OutBcastPkts */ + RTNL_LINK_IP6_INOCTETS, /*!< IPv6 SNMP InOctets */ + RTNL_LINK_IP6_OUTOCTETS, /*!< IPv6 SNMP OutOctets */ + RTNL_LINK_IP6_INMCASTOCTETS, /*!< IPv6 SNMP InMcastOctets */ + RTNL_LINK_IP6_OUTMCASTOCTETS, /*!< IPv6 SNMP OutMcastOctets */ + RTNL_LINK_IP6_INBCASTOCTETS, /*!< IPv6 SNMP InBcastOctets */ + RTNL_LINK_IP6_OUTBCASTOCTETS, /*!< IPv6 SNMP OutBcastOctets */ + RTNL_LINK_ICMP6_INMSGS, /*!< ICMPv6 SNMP InMsgs */ + RTNL_LINK_ICMP6_INERRORS, /*!< ICMPv6 SNMP InErrors */ + RTNL_LINK_ICMP6_OUTMSGS, /*!< ICMPv6 SNMP OutMsgs */ + RTNL_LINK_ICMP6_OUTERRORS, /*!< ICMPv6 SNMP OutErrors */ + RTNL_LINK_ICMP6_CSUMERRORS, /*!< ICMPv6 SNMP InCsumErrors */ + RTNL_LINK_IP6_CSUMERRORS, /*!< IPv6 SNMP InCsumErrors */ + RTNL_LINK_IP6_NOECTPKTS, /*!< IPv6 SNMP InNoECTPkts */ + RTNL_LINK_IP6_ECT1PKTS, /*!< IPv6 SNMP InECT1Pkts */ + RTNL_LINK_IP6_ECT0PKTS, /*!< IPv6 SNMP InECT0Pkts */ + RTNL_LINK_IP6_CEPKTS, /*!< IPv6 SNMP InCEPkts */ + RTNL_LINK_RX_NOHANDLER, /*!< Received packets dropped on inactive device */ + RTNL_LINK_REASM_OVERLAPS, /*!< SNMP ReasmOverlaps */ __RTNL_LINK_STATS_MAX, } rtnl_link_stat_id_t; @@ -107,156 +102,156 @@ extern struct nla_policy rtln_link_policy; extern struct rtnl_link *rtnl_link_alloc(void); -extern void rtnl_link_put(struct rtnl_link *); +extern void rtnl_link_put(struct rtnl_link *); -extern int rtnl_link_alloc_cache(struct nl_sock *, int, struct nl_cache **); -extern int rtnl_link_alloc_cache_flags(struct nl_sock *, int, - struct nl_cache **, - unsigned int flags); +extern int rtnl_link_alloc_cache(struct nl_sock *, int, struct nl_cache **); +extern int rtnl_link_alloc_cache_flags(struct nl_sock *, int, + struct nl_cache **, + unsigned int flags); extern struct rtnl_link *rtnl_link_get(struct nl_cache *, int); extern struct rtnl_link *rtnl_link_get_by_name(struct nl_cache *, const char *); -extern int rtnl_link_build_add_request(struct rtnl_link *, int, - struct nl_msg **); -extern int rtnl_link_add(struct nl_sock *, struct rtnl_link *, int); -extern int rtnl_link_build_change_request(struct rtnl_link *, - struct rtnl_link *, int, - struct nl_msg **); -extern int rtnl_link_change(struct nl_sock *, struct rtnl_link *, - struct rtnl_link *, int); +extern int rtnl_link_build_add_request(struct rtnl_link *, int, + struct nl_msg **); +extern int rtnl_link_add(struct nl_sock *, struct rtnl_link *, int); +extern int rtnl_link_build_change_request(struct rtnl_link *, + struct rtnl_link *, int, + struct nl_msg **); +extern int rtnl_link_change(struct nl_sock *, struct rtnl_link *, + struct rtnl_link *, int); -extern int rtnl_link_build_delete_request(const struct rtnl_link *, - struct nl_msg **); -extern int rtnl_link_delete(struct nl_sock *, const struct rtnl_link *); -extern int rtnl_link_build_get_request(int, const char *, - struct nl_msg **); -extern int rtnl_link_get_kernel(struct nl_sock *, int, const char *, - struct rtnl_link **); +extern int rtnl_link_build_delete_request(const struct rtnl_link *, + struct nl_msg **); +extern int rtnl_link_delete(struct nl_sock *, const struct rtnl_link *); +extern int rtnl_link_build_get_request(int, const char *, + struct nl_msg **); +extern int rtnl_link_get_kernel(struct nl_sock *, int, const char *, + struct rtnl_link **); /* Name <-> Index Translations */ -extern char * rtnl_link_i2name(struct nl_cache *, int, char *, size_t); -extern int rtnl_link_name2i(struct nl_cache *, const char *); +extern char * rtnl_link_i2name(struct nl_cache *, int, char *, size_t); +extern int rtnl_link_name2i(struct nl_cache *, const char *); /* Name <-> Statistic Translations */ -extern char * rtnl_link_stat2str(int, char *, size_t); -extern int rtnl_link_str2stat(const char *); +extern char * rtnl_link_stat2str(int, char *, size_t); +extern int rtnl_link_str2stat(const char *); /* Link Flags Translations */ -extern char * rtnl_link_flags2str(int, char *, size_t); -extern int rtnl_link_str2flags(const char *); +extern char * rtnl_link_flags2str(int, char *, size_t); +extern int rtnl_link_str2flags(const char *); -extern char * rtnl_link_operstate2str(uint8_t, char *, size_t); -extern int rtnl_link_str2operstate(const char *); +extern char * rtnl_link_operstate2str(uint8_t, char *, size_t); +extern int rtnl_link_str2operstate(const char *); -extern char * rtnl_link_mode2str(uint8_t, char *, size_t); -extern int rtnl_link_str2mode(const char *); +extern char * rtnl_link_mode2str(uint8_t, char *, size_t); +extern int rtnl_link_str2mode(const char *); /* Carrier State Translations */ -extern char * rtnl_link_carrier2str(uint8_t, char *, size_t); -extern int rtnl_link_str2carrier(const char *); +extern char * rtnl_link_carrier2str(uint8_t, char *, size_t); +extern int rtnl_link_str2carrier(const char *); /* Access Functions */ -extern void rtnl_link_set_qdisc(struct rtnl_link *, const char *); -extern char * rtnl_link_get_qdisc(struct rtnl_link *); +extern void rtnl_link_set_qdisc(struct rtnl_link *, const char *); +extern char * rtnl_link_get_qdisc(struct rtnl_link *); -extern void rtnl_link_set_name(struct rtnl_link *, const char *); -extern char * rtnl_link_get_name(struct rtnl_link *); +extern void rtnl_link_set_name(struct rtnl_link *, const char *); +extern char * rtnl_link_get_name(struct rtnl_link *); -extern void rtnl_link_set_group(struct rtnl_link *, uint32_t); -extern uint32_t rtnl_link_get_group(struct rtnl_link *); +extern void rtnl_link_set_group(struct rtnl_link *, uint32_t); +extern uint32_t rtnl_link_get_group(struct rtnl_link *); -extern void rtnl_link_set_flags(struct rtnl_link *, unsigned int); -extern void rtnl_link_unset_flags(struct rtnl_link *, unsigned int); +extern void rtnl_link_set_flags(struct rtnl_link *, unsigned int); +extern void rtnl_link_unset_flags(struct rtnl_link *, unsigned int); extern unsigned int rtnl_link_get_flags(struct rtnl_link *); -extern void rtnl_link_set_mtu(struct rtnl_link *, unsigned int); +extern void rtnl_link_set_mtu(struct rtnl_link *, unsigned int); extern unsigned int rtnl_link_get_mtu(struct rtnl_link *); -extern void rtnl_link_set_txqlen(struct rtnl_link *, unsigned int); +extern void rtnl_link_set_txqlen(struct rtnl_link *, unsigned int); extern unsigned int rtnl_link_get_txqlen(struct rtnl_link *); -extern void rtnl_link_set_ifindex(struct rtnl_link *, int); -extern int rtnl_link_get_ifindex(struct rtnl_link *); +extern void rtnl_link_set_ifindex(struct rtnl_link *, int); +extern int rtnl_link_get_ifindex(struct rtnl_link *); -extern void rtnl_link_set_family(struct rtnl_link *, int); -extern int rtnl_link_get_family(struct rtnl_link *); +extern void rtnl_link_set_family(struct rtnl_link *, int); +extern int rtnl_link_get_family(struct rtnl_link *); -extern void rtnl_link_set_arptype(struct rtnl_link *, unsigned int); +extern void rtnl_link_set_arptype(struct rtnl_link *, unsigned int); extern unsigned int rtnl_link_get_arptype(struct rtnl_link *); -extern void rtnl_link_set_addr(struct rtnl_link *, struct nl_addr *); +extern void rtnl_link_set_addr(struct rtnl_link *, struct nl_addr *); extern struct nl_addr *rtnl_link_get_addr(struct rtnl_link *); -extern void rtnl_link_set_broadcast(struct rtnl_link *, struct nl_addr *); +extern void rtnl_link_set_broadcast(struct rtnl_link *, struct nl_addr *); extern struct nl_addr *rtnl_link_get_broadcast(struct rtnl_link *); -extern void rtnl_link_set_link(struct rtnl_link *, int); -extern int rtnl_link_get_link(struct rtnl_link *); +extern void rtnl_link_set_link(struct rtnl_link *, int); +extern int rtnl_link_get_link(struct rtnl_link *); -extern void rtnl_link_set_master(struct rtnl_link *, int); -extern int rtnl_link_get_master(struct rtnl_link *); +extern void rtnl_link_set_master(struct rtnl_link *, int); +extern int rtnl_link_get_master(struct rtnl_link *); -extern void rtnl_link_set_carrier(struct rtnl_link *, uint8_t); -extern uint8_t rtnl_link_get_carrier(struct rtnl_link *); +extern void rtnl_link_set_carrier(struct rtnl_link *, uint8_t); +extern uint8_t rtnl_link_get_carrier(struct rtnl_link *); -extern int rtnl_link_get_carrier_changes(struct rtnl_link *, uint32_t *); +extern int rtnl_link_get_carrier_changes(struct rtnl_link *, uint32_t *); -extern void rtnl_link_set_operstate(struct rtnl_link *, uint8_t); -extern uint8_t rtnl_link_get_operstate(struct rtnl_link *); +extern void rtnl_link_set_operstate(struct rtnl_link *, uint8_t); +extern uint8_t rtnl_link_get_operstate(struct rtnl_link *); -extern void rtnl_link_set_linkmode(struct rtnl_link *, uint8_t); -extern uint8_t rtnl_link_get_linkmode(struct rtnl_link *); +extern void rtnl_link_set_linkmode(struct rtnl_link *, uint8_t); +extern uint8_t rtnl_link_get_linkmode(struct rtnl_link *); int rtnl_link_set_link_netnsid(struct rtnl_link *link, int32_t link_netnsid); int rtnl_link_get_link_netnsid(const struct rtnl_link *link, int32_t *out_link_netnsid); -extern const char * rtnl_link_get_ifalias(struct rtnl_link *); -extern void rtnl_link_set_ifalias(struct rtnl_link *, const char *); +extern const char * rtnl_link_get_ifalias(struct rtnl_link *); +extern void rtnl_link_set_ifalias(struct rtnl_link *, const char *); -extern int rtnl_link_get_num_vf(struct rtnl_link *, uint32_t *); +extern int rtnl_link_get_num_vf(struct rtnl_link *, uint32_t *); extern uint64_t rtnl_link_get_stat(struct rtnl_link *, rtnl_link_stat_id_t); -extern int rtnl_link_set_stat(struct rtnl_link *, rtnl_link_stat_id_t, - const uint64_t); +extern int rtnl_link_set_stat(struct rtnl_link *, rtnl_link_stat_id_t, + const uint64_t); -extern int rtnl_link_set_type(struct rtnl_link *, const char *); -extern char * rtnl_link_get_type(struct rtnl_link *); +extern int rtnl_link_set_type(struct rtnl_link *, const char *); +extern char * rtnl_link_get_type(struct rtnl_link *); -extern int rtnl_link_set_slave_type(struct rtnl_link *, const char *); -extern const char * rtnl_link_get_slave_type(const struct rtnl_link *); +extern int rtnl_link_set_slave_type(struct rtnl_link *, const char *); +extern const char * rtnl_link_get_slave_type(const struct rtnl_link *); -extern void rtnl_link_set_promiscuity(struct rtnl_link *, uint32_t); -extern uint32_t rtnl_link_get_promiscuity(struct rtnl_link *); +extern void rtnl_link_set_promiscuity(struct rtnl_link *, uint32_t); +extern uint32_t rtnl_link_get_promiscuity(struct rtnl_link *); -extern void rtnl_link_set_num_tx_queues(struct rtnl_link *, uint32_t); -extern uint32_t rtnl_link_get_num_tx_queues(struct rtnl_link *); +extern void rtnl_link_set_num_tx_queues(struct rtnl_link *, uint32_t); +extern uint32_t rtnl_link_get_num_tx_queues(struct rtnl_link *); -extern void rtnl_link_set_num_rx_queues(struct rtnl_link *, uint32_t); -extern uint32_t rtnl_link_get_num_rx_queues(struct rtnl_link *); +extern void rtnl_link_set_num_rx_queues(struct rtnl_link *, uint32_t); +extern uint32_t rtnl_link_get_num_rx_queues(struct rtnl_link *); -extern int rtnl_link_get_gso_max_segs(struct rtnl_link *, uint32_t *); +extern int rtnl_link_get_gso_max_segs(struct rtnl_link *, uint32_t *); -extern int rtnl_link_get_gso_max_size(struct rtnl_link *, uint32_t *); +extern int rtnl_link_get_gso_max_size(struct rtnl_link *, uint32_t *); -extern struct nl_data * rtnl_link_get_phys_port_id(struct rtnl_link *); +extern struct nl_data * rtnl_link_get_phys_port_id(struct rtnl_link *); -extern char* rtnl_link_get_phys_port_name(struct rtnl_link *); +extern char* rtnl_link_get_phys_port_name(struct rtnl_link *); -extern struct nl_data * rtnl_link_get_phys_switch_id(struct rtnl_link *); +extern struct nl_data * rtnl_link_get_phys_switch_id(struct rtnl_link *); -extern void rtnl_link_set_ns_fd(struct rtnl_link *, int); -extern int rtnl_link_get_ns_fd(struct rtnl_link *); -extern void rtnl_link_set_ns_pid(struct rtnl_link *, pid_t); -extern pid_t rtnl_link_get_ns_pid(struct rtnl_link *); +extern void rtnl_link_set_ns_fd(struct rtnl_link *, int); +extern int rtnl_link_get_ns_fd(struct rtnl_link *); +extern void rtnl_link_set_ns_pid(struct rtnl_link *, pid_t); +extern pid_t rtnl_link_get_ns_pid(struct rtnl_link *); -extern int rtnl_link_enslave_ifindex(struct nl_sock *, int, int); -extern int rtnl_link_enslave(struct nl_sock *, struct rtnl_link *, - struct rtnl_link *); -extern int rtnl_link_release_ifindex(struct nl_sock *, int); -extern int rtnl_link_release(struct nl_sock *, struct rtnl_link *); -extern int rtnl_link_fill_info(struct nl_msg *, struct rtnl_link *); -extern int rtnl_link_info_parse(struct rtnl_link *, struct nlattr **); +extern int rtnl_link_enslave_ifindex(struct nl_sock *, int, int); +extern int rtnl_link_enslave(struct nl_sock *, struct rtnl_link *, + struct rtnl_link *); +extern int rtnl_link_release_ifindex(struct nl_sock *, int); +extern int rtnl_link_release(struct nl_sock *, struct rtnl_link *); +extern int rtnl_link_fill_info(struct nl_msg *, struct rtnl_link *); +extern int rtnl_link_info_parse(struct rtnl_link *, struct nlattr **); extern int rtnl_link_has_vf_list(struct rtnl_link *); extern void rtnl_link_set_vf_list(struct rtnl_link *); @@ -264,9 +259,9 @@ /* deprecated */ -extern int rtnl_link_set_info_type(struct rtnl_link *, const char *) __attribute__((deprecated)); -extern char * rtnl_link_get_info_type(struct rtnl_link *) __attribute__((deprecated)); -extern void rtnl_link_set_weight(struct rtnl_link *, unsigned int) __attribute__((deprecated)); +extern int rtnl_link_set_info_type(struct rtnl_link *, const char *) __attribute__((deprecated)); +extern char * rtnl_link_get_info_type(struct rtnl_link *) __attribute__((deprecated)); +extern void rtnl_link_set_weight(struct rtnl_link *, unsigned int) __attribute__((deprecated)); extern unsigned int rtnl_link_get_weight(struct rtnl_link *) __attribute__((deprecated));
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/api.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/api.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/api.h Link Modules API - * - * 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) 2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/bonding.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/bonding.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/bonding.h Bonding Interface - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/bridge.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/bridge.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/bridge.h Bridge - * - * 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) 2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/can.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/can.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/can.h CAN interface - * - * 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) 2012 Benedikt Spranger <b.spranger@linutronix.de> */ @@ -38,11 +32,11 @@ extern int rtnl_link_can_berr(struct rtnl_link *, struct can_berr_counter *); extern int rtnl_link_can_get_bt_const(struct rtnl_link *, - struct can_bittiming_const *); + struct can_bittiming_const *); extern int rtnl_link_can_get_bittiming(struct rtnl_link *, - struct can_bittiming *); + struct can_bittiming *); extern int rtnl_link_can_set_bittiming(struct rtnl_link *, - struct can_bittiming *); + const struct can_bittiming *); extern int rtnl_link_can_get_bitrate(struct rtnl_link *, uint32_t *); extern int rtnl_link_can_set_bitrate(struct rtnl_link *, uint32_t); @@ -57,6 +51,15 @@ extern int rtnl_link_can_set_ctrlmode(struct rtnl_link *, uint32_t); extern int rtnl_link_can_unset_ctrlmode(struct rtnl_link *, uint32_t); +extern int rtnl_link_can_get_data_bittiming_const(struct rtnl_link *, + struct can_bittiming_const *); +extern int rtnl_link_can_set_data_bittiming_const(struct rtnl_link *, + const struct can_bittiming_const *); +extern int rtnl_link_can_get_data_bittiming(struct rtnl_link *, + struct can_bittiming *); +extern int rtnl_link_can_set_data_bittiming(struct rtnl_link *, + const struct can_bittiming *); + #ifdef __cplusplus } #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/geneve.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/geneve.h
Changed
@@ -1,10 +1,4 @@ -/* - * netlink/route/link/geneve.h GENEVE interface - * 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. - */ +/* SPDX-License-Identifier: LGPL-2.1-only */ #ifndef NETLINK_LINK_GENEVE_H_ #define NETLINK_LINK_GENEVE_H_
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/inet.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/inet.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/inet.h INET Link Module - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/inet6.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/inet6.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/inet6.h INET6 Link Module - * - * 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) 2014 Dan Williams <dcbw@redhat.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/info-api.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/info-api.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/info-api.h Link Modules API - * - * 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) 2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/ip6gre.h
Added
@@ -0,0 +1,58 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +#ifndef NETLINK_LINK_IP6GRE_H_ +#define NETLINK_LINK_IP6GRE_H_ + +#include <netlink/netlink.h> +#include <netlink/route/link.h> + +#ifdef __cplusplus +extern "C" { +#endif + + extern int rtnl_link_is_ip6gre(struct rtnl_link *link); + + extern struct rtnl_link *rtnl_link_ip6gre_alloc(void); + extern int rtnl_link_ip6gre_add(struct nl_sock *sk, const char *name); + + extern int rtnl_link_ip6gre_set_link(struct rtnl_link *link, uint32_t index); + extern int rtnl_link_ip6gre_get_link(struct rtnl_link *link, uint32_t *index); + + extern int rtnl_link_ip6gre_set_iflags(struct rtnl_link *link, uint16_t iflags); + extern int rtnl_link_ip6gre_get_iflags(struct rtnl_link *link, uint16_t *iflags); + + extern int rtnl_link_ip6gre_set_oflags(struct rtnl_link *link, uint16_t oflags); + extern int rtnl_link_ip6gre_get_oflags(struct rtnl_link *link, uint16_t *oflags); + + extern int rtnl_link_ip6gre_set_ikey(struct rtnl_link *link, uint32_t ikey); + extern int rtnl_link_ip6gre_get_ikey(struct rtnl_link *link, uint32_t *ikey); + + extern int rtnl_link_ip6gre_set_okey(struct rtnl_link *link, uint32_t okey); + extern int rtnl_link_ip6gre_get_okey(struct rtnl_link *link, uint32_t *okey); + + extern int rtnl_link_ip6gre_set_local(struct rtnl_link *link, struct in6_addr *local); + extern int rtnl_link_ip6gre_get_local(struct rtnl_link *link, struct in6_addr *local); + + extern int rtnl_link_ip6gre_set_remote(struct rtnl_link *link, struct in6_addr *remote); + extern int rtnl_link_ip6gre_get_remote(struct rtnl_link *link, struct in6_addr *remote); + + extern int rtnl_link_ip6gre_set_ttl(struct rtnl_link *link, uint8_t ttl); + extern int rtnl_link_ip6gre_get_ttl(struct rtnl_link *link, uint8_t *ttl); + + extern int rtnl_link_ip6gre_set_encaplimit(struct rtnl_link *link, uint8_t encaplimit); + extern int rtnl_link_ip6gre_get_encaplimit(struct rtnl_link *link, uint8_t *encaplimit); + + extern int rtnl_link_ip6gre_set_flowinfo(struct rtnl_link *link, uint32_t flowinfo); + extern int rtnl_link_ip6gre_get_flowinfo(struct rtnl_link *link, uint32_t *flowinfo); + + extern int rtnl_link_ip6gre_set_flags(struct rtnl_link *link, uint32_t flags); + extern int rtnl_link_ip6gre_get_flags(struct rtnl_link *link, uint32_t *flags); + + extern int rtnl_link_ip6gre_set_fwmark(struct rtnl_link *link, uint32_t fwmark); + extern int rtnl_link_ip6gre_get_fwmark(struct rtnl_link *link, uint32_t *fwmark); + +#ifdef __cplusplus +} +#endif + +#endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/ip6tnl.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/ip6tnl.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/ip6tnl.h IP6TNL interface - * - * 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) 2014 Susant Sahani <susant@redhat.com> */ @@ -51,6 +45,9 @@ extern int rtnl_link_ip6_tnl_set_proto(struct rtnl_link *link, uint8_t proto); extern uint8_t rtnl_link_ip6_tnl_get_proto(struct rtnl_link *link); + extern int rtnl_link_ip6_tnl_set_fwmark(struct rtnl_link *link, uint32_t fwmark); + extern int rtnl_link_ip6_tnl_get_fwmark(struct rtnl_link *link, uint32_t *fwmark); + #ifdef __cplusplus } #endif
View file
_service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/ip6vti.h
Added
@@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +#ifndef NETLINK_LINK_IP6VTI_H_ +#define NETLINK_LINK_IP6VTI_H_ + +#include <netlink/netlink.h> +#include <netlink/route/link.h> + +#ifdef __cplusplus +extern "C" { +#endif + + int rtnl_link_is_ip6vti(struct rtnl_link *link); + + extern struct rtnl_link *rtnl_link_ip6vti_alloc(void); + extern int rtnl_link_ip6vti_add(struct nl_sock *sk, const char *name); + + extern int rtnl_link_ip6vti_set_link(struct rtnl_link *link, uint32_t index); + extern int rtnl_link_ip6vti_get_link(struct rtnl_link *link, uint32_t *index); + + extern int rtnl_link_ip6vti_set_ikey(struct rtnl_link *link, uint32_t ikey); + extern int rtnl_link_ip6vti_get_ikey(struct rtnl_link *link, uint32_t *ikey); + + extern int rtnl_link_ip6vti_set_okey(struct rtnl_link *link, uint32_t okey); + extern int rtnl_link_ip6vti_get_okey(struct rtnl_link *link, uint32_t *okey); + + extern int rtnl_link_ip6vti_set_local(struct rtnl_link *link, struct in6_addr *local); + extern int rtnl_link_ip6vti_get_local(struct rtnl_link *link, struct in6_addr *remote); + + extern int rtnl_link_ip6vti_set_remote(struct rtnl_link *link, struct in6_addr *remote); + extern int rtnl_link_ip6vti_get_remote(struct rtnl_link *link, struct in6_addr *remote); + + extern int rtnl_link_ip6vti_set_fwmark(struct rtnl_link *link, uint32_t fwmark); + extern int rtnl_link_ip6vti_get_fwmark(struct rtnl_link *link, uint32_t *fwmark); + +#ifdef __cplusplus +} +#endif + +#endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/ipgre.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/ipgre.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/ip_gre.h IPGRE interface - * - * 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) 2014 Susant Sahani <susant@redhat.com> */ @@ -57,6 +51,9 @@ extern int rtnl_link_ipgre_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc); extern uint8_t rtnl_link_ipgre_get_pmtudisc(struct rtnl_link *link); + extern int rtnl_link_ipgre_set_fwmark(struct rtnl_link *link, uint32_t fwmark); + extern int rtnl_link_ipgre_get_fwmark(struct rtnl_link *link, uint32_t *fwmark); + #ifdef __cplusplus } #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/ipip.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/ipip.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/ipip.h IPIP interface - * - * 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) 2014 Susant Sahani <susant@redhat.com> */ @@ -41,6 +35,9 @@ extern int rtnl_link_ipip_set_pmtudisc(struct rtnl_link *link, uint8_t pmtudisc); extern uint8_t rtnl_link_ipip_get_pmtudisc(struct rtnl_link *link); + extern int rtnl_link_ipip_set_fwmark(struct rtnl_link *link, uint32_t fwmark); + extern int rtnl_link_ipip_get_fwmark(struct rtnl_link *link, uint32_t *fwmark); + #ifdef __cplusplus } #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/ipvlan.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/ipvlan.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/ipvlan.h IPVLAN interface - * - * 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) 2015 Cong Wang <cwang@twopensource.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/ipvti.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/ipvti.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/ipvti.h IPVTI interface - * - * 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) 2014 Susant Sahani <susant@redhat.com> */ @@ -38,6 +32,9 @@ extern int rtnl_link_ipvti_set_remote(struct rtnl_link *link, uint32_t addr); extern uint32_t rtnl_link_ipvti_get_remote(struct rtnl_link *link); + extern int rtnl_link_ipvti_set_fwmark(struct rtnl_link *link, uint32_t fwmark); + extern int rtnl_link_ipvti_get_fwmark(struct rtnl_link *link, uint32_t *fwmark); + #ifdef __cplusplus } #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/macsec.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/macsec.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/macsec.h MACsec Link Info - * - * 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) 2016 Sabrina Dubroca <sd@queasysnail.net> */ @@ -43,6 +37,9 @@ int rtnl_link_macsec_set_encrypt(struct rtnl_link *, uint8_t); int rtnl_link_macsec_get_encrypt(struct rtnl_link *, uint8_t *); +int rtnl_link_macsec_set_offload(struct rtnl_link *, uint8_t); +int rtnl_link_macsec_get_offload(struct rtnl_link *, uint8_t *); + int rtnl_link_macsec_set_encoding_sa(struct rtnl_link *, uint8_t); int rtnl_link_macsec_get_encoding_sa(struct rtnl_link *, uint8_t *);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/macvlan.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/macvlan.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/macvlan.h MACVLAN interface - * - * 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) 2013 Michael Braun <michael-dev@fami-braun.de> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/macvtap.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/macvtap.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/macvtap.h MACVTAP interface - * - * 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) 2015 Beniamino Galvani <bgalvani@redhat.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/ppp.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/ppp.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/ppp.h PPP Interface - * - * 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) 2016 Jonas Johansson <jonasj76@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/sit.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/sit.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/sit.h SIT interface - * - * 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) 2014 Susant Sahani <susant@redhat.com> */ @@ -60,6 +54,9 @@ int rtnl_link_sit_set_ip6rd_relay_prefixlen(struct rtnl_link *link, uint16_t prefix); int rtnl_link_sit_get_ip6rd_relay_prefixlen(struct rtnl_link *link, uint16_t *prefix); + extern int rtnl_link_sit_set_fwmark(struct rtnl_link *link, uint32_t fwmark); + extern int rtnl_link_sit_get_fwmark(struct rtnl_link *link, uint32_t *fwmark); + #ifdef __cplusplus } #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/sriov.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/sriov.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * include/netlink/route/link/sriov.h SRIOV VF Info - * - * 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) 2016 Intel Corp. All rights reserved. * Copyright (c) 2016 Jef Oliver <jef.oliver@intel.com> */
View file
_service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/team.h
Added
@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ +/* + * Copyright (c) 2015 Jonas Johansson <jonasj76@gmail.com> + */ + +#ifndef NETLINK_LINK_TEAM_H_ +#define NETLINK_LINK_TEAM_H_ + +#include <netlink/netlink.h> +#include <netlink/route/link.h> + +#ifdef __cplusplus +extern "C" { +#endif + +extern struct rtnl_link *rtnl_link_team_alloc(void); + +extern int rtnl_link_team_add(struct nl_sock *, const char *, + struct rtnl_link *); + +#ifdef __cplusplus +} +#endif + +#endif +
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/veth.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/veth.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/veth.h VETH interface - * - * 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) 2013 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/vlan.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/vlan.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/vlan.h VLAN interface - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/vrf.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/vrf.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/vrf.h VRF interface - * - * 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) 2015 Cumulus Networks. All rights reserved. * Copyright (c) 2015 David Ahern <dsa@cumulusnetworks.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/vxlan.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/vxlan.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/vxlan.h VXLAN interface - * - * 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) 2013 Yasunobu Chiba <yasu@dsl.gr.jp> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/link/xfrmi.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/link/xfrmi.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/link/xfrmi.h XFRMI interface - * - * 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) 2019 Eyal Birger <eyal.birger@gmail.com> * * Based on netlink/route/link/ipvti.h
View file
_service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/mdb.h
Added
@@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +#ifndef NETLINK_MDB_H_ +#define NETLINK_MDB_H_ + +#include <netlink/netlink.h> +#include <netlink/cache.h> +#include <netlink/route/link.h> + +#ifdef __cplusplus +extern "C" { +#endif + +struct rtnl_mdb; +struct rtnl_mdb_entry; + +struct rtnl_mdb *rtnl_mdb_alloc(void); +void rtnl_mdb_put(struct rtnl_mdb *mdb); + +int rtnl_mdb_alloc_cache(struct nl_sock *sk, struct nl_cache **result); +int rtnl_mdb_alloc_cache_flags(struct nl_sock *sock, + struct nl_cache **result, + unsigned int flags); + +uint32_t rtnl_mdb_get_ifindex(struct rtnl_mdb *mdb); +void rtnl_mdb_add_entry(struct rtnl_mdb *mdb, + struct rtnl_mdb_entry *_entry); + +void rtnl_mdb_foreach_entry(struct rtnl_mdb *mdb, + void (*cb)(struct rtnl_mdb_entry *, void *), + void *arg); + +int rtnl_mdb_entry_get_ifindex(struct rtnl_mdb_entry *mdb_entry); +int rtnl_mdb_entry_get_vid(struct rtnl_mdb_entry *mdb_entry); +int rtnl_mdb_entry_get_state(struct rtnl_mdb_entry *mdb_entry); +struct nl_addr *rtnl_mdb_entry_get_addr(struct rtnl_mdb_entry + *mdb_entry); +uint16_t rtnl_mdb_entry_get_proto(struct rtnl_mdb_entry *mdb_entry); +#ifdef __cplusplus +} +#endif +#endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/neighbour.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/neighbour.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/neighbour.h 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-2008 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/neightbl.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/neightbl.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/neightbl.h 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-2008 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/netconf.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/netconf.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/netconf.h rtnetlink netconf layer - * - * 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) 2017 David Ahern <dsa@cumulusnetworks.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/nexthop.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/nexthop.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/nexthop.h Routing Nexthop - * - * 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> */ @@ -70,6 +64,8 @@ extern int rtnl_route_nh_encap_mpls(struct rtnl_nexthop *nh, struct nl_addr *addr, uint8_t ttl); +extern struct nl_addr * rtnl_route_nh_get_encap_mpls_dst(struct rtnl_nexthop *); +extern uint8_t rtnl_route_nh_get_encap_mpls_ttl(struct rtnl_nexthop *); #ifdef __cplusplus } #endif
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/pktloc.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/pktloc.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/pktloc.h Packet Location Aliasing - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/qdisc.h 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-2011 Thomas Graf <tgraf@suug.ch> */ @@ -33,6 +27,8 @@ extern struct rtnl_qdisc * rtnl_qdisc_get_by_parent(struct nl_cache *, int, uint32_t); +extern struct rtnl_qdisc *rtnl_qdisc_get_by_kind(struct nl_cache *cache, + int ifindex, char *kind); extern int rtnl_qdisc_build_add_request(struct rtnl_qdisc *, int, struct nl_msg **);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/cbq.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/cbq.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/sch/cbq.h Class Based Queueing - * - * 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-2006 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/dsmark.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/dsmark.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/sch/dsmark.h DSMARK - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/fifo.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/fifo.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/sch/fifo.c FIFO Qdisc - * - * 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-2006 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/fq_codel.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/fq_codel.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/sch/fq_codel.h fq_codel - * - * 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) 2013 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/hfsc.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/hfsc.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/sch/hfsc.h HFSC Qdisc - * - * 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) 2014 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/htb.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/htb.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/sch/htb.h HTB Qdisc - * - * 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-2011 Thomas Graf <tgraf@suug.ch> * Copyright (c) 2005 Petr Gotthard <petr.gotthard@siemens.com> * Copyright (c) 2005 Siemens AG Oesterreich
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/mqprio.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/mqprio.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/mqprio.c MQPRIO Qdisc/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) 2018 Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/netem.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/netem.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/sch/netem.h Network Emulator Qdisc - * - * 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-2006 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/plug.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/plug.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/qdisc/plug.c PLUG Qdisc - * - * 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) 2012 Shriram Rajagopalan <rshriram@cs.ubc.ca> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/prio.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/prio.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/sch/prio.c PRIO Qdisc - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/red.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/red.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/sch/red.h RED Qdisc - * - * 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-2006 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/sfq.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/sfq.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/sch/sfq.c SFQ Qdisc - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/qdisc/tbf.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/qdisc/tbf.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/sch/tbf.h TBF Qdisc - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/route.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/route.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/route.h 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-2012 Thomas Graf <tgraf@suug.ch> */ @@ -58,6 +52,9 @@ extern int rtnl_route_parse(struct nlmsghdr *, struct rtnl_route **); extern int rtnl_route_build_msg(struct nl_msg *, struct rtnl_route *); +extern int rtnl_route_lookup(struct nl_sock *sk, struct nl_addr *dst, + struct rtnl_route **result); + extern int rtnl_route_build_add_request(struct rtnl_route *, int, struct nl_msg **); extern int rtnl_route_add(struct nl_sock *, struct rtnl_route *, int);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/rtnl.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/rtnl.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/rtnl.h Routing 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-2008 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/rule.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/rule.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/rule.h Rules - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/tc-api.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/tc-api.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/tc-api.h Traffic Control API - * - * 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) 2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/route/tc.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/route/tc.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/route/tc.h Traffic Control - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/socket.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/socket.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/socket.h Netlink Socket - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/types.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/types.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/types.h Definition of public 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-2012 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/utils.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/utils.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/utils.h Utility Functions - * - * 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> */ @@ -19,6 +13,12 @@ extern "C" { #endif +#if defined(__GNUC__) && __GNUC__ > 5 +#define _nl_attribute_printf(a, b) __attribute__((__format__(printf, a, b))) +#else +#define _nl_attribute_printf(a, b) +#endif + /** * @name Probability Constants * @{ @@ -76,8 +76,8 @@ /* Dumping helpers */ extern void nl_new_line(struct nl_dump_params *); -extern void nl_dump(struct nl_dump_params *, const char *, ...); -extern void nl_dump_line(struct nl_dump_params *, const char *, ...); +extern void nl_dump(struct nl_dump_params *, const char *, ...) _nl_attribute_printf(2, 3); +extern void nl_dump_line(struct nl_dump_params *, const char *, ...) _nl_attribute_printf(2, 3); enum { NL_CAPABILITY_NONE, @@ -300,6 +300,25 @@ NL_CAPABILITY_VERSION_3_5_0 = 30, #define NL_CAPABILITY_VERSION_3_5_0 NL_CAPABILITY_VERSION_3_5_0 + /** + * nl_object_identical() can consider objects identical, if they both lack the same + * set of ID attributes. + */ + NL_CAPABILITY_NL_OBJECT_IDENTICAL_PARTIAL = 31, +#define NL_CAPABILITY_NL_OBJECT_IDENTICAL_PARTIAL NL_CAPABILITY_NL_OBJECT_IDENTICAL_PARTIAL + + /** + * The library version is libnl3 3.6.0 or newer. This capability should never be backported. + */ + NL_CAPABILITY_VERSION_3_6_0 = 32, +#define NL_CAPABILITY_VERSION_3_6_0 NL_CAPABILITY_VERSION_3_6_0 + + /** + * The library version is libnl3 3.7.0 or newer. This capability should never be backported. + */ + NL_CAPABILITY_VERSION_3_7_0 = 33, +#define NL_CAPABILITY_VERSION_3_7_0 NL_CAPABILITY_VERSION_3_7_0 + __NL_CAPABILITY_MAX, NL_CAPABILITY_MAX = (__NL_CAPABILITY_MAX - 1), #define NL_CAPABILITY_MAX NL_CAPABILITY_MAX
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/version.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/version.h
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/version.h Versioning Information - * - * 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> */ @@ -14,11 +8,11 @@ /* Compile Time Versioning Information */ -#define LIBNL_STRING "libnl 3.5.0" -#define LIBNL_VERSION "3.5.0" +#define LIBNL_STRING "libnl 3.7.0" +#define LIBNL_VERSION "3.7.0" #define LIBNL_VER_MAJ 3 -#define LIBNL_VER_MIN 5 +#define LIBNL_VER_MIN 7 #define LIBNL_VER_MIC 0 #define LIBNL_VER(maj,min) ((maj) << 8 | (min)) #define LIBNL_VER_NUM LIBNL_VER(LIBNL_VER_MAJ, LIBNL_VER_MIN)
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/version.h.in -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/version.h.in
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/version.h Versioning Information - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/include/netlink/xfrm/sa.h -> _service:tar_scm:libnl-3.7.0.tar.gz/include/netlink/xfrm/sa.h
Changed
@@ -164,6 +164,9 @@ unsigned int, unsigned int, unsigned int, unsigned int, unsigned int*); +extern int xfrmnl_sa_get_user_offload (struct xfrmnl_sa*, int*, uint8_t *); +extern int xfrmnl_sa_set_user_offload (struct xfrmnl_sa*, int, uint8_t); + extern int xfrmnl_sa_is_expiry_reached (struct xfrmnl_sa*); extern int xfrmnl_sa_is_hardexpiry_reached (struct xfrmnl_sa*);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/addr.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/addr.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/addr.c Network Address - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/attr.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/attr.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/attr.c Netlink 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -257,7 +250,7 @@ if (policy) { err = validate_nla(nla, maxtype, policy); if (err < 0) - goto errout; + return err; } if (tbtype) @@ -267,13 +260,12 @@ tbtype = nla; } - if (rem > 0) + if (rem > 0) { NL_DBG(1, "netlink: %d bytes leftover after parsing " "attributes.\n", rem); + } - err = 0; -errout: - return err; + return 0; } /**
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cache.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cache.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/cache.c Caching Module - * - * 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> */ @@ -51,6 +44,7 @@ */ #include <netlink-private/netlink.h> +#include <netlink-private/utils.h> #include <netlink/netlink.h> #include <netlink/cache.h> #include <netlink/object.h> @@ -757,7 +751,10 @@ * @arg cache Cache to put items into. * * Waits for netlink messages to arrive, parses them and puts them into - * the specified cache. + * the specified cache. If an old object with same key attributes is + * present in the cache, it is replaced with the new object. + * If the old object type supports an update operation, an update is + * attempted before a replace. * * @return 0 on success or a negative error code. */ @@ -772,10 +769,7 @@ * @arg cache Cache to put items into. * * Waits for netlink messages to arrive, parses them and puts them into - * the specified cache. If an old object with same key attributes is - * present in the cache, it is replaced with the new object. - * If the old object type supports an update operation, an update is - * attempted before a replace. + * the specified cache. * * @return 0 on success or a negative error code. */ @@ -1208,7 +1202,7 @@ /** * Dump all elements of a cache (filtered). * @arg cache cache to dump - * @arg params dumping parameters (optional) + * @arg params dumping parameters * @arg filter filter object * * Dumps all elements of the \a cache to the file descriptor \a fd @@ -1218,13 +1212,30 @@ struct nl_dump_params *params, struct nl_object *filter) { - int type = params ? params->dp_type : NL_DUMP_DETAILS; + struct nl_dump_params params_copy; struct nl_object_ops *ops; struct nl_object *obj; + int type; NL_DBG(2, "Dumping cache %p <%s> with filter %p\n", cache, nl_cache_name(cache), filter); + if (!params) { + /* It doesn't really make sense that @params is an optional parameter. In the + * past, nl_cache_dump() was documented that the @params would be optional, so + * try to save it. + * + * Note that this still isn't useful, because we don't set any dump option. + * It only exists not to crash applications that wrongly pass %NULL here. */ + _nl_assert_not_reached (); + params_copy = (struct nl_dump_params) { + .dp_type = NL_DUMP_DETAILS, + }; + params = ¶ms_copy; + } + + type = params->dp_type; + if (type > NL_DUMP_MAX || type < 0) BUG(); @@ -1235,7 +1246,7 @@ if (!ops->oo_dumptype) return; - if (params && params->dp_buf) + if (params->dp_buf) memset(params->dp_buf, 0, params->dp_buflen); nl_list_for_each_entry(obj, &cache->c_items, ce_list) {
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cache_mngr.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cache_mngr.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/cache_mngr.c Cache Manager - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cache_mngt.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cache_mngt.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/cache_mngt.c Cache Management - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cli/cls/basic.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cli/cls/basic.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/cli/cls/basic.c basic classifier module for CLI lib - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cli/cls/cgroup.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cli/cls/cgroup.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/cli/cls/cgroup.c cgroup classifier module for CLI lib - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cli/qdisc/bfifo.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cli/qdisc/bfifo.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * src/lib/bfifo.c bfifo module for CLI lib - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cli/qdisc/blackhole.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cli/qdisc/blackhole.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * src/lib/blackhole.c Blackhole module for CLI lib - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cli/qdisc/fq_codel.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cli/qdisc/fq_codel.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/cli/qdisc/fq_codel.c fq_codel module for CLI lib - * - * 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) 2013 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cli/qdisc/hfsc.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cli/qdisc/hfsc.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/cli/qdisc/hfsc.c HFSC module for CLI lib - * - * 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) 2014 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cli/qdisc/htb.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cli/qdisc/htb.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * src/lib/htb.c HTB module for CLI lib - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cli/qdisc/ingress.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cli/qdisc/ingress.c
Changed
@@ -1,12 +1,5 @@ - +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * src/lib/ingress.c ingress module for CLI lib - * - * 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) 2013 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cli/qdisc/pfifo.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cli/qdisc/pfifo.c
Changed
@@ -1,12 +1,5 @@ - +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * src/lib/pfifo.c pfifo module for CLI lib - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/cli/qdisc/plug.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/cli/qdisc/plug.c
Changed
@@ -1,12 +1,5 @@ - +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * src/lib/cli/qdisc/plug.c plug module for CLI lib - * - * 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) 2012 Shriram Rajagopalan <rshriram@cs.ubc.ca> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/data.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/data.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/data.c Abstract Data - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/defs.h.in -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/defs.h.in
Changed
@@ -12,12 +12,12 @@ /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the <stdio.h> header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H @@ -66,7 +66,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Version number of package */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/error.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/error.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/error.c Error Handling - * - * 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 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/fib_lookup/lookup.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/fib_lookup/lookup.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/fib_lookup/lookup.c FIB 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-2012 Thomas Graf <tgraf@suug.ch> */ @@ -62,11 +55,13 @@ struct flnl_result *dst = nl_object_priv(_dst); struct flnl_result *src = nl_object_priv(_src); - if (src->fr_req) - if (!(dst->fr_req = (struct flnl_request *) - nl_object_clone(OBJ_CAST(src->fr_req)))) + dst->fr_req = NULL; + + if (src->fr_req) { + if (!(dst->fr_req = (struct flnl_request *) nl_object_clone(OBJ_CAST(src->fr_req)))) return -NLE_NOMEM; - + } + return 0; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/fib_lookup/request.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/fib_lookup/request.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/fib_lookup/request.c FIB Lookup Request - * - * 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> */ @@ -47,9 +40,12 @@ struct flnl_request *dst = nl_object_priv(_dst); struct flnl_request *src = nl_object_priv(_src); - if (src->lr_addr) + dst->lr_addr = NULL; + + if (src->lr_addr) { if (!(dst->lr_addr = nl_addr_clone(src->lr_addr))) return -NLE_NOMEM; + } return 0; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/genl/ctrl.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/genl/ctrl.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/genl/ctrl.c Generic Netlink Controller - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/genl/family.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/genl/family.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/genl/family.c Generic Netlink Family - * - * 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> */ @@ -74,6 +67,9 @@ struct genl_family_grp *grp; int err; + nl_init_list_head(&dst->gf_ops); + nl_init_list_head(&dst->gf_mc_grps); + nl_list_for_each_entry(ops, &src->gf_ops, o_list) { err = genl_family_add_op(dst, ops->o_id, ops->o_flags); if (err < 0) @@ -260,7 +256,7 @@ */ void genl_family_set_name(struct genl_family *family, const char *name) { - strncpy(family->gf_name, name, GENL_NAMSIZ-1); + _nl_strncpy_trunc(family->gf_name, name, GENL_NAMSIZ); family->ce_mask |= FAMILY_ATTR_NAME; } @@ -380,7 +376,7 @@ return -NLE_NOMEM; grp->id = id; - _nl_strncpy(grp->name, name, GENL_NAMSIZ); + _nl_strncpy_assert(grp->name, name, GENL_NAMSIZ); nl_list_add_tail(&grp->list, &family->gf_mc_grps);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/genl/genl.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/genl/genl.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/genl/genl.c Generic 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-2012 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/genl/mngt.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/genl/mngt.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/genl/mngt.c Generic Netlink Management - * - * 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> */ @@ -133,13 +126,13 @@ cmd = &ops->o_cmdsi; if (cmd->c_id == op) { - strncpy(buf, cmd->c_name, len - 1); + _nl_strncpy_trunc(buf, cmd->c_name, len); return buf; } } } - strncpy(buf, "unknown", len - 1); + _nl_strncpy_trunc(buf, "unknown", len); return NULL; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/handlers.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/handlers.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/handlers.c default netlink message handlers - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/hashtable.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/hashtable.c
Changed
@@ -1,14 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * netlink/hashtable.c Netlink hashtable 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) 2012 Cumulus Networks, Inc */ + #include <string.h> #include <netlink-private/netlink.h> #include <netlink/object.h> @@ -59,15 +53,15 @@ int i; for(i = 0; i < ht->size; i++) { - nl_hash_node_t *node = ht->nodesi; - nl_hash_node_t *saved_node; - - while (node) { - saved_node = node; - node = node->next; - nl_object_put(saved_node->obj); - free(saved_node); - } + nl_hash_node_t *node = ht->nodesi; + nl_hash_node_t *saved_node; + + while (node) { + saved_node = node; + node = node->next; + nl_object_put(saved_node->obj); + free(saved_node); + } } free(ht->nodes); @@ -94,9 +88,9 @@ node = ht->nodeskey_hash; while (node) { - if (nl_object_identical(node->obj, obj)) - return node->obj; - node = node->next; + if (nl_object_identical(node->obj, obj)) + return node->obj; + node = node->next; } return NULL; @@ -124,11 +118,11 @@ node = ht->nodeskey_hash; while (node) { - if (nl_object_identical(node->obj, obj)) { - NL_DBG(2, "Warning: Add to hashtable found duplicate...\n"); - return -NLE_EXIST; - } - node = node->next; + if (nl_object_identical(node->obj, obj)) { + NL_DBG(2, "Warning: Add to hashtable found duplicate...\n"); + return -NLE_EXIST; + } + node = node->next; } NL_DBG (5, "adding cache entry of obj %p in table %p, with hash 0x%x\n", @@ -168,20 +162,20 @@ prev = node = ht->nodeskey_hash; while (node) { - if (nl_object_identical(node->obj, obj)) { - nl_object_put(obj); + if (nl_object_identical(node->obj, obj)) { + nl_object_put(obj); - NL_DBG (5, "deleting cache entry of obj %p in table %p, with" - " hash 0x%x\n", obj, ht, key_hash); + NL_DBG (5, "deleting cache entry of obj %p in table %p, with" + " hash 0x%x\n", obj, ht, key_hash); - if (node == ht->nodeskey_hash) - ht->nodeskey_hash = node->next; - else - prev->next = node->next; + if (node == ht->nodeskey_hash) + ht->nodeskey_hash = node->next; + else + prev->next = node->next; - free(node); + free(node); - return 0; + return 0; } prev = node; node = node->next;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/idiag/idiag.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/idiag/idiag.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/idiag/idiag.c Inet Diag 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) 2013 Sassano Systems LLC <joe@sassanosystems.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/idiag/idiag_meminfo_obj.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/idiag/idiag_meminfo_obj.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/idiag/idiagnl_meminfo_obj.c Inet Diag Meminfo Object - * - * 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) 2013 Sassano Systems LLC <joe@sassanosystems.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/idiag/idiag_msg_obj.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/idiag/idiag_msg_obj.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/idiag/idiagnl_msg_obj.c Inet Diag Message Object - * - * 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) 2013 Sassano Systems LLC <joe@sassanosystems.com> */ @@ -629,9 +622,9 @@ struct idiagnl_msg *dst = (struct idiagnl_msg *) _dst; struct idiagnl_msg *src = (struct idiagnl_msg *) _src; - dst->idiag_cong = NULL; dst->idiag_src = NULL; dst->idiag_dst = NULL; + dst->idiag_cong = NULL; dst->idiag_meminfo = NULL; dst->idiag_vegasinfo = NULL; dst->ce_mask &= ~(IDIAGNL_ATTR_CONG |
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/idiag/idiag_req_obj.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/idiag/idiag_req_obj.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/idiag/idiagnl_req_obj.c Inet Diag Request Object - * - * 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) 2013 Sassano Systems LLC <joe@sassanosystems.com> */ @@ -176,6 +169,9 @@ struct idiagnl_req *dst = (struct idiagnl_req *) _dst; struct idiagnl_req *src = (struct idiagnl_req *) _src; + src->idiag_src = NULL; + src->idiag_dst = NULL; + if (src->idiag_src) if (!(dst->idiag_src = nl_addr_clone(src->idiag_src))) return -NLE_NOMEM;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/idiag/idiag_vegasinfo_obj.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/idiag/idiag_vegasinfo_obj.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/idiag/idiagnl_vegasinfo_obj.c Inet Diag TCP Vegas Info Object - * - * 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) 2013 Sassano Systems LLC <joe@sassanosystems.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/msg.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/msg.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/msg.c Netlink Messages Interface - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/ct.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/ct.c
Changed
@@ -1,16 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/ct.c Conntrack - * - * 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 - * Copyright (c= 2008 Patrick McHardy <kaber@trash.net> + * Copyright (c) 2008 Patrick McHardy <kaber@trash.net> */ /** @@ -315,40 +308,25 @@ return 0; } -int nfnlmsg_ct_parse(struct nlmsghdr *nlh, struct nfnl_ct **result) +static int _nfnlmsg_ct_parse(struct nlattr **tb, struct nfnl_ct *ct) { - struct nfnl_ct *ct; - struct nlattr *tbCTA_MAX+1; int err; - ct = nfnl_ct_alloc(); - if (!ct) - return -NLE_NOMEM; - - ct->ce_msgtype = nlh->nlmsg_type; - - err = nlmsg_parse(nlh, sizeof(struct nfgenmsg), tb, CTA_MAX, - ct_policy); - if (err < 0) - goto errout; - - nfnl_ct_set_family(ct, nfnlmsg_family(nlh)); - if (tbCTA_TUPLE_ORIG) { err = ct_parse_tuple(ct, 0, tbCTA_TUPLE_ORIG); if (err < 0) - goto errout; + return err; } if (tbCTA_TUPLE_REPLY) { err = ct_parse_tuple(ct, 1, tbCTA_TUPLE_REPLY); if (err < 0) - goto errout; + return err; } if (tbCTA_PROTOINFO) { err = ct_parse_protoinfo(ct, tbCTA_PROTOINFO); if (err < 0) - goto errout; + return err; } if (tbCTA_STATUS) @@ -367,24 +345,80 @@ if (tbCTA_COUNTERS_ORIG) { err = ct_parse_counters(ct, 0, tbCTA_COUNTERS_ORIG); if (err < 0) - goto errout; + return err; } if (tbCTA_COUNTERS_REPLY) { err = ct_parse_counters(ct, 1, tbCTA_COUNTERS_REPLY); if (err < 0) - goto errout; + return err; } if (tbCTA_TIMESTAMP) { err = ct_parse_timestamp(ct, tbCTA_TIMESTAMP); if (err < 0) - goto errout; + return err; } + return 0; +} + +int nfnlmsg_ct_parse(struct nlmsghdr *nlh, struct nfnl_ct **result) +{ + struct nfnl_ct *ct; + struct nlattr *tbCTA_MAX+1; + int err; + + ct = nfnl_ct_alloc(); + if (!ct) + return -NLE_NOMEM; + + ct->ce_msgtype = nlh->nlmsg_type; + + err = nlmsg_parse(nlh, sizeof(struct nfgenmsg), tb, CTA_MAX, + ct_policy); + if (err < 0) + goto errout; + + nfnl_ct_set_family(ct, nfnlmsg_family(nlh)); + + err = _nfnlmsg_ct_parse(tb, ct); + if (err < 0) + goto errout; + *result = ct; return 0; +errout: + nfnl_ct_put(ct); + return err; +} + +int nfnlmsg_ct_parse_nested(struct nlattr *attr, struct nfnl_ct **result) +{ + struct nfnl_ct *ct; + struct nlattr *tbCTA_MAX+1; + int err; + + ct = nfnl_ct_alloc(); + if (!ct) + return -NLE_NOMEM; + + // msgtype not given for nested + //ct->ce_msgtype = nlh->nlmsg_type; + err = nla_parse_nested(tb, CTA_MAX, attr, ct_policy); + if (err < 0) + goto errout; + + // family not known + //nfnl_ct_set_family(ct, nfnlmsg_family(nlh)); + + err = _nfnlmsg_ct_parse(tb, ct); + if (err < 0) + goto errout; + + *result = ct; + return 0; errout: nfnl_ct_put(ct); return err; @@ -508,20 +542,24 @@ { struct nl_msg *msg; int err; + int reply = 0; msg = nfnlmsg_alloc_simple(NFNL_SUBSYS_CTNETLINK, cmd, flags, nfnl_ct_get_family(ct), 0); if (msg == NULL) return -NLE_NOMEM; - if ((err = nfnl_ct_build_tuple(msg, ct, 0)) < 0) - goto err_out; - - /* REPLY tuple is optional, dont add unless at least src/dst specified */ - - if ( nfnl_ct_get_src(ct, 1) && nfnl_ct_get_dst(ct, 1) ) + /* We use REPLY || ORIG, depending on requests. */ + if (nfnl_ct_get_src(ct, 1) || nfnl_ct_get_dst(ct, 1)) { + reply = 1; if ((err = nfnl_ct_build_tuple(msg, ct, 1)) < 0) goto err_out; + } + + if (!reply || nfnl_ct_get_src(ct, 0) || nfnl_ct_get_dst(ct, 0)) { + if ((err = nfnl_ct_build_tuple(msg, ct, 0)) < 0) + goto err_out; + } if (nfnl_ct_test_status(ct)) NLA_PUT_U32(msg, CTA_STATUS, htonl(nfnl_ct_get_status(ct)));
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/ct_obj.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/ct_obj.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/ct_obj.c Conntrack Object - * - * 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 @@ -75,6 +68,11 @@ struct nfnl_ct *src = (struct nfnl_ct *) _src; struct nl_addr *addr; + dst->ct_orig.src = NULL; + dst->ct_orig.dst = NULL; + dst->ct_repl.src = NULL; + dst->ct_repl.dst = NULL; + if (src->ct_orig.src) { addr = nl_addr_clone(src->ct_orig.src); if (!addr) @@ -206,7 +204,7 @@ delta_time /= NSEC_PER_SEC; else delta_time = 0; - nl_dump(p, "delta-time %llu ", delta_time); + nl_dump(p, "delta-time %llu ", (long long unsigned)delta_time); } nl_dump(p, "\n"); @@ -221,8 +219,9 @@ ct_dump_line(a, p); nl_dump(p, " id 0x%x ", ct->ct_id); - nl_dump_line(p, "family %s ", - nl_af2str(ct->ct_family, buf, sizeof(buf))); + if (ct->ce_mask & CT_ATTR_FAMILY) + nl_dump_line(p, "family %s ", + nl_af2str(ct->ct_family, buf, sizeof(buf))); if (nfnl_ct_test_use(ct)) nl_dump(p, "refcnt %u ", nfnl_ct_get_use(ct));
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/exp.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/exp.c
Changed
@@ -1,16 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/exp.c Conntrack 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-2008 Thomas Graf <tgraf@suug.ch> * Copyright (c) 2007 Philip Craig <philipc@snapgear.com> * Copyright (c) 2007 Secure Computing Corporation - * Copyright (c= 2008 Patrick McHardy <kaber@trash.net> + * Copyright (c) 2008 Patrick McHardy <kaber@trash.net> * Copyright (c) 2012 Rich Fought <rich.fought@watchguard.com> */ @@ -423,7 +416,6 @@ static int nfnl_exp_build_nat(struct nl_msg *msg, const struct nfnl_exp *exp) { struct nlattr *nat; - int err; nat = nla_nest_start(msg, CTA_EXPECT_NAT); @@ -432,7 +424,7 @@ nfnl_exp_get_nat_dir(exp)); } - if ((err = nfnl_exp_build_tuple(msg, exp, CTA_EXPECT_NAT)) < 0) + if (nfnl_exp_build_tuple(msg, exp, CTA_EXPECT_NAT) < 0) goto nla_put_failure; nla_nest_end(msg, nat);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/exp_obj.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/exp_obj.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/exp_obj.c Conntrack Expectation Object - * - * 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 @@ -88,7 +81,17 @@ struct nfnl_exp *src = (struct nfnl_exp *) _src; struct nl_addr *addr; - // Expectation + dst->exp_helper_name = NULL; + dst->exp_fn = NULL; + dst->exp_expect.src = NULL; + dst->exp_expect.dst = NULL; + dst->exp_master.src = NULL; + dst->exp_master.dst = NULL; + dst->exp_mask.src = NULL; + dst->exp_mask.dst = NULL; + dst->exp_nat.src = NULL; + dst->exp_nat.dst = NULL; + if (src->exp_expect.src) { addr = nl_addr_clone(src->exp_expect.src); if (!addr) @@ -103,7 +106,6 @@ dst->exp_expect.dst = addr; } - // Master CT if (src->exp_master.src) { addr = nl_addr_clone(src->exp_master.src); if (!addr) @@ -118,7 +120,6 @@ dst->exp_master.dst = addr; } - // Mask if (src->exp_mask.src) { addr = nl_addr_clone(src->exp_mask.src); if (!addr) @@ -133,7 +134,6 @@ dst->exp_mask.dst = addr; } - // NAT if (src->exp_nat.src) { addr = nl_addr_clone(src->exp_nat.src); if (!addr) @@ -218,7 +218,7 @@ } if (nfnl_exp_test_nat_dir(exp)) - nl_dump(p, "nat dir %s ", exp->exp_nat_dir); + nl_dump(p, "nat dir %u ", exp->exp_nat_dir); }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/log.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/log.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/log.c Netfilter Log - * - * 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 @@ -151,6 +144,11 @@ htonl(nfnl_log_get_queue_threshold(log))) < 0) goto nla_put_failure; + if (nfnl_log_get_flags(log) && + nla_put_u16(msg, NFULA_CFG_FLAGS, + htons(nfnl_log_get_flags(log))) < 0) + goto nla_put_failure; + *result = msg; return 0;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/log_msg.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/log_msg.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/log_msg.c Netfilter Log Message - * - * 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 @@ -50,8 +43,41 @@ NFULA_GID = { .type = NLA_U32 }, NFULA_SEQ = { .type = NLA_U32 }, NFULA_SEQ_GLOBAL = { .type = NLA_U32 }, + NFULA_HWTYPE = { .type = NLA_U16 }, + NFULA_HWLEN = { .type = NLA_U16 }, + NFULA_VLAN = { .type = NLA_NESTED }, + NFULA_CT = { .type = NLA_NESTED }, + NFULA_CT_INFO = { .type = NLA_U32 }, }; +static struct nla_policy log_msg_vlan_policyNFULA_VLAN_MAX+1 = { + NFULA_VLAN_PROTO = { .type = NLA_U16 }, + NFULA_VLAN_TCI = { .type = NLA_U16 }, +}; + +static int +nfnlmsg_log_msg_parse_vlan(struct nlattr *attr_full, struct nfnl_log_msg *msg) +{ + struct nlattr *tbNFULA_VLAN_MAX+1; + struct nlattr *attr; + int err; + + err = nla_parse_nested(tb, NFULA_VLAN_MAX, attr_full, + log_msg_vlan_policy); + if (err < 0) + return err; + + attr = tbNFULA_VLAN_PROTO; + if (attr) + nfnl_log_msg_set_vlan_proto(msg, nla_get_u16(attr)); + + attr = tbNFULA_VLAN_TCI; + if (attr) + nfnl_log_msg_set_vlan_tag(msg, ntohs(nla_get_u16(attr))); + + return 0; +} + int nfnlmsg_log_msg_parse(struct nlmsghdr *nlh, struct nfnl_log_msg **result) { struct nfnl_log_msg *msg; @@ -148,6 +174,39 @@ if (attr) nfnl_log_msg_set_seq_global(msg, ntohl(nla_get_u32(attr))); + attr = tbNFULA_HWTYPE; + if (attr) + nfnl_log_msg_set_hwtype(msg, ntohs(nla_get_u16(attr))); + + attr = tbNFULA_HWLEN; + if (attr) + nfnl_log_msg_set_hwlen(msg, ntohs(nla_get_u16(attr))); + + attr = tbNFULA_HWHEADER; + if (attr) + nfnl_log_msg_set_hwheader(msg, nla_data(attr), nla_len(attr)); + + attr = tbNFULA_VLAN; + if (attr) { + err = nfnlmsg_log_msg_parse_vlan(attr, msg); + if (err < 0) + goto errout; + } + + attr = tbNFULA_CT; + if (attr) { + struct nfnl_ct *ct = NULL; + err = nfnlmsg_ct_parse_nested(attr, &ct); + if (err < 0) + goto errout; + nfnl_log_msg_set_ct(msg, ct); + nfnl_ct_put(ct); + } + + attr = tbNFULA_CT_INFO; + if (attr) + nfnl_log_msg_set_ct_info(msg, ntohl(nla_get_u32(attr))); + *result = msg; return 0;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/log_msg_obj.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/log_msg_obj.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/log_msg_obj.c Netfilter Log Object - * - * 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 @@ -34,6 +27,13 @@ #define LOG_MSG_ATTR_GID (1UL << 13) #define LOG_MSG_ATTR_SEQ (1UL << 14) #define LOG_MSG_ATTR_SEQ_GLOBAL (1UL << 15) +#define LOG_MSG_ATTR_HWTYPE (1UL << 16) +#define LOG_MSG_ATTR_HWLEN (1UL << 17) +#define LOG_MSG_ATTR_HWHEADER (1UL << 18) +#define LOG_MSG_ATTR_VLAN_PROTO (1UL << 19) +#define LOG_MSG_ATTR_VLAN_TAG (1UL << 20) +#define LOG_MSG_ATTR_CT_INFO (1UL << 21) +#define LOG_MSG_ATTR_CT (1UL << 22) /** @endcond */ static void log_msg_free_data(struct nl_object *c) @@ -45,6 +45,9 @@ free(msg->log_msg_payload); free(msg->log_msg_prefix); + free(msg->log_msg_hwheader); + if (msg->log_msg_ct) + nfnl_ct_put(msg->log_msg_ct); } static int log_msg_clone(struct nl_object *_dst, struct nl_object *_src) @@ -53,22 +56,41 @@ struct nfnl_log_msg *src = (struct nfnl_log_msg *) _src; int err; + dst->log_msg_payload = NULL; + dst->log_msg_payload_len = 0; + dst->log_msg_prefix = NULL; + dst->log_msg_hwheader = NULL; + dst->log_msg_hwheader_len = 0; + dst->log_msg_ct = NULL; + if (src->log_msg_payload) { err = nfnl_log_msg_set_payload(dst, src->log_msg_payload, - src->log_msg_payload_len); + src->log_msg_payload_len); if (err < 0) - goto errout; + return err; } if (src->log_msg_prefix) { err = nfnl_log_msg_set_prefix(dst, src->log_msg_prefix); if (err < 0) - goto errout; + return err; + } + + if (src->log_msg_hwheader) { + err = nfnl_log_msg_set_hwheader(dst, src->log_msg_hwheader, + src->log_msg_hwheader_len); + if (err < 0) + return err; + } + + if (src->log_msg_ct) { + dst->log_msg_ct = (struct nfnl_ct *) nl_object_clone((struct nl_object *) src->log_msg_ct); + if (!dst->log_msg_ct) { + return -NLE_NOMEM; + } } return 0; -errout: - return err; } static void log_msg_dump(struct nl_object *a, struct nl_dump_params *p) @@ -101,7 +123,7 @@ msg->log_msg_physindev, buf, sizeof(buf))); else - nl_dump(p, "IN=%d ", msg->log_msg_physindev); + nl_dump(p, "PHYSIN=%d ", msg->log_msg_physindev); } if (msg->ce_mask & LOG_MSG_ATTR_OUTDEV) { @@ -167,8 +189,35 @@ if (msg->ce_mask & LOG_MSG_ATTR_SEQ_GLOBAL) nl_dump(p, "SEQGLOBAL=%d ", msg->log_msg_seq_global); + if (msg->ce_mask & LOG_MSG_ATTR_HWTYPE) + nl_dump(p, "HWTYPE=%u ", msg->log_msg_hwtype); + + if (msg->ce_mask & LOG_MSG_ATTR_HWLEN) + nl_dump(p, "HWLEN=%u ", msg->log_msg_hwlen); + + if (msg->ce_mask & LOG_MSG_ATTR_HWHEADER) { + int i; + + nl_dump(p, "HWHEADER"); + for (i = 0; i < msg->log_msg_hwheader_len; i++) + nl_dump(p, "%c%02x", i?':':'=', ((uint8_t*) msg->log_msg_hwheader) i); + nl_dump(p, " "); + } + + if (msg->ce_mask & LOG_MSG_ATTR_VLAN_TAG) + nl_dump(p, "VLAN=%d CFI=%d PRIO=%d", + (int) nfnl_log_msg_get_vlan_id(msg), + (int) nfnl_log_msg_get_vlan_cfi(msg), + (int) nfnl_log_msg_get_vlan_prio(msg)); + + if (msg->ce_mask & LOG_MSG_ATTR_CT_INFO) + nl_dump(p, "CTINFO=%u ", msg->log_msg_ct_info); + nl_dump(p, "\n"); + if (msg->ce_mask & LOG_MSG_ATTR_CT) + ct_obj_ops.oo_dumpNL_DUMP_LINE((struct nl_object *)msg->log_msg_ct, p); + if (link_cache) nl_cache_put(link_cache); } @@ -342,14 +391,22 @@ int nfnl_log_msg_set_payload(struct nfnl_log_msg *msg, uint8_t *payload, int len) { - free(msg->log_msg_payload); - msg->log_msg_payload = malloc(len); - if (!msg->log_msg_payload) + uint8_t *p = NULL; + + if (len < 0) + return -NLE_INVAL; + + p = _nl_memdup(payload, len); + if (!p && len > 0) return -NLE_NOMEM; - memcpy(msg->log_msg_payload, payload, len); + free(msg->log_msg_payload); + msg->log_msg_payload = p; msg->log_msg_payload_len = len; - msg->ce_mask |= LOG_MSG_ATTR_PAYLOAD; + if (len > 0) + msg->ce_mask |= LOG_MSG_ATTR_PAYLOAD; + else + msg->ce_mask &= ~LOG_MSG_ATTR_PAYLOAD; return 0; } @@ -366,12 +423,21 @@ int nfnl_log_msg_set_prefix(struct nfnl_log_msg *msg, void *prefix) { + char *p = NULL; + + if (prefix) { + p = strdup(prefix); + if (!p) + return -NLE_NOMEM; + } + free(msg->log_msg_prefix); - msg->log_msg_prefix = strdup(prefix); - if (!msg->log_msg_prefix) - return -NLE_NOMEM; + msg->log_msg_prefix = p; - msg->ce_mask |= LOG_MSG_ATTR_PREFIX; + if (p) + msg->ce_mask |= LOG_MSG_ATTR_PREFIX; + else + msg->ce_mask &= ~LOG_MSG_ATTR_PREFIX; return 0; } @@ -445,6 +511,154 @@ return msg->log_msg_seq_global; } +void nfnl_log_msg_set_hwtype(struct nfnl_log_msg *msg, uint16_t hwtype) +{ + msg->log_msg_hwtype = hwtype; + msg->ce_mask |= LOG_MSG_ATTR_HWTYPE; +} + +int nfnl_log_msg_test_hwtype(const struct nfnl_log_msg *msg) +{ + return !!(msg->ce_mask & LOG_MSG_ATTR_HWTYPE); +} + +uint16_t nfnl_log_msg_get_hwtype(const struct nfnl_log_msg *msg) +{ + return msg->log_msg_hwtype; +} + +void nfnl_log_msg_set_hwlen(struct nfnl_log_msg *msg, uint16_t hwlen) +{ + msg->log_msg_hwlen = hwlen; + msg->ce_mask |= LOG_MSG_ATTR_HWLEN; +} + +int nfnl_log_msg_test_hwlen(const struct nfnl_log_msg *msg) +{ + return !!(msg->ce_mask & LOG_MSG_ATTR_HWLEN); +} + +uint16_t nfnl_log_msg_get_hwlen(const struct nfnl_log_msg *msg) +{ + return msg->log_msg_hwlen; +} + +int nfnl_log_msg_set_hwheader(struct nfnl_log_msg *msg, void *data, int len) +{ + void *p = NULL; + + if (len < 0) + return -NLE_INVAL; + + p = _nl_memdup(data, len); + if (!p && len > 0) + return -NLE_NOMEM; + + free(msg->log_msg_hwheader); + msg->log_msg_hwheader = p; + msg->log_msg_hwheader_len = len; + if (len > 0) + msg->ce_mask |= LOG_MSG_ATTR_HWHEADER; + else + msg->ce_mask &= ~LOG_MSG_ATTR_HWHEADER; + return 0; +} + +int nfnl_log_msg_test_hwheader(const struct nfnl_log_msg *msg) +{ + return !!(msg->ce_mask & LOG_MSG_ATTR_HWHEADER); +} + +const void *nfnl_log_msg_get_hwheader(const struct nfnl_log_msg *msg, int *len) +{ + if (!(msg->ce_mask & LOG_MSG_ATTR_HWHEADER)) { + *len = 0; + return NULL; + } + + *len = msg->log_msg_hwheader_len; + return msg->log_msg_hwheader; +} + +void nfnl_log_msg_set_vlan_proto(struct nfnl_log_msg *msg, uint16_t vlan_proto) +{ + msg->log_msg_vlan_proto = vlan_proto; + msg->ce_mask |= LOG_MSG_ATTR_VLAN_PROTO; +} + +int nfnl_log_msg_test_vlan_proto(const struct nfnl_log_msg *msg) +{ + return !!(msg->ce_mask & LOG_MSG_ATTR_VLAN_PROTO); +} + +uint16_t nfnl_log_msg_get_vlan_proto(const struct nfnl_log_msg *msg) +{ + return msg->log_msg_vlan_proto; +} + +void nfnl_log_msg_set_vlan_tag(struct nfnl_log_msg *msg, uint16_t vlan_tag) +{ + msg->log_msg_vlan_tag = vlan_tag; + msg->ce_mask |= LOG_MSG_ATTR_VLAN_TAG; +} + +int nfnl_log_msg_test_vlan_tag(const struct nfnl_log_msg *msg) +{ + return !!(msg->ce_mask & LOG_MSG_ATTR_VLAN_TAG); +} + +uint16_t nfnl_log_msg_get_vlan_tag(const struct nfnl_log_msg *msg) +{ + return msg->log_msg_vlan_tag; +} + +uint16_t nfnl_log_msg_get_vlan_id(const struct nfnl_log_msg *msg) +{ + return msg->log_msg_vlan_tag & 0x0fff; +} + +uint16_t nfnl_log_msg_get_vlan_cfi(const struct nfnl_log_msg *msg) +{ + return !!(msg->log_msg_vlan_tag & 0x1000); +} + +uint16_t nfnl_log_msg_get_vlan_prio(const struct nfnl_log_msg *msg) +{ + return (msg->log_msg_vlan_tag & 0xe000 ) >> 13; +} + +void nfnl_log_msg_set_ct_info(struct nfnl_log_msg *msg, uint32_t ct_info) +{ + msg->log_msg_ct_info = ct_info; + msg->ce_mask |= LOG_MSG_ATTR_CT_INFO; +} + +int nfnl_log_msg_test_ct_info(const struct nfnl_log_msg *msg) +{ + return !!(msg->ce_mask & LOG_MSG_ATTR_CT_INFO); +} + +uint32_t nfnl_log_msg_get_ct_info(const struct nfnl_log_msg *msg) +{ + return msg->log_msg_ct_info; +} + +void nfnl_log_msg_set_ct(struct nfnl_log_msg *msg, struct nfnl_ct *ct) +{ + msg->log_msg_ct = (struct nfnl_ct *) nl_object_clone((struct nl_object *)ct); + msg->ce_mask |= LOG_MSG_ATTR_CT; +} + +int nfnl_log_msg_test_ct(const struct nfnl_log_msg *msg) +{ + return !!(msg->ce_mask & LOG_MSG_ATTR_CT); +} + +struct nfnl_ct *nfnl_log_msg_get_ct(const struct nfnl_log_msg *msg) +{ + return msg->log_msg_ct; +} + /** @} */ struct nl_object_ops log_msg_obj_ops = {
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/log_obj.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/log_obj.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/log_obj.c Netfilter Log Object - * - * 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 @@ -215,9 +208,15 @@ log->log_flag_mask |= flags; } +unsigned int nfnl_log_get_flags(const struct nfnl_log *log) +{ + return log->log_flags; +} + static const struct trans_tbl log_flags = { __ADD(NFNL_LOG_FLAG_SEQ, seq), __ADD(NFNL_LOG_FLAG_SEQ_GLOBAL, seq_global), + __ADD(NFNL_LOG_FLAG_CONNTRACK, conntrack), }; char *nfnl_log_flags2str(unsigned int flags, char *buf, size_t len)
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/netfilter.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/netfilter.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/netfilter.c Netfilter Generic Functions - * - * 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 Patrick McHardy <kaber@trash.net> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/nfnl.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/nfnl.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/nfnl.c Netfilter 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-2012 Thomas Graf <tgraf@suug.ch> * Copyright (c) 2007 Philip Craig <philipc@snapgear.com> * Copyright (c) 2007 Secure Computing Corporation
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/queue.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/queue.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/queue.c Netfilter Queue - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/queue_msg.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/queue_msg.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/queue_msg.c Netfilter Queue Messages - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/queue_msg_obj.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/queue_msg_obj.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/queue_msg_obj.c Netfilter Queue Message Object - * - * 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> */ @@ -49,16 +42,17 @@ struct nfnl_queue_msg *src = (struct nfnl_queue_msg *) _src; int err; + dst->queue_msg_payload = NULL; + dst->queue_msg_payload_len = 0; + if (src->queue_msg_payload) { err = nfnl_queue_msg_set_payload(dst, src->queue_msg_payload, - src->queue_msg_payload_len); + src->queue_msg_payload_len); if (err < 0) - goto errout; + return err; } return 0; -errout: - return err; } static void nfnl_queue_msg_dump(struct nl_object *a, struct nl_dump_params *p) @@ -392,7 +386,7 @@ } const uint8_t *nfnl_queue_msg_get_hwaddr(const struct nfnl_queue_msg *msg, - int *len) + int *len) { if (!(msg->ce_mask & QUEUE_MSG_ATTR_HWADDR)) { *len = 0; @@ -404,19 +398,24 @@ } int nfnl_queue_msg_set_payload(struct nfnl_queue_msg *msg, uint8_t *payload, - int len) + int len) { - void *new_payload = malloc(len); + void *p = NULL; + + if (len < 0) + return -NLE_INVAL; - if (new_payload == NULL) + p = _nl_memdup(payload, len); + if (!p && len > 0) return -NLE_NOMEM; - memcpy(new_payload, payload, len); free(msg->queue_msg_payload); - - msg->queue_msg_payload = new_payload; + msg->queue_msg_payload = p; msg->queue_msg_payload_len = len; - msg->ce_mask |= QUEUE_MSG_ATTR_PAYLOAD; + if (len > 0) + msg->ce_mask |= QUEUE_MSG_ATTR_PAYLOAD; + else + msg->ce_mask &= ~QUEUE_MSG_ATTR_PAYLOAD; return 0; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/netfilter/queue_obj.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/netfilter/queue_obj.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/netfilter/queue_obj.c Netfilter Queue - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/nl.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/nl.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/nl.c Core Netlink Interface - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/object.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/object.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/object.c Generic Cacheable Object - * - * 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> */ @@ -134,6 +127,11 @@ if (size) memcpy((char *)new + doff, (char *)obj + doff, size); + /* Note that the base implementation already initializes @new via memcpy(). + * That means, simple fields don't need to be handled via oo_clone(). + * However, this is only a shallow-copy, so oo_clone() MUST fix all + * pointer values accordingly. */ + if (ops->oo_clone) { if (ops->oo_clone(new, obj) < 0) { nl_object_free(new); @@ -313,38 +311,42 @@ */ int nl_object_identical(struct nl_object *a, struct nl_object *b) { - struct nl_object_ops *ops = obj_ops(a); - uint32_t req_attrs; + struct nl_object_ops *ops; + uint64_t req_attrs_a; + uint64_t req_attrs_b; + + if (a == b) + return 1; /* Both objects must be of same type */ + ops = obj_ops(a); if (ops != obj_ops(b)) return 0; + /* Can't judge unless we can compare */ + if (ops->oo_compare == NULL) + return 0; + if (ops->oo_id_attrs_get) { - int req_attrs_a = ops->oo_id_attrs_get(a); - int req_attrs_b = ops->oo_id_attrs_get(b); - if (req_attrs_a != req_attrs_b) - return 0; - req_attrs = req_attrs_a; + req_attrs_a = ops->oo_id_attrs_get(a); + req_attrs_b = ops->oo_id_attrs_get(b); } else if (ops->oo_id_attrs) { - req_attrs = ops->oo_id_attrs; + req_attrs_a = ops->oo_id_attrs; + req_attrs_b = req_attrs_a; } else { - req_attrs = 0xFFFFFFFF; + req_attrs_a = UINT64_MAX; + req_attrs_b = req_attrs_a; } - if (req_attrs == 0xFFFFFFFF) - req_attrs = a->ce_mask & b->ce_mask; + + req_attrs_a &= a->ce_mask; + req_attrs_b &= b->ce_mask; /* Both objects must provide all required attributes to uniquely * identify an object */ - if ((a->ce_mask & req_attrs) != req_attrs || - (b->ce_mask & req_attrs) != req_attrs) - return 0; - - /* Can't judge unless we can compare */ - if (ops->oo_compare == NULL) + if (req_attrs_a != req_attrs_b) return 0; - return !(ops->oo_compare(a, b, req_attrs, ID_COMPARISON)); + return !(ops->oo_compare(a, b, req_attrs_a, ID_COMPARISON)); } /** @@ -366,7 +368,7 @@ if (ops != obj_ops(b) || ops->oo_compare == NULL) return UINT64_MAX; - return ops->oo_compare(a, b, ~0, 0); + return ops->oo_compare(a, b, UINT64_MAX, 0); } /**
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/act.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/act.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/act.c Action - * - * 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) 2013 Cong Wang <xiyou.wangcong@gmail.com> */ @@ -17,6 +10,7 @@ */ #include <netlink-private/netlink.h> +#include <netlink-private/utils.h> #include <netlink-private/tc.h> #include <netlink/netlink.h> #include <netlink/utils.h> @@ -125,7 +119,7 @@ while (p_act) { err = rtnl_act_fill_one(msg, p_act, ++order); - if (err) + if (err < 0) return err; p_act = p_act->a_next; } @@ -519,8 +513,13 @@ p_act = act; while(p_act) { err = pp->pp_cb(OBJ_CAST(act), pp); - if (err) + if (err) { + if (err > 0) { + _nl_assert_not_reached(); + err = -NLE_FAILURE; + } break; + } p_act = p_act->a_next; } errout:
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/act/gact.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/act/gact.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/act/gact.c gact action - * - * 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) 2016 Sushma Sitaram <sushma.sitaram@intel.com> */ @@ -50,14 +44,6 @@ { } -static int gact_clone(void *_dst, void *_src) -{ - struct rtnl_gact *dst = _dst, *src = _src; - - memcpy(&dst->g_parm, &src->g_parm, sizeof(src->g_parm)); - return 0; -} - static void gact_dump_line(struct rtnl_tc *tc, void *data, struct nl_dump_params *p) { @@ -126,19 +112,7 @@ if (!(u = (struct rtnl_gact *) rtnl_tc_data(TC_CAST(act)))) return -NLE_NOMEM; - if (action > TC_ACT_SHOT || action < TC_ACT_UNSPEC) - return -NLE_INVAL; - - switch (action) { - case TC_ACT_UNSPEC: - case TC_ACT_SHOT: - u->g_parm.action = action; - break; - case TC_ACT_OK: - case TC_ACT_RECLASSIFY: - default: - return NLE_OPNOTSUPP; - } + u->g_parm.action = action; return 0; } @@ -161,7 +135,7 @@ .to_size = sizeof(struct rtnl_gact), .to_msg_parser = gact_msg_parser, .to_free_data = gact_free_data, - .to_clone = gact_clone, + .to_clone = NULL, .to_msg_fill = gact_msg_fill, .to_dump = { NL_DUMP_LINE = gact_dump_line,
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/act/mirred.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/act/mirred.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/act/mirred.c mirred action - * - * 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) 2013 Cong Wang <xiyou.wangcong@gmail.com> */ @@ -49,14 +43,6 @@ { } -static int mirred_clone(void *_dst, void *_src) -{ - struct rtnl_mirred *dst = _dst, *src = _src; - - memcpy(&dst->m_parm, &src->m_parm, sizeof(src->m_parm)); - return 0; -} - static void mirred_dump_line(struct rtnl_tc *tc, void *data, struct nl_dump_params *p) { @@ -187,19 +173,8 @@ if (!(u = (struct rtnl_mirred *) rtnl_tc_data(TC_CAST(act)))) return -NLE_NOMEM; - if (policy > TC_ACT_REPEAT || policy < TC_ACT_OK) - return -NLE_INVAL; + u->m_parm.action = policy; - switch (u->m_parm.eaction) { - case TCA_EGRESS_MIRROR: - case TCA_EGRESS_REDIR: - u->m_parm.action = policy; - break; - case TCA_INGRESS_REDIR: - case TCA_INGRESS_MIRROR: - default: - return NLE_OPNOTSUPP; - } return 0; } @@ -220,7 +195,7 @@ .to_size = sizeof(struct rtnl_mirred), .to_msg_parser = mirred_msg_parser, .to_free_data = mirred_free_data, - .to_clone = mirred_clone, + .to_clone = NULL, .to_msg_fill = mirred_msg_fill, .to_dump = { NL_DUMP_LINE = mirred_dump_line,
View file
_service:tar_scm:libnl-3.7.0.tar.gz/lib/route/act/nat.c
Added
@@ -0,0 +1,288 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ +/* + * Copyright (c) 2016 Magnus Öberg <magnus.oberg@westermo.se> + */ + +/** + * @ingroup act + * @defgroup act_nat NAT + * + * @{ + */ + +#include <netlink-private/netlink.h> +#include <netlink-private/tc.h> +#include <netlink/netlink.h> +#include <netlink/attr.h> +#include <netlink/utils.h> +#include <netlink-private/route/tc-api.h> +#include <netlink/route/act/nat.h> +#include <netlink/route/tc.h> + +static struct nla_policy nat_policyTCA_NAT_MAX + 1 = { + TCA_NAT_PARMS = { .minlen = sizeof(struct tc_nat) }, +}; + +/** + * nat operations + */ + +static int nat_msg_parser(struct rtnl_tc *tc, void *data) +{ + struct tc_nat *nat = data; + struct nlattr *tbTCA_NAT_MAX + 1; + int err; + + err = tca_parse(tb, TCA_NAT_MAX, tc, nat_policy); + if (err < 0) + return err; + + if (!tbTCA_NAT_PARMS) + return -NLE_MISSING_ATTR; + + nla_memcpy(nat, tbTCA_NAT_PARMS, sizeof(*nat)); + + return NLE_SUCCESS; +} + +static void nat_free_data(struct rtnl_tc *tc, void *data) +{ +} + +static int nat_msg_fill(struct rtnl_tc *tc, void *data, struct nl_msg *msg) +{ + struct tc_nat *nat = data; + + if (!nat) + return -NLE_OBJ_NOTFOUND; + + NLA_PUT(msg, TCA_NAT_PARMS, sizeof(*nat), nat); + + return NLE_SUCCESS; + +nla_put_failure: + return -NLE_NOMEM; +} + +static void nat_dump_line(struct rtnl_tc *tc, void *data, + struct nl_dump_params *p) +{ + struct tc_nat *nat = data; + char buf32; + uint32_t mask; + int pfx = 0; + + if (!nat) + return; + + if (nat->flags & TCA_NAT_FLAG_EGRESS) + nl_dump(p, " egress"); + else + nl_dump(p, " ingress"); + + mask = nat->mask; + while (mask > 0) { + mask = mask >> 1; + pfx++; + } + + inet_ntop(AF_INET, &nat->old_addr, buf, sizeof(buf)); + nl_dump(p, " %s", buf); + if (pfx < 32) + nl_dump(p, "/%d", pfx); + + inet_ntop(AF_INET, &nat->new_addr, buf, sizeof(buf)); + nl_dump(p, " %s", buf); + if (pfx < 32) + nl_dump(p, "/%d", pfx); +} + +/** + * @name Attribute Modifications + * @{ + */ + +/** + * Set old IPv4 address on a netlink NAT action object + * @arg act Action object + * @arg addr Binary IPv4 address in host byte order + * + * @return 0 on success or negative error code in case of an error. + */ +int rtnl_nat_set_old_addr(struct rtnl_act *act, in_addr_t addr) +{ + struct tc_nat *nat; + + if (!(nat = (struct tc_nat *)rtnl_tc_data(TC_CAST(act)))) + return -NLE_NOMEM; + + nat->old_addr = addr; + + return NLE_SUCCESS; +} + +int rtnl_nat_get_old_addr(struct rtnl_act *act, in_addr_t *addr) +{ + struct tc_nat *nat; + + if (!(nat = (struct tc_nat *)rtnl_tc_data_peek(TC_CAST(act)))) + return -NLE_NOATTR; + + *addr = nat->old_addr; + + return NLE_SUCCESS; +} + +/** + * Set new IPv4 address on a netlink NAT action object + * @arg act Action object + * @arg addr Binary IPv4 address in host byte order + * + * @return 0 on success or negative error code in case of an error. + */ +int rtnl_nat_set_new_addr(struct rtnl_act *act, in_addr_t addr) +{ + struct tc_nat *nat; + + if (!(nat = (struct tc_nat *)rtnl_tc_data(TC_CAST(act)))) + return -NLE_NOMEM; + + nat->new_addr = addr; + + return NLE_SUCCESS; +} + +int rtnl_nat_get_new_addr(struct rtnl_act *act, in_addr_t *addr) +{ + struct tc_nat *nat; + + if (!(nat = (struct tc_nat *)rtnl_tc_data_peek(TC_CAST(act)))) + return -NLE_NOATTR; + + *addr = nat->new_addr; + + return NLE_SUCCESS; +} + +/** + * Set IPv4 address mask on a netlink NAT action object + * @arg act Action object + * @arg mask IPv4 address mask + * + * @return 0 on success or negative error code in case of an error. + */ +int rtnl_nat_set_mask(struct rtnl_act *act, in_addr_t bitmask) +{ + struct tc_nat *nat; + + if (!(nat = (struct tc_nat *)rtnl_tc_data(TC_CAST(act)))) + return -NLE_NOMEM; + + nat->mask = bitmask; + + return NLE_SUCCESS; +} + +int rtnl_nat_get_mask(struct rtnl_act *act, in_addr_t *bitmask) +{ + struct tc_nat *nat; + + if (!(nat = (struct tc_nat *)rtnl_tc_data_peek(TC_CAST(act)))) + return -NLE_NOATTR; + + *bitmask = nat->mask; + + return NLE_SUCCESS; +} + +/** + * Set flags for a netlink NAT action object + * @arg act Action object + * @arg flags TCA_NAT_FLAG_* flags. + * + * Currently only TCA_NAT_FLAG_EGRESS is defined. Selects NAT on + * egress/IP src if set, ingress/IP dst otherwise. + * + * @return 0 on success or negative error code in case of an error. + */ +int rtnl_nat_set_flags(struct rtnl_act *act, uint32_t flags) +{ + struct tc_nat *nat; + + if (!(nat = (struct tc_nat *)rtnl_tc_data(TC_CAST(act)))) + return -NLE_NOMEM; + + nat->flags = flags; + + return NLE_SUCCESS; +} + +int rtnl_nat_get_flags(struct rtnl_act *act, uint32_t *flags) +{ + struct tc_nat *nat; + + if (!(nat = (struct tc_nat *)rtnl_tc_data_peek(TC_CAST(act)))) + return -NLE_NOATTR; + + *flags = nat->flags; + + return NLE_SUCCESS; +} + +int rtnl_nat_set_action(struct rtnl_act *act, int action) +{ + struct tc_nat *nat; + + if (!(nat = (struct tc_nat *)rtnl_tc_data(TC_CAST(act)))) + return -NLE_NOMEM; + + if (action < TC_ACT_UNSPEC) + return -NLE_INVAL; + + nat->action = action; + + return NLE_SUCCESS; +} + +int rtnl_nat_get_action(struct rtnl_act *act, int *action) +{ + struct tc_nat *nat; + + if (!(nat = (struct tc_nat *)rtnl_tc_data_peek(TC_CAST(act)))) + return -NLE_NOATTR; + + *action = nat->action; + + return NLE_SUCCESS; +} + +/** + * @} + */ + +static struct rtnl_tc_ops nat_ops = { + .to_kind = "nat", + .to_type = RTNL_TC_TYPE_ACT, + .to_size = sizeof(struct tc_nat), + .to_msg_parser = nat_msg_parser, + .to_free_data = nat_free_data, + .to_clone = NULL, + .to_msg_fill = nat_msg_fill, + .to_dump = { + NL_DUMP_LINE = nat_dump_line, + }, +}; + +static void __init nat_init(void) +{ + rtnl_tc_register(&nat_ops); +} + +static void __exit nat_exit(void) +{ + rtnl_tc_unregister(&nat_ops); +} + +/** + * @} + */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/act/skbedit.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/act/skbedit.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/act/skbedit.c skbedit action - * - * 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) 2015 Cong Wang <xiyou.wangcong@gmail.com> */ @@ -67,14 +61,6 @@ { } -static int skbedit_clone(void *_dst, void *_src) -{ - struct rtnl_skbedit *dst = _dst, *src = _src; - - memcpy(dst, src, sizeof(*src)); - return 0; -} - static void skbedit_dump_line(struct rtnl_tc *tc, void *data, struct nl_dump_params *p) { @@ -166,10 +152,8 @@ if (!(u = (struct rtnl_skbedit *) rtnl_tc_data(TC_CAST(act)))) return -NLE_NOMEM; - if (action > TC_ACT_REPEAT || action < TC_ACT_UNSPEC) - return -NLE_INVAL; - u->s_parm.action = action; + return 0; } @@ -268,7 +252,7 @@ .to_size = sizeof(struct rtnl_skbedit), .to_msg_parser = skbedit_msg_parser, .to_free_data = skbedit_free_data, - .to_clone = skbedit_clone, + .to_clone = NULL, .to_msg_fill = skbedit_msg_fill, .to_dump = { NL_DUMP_LINE = skbedit_dump_line,
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/act/vlan.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/act/vlan.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/act/vlan.c vlan action - * - * 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) 2018 Volodymyr Bendiuga <volodymyr.bendiuga@gmail.com> */ @@ -109,14 +103,6 @@ { } -static int vlan_clone(void *_dst, void *_src) -{ - struct rtnl_vlan *dst = _dst, *src = _src; - - memcpy(&dst->v_parm, &src->v_parm, sizeof(src->v_parm)); - return 0; -} - static void vlan_dump_line(struct rtnl_tc *tc, void *data, struct nl_dump_params *p) { @@ -405,7 +391,7 @@ .to_size = sizeof(struct rtnl_vlan), .to_msg_parser = vlan_msg_parser, .to_free_data = vlan_free_data, - .to_clone = vlan_clone, + .to_clone = NULL, .to_msg_fill = vlan_msg_fill, .to_dump = { NL_DUMP_LINE = vlan_dump_line,
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/addr.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/addr.c
Changed
@@ -1,15 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/addr.c Addresses - * - * 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> - * Copyright (c) 2003-2006 Baruch Even <baruch@ev-en.org>, - * Mediatrix Telecom, inc. <ericb@mediatrix.com> + * Copyright (c) 2003-2006 Baruch Even <baruch@ev-en.org> + * Copyright (c) 2003-2006 Mediatrix Telecom, inc. <ericb@mediatrix.com> */ /** @@ -160,6 +153,13 @@ struct rtnl_addr *dst = nl_object_priv(_dst); struct rtnl_addr *src = nl_object_priv(_src); + dst->a_peer = NULL; + dst->a_local = NULL; + dst->a_bcast = NULL; + dst->a_anycast = NULL; + dst->a_multicast = NULL; + dst->a_link = NULL; + if (src->a_link) { nl_object_get(OBJ_CAST(src->a_link)); dst->a_link = src->a_link; @@ -168,7 +168,7 @@ if (src->a_peer) if (!(dst->a_peer = nl_addr_clone(src->a_peer))) return -NLE_NOMEM; - + if (src->a_local) if (!(dst->a_local = nl_addr_clone(src->a_local))) return -NLE_NOMEM; @@ -1136,6 +1136,7 @@ __ADD(IFA_F_SECONDARY, secondary), __ADD(IFA_F_NODAD, nodad), __ADD(IFA_F_OPTIMISTIC, optimistic), + __ADD(IFA_F_DADFAILED, dadfailed), __ADD(IFA_F_HOMEADDRESS, homeaddress), __ADD(IFA_F_DEPRECATED, deprecated), __ADD(IFA_F_TENTATIVE, tentative),
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/class.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/class.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/class.c 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) 2003-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/classid.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/classid.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/classid.c ClassID Management - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -415,7 +408,7 @@ fclose(fd); - if ((err = classid_map_add(classid, name)) < 0) { + if (classid_map_add(classid, name) < 0) { /* * Error adding classid map, re-read classid file is best * option here. It is likely to fail as well but better
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/classifier.c 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) 2003-2013 Thomas Graf <tgraf@suug.ch> */ @@ -364,6 +357,78 @@ cache->c_iarg2 = parent; } +/** + * Search classifier by interface index, parent and handle + * @arg cache Classifier cache + * @arg ifindex Interface index + * @arg parent Parent + * @arg handle Handle + * + * Searches a classifier cache previously allocated with rtnl_cls_alloc_cache() + * and searches for a classifier matching the interface index, parent + * and handle. + * + * The reference counter is incremented before returning the classifier, + * therefore the reference must be given back with rtnl_cls_put() after usage. + * + * @return Classifier or NULL if no match was found. + */ +struct rtnl_cls *rtnl_cls_find_by_handle(struct nl_cache *cache, int ifindex, uint32_t parent, + uint32_t handle) +{ + struct rtnl_cls *cls; + + if (cache->c_ops != &rtnl_cls_ops) + return NULL; + + nl_list_for_each_entry(cls, &cache->c_items, ce_list) { + if ((cls->c_parent == parent) && + (cls->c_ifindex == ifindex)&& + (cls->c_handle == handle)) { + nl_object_get((struct nl_object *) cls); + return cls; + } + } + + return NULL; +} + +/** + * Search classifier by interface index, parent and priority + * @arg cache Classifier cache + * @arg ifindex Interface index + * @arg parent Parent + * @arg prio Priority + * + * Searches a classifier cache previously allocated with rtnl_cls_alloc_cache() + * and searches for a classifier matching the interface index, parent + * and prio. + * + * The reference counter is incremented before returning the classifier, + * therefore the reference must be given back with rtnl_cls_put() after usage. + * + * @return Classifier or NULL if no match was found. + */ +struct rtnl_cls *rtnl_cls_find_by_prio(struct nl_cache *cache, int ifindex, + uint32_t parent, uint16_t prio) +{ + struct rtnl_cls *cls; + + if (cache->c_ops != &rtnl_cls_ops) + return NULL; + + nl_list_for_each_entry(cls, &cache->c_items, ce_list) { + if ((cls->c_parent == parent) && + (cls->c_ifindex == ifindex) && + (cls->c_prio == prio)) { + nl_object_get((struct nl_object *) cls); + return cls; + } + } + + return NULL; +} + /** @} */ static void cls_dump_line(struct rtnl_tc *tc, struct nl_dump_params *p)
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/basic.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/basic.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/basic.c Basic 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -93,7 +87,7 @@ if (tbTCA_BASIC_ACT) { b->b_mask |= BASIC_ATTR_ACTION; err = rtnl_act_parse(&b->b_act, tbTCA_BASIC_ACT); - if (err) + if (err < 0) return err; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/cgroup.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/cgroup.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/cgroup.c Control Groups 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) 2009-2013 Thomas Graf <tgraf@suug.ch> */ @@ -36,17 +30,14 @@ static int cgroup_clone(void *_dst, void *_src) { - struct rtnl_cgroup *dst = NULL, *src = _src; + struct rtnl_cgroup *dst = _dst, *src = _src; - dst = calloc(1, sizeof(*dst)); - if (!dst) - return -NLE_NOMEM; + dst->cg_ematch = NULL; - dst->cg_mask = src->cg_mask; - dst->cg_ematch = rtnl_ematch_tree_clone(src->cg_ematch); - if (!dst) { - free(dst); - return -NLE_NOMEM; + if (src->cg_ematch) { + dst->cg_ematch = rtnl_ematch_tree_clone(src->cg_ematch); + if (!dst->cg_ematch) + return -NLE_NOMEM; } return 0;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/ematch.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/ematch.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/ematch.c Extended Matches - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -699,14 +693,14 @@ if (!(tree = rtnl_ematch_tree_alloc(RTNL_EMATCH_PROGID))) return -NLE_FAILURE; - if ((err = ematch_lex_init(&scanner)) < 0) { + if (ematch_lex_init(&scanner) < 0) { err = -NLE_FAILURE; goto errout; } buf = ematch__scan_string(expr, scanner); - if ((err = ematch_parse(scanner, errp, &tree->et_list)) != 0) { + if (ematch_parse(scanner, errp, &tree->et_list) != 0) { ematch__delete_buffer(buf, scanner); err = -NLE_PARSE_ERR; goto errout;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/ematch/cmp.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/ematch/cmp.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/ematch/cmp.c Simple packet data comparison ematch - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/ematch/container.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/ematch/container.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/ematch/container.c Container Ematch - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/ematch/meta.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/ematch/meta.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/ematch/meta.c Metadata Match - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -246,9 +240,9 @@ nl_dump(p, " >> %u", v->mv_shift); if (v->mv_len == 4) - nl_dump(p, " & %#x", *(uint32_t *) (v + 1)); + nl_dump(p, " & %#lx", (long unsigned) *(uint32_t *) (v + 1)); else if (v->mv_len == 8) - nl_dump(p, " & %#x", *(uint64_t *) (v + 1)); + nl_dump(p, " & %#llx", (long long unsigned) (*(uint64_t *) (v + 1))); } break;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/ematch/nbyte.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/ematch/nbyte.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/ematch/nbyte.c Nbyte comparison - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/ematch/text.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/ematch/text.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/ematch/text.c Text Search - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -17,6 +11,7 @@ */ #include <netlink-private/netlink.h> +#include <netlink-private/utils.h> #include <netlink-private/tc.h> #include <netlink/netlink.h> #include <netlink/route/cls/ematch.h> @@ -91,8 +86,7 @@ { struct text_data *t = rtnl_ematch_data(e); - strncpy(t->cfg.algo, algo, sizeof(t->cfg.algo)); - t->cfg.algosizeof(t->cfg.algo) - 1 = '\0'; + _nl_strncpy_trunc(t->cfg.algo, algo, sizeof(t->cfg.algo)); } char *rtnl_ematch_text_get_algo(struct rtnl_ematch *e)
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/ematch_grammar.l -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/ematch_grammar.l
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/ematch_grammar.l ematch expression grammar - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/ematch_syntax.y -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/ematch_syntax.y
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/ematch_syntax.y ematch expression syntax - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -52,6 +46,7 @@ %{ extern int ematch_lex(YYSTYPE *, void *); +#define ematch_error yyerror static void yyerror(void *scanner, char **errp, struct nl_list_head *root, const char *msg) { if (msg)
View file
_service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/flower.c
Added
@@ -0,0 +1,896 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ +/* + * Copyright (c) 2018 Volodymyr Bendiuga <volodymyr.bendiuga@gmail.com> + */ + +#include <netlink-private/netlink.h> +#include <netlink-private/tc.h> +#include <netlink/netlink.h> +#include <netlink/attr.h> +#include <netlink/utils.h> +#include <netlink-private/route/tc-api.h> +#include <netlink/route/classifier.h> +#include <netlink/route/action.h> +#include <netlink/route/cls/flower.h> + + +/** @cond SKIP */ +#define FLOWER_ATTR_FLAGS (1 << 0) +#define FLOWER_ATTR_ACTION (1 << 1) +#define FLOWER_ATTR_VLAN_ID (1 << 2) +#define FLOWER_ATTR_VLAN_PRIO (1 << 3) +#define FLOWER_ATTR_VLAN_ETH_TYPE (1 << 4) +#define FLOWER_ATTR_DST_MAC (1 << 5) +#define FLOWER_ATTR_DST_MAC_MASK (1 << 6) +#define FLOWER_ATTR_SRC_MAC (1 << 7) +#define FLOWER_ATTR_SRC_MAC_MASK (1 << 8) +#define FLOWER_ATTR_IP_DSCP (1 << 9) +#define FLOWER_ATTR_IP_DSCP_MASK (1 << 10) +#define FLOWER_ATTR_PROTO (1 << 11) +#define FLOWER_ATTR_IPV4_SRC (1 << 12) +#define FLOWER_ATTR_IPV4_SRC_MASK (1 << 13) +#define FLOWER_ATTR_IPV4_DST (1 << 14) +#define FLOWER_ATTR_IPV4_DST_MASK (1 << 15) +/** @endcond */ + +#define FLOWER_DSCP_MAX 0xe0 +#define FLOWER_DSCP_MASK_MAX 0xe0 +#define FLOWER_VID_MAX 4095 +#define FLOWER_VLAN_PRIO_MAX 7 + +static struct nla_policy flower_policyTCA_FLOWER_MAX + 1 = { + TCA_FLOWER_FLAGS = { .type = NLA_U32 }, + TCA_FLOWER_KEY_ETH_TYPE = { .type = NLA_U16 }, + TCA_FLOWER_KEY_ETH_DST = { .maxlen = ETH_ALEN }, + TCA_FLOWER_KEY_ETH_DST_MASK = { .maxlen = ETH_ALEN }, + TCA_FLOWER_KEY_ETH_SRC = { .maxlen = ETH_ALEN }, + TCA_FLOWER_KEY_ETH_SRC_MASK = { .maxlen = ETH_ALEN }, + TCA_FLOWER_KEY_VLAN_ID = { .type = NLA_U16 }, + TCA_FLOWER_KEY_VLAN_PRIO = { .type = NLA_U8 }, + TCA_FLOWER_KEY_IP_TOS = { .type = NLA_U8 }, + TCA_FLOWER_KEY_IP_TOS_MASK = { .type = NLA_U8 }, + TCA_FLOWER_KEY_VLAN_ETH_TYPE = { .type = NLA_U16 }, + TCA_FLOWER_KEY_IPV4_SRC = { .type = NLA_U32 }, + TCA_FLOWER_KEY_IPV4_SRC_MASK = { .type = NLA_U32 }, + TCA_FLOWER_KEY_IPV4_DST = { .type = NLA_U32 }, + TCA_FLOWER_KEY_IPV4_DST_MASK = { .type = NLA_U32 }, +}; + +static int flower_msg_parser(struct rtnl_tc *tc, void *data) +{ + struct rtnl_flower *f = data; + struct nlattr *tbTCA_FLOWER_MAX + 1; + int err; + + err = tca_parse(tb, TCA_FLOWER_MAX, tc, flower_policy); + if (err < 0) + return err; + + if (tbTCA_FLOWER_FLAGS) { + f->cf_flags = nla_get_u32(tbTCA_FLOWER_FLAGS); + f->cf_mask |= FLOWER_ATTR_FLAGS; + } + + if (tbTCA_FLOWER_ACT) { + err = rtnl_act_parse(&f->cf_act, tbTCA_FLOWER_ACT); + if (err) + return err; + + f->cf_mask |= FLOWER_ATTR_ACTION; + } + + if (tbTCA_FLOWER_KEY_ETH_TYPE) { + f->cf_proto = nla_get_u16(tbTCA_FLOWER_KEY_ETH_TYPE); + f->cf_mask |= FLOWER_ATTR_PROTO; + } + + if (tbTCA_FLOWER_KEY_VLAN_ID) { + f->cf_vlan_id = nla_get_u16(tbTCA_FLOWER_KEY_VLAN_ID); + f->cf_mask |= FLOWER_ATTR_VLAN_ID; + } + + if (tbTCA_FLOWER_KEY_VLAN_PRIO) { + f->cf_vlan_prio = nla_get_u8(tbTCA_FLOWER_KEY_VLAN_PRIO); + f->cf_mask |= FLOWER_ATTR_VLAN_PRIO; + } + + if (tbTCA_FLOWER_KEY_VLAN_ETH_TYPE) { + f->cf_vlan_ethtype = nla_get_u16(tbTCA_FLOWER_KEY_VLAN_ETH_TYPE); + f->cf_mask |= FLOWER_ATTR_VLAN_ETH_TYPE; + } + + if (tbTCA_FLOWER_KEY_ETH_DST) { + nla_memcpy(f->cf_dst_mac, tbTCA_FLOWER_KEY_ETH_DST, ETH_ALEN); + f->cf_mask |= FLOWER_ATTR_DST_MAC; + } + + if (tbTCA_FLOWER_KEY_ETH_DST_MASK) { + nla_memcpy(f->cf_dst_mac_mask, tbTCA_FLOWER_KEY_ETH_DST_MASK, ETH_ALEN); + f->cf_mask |= FLOWER_ATTR_DST_MAC_MASK; + } + + if (tbTCA_FLOWER_KEY_ETH_SRC) { + nla_memcpy(f->cf_src_mac, tbTCA_FLOWER_KEY_ETH_SRC, ETH_ALEN); + f->cf_mask |= FLOWER_ATTR_SRC_MAC; + } + + if (tbTCA_FLOWER_KEY_ETH_SRC_MASK) { + nla_memcpy(f->cf_src_mac_mask, tbTCA_FLOWER_KEY_ETH_SRC_MASK, ETH_ALEN); + f->cf_mask |= FLOWER_ATTR_SRC_MAC_MASK; + } + + if (tbTCA_FLOWER_KEY_IP_TOS) { + f->cf_ip_dscp = nla_get_u8(tbTCA_FLOWER_KEY_IP_TOS); + f->cf_mask |= FLOWER_ATTR_IP_DSCP; + } + + if (tbTCA_FLOWER_KEY_IP_TOS_MASK) { + f->cf_ip_dscp_mask = nla_get_u8(tbTCA_FLOWER_KEY_IP_TOS_MASK); + f->cf_mask |= FLOWER_ATTR_IP_DSCP_MASK; + } + + if (tbTCA_FLOWER_KEY_IPV4_SRC) { + f->cf_ipv4_src = nla_get_u32(tbTCA_FLOWER_KEY_IPV4_SRC); + f->cf_mask |= FLOWER_ATTR_IPV4_SRC; + } + + if (tbTCA_FLOWER_KEY_IPV4_SRC_MASK) { + f->cf_ipv4_src_mask = + nla_get_u32(tbTCA_FLOWER_KEY_IPV4_SRC_MASK); + f->cf_mask |= FLOWER_ATTR_IPV4_SRC_MASK; + } + + if (tbTCA_FLOWER_KEY_IPV4_DST) { + f->cf_ipv4_dst = nla_get_u32(tbTCA_FLOWER_KEY_IPV4_DST); + f->cf_mask |= FLOWER_ATTR_IPV4_DST; + } + + if (tbTCA_FLOWER_KEY_IPV4_DST_MASK) { + f->cf_ipv4_dst_mask = + nla_get_u32(tbTCA_FLOWER_KEY_IPV4_DST_MASK); + f->cf_mask |= FLOWER_ATTR_IPV4_DST_MASK; + } + + return 0; +} + +static int flower_msg_fill(struct rtnl_tc *tc, void *data, struct nl_msg *msg) +{ + struct rtnl_flower *f = data; + int err; + + if (!f) + return 0; + + if (f->cf_mask & FLOWER_ATTR_FLAGS) + NLA_PUT_U32(msg, TCA_FLOWER_FLAGS, f->cf_flags); + + if (f->cf_mask & FLOWER_ATTR_ACTION) { + err = rtnl_act_fill(msg, TCA_FLOWER_ACT, f->cf_act); + if (err) + return err; + } + + if (f->cf_mask & FLOWER_ATTR_PROTO) + NLA_PUT_U16(msg, TCA_FLOWER_KEY_ETH_TYPE, f->cf_proto); + + if (f->cf_mask & FLOWER_ATTR_VLAN_ID) + NLA_PUT_U16(msg, TCA_FLOWER_KEY_VLAN_ID, f->cf_vlan_id); + + if (f->cf_mask & FLOWER_ATTR_VLAN_PRIO) + NLA_PUT_U8(msg, TCA_FLOWER_KEY_VLAN_PRIO, f->cf_vlan_prio); + + if (f->cf_mask & FLOWER_ATTR_VLAN_ETH_TYPE) + NLA_PUT_U16(msg, TCA_FLOWER_KEY_VLAN_ETH_TYPE, f->cf_vlan_ethtype); + + if (f->cf_mask & FLOWER_ATTR_DST_MAC) + NLA_PUT(msg, TCA_FLOWER_KEY_ETH_DST, ETH_ALEN, f->cf_dst_mac); + + if (f->cf_mask & FLOWER_ATTR_DST_MAC_MASK) + NLA_PUT(msg, TCA_FLOWER_KEY_ETH_DST_MASK, ETH_ALEN, f->cf_dst_mac_mask); + + if (f->cf_mask & FLOWER_ATTR_SRC_MAC) + NLA_PUT(msg, TCA_FLOWER_KEY_ETH_SRC, ETH_ALEN, f->cf_src_mac); + + if (f->cf_mask & FLOWER_ATTR_SRC_MAC_MASK) + NLA_PUT(msg, TCA_FLOWER_KEY_ETH_SRC_MASK, ETH_ALEN, f->cf_src_mac_mask); + + if (f->cf_mask & FLOWER_ATTR_IP_DSCP) + NLA_PUT_U8(msg, TCA_FLOWER_KEY_IP_TOS, f->cf_ip_dscp); + + if (f->cf_mask & FLOWER_ATTR_IP_DSCP_MASK) + NLA_PUT_U8(msg, TCA_FLOWER_KEY_IP_TOS_MASK, f->cf_ip_dscp_mask); + + if (f->cf_mask & FLOWER_ATTR_IPV4_SRC) + NLA_PUT_U32(msg, TCA_FLOWER_KEY_IPV4_SRC, f->cf_ipv4_src); + + if (f->cf_mask & FLOWER_ATTR_IPV4_SRC_MASK) + NLA_PUT_U32(msg, TCA_FLOWER_KEY_IPV4_SRC_MASK, + f->cf_ipv4_src_mask); + + if (f->cf_mask & FLOWER_ATTR_IPV4_DST) + NLA_PUT_U32(msg, TCA_FLOWER_KEY_IPV4_DST, f->cf_ipv4_dst); + + if (f->cf_mask & FLOWER_ATTR_IPV4_DST_MASK) + NLA_PUT_U32(msg, TCA_FLOWER_KEY_IPV4_DST_MASK, + f->cf_ipv4_dst_mask); + + return 0; + +nla_put_failure: + return -NLE_NOMEM; +} + +static void flower_free_data(struct rtnl_tc *tc, void *data) +{ + struct rtnl_flower *f = data; + + if (f->cf_act) + rtnl_act_put_all(&f->cf_act); +} + +static int flower_clone(void *_dst, void *_src) +{ + struct rtnl_flower *dst = _dst, *src = _src; + + if (src->cf_act) { + if (!(dst->cf_act = rtnl_act_alloc())) + return -NLE_NOMEM; + + memcpy(dst->cf_act, src->cf_act, sizeof(struct rtnl_act)); + + /* action nl list next and prev pointers must be updated */ + nl_init_list_head(&dst->cf_act->ce_list); + + if ( src->cf_act->c_opts + && !(dst->cf_act->c_opts = nl_data_clone(src->cf_act->c_opts))) + return -NLE_NOMEM; + + if ( src->cf_act->c_xstats + && !(dst->cf_act->c_xstats = nl_data_clone(src->cf_act->c_xstats))) + return -NLE_NOMEM; + + if ( src->cf_act->c_subdata + && !(dst->cf_act->c_subdata = nl_data_clone(src->cf_act->c_subdata))) + return -NLE_NOMEM; + + if (dst->cf_act->c_link) { + nl_object_get(OBJ_CAST(dst->cf_act->c_link)); + } + + dst->cf_act->a_next = NULL; /* Only clone first in chain */ + } + + return 0; +} + +static void flower_dump_details(struct rtnl_tc *tc, void *data, + struct nl_dump_params *p) +{ + struct rtnl_flower *f = data; + char addr_strINET_ADDRSTRLEN; + char mask_strINET_ADDRSTRLEN; + + if (!f) + return; + + if (f->cf_mask & FLOWER_ATTR_FLAGS) + nl_dump(p, " flags %u", f->cf_flags); + + if (f->cf_mask & FLOWER_ATTR_PROTO) + nl_dump(p, " protocol %u", f->cf_proto); + + if (f->cf_mask & FLOWER_ATTR_VLAN_ID) + nl_dump(p, " vlan_id %u", f->cf_vlan_id); + + if (f->cf_mask & FLOWER_ATTR_VLAN_PRIO) + nl_dump(p, " vlan_prio %u", f->cf_vlan_prio); + + if (f->cf_mask & FLOWER_ATTR_VLAN_ETH_TYPE) + nl_dump(p, " vlan_ethtype %u", f->cf_vlan_ethtype); + + if (f->cf_mask & FLOWER_ATTR_DST_MAC) + nl_dump(p, " dst_mac %02x:%02x:%02x:%02x:%02x:%02x", + f->cf_dst_mac0, f->cf_dst_mac1, + f->cf_dst_mac2, f->cf_dst_mac3, + f->cf_dst_mac4, f->cf_dst_mac5); + + if (f->cf_mask & FLOWER_ATTR_DST_MAC_MASK) + nl_dump(p, " dst_mac_mask %02x:%02x:%02x:%02x:%02x:%02x", + f->cf_dst_mac_mask0, f->cf_dst_mac_mask1, + f->cf_dst_mac_mask2, f->cf_dst_mac_mask3, + f->cf_dst_mac_mask4, f->cf_dst_mac_mask5); + + if (f->cf_mask & FLOWER_ATTR_SRC_MAC) + nl_dump(p, " src_mac %02x:%02x:%02x:%02x:%02x:%02x", + f->cf_src_mac0, f->cf_src_mac1, + f->cf_src_mac2, f->cf_src_mac3, + f->cf_src_mac4, f->cf_src_mac5); + + if (f->cf_mask & FLOWER_ATTR_SRC_MAC_MASK) + nl_dump(p, " src_mac_mask %02x:%02x:%02x:%02x:%02x:%02x", + f->cf_src_mac_mask0, f->cf_src_mac_mask1, + f->cf_src_mac_mask2, f->cf_src_mac_mask3, + f->cf_src_mac_mask4, f->cf_src_mac_mask5); + + if (f->cf_mask & FLOWER_ATTR_IP_DSCP) + nl_dump(p, " dscp %u", f->cf_ip_dscp); + + if (f->cf_mask & FLOWER_ATTR_IP_DSCP_MASK) + nl_dump(p, " dscp_mask %u", f->cf_ip_dscp_mask); + + if (f->cf_mask & FLOWER_ATTR_IPV4_SRC) { + inet_ntop(AF_INET, &f->cf_ipv4_src, addr_str, sizeof(addr_str)); + inet_ntop(AF_INET, &f->cf_ipv4_src_mask, mask_str, sizeof(mask_str)); + nl_dump(p, "IPv4 src %s mask %s\n", addr_str, mask_str); + } + + if (f->cf_mask & FLOWER_ATTR_IPV4_DST) { + inet_ntop(AF_INET, &f->cf_ipv4_dst, addr_str, sizeof(addr_str)); + inet_ntop(AF_INET, &f->cf_ipv4_dst_mask, mask_str, sizeof(mask_str)); + nl_dump(p, "IPv4 dst %s mask %s\n", addr_str, mask_str); + } +} + +/** + * @name Attribute Modification + * @{ + */ + +/** + * Set protocol for flower classifier + * @arg cls Flower classifier. + * @arg proto protocol (ETH_P_*) + * @return 0 on success or a negative error code. + */ +int rtnl_flower_set_proto(struct rtnl_cls *cls, uint16_t proto) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data(TC_CAST(cls)))) + return -NLE_NOMEM; + + f->cf_proto = htons(proto); + f->cf_mask |= FLOWER_ATTR_PROTO; + + return 0; +} + +/** + * Get protocol for flower classifier + * @arg cls Flower classifier. + * @arg proto protocol + * @return 0 on success or a negative error code. +*/ +int rtnl_flower_get_proto(struct rtnl_cls *cls, uint16_t *proto) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data_peek(TC_CAST(cls)))) + return -NLE_INVAL; + + if (!(f->cf_mask & FLOWER_ATTR_PROTO)) + return -NLE_MISSING_ATTR; + + *proto = ntohs(f->cf_proto); + + return 0; +} + +/** + * Set vlan id for flower classifier + * @arg cls Flower classifier. + * @arg vid vlan id + * @return 0 on success or a negative error code. + */ +int rtnl_flower_set_vlan_id(struct rtnl_cls *cls, uint16_t vid) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data(TC_CAST(cls)))) + return -NLE_NOMEM; + + if (vid > FLOWER_VID_MAX) + return -NLE_RANGE; + + f->cf_vlan_id = vid; + f->cf_mask |= FLOWER_ATTR_VLAN_ID; + + return 0; +} + +/** + * Get vlan id for flower classifier + * @arg cls Flower classifier. + * @arg vid vlan id + * @return 0 on success or a negative error code. +*/ +int rtnl_flower_get_vlan_id(struct rtnl_cls *cls, uint16_t *vid) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data_peek(TC_CAST(cls)))) + return -NLE_INVAL; + + if (!(f->cf_mask & FLOWER_ATTR_VLAN_ID)) + return -NLE_MISSING_ATTR; + + *vid = f->cf_vlan_id; + + return 0; +} + +/** + * Set vlan priority for flower classifier + * @arg cls Flower classifier. + * @arg prio vlan priority + * @return 0 on success or a negative error code. + */ +int rtnl_flower_set_vlan_prio(struct rtnl_cls *cls, uint8_t prio) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data(TC_CAST(cls)))) + return -NLE_NOMEM; + + if (prio > FLOWER_VLAN_PRIO_MAX) + return -NLE_RANGE; + + f->cf_vlan_prio = prio; + f->cf_mask |= FLOWER_ATTR_VLAN_PRIO; + + return 0; +} + +/** + * Get vlan prio for flower classifier + * @arg cls Flower classifier. + * @arg prio vlan priority + * @return 0 on success or a negative error code. +*/ +int rtnl_flower_get_vlan_prio(struct rtnl_cls *cls, uint8_t *prio) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data_peek(TC_CAST(cls)))) + return -NLE_INVAL; + + if (!(f->cf_mask & FLOWER_ATTR_VLAN_PRIO)) + return -NLE_MISSING_ATTR; + + *prio = f->cf_vlan_prio; + + return 0; +} + +/** + * Set vlan ethertype for flower classifier + * @arg cls Flower classifier. + * @arg ethtype vlan ethertype + * @return 0 on success or a negative error code. + */ +int rtnl_flower_set_vlan_ethtype(struct rtnl_cls *cls, uint16_t ethtype) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data(TC_CAST(cls)))) + return -NLE_NOMEM; + + if (!(f->cf_mask & FLOWER_ATTR_PROTO)) + return -NLE_MISSING_ATTR; + + if (f->cf_proto != htons(ETH_P_8021Q)) + return -NLE_INVAL; + + f->cf_vlan_ethtype = htons(ethtype); + f->cf_mask |= FLOWER_ATTR_VLAN_ETH_TYPE; + + return 0; +} + +/** + * Set destination mac address for flower classifier + * @arg cls Flower classifier. + * @arg mac destination mac address + * @arg mask mask for mac address + * @return 0 on success or a negative error code. + */ +int rtnl_flower_set_dst_mac(struct rtnl_cls *cls, unsigned char *mac, + unsigned char *mask) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data(TC_CAST(cls)))) + return -NLE_NOMEM; + + if (mac) { + memcpy(f->cf_dst_mac, mac, ETH_ALEN); + f->cf_mask |= FLOWER_ATTR_DST_MAC; + + if (mask) { + memcpy(f->cf_dst_mac_mask, mask, ETH_ALEN); + f->cf_mask |= FLOWER_ATTR_DST_MAC_MASK; + } + + return 0; + } + + return -NLE_FAILURE; +} + +/** + * Get destination mac address for flower classifier + * @arg cls Flower classifier. + * @arg mac destination mac address + * @arg mask mask for mac address + * @return 0 on success or a negative error code. +*/ +int rtnl_flower_get_dst_mac(struct rtnl_cls *cls, unsigned char *mac, + unsigned char *mask) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data_peek(TC_CAST(cls)))) + return -NLE_INVAL; + + if (!(f->cf_mask & FLOWER_ATTR_DST_MAC)) + return -NLE_MISSING_ATTR; + + if (mac) + memcpy(mac, f->cf_dst_mac, ETH_ALEN); + + if (mask) + memcpy(mask, f->cf_dst_mac_mask, ETH_ALEN); + + return 0; +} + +/** + * Set source mac address for flower classifier + * @arg cls Flower classifier. + * @arg mac source mac address + * @arg mask mask for mac address + * @return 0 on success or a negative error code. + */ +int rtnl_flower_set_src_mac(struct rtnl_cls *cls, unsigned char *mac, + unsigned char *mask) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data(TC_CAST(cls)))) + return -NLE_NOMEM; + + if (mac) { + memcpy(f->cf_src_mac, mac, ETH_ALEN); + f->cf_mask |= FLOWER_ATTR_SRC_MAC; + + if (mask) { + memcpy(f->cf_src_mac_mask, mask, ETH_ALEN); + f->cf_mask |= FLOWER_ATTR_SRC_MAC_MASK; + } + + return 0; + } + + return -NLE_FAILURE; +} + +/** + * Get source mac address for flower classifier + * @arg cls Flower classifier. + * @arg mac source mac address + * @arg mask mask for mac address + * @return 0 on success or a negative error code. +*/ +int rtnl_flower_get_src_mac(struct rtnl_cls *cls, unsigned char *mac, + unsigned char *mask) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data_peek(TC_CAST(cls)))) + return -NLE_INVAL; + + if (!(f->cf_mask & FLOWER_ATTR_SRC_MAC)) + return -NLE_MISSING_ATTR; + + if (mac) + memcpy(mac, f->cf_src_mac, ETH_ALEN); + + if (mask) + memcpy(mask, f->cf_src_mac_mask, ETH_ALEN); + + return 0; +} + +/** + * Set dscp value for flower classifier + * @arg cls Flower classifier. + * @arg dscp dscp value + * @arg mask mask for dscp value + * @return 0 on success or a negative error code. + */ +int rtnl_flower_set_ip_dscp(struct rtnl_cls *cls, uint8_t dscp, uint8_t mask) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data(TC_CAST(cls)))) + return -NLE_NOMEM; + + if (dscp > FLOWER_DSCP_MAX) + return -NLE_RANGE; + + if (mask > FLOWER_DSCP_MASK_MAX) + return -NLE_RANGE; + + f->cf_ip_dscp = dscp; + f->cf_mask |= FLOWER_ATTR_IP_DSCP; + + if (mask) { + f->cf_ip_dscp_mask = mask; + f->cf_mask |= FLOWER_ATTR_IP_DSCP_MASK; + } + + return 0; +} + +/** + * Get dscp value for flower classifier + * @arg cls Flower classifier. + * @arg dscp dscp value + * @arg mask mask for dscp value + * @return 0 on success or a negative error code. +*/ +int rtnl_flower_get_ip_dscp(struct rtnl_cls *cls, uint8_t *dscp, uint8_t *mask) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data_peek(TC_CAST(cls)))) + return -NLE_INVAL; + + if (!(f->cf_mask & FLOWER_ATTR_IP_DSCP)) + return -NLE_MISSING_ATTR; + + *dscp = f->cf_ip_dscp; + *mask = f->cf_ip_dscp_mask; + + return 0; +} + +/** + * Set IPv4 source address for flower classifier + * @arg cls Flower classifier. + * @arg addr IPv4 source address + * @arg mask mask for IPv4 source address + * @return 0 on success or a negative error code. + */ +int rtnl_flower_set_ipv4_src(struct rtnl_cls *cls, in_addr_t addr, + in_addr_t mask) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data(TC_CAST(cls)))) + return -NLE_NOMEM; + + if (addr) { + f->cf_ipv4_src = addr; + f->cf_mask |= FLOWER_ATTR_IPV4_SRC; + + if (mask) { + f->cf_ipv4_src_mask = mask; + f->cf_mask |= FLOWER_ATTR_IPV4_SRC_MASK; + } + + return 0; + } + + return -NLE_FAILURE; +} + +/** + * Get IPv4 source address for flower classifier + * @arg cls Flower classifier. + * @arg addr IPv4 source address + * @arg mask mask for IPv4 source address + * @return 0 on success or a negative error code. + */ +int rtnl_flower_get_ipv4_src(struct rtnl_cls *cls, in_addr_t *out_addr, + in_addr_t *out_mask) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data_peek(TC_CAST(cls)))) + return -NLE_INVAL; + + if (!(f->cf_mask & FLOWER_ATTR_IPV4_SRC)) + return -NLE_MISSING_ATTR; + + if (out_addr) + *out_addr = f->cf_ipv4_src; + + if (out_mask) { + if (f->cf_mask & FLOWER_ATTR_IPV4_SRC_MASK) + *out_mask = f->cf_ipv4_src_mask; + else + *out_mask = 0xffffffff; + } + + return 0; +} + +/** + * Set IPv4 destination address for flower classifier + * @arg cls Flower classifier. + * @arg addr IPv4 destination address + * @arg mask mask for IPv4 destination address + * @return 0 on success or a negative error code. + */ +int rtnl_flower_set_ipv4_dst(struct rtnl_cls *cls, in_addr_t addr, + in_addr_t mask) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data(TC_CAST(cls)))) + return -NLE_NOMEM; + + if (addr) { + f->cf_ipv4_dst = addr; + f->cf_mask |= FLOWER_ATTR_IPV4_DST; + + if (mask) { + f->cf_ipv4_dst_mask = mask; + f->cf_mask |= FLOWER_ATTR_IPV4_DST_MASK; + } + + return 0; + } + + return -NLE_FAILURE; +} + +/** + * Get IPv4 destination address for flower classifier + * @arg cls Flower classifier. + * @arg addr IPv4 destination address + * @arg mask mask for IPv4 destination address + * @return 0 on success or a negative error code. + */ +int rtnl_flower_get_ipv4_dst(struct rtnl_cls *cls, in_addr_t *out_addr, + in_addr_t *out_mask) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data_peek(TC_CAST(cls)))) + return -NLE_INVAL; + + if (!(f->cf_mask & FLOWER_ATTR_IPV4_DST)) + return -NLE_MISSING_ATTR; + + if (out_addr) + *out_addr = f->cf_ipv4_dst; + + if (out_mask) { + if (f->cf_mask & FLOWER_ATTR_IPV4_DST_MASK) + *out_mask = f->cf_ipv4_dst_mask; + else + *out_mask = 0xffffffff; + } + + return 0; +} + +/** + * Append action for flower classifier + * @arg cls Flower classifier. + * @arg act action to append + * @return 0 on success or a negative error code. + */ +int rtnl_flower_append_action(struct rtnl_cls *cls, struct rtnl_act *act) +{ + struct rtnl_flower *f; + + if (!act) + return 0; + + if (!(f = rtnl_tc_data(TC_CAST(cls)))) + return -NLE_NOMEM; + + f->cf_mask |= FLOWER_ATTR_ACTION; + + rtnl_act_get(act); + return rtnl_act_append(&f->cf_act, act); +} + +/** + * Delete action from flower classifier + * @arg cls Flower classifier. + * @arg act action to delete + * @return 0 on success or a negative error code. + */ +int rtnl_flower_del_action(struct rtnl_cls *cls, struct rtnl_act *act) +{ + struct rtnl_flower *f; + int ret; + + if (!act) + return 0; + + if (!(f = rtnl_tc_data(TC_CAST(cls)))) + return -NLE_NOMEM; + + if (!(f->cf_mask & FLOWER_ATTR_ACTION)) + return -NLE_INVAL; + + ret = rtnl_act_remove(&f->cf_act, act); + if (ret) + return ret; + + if (!f->cf_act) + f->cf_mask &= ~FLOWER_ATTR_ACTION; + rtnl_act_put(act); + + return 0; +} + +/** + * Get action from flower classifier + * @arg cls Flower classifier. + * @return action on success or NULL on error. + */ +struct rtnl_act* rtnl_flower_get_action(struct rtnl_cls *cls) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data_peek(TC_CAST(cls)))) + return NULL; + + if (!(f->cf_mask & FLOWER_ATTR_ACTION)) + return NULL; + + rtnl_act_get(f->cf_act); + + return f->cf_act; +} + +/** + * Set flags for flower classifier + * @arg cls Flower classifier. + * @arg flags (TCA_CLS_FLAGS_SKIP_HW | TCA_CLS_FLAGS_SKIP_SW) + * @return 0 on success or a negative error code. + */ +int rtnl_flower_set_flags(struct rtnl_cls *cls, int flags) +{ + struct rtnl_flower *f; + + if (!(f = rtnl_tc_data(TC_CAST(cls)))) + return -NLE_NOMEM; + + f->cf_flags = flags; + f->cf_mask |= FLOWER_ATTR_FLAGS; + + return 0; +} + +/** @} */ + +static struct rtnl_tc_ops flower_ops = { + .to_kind = "flower", + .to_type = RTNL_TC_TYPE_CLS, + .to_size = sizeof(struct rtnl_flower), + .to_msg_parser = flower_msg_parser, + .to_free_data = flower_free_data, + .to_clone = flower_clone, + .to_msg_fill = flower_msg_fill, + .to_dump = { + NL_DUMP_DETAILS = flower_dump_details, + }, +}; + +static void __init flower_init(void) +{ + rtnl_tc_register(&flower_ops); +} + +static void __exit flower_exit(void) +{ + rtnl_tc_unregister(&flower_ops); +}
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/fw.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/fw.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/fw.c fw 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) 2003-2013 Thomas Graf <tgraf@suug.ch> * Copyright (c) 2006 Petr Gotthard <petr.gotthard@siemens.com> * Copyright (c) 2006 Siemens AG Oesterreich @@ -94,9 +88,12 @@ { struct rtnl_fw *dst = _dst, *src = _src; + dst->cf_act = NULL; + dst->cf_police = NULL; + if (src->cf_act && !(dst->cf_act = nl_data_clone(src->cf_act))) return -NLE_NOMEM; - + if (src->cf_police && !(dst->cf_police = nl_data_clone(src->cf_police))) return -NLE_NOMEM;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/mall.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/mall.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/mall.c match-all 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) 2017 Volodymyr Bendiuga <volodymyr.bendiuga@gmail.com> */ @@ -108,7 +102,7 @@ mall->m_mask |= MALL_ATTR_ACTION; err = rtnl_act_append(&mall->m_act, act); - if (err) + if (err < 0) return err; rtnl_act_get(act); @@ -188,7 +182,7 @@ if (tbTCA_MATCHALL_ACT) { mall->m_mask |= MALL_ATTR_ACTION; err = rtnl_act_parse(&mall->m_act, tbTCA_MATCHALL_ACT); - if (err) + if (err < 0) return err; } @@ -212,13 +206,13 @@ int err; err = rtnl_act_fill(msg, TCA_MATCHALL_ACT, mall->m_act); - if (err) + if (err < 0) return err; } return 0; - nla_put_failure: +nla_put_failure: return -NLE_NOMEM; } @@ -228,6 +222,8 @@ struct rtnl_act *next, *new; int err; + dst->m_act = NULL; + if (src->m_act) { if (!(dst->m_act = rtnl_act_alloc())) return -NLE_NOMEM;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/police.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/police.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/police.c Policer - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/cls/u32.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/cls/u32.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/cls/u32.c u32 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) 2003-2013 Thomas Graf <tgraf@suug.ch> * Copyright (c) 2005-2006 Petr Gotthard <petr.gotthard@siemens.com> * Copyright (c) 2005-2006 Siemens AG Oesterreich @@ -28,6 +22,8 @@ #include <netlink/route/cls/u32.h> #include <netlink/route/action.h> +#include "netlink-private/utils.h" + /** @cond SKIP */ #define U32_ATTR_DIVISOR 0x001 #define U32_ATTR_HASH 0x002 @@ -121,7 +117,7 @@ if (tbTCA_U32_ACT) { u->cu_mask |= U32_ATTR_ACTION; err = rtnl_act_parse(&u->cu_act, tbTCA_U32_ACT); - if (err) + if (err < 0) return err; } @@ -183,27 +179,96 @@ static int u32_clone(void *_dst, void *_src) { struct rtnl_u32 *dst = _dst, *src = _src; + _nl_auto_nl_data struct nl_data *selector = NULL; + _nl_auto_nl_data struct nl_data *mark = NULL; + _nl_auto_nl_data struct nl_data *police = NULL; + _nl_auto_nl_data struct nl_data *pcnt = NULL; + _nl_auto_nl_data struct nl_data *opts = NULL; + _nl_auto_nl_data struct nl_data *xstats = NULL; + _nl_auto_nl_data struct nl_data *subdata = NULL; + _nl_auto_rtnl_act struct rtnl_act *act = NULL; + + dst->cu_pcnt = NULL; + dst->cu_selector = NULL; + dst->cu_mark = NULL; + dst->cu_act = NULL; + dst->cu_police = NULL; + + if (src->cu_selector) { + if (!(selector = nl_data_clone(src->cu_selector))) + return -NLE_NOMEM; + } - if (src->cu_selector && - !(dst->cu_selector = nl_data_clone(src->cu_selector))) - return -NLE_NOMEM; - - if (src->cu_mark && - !(dst->cu_mark = nl_data_clone(src->cu_mark))) - return -NLE_NOMEM; + if (src->cu_mark) { + if (!(mark = nl_data_clone(src->cu_mark))) + return -NLE_NOMEM; + } if (src->cu_act) { - if (!(dst->cu_act = rtnl_act_alloc())) + if (!(act = rtnl_act_alloc())) return -NLE_NOMEM; - memcpy(dst->cu_act, src->cu_act, sizeof(struct rtnl_act)); + if (src->cu_act->c_opts) { + if (!(opts = nl_data_clone(src->cu_act->c_opts))) + return -NLE_NOMEM; + } + + if (src->cu_act->c_xstats) { + if (!(xstats = nl_data_clone(src->cu_act->c_xstats))) + return -NLE_NOMEM; + } + + if (src->cu_act->c_subdata) { + if (!(subdata = nl_data_clone(src->cu_act->c_subdata))) + return -NLE_NOMEM; + } } - if (src->cu_police && !(dst->cu_police = nl_data_clone(src->cu_police))) - return -NLE_NOMEM; + if (src->cu_police) { + if (!(police = nl_data_clone(src->cu_police))) + return -NLE_NOMEM; + } - if (src->cu_pcnt && !(dst->cu_pcnt = nl_data_clone(src->cu_pcnt))) - return -NLE_NOMEM; + if (src->cu_pcnt) { + if (!(pcnt = nl_data_clone(src->cu_pcnt))) + return -NLE_NOMEM; + } + + /* we've passed the critical point and its safe to proceed */ + + if (selector) + dst->cu_selector = _nl_steal_pointer(&selector); + + if (mark) + dst->cu_mark = _nl_steal_pointer(&mark); + + if (police) + dst->cu_police = _nl_steal_pointer(&police); + + if (pcnt) + dst->cu_pcnt = _nl_steal_pointer(&pcnt); + + if (act) { + dst->cu_act = _nl_steal_pointer(&act); + + /* action nl list next and prev pointers must be updated */ + nl_init_list_head(&dst->cu_act->ce_list); + + if (opts) + dst->cu_act->c_opts = _nl_steal_pointer(&opts); + + if (xstats) + dst->cu_act->c_xstats = _nl_steal_pointer(&xstats); + + if (subdata) + dst->cu_act->c_subdata = _nl_steal_pointer(&subdata); + + if (dst->cu_act->c_link) { + nl_object_get(OBJ_CAST(dst->cu_act->c_link)); + } + + dst->cu_act->a_next = NULL; /* Only clone first in chain */ + } return 0; } @@ -278,7 +343,9 @@ if (p->dp_type == NL_DUMP_STATS && (u->cu_mask & U32_ATTR_PCNT)) { struct tc_u32_pcnt *pcnt = u->cu_pcnt->d_data; - nl_dump(p, " successful %" PRIu64, pcnt->kcntsi); + + nl_dump(p, " successful %llu", + (long long unsigned)pcnt->kcntsi); } } } @@ -293,11 +360,6 @@ if (!u) return; - if (!(u->cu_mask & (U32_ATTR_SELECTOR & U32_ATTR_MARK))) { - nl_dump(p, "no-selector no-mark\n"); - return; - } - if (!(u->cu_mask & U32_ATTR_SELECTOR)) { nl_dump(p, "no-selector"); } else { @@ -338,9 +400,11 @@ if (u->cu_mask & U32_ATTR_PCNT) { struct tc_u32_pcnt *pc = u->cu_pcnt->d_data; + nl_dump(p, "\n"); - nl_dump_line(p, " hit %8" PRIu64 " count %8" PRIu64 "\n", - pc->rhit, pc->rcnt); + nl_dump_line(p, " hit %8llu count %8llu\n", + (long long unsigned)pc->rhit, + (long long unsigned)pc->rcnt); } } @@ -373,7 +437,7 @@ int err; err = rtnl_act_fill(msg, TCA_U32_ACT, u->cu_act); - if (err) + if (err < 0) return err; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link.c Links (Interfaces) - * - * 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> */ @@ -93,13 +86,12 @@ int family) { struct rtnl_link_af_ops *af_ops; - void *data; af_ops = rtnl_link_af_ops_lookup(family); if (!af_ops) return NULL; - if (!(data = rtnl_link_af_alloc(link, af_ops))) { + if (!rtnl_link_af_alloc(link, af_ops)) { rtnl_link_af_ops_put(af_ops); return NULL; } @@ -223,22 +215,19 @@ static int do_foreach_af(struct rtnl_link *link, int (*cb)(struct rtnl_link *, - struct rtnl_link_af_ops *, void *, void *), + struct rtnl_link_af_ops *, void *, void *), void *arg) { int i, err; for (i = 0; i < AF_MAX; i++) { if (link->l_af_datai) { - struct rtnl_link_af_ops *ops; + _nl_auto_rtnl_link_af_ops struct rtnl_link_af_ops *ops = NULL; if (!(ops = rtnl_link_af_ops_lookup(i))) BUG(); err = cb(link, ops, link->l_af_datai, arg); - - rtnl_link_af_ops_put(ops); - if (err < 0) return err; } @@ -296,6 +285,19 @@ struct rtnl_link *src = nl_object_priv(_src); int err; + dst->l_addr = NULL; + dst->l_bcast = NULL; + dst->l_info_kind = NULL; + dst->l_info_slave_kind = NULL; + dst->l_info_ops = NULL; + memset(dst->l_af_data, 0, sizeof (dst->l_af_data)); + dst->l_info = NULL; + dst->l_ifalias = NULL; + dst->l_af_ops = NULL; + dst->l_phys_port_id = NULL; + dst->l_phys_switch_id = NULL; + dst->l_vf_list = NULL; + if (src->l_addr) if (!(dst->l_addr = nl_addr_clone(src->l_addr))) return -NLE_NOMEM; @@ -316,15 +318,24 @@ if (!(dst->l_info_slave_kind = strdup(src->l_info_slave_kind))) return -NLE_NOMEM; - if (src->l_info_ops && src->l_info_ops->io_clone) { - err = src->l_info_ops->io_clone(dst, src); - if (err < 0) - return err; + if (src->l_info_ops) { + + rtnl_link_info_ops_get(src->l_info_ops); + dst->l_info_ops = src->l_info_ops; + + if (src->l_info_ops->io_clone) { + err = src->l_info_ops->io_clone(dst, src); + if (err < 0) + return err; + } } if ((err = do_foreach_af(src, af_clone, dst)) < 0) return err; + if (src->l_af_ops) + dst->l_af_ops = af_lookup_and_alloc(dst, src->l_af_ops->ao_family); + if (src->l_phys_port_id) if (!(dst->l_phys_port_id = nl_data_clone(src->l_phys_port_id))) return -NLE_NOMEM; @@ -387,7 +398,7 @@ return -NLE_MISSING_ATTR; nla_strlcpy(link->l_name, tbIFLA_IFNAME, IFNAMSIZ); - + link->ce_mask |= LINK_ATTR_IFNAME; if (tbIFLA_STATS) { struct rtnl_link_stats *st = nla_data(tbIFLA_STATS); @@ -580,28 +591,22 @@ static int link_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, struct nlmsghdr *n, struct nl_parser_param *pp) { - struct rtnl_link *link; + _nl_auto_rtnl_link struct rtnl_link *link = NULL; + struct nla_policy real_link_policyARRAY_SIZE(rtln_link_policy); + struct nla_policy *link_policy = rtln_link_policy; + struct rtnl_link_af_ops *af_ops_family; struct ifinfomsg *ifi; struct nlattr *tbIFLA_MAX+1; - struct rtnl_link_af_ops *af_ops = NULL; - struct rtnl_link_af_ops *af_ops_family; int err, family; - struct nla_policy real_link_policyIFLA_MAX+1; - - memcpy(&real_link_policy, rtln_link_policy, sizeof(rtln_link_policy)); link = rtnl_link_alloc(); - if (link == NULL) { - err = -NLE_NOMEM; - goto errout; - } + if (link == NULL) + return -NLE_NOMEM; link->ce_msgtype = n->nlmsg_type; - if (!nlmsg_valid_hdr(n, sizeof(*ifi))) { - err = -NLE_MSG_TOOSHORT; - goto errout; - } + if (!nlmsg_valid_hdr(n, sizeof(*ifi))) + return -NLE_MSG_TOOSHORT; ifi = nlmsg_data(n); link->l_family = family = ifi->ifi_family; @@ -609,35 +614,37 @@ link->l_index = ifi->ifi_index; link->l_flags = ifi->ifi_flags; link->l_change = ifi->ifi_change; - link->ce_mask = (LINK_ATTR_IFNAME | LINK_ATTR_FAMILY | + link->ce_mask = (LINK_ATTR_FAMILY | LINK_ATTR_ARPTYPE| LINK_ATTR_IFINDEX | LINK_ATTR_FLAGS | LINK_ATTR_CHANGE); - if ((af_ops_family = af_ops = af_lookup_and_alloc(link, family))) { - if (af_ops->ao_protinfo_policy) { + if ((link->l_af_ops = af_lookup_and_alloc(link, family))) { + if (link->l_af_ops->ao_protinfo_policy) { + _NL_STATIC_ASSERT (sizeof(rtln_link_policy) == sizeof(real_link_policy)); + memcpy(&real_link_policy, rtln_link_policy, sizeof(rtln_link_policy)); memcpy(&real_link_policyIFLA_PROTINFO, - af_ops->ao_protinfo_policy, + link->l_af_ops->ao_protinfo_policy, sizeof(struct nla_policy)); + link_policy = real_link_policy; } - - link->l_af_ops = af_ops; } - err = nlmsg_parse(n, sizeof(*ifi), tb, IFLA_MAX, real_link_policy); + af_ops_family = link->l_af_ops; + + err = nlmsg_parse(n, sizeof(*ifi), tb, IFLA_MAX, link_policy); if (err < 0) - goto errout; + return err; err = rtnl_link_info_parse(link, tb); if (err < 0) - goto errout; + return err; if (tbIFLA_NUM_VF) { link->l_num_vf = nla_get_u32(tbIFLA_NUM_VF); link->ce_mask |= LINK_ATTR_NUM_VF; if (link->l_num_vf && tbIFLA_VFINFO_LIST) { - if ((err = rtnl_link_sriov_parse_vflist(link, tb)) < 0) { - goto errout; - } + if ((err = rtnl_link_sriov_parse_vflist(link, tb)) < 0) + return err; link->ce_mask |= LINK_ATTR_VF_LIST; } } @@ -648,7 +655,7 @@ err = nla_parse_nested(li, IFLA_INFO_MAX, tbIFLA_LINKINFO, link_info_policy); if (err < 0) - goto errout; + return err; if (liIFLA_INFO_KIND) { struct rtnl_link_info_ops *ops; @@ -657,18 +664,19 @@ err = rtnl_link_set_type(link, kind); if (err < 0) - goto errout; - - if ((af = nl_str2af(kind)) >= 0 && - !af_ops && (af_ops = af_lookup_and_alloc(link, af))) { + return err; - if (af_ops->ao_protinfo_policy) { - tbIFLA_PROTINFO = (struct nlattr *)af_ops->ao_protinfo_policy; - } + if ( (af = nl_str2af(kind)) >= 0 + && !link->l_af_ops + && (link->l_af_ops = af_lookup_and_alloc(link, af))) { link->l_family = af; - link->l_af_ops = af_ops; + if (link->l_af_ops->ao_protinfo_policy) + tbIFLA_PROTINFO = (struct nlattr *)link->l_af_ops->ao_protinfo_policy; } + if (link->l_info_ops) + release_link_info(link); + ops = rtnl_link_info_ops_lookup(kind); link->l_info_ops = ops; @@ -678,7 +686,7 @@ err = ops->io_parse(link, liIFLA_INFO_DATA, liIFLA_INFO_XSTATS); if (err < 0) - goto errout; + return err; } else { /* XXX: Warn about unparsed info? */ } @@ -692,17 +700,19 @@ err = rtnl_link_set_slave_type(link, kind); if (err < 0) - goto errout; + return err; link->ce_mask |= LINK_ATTR_LINKINFO_SLAVE_KIND; } } - if (tbIFLA_PROTINFO && af_ops && af_ops->ao_parse_protinfo) { - err = af_ops->ao_parse_protinfo(link, tbIFLA_PROTINFO, - link->l_af_datalink->l_family); + if ( tbIFLA_PROTINFO + && link->l_af_ops + && link->l_af_ops->ao_parse_protinfo) { + err = link->l_af_ops->ao_parse_protinfo(link, tbIFLA_PROTINFO, + link->l_af_datalink->l_family); if (err < 0) - goto errout; + return err; link->ce_mask |= LINK_ATTR_PROTINFO; } @@ -710,25 +720,28 @@ /* parsing of IFLA_AF_SPEC is dependent on the family used * in the request message. */ - if (af_ops_family && af_ops_family->ao_parse_af_full) { + if ( af_ops_family + && af_ops_family->ao_parse_af_full) { err = af_ops_family->ao_parse_af_full(link, tbIFLA_AF_SPEC, link->l_af_dataaf_ops_family->ao_family); if (err < 0) - goto errout; + return err; link->ce_mask |= LINK_ATTR_AF_SPEC; } else if (family == AF_UNSPEC) { struct nlattr *af_attr; int remaining; nla_for_each_nested(af_attr, tbIFLA_AF_SPEC, remaining) { + _nl_auto_rtnl_link_af_ops struct rtnl_link_af_ops *af_ops = NULL; + af_ops = af_lookup_and_alloc(link, nla_type(af_attr)); if (af_ops && af_ops->ao_parse_af) { char *af_data = link->l_af_datanla_type(af_attr); err = af_ops->ao_parse_af(link, af_attr, af_data); if (err < 0) - goto errout; + return err; } } link->ce_mask |= LINK_ATTR_AF_SPEC; @@ -770,10 +783,8 @@ if (tbIFLA_PHYS_PORT_ID) { link->l_phys_port_id = nl_data_alloc_attr(tbIFLA_PHYS_PORT_ID); - if (link->l_phys_port_id == NULL) { - err = -NLE_NOMEM; - goto errout; - } + if (link->l_phys_port_id == NULL) + return -NLE_NOMEM; link->ce_mask |= LINK_ATTR_PHYS_PORT_ID; } @@ -784,26 +795,20 @@ if (tbIFLA_PHYS_SWITCH_ID) { link->l_phys_switch_id = nl_data_alloc_attr(tbIFLA_PHYS_SWITCH_ID); - if (link->l_phys_switch_id == NULL) { - err = -NLE_NOMEM; - goto errout; - } + if (link->l_phys_switch_id == NULL) + return -NLE_NOMEM; link->ce_mask |= LINK_ATTR_PHYS_SWITCH_ID; } - err = pp->pp_cb((struct nl_object *) link, pp); -errout: - rtnl_link_af_ops_put(af_ops); - rtnl_link_put(link); - return err; + return pp->pp_cb((struct nl_object *) link, pp); } static int link_request_update(struct nl_cache *cache, struct nl_sock *sk) { + _nl_auto_nl_msg struct nl_msg *msg = NULL; int family = cache->c_iarg1; struct ifinfomsg hdr = { .ifi_family = family }; struct rtnl_link_af_ops *ops; - struct nl_msg *msg; int err; __u32 ext_filter_mask = RTEXT_FILTER_VF; @@ -811,30 +816,27 @@ if (!msg) return -NLE_NOMEM; - err = -NLE_MSGSIZE; if (nlmsg_append(msg, &hdr, sizeof(hdr), NLMSG_ALIGNTO) < 0) - goto nla_put_failure; + return -NLE_MSGSIZE; ops = rtnl_link_af_ops_lookup(family); if (ops && ops->ao_get_af) { err = ops->ao_get_af(msg, &ext_filter_mask); - if (err) - goto nla_put_failure; + if (err < 0) + return err; } if (ext_filter_mask) { err = nla_put(msg, IFLA_EXT_MASK, sizeof(ext_filter_mask), &ext_filter_mask); - if (err) - goto nla_put_failure; + if (err < 0) + return err; } err = nl_send_auto(sk, msg); - if (err > 0) - err = 0; + if (err < 0) + return 0; -nla_put_failure: - nlmsg_free(msg); - return err; + return 0; } static void link_dump_line(struct nl_object *obj, struct nl_dump_params *p) @@ -860,10 +862,9 @@ if (link->ce_mask & LINK_ATTR_MASTER) { if (cache) { - struct rtnl_link *master = rtnl_link_get(cache, link->l_master); + _nl_auto_rtnl_link struct rtnl_link *master = rtnl_link_get(cache, link->l_master); + nl_dump(p, "master %s ", master ? master->l_name : "inv"); - if (master) - rtnl_link_put(master); } else nl_dump(p, "master %d ", link->l_master); } @@ -875,10 +876,9 @@ if (link->ce_mask & LINK_ATTR_LINK) { if ( cache && !(link->ce_mask & LINK_ATTR_LINK_NETNSID)) { - struct rtnl_link *ll = rtnl_link_get(cache, link->l_link); + _nl_auto_rtnl_link struct rtnl_link *ll = rtnl_link_get(cache, link->l_link); + nl_dump(p, "slave-of %s ", ll ? ll->l_name : "NONE"); - if (ll) - rtnl_link_put(ll); } else nl_dump(p, "slave-of %d ", link->l_link); } @@ -1369,10 +1369,9 @@ int rtnl_link_build_get_request(int ifindex, const char *name, struct nl_msg **result) { + _nl_auto_nl_msg struct nl_msg *msg = NULL; struct ifinfomsg ifi; - struct nl_msg *msg; __u32 vf_mask = RTEXT_FILTER_VF; - int err = -NLE_MSGSIZE; if (ifindex <= 0 && !name) { APPBUG("ifindex or name must be specified"); @@ -1387,24 +1386,15 @@ if (ifindex > 0) ifi.ifi_index = ifindex; - if (nlmsg_append(msg, &ifi, sizeof(ifi), NLMSG_ALIGNTO) < 0) { - err = -NLE_MSGSIZE; - goto nla_put_failure; - } + _NL_RETURN_ON_PUT_ERR(nlmsg_append(msg, &ifi, sizeof(ifi), NLMSG_ALIGNTO)); if (name) - NLA_PUT_STRING(msg, IFLA_IFNAME, name); + _NL_RETURN_ON_PUT_ERR(nla_put_string(msg, IFLA_IFNAME, name)); - err = nla_put(msg, IFLA_EXT_MASK, sizeof(vf_mask), &vf_mask); - if (err) - goto nla_put_failure; + _NL_RETURN_ON_PUT_ERR(nla_put(msg, IFLA_EXT_MASK, sizeof(vf_mask), &vf_mask)); - *result = msg; + *result = _nl_steal_pointer(&msg); return 0; - -nla_put_failure: - nlmsg_free(msg); - return err; } /** @@ -1431,8 +1421,8 @@ int rtnl_link_get_kernel(struct nl_sock *sk, int ifindex, const char *name, struct rtnl_link **result) { - struct nl_msg *msg = NULL; - struct nl_object *obj; + _nl_auto_rtnl_link struct rtnl_link *link = NULL; + _nl_auto_nl_msg struct nl_msg *msg = NULL; int err; int syserr; @@ -1440,14 +1430,15 @@ return err; err = nl_send_auto(sk, msg); - nlmsg_free(msg); if (err < 0) return err; - if ((err = nl_pickup_keep_syserr(sk, link_msg_parser, &obj, &syserr)) < 0) { - if (syserr == -EINVAL && - ifindex <= 0 && - name && *name) { + err = nl_pickup_keep_syserr(sk, link_msg_parser, (struct nl_object **) &link, &syserr); + if (err < 0) { + if ( syserr == -EINVAL + && ifindex <= 0 + && name + && *name) { /* Older kernels do not support lookup by ifname. This was added * by commit kernel a3d1289126e7b14307074b76bf1677015ea5036f . * Detect this error case and return NLE_OPNOTSUPP instead of @@ -1457,13 +1448,11 @@ return err; } - /* We have used link_msg_parser(), object is definitely a link */ - *result = (struct rtnl_link *) obj; - /* If an object has been returned, we also need to wait for the ACK */ - if (err == 0 && obj) + if (err == 0 && link) wait_for_ack(sk); + *result = _nl_steal_pointer(&link); return 0; } @@ -1484,11 +1473,11 @@ char * rtnl_link_i2name(struct nl_cache *cache, int ifindex, char *dst, size_t len) { - struct rtnl_link *link = rtnl_link_get(cache, ifindex); + _nl_auto_rtnl_link struct rtnl_link *link = NULL; + link = rtnl_link_get(cache, ifindex); if (link) { - strncpy(dst, link->l_name, len - 1); - rtnl_link_put(link); + _nl_strncpy_trunc(dst, link->l_name, len); return dst; } @@ -1506,16 +1495,13 @@ */ int rtnl_link_name2i(struct nl_cache *cache, const char *name) { - int ifindex = 0; - struct rtnl_link *link; + _nl_auto_rtnl_link struct rtnl_link *link = NULL; link = rtnl_link_get_by_name(cache, name); - if (link) { - ifindex = link->l_index; - rtnl_link_put(link); - } + if (link) + return link->l_index; - return ifindex; + return 0; } /** @} */ @@ -1582,7 +1568,7 @@ static int build_link_msg(int cmd, struct ifinfomsg *hdr, struct rtnl_link *link, int flags, struct nl_msg **result) { - struct nl_msg *msg; + _nl_auto_nl_msg struct nl_msg *msg = NULL; struct nlattr *af_spec; msg = nlmsg_alloc_simple(cmd, flags); @@ -1637,11 +1623,10 @@ nla_nest_end(msg, af_spec); - *result = msg; + *result = _nl_steal_pointer(&msg); return 0; nla_put_failure: - nlmsg_free(msg); return -NLE_MSGSIZE; } @@ -1759,12 +1744,9 @@ rt = af_request_type(orig->l_family, changes); if ((err = build_link_msg(rt, &ifi, changes, flags, result)) < 0) - goto errout; + return err; return 0; - -errout: - return err; } /** @@ -1805,7 +1787,7 @@ int rtnl_link_change(struct nl_sock *sk, struct rtnl_link *orig, struct rtnl_link *changes, int flags) { - struct nl_msg *msg; + _nl_auto_nl_msg struct nl_msg *msg = NULL; int err; err = rtnl_link_build_change_request(orig, changes, flags, &msg); @@ -1816,18 +1798,20 @@ retry: err = nl_send_auto_complete(sk, msg); if (err < 0) - goto errout; + return err; err = wait_for_ack(sk); - if (err == -NLE_OPNOTSUPP && msg->nm_nlh->nlmsg_type == RTM_NEWLINK) { + if ( err == -NLE_OPNOTSUPP + && msg->nm_nlh->nlmsg_type == RTM_NEWLINK) { msg->nm_nlh->nlmsg_type = RTM_SETLINK; msg->nm_nlh->nlmsg_seq = NL_AUTO_SEQ; goto retry; } -errout: - nlmsg_free(msg); - return err; + if (err < 0) + return err; + + return 0; } /** @} */ @@ -1853,7 +1837,7 @@ int rtnl_link_build_delete_request(const struct rtnl_link *link, struct nl_msg **result) { - struct nl_msg *msg; + _nl_auto_nl_msg struct nl_msg *msg = NULL; struct ifinfomsg ifi = { .ifi_index = link->l_index, }; @@ -1866,18 +1850,13 @@ if (!(msg = nlmsg_alloc_simple(RTM_DELLINK, 0))) return -NLE_NOMEM; - if (nlmsg_append(msg, &ifi, sizeof(ifi), NLMSG_ALIGNTO) < 0) - goto nla_put_failure; + _NL_RETURN_ON_PUT_ERR(nlmsg_append(msg, &ifi, sizeof(ifi), NLMSG_ALIGNTO)); if (link->ce_mask & LINK_ATTR_IFNAME) - NLA_PUT_STRING(msg, IFLA_IFNAME, link->l_name); + _NL_RETURN_ON_PUT_ERR(nla_put_string(msg, IFLA_IFNAME, link->l_name)); - *result = msg; + *result = _nl_steal_pointer(&msg); return 0; - -nla_put_failure: - nlmsg_free(msg); - return -NLE_MSGSIZE; } /** @@ -1958,7 +1937,7 @@ */ void rtnl_link_set_name(struct rtnl_link *link, const char *name) { - strncpy(link->l_name, name, sizeof(link->l_name) - 1); + _nl_strncpy_trunc(link->l_name, name, sizeof(link->l_name)); link->ce_mask |= LINK_ATTR_IFNAME; } @@ -2125,9 +2104,10 @@ link->ce_mask |= LINK_ATTR_FAMILY; if (link->l_af_ops) { - af_free(link, link->l_af_ops, - link->l_af_datalink->l_af_ops->ao_family, NULL); - link->l_af_datalink->l_af_ops->ao_family = NULL; + int ao_family = link->l_af_ops->ao_family; + + af_free(link, link->l_af_ops, link->l_af_dataao_family, NULL); + link->l_af_dataao_family = NULL; } link->l_af_ops = af_lookup_and_alloc(link, family); @@ -2482,7 +2462,7 @@ */ void rtnl_link_set_qdisc(struct rtnl_link *link, const char *name) { - strncpy(link->l_qdisc, name, sizeof(link->l_qdisc) - 1); + _nl_strncpy_trunc(link->l_qdisc, name, sizeof(link->l_qdisc)); link->ce_mask |= LINK_ATTR_QDISC; } @@ -2568,8 +2548,8 @@ int rtnl_link_set_type(struct rtnl_link *link, const char *type) { struct rtnl_link_info_ops *io; + _nl_auto_free char *kind = NULL; int err; - char *kind; free(link->l_info_kind); link->ce_mask &= ~LINK_ATTR_LINKINFO; @@ -2584,20 +2564,18 @@ io = rtnl_link_info_ops_lookup(type); if (io) { - if (io->io_alloc && (err = io->io_alloc(link)) < 0) - goto errout; + if (io->io_alloc && (err = io->io_alloc(link)) < 0) { + _nl_clear_free(&kind); + return err; + } link->l_info_ops = io; } - link->l_info_kind = kind; + link->l_info_kind = _nl_steal_pointer(&kind); link->ce_mask |= LINK_ATTR_LINKINFO; return 0; - -errout: - free(kind); - return err; } /** @@ -2857,7 +2835,7 @@ */ int rtnl_link_enslave_ifindex(struct nl_sock *sock, int master, int slave) { - struct rtnl_link *link; + _nl_auto_rtnl_link struct rtnl_link *link = NULL; int err; if (!(link = rtnl_link_alloc())) @@ -2867,12 +2845,12 @@ rtnl_link_set_master(link, master); if ((err = rtnl_link_change(sock, link, link, 0)) < 0) - goto errout; + return err; - rtnl_link_put(link); + _nl_clear_pointer(&link, rtnl_link_put); /* - * Due to the kernel not signaling whether this opertion is + * Due to the kernel not signaling whether this operation is * supported or not, we will retrieve the attribute to see if the * request was successful. If the master assigned remains unchanged * we will return NLE_OPNOTSUPP to allow performing backwards @@ -2882,12 +2860,9 @@ return err; if (rtnl_link_get_master(link) != master) - err = -NLE_OPNOTSUPP; - -errout: - rtnl_link_put(link); + return -NLE_OPNOTSUPP; - return err; + return 0; } /** @@ -3063,6 +3038,7 @@ __ADD(RTNL_LINK_IP6_ECT0PKTS, Ip6_InECT0Pkts), __ADD(RTNL_LINK_IP6_CEPKTS, Ip6_InCEPkts), __ADD(RTNL_LINK_RX_NOHANDLER, rx_nohandler), + __ADD(RTNL_LINK_REASM_OVERLAPS, ReasmOverlaps), }; char *rtnl_link_stat2str(int st, char *buf, size_t len) @@ -3135,22 +3111,16 @@ return 0; } -void rtnl_link_set_vf_list(struct rtnl_link *link) { - int err; - - if (!(err = rtnl_link_has_vf_list(link))) +void rtnl_link_set_vf_list(struct rtnl_link *link) +{ + if (!rtnl_link_has_vf_list(link)) link->ce_mask |= LINK_ATTR_VF_LIST; - - return; } -void rtnl_link_unset_vf_list(struct rtnl_link *link) { - int err; - - if ((err = rtnl_link_has_vf_list(link))) +void rtnl_link_unset_vf_list(struct rtnl_link *link) +{ + if (rtnl_link_has_vf_list(link)) link->ce_mask &= ~LINK_ATTR_VF_LIST; - - return; } /** @} */ @@ -3213,6 +3183,7 @@ static struct nl_af_group link_groups = { { AF_UNSPEC, RTNLGRP_LINK }, { AF_BRIDGE, RTNLGRP_LINK }, + { AF_INET6, RTNLGRP_IPV6_IFINFO }, { END_OF_GROUP_LIST }, };
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/api.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/api.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/api.c Link Info API - * - * 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> */ @@ -87,13 +81,32 @@ } /** + * Take reference to a set of operations. + * @arg ops Link info operations. + */ +void rtnl_link_info_ops_get(struct rtnl_link_info_ops *ops) +{ + if (!ops) + return; + + nl_write_lock(&info_lock); + ops->io_refcnt++; + nl_write_unlock(&info_lock); +} + +/** * Give back reference to a set of operations. * @arg ops Link info operations. */ void rtnl_link_info_ops_put(struct rtnl_link_info_ops *ops) { - if (ops) - ops->io_refcnt--; + if (!ops) + return; + + nl_write_lock(&info_lock); + _nl_assert(ops->io_refcnt > 0); + ops->io_refcnt--; + nl_write_unlock(&info_lock); } /** @@ -152,6 +165,7 @@ nl_list_for_each_entry(t, &info_ops, io_list) { if (t == ops) { + _nl_assert(t->io_refcnt >= 0); if (t->io_refcnt > 0) { err = -NLE_BUSY; goto errout; @@ -208,8 +222,11 @@ */ void rtnl_link_af_ops_put(struct rtnl_link_af_ops *ops) { - if (ops) + if (ops) { + nl_write_lock(&info_lock); ops->ao_refcnt--; + nl_write_unlock(&info_lock); + } } /**
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/bonding.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/bonding.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/bonding.c Bonding Link Module - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -33,12 +27,11 @@ struct rtnl_link *rtnl_link_bond_alloc(void) { struct rtnl_link *link; - int err; if (!(link = rtnl_link_alloc())) return NULL; - if ((err = rtnl_link_set_type(link, "bond")) < 0) { + if (rtnl_link_set_type(link, "bond") < 0) { rtnl_link_put(link); return NULL; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/bridge.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/bridge.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/bridge.c AF_BRIDGE link support - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -464,12 +458,11 @@ struct rtnl_link *rtnl_link_bridge_alloc(void) { struct rtnl_link *link; - int err; if (!(link = rtnl_link_alloc())) return NULL; - if ((err = rtnl_link_set_type(link, "bridge")) < 0) { + if (rtnl_link_set_type(link, "bridge") < 0) { rtnl_link_put(link); return NULL; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/can.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/can.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/can.c CAN Link Info - * - * 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) 2012 Benedikt Spranger <b.spranger@linutronix.de> */ @@ -42,6 +36,8 @@ #define CAN_HAS_RESTART_MS (1<<5) #define CAN_HAS_RESTART (1<<6) #define CAN_HAS_BERR_COUNTER (1<<7) +#define CAN_HAS_DATA_BITTIMING (1<<8) +#define CAN_HAS_DATA_BITTIMING_CONST (1<<9) struct can_info { uint32_t ci_state; @@ -53,6 +49,8 @@ struct can_clock ci_clock; struct can_berr_counter ci_berr_counter; uint32_t ci_mask; + struct can_bittiming ci_data_bittiming; + struct can_bittiming_const ci_data_bittiming_const; }; /** @endcond */ @@ -67,6 +65,10 @@ = { .minlen = sizeof(struct can_bittiming_const) }, IFLA_CAN_CLOCK = { .minlen = sizeof(struct can_clock) }, IFLA_CAN_BERR_COUNTER = { .minlen = sizeof(struct can_berr_counter) }, + IFLA_CAN_DATA_BITTIMING + = { .minlen = sizeof(struct can_bittiming) }, + IFLA_CAN_DATA_BITTIMING_CONST + = { .minlen = sizeof(struct can_bittiming_const) }, }; static int can_alloc(struct rtnl_link *link) @@ -149,6 +151,18 @@ ci->ci_mask |= CAN_HAS_BERR_COUNTER; } + if (tbIFLA_CAN_DATA_BITTIMING) { + nla_memcpy(&ci->ci_data_bittiming, tbIFLA_CAN_DATA_BITTIMING, + sizeof(ci->ci_data_bittiming)); + ci->ci_mask |= CAN_HAS_DATA_BITTIMING; + } + + if (tbIFLA_CAN_DATA_BITTIMING_CONST) { + nla_memcpy(&ci->ci_data_bittiming_const, tbIFLA_CAN_DATA_BITTIMING_CONST, + sizeof(ci->ci_data_bittiming_const)); + ci->ci_mask |= CAN_HAS_DATA_BITTIMING_CONST; + } + err = 0; errout: return err; @@ -259,7 +273,7 @@ } if (ci->ci_mask & CAN_HAS_CLOCK) { - nl_dump_line(p," base freq %d Hz\n", ci->ci_clock); + nl_dump_line(p," base freq %u Hz\n", ci->ci_clock.freq); } @@ -303,28 +317,36 @@ return -NLE_MSGSIZE; if (ci->ci_mask & CAN_HAS_RESTART) - NLA_PUT_U32(msg, CAN_HAS_RESTART, ci->ci_restart); + NLA_PUT_U32(msg, IFLA_CAN_RESTART, ci->ci_restart); if (ci->ci_mask & CAN_HAS_RESTART_MS) - NLA_PUT_U32(msg, CAN_HAS_RESTART_MS, ci->ci_restart_ms); + NLA_PUT_U32(msg, IFLA_CAN_RESTART_MS, ci->ci_restart_ms); if (ci->ci_mask & CAN_HAS_CTRLMODE) - NLA_PUT(msg, CAN_HAS_CTRLMODE, sizeof(ci->ci_ctrlmode), + NLA_PUT(msg, IFLA_CAN_CTRLMODE, sizeof(ci->ci_ctrlmode), &ci->ci_ctrlmode); if (ci->ci_mask & CAN_HAS_BITTIMING) - NLA_PUT(msg, CAN_HAS_BITTIMING, sizeof(ci->ci_bittiming), + NLA_PUT(msg, IFLA_CAN_BITTIMING, sizeof(ci->ci_bittiming), &ci->ci_bittiming); if (ci->ci_mask & CAN_HAS_BITTIMING_CONST) - NLA_PUT(msg, CAN_HAS_BITTIMING_CONST, + NLA_PUT(msg, IFLA_CAN_BITTIMING_CONST, sizeof(ci->ci_bittiming_const), &ci->ci_bittiming_const); if (ci->ci_mask & CAN_HAS_CLOCK) - NLA_PUT(msg, CAN_HAS_CLOCK, sizeof(ci->ci_clock), + NLA_PUT(msg, IFLA_CAN_CLOCK, sizeof(ci->ci_clock), &ci->ci_clock); + if (ci->ci_mask & CAN_HAS_DATA_BITTIMING) + NLA_PUT(msg, IFLA_CAN_DATA_BITTIMING, sizeof(ci->ci_data_bittiming), + &ci->ci_data_bittiming); + + if (ci->ci_mask & CAN_HAS_DATA_BITTIMING_CONST) + NLA_PUT(msg, IFLA_CAN_DATA_BITTIMING_CONST, sizeof(ci->ci_data_bittiming_const), + &ci->ci_data_bittiming_const); + nla_nest_end(msg, data); nla_put_failure: @@ -489,7 +511,7 @@ } /** - * Get CAN harware-dependent bit-timing constant + * Get CAN hardware-dependent bit-timing constant * @arg link Link object * @arg bt_const Bit-timing constant * @@ -544,7 +566,7 @@ * @return 0 on success or a negative error code */ int rtnl_link_can_set_bittiming(struct rtnl_link *link, - struct can_bittiming *bit_timing) + const struct can_bittiming *bit_timing) { struct can_info *ci = link->l_info; @@ -747,6 +769,98 @@ return 0; } +/** + * Get CAN FD hardware-dependent data bit-timing constant + * @arg link Link object + * @arg data_bt_const CAN FD data bit-timing constant + * + * @return 0 on success or a negative error code + */ +int rtnl_link_can_get_data_bittiming_const(struct rtnl_link *link, + struct can_bittiming_const *data_bt_const) +{ + struct can_info *ci = link->l_info; + + IS_CAN_LINK_ASSERT(link); + if (!data_bt_const) + return -NLE_INVAL; + + if (ci->ci_mask & CAN_HAS_DATA_BITTIMING_CONST) + *data_bt_const = ci->ci_data_bittiming_const; + else + return -NLE_AGAIN; + + return 0; +} + +/** + * Set CAN FD device data bit-timing-const + * @arg link Link object + * @arg data_bit_timing CAN FD data bit-timing + * + * @return 0 on success or a negative error code + */ +int rtnl_link_can_set_data_bittiming_const(struct rtnl_link *link, + const struct can_bittiming_const *data_bt_const) +{ + struct can_info *ci = link->l_info; + + IS_CAN_LINK_ASSERT(link); + if (!data_bt_const) + return -NLE_INVAL; + + ci->ci_data_bittiming_const = *data_bt_const; + ci->ci_mask |= CAN_HAS_DATA_BITTIMING_CONST; + + return 0; +} + +/** + * Get CAN FD device data bit-timing + * @arg link Link object + * @arg data_bit_timing CAN FD data bit-timing + * + * @return 0 on success or a negative error code + */ +int rtnl_link_can_get_data_bittiming(struct rtnl_link *link, + struct can_bittiming *data_bit_timing) +{ + struct can_info *ci = link->l_info; + + IS_CAN_LINK_ASSERT(link); + if (!data_bit_timing) + return -NLE_INVAL; + + if (ci->ci_mask & CAN_HAS_DATA_BITTIMING) + *data_bit_timing = ci->ci_data_bittiming; + else + return -NLE_AGAIN; + + return 0; +} + +/** + * Set CAN FD device data bit-timing + * @arg link Link object + * @arg data_bit_timing CAN FD data bit-timing + * + * @return 0 on success or a negative error code + */ +int rtnl_link_can_set_data_bittiming(struct rtnl_link *link, + const struct can_bittiming *data_bit_timing) +{ + struct can_info *ci = link->l_info; + + IS_CAN_LINK_ASSERT(link); + if (!data_bit_timing) + return -NLE_INVAL; + + ci->ci_data_bittiming = *data_bit_timing; + ci->ci_mask |= CAN_HAS_DATA_BITTIMING; + + return 0; +} + /** @} */ /** @@ -760,6 +874,9 @@ __ADD(CAN_CTRLMODE_3_SAMPLES, triple-sampling), __ADD(CAN_CTRLMODE_ONE_SHOT, one-shot), __ADD(CAN_CTRLMODE_BERR_REPORTING, berr-reporting), + __ADD(CAN_CTRLMODE_FD, fd), + __ADD(CAN_CTRLMODE_PRESUME_ACK, presume-ack), + __ADD(CAN_CTRLMODE_FD_NON_ISO, fd-non-iso), }; char *rtnl_link_can_ctrlmode2str(int ctrlmode, char *buf, size_t len)
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/dummy.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/dummy.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/dummy.c Dummy Interfaces - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/geneve.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/geneve.c
Changed
@@ -1,12 +1,8 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/geneve.c Geneve Link Info - * 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) 2018 Wang Jian <jianjian.wang1@gmail.com> */ + /** * @ingroup link * @defgroup geneve Geneve @@ -190,16 +186,12 @@ if (geneve->mask & GENEVE_ATTR_REMOTE) { nl_dump(p, " remote "); - if (inet_ntop(AF_INET, &geneve->remote, addr, sizeof(addr))) - nl_dump_line(p, "%s\n", addr); - else - nl_dump_line(p, "%#x\n", ntohs(geneve->remote)); + nl_dump_line(p, "%s\n", + _nl_inet_ntop(AF_INET, &geneve->remote, addr)); } else if (geneve->mask & GENEVE_ATTR_REMOTE6) { nl_dump(p, " remote "); - if (inet_ntop(AF_INET6, &geneve->remote6, addr, sizeof(addr))) - nl_dump_line(p, "%s\n", addr); - else - nl_dump_line(p, "%#x\n", geneve->remote6); + nl_dump_line(p, "%s\n", + _nl_inet_ntop(AF_INET6, &geneve->remote6, addr)); } if (geneve->mask & GENEVE_ATTR_TTL) { @@ -240,7 +232,7 @@ if (geneve->mask & GENEVE_ATTR_UDP_ZERO_CSUM6_RX) { nl_dump(p, " udp-zero-csum6-rx "); - if (geneve->udp_zero_csum6_tx) + if (geneve->udp_zero_csum6_rx) nl_dump_line(p, "enabled (%#x)\n", geneve->udp_zero_csum6_rx); else nl_dump_line(p, "disabled\n"); @@ -356,12 +348,11 @@ struct rtnl_link *rtnl_link_geneve_alloc(void) { struct rtnl_link *link; - int err; if (!(link = rtnl_link_alloc())) return NULL; - if ((err = rtnl_link_set_type(link, "geneve")) < 0) { + if (rtnl_link_set_type(link, "geneve") < 0) { rtnl_link_put(link); return NULL; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/ifb.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/ifb.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/ifb.c IFB Interfaces - * - * 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) 2014 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/inet.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/inet.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/inet.c AF_INET link operations - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/inet6.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/inet6.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/inet6.c AF_INET6 link operations - * - * 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> */ @@ -16,6 +10,7 @@ #include <netlink/route/link/inet6.h> #include <netlink-private/route/link/api.h> +#include "netlink-private/route/utils.h" #include "netlink-private/utils.h" #define I6_ADDR_GEN_MODE_UNKNOWN UINT8_MAX @@ -141,8 +136,11 @@ 33 = RTNL_LINK_IP6_ECT1PKTS, /* IPSTATS_MIB_ECT1PKTS */ 34 = RTNL_LINK_IP6_ECT0PKTS, /* IPSTATS_MIB_ECT0PKTS */ 35 = RTNL_LINK_IP6_CEPKTS, /* IPSTATS_MIB_CEPKTS */ + 36 = RTNL_LINK_REASM_OVERLAPS, /* IPSTATS_MIB_REASM_OVERLAPS */ }; +const uint8_t *const _nltst_map_stat_id_from_IPSTATS_MIB_v2 = map_stat_id_from_IPSTATS_MIB_v2; + static int inet6_parse_protinfo(struct rtnl_link *link, struct nlattr *attr, void *data) { @@ -212,6 +210,9 @@ int i; int len = min_t(int, __ICMP6_MIB_MAX, nla_len(tbIFLA_INET6_ICMP6STATS) / 8); + _NL_STATIC_ASSERT (__ICMP6_MIB_MAX == 6); + _NL_STATIC_ASSERT (RTNL_LINK_ICMP6_CSUMERRORS - RTNL_LINK_ICMP6_INMSGS + 1 == 5); + for (i = 1; i < len; i++) { memcpy(&stat, &cnti * sizeof(stat), sizeof(stat)); rtnl_link_set_stat(link, RTNL_LINK_ICMP6_INMSGS + i - 1, @@ -412,7 +413,7 @@ if (octets) nl_dump(p, "%14.2f %3s ", octets, octetsUnit); else - nl_dump(p, "%16" PRIu64 " B ", 0); + nl_dump(p, "%16u B ", 0); nl_dump(p, "%18" PRIu64 " %18" PRIu64 "\n", link->l_statsRTNL_LINK_IP6_INDISCARDS, @@ -428,7 +429,7 @@ if (octets) nl_dump(p, "%14.2f %3s ", octets, octetsUnit); else - nl_dump(p, "%16" PRIu64 " B ", 0); + nl_dump(p, "%16u B ", 0); nl_dump(p, "%18" PRIu64 " %18" PRIu64 "\n", link->l_statsRTNL_LINK_IP6_OUTDISCARDS, @@ -444,7 +445,7 @@ if (octets) nl_dump(p, "%14.2f %3s ", octets, octetsUnit); else - nl_dump(p, "%16" PRIu64 " B ", 0); + nl_dump(p, "%16u B ", 0); nl_dump(p, "%18" PRIu64 " ", link->l_statsRTNL_LINK_IP6_INBCASTPKTS); octets = nl_cancel_down_bytes(link->l_statsRTNL_LINK_IP6_INBCASTOCTETS, @@ -452,7 +453,7 @@ if (octets) nl_dump(p, "%14.2f %3s\n", octets, octetsUnit); else - nl_dump(p, "%16" PRIu64 " B\n", 0); + nl_dump(p, "%16u B\n", 0); nl_dump(p, " OutMcastPkts OutMcastOctets " " OutBcastPkts OutBcastOctests\n"); @@ -464,7 +465,7 @@ if (octets) nl_dump(p, "%14.2f %3s ", octets, octetsUnit); else - nl_dump(p, "%16" PRIu64 " B ", 0); + nl_dump(p, "%16u B ", 0); nl_dump(p, "%18" PRIu64 " ", link->l_statsRTNL_LINK_IP6_OUTBCASTPKTS); octets = nl_cancel_down_bytes(link->l_statsRTNL_LINK_IP6_OUTBCASTOCTETS, @@ -472,7 +473,7 @@ if (octets) nl_dump(p, "%14.2f %3s\n", octets, octetsUnit); else - nl_dump(p, "%16" PRIu64 " B\n", 0); + nl_dump(p, "%16u B\n", 0); nl_dump(p, " ReasmOKs ReasmFails " " ReasmReqds ReasmTimeout\n");
View file
_service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/ip6gre.c
Added
@@ -0,0 +1,886 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +/** + * @ingroup link + * @defgroup ip6gre IP6GRE + * ip6gre link module + * + * @details + * \b Link Type Name: "ip6gre" + * + * @route_doc{link_ip6gre, IP6GRE Documentation} + * + * @{ + */ + +#include <netlink-private/netlink.h> +#include <netlink/netlink.h> +#include <netlink/attr.h> +#include <netlink/utils.h> +#include <netlink/object.h> +#include <netlink/route/rtnl.h> +#include <netlink/route/link/ip6gre.h> +#include <netlink-private/route/link/api.h> +#include <linux/if_tunnel.h> + +#define IP6GRE_ATTR_LINK (1 << 0) +#define IP6GRE_ATTR_IFLAGS (1 << 1) +#define IP6GRE_ATTR_OFLAGS (1 << 2) +#define IP6GRE_ATTR_IKEY (1 << 3) +#define IP6GRE_ATTR_OKEY (1 << 4) +#define IP6GRE_ATTR_LOCAL (1 << 5) +#define IP6GRE_ATTR_REMOTE (1 << 6) +#define IP6GRE_ATTR_TTL (1 << 7) +#define IP6GRE_ATTR_ENCAPLIMIT (1 << 8) +#define IP6GRE_ATTR_FLOWINFO (1 << 9) +#define IP6GRE_ATTR_FLAGS (1 << 10) +#define IP6GRE_ATTR_FWMARK (1 << 11) + +struct ip6gre_info +{ + uint8_t ttl; + uint8_t encaplimit; + uint16_t iflags; + uint16_t oflags; + uint32_t ikey; + uint32_t okey; + uint32_t link; + uint32_t flowinfo; + uint32_t flags; + struct in6_addr local; + struct in6_addr remote; + uint32_t fwmark; + uint32_t ip6gre_mask; +}; + +static struct nla_policy ip6gre_policyIFLA_GRE_MAX + 1 = { + IFLA_GRE_LINK = { .type = NLA_U32 }, + IFLA_GRE_IFLAGS = { .type = NLA_U16 }, + IFLA_GRE_OFLAGS = { .type = NLA_U16 }, + IFLA_GRE_IKEY = { .type = NLA_U32 }, + IFLA_GRE_OKEY = { .type = NLA_U32 }, + IFLA_GRE_LOCAL = { .minlen = sizeof(struct in6_addr) }, + IFLA_GRE_REMOTE = { .minlen = sizeof(struct in6_addr) }, + IFLA_GRE_TTL = { .type = NLA_U8 }, + IFLA_GRE_ENCAP_LIMIT = { .type = NLA_U8 }, + IFLA_GRE_FLOWINFO = { .type = NLA_U32 }, + IFLA_GRE_FLAGS = { .type = NLA_U32 }, + IFLA_GRE_FWMARK = { .type = NLA_U32 }, +}; + +static int ip6gre_alloc(struct rtnl_link *link) +{ + struct ip6gre_info *ip6gre; + + if (link->l_info) + memset(link->l_info, 0, sizeof(*ip6gre)); + else { + ip6gre = calloc(1, sizeof(*ip6gre)); + if (!ip6gre) + return -NLE_NOMEM; + + link->l_info = ip6gre; + } + + return 0; +} + +static int ip6gre_parse(struct rtnl_link *link, struct nlattr *data, + struct nlattr *xstats) +{ + struct nlattr *tbIFLA_GRE_MAX + 1; + struct ip6gre_info *ip6gre; + int err; + + NL_DBG(3, "Parsing IP6GRE link info\n"); + + err = nla_parse_nested(tb, IFLA_GRE_MAX, data, ip6gre_policy); + if (err < 0) + goto errout; + + err = ip6gre_alloc(link); + if (err < 0) + goto errout; + + ip6gre = link->l_info; + + if (tbIFLA_GRE_LINK) { + ip6gre->link = nla_get_u32(tbIFLA_GRE_LINK); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_LINK; + } + + if (tbIFLA_GRE_IFLAGS) { + ip6gre->iflags = nla_get_u16(tbIFLA_GRE_IFLAGS); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_IFLAGS; + } + + if (tbIFLA_GRE_OFLAGS) { + ip6gre->oflags = nla_get_u16(tbIFLA_GRE_OFLAGS); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_OFLAGS; + } + + if (tbIFLA_GRE_IKEY) { + ip6gre->ikey = nla_get_u32(tbIFLA_GRE_IKEY); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_IKEY; + } + + if (tbIFLA_GRE_OKEY) { + ip6gre->okey = nla_get_u32(tbIFLA_GRE_OKEY); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_OKEY; + } + + if (tbIFLA_GRE_LOCAL) { + nla_memcpy(&ip6gre->local, tbIFLA_GRE_LOCAL, sizeof(struct in6_addr)); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_LOCAL; + } + + if (tbIFLA_GRE_REMOTE) { + nla_memcpy(&ip6gre->remote, tbIFLA_GRE_REMOTE, sizeof(struct in6_addr)); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_REMOTE; + } + + if (tbIFLA_GRE_TTL) { + ip6gre->ttl = nla_get_u8(tbIFLA_GRE_TTL); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_TTL; + } + + if (tbIFLA_GRE_ENCAP_LIMIT) { + ip6gre->encaplimit = nla_get_u8(tbIFLA_GRE_ENCAP_LIMIT); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_ENCAPLIMIT; + } + + if (tbIFLA_GRE_FLOWINFO) { + ip6gre->flowinfo = nla_get_u32(tbIFLA_GRE_FLOWINFO); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_FLOWINFO; + } + + if (tbIFLA_GRE_FLAGS) { + ip6gre->flags = nla_get_u32(tbIFLA_GRE_FLAGS); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_FLAGS; + } + + if (tbIFLA_GRE_FWMARK) { + ip6gre->fwmark = nla_get_u32(tbIFLA_GRE_FWMARK); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_FWMARK; + } + + err = 0; + + errout: + return err; +} + +static int ip6gre_put_attrs(struct nl_msg *msg, struct rtnl_link *link) +{ + struct ip6gre_info *ip6gre = link->l_info; + struct nlattr *data; + + data = nla_nest_start(msg, IFLA_INFO_DATA); + if (!data) + return -NLE_MSGSIZE; + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_LINK) + NLA_PUT_U32(msg, IFLA_GRE_LINK, ip6gre->link); + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_IFLAGS) + NLA_PUT_U16(msg, IFLA_GRE_IFLAGS, ip6gre->iflags); + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_OFLAGS) + NLA_PUT_U16(msg, IFLA_GRE_OFLAGS, ip6gre->oflags); + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_IKEY) + NLA_PUT_U32(msg, IFLA_GRE_IKEY, ip6gre->ikey); + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_OKEY) + NLA_PUT_U32(msg, IFLA_GRE_OKEY, ip6gre->okey); + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_LOCAL) + NLA_PUT(msg, IFLA_GRE_LOCAL, sizeof(struct in6_addr), &ip6gre->local); + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_REMOTE) + NLA_PUT(msg, IFLA_GRE_REMOTE, sizeof(struct in6_addr), &ip6gre->remote); + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_TTL) + NLA_PUT_U8(msg, IFLA_GRE_TTL, ip6gre->ttl); + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_ENCAPLIMIT) + NLA_PUT_U8(msg, IFLA_GRE_ENCAP_LIMIT, ip6gre->encaplimit); + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_FLOWINFO) + NLA_PUT_U32(msg, IFLA_GRE_FLOWINFO, ip6gre->flowinfo); + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_FLAGS) + NLA_PUT_U32(msg, IFLA_GRE_FLAGS, ip6gre->flags); + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_FWMARK) + NLA_PUT_U32(msg, IFLA_GRE_FWMARK, ip6gre->fwmark); + + nla_nest_end(msg, data); + + nla_put_failure: + + return 0; +} + +static void ip6gre_free(struct rtnl_link *link) +{ + struct ip6gre_info *ip6gre = link->l_info; + + free(ip6gre); + link->l_info = NULL; +} + +static void ip6gre_dump_line(struct rtnl_link *link, struct nl_dump_params *p) +{ + nl_dump(p, "ip6gre : %s", link->l_name); +} + +static void ip6gre_dump_details(struct rtnl_link *link, struct nl_dump_params *p) +{ + struct ip6gre_info *ip6gre = link->l_info; + char *name; + char addrINET6_ADDRSTRLEN; + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_LINK) { + nl_dump(p, " link "); + name = rtnl_link_get_name(link); + if (name) + nl_dump_line(p, "%s\n", name); + else + nl_dump_line(p, "%u\n", ip6gre->link); + } + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_IFLAGS) { + nl_dump(p, " iflags "); + nl_dump_line(p, "%x\n", ip6gre->iflags); + } + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_OFLAGS) { + nl_dump(p, " oflags "); + nl_dump_line(p, "%x\n", ip6gre->oflags); + } + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_IKEY) { + nl_dump(p, " ikey "); + nl_dump_line(p, "%x\n",ip6gre->ikey); + } + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_OKEY) { + nl_dump(p, " okey "); + nl_dump_line(p, "%x\n", ip6gre->okey); + } + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_LOCAL) { + nl_dump(p, " local "); + nl_dump_line(p, "%s\n", + _nl_inet_ntop(AF_INET6, &ip6gre->local, addr)); + } + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_REMOTE) { + nl_dump(p, " remote "); + nl_dump_line(p, "%s\n", + _nl_inet_ntop(AF_INET6, &ip6gre->remote, addr)); + } + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_TTL) { + nl_dump(p, " ttl "); + nl_dump_line(p, "%u\n", ip6gre->ttl); + } + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_ENCAPLIMIT) { + nl_dump(p, " encaplimit "); + nl_dump_line(p, "%u\n", ip6gre->encaplimit); + } + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_FLOWINFO) { + nl_dump(p, " flowinfo "); + nl_dump_line(p, "%x\n", ip6gre->flowinfo); + } + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_FLAGS) { + nl_dump(p, " flags "); + nl_dump_line(p, "%x\n", ip6gre->flags); + } + + if (ip6gre->ip6gre_mask & IP6GRE_ATTR_FWMARK) { + nl_dump(p, " fwmark "); + nl_dump_line(p, "%x\n", ip6gre->fwmark); + } +} + +static int ip6gre_clone(struct rtnl_link *dst, struct rtnl_link *src) +{ + struct ip6gre_info *ip6gre_dst, *ip6gre_src = src->l_info; + int err; + + dst->l_info = NULL; + + err = rtnl_link_set_type(dst, "ip6gre"); + if (err < 0) + return err; + + ip6gre_dst = dst->l_info; + + if (!ip6gre_dst || !ip6gre_src) + BUG(); + + memcpy(ip6gre_dst, ip6gre_src, sizeof(struct ip6gre_info)); + + return 0; +} + +static struct rtnl_link_info_ops ip6gre_info_ops = { + .io_name = "ip6gre", + .io_alloc = ip6gre_alloc, + .io_parse = ip6gre_parse, + .io_dump = { + NL_DUMP_LINE = ip6gre_dump_line, + NL_DUMP_DETAILS = ip6gre_dump_details, + }, + .io_clone = ip6gre_clone, + .io_put_attrs = ip6gre_put_attrs, + .io_free = ip6gre_free, +}; + +#define IS_IP6GRE_LINK_ASSERT(link) \ + if ((link)->l_info_ops != &ip6gre_info_ops) { \ + APPBUG("Link is not a ip6gre link. set type \"ip6gre\" first.");\ + return -NLE_OPNOTSUPP; \ + } + +#define HAS_IP6GRE_ATTR_ASSERT(link,attr) \ + if (!((link)->ip6gre_mask & (attr))) \ + return -NLE_NOATTR; + +struct rtnl_link *rtnl_link_ip6gre_alloc(void) +{ + struct rtnl_link *link; + int err; + + link = rtnl_link_alloc(); + if (!link) + return NULL; + + err = rtnl_link_set_type(link, "ip6gre"); + if (err < 0) { + rtnl_link_put(link); + return NULL; + } + + return link; +} + +/** + * Check if link is a IP6GRE link + * @arg link Link object + * + * @return True if link is a IP6GRE link, otherwise 0 is returned. + */ +int rtnl_link_is_ip6gre(struct rtnl_link *link) +{ + return link->l_info_ops && !strcmp(link->l_info_ops->io_name, "ip6gre"); +} + +/** + * Create a new IP6GRE tunnel device + * @arg sock netlink socket + * @arg name name of the tunnel deviceL + * + * Creates a new ip6gre tunnel device in the kernel + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_add(struct nl_sock *sk, const char *name) +{ + struct rtnl_link *link; + int err; + + link = rtnl_link_ip6gre_alloc(); + if (!link) + return -NLE_NOMEM; + + if(name) + rtnl_link_set_name(link, name); + + err = rtnl_link_add(sk, link, NLM_F_CREATE); + rtnl_link_put(link); + + return err; +} + +/** + * Set IP6GRE tunnel interface index + * @arg link Link object + * @arg index interface index + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_set_link(struct rtnl_link *link, uint32_t index) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + ip6gre->link = index; + ip6gre->ip6gre_mask |= IP6GRE_ATTR_LINK; + + return 0; +} + +/** + * Get IP6GRE tunnel interface index + * @arg link Link object + * @arg index addr to fill in with the interface index + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_get_link(struct rtnl_link *link, uint32_t *index) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + HAS_IP6GRE_ATTR_ASSERT(ip6gre, IP6GRE_ATTR_LINK); + + *index = ip6gre->link; + + return 0; +} + +/** + * Set IP6GRE tunnel set iflags + * @arg link Link object + * @arg iflags ip6gre iflags + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_set_iflags(struct rtnl_link *link, uint16_t iflags) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + ip6gre->iflags = iflags; + ip6gre->ip6gre_mask |= IP6GRE_ATTR_IFLAGS; + + return 0; +} + +/** + * Get IP6GRE tunnel iflags + * @arg link Link object + * @arg iflags addr to fill in with the iflags + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_get_iflags(struct rtnl_link *link, uint16_t *iflags) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + HAS_IP6GRE_ATTR_ASSERT(ip6gre, IP6GRE_ATTR_IFLAGS); + + *iflags = ip6gre->iflags; + + return 0; +} + +/** + * Set IP6GRE tunnel set oflags + * @arg link Link object + * @arg oflags ip6gre oflags + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_set_oflags(struct rtnl_link *link, uint16_t oflags) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + ip6gre->oflags = oflags; + ip6gre->ip6gre_mask |= IP6GRE_ATTR_OFLAGS; + + return 0; +} + +/** + * Get IP6GRE tunnel oflags + * @arg link Link object + * @arg oflags addr to fill in with the oflags + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_get_oflags(struct rtnl_link *link, uint16_t *oflags) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + HAS_IP6GRE_ATTR_ASSERT(ip6gre, IP6GRE_ATTR_OFLAGS); + + *oflags = ip6gre->oflags; + + return 0; +} + +/** + * Set IP6GRE tunnel set ikey + * @arg link Link object + * @arg ikey ip6gre ikey + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_set_ikey(struct rtnl_link *link, uint32_t ikey) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + ip6gre->ikey = ikey; + ip6gre->ip6gre_mask |= IP6GRE_ATTR_IKEY; + + return 0; +} + +/** + * Get IP6GRE tunnel ikey + * @arg link Link object + * @arg ikey addr to fill in with the ikey + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_get_ikey(struct rtnl_link *link, uint32_t *ikey) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + HAS_IP6GRE_ATTR_ASSERT(ip6gre, IP6GRE_ATTR_IKEY); + + *ikey = ip6gre->ikey; + + return 0; +} + +/** + * Set IP6GRE tunnel set okey + * @arg link Link object + * @arg okey ip6gre okey + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_set_okey(struct rtnl_link *link, uint32_t okey) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + ip6gre->okey = okey; + ip6gre->ip6gre_mask |= IP6GRE_ATTR_OKEY; + + return 0; +} + +/** + * Get IP6GRE tunnel okey + * @arg link Link object + * @arg okey addr to fill in with the okey + * + * @return okey value + */ +int rtnl_link_ip6gre_get_okey(struct rtnl_link *link, uint32_t *okey) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + HAS_IP6GRE_ATTR_ASSERT(ip6gre, IP6GRE_ATTR_OKEY); + + *okey = ip6gre->okey; + + return 0; +} + +/** + * Set IP6GRE tunnel local address + * @arg link Link object + * @arg local local address + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_set_local(struct rtnl_link *link, struct in6_addr *local) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + memcpy(&ip6gre->local, local, sizeof(struct in6_addr)); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_LOCAL; + + return 0; +} + +/** + * Get IP6GRE tunnel local address + * @arg link Link object + * @arg local addr to fill in with local address + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_get_local(struct rtnl_link *link, struct in6_addr *local) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + HAS_IP6GRE_ATTR_ASSERT(ip6gre, IP6GRE_ATTR_LOCAL); + + memcpy(local, &ip6gre->local, sizeof(struct in6_addr)); + + return 0; +} + +/** + * Set IP6GRE tunnel remote address + * @arg link Link object + * @arg remote remote address + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_set_remote(struct rtnl_link *link, struct in6_addr *remote) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + memcpy(&ip6gre->remote, remote, sizeof(struct in6_addr)); + ip6gre->ip6gre_mask |= IP6GRE_ATTR_REMOTE; + + return 0; +} + +/** + * Get IP6GRE tunnel remote address + * @arg link Link object + * @arg remote addr to fill in with remote address + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_get_remote(struct rtnl_link *link, struct in6_addr *remote) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + HAS_IP6GRE_ATTR_ASSERT(ip6gre, IP6GRE_ATTR_REMOTE); + + memcpy(remote, &ip6gre->remote, sizeof(struct in6_addr)); + + return 0; +} + +/** + * Set IP6GRE tunnel ttl + * @arg link Link object + * @arg ttl tunnel ttl + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_set_ttl(struct rtnl_link *link, uint8_t ttl) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + ip6gre->ttl = ttl; + ip6gre->ip6gre_mask |= IP6GRE_ATTR_TTL; + + return 0; +} + +/** + * Set IP6GRE tunnel ttl + * @arg link Link object + * @arg ttl addr to fill in with the ttl + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_get_ttl(struct rtnl_link *link, uint8_t *ttl) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + HAS_IP6GRE_ATTR_ASSERT(ip6gre, IP6GRE_ATTR_TTL); + + *ttl = ip6gre->ttl; + + return 0; +} + +/** + * Set IP6GRE tunnel encap limit + * @arg link Link object + * @arg encaplimit tunnel encap limit value + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_set_encaplimit(struct rtnl_link *link, uint8_t encaplimit) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + ip6gre->encaplimit = encaplimit; + ip6gre->ip6gre_mask |= IP6GRE_ATTR_ENCAPLIMIT; + + return 0; +} + +/** + * Get IP6GRE tunnel encap limit + * @arg link Link object + * @arg encaplimit addr to fill in with the encaplimit + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_get_encaplimit(struct rtnl_link *link, uint8_t *encaplimit) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + HAS_IP6GRE_ATTR_ASSERT(ip6gre, IP6GRE_ATTR_ENCAPLIMIT); + + *encaplimit = ip6gre->encaplimit; + + return 0; +} + +/** + * Set IP6GRE tunnel flowinfo + * @arg link Link object + * @arg flowinfo flowinfo value + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_set_flowinfo(struct rtnl_link *link, uint32_t flowinfo) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + ip6gre->flowinfo = flowinfo; + ip6gre->ip6gre_mask |= IP6GRE_ATTR_FLOWINFO; + + return 0; +} + +/** + * Get IP6GRE flowinfo + * @arg link Link object + * @arg flowinfo addr to fill in with the flowinfo + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_get_flowinfo(struct rtnl_link *link, uint32_t *flowinfo) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + HAS_IP6GRE_ATTR_ASSERT(ip6gre, IP6GRE_ATTR_FLOWINFO); + + *flowinfo = ip6gre->flowinfo; + + return 0; +} + +/** + * Set IP6GRE tunnel flags + * @arg link Link object + * @arg flags tunnel flags + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_set_flags(struct rtnl_link *link, uint32_t flags) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + ip6gre->flags = flags; + ip6gre->ip6gre_mask |= IP6GRE_ATTR_FLAGS; + + return 0; +} + +/** + * Get IP6GRE flags + * @arg link Link object + * @arg flags addr to fill in with the tunnel flags + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_get_flags(struct rtnl_link *link, uint32_t *flags) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + HAS_IP6GRE_ATTR_ASSERT(ip6gre, IP6GRE_ATTR_FLAGS); + + *flags = ip6gre->flags; + + return 0; +} + +/** + * Set IP6GRE tunnel fwmark + * @arg link Link object + * @arg fwmark fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_set_fwmark(struct rtnl_link *link, uint32_t fwmark) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + ip6gre->fwmark = fwmark; + ip6gre->ip6gre_mask |= IP6GRE_ATTR_FWMARK; + + return 0; +} + +/** + * Get IP6GRE tunnel fwmark + * @arg link Link object + * @arg fwmark addr to fill in with the fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6gre_get_fwmark(struct rtnl_link *link, uint32_t *fwmark) +{ + struct ip6gre_info *ip6gre = link->l_info; + + IS_IP6GRE_LINK_ASSERT(link); + + HAS_IP6GRE_ATTR_ASSERT(ip6gre, IP6GRE_ATTR_FWMARK); + + *fwmark = ip6gre->fwmark; + + return 0; +} + +static void __init ip6gre_init(void) +{ + rtnl_link_register_info(&ip6gre_info_ops); +} + +static void __exit ip6gre_exit(void) +{ + rtnl_link_unregister_info(&ip6gre_info_ops); +}
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/ip6tnl.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/ip6tnl.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/ip6tnl.c IP6TNL Link Info - * - * 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) 2014 Susant Sahani <susant@redhat.com> */ @@ -42,6 +36,7 @@ #define IP6_TNL_ATTR_FLAGS (1 << 6) #define IP6_TNL_ATTR_PROTO (1 << 7) #define IP6_TNL_ATTR_FLOWINFO (1 << 8) +#define IP6_TNL_ATTR_FWMARK (1 << 9) struct ip6_tnl_info { @@ -54,6 +49,7 @@ uint32_t flowinfo; struct in6_addr local; struct in6_addr remote; + uint32_t fwmark; uint32_t ip6_tnl_mask; }; @@ -67,6 +63,7 @@ IFLA_IPTUN_FLOWINFO = { .type = NLA_U32 }, IFLA_IPTUN_FLAGS = { .type = NLA_U32 }, IFLA_IPTUN_PROTO = { .type = NLA_U8 }, + IFLA_IPTUN_FWMARK = { .type = NLA_U32 }, }; static int ip6_tnl_alloc(struct rtnl_link *link) @@ -150,6 +147,11 @@ ip6_tnl->ip6_tnl_mask |= IP6_TNL_ATTR_PROTO; } + if (tbIFLA_IPTUN_FWMARK) { + ip6_tnl->fwmark = nla_get_u32(tbIFLA_IPTUN_FWMARK); + ip6_tnl->ip6_tnl_mask |= IP6_TNL_ATTR_FWMARK; + } + err = 0; errout: @@ -195,6 +197,9 @@ else NLA_PUT_U8(msg, IFLA_IPTUN_PROTO, 0); + if (ip6_tnl->ip6_tnl_mask & IP6_TNL_ATTR_FWMARK) + NLA_PUT_U32(msg, IFLA_IPTUN_FWMARK, ip6_tnl->fwmark); + nla_nest_end(msg, data); nla_put_failure: @@ -236,20 +241,14 @@ if (ip6_tnl->ip6_tnl_mask & IP6_TNL_ATTR_LOCAL) { nl_dump(p, " local "); - - if(inet_ntop(AF_INET6, &ip6_tnl->local, addr, INET6_ADDRSTRLEN)) - nl_dump_line(p, "%s\n", addr); - else - nl_dump_line(p, "%#x\n", ip6_tnl->local); + nl_dump_line(p, "%s\n", + _nl_inet_ntop(AF_INET6, &ip6_tnl->local, addr)); } if (ip6_tnl->ip6_tnl_mask & IP6_TNL_ATTR_REMOTE) { nl_dump(p, " remote "); - - if(inet_ntop(AF_INET6, &ip6_tnl->remote, addr, INET6_ADDRSTRLEN)) - nl_dump_line(p, "%s\n", addr); - else - nl_dump_line(p, "%#x\n", ip6_tnl->remote); + nl_dump_line(p, "%s\n", + _nl_inet_ntop(AF_INET6, &ip6_tnl->remote, addr)); } if (ip6_tnl->ip6_tnl_mask & IP6_TNL_ATTR_TTL) { @@ -281,6 +280,11 @@ nl_dump(p, " proto "); nl_dump_line(p, " (%x)\n", ip6_tnl->proto); } + + if (ip6_tnl->ip6_tnl_mask & IP6_TNL_ATTR_FWMARK) { + nl_dump(p, " fwmark "); + nl_dump_line(p, "%x\n", ip6_tnl->fwmark); + } } static int ip6_tnl_clone(struct rtnl_link *dst, struct rtnl_link *src) @@ -688,6 +692,46 @@ return ip6_tnl->proto; } +/** + * Set IP6_TNL tunnel fwmark + * @arg link Link object + * @arg fwmark fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6_tnl_set_fwmark(struct rtnl_link *link, uint32_t fwmark) +{ + struct ip6_tnl_info *ip6_tnl = link->l_info; + + IS_IP6_TNL_LINK_ASSERT(link); + + ip6_tnl->fwmark = fwmark; + ip6_tnl->ip6_tnl_mask |= IP6_TNL_ATTR_FWMARK; + + return 0; +} + +/** + * Get IP6_TNL tunnel fwmark + * @arg link Link object + * @arg fwmark addr to fill in with the fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6_tnl_get_fwmark(struct rtnl_link *link, uint32_t *fwmark) +{ + struct ip6_tnl_info *ip6_tnl = link->l_info; + + IS_IP6_TNL_LINK_ASSERT(link); + + if (!(ip6_tnl->ip6_tnl_mask & IP6_TNL_ATTR_FWMARK)) + return -NLE_NOATTR; + + *fwmark = ip6_tnl->fwmark; + + return 0; +} + static void __init ip6_tnl_init(void) { rtnl_link_register_info(&ip6_tnl_info_ops);
View file
_service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/ip6vti.c
Added
@@ -0,0 +1,554 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +/** + * @ingroup link + * @defgroup ip6vti IP6VTI + * ip6vti link module + * + * @details + * \b Link Type Name: "vti6" + * + * @route_doc{link_ip6vti, IP6VTI Documentation} + * + * @{ + */ + +#include <netlink-private/netlink.h> +#include <netlink/netlink.h> +#include <netlink/attr.h> +#include <netlink/utils.h> +#include <netlink/object.h> +#include <netlink/route/rtnl.h> +#include <netlink/route/link/ip6vti.h> +#include <netlink-private/route/link/api.h> +#include <linux/if_tunnel.h> + +#define IP6VTI_ATTR_LINK (1 << 0) +#define IP6VTI_ATTR_IKEY (1 << 1) +#define IP6VTI_ATTR_OKEY (1 << 2) +#define IP6VTI_ATTR_LOCAL (1 << 3) +#define IP6VTI_ATTR_REMOTE (1 << 4) +#define IP6VTI_ATTR_FWMARK (1 << 5) + +struct ip6vti_info +{ + uint32_t link; + uint32_t ikey; + uint32_t okey; + struct in6_addr local; + struct in6_addr remote; + uint32_t fwmark; + uint32_t ip6vti_mask; +}; + +static struct nla_policy ip6vti_policyIFLA_VTI_MAX + 1 = { + IFLA_VTI_LINK = { .type = NLA_U32 }, + IFLA_VTI_IKEY = { .type = NLA_U32 }, + IFLA_VTI_OKEY = { .type = NLA_U32 }, + IFLA_VTI_LOCAL = { .minlen = sizeof(struct in6_addr) }, + IFLA_VTI_REMOTE = { .minlen = sizeof(struct in6_addr) }, + IFLA_VTI_FWMARK = { .type = NLA_U32 }, +}; + +static int ip6vti_alloc(struct rtnl_link *link) +{ + struct ip6vti_info *ip6vti; + + if (link->l_info) + memset(link->l_info, 0, sizeof(*ip6vti)); + else { + ip6vti = calloc(1, sizeof(*ip6vti)); + if (!ip6vti) + return -NLE_NOMEM; + + link->l_info = ip6vti; + } + + return 0; +} + +static int ip6vti_parse(struct rtnl_link *link, struct nlattr *data, + struct nlattr *xstats) +{ + struct nlattr *tbIFLA_VTI_MAX + 1; + struct ip6vti_info *ip6vti; + int err; + + NL_DBG(3, "Parsing IP6VTI link info\n"); + + err = nla_parse_nested(tb, IFLA_VTI_MAX, data, ip6vti_policy); + if (err < 0) + goto errout; + + err = ip6vti_alloc(link); + if (err < 0) + goto errout; + + ip6vti = link->l_info; + + if (tbIFLA_VTI_LINK) { + ip6vti->link = nla_get_u32(tbIFLA_VTI_LINK); + ip6vti->ip6vti_mask |= IP6VTI_ATTR_LINK; + } + + if (tbIFLA_VTI_IKEY) { + ip6vti->ikey = nla_get_u32(tbIFLA_VTI_IKEY); + ip6vti->ip6vti_mask |= IP6VTI_ATTR_IKEY; + } + + if (tbIFLA_VTI_OKEY) { + ip6vti->okey = nla_get_u32(tbIFLA_VTI_OKEY); + ip6vti->ip6vti_mask |= IP6VTI_ATTR_OKEY; + } + + if (tbIFLA_VTI_LOCAL) { + nla_memcpy(&ip6vti->local, tbIFLA_VTI_LOCAL, sizeof(struct in6_addr)); + ip6vti->ip6vti_mask |= IP6VTI_ATTR_LOCAL; + } + + if (tbIFLA_VTI_REMOTE) { + nla_memcpy(&ip6vti->remote, tbIFLA_VTI_REMOTE, sizeof(struct in6_addr)); + ip6vti->ip6vti_mask |= IP6VTI_ATTR_REMOTE; + } + + if (tbIFLA_VTI_FWMARK) { + ip6vti->fwmark = nla_get_u32(tbIFLA_VTI_FWMARK); + ip6vti->ip6vti_mask |= IP6VTI_ATTR_FWMARK; + } + + err = 0; + + errout: + return err; +} + +static int ip6vti_put_attrs(struct nl_msg *msg, struct rtnl_link *link) +{ + struct ip6vti_info *ip6vti = link->l_info; + struct nlattr *data; + + data = nla_nest_start(msg, IFLA_INFO_DATA); + if (!data) + return -NLE_MSGSIZE; + + if (ip6vti->ip6vti_mask & IP6VTI_ATTR_LINK) + NLA_PUT_U32(msg, IFLA_VTI_LINK, ip6vti->link); + + if (ip6vti->ip6vti_mask & IP6VTI_ATTR_IKEY) + NLA_PUT_U32(msg, IFLA_VTI_IKEY, ip6vti->ikey); + + if (ip6vti->ip6vti_mask & IP6VTI_ATTR_OKEY) + NLA_PUT_U32(msg, IFLA_VTI_OKEY, ip6vti->okey); + + if (ip6vti->ip6vti_mask & IP6VTI_ATTR_LOCAL) + NLA_PUT(msg, IFLA_VTI_LOCAL, sizeof(struct in6_addr), &ip6vti->local); + + if (ip6vti->ip6vti_mask & IP6VTI_ATTR_REMOTE) + NLA_PUT(msg, IFLA_VTI_REMOTE, sizeof(struct in6_addr), &ip6vti->remote); + + if (ip6vti->ip6vti_mask & IP6VTI_ATTR_FWMARK) + NLA_PUT_U32(msg, IFLA_VTI_FWMARK, ip6vti->fwmark); + + nla_nest_end(msg, data); + +nla_put_failure: + + return 0; +} + +static void ip6vti_free(struct rtnl_link *link) +{ + struct ip6vti_info *ip6vti = link->l_info; + + free(ip6vti); + link->l_info = NULL; +} + +static void ip6vti_dump_line(struct rtnl_link *link, struct nl_dump_params *p) +{ + nl_dump(p, "ip6vti : %s", link->l_name); +} + +static void ip6vti_dump_details(struct rtnl_link *link, struct nl_dump_params *p) +{ + struct ip6vti_info *ip6vti = link->l_info; + char *name; + char addrINET6_ADDRSTRLEN; + + if (ip6vti->ip6vti_mask & IP6VTI_ATTR_LINK) { + nl_dump(p, " link "); + name = rtnl_link_get_name(link); + if (name) + nl_dump_line(p, "%s\n", name); + else + nl_dump_line(p, "%u\n", ip6vti->link); + } + + if (ip6vti->ip6vti_mask & IP6VTI_ATTR_IKEY) { + nl_dump(p, " ikey "); + nl_dump_line(p, "%x\n",ip6vti->ikey); + } + + if (ip6vti->ip6vti_mask & IP6VTI_ATTR_OKEY) { + nl_dump(p, " okey "); + nl_dump_line(p, "%x\n", ip6vti->okey); + } + + if (ip6vti->ip6vti_mask & IP6VTI_ATTR_LOCAL) { + nl_dump(p, " local "); + nl_dump_line(p, "%s\n", + _nl_inet_ntop(AF_INET6, &ip6vti->local, addr)); + } + + if (ip6vti->ip6vti_mask & IP6VTI_ATTR_REMOTE) { + nl_dump(p, " remote "); + nl_dump_line(p, "%s\n", + _nl_inet_ntop(AF_INET6, &ip6vti->remote, addr)); + } + + if (ip6vti->ip6vti_mask & IP6VTI_ATTR_FWMARK) { + nl_dump(p, " fwmark "); + nl_dump_line(p, "%x\n", ip6vti->fwmark); + } +} + +static int ip6vti_clone(struct rtnl_link *dst, struct rtnl_link *src) +{ + struct ip6vti_info *ip6vti_dst, *ip6vti_src = src->l_info; + int err; + + dst->l_info = NULL; + + err = rtnl_link_set_type(dst, "vti6"); + if (err < 0) + return err; + + ip6vti_dst = dst->l_info; + + if (!ip6vti_dst || !ip6vti_src) + BUG(); + + memcpy(ip6vti_dst, ip6vti_src, sizeof(struct ip6vti_info)); + + return 0; +} + +static struct rtnl_link_info_ops ip6vti_info_ops = { + .io_name = "vti6", + .io_alloc = ip6vti_alloc, + .io_parse = ip6vti_parse, + .io_dump = { + NL_DUMP_LINE = ip6vti_dump_line, + NL_DUMP_DETAILS = ip6vti_dump_details, + }, + .io_clone = ip6vti_clone, + .io_put_attrs = ip6vti_put_attrs, + .io_free = ip6vti_free, +}; + +#define IS_IP6VTI_LINK_ASSERT(link) \ + if ((link)->l_info_ops != &ip6vti_info_ops) { \ + APPBUG("Link is not a ip6vti link. set type \"vti6\" first."); \ + return -NLE_OPNOTSUPP; \ + } + +#define HAS_IP6VTI_ATTR_ASSERT(ip6vti,attr) \ + if (!((ip6vti)->ip6vti_mask & (attr))) \ + return -NLE_NOATTR; + +struct rtnl_link *rtnl_link_ip6vti_alloc(void) +{ + struct rtnl_link *link; + int err; + + link = rtnl_link_alloc(); + if (!link) + return NULL; + + err = rtnl_link_set_type(link, "vti6"); + if (err < 0) { + rtnl_link_put(link); + return NULL; + } + + return link; +} + +/** + * Check if link is a IP6VTI link + * @arg link Link object + * + * @return True if link is a IP6VTI link, otherwise 0 is returned. + */ +int rtnl_link_is_ip6vti(struct rtnl_link *link) +{ + return link->l_info_ops && !strcmp(link->l_info_ops->io_name, "vti6"); +} +/** + * Create a new vti6 tunnel device + * @arg sock netlink socket + * @arg name name of the tunnel deviceL + * + * Creates a new vti6 tunnel device in the kernel + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_add(struct nl_sock *sk, const char *name) +{ + struct rtnl_link *link; + int err; + + link = rtnl_link_ip6vti_alloc(); + if (!link) + return -NLE_NOMEM; + + if(name) + rtnl_link_set_name(link, name); + + err = rtnl_link_add(sk, link, NLM_F_CREATE); + rtnl_link_put(link); + + return err; +} +/** + * Set IP6VTI tunnel interface index + * @arg link Link object + * @arg index interface index + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_set_link(struct rtnl_link *link, uint32_t index) +{ + struct ip6vti_info *ip6vti = link->l_info; + + IS_IP6VTI_LINK_ASSERT(link); + + ip6vti->link = index; + ip6vti->ip6vti_mask |= IP6VTI_ATTR_LINK; + + return 0; +} + +/** + * Get IP6VTI tunnel interface index + * @arg link Link object + * @arg index addr to fill in with the interface index + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_get_link(struct rtnl_link *link, uint32_t *index) +{ + struct ip6vti_info *ip6vti = link->l_info; + + IS_IP6VTI_LINK_ASSERT(link); + + HAS_IP6VTI_ATTR_ASSERT(ip6vti, IP6VTI_ATTR_LINK); + + *index = ip6vti->link; + + return 0; +} + +/** + * Set IP6VTI tunnel set ikey + * @arg link Link object + * @arg ikey gre ikey + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_set_ikey(struct rtnl_link *link, uint32_t ikey) +{ + struct ip6vti_info *ip6vti = link->l_info; + + IS_IP6VTI_LINK_ASSERT(link); + + ip6vti->ikey = ikey; + ip6vti->ip6vti_mask |= IP6VTI_ATTR_IKEY; + + return 0; +} + +/** + * Get IP6VTI tunnel ikey + * @arg link Link object + * @arg ikey addr to fill in with the ikey + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_get_ikey(struct rtnl_link *link, uint32_t *ikey) +{ + struct ip6vti_info *ip6vti = link->l_info; + + IS_IP6VTI_LINK_ASSERT(link); + + HAS_IP6VTI_ATTR_ASSERT(ip6vti, IP6VTI_ATTR_IKEY); + + *ikey = ip6vti->ikey; + + return 0; +} + +/** + * Set IP6VTI tunnel set okey + * @arg link Link object + * @arg okey gre okey + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_set_okey(struct rtnl_link *link, uint32_t okey) +{ + struct ip6vti_info *ip6vti = link->l_info; + + IS_IP6VTI_LINK_ASSERT(link); + + ip6vti->okey = okey; + ip6vti->ip6vti_mask |= IP6VTI_ATTR_OKEY; + + return 0; +} + +/** + * Get IP6VTI tunnel okey + * @arg link Link object + * @arg okey addr to fill in with the okey + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_get_okey(struct rtnl_link *link, uint32_t *okey) +{ + struct ip6vti_info *ip6vti = link->l_info; + + IS_IP6VTI_LINK_ASSERT(link); + + HAS_IP6VTI_ATTR_ASSERT(ip6vti, IP6VTI_ATTR_OKEY); + + *okey = ip6vti->okey; + + return 0; +} + +/** + * Set IP6VTI tunnel local address + * @arg link Link object + * @arg local local address + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_set_local(struct rtnl_link *link, struct in6_addr *local) +{ + struct ip6vti_info *ip6vti = link->l_info; + + IS_IP6VTI_LINK_ASSERT(link); + + memcpy(&ip6vti->local, local, sizeof(struct in6_addr)); + ip6vti->ip6vti_mask |= IP6VTI_ATTR_LOCAL; + + return 0; +} + +/** + * Get IP6VTI tunnel local address + * @arg link Link object + * @arg local addr to fill in with remote address + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_get_local(struct rtnl_link *link, struct in6_addr *local) +{ + struct ip6vti_info *ip6vti = link->l_info; + + IS_IP6VTI_LINK_ASSERT(link); + + HAS_IP6VTI_ATTR_ASSERT(ip6vti, IP6VTI_ATTR_LOCAL); + + memcpy(local, &ip6vti->local, sizeof(struct in6_addr)); + + return 0; +} + +/** + * Set IP6VTI tunnel remote address + * @arg link Link object + * @arg remote remote address + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_set_remote(struct rtnl_link *link, struct in6_addr *remote) +{ + struct ip6vti_info *ip6vti = link->l_info; + + IS_IP6VTI_LINK_ASSERT(link); + + memcpy(&ip6vti->remote, remote, sizeof(struct in6_addr)); + ip6vti->ip6vti_mask |= IP6VTI_ATTR_REMOTE; + + return 0; +} + +/** + * Get IP6VTI tunnel remote address + * @arg link Link object + * @arg remote addr to fill in with remote address + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_get_remote(struct rtnl_link *link, struct in6_addr *remote) +{ + struct ip6vti_info *ip6vti = link->l_info; + + IS_IP6VTI_LINK_ASSERT(link); + + HAS_IP6VTI_ATTR_ASSERT(ip6vti, IP6VTI_ATTR_REMOTE); + + memcpy(remote, &ip6vti->remote, sizeof(struct in6_addr)); + + return 0; +} + +/** + * Set IP6VTI tunnel fwmark + * @arg link Link object + * @arg fwmark fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_set_fwmark(struct rtnl_link *link, uint32_t fwmark) +{ + struct ip6vti_info *ip6vti = link->l_info; + + IS_IP6VTI_LINK_ASSERT(link); + + ip6vti->fwmark = fwmark; + ip6vti->ip6vti_mask |= IP6VTI_ATTR_FWMARK; + + return 0; +} + +/** + * Get IP6VTI tunnel fwmark + * @arg link Link object + * @arg fwmark addr to fill in with the fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ip6vti_get_fwmark(struct rtnl_link *link, uint32_t *fwmark) +{ + struct ip6vti_info *ip6vti = link->l_info; + + IS_IP6VTI_LINK_ASSERT(link); + + HAS_IP6VTI_ATTR_ASSERT(ip6vti, IP6VTI_ATTR_FWMARK); + + *fwmark = ip6vti->fwmark; + + return 0; +} + +static void __init ip6vti_init(void) +{ + rtnl_link_register_info(&ip6vti_info_ops); +} + +static void __exit ip6vti_exit(void) +{ + rtnl_link_unregister_info(&ip6vti_info_ops); +}
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/ipgre.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/ipgre.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/ipgre.c IPGRE Link Info - * - * 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) 2014 Susant Sahani <susant@redhat.com> */ @@ -42,6 +36,7 @@ #define IPGRE_ATTR_TTL (1 << 7) #define IPGRE_ATTR_TOS (1 << 8) #define IPGRE_ATTR_PMTUDISC (1 << 9) +#define IPGRE_ATTR_FWMARK (1 << 10) struct ipgre_info { @@ -55,6 +50,7 @@ uint32_t link; uint32_t local; uint32_t remote; + uint32_t fwmark; uint32_t ipgre_mask; }; @@ -69,6 +65,7 @@ IFLA_GRE_TTL = { .type = NLA_U8 }, IFLA_GRE_TOS = { .type = NLA_U8 }, IFLA_GRE_PMTUDISC = { .type = NLA_U8 }, + IFLA_GRE_FWMARK = { .type = NLA_U32 }, }; static int ipgre_alloc(struct rtnl_link *link) @@ -157,6 +154,11 @@ ipgre->ipgre_mask |= IPGRE_ATTR_PMTUDISC; } + if (tbIFLA_GRE_FWMARK) { + ipgre->fwmark = nla_get_u32(tbIFLA_GRE_FWMARK); + ipgre->ipgre_mask |= IPGRE_ATTR_FWMARK; + } + err = 0; errout: @@ -202,6 +204,9 @@ if (ipgre->ipgre_mask & IPGRE_ATTR_PMTUDISC) NLA_PUT_U8(msg, IFLA_GRE_PMTUDISC, ipgre->pmtudisc); + if (ipgre->ipgre_mask & IPGRE_ATTR_FWMARK) + NLA_PUT_U32(msg, IFLA_GRE_FWMARK, ipgre->fwmark); + nla_nest_end(msg, data); nla_put_failure: @@ -292,6 +297,11 @@ nl_dump(p, " pmtudisc "); nl_dump_line(p, "enabled (%#x)\n", ipgre->pmtudisc); } + + if (ipgre->ipgre_mask & IPGRE_ATTR_FWMARK) { + nl_dump(p, " fwmark "); + nl_dump_line(p, "%x\n", ipgre->fwmark); + } } static int ipgre_clone(struct rtnl_link *dst, struct rtnl_link *src) @@ -829,6 +839,46 @@ return rtnl_link_ipgre_get_pmtudisc (link); } +/** + * Set IPGRE tunnel fwmark + * @arg link Link object + * @arg fwmark fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ipgre_set_fwmark(struct rtnl_link *link, uint32_t fwmark) +{ + struct ipgre_info *ipgre = link->l_info; + + IS_IPGRE_LINK_ASSERT(link); + + ipgre->fwmark = fwmark; + ipgre->ipgre_mask |= IPGRE_ATTR_FWMARK; + + return 0; +} + +/** + * Get IPGRE tunnel fwmark + * @arg link Link object + * @arg fwmark addr to fill in with the fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ipgre_get_fwmark(struct rtnl_link *link, uint32_t *fwmark) +{ + struct ipgre_info *ipgre = link->l_info; + + IS_IPGRE_LINK_ASSERT(link); + + if (!(ipgre->ipgre_mask & IPGRE_ATTR_FWMARK)) + return -NLE_NOATTR; + + *fwmark = ipgre->fwmark; + + return 0; +} + static void __init ipgre_init(void) { rtnl_link_register_info(&ipgre_info_ops);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/ipip.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/ipip.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/ipip.c IPIP Link Info - * - * 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) 2014 Susant Sahani <susant@redhat.com> */ @@ -38,6 +32,7 @@ #define IPIP_ATTR_TTL (1 << 3) #define IPIP_ATTR_TOS (1 << 4) #define IPIP_ATTR_PMTUDISC (1 << 5) +#define IPIP_ATTR_FWMARK (1 << 6) struct ipip_info { @@ -47,6 +42,7 @@ uint32_t link; uint32_t local; uint32_t remote; + uint32_t fwmark; uint32_t ipip_mask; }; @@ -57,6 +53,7 @@ IFLA_IPTUN_TTL = { .type = NLA_U8 }, IFLA_IPTUN_TOS = { .type = NLA_U8 }, IFLA_IPTUN_PMTUDISC = { .type = NLA_U8 }, + IFLA_IPTUN_FWMARK = { .type = NLA_U32 }, }; static int ipip_alloc(struct rtnl_link *link) @@ -125,6 +122,11 @@ ipip->ipip_mask |= IPIP_ATTR_PMTUDISC; } + if (tbIFLA_IPTUN_FWMARK) { + ipip->fwmark = nla_get_u32(tbIFLA_IPTUN_FWMARK); + ipip->ipip_mask |= IPIP_ATTR_FWMARK; + } + err = 0; errout: @@ -158,6 +160,9 @@ if (ipip->ipip_mask & IPIP_ATTR_PMTUDISC) NLA_PUT_U8(msg, IFLA_IPTUN_PMTUDISC, ipip->pmtudisc); + if (ipip->ipip_mask & IPIP_ATTR_FWMARK) + NLA_PUT_U32(msg, IFLA_IPTUN_FWMARK, ipip->fwmark); + nla_nest_end(msg, data); nla_put_failure: @@ -227,6 +232,11 @@ nl_dump(p, " pmtudisc "); nl_dump_line(p, "enabled (%#x)\n", ipip->pmtudisc); } + + if (ipip->ipip_mask & IPIP_ATTR_FWMARK) { + nl_dump(p, " fwmark "); + nl_dump_line(p, "%x\n", ipip->fwmark); + } } static int ipip_clone(struct rtnl_link *dst, struct rtnl_link *src) @@ -528,6 +538,46 @@ return ipip->pmtudisc; } +/** + * Set IPIP tunnel fwmark + * @arg link Link object + * @arg fwmark fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ipip_set_fwmark(struct rtnl_link *link, uint32_t fwmark) +{ + struct ipip_info *ipip = link->l_info; + + IS_IPIP_LINK_ASSERT(link); + + ipip->fwmark = fwmark; + ipip->ipip_mask |= IPIP_ATTR_FWMARK; + + return 0; +} + +/** + * Get IPIP tunnel fwmark + * @arg link Link object + * @arg fwmark addr to fill in with the fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ipip_get_fwmark(struct rtnl_link *link, uint32_t *fwmark) +{ + struct ipip_info *ipip = link->l_info; + + IS_IPIP_LINK_ASSERT(link); + + if (!(ipip->ipip_mask & IPIP_ATTR_FWMARK)) + return -NLE_NOATTR; + + *fwmark = ipip->fwmark; + + return 0; +} + static void __init ipip_init(void) { rtnl_link_register_info(&ipip_info_ops);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/ipvlan.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/ipvlan.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/ipvlan.c IPVLAN Link Info - * - * 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) 2015 Cong Wang <cwang@twopensource.com> */ @@ -178,12 +172,11 @@ struct rtnl_link *rtnl_link_ipvlan_alloc(void) { struct rtnl_link *link; - int err; if (!(link = rtnl_link_alloc())) return NULL; - if ((err = rtnl_link_set_type(link, "ipvlan")) < 0) { + if (rtnl_link_set_type(link, "ipvlan") < 0) { rtnl_link_put(link); return NULL; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/ipvti.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/ipvti.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/ipvti.c IPVTI Link Info - * - * 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) 2014 Susant Sahani <susant@redhat.com> */ @@ -37,6 +31,7 @@ #define IPVTI_ATTR_OKEY (1 << 2) #define IPVTI_ATTR_LOCAL (1 << 3) #define IPVTI_ATTR_REMOTE (1 << 4) +#define IPVTI_ATTR_FWMARK (1 << 5) struct ipvti_info { @@ -45,6 +40,7 @@ uint32_t okey; uint32_t local; uint32_t remote; + uint32_t fwmark; uint32_t ipvti_mask; }; @@ -54,6 +50,7 @@ IFLA_VTI_OKEY = { .type = NLA_U32 }, IFLA_VTI_LOCAL = { .type = NLA_U32 }, IFLA_VTI_REMOTE = { .type = NLA_U32 }, + IFLA_VTI_FWMARK = { .type = NLA_U32 }, }; static int ipvti_alloc(struct rtnl_link *link) @@ -117,6 +114,11 @@ ipvti->ipvti_mask |= IPVTI_ATTR_REMOTE; } + if (tbIFLA_VTI_FWMARK) { + ipvti->fwmark = nla_get_u32(tbIFLA_VTI_FWMARK); + ipvti->ipvti_mask |= IPVTI_ATTR_FWMARK; + } + err = 0; errout: @@ -147,6 +149,9 @@ if (ipvti->ipvti_mask & IPVTI_ATTR_REMOTE) NLA_PUT_U32(msg, IFLA_VTI_REMOTE, ipvti->remote); + if (ipvti->ipvti_mask & IPVTI_ATTR_FWMARK) + NLA_PUT_U32(msg, IFLA_VTI_FWMARK, ipvti->fwmark); + nla_nest_end(msg, data); nla_put_failure: @@ -212,6 +217,11 @@ else nl_dump_line(p, "%#x\n", ntohs(ipvti->remote)); } + + if (ipvti->ipvti_mask & IPVTI_ATTR_FWMARK) { + nl_dump(p, " fwmark "); + nl_dump_line(p, "%x\n", ipvti->fwmark); + } } static int ipvti_clone(struct rtnl_link *dst, struct rtnl_link *src) @@ -477,6 +487,46 @@ return ipvti->remote; } +/** + * Set IPVTI tunnel fwmark + * @arg link Link object + * @arg fwmark fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ipvti_set_fwmark(struct rtnl_link *link, uint32_t fwmark) +{ + struct ipvti_info *ipvti = link->l_info; + + IS_IPVTI_LINK_ASSERT(link); + + ipvti->fwmark = fwmark; + ipvti->ipvti_mask |= IPVTI_ATTR_FWMARK; + + return 0; +} + +/** + * Get IPVTI tunnel fwmark + * @arg link Link object + * @arg fwmark addr to fill in with the fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_ipvti_get_fwmark(struct rtnl_link *link, uint32_t *fwmark) +{ + struct ipvti_info *ipvti = link->l_info; + + IS_IPVTI_LINK_ASSERT(link); + + if (!(ipvti->ipvti_mask & IPVTI_ATTR_FWMARK)) + return -NLE_NOATTR; + + *fwmark = ipvti->fwmark; + + return 0; +} + static void __init ipvti_init(void) { rtnl_link_register_info(&ipvti_info_ops);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/macsec.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/macsec.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/macsec.c MACsec Link Info - * - * 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) 2016 Sabrina Dubroca <sd@queasysnail.net> */ @@ -47,6 +41,7 @@ #define MACSEC_ATTR_REPLAY_PROTECT (1 << 10) #define MACSEC_ATTR_VALIDATION (1 << 11) #define MACSEC_ATTR_PORT (1 << 12) +#define MACSEC_ATTR_OFFLOAD (1 << 13) struct macsec_info { int ifindex; @@ -58,7 +53,7 @@ enum macsec_validation_type validate; uint8_t encoding_sa; - uint8_t send_sci, end_station, scb, replay_protect, protect, encrypt; + uint8_t send_sci, end_station, scb, replay_protect, protect, encrypt, offload; uint32_t ce_mask; }; @@ -80,6 +75,7 @@ IFLA_MACSEC_SCB = { .type = NLA_U8 }, IFLA_MACSEC_REPLAY_PROTECT = { .type = NLA_U8 }, IFLA_MACSEC_VALIDATION = { .type = NLA_U8 }, + IFLA_MACSEC_OFFLOAD = { .type = NLA_U8 }, }; /** @@ -164,6 +160,11 @@ info->ce_mask |= MACSEC_ATTR_ENCRYPT; } + if (tbIFLA_MACSEC_OFFLOAD) { + info->offload = nla_get_u8(tbIFLA_MACSEC_OFFLOAD); + info->ce_mask |= MACSEC_ATTR_OFFLOAD; + } + if (tbIFLA_MACSEC_INC_SCI) { info->send_sci = nla_get_u8(tbIFLA_MACSEC_INC_SCI); info->ce_mask |= MACSEC_ATTR_INC_SCI; @@ -262,7 +263,8 @@ struct macsec_info *info = link->l_info; char tmp128; - nl_dump(p, "sci %016llx <%s>", ntohll(info->sci), flags_str(tmp, sizeof(tmp), info)); + nl_dump(p, "sci %016llx <%s>", (long long unsigned)ntohll(info->sci), + flags_str(tmp, sizeof(tmp), info)); } static void macsec_dump_details(struct rtnl_link *link, struct nl_dump_params *p) @@ -270,12 +272,15 @@ struct macsec_info *info = link->l_info; char tmp128; - nl_dump(p, " sci %016llx protect %s encoding_sa %d encrypt %s send_sci %s validate %s %s\n", - ntohll(info->sci), values_on_offinfo->protect, info->encoding_sa, values_on_offinfo->encrypt, values_on_offinfo->send_sci, + nl_dump(p, + " sci %016llx protect %s encoding_sa %d encrypt %s send_sci %s validate %s %s\n", + (long long unsigned)ntohll(info->sci), + values_on_offinfo->protect, info->encoding_sa, + values_on_offinfo->encrypt, values_on_offinfo->send_sci, VALIDATE_STRinfo->validate, replay_protect_str(tmp, info->replay_protect, info->window)); nl_dump(p, " cipher suite: %016llx, icv_len %d\n", - info->cipher_suite, info->icv_len); + (long long unsigned)info->cipher_suite, info->icv_len); } static int macsec_clone(struct rtnl_link *dst, struct rtnl_link *src) @@ -312,6 +317,9 @@ if ((info->ce_mask & MACSEC_ATTR_ENCRYPT)) NLA_PUT_U8(msg, IFLA_MACSEC_ENCRYPT, info->encrypt); + if ((info->ce_mask & MACSEC_ATTR_OFFLOAD)) + NLA_PUT_U8(msg, IFLA_MACSEC_OFFLOAD, info->offload); + if (info->cipher_suite != MACSEC_DEFAULT_CIPHER_ID || info->icv_len != DEFAULT_ICV_LEN) { NLA_PUT_U64(msg, IFLA_MACSEC_CIPHER_SUITE, info->cipher_suite); NLA_PUT_U8(msg, IFLA_MACSEC_ICV_LEN, info->icv_len); @@ -638,6 +646,36 @@ return 0; } +int rtnl_link_macsec_set_offload(struct rtnl_link *link, uint8_t offload) +{ + struct macsec_info *info = link->l_info; + + IS_MACSEC_LINK_ASSERT(link); + + if (offload > 1) + return -NLE_INVAL; + + info->offload = offload; + info->ce_mask |= MACSEC_ATTR_OFFLOAD; + + return 0; +} + +int rtnl_link_macsec_get_offload(struct rtnl_link *link, uint8_t *offload) +{ + struct macsec_info *info = link->l_info; + + IS_MACSEC_LINK_ASSERT(link); + + if (!(info->ce_mask & MACSEC_ATTR_OFFLOAD)) + return -NLE_NOATTR; + + if (offload) + *offload = info->offload; + + return 0; +} + int rtnl_link_macsec_set_encoding_sa(struct rtnl_link *link, uint8_t encoding_sa) { struct macsec_info *info = link->l_info; @@ -674,7 +712,7 @@ IS_MACSEC_LINK_ASSERT(link); - if (validate > 1) + if (validate > MACSEC_VALIDATE_MAX) return -NLE_INVAL; info->validate = validate;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/macvlan.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/macvlan.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/macvlan.c MACVLAN Link Info - * - * 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) 2013 Michael Braun <michael-dev@fami-braun.de> */ @@ -123,6 +117,10 @@ mvi->mvi_macaddr = calloc(mvi->mvi_maccount, sizeof(*(mvi->mvi_macaddr))); + if (mvi->mvi_macaddr == NULL) { + err = -NLE_NOMEM; + goto errout; + } i = 0; for (; nla_ok(nla, len); nla = nla_next(nla, &len)) { @@ -149,6 +147,8 @@ uint32_t i; mvi = link->l_info; + if (!mvi) + return; for (i = 0; i < mvi->mvi_maccount; i++) nl_addr_put(mvi->mvi_macaddri); @@ -307,12 +307,11 @@ struct rtnl_link *rtnl_link_macvlan_alloc(void) { struct rtnl_link *link; - int err; if (!(link = rtnl_link_alloc())) return NULL; - if ((err = rtnl_link_set_type(link, "macvlan")) < 0) { + if (rtnl_link_set_type(link, "macvlan") < 0) { rtnl_link_put(link); return NULL; } @@ -653,12 +652,11 @@ struct rtnl_link *rtnl_link_macvtap_alloc(void) { struct rtnl_link *link; - int err; if (!(link = rtnl_link_alloc())) return NULL; - if ((err = rtnl_link_set_type(link, "macvtap")) < 0) { + if (rtnl_link_set_type(link, "macvtap") < 0) { rtnl_link_put(link); return NULL; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/ppp.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/ppp.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/ppp.c PPP Link Module - * - * 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) 2016 Jonas Johansson <jonasj76@gmail.com> */ @@ -156,12 +150,11 @@ struct rtnl_link *rtnl_link_ppp_alloc(void) { struct rtnl_link *link; - int err; if (!(link = rtnl_link_alloc())) return NULL; - if ((err = rtnl_link_set_type(link, "ppp")) < 0) { + if (rtnl_link_set_type(link, "ppp") < 0) { rtnl_link_put(link); return NULL; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/sit.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/sit.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/sit.c SIT Link Info - * - * 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) 2014 Susant Sahani <susant@redhat.com> */ @@ -44,6 +38,7 @@ #define SIT_ATTR_6RD_RELAY_PREFIX (1 << 9) #define SIT_ATTR_6RD_PREFIXLEN (1 << 10) #define SIT_ATTR_6RD_RELAY_PREFIXLEN (1 << 11) +#define SIT_ATTR_FWMARK (1 << 12) struct sit_info { @@ -59,6 +54,7 @@ uint32_t ip6rd_relay_prefix; uint16_t ip6rd_prefixlen; uint16_t ip6rd_relay_prefixlen; + uint32_t fwmark; uint32_t sit_mask; }; @@ -75,6 +71,7 @@ IFLA_IPTUN_6RD_RELAY_PREFIX = { .type = NLA_U32 }, IFLA_IPTUN_6RD_PREFIXLEN = { .type = NLA_U16 }, IFLA_IPTUN_6RD_RELAY_PREFIXLEN = { .type = NLA_U16 }, + IFLA_IPTUN_FWMARK = { .type = NLA_U32 }, }; static int sit_alloc(struct rtnl_link *link) @@ -174,6 +171,11 @@ sit->sit_mask |= SIT_ATTR_6RD_RELAY_PREFIXLEN; } + if (tbIFLA_IPTUN_FWMARK) { + sit->fwmark = nla_get_u32(tbIFLA_IPTUN_FWMARK); + sit->sit_mask |= SIT_ATTR_FWMARK; + } + err = 0; errout: @@ -225,6 +227,9 @@ if (sit->sit_mask & SIT_ATTR_6RD_RELAY_PREFIXLEN) NLA_PUT_U16(msg, IFLA_IPTUN_6RD_RELAY_PREFIXLEN, sit->ip6rd_relay_prefixlen); + if (sit->sit_mask & SIT_ATTR_FWMARK) + NLA_PUT_U32(msg, IFLA_IPTUN_FWMARK, sit->fwmark); + nla_nest_end(msg, data); nla_put_failure: @@ -326,6 +331,11 @@ nl_dump(p, " 6rd_relay_prefixlen "); nl_dump_line(p, "%d\n", sit->ip6rd_relay_prefixlen); } + + if (sit->sit_mask & SIT_ATTR_FWMARK) { + nl_dump(p, " fwmark "); + nl_dump_line(p, "%x\n", sit->fwmark); + } } static int sit_clone(struct rtnl_link *dst, struct rtnl_link *src) @@ -812,6 +822,42 @@ return 0; } +/** + * Set SIT tunnel fwmark + * @arg link Link object + * @arg fwmark fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_sit_set_fwmark(struct rtnl_link *link, uint32_t fwmark) +{ + IS_SIT_LINK_ASSERT(link, sit); + + sit->fwmark = fwmark; + sit->sit_mask |= SIT_ATTR_FWMARK; + + return 0; +} + +/** + * Get SIT tunnel fwmark + * @arg link Link object + * @arg fwmark addr to fill in with the fwmark + * + * @return 0 on success or a negative error code + */ +int rtnl_link_sit_get_fwmark(struct rtnl_link *link, uint32_t *fwmark) +{ + IS_SIT_LINK_ASSERT(link, sit); + + if (!(sit->sit_mask & SIT_ATTR_FWMARK)) + return -NLE_NOATTR; + + *fwmark = sit->fwmark; + + return 0; +} + static void __init sit_init(void) { rtnl_link_register_info(&sit_info_ops);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/sriov.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/sriov.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/sriov.c SRIOV VF Info - * - * 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) 2016 Intel Corp. All rights reserved. * Copyright (c) 2016 Jef Oliver <jef.oliver@intel.com> */ @@ -92,7 +86,7 @@ nl_vf_vlans_t *src_vlans = NULL, *dst_vlans = NULL; nl_vf_vlan_info_t *src_vlan_info = NULL, *dst_vlan_info = NULL; - if (!(err = rtnl_link_has_vf_list(src))) + if (!rtnl_link_has_vf_list(src)) return 0; dst->l_vf_list = rtnl_link_vf_alloc(); @@ -129,7 +123,7 @@ dst_vlan_info = dst_vlans->vlans; memcpy(dst_vlans, src_vlans, sizeof(nl_vf_vlans_t)); memcpy(dst_vlan_info, src_vlan_info, - dst_vlans->size * sizeof(dst_vlan_info)); + dst_vlans->size * sizeof(*dst_vlan_info)); d_vf->vf_vlans = dst_vlans; } @@ -213,10 +207,9 @@ /* Loop through SRIOV VF list dump details */ void rtnl_link_sriov_dump_details(struct rtnl_link *link, struct nl_dump_params *p) { - int err; struct rtnl_link_vf *vf_data, *list, *next; - if (!(err = rtnl_link_has_vf_list(link))) + if (!rtnl_link_has_vf_list(link)) BUG(); nl_dump(p, " SRIOV VF List\n"); @@ -235,7 +228,7 @@ char *unit; float res; - nl_dump(p, " VF %" PRIu64 " Stats:\n", vf_data->vf_index); + nl_dump(p, " VF %u Stats:\n", vf_data->vf_index); nl_dump_line(p, "\tRX: %-14s %-10s %-10s %-10s\n", "bytes", "packets", "multicast", "broadcast"); @@ -277,10 +270,9 @@ /* Free stored SRIOV VF data */ void rtnl_link_sriov_free_data(struct rtnl_link *link) { - int err = 0; struct rtnl_link_vf *list, *vf, *next; - if (!(err = rtnl_link_has_vf_list(link))) + if (!rtnl_link_has_vf_list(link)) return; list = link->l_vf_list; @@ -656,7 +648,7 @@ } if (tIFLA_VF_STATS) { - err = nla_parse_nested(stb, IFLA_VF_STATS_MAX, + err = nla_parse_nested(stb, RTNL_LINK_VF_STATS_MAX, tIFLA_VF_STATS, sriov_stats_policy); if (err < 0) { @@ -683,7 +675,7 @@ RTNL_LINK_VF_STATS_MULTICAST, IFLA_VF_STATS_MULTICAST); - vf_data->ce_mask |= IFLA_VF_STATS; + vf_data->ce_mask |= SRIOV_ATTR_STATS; } if (tIFLA_VF_TRUST) {
View file
_service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/team.c
Added
@@ -0,0 +1,102 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ +/* + * Copyright (c) 2015 Jonas Johansson <jonasj76@gmail.com> + */ + +/** + * @ingroup link + * @defgroup team Team + * + * @details + * \b Link Type Name: "team" + * + * @route_doc{link_team, Team Documentation} + * @{ + */ + +#include <netlink-private/netlink.h> +#include <netlink/netlink.h> +#include <netlink-private/route/link/api.h> +#include <netlink/route/link/team.h> + +/** + * Allocate link object of type team + * + * @return Allocated link object or NULL. + */ +struct rtnl_link *rtnl_link_team_alloc(void) +{ + struct rtnl_link *link; + + if (!(link = rtnl_link_alloc())) + return NULL; + + if (rtnl_link_set_type(link, "team") < 0) { + rtnl_link_put(link); + return NULL; + } + + return link; +} + +/** + * Create a new kernel team device + * @arg sock netlink socket + * @arg name name of team device or NULL + * @arg opts team options (currently unused) + * + * Creates a new team device in the kernel. If no name is + * provided, the kernel will automatically pick a name of the + * form "type%d" (e.g. team0, vlan1, etc.) + * + * The \a opts argument is currently unused. In the future, it + * may be used to carry additional team options to be set + * when creating the team device. + * + * @note When letting the kernel assign a name, it will become + * difficult to retrieve the interface afterwards because + * you have to guess the name the kernel has chosen. It is + * therefore not recommended to not provide a device name. + * + * @see rtnl_link_team_enslave() + * @see rtnl_link_team_release() + * + * @return 0 on success or a negative error code + */ +int rtnl_link_team_add(struct nl_sock *sock, const char *name, + struct rtnl_link *opts) +{ + struct rtnl_link *link; + int err; + + if (!(link = rtnl_link_team_alloc())) + return -NLE_NOMEM; + + if (!name && opts) + name = rtnl_link_get_name(opts); + + if (name) + rtnl_link_set_name(link, name); + + err = rtnl_link_add(sock, link, NLM_F_CREATE); + + rtnl_link_put(link); + + return err; +} + +static struct rtnl_link_info_ops team_info_ops = { + .io_name = "team", +}; + +static void __init team_init(void) +{ + rtnl_link_register_info(&team_info_ops); +} + +static void __exit team_exit(void) +{ + rtnl_link_unregister_info(&team_info_ops); +} + +/** @} */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/veth.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/veth.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/veth.c Virtual Ethernet - * - * 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) 2013 Cong Wang <xiyou.wangcong@gmail.com> */ @@ -213,11 +207,10 @@ struct rtnl_link *rtnl_link_veth_alloc(void) { struct rtnl_link *link; - int err; if (!(link = rtnl_link_alloc())) return NULL; - if ((err = rtnl_link_set_type(link, "veth")) < 0) { + if (rtnl_link_set_type(link, "veth") < 0) { rtnl_link_put(link); return NULL; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/vlan.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/vlan.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/vlan.c VLAN Link Info - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -392,12 +386,11 @@ struct rtnl_link *rtnl_link_vlan_alloc(void) { struct rtnl_link *link; - int err; if (!(link = rtnl_link_alloc())) return NULL; - if ((err = rtnl_link_set_type(link, "vlan")) < 0) { + if (rtnl_link_set_type(link, "vlan") < 0) { rtnl_link_put(link); return NULL; } @@ -647,6 +640,7 @@ __ADD(VLAN_FLAG_GVRP, gvrp), __ADD(VLAN_FLAG_LOOSE_BINDING, loose_binding), __ADD(VLAN_FLAG_MVRP, mvrp), + __ADD(VLAN_FLAG_BRIDGE_BINDING, bridge_binding), }; /**
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/vrf.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/vrf.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/vrf.c VRF Link Info - * - * 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) 2015 Cumulus Networks. All rights reserved. * Copyright (c) 2015 David Ahern <dsa@cumulusnetworks.com> */ @@ -181,12 +175,11 @@ struct rtnl_link *rtnl_link_vrf_alloc(void) { struct rtnl_link *link; - int err; if (!(link = rtnl_link_alloc())) return NULL; - if ((err = rtnl_link_set_type(link, "vrf")) < 0) { + if (rtnl_link_set_type(link, "vrf") < 0) { rtnl_link_put(link); return NULL; } @@ -240,8 +233,8 @@ struct vrf_info *vi = link->l_info; IS_VRF_LINK_ASSERT(link); - if(id > VRF_TABLE_ID_MAX) - return -NLE_INVAL; + + _NL_STATIC_ASSERT(VRF_TABLE_ID_MAX == UINT32_MAX); vi->table_id = id; vi->vi_mask |= VRF_HAS_TABLE_ID;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/vxlan.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/vxlan.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/vxlan.c VXLAN Link Info - * - * 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) 2013 Yasunobu Chiba <yasu@dsl.gr.jp> */ @@ -322,16 +316,12 @@ if (vxi->ce_mask & VXLAN_ATTR_GROUP) { nl_dump(p, " group "); - if (inet_ntop(AF_INET, &vxi->vxi_group, addr, sizeof(addr))) - nl_dump_line(p, "%s\n", addr); - else - nl_dump_line(p, "%#x\n", ntohs(vxi->vxi_group)); + nl_dump_line(p, "%s\n", + _nl_inet_ntop(AF_INET, &vxi->vxi_group, addr)); } else if (vxi->ce_mask & VXLAN_ATTR_GROUP6) { nl_dump(p, " group "); - if (inet_ntop(AF_INET6, &vxi->vxi_group6, addr, sizeof(addr))) - nl_dump_line(p, "%s\n", addr); - else - nl_dump_line(p, "%#x\n", vxi->vxi_group6); + nl_dump_line(p, "%s\n", + _nl_inet_ntop(AF_INET6, &vxi->vxi_group6, addr)); } if (vxi->ce_mask & VXLAN_ATTR_LINK) { @@ -350,19 +340,14 @@ if (vxi->ce_mask & VXLAN_ATTR_LOCAL) { nl_dump(p, " local "); - if (inet_ntop(AF_INET, &vxi->vxi_local, addr, sizeof(addr))) - nl_dump_line(p, "%s\n", addr); - else - nl_dump_line(p, "%#x\n", ntohs(vxi->vxi_local)); + nl_dump_line(p, "%s\n", + _nl_inet_ntop(AF_INET, &vxi->vxi_local, addr)); } else if (vxi->ce_mask & VXLAN_ATTR_LOCAL6) { nl_dump(p, " local "); - if (inet_ntop(AF_INET6, &vxi->vxi_local6, addr, sizeof(addr))) - nl_dump_line(p, "%s\n", addr); - else - nl_dump_line(p, "%#x\n", vxi->vxi_local6); + nl_dump_line(p, "%s\n", + _nl_inet_ntop(AF_INET6, &vxi->vxi_local6, addr)); } - if (vxi->ce_mask & VXLAN_ATTR_TTL) { nl_dump(p, " ttl "); if(vxi->vxi_ttl) @@ -374,7 +359,7 @@ if (vxi->ce_mask & VXLAN_ATTR_TOS) { nl_dump(p, " tos "); if (vxi->vxi_tos == 1) - nl_dump_line(p, "inherit\n", vxi->vxi_tos); + nl_dump_line(p, "inherit\n"); else nl_dump_line(p, "%#x\n", vxi->vxi_tos); } @@ -701,12 +686,11 @@ struct rtnl_link *rtnl_link_vxlan_alloc(void) { struct rtnl_link *link; - int err; if (!(link = rtnl_link_alloc())) return NULL; - if ((err = rtnl_link_set_type(link, "vxlan")) < 0) { + if (rtnl_link_set_type(link, "vxlan") < 0) { rtnl_link_put(link); return NULL; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/link/xfrmi.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/link/xfrmi.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/link/xfrmi.c XFRMI Link Info - * - * 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) 2019 Eyal Birger <eyal.birger@gmail.com> * * Based on lib/route/link/ipvti.c
View file
_service:tar_scm:libnl-3.7.0.tar.gz/lib/route/mdb.c
Added
@@ -0,0 +1,466 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ +/* + * lib/route/mdb.c Multicast Database + */ + +#include <netlink-private/netlink.h> +#include <netlink/netlink.h> +#include <netlink/route/mdb.h> +#include <netlink/utils.h> +#include <linux/if_bridge.h> + +/** @cond SKIP */ +#define MDB_ATTR_IFINDEX 0x000001 +#define MDB_ATTR_ENTRIES 0x000002 + +static struct rtnl_mdb_entry *rtnl_mdb_entry_alloc(void); +static void rtnl_mdb_entry_free(struct rtnl_mdb_entry *mdb_entry); + +static struct nl_cache_ops rtnl_mdb_ops; +static struct nl_object_ops mdb_obj_ops; +/** @endcond */ + +static void mdb_constructor(struct nl_object *obj) +{ + struct rtnl_mdb *_mdb = (struct rtnl_mdb *) obj; + + nl_init_list_head(&_mdb->mdb_entry_list); +} + +static void mdb_free_data(struct nl_object *obj) +{ + struct rtnl_mdb *mdb = (struct rtnl_mdb *)obj; + struct rtnl_mdb_entry *mdb_entry; + struct rtnl_mdb_entry *mdb_entry_safe; + + nl_list_for_each_entry_safe(mdb_entry, mdb_entry_safe, + &mdb->mdb_entry_list, mdb_list) + rtnl_mdb_entry_free(mdb_entry); +} + +static int mdb_entry_equal(struct rtnl_mdb_entry *a, struct rtnl_mdb_entry *b) +{ + return a->ifindex == b->ifindex + && a->vid == b->vid + && a->proto == b->proto + && a->state == b->state + && nl_addr_cmp(a->addr, b->addr) == 0; +} + +static uint64_t mdb_compare(struct nl_object *_a, struct nl_object *_b, + uint64_t attrs, int flags) +{ + struct rtnl_mdb *a = (struct rtnl_mdb *) _a; + struct rtnl_mdb *b = (struct rtnl_mdb *) _b; + struct rtnl_mdb_entry *a_entry, *b_entry; + uint64_t diff = 0; + +#define MDB_DIFF(ATTR, EXPR) ATTR_DIFF(attrs, MDB_ATTR_##ATTR, a, b, EXPR) + diff |= MDB_DIFF(IFINDEX, a->ifindex != b->ifindex); +#undef MDB_DIFF + + a_entry = nl_list_entry(a->mdb_entry_list.next, struct rtnl_mdb_entry, mdb_list); + b_entry = nl_list_entry(b->mdb_entry_list.next, struct rtnl_mdb_entry, mdb_list); + while (1) { + if ( &a_entry->mdb_list == &a->mdb_entry_list + || &b_entry->mdb_list == &b->mdb_entry_list) { + if ( &a_entry->mdb_list != &a->mdb_entry_list + || &b_entry->mdb_list != &b->mdb_entry_list) + diff |= MDB_ATTR_ENTRIES; + break; + } + if (!mdb_entry_equal(a_entry, b_entry)) { + diff |= MDB_ATTR_ENTRIES; + break; + } + a_entry = nl_list_entry(a_entry->mdb_list.next, struct rtnl_mdb_entry, mdb_list); + b_entry = nl_list_entry(b_entry->mdb_list.next, struct rtnl_mdb_entry, mdb_list); + } + + return diff; +} + +static struct rtnl_mdb_entry *mdb_entry_clone(struct rtnl_mdb_entry *src) +{ + struct rtnl_mdb_entry *dst = rtnl_mdb_entry_alloc(); + if (!dst) + return NULL; + + dst->ifindex = src->ifindex; + dst->state = src->state; + dst->vid = src->vid; + dst->proto = src->proto; + + dst->addr = nl_addr_clone(src->addr); + if (dst->addr == NULL) { + free(dst); + return NULL; + } + + return dst; +} + +static int mdb_clone(struct nl_object *_dst, struct nl_object *_src) +{ + struct rtnl_mdb *dst = nl_object_priv(_dst); + struct rtnl_mdb *src = nl_object_priv(_src); + struct rtnl_mdb_entry *entry; + + nl_init_list_head(&dst->mdb_entry_list); + + nl_list_for_each_entry(entry, &src->mdb_entry_list, mdb_list) { + struct rtnl_mdb_entry *copy = mdb_entry_clone(entry); + + if (!copy) + return -NLE_NOMEM; + + rtnl_mdb_add_entry(dst, copy); + } + + return 0; +} + +static int mdb_update(struct nl_object *old_obj, struct nl_object *new_obj) +{ + struct rtnl_mdb *old = (struct rtnl_mdb *) old_obj; + struct rtnl_mdb *new = (struct rtnl_mdb *) new_obj; + struct rtnl_mdb_entry *entry, *old_entry; + int action = new_obj->ce_msgtype; + + if (new->ifindex != old->ifindex) + return -NLE_OPNOTSUPP; + + switch (action) { + case RTM_NEWMDB: + nl_list_for_each_entry(entry, &new->mdb_entry_list, mdb_list) { + struct rtnl_mdb_entry *copy = mdb_entry_clone(entry); + + if (!copy) + return -NLE_NOMEM; + + rtnl_mdb_add_entry(old, copy); + } + break; + case RTM_DELMDB: + entry = nl_list_first_entry(&new->mdb_entry_list, + struct rtnl_mdb_entry, + mdb_list); + nl_list_for_each_entry(old_entry, &old->mdb_entry_list, mdb_list) { + if ( old_entry->ifindex == entry->ifindex + && !nl_addr_cmp(old_entry->addr, entry->addr)) { + nl_list_del(&old_entry->mdb_list); + break; + } + } + break; + } + + return NLE_SUCCESS; +} + +static struct nla_policy mdb_policyMDBA_MAX + 1 = { + MDBA_MDB = {.type = NLA_NESTED}, +}; + +static struct nla_policy mdb_db_policyMDBA_MDB_MAX + 1 = { + MDBA_MDB_ENTRY = {.type = NLA_NESTED}, +}; + +static int mdb_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, + struct nlmsghdr *nlh, struct nl_parser_param *pp) +{ + int err = 0; + int rem = 0; + struct nlattr *tbMDBA_MAX + 1; + struct br_port_msg *port; + struct nlattr *nla; + struct br_mdb_entry *e; + _nl_auto_rtnl_mdb struct rtnl_mdb *mdb = rtnl_mdb_alloc(); + + if (!mdb) + return -NLE_NOMEM; + + err = nlmsg_parse(nlh, sizeof(struct br_port_msg), tb, MDBA_MAX, + mdb_policy); + if (err < 0) + return err; + + mdb->ce_msgtype = nlh->nlmsg_type; + + port = nlmsg_data(nlh); + mdb->ifindex = port->ifindex; + mdb->ce_mask |= MDB_ATTR_IFINDEX; + + if (tbMDBA_MDB) { + struct nlattr *db_attrMDBA_MDB_MAX+1; + + err = nla_parse_nested(db_attr, MDBA_MDB_MAX, tbMDBA_MDB, + mdb_db_policy); + if (err < 0) + return err; + rem = nla_len(tbMDBA_MDB); + + for (nla = nla_data(tbMDBA_MDB); nla_ok(nla, rem); + nla = nla_next(nla, &rem)) { + int rm = nla_len(nla); + struct nlattr *nla2; + + for (nla2 = nla_data(nla); nla_ok(nla2, rm); + nla2 = nla_next(nla2, &rm)) { + _nl_auto_nl_addr struct nl_addr *addr = NULL; + struct rtnl_mdb_entry *entry; + uint16_t proto; + + e = nla_data(nla2); + + proto = ntohs(e->addr.proto); + + if (proto == ETH_P_IP) { + addr = nl_addr_build( + AF_INET, &e->addr.u.ip4, + sizeof(e->addr.u.ip4)); + } else if (proto == ETH_P_IPV6) { + addr = nl_addr_build( + AF_INET6, &e->addr.u.ip6, + sizeof(e->addr.u.ip6)); + } else { + addr = nl_addr_build( + AF_LLC, e->addr.u.mac_addr, + sizeof(e->addr.u.mac_addr)); + } + if (!addr) + return -NLE_NOMEM; + + entry = rtnl_mdb_entry_alloc(); + if (!entry) + return -NLE_NOMEM; + + mdb->ce_mask |= MDB_ATTR_ENTRIES; + + entry->ifindex = e->ifindex; + entry->vid = e->vid; + entry->state = e->state; + entry->proto = ntohs(e->addr.proto); + entry->addr = _nl_steal_pointer(&addr); + rtnl_mdb_add_entry(mdb, entry); + } + } + } + + return pp->pp_cb((struct nl_object *) mdb, pp); +} + +static int mdb_request_update(struct nl_cache *cache, struct nl_sock *sk) +{ + return nl_rtgen_request(sk, RTM_GETMDB, AF_BRIDGE, NLM_F_DUMP); +} + +static void mdb_entry_dump_line(struct rtnl_mdb_entry *entry, + struct nl_dump_params *p) +{ + char bufINET6_ADDRSTRLEN; + + nl_dump(p, "port %d ", entry->ifindex); + nl_dump(p, "vid %d ", entry->vid); + nl_dump(p, "proto 0x%04x ", entry->proto); + nl_dump(p, "address %s\n", nl_addr2str(entry->addr, buf, sizeof(buf))); +} + +static void mdb_dump_line(struct nl_object *obj, struct nl_dump_params *p) +{ + struct rtnl_mdb *mdb = (struct rtnl_mdb *) obj; + struct rtnl_mdb_entry *_mdb; + + nl_dump(p, "dev %d \n", mdb->ifindex); + + nl_list_for_each_entry(_mdb, &mdb->mdb_entry_list, mdb_list) { + p->dp_ivar = NH_DUMP_FROM_ONELINE; + mdb_entry_dump_line(_mdb, p); + } +} + +static void mdb_dump_details(struct nl_object *obj, struct nl_dump_params *p) +{ + mdb_dump_line(obj, p); +} + +static void mdb_dump_stats(struct nl_object *obj, struct nl_dump_params *p) +{ + mdb_dump_details(obj, p); +} + +void rtnl_mdb_put(struct rtnl_mdb *mdb) +{ + nl_object_put((struct nl_object *) mdb); +} + +/** @} */ + +/** + * @name Cache Management + * @{ + */ +int rtnl_mdb_alloc_cache(struct nl_sock *sk, struct nl_cache **result) +{ + return nl_cache_alloc_and_fill(&rtnl_mdb_ops, sk, result); +} + +/** + * Build a neighbour cache including all MDB entries currently configured in the kernel. + * @arg sock Netlink socket. + * @arg result Pointer to store resulting cache. + * @arg flags Flags to apply to cache before filling + * + * Allocates a new MDB cache, initializes it properly and updates it + * to include all Multicast Database entries currently configured in the kernel. + * + * @return 0 on success or a negative error code. + */ +int rtnl_mdb_alloc_cache_flags(struct nl_sock *sock, struct nl_cache **result, + unsigned int flags) +{ + struct nl_cache *cache; + int err; + + cache = nl_cache_alloc(&rtnl_mdb_ops); + if (!cache) + return -NLE_NOMEM; + + nl_cache_set_flags(cache, flags); + + if (sock && (err = nl_cache_refill(sock, cache)) < 0) { + nl_cache_free(cache); + return err; + } + + *result = cache; + return 0; +} + +/** @} */ + +/** + * @name Attributes + * @{ + */ +uint32_t rtnl_mdb_get_ifindex(struct rtnl_mdb *mdb) +{ + return mdb->ifindex; +} + +void rtnl_mdb_add_entry(struct rtnl_mdb *mdb, struct rtnl_mdb_entry *entry) +{ + nl_list_add_tail(&entry->mdb_list, &mdb->mdb_entry_list); +} + +void rtnl_mdb_foreach_entry(struct rtnl_mdb *mdb, + void (*cb)(struct rtnl_mdb_entry *, void *), + void *arg) +{ + struct rtnl_mdb_entry *entry; + + nl_list_for_each_entry(entry, &mdb->mdb_entry_list, mdb_list) { + cb(entry, arg); + } +} + +int rtnl_mdb_entry_get_ifindex(struct rtnl_mdb_entry *mdb_entry) +{ + return mdb_entry->ifindex; +} + +int rtnl_mdb_entry_get_vid(struct rtnl_mdb_entry *mdb_entry) +{ + return mdb_entry->vid; +} + +int rtnl_mdb_entry_get_state(struct rtnl_mdb_entry *mdb_entry) +{ + return mdb_entry->state; +} + +struct nl_addr *rtnl_mdb_entry_get_addr(struct rtnl_mdb_entry *mdb_entry) +{ + return mdb_entry->addr; +} + +uint16_t rtnl_mdb_entry_get_proto(struct rtnl_mdb_entry *mdb_entry) +{ + return mdb_entry->proto; +} + +/** @} */ + +static struct nl_object_ops mdb_obj_ops = { + .oo_name = "route/mdb", + .oo_size = sizeof(struct rtnl_mdb), + .oo_constructor = mdb_constructor, + .oo_dump = { + NL_DUMP_LINE = mdb_dump_line, + NL_DUMP_DETAILS = mdb_dump_details, + NL_DUMP_STATS = mdb_dump_stats, + }, + .oo_clone = mdb_clone, + .oo_compare = mdb_compare, + .oo_update = mdb_update, + .oo_free_data = mdb_free_data, +}; + +struct rtnl_mdb *rtnl_mdb_alloc(void) +{ + return (struct rtnl_mdb *) nl_object_alloc(&mdb_obj_ops); +} + +static struct rtnl_mdb_entry *rtnl_mdb_entry_alloc(void) +{ + struct rtnl_mdb_entry *mdb; + + mdb = calloc(1, sizeof(struct rtnl_mdb_entry)); + if (!mdb) + return NULL; + + nl_init_list_head(&mdb->mdb_list); + + return mdb; + +} + +static void rtnl_mdb_entry_free(struct rtnl_mdb_entry *mdb_entry) +{ + nl_list_del(&mdb_entry->mdb_list); + nl_addr_put(mdb_entry->addr); + free(mdb_entry); +} + +static struct nl_af_group mdb_groups = { + {AF_BRIDGE, RTNLGRP_MDB}, + {END_OF_GROUP_LIST}, +}; + +static struct nl_cache_ops rtnl_mdb_ops = { + .co_name = "route/mdb", + .co_hdrsize = sizeof(struct br_port_msg), + .co_msgtypes = { + { RTM_NEWMDB, NL_ACT_NEW, "new"}, + { RTM_DELMDB, NL_ACT_DEL, "del"}, + { RTM_GETMDB, NL_ACT_GET, "get"}, + END_OF_MSGTYPES_LIST, + }, + .co_protocol = NETLINK_ROUTE, + .co_groups = mdb_groups, + .co_request_update = mdb_request_update, + .co_msg_parser = mdb_msg_parser, + .co_obj_ops = &mdb_obj_ops, +}; + +static void __init mdb_init(void) +{ + nl_cache_mngt_register(&rtnl_mdb_ops); +} + +static void __exit mdb_exit(void) +{ + nl_cache_mngt_unregister(&rtnl_mdb_ops); +} + +/** @} */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/neigh.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/neigh.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/neigh.c 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-2008 Thomas Graf <tgraf@suug.ch> */ @@ -192,6 +185,9 @@ struct rtnl_neigh *dst = nl_object_priv(_dst); struct rtnl_neigh *src = nl_object_priv(_src); + dst->n_lladdr = NULL; + dst->n_dst = NULL; + if (src->n_lladdr) if (!(dst->n_lladdr = nl_addr_clone(src->n_lladdr))) return -NLE_NOMEM; @@ -716,7 +712,7 @@ if (nlmsg_append(msg, &nhdr, sizeof(nhdr), NLMSG_ALIGNTO) < 0) goto nla_put_failure; - if (tmpl->n_family != AF_BRIDGE) + if (tmpl->ce_mask & NEIGH_ATTR_DST) NLA_PUT_ADDR(msg, NDA_DST, tmpl->n_dst); if (tmpl->ce_mask & NEIGH_ATTR_LLADDR)
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/neightbl.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/neightbl.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/neightbl.c 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-2008 Thomas Graf <tgraf@suug.ch> */ @@ -18,6 +11,7 @@ */ #include <netlink-private/netlink.h> +#include <netlink-private/utils.h> #include <netlink/netlink.h> #include <netlink/utils.h> #include <netlink/route/rtnl.h> @@ -25,31 +19,31 @@ #include <netlink/route/link.h> /** @cond SKIP */ -#define NEIGHTBL_ATTR_FAMILY 0x001 -#define NEIGHTBL_ATTR_STATS 0x002 -#define NEIGHTBL_ATTR_NAME 0x004 -#define NEIGHTBL_ATTR_THRESH1 0x008 -#define NEIGHTBL_ATTR_THRESH2 0x010 -#define NEIGHTBL_ATTR_THRESH3 0x020 -#define NEIGHTBL_ATTR_CONFIG 0x040 -#define NEIGHTBL_ATTR_PARMS 0x080 -#define NEIGHTBL_ATTR_GC_INTERVAL 0x100 - -#define NEIGHTBLPARM_ATTR_IFINDEX 0x0001 -#define NEIGHTBLPARM_ATTR_REFCNT 0x0002 -#define NEIGHTBLPARM_ATTR_QUEUE_LEN 0x0004 -#define NEIGHTBLPARM_ATTR_APP_PROBES 0x0008 -#define NEIGHTBLPARM_ATTR_UCAST_PROBES 0x0010 -#define NEIGHTBLPARM_ATTR_MCAST_PROBES 0x0020 -#define NEIGHTBLPARM_ATTR_PROXY_QLEN 0x0040 -#define NEIGHTBLPARM_ATTR_REACHABLE_TIME 0x0080 +#define NEIGHTBL_ATTR_FAMILY 0x001 +#define NEIGHTBL_ATTR_STATS 0x002 +#define NEIGHTBL_ATTR_NAME 0x004 +#define NEIGHTBL_ATTR_THRESH1 0x008 +#define NEIGHTBL_ATTR_THRESH2 0x010 +#define NEIGHTBL_ATTR_THRESH3 0x020 +#define NEIGHTBL_ATTR_CONFIG 0x040 +#define NEIGHTBL_ATTR_PARMS 0x080 +#define NEIGHTBL_ATTR_GC_INTERVAL 0x100 + +#define NEIGHTBLPARM_ATTR_IFINDEX 0x0001 +#define NEIGHTBLPARM_ATTR_REFCNT 0x0002 +#define NEIGHTBLPARM_ATTR_QUEUE_LEN 0x0004 +#define NEIGHTBLPARM_ATTR_APP_PROBES 0x0008 +#define NEIGHTBLPARM_ATTR_UCAST_PROBES 0x0010 +#define NEIGHTBLPARM_ATTR_MCAST_PROBES 0x0020 +#define NEIGHTBLPARM_ATTR_PROXY_QLEN 0x0040 +#define NEIGHTBLPARM_ATTR_REACHABLE_TIME 0x0080 #define NEIGHTBLPARM_ATTR_BASE_REACHABLE_TIME 0x0100 -#define NEIGHTBLPARM_ATTR_RETRANS_TIME 0x0200 -#define NEIGHTBLPARM_ATTR_GC_STALETIME 0x0400 +#define NEIGHTBLPARM_ATTR_RETRANS_TIME 0x0200 +#define NEIGHTBLPARM_ATTR_GC_STALETIME 0x0400 #define NEIGHTBLPARM_ATTR_DELAY_PROBE_TIME 0x0800 -#define NEIGHTBLPARM_ATTR_ANYCAST_DELAY 0x1000 -#define NEIGHTBLPARM_ATTR_PROXY_DELAY 0x2000 -#define NEIGHTBLPARM_ATTR_LOCKTIME 0x4000 +#define NEIGHTBLPARM_ATTR_ANYCAST_DELAY 0x1000 +#define NEIGHTBLPARM_ATTR_PROXY_DELAY 0x2000 +#define NEIGHTBLPARM_ATTR_LOCKTIME 0x4000 static struct nl_cache_ops rtnl_neightbl_ops; static struct nl_object_ops neightbl_obj_ops; @@ -58,18 +52,18 @@ static uint64_t neightbl_compare(struct nl_object *_a, struct nl_object *_b, uint64_t attrs, int flags) { - struct rtnl_neightbl *a = (struct rtnl_neightbl *) _a; - struct rtnl_neightbl *b = (struct rtnl_neightbl *) _b; + struct rtnl_neightbl *a = (struct rtnl_neightbl *)_a; + struct rtnl_neightbl *b = (struct rtnl_neightbl *)_b; uint64_t diff = 0; #define NT_DIFF(ATTR, EXPR) ATTR_DIFF(attrs, NEIGHTBL_ATTR_##ATTR, a, b, EXPR) - diff |= NT_DIFF(FAMILY, a->nt_family != b->nt_family); - diff |= NT_DIFF(NAME, strcmp(a->nt_name, b->nt_name)); - diff |= NT_DIFF(THRESH1, a->nt_gc_thresh1 != b->nt_gc_thresh1); - diff |= NT_DIFF(THRESH2, a->nt_gc_thresh2 != b->nt_gc_thresh2); - diff |= NT_DIFF(THRESH3, a->nt_gc_thresh3 != b->nt_gc_thresh3); - diff |= NT_DIFF(GC_INTERVAL, a->nt_gc_interval != b->nt_gc_interval); + diff |= NT_DIFF(FAMILY, a->nt_family != b->nt_family); + diff |= NT_DIFF(NAME, strcmp(a->nt_name, b->nt_name)); + diff |= NT_DIFF(THRESH1, a->nt_gc_thresh1 != b->nt_gc_thresh1); + diff |= NT_DIFF(THRESH2, a->nt_gc_thresh2 != b->nt_gc_thresh2); + diff |= NT_DIFF(THRESH3, a->nt_gc_thresh3 != b->nt_gc_thresh3); + diff |= NT_DIFF(GC_INTERVAL, a->nt_gc_interval != b->nt_gc_interval); #undef NT_DIFF @@ -77,8 +71,7 @@ !(b->ce_mask & NEIGHTBL_ATTR_PARMS)) return diff; - /* XXX: FIXME: Compare parameter table */ - + /* XXX: FIXME: Compare parameter table */ #if 0 #define REQ(F) (fp->ntp_mask & NEIGHTBLPARM_ATTR_##F) @@ -106,17 +99,15 @@ return diff; } - -static struct nla_policy neightbl_policyNDTA_MAX+1 = { - NDTA_NAME = { .type = NLA_STRING, - .maxlen = NTBLNAMSIZ }, - NDTA_THRESH1 = { .type = NLA_U32 }, - NDTA_THRESH2 = { .type = NLA_U32 }, - NDTA_THRESH3 = { .type = NLA_U32 }, - NDTA_GC_INTERVAL = { .type = NLA_U32 }, - NDTA_CONFIG = { .minlen = sizeof(struct ndt_config) }, - NDTA_STATS = { .minlen = sizeof(struct ndt_stats) }, - NDTA_PARMS = { .type = NLA_NESTED }, +static struct nla_policy neightbl_policyNDTA_MAX + 1 = { + NDTA_NAME = { .type = NLA_STRING, .maxlen = NTBLNAMSIZ }, + NDTA_THRESH1 = { .type = NLA_U32 }, + NDTA_THRESH2 = { .type = NLA_U32 }, + NDTA_THRESH3 = { .type = NLA_U32 }, + NDTA_GC_INTERVAL = { .type = NLA_U32 }, + NDTA_CONFIG = { .minlen = sizeof(struct ndt_config) }, + NDTA_STATS = { .minlen = sizeof(struct ndt_stats) }, + NDTA_PARMS = { .type = NLA_NESTED }, }; static int neightbl_msg_parser(struct nl_cache_ops *ops, @@ -191,11 +182,11 @@ if (err < 0) goto errout; -#define COPY_ENTRY(name, var) \ - if (tbpNDTPA_ ##name) { \ - p->ntp_ ##var = nla_get_u32(tbpNDTPA_ ##name); \ - p->ntp_mask |= NEIGHTBLPARM_ATTR_ ##name; \ - } +#define COPY_ENTRY(name, var) \ + if (tbpNDTPA_##name) { \ + p->ntp_##var = nla_get_u32(tbpNDTPA_##name); \ + p->ntp_mask |= NEIGHTBLPARM_ATTR_##name; \ + } COPY_ENTRY(IFINDEX, ifindex); COPY_ENTRY(REFCNT, refcnt); @@ -217,7 +208,7 @@ ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; } - err = pp->pp_cb((struct nl_object *) ntbl, pp); + err = pp->pp_cb((struct nl_object *)ntbl, pp); errout: rtnl_neightbl_put(ntbl); return err; @@ -228,10 +219,9 @@ return nl_rtgen_request(h, RTM_GETNEIGHTBL, AF_UNSPEC, NLM_F_DUMP); } - static void neightbl_dump_line(struct nl_object *arg, struct nl_dump_params *p) { - struct rtnl_neightbl *ntbl = (struct rtnl_neightbl *) arg; + struct rtnl_neightbl *ntbl = (struct rtnl_neightbl *)arg; nl_dump_line(p, "%s", ntbl->nt_name); @@ -267,101 +257,102 @@ nl_dump(p, "\n"); } -static void neightbl_dump_details(struct nl_object *arg, struct nl_dump_params *p) +static void neightbl_dump_details(struct nl_object *arg, + struct nl_dump_params *p) { char x32, y32, z32; - struct rtnl_neightbl *ntbl = (struct rtnl_neightbl *) arg; + struct rtnl_neightbl *ntbl = (struct rtnl_neightbl *)arg; neightbl_dump_line(arg, p); if (ntbl->ce_mask & NEIGHTBL_ATTR_CONFIG) { nl_dump_line(p, " key-len %u entry-size %u last-flush %s\n", - ntbl->nt_config.ndtc_key_len, - ntbl->nt_config.ndtc_entry_size, - nl_msec2str(ntbl->nt_config.ndtc_last_flush, - x, sizeof(x))); - - nl_dump_line(p, " gc threshold %u/%u/%u interval %s " \ - "chain-position %u\n", - ntbl->nt_gc_thresh1, ntbl->nt_gc_thresh2, - ntbl->nt_gc_thresh3, - nl_msec2str(ntbl->nt_gc_interval, x, sizeof(x)), - ntbl->nt_config.ndtc_hash_chain_gc); + ntbl->nt_config.ndtc_key_len, + ntbl->nt_config.ndtc_entry_size, + nl_msec2str(ntbl->nt_config.ndtc_last_flush, x, + sizeof(x))); + + nl_dump_line(p, + " gc threshold %u/%u/%u interval %s " + "chain-position %u\n", + ntbl->nt_gc_thresh1, ntbl->nt_gc_thresh2, + ntbl->nt_gc_thresh3, + nl_msec2str(ntbl->nt_gc_interval, x, sizeof(x)), + ntbl->nt_config.ndtc_hash_chain_gc); nl_dump_line(p, " hash-rand 0x%08X/0x%08X last-rand %s\n", - ntbl->nt_config.ndtc_hash_rnd, - ntbl->nt_config.ndtc_hash_mask, - nl_msec2str(ntbl->nt_config.ndtc_last_rand, - x, sizeof(x))); + ntbl->nt_config.ndtc_hash_rnd, + ntbl->nt_config.ndtc_hash_mask, + nl_msec2str(ntbl->nt_config.ndtc_last_rand, x, + sizeof(x))); } if (ntbl->ce_mask & NEIGHTBL_ATTR_PARMS) { struct rtnl_neightbl_parms *pa = &ntbl->nt_parms; - nl_dump_line(p, " refcnt %u pending-queue-limit %u " \ - "proxy-delayed-queue-limit %u\n", - pa->ntp_refcnt, - pa->ntp_queue_len, - pa->ntp_proxy_qlen); - - nl_dump_line(p, " num-userspace-probes %u num-unicast-probes " \ - "%u num-multicast-probes %u\n", - pa->ntp_app_probes, - pa->ntp_ucast_probes, - pa->ntp_mcast_probes); - - nl_dump_line(p, " min-age %s base-reachable-time %s " \ - "stale-check-interval %s\n", - nl_msec2str(pa->ntp_locktime, x, sizeof(x)), - nl_msec2str(pa->ntp_base_reachable_time, - y, sizeof(y)), - nl_msec2str(pa->ntp_gc_stale_time, z, sizeof(z))); - - nl_dump_line(p, " initial-probe-delay %s answer-delay %s " \ - "proxy-answer-delay %s\n", - nl_msec2str(pa->ntp_probe_delay, x, sizeof(x)), - nl_msec2str(pa->ntp_anycast_delay, y, sizeof(y)), - nl_msec2str(pa->ntp_proxy_delay, z, sizeof(z))); + nl_dump_line(p, + " refcnt %u pending-queue-limit %u " + "proxy-delayed-queue-limit %u\n", + pa->ntp_refcnt, pa->ntp_queue_len, + pa->ntp_proxy_qlen); + + nl_dump_line(p, + " num-userspace-probes %u num-unicast-probes " + "%u num-multicast-probes %u\n", + pa->ntp_app_probes, pa->ntp_ucast_probes, + pa->ntp_mcast_probes); + + nl_dump_line(p, + " min-age %s base-reachable-time %s " + "stale-check-interval %s\n", + nl_msec2str(pa->ntp_locktime, x, sizeof(x)), + nl_msec2str(pa->ntp_base_reachable_time, y, + sizeof(y)), + nl_msec2str(pa->ntp_gc_stale_time, z, sizeof(z))); + + nl_dump_line(p, + " initial-probe-delay %s answer-delay %s " + "proxy-answer-delay %s\n", + nl_msec2str(pa->ntp_probe_delay, x, sizeof(x)), + nl_msec2str(pa->ntp_anycast_delay, y, sizeof(y)), + nl_msec2str(pa->ntp_proxy_delay, z, sizeof(z))); } } static void neightbl_dump_stats(struct nl_object *arg, struct nl_dump_params *p) { - struct rtnl_neightbl *ntbl = (struct rtnl_neightbl *) arg; + struct rtnl_neightbl *ntbl = (struct rtnl_neightbl *)arg; neightbl_dump_details(arg, p); if (!(ntbl->ce_mask & NEIGHTBL_ATTR_STATS)) return; - nl_dump_line(p, " " \ - " lookups %" PRIu64 \ - " hits %" PRIu64 \ - " failed %" PRIu64 \ - " allocations %" PRIu64 \ - " destroys %" PRIu64 \ - "\n", - ntbl->nt_stats.ndts_lookups, - ntbl->nt_stats.ndts_hits, - ntbl->nt_stats.ndts_res_failed, - ntbl->nt_stats.ndts_allocs, - ntbl->nt_stats.ndts_destroys); - - nl_dump_line(p, " " \ - " hash-grows %" PRIu64 \ - " forced-gc-runs %" PRIu64 \ - " periodic-gc-runs %" PRIu64 \ - "\n", - ntbl->nt_stats.ndts_hash_grows, - ntbl->nt_stats.ndts_forced_gc_runs, - ntbl->nt_stats.ndts_periodic_gc_runs); - - nl_dump_line(p, " " \ - " rcv-unicast-probes %" PRIu64 \ - " rcv-multicast-probes %" PRIu64 \ - "\n", - ntbl->nt_stats.ndts_rcv_probes_ucast, - ntbl->nt_stats.ndts_rcv_probes_mcast); + nl_dump_line(p, + " " + " lookups %llu hits %llu failed %llu" + " allocations %llu destroys %llu\n", + (long long unsigned)ntbl->nt_stats.ndts_lookups, + (long long unsigned)ntbl->nt_stats.ndts_hits, + (long long unsigned)ntbl->nt_stats.ndts_res_failed, + (long long unsigned)ntbl->nt_stats.ndts_allocs, + (long long unsigned)ntbl->nt_stats.ndts_destroys); + + nl_dump_line(p, + " " + " hash-grows %llu forced-gc-runs %llu" + " periodic-gc-runs %llu\n", + (long long unsigned)ntbl->nt_stats.ndts_hash_grows, + (long long unsigned)ntbl->nt_stats.ndts_forced_gc_runs, + (long long unsigned)ntbl->nt_stats.ndts_periodic_gc_runs); + + nl_dump_line(p, + " " + " rcv-unicast-probes %llu" + " rcv-multicast-probes %llu" + "\n", + (long long unsigned)ntbl->nt_stats.ndts_rcv_probes_ucast, + (long long unsigned)ntbl->nt_stats.ndts_rcv_probes_mcast); } /** @@ -371,12 +362,12 @@ struct rtnl_neightbl *rtnl_neightbl_alloc(void) { - return (struct rtnl_neightbl *) nl_object_alloc(&neightbl_obj_ops); + return (struct rtnl_neightbl *)nl_object_alloc(&neightbl_obj_ops); } void rtnl_neightbl_put(struct rtnl_neightbl *neightbl) { - nl_object_put((struct nl_object *) neightbl); + nl_object_put((struct nl_object *)neightbl); } /** @} */ @@ -423,11 +414,11 @@ if (cache->c_ops != &rtnl_neightbl_ops) return NULL; - nl_list_for_each_entry(nt, &cache->c_items, ce_list) { + nl_list_for_each_entry (nt, &cache->c_items, ce_list) { if (!strcasecmp(nt->nt_name, name) && ((!ifindex && !nt->nt_parms.ntp_ifindex) || (ifindex && ifindex == nt->nt_parms.ntp_ifindex))) { - nl_object_get((struct nl_object *) nt); + nl_object_get((struct nl_object *)nt); return nt; } } @@ -486,8 +477,7 @@ NLA_PUT_U32(m, NDTA_THRESH2, tmpl->nt_gc_thresh2); if (tmpl->ce_mask & NEIGHTBL_ATTR_GC_INTERVAL) - NLA_PUT_U64(m, NDTA_GC_INTERVAL, - tmpl->nt_gc_interval); + NLA_PUT_U64(m, NDTA_GC_INTERVAL, tmpl->nt_gc_interval); if (tmpl->ce_mask & NEIGHTBL_ATTR_PARMS) { struct rtnl_neightbl_parms *p = &tmpl->nt_parms; @@ -498,8 +488,7 @@ if (old->nt_parms.ntp_mask & NEIGHTBLPARM_ATTR_IFINDEX) NLA_PUT_U32(parms, NDTPA_IFINDEX, - old->nt_parms.ntp_ifindex); - + old->nt_parms.ntp_ifindex); if (p->ntp_mask & NEIGHTBLPARM_ATTR_QUEUE_LEN) NLA_PUT_U32(parms, NDTPA_QUEUE_LEN, p->ntp_queue_len); @@ -516,8 +505,7 @@ p->ntp_mcast_probes); if (p->ntp_mask & NEIGHTBLPARM_ATTR_PROXY_QLEN) - NLA_PUT_U32(parms, NDTPA_PROXY_QLEN, - p->ntp_proxy_qlen); + NLA_PUT_U32(parms, NDTPA_PROXY_QLEN, p->ntp_proxy_qlen); if (p->ntp_mask & NEIGHTBLPARM_ATTR_BASE_REACHABLE_TIME) NLA_PUT_U64(parms, NDTPA_BASE_REACHABLE_TIME, @@ -541,7 +529,7 @@ if (p->ntp_mask & NEIGHTBLPARM_ATTR_PROXY_DELAY) NLA_PUT_U64(parms, NDTPA_PROXY_DELAY, - p->ntp_proxy_delay); + p->ntp_proxy_delay); if (p->ntp_mask & NEIGHTBLPARM_ATTR_LOCKTIME) NLA_PUT_U64(parms, NDTPA_LOCKTIME, p->ntp_locktime); @@ -580,7 +568,7 @@ { struct nl_msg *msg; int err; - + if ((err = rtnl_neightbl_build_change_request(old, tmpl, &msg)) < 0) return err; @@ -631,7 +619,7 @@ void rtnl_neightbl_set_name(struct rtnl_neightbl *ntbl, const char *name) { - strncpy(ntbl->nt_name, name, sizeof(ntbl->nt_name) - 1); + _nl_strncpy_trunc(ntbl->nt_name, name, sizeof(ntbl->nt_name)); ntbl->ce_mask |= NEIGHTBL_ATTR_NAME; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/netconf.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/netconf.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/netconf.c netconf - * - * 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) 2017 David Ahern <dsa@cumulusnetworks.com> */ @@ -81,16 +74,6 @@ return (struct rtnl_netconf *) nl_object_alloc(&netconf_obj_ops); } -static int netconf_clone(struct nl_object *_dst, struct nl_object *_src) -{ - struct rtnl_netconf *dst = nl_object_priv(_dst); - struct rtnl_netconf *src = nl_object_priv(_src); - - *dst = *src; - - return 0; -} - static int netconf_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, struct nlmsghdr *nlh, struct nl_parser_param *pp) { @@ -535,7 +518,6 @@ static struct nl_object_ops netconf_obj_ops = { .oo_name = "route/netconf", .oo_size = sizeof(struct rtnl_netconf), - .oo_clone = netconf_clone, .oo_dump = { NL_DUMP_LINE = netconf_dump_line, NL_DUMP_DETAILS = netconf_dump_line,
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/nexthop.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/nexthop.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/nexthop.c Routing Nexthop - * - * 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> */ @@ -351,10 +344,6 @@ { struct nl_addr *old = nh->rtnh_newdst; - if (!nl_addr_valid(nl_addr_get_binary_addr(addr), - nl_addr_get_len(addr))) - return -NLE_INVAL; - if (addr) { nh->rtnh_newdst = nl_addr_get(addr); nh->ce_mask |= NH_ATTR_NEWDST; @@ -378,10 +367,6 @@ { struct nl_addr *old = nh->rtnh_via; - if (!nl_addr_valid(nl_addr_get_binary_addr(addr), - nl_addr_get_len(addr))) - return -NLE_INVAL; - if (addr) { nh->rtnh_via = nl_addr_get(addr); nh->ce_mask |= NH_ATTR_VIA;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/nexthop_encap.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/nexthop_encap.c
Changed
@@ -31,10 +31,13 @@ void nh_encap_dump(struct rtnl_nh_encap *rtnh_encap, struct nl_dump_params *dp) { + if (!rtnh_encap->ops) + return; + nl_dump(dp, " encap %s ", nh_encap_type2str(rtnh_encap->ops->encap_type)); - if (rtnh_encap->ops && rtnh_encap->ops->dump) + if (rtnh_encap->ops->dump) rtnh_encap->ops->dump(rtnh_encap->priv, dp); } @@ -55,7 +58,7 @@ goto nla_put_failure; err = rtnh_encap->ops->build_msg(msg, rtnh_encap->priv); - if (err) + if (err < 0) return err; nla_nest_end(msg, encap);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/nh_encap_mpls.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/nh_encap_mpls.c
Changed
@@ -34,7 +34,7 @@ return 0; nla_put_failure: - return -NLE_MSGSIZE; + return -NLE_MSGSIZE; } static void mpls_encap_destructor(void *priv) @@ -56,9 +56,8 @@ uint8_t ttl = 0; int err; - err = nla_parse_nested(tb, MPLS_IPTUNNEL_MAX, nla, mpls_encap_policy); - if (err) + if (err < 0) return err; if (!tbMPLS_IPTUNNEL_DST) @@ -109,10 +108,6 @@ if (!addr) return -NLE_INVAL; - if (!nl_addr_valid(nl_addr_get_binary_addr(addr), - nl_addr_get_len(addr))) - return -NLE_INVAL; - rtnh_encap = calloc(1, sizeof(*rtnh_encap)); if (!rtnh_encap) return -NLE_NOMEM; @@ -133,3 +128,31 @@ return 0; } + +struct nl_addr *rtnl_route_nh_get_encap_mpls_dst(struct rtnl_nexthop *nh) +{ + struct mpls_iptunnel_encap *mpls_encap; + + if (!nh->rtnh_encap || nh->rtnh_encap->ops->encap_type != LWTUNNEL_ENCAP_MPLS) + return NULL; + + mpls_encap = (struct mpls_iptunnel_encap *)nh->rtnh_encap->priv; + if (!mpls_encap) + return NULL; + + return mpls_encap->dst; +} + +uint8_t rtnl_route_nh_get_encap_mpls_ttl(struct rtnl_nexthop *nh) +{ + struct mpls_iptunnel_encap *mpls_encap; + + if (!nh->rtnh_encap || nh->rtnh_encap->ops->encap_type != LWTUNNEL_ENCAP_MPLS) + return 0; + + mpls_encap = (struct mpls_iptunnel_encap *)nh->rtnh_encap->priv; + if (!mpls_encap) + return 0; + + return mpls_encap->ttl; +}
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/pktloc.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/pktloc.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/pktloc.c Packet Location Aliasing - * - * 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-2013 Thomas Graf <tgraf@suug.ch> */ @@ -124,7 +117,7 @@ nl_init_list_head(&pktloc_name_hti); } - if ((err = pktloc_lex_init(&scanner)) < 0) { + if (pktloc_lex_init(&scanner) < 0) { err = -NLE_FAILURE; goto errout_close; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/pktloc_syntax.y -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/pktloc_syntax.y
Changed
@@ -24,6 +24,7 @@ %{ extern int pktloc_lex(YYSTYPE *, YYLTYPE *, void *); +#define pktloc_error yyerror static void yyerror(YYLTYPE *locp, void *scanner, const char *msg) { NL_DBG(1, "Error while parsing packet location file: %s\n", msg);
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc.c 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-2011 Thomas Graf <tgraf@suug.ch> */ @@ -404,6 +397,38 @@ } /** + * Search qdisc by kind + * @arg cache Qdisc cache + * @arg ifindex Interface index + * @arg kind Qdisc kind (tbf, htb, cbq, etc) + * + * Searches a qdisc cache previously allocated with rtnl_qdisc_alloc_cache() + * and searches for a qdisc matching the interface index and kind. + * + * The reference counter is incremented before returning the qdisc, therefore + * the reference must be given back with rtnl_qdisc_put() after usage. + * + * @return pointer to qdisc inside the cache or NULL if no match was found. + */ +struct rtnl_qdisc *rtnl_qdisc_get_by_kind(struct nl_cache *cache, + int ifindex, char *kind) +{ + struct rtnl_qdisc *q; + + if (cache->c_ops != &rtnl_qdisc_ops) + return NULL; + + nl_list_for_each_entry(q, &cache->c_items, ce_list) { + if ((q->q_ifindex == ifindex) && (!strcmp(q->q_kind, kind))) { + nl_object_get((struct nl_object *) q); + return q; + } + } + + return NULL; +} + +/** * Search qdisc by interface index and handle * @arg cache Qdisc cache * @arg ifindex Interface index
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/blackhole.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/blackhole.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/blackhole.c Blackhole Qdisc - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/cbq.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/cbq.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/cbq.c Class Based Queueing - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/dsmark.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/dsmark.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/dsmark.c DSMARK - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/fifo.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/fifo.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/fifo.c (p|b)fifo - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/fq_codel.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/fq_codel.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/fq_codel.c fq_codel - * - * 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) 2013 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/hfsc.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/hfsc.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/hfsc.c HFSC Qdisc - * - * 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) 2014 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/htb.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/htb.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/htb.c HTB Qdisc - * - * 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-2011 Thomas Graf <tgraf@suug.ch> * Copyright (c) 2005-2006 Petr Gotthard <petr.gotthard@siemens.com> * Copyright (c) 2005-2006 Siemens AG Oesterreich
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/ingress.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/ingress.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/ingress.c ingress - * - * 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) 2013 Cong Wang <xiyou.wangcong@gmail.com> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/mqprio.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/mqprio.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/mqprio.c MQPRIO Qdisc/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) 2018 Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se> */ @@ -271,14 +265,15 @@ if (!(mqprio->qm_mask & SCH_MQPRIO_ATTR_NUMTC)) return -NLE_MISSING_ATTR; - if ((len / sizeof(uint8_t)) > (TC_QOPT_BITMASK+1)) + if (len > TC_QOPT_BITMASK + 1) return -NLE_RANGE; - for (i = 0; i <= TC_QOPT_BITMASK; i++) { + for (i = 0; i < len; i++) { if (priomapi > mqprio->qm_num_tc) return -NLE_RANGE; } + memset(mqprio->qm_prio_map, 0, sizeof(mqprio->qm_prio_map)); memcpy(mqprio->qm_prio_map, priomap, len * sizeof(uint8_t)); mqprio->qm_mask |= SCH_MQPRIO_ATTR_PRIOMAP; @@ -366,9 +361,11 @@ if (!(mqprio->qm_mask & SCH_MQPRIO_ATTR_NUMTC)) return -NLE_MISSING_ATTR; - if ((len / sizeof(uint16_t)) > TC_QOPT_MAX_QUEUE) + if (len < 0 || len > TC_QOPT_MAX_QUEUE) return -NLE_RANGE; + memset(mqprio->qm_count, 0, sizeof(mqprio->qm_count)); + memset(mqprio->qm_offset, 0, sizeof(mqprio->qm_offset)); memcpy(mqprio->qm_count, count, len * sizeof(uint16_t)); memcpy(mqprio->qm_offset, offset, len * sizeof(uint16_t)); mqprio->qm_mask |= SCH_MQPRIO_ATTR_QUEUE; @@ -499,9 +496,10 @@ if (mqprio->qm_shaper != TC_MQPRIO_SHAPER_BW_RATE) return -NLE_INVAL; - if ((len / sizeof(uint64_t)) > TC_QOPT_MAX_QUEUE) + if (len < 0 || len > TC_QOPT_MAX_QUEUE) return -NLE_RANGE; + memset(mqprio->qm_min_rate, 0, sizeof(mqprio->qm_min_rate)); memcpy(mqprio->qm_min_rate, min, len * sizeof(uint64_t)); mqprio->qm_mask |= SCH_MQPRIO_ATTR_MIN_RATE; @@ -548,9 +546,10 @@ if (mqprio->qm_shaper != TC_MQPRIO_SHAPER_BW_RATE) return -NLE_INVAL; - if ((len / sizeof(uint64_t)) > TC_QOPT_MAX_QUEUE) + if (len < 0 || len > TC_QOPT_MAX_QUEUE) return -NLE_RANGE; + memset(mqprio->qm_max_rate, 0, sizeof(mqprio->qm_max_rate)); memcpy(mqprio->qm_max_rate, max, len * sizeof(uint64_t)); mqprio->qm_mask |= SCH_MQPRIO_ATTR_MAX_RATE;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/netem.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/netem.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/netem.c Network Emulator Qdisc - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */ @@ -26,6 +20,8 @@ #include <netlink/route/qdisc.h> #include <netlink/route/qdisc/netem.h> +#include "netlink-private/utils.h" + /** @cond SKIP */ #define SCH_NETEM_ATTR_LATENCY 0x0001 #define SCH_NETEM_ATTR_LIMIT 0x0002 @@ -165,39 +161,39 @@ nl_dump(p, " jitter %s", buf); if (netem->qnm_mask & SCH_NETEM_ATTR_DELAY_CORR && netem->qnm_corr.nmc_delay > 0) - nl_dump(p, " %d%", netem->qnm_corr.nmc_delay); + nl_dump(p, " %d", netem->qnm_corr.nmc_delay); } } if (netem->qnm_mask & SCH_NETEM_ATTR_LOSS && netem->qnm_loss > 0) { - nl_dump(p, " loss %d%", netem->qnm_loss); + nl_dump(p, " loss %d", netem->qnm_loss); if (netem->qnm_mask & SCH_NETEM_ATTR_LOSS_CORR && netem->qnm_corr.nmc_loss > 0) - nl_dump(p, " %d%", netem->qnm_corr.nmc_loss); + nl_dump(p, " %d", netem->qnm_corr.nmc_loss); } if (netem->qnm_mask & SCH_NETEM_ATTR_DUPLICATE && netem->qnm_duplicate > 0) { - nl_dump(p, " duplicate %d%", netem->qnm_duplicate); + nl_dump(p, " duplicate %d", netem->qnm_duplicate); if (netem->qnm_mask & SCH_NETEM_ATTR_DUP_CORR && netem->qnm_corr.nmc_duplicate > 0) - nl_dump(p, " %d%", netem->qnm_corr.nmc_duplicate); + nl_dump(p, " %d", netem->qnm_corr.nmc_duplicate); } if (netem->qnm_mask & SCH_NETEM_ATTR_RO_PROB && netem->qnm_ro.nmro_probability > 0) { - nl_dump(p, " reorder %d%", netem->qnm_ro.nmro_probability); + nl_dump(p, " reorder %d", netem->qnm_ro.nmro_probability); if (netem->qnm_mask & SCH_NETEM_ATTR_RO_CORR && netem->qnm_ro.nmro_correlation > 0) - nl_dump(p, " %d%", netem->qnm_ro.nmro_correlation); + nl_dump(p, " %d", netem->qnm_ro.nmro_correlation); if (netem->qnm_mask & SCH_NETEM_ATTR_GAP && netem->qnm_gap > 0) nl_dump(p, " gap %d", netem->qnm_gap); } if (netem->qnm_mask & SCH_NETEM_ATTR_CORRUPT_PROB && netem->qnm_crpt.nmcr_probability > 0) { - nl_dump(p, " reorder %d%", netem->qnm_crpt.nmcr_probability); + nl_dump(p, " reorder %d", netem->qnm_crpt.nmcr_probability); if (netem->qnm_mask & SCH_NETEM_ATTR_CORRUPT_CORR && netem->qnm_crpt.nmcr_correlation > 0) - nl_dump(p, " %d%", netem->qnm_crpt.nmcr_correlation); + nl_dump(p, " %d", netem->qnm_crpt.nmcr_correlation); } } } @@ -911,10 +907,10 @@ int n = 0; size_t i; size_t len = 2048; - char *line; + _nl_auto_free char *line = NULL; char nameNAME_MAX; char dist_suffix = ".dist"; - int16_t *data; + _nl_auto_free int16_t *data = NULL; char *test_suffix; /* Check several locations for the dist file */ @@ -940,9 +936,12 @@ if (f == NULL) return -nl_syserr2nlerr(errno); - data = (int16_t *) calloc (MAXDIST, sizeof(int16_t)); - - line = (char *) calloc (sizeof(char), len + 1); + data = (int16_t *) calloc(MAXDIST, sizeof(int16_t)); + line = (char *) calloc(sizeof(char), len + 1); + if (!data || !line) { + fclose(f); + return -NLE_NOMEM; + } while (getline(&line, &len, f) != -1) { char *p, *endp; @@ -955,7 +954,6 @@ if (endp == p) break; if (n >= MAXDIST) { - free(line); fclose(f); return -NLE_INVAL; } @@ -963,11 +961,8 @@ } } - free(line); fclose(f); - i = rtnl_netem_set_delay_distribution_data(qdisc, data, n); - free(data); return i; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/plug.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/plug.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/plug.c PLUG Qdisc - * - * 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) 2012 Shriram Rajagopalan <rshriram@cs.ubc.ca> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/prio.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/prio.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/prio.c PRIO Qdisc/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) 2003-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/red.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/red.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/red.c RED Qdisc - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/sfq.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/sfq.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/sfq.c SFQ Qdisc - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/qdisc/tbf.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/qdisc/tbf.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/qdisc/tbf.c TBF Qdisc - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */ @@ -121,9 +115,9 @@ cl = nl_cancel_down_bits(1 << tbf->qt_peakrate.rs_cell_log, &clu); - nl_dump_line(p, " peak-rate %.2f%s/s (%.0f%s) " - "bucket-size %.1f%s cell-size %.1f%s" - "latency %.1f%s", + nl_dump_line(p, + " peak-rate %.2f%s/s (%.0f%s) " + "bucket-size %.1f%s cell-size %.1f%s", pr, pru, prb, prbu, bs, bsu, cl, clu); } }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/route.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/route.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/route.c 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-2008 Thomas Graf <tgraf@suug.ch> */ @@ -18,6 +11,7 @@ */ #include <netlink-private/netlink.h> +#include <netlink-private/nl-auto.h> #include <netlink/netlink.h> #include <netlink/cache.h> #include <netlink/utils.h> @@ -131,6 +125,32 @@ result); } +int rtnl_route_lookup(struct nl_sock *sk, struct nl_addr *dst, + struct rtnl_route **result) +{ + _nl_auto_nl_msg struct nl_msg *msg = NULL; + _nl_auto_rtnl_route struct rtnl_route *tmpl = NULL; + struct nl_object *obj; + int err; + + tmpl = rtnl_route_alloc(); + rtnl_route_set_dst(tmpl, dst); + err = build_route_msg(tmpl, RTM_GETROUTE, 0, &msg); + if (err < 0) + return err; + + err = nl_send_auto(sk, msg); + if (err < 0) + return err; + + if ((err = nl_pickup(sk, route_msg_parser, &obj)) < 0) + return err; + + *result = (struct rtnl_route *)obj; + wait_for_ack(sk); + return 0; +} + int rtnl_route_add(struct nl_sock *sk, struct rtnl_route *route, int flags) { struct nl_msg *msg;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/route_obj.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/route_obj.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/route_obj.c Route Object - * - * 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> */ @@ -105,22 +98,27 @@ struct rtnl_route *src = (struct rtnl_route *) _src; struct rtnl_nexthop *nh, *new; - if (src->rt_dst) + dst->rt_dst = NULL; + dst->rt_src = NULL; + dst->rt_pref_src = NULL; + nl_init_list_head(&dst->rt_nexthops); + dst->rt_nr_nh = 0; + + if (src->rt_dst) { if (!(dst->rt_dst = nl_addr_clone(src->rt_dst))) return -NLE_NOMEM; + } - if (src->rt_src) + if (src->rt_src) { if (!(dst->rt_src = nl_addr_clone(src->rt_src))) return -NLE_NOMEM; + } - if (src->rt_pref_src) + if (src->rt_pref_src) { if (!(dst->rt_pref_src = nl_addr_clone(src->rt_pref_src))) return -NLE_NOMEM; + } - /* Will be inc'ed again while adding the nexthops of the source */ - dst->rt_nr_nh = 0; - - nl_init_list_head(&dst->rt_nexthops); nl_list_for_each_entry(nh, &src->rt_nexthops, rtnh_list) { new = rtnl_route_nh_clone(nh); if (!new) @@ -211,8 +209,8 @@ static void route_dump_details(struct nl_object *a, struct nl_dump_params *p) { + _nl_auto_nl_cache struct nl_cache *link_cache = NULL; struct rtnl_route *r = (struct rtnl_route *) a; - struct nl_cache *link_cache; char buf256; int i; @@ -282,9 +280,6 @@ r->rt_metricsi); nl_dump(p, "\n"); } - - if (link_cache) - nl_cache_put(link_cache); } static void route_dump_stats(struct nl_object *obj, struct nl_dump_params *p) @@ -310,13 +305,13 @@ struct rtnl_route *route = (struct rtnl_route *) obj; unsigned int rkey_sz; struct nl_addr *addr = NULL; - struct route_hash_key { + _nl_auto_free struct route_hash_key { uint8_t rt_family; uint8_t rt_tos; uint32_t rt_table; uint32_t rt_prio; char rt_addr0; - } __attribute__((packed)) *rkey; + } __attribute__((packed)) *rkey = NULL; #ifdef NL_DEBUG char bufINET6_ADDRSTRLEN+5; #endif @@ -348,8 +343,6 @@ rkey->rt_table, nl_addr2str(addr, buf, sizeof(buf)), rkey_sz, *hashkey); - free(rkey); - return; } @@ -512,6 +505,16 @@ switch(action) { case RTM_NEWROUTE : { struct rtnl_nexthop *cloned_nh; + struct rtnl_nexthop *old_nh; + + /* + * Do not add the nexthop to old route if it was already added before + */ + nl_list_for_each_entry(old_nh, &old_route->rt_nexthops, rtnh_list) { + if (!rtnl_route_nh_compare(old_nh, new_nh, ~0, 0)) { + return 0; + } + } /* * Add the nexthop to old route @@ -1022,12 +1025,13 @@ static int parse_multipath(struct rtnl_route *route, struct nlattr *attr) { - struct rtnl_nexthop *nh = NULL; struct rtnexthop *rtnh = nla_data(attr); size_t tlen = nla_len(attr); int err; while (tlen >= sizeof(*rtnh) && tlen >= rtnh->rtnh_len) { + _nl_auto_rtnl_nexthop struct rtnl_nexthop *nh = NULL; + nh = rtnl_route_nh_alloc(); if (!nh) return -NLE_NOMEM; @@ -1044,20 +1048,17 @@ rtnh->rtnh_len - sizeof(*rtnh), route_policy); if (err < 0) - goto errout; + return err; if (ntbRTA_GATEWAY) { - struct nl_addr *addr; + _nl_auto_nl_addr struct nl_addr *addr = NULL; addr = nl_addr_alloc_attr(ntbRTA_GATEWAY, route->rt_family); - if (!addr) { - err = -NLE_NOMEM; - goto errout; - } + if (!addr) + return -NLE_NOMEM; rtnl_route_nh_set_gateway(nh, addr); - nl_addr_put(addr); } if (ntbRTA_FLOW) { @@ -1068,72 +1069,67 @@ } if (ntbRTA_NEWDST) { - struct nl_addr *addr; + _nl_auto_nl_addr struct nl_addr *addr = NULL; addr = nl_addr_alloc_attr(ntbRTA_NEWDST, route->rt_family); if (!addr) - goto errout; + return -NLE_NOMEM; err = rtnl_route_nh_set_newdst(nh, addr); - nl_addr_put(addr); - if (err) - goto errout; + if (err < 0) + return err; } if (ntbRTA_VIA) { - struct nl_addr *addr; + _nl_auto_nl_addr struct nl_addr *addr = NULL; addr = rtnl_route_parse_via(ntbRTA_VIA); if (!addr) - goto errout; + return -NLE_NOMEM; err = rtnl_route_nh_set_via(nh, addr); - nl_addr_put(addr); - if (err) - goto errout; + if (err < 0) + return err; } if (ntbRTA_ENCAP && ntbRTA_ENCAP_TYPE) { err = nh_encap_parse_msg(ntbRTA_ENCAP, ntbRTA_ENCAP_TYPE, nh); - if (err) - goto errout; + if (err < 0) + return err; } } - rtnl_route_add_nexthop(route, nh); + rtnl_route_add_nexthop(route, _nl_steal_pointer(&nh)); tlen -= RTNH_ALIGN(rtnh->rtnh_len); rtnh = RTNH_NEXT(rtnh); } - err = 0; -errout: - if (err && nh) - rtnl_route_nh_free(nh); - - return err; + return 0; } int rtnl_route_parse(struct nlmsghdr *nlh, struct rtnl_route **result) { - struct rtmsg *rtm; - struct rtnl_route *route; + _nl_auto_rtnl_route struct rtnl_route *route = NULL; + _nl_auto_rtnl_nexthop struct rtnl_nexthop *old_nh = NULL; + _nl_auto_nl_addr struct nl_addr *src = NULL; + _nl_auto_nl_addr struct nl_addr *dst = NULL; struct nlattr *tbRTA_MAX + 1; - struct nl_addr *src = NULL, *dst = NULL, *addr; - struct rtnl_nexthop *old_nh = NULL; - int err, family; + struct rtmsg *rtm; + int family; + int err; route = rtnl_route_alloc(); if (!route) - goto errout_nomem; + return -NLE_NOMEM; route->ce_msgtype = nlh->nlmsg_type; err = nlmsg_parse(nlh, sizeof(struct rtmsg), tb, RTA_MAX, route_policy); if (err < 0) - goto errout; + return err; rtm = nlmsg_data(nlh); route->rt_family = family = rtm->rtm_family; @@ -1158,31 +1154,28 @@ if (tbRTA_DST) { if (!(dst = nl_addr_alloc_attr(tbRTA_DST, family))) - goto errout_nomem; + return -NLE_NOMEM; } else { if (!(dst = nl_addr_alloc(0))) - goto errout_nomem; + return -NLE_NOMEM; nl_addr_set_family(dst, rtm->rtm_family); } nl_addr_set_prefixlen(dst, rtm->rtm_dst_len); err = rtnl_route_set_dst(route, dst); if (err < 0) - goto errout; - - nl_addr_put(dst); + return err; if (tbRTA_SRC) { if (!(src = nl_addr_alloc_attr(tbRTA_SRC, family))) - goto errout_nomem; + return -NLE_NOMEM; } else if (rtm->rtm_src_len) if (!(src = nl_addr_alloc(0))) - goto errout_nomem; + return -NLE_NOMEM; if (src) { nl_addr_set_prefixlen(src, rtm->rtm_src_len); rtnl_route_set_src(route, src); - nl_addr_put(src); } if (tbRTA_TABLE) @@ -1195,10 +1188,11 @@ rtnl_route_set_priority(route, nla_get_u32(tbRTA_PRIORITY)); if (tbRTA_PREFSRC) { + _nl_auto_nl_addr struct nl_addr *addr = NULL; + if (!(addr = nl_addr_alloc_attr(tbRTA_PREFSRC, family))) - goto errout_nomem; + return -NLE_NOMEM; rtnl_route_set_pref_src(route, addr); - nl_addr_put(addr); } if (tbRTA_METRICS) { @@ -1207,7 +1201,7 @@ err = nla_parse_nested(mtb, RTAX_MAX, tbRTA_METRICS, NULL); if (err < 0) - goto errout; + return err; for (i = 1; i <= RTAX_MAX; i++) { if (mtbi && nla_len(mtbi) >= sizeof(uint32_t)) { @@ -1215,14 +1209,15 @@ err = rtnl_route_set_metric(route, i, m); if (err < 0) - goto errout; + return err; } } } - if (tbRTA_MULTIPATH) + if (tbRTA_MULTIPATH) { if ((err = parse_multipath(route, tbRTA_MULTIPATH)) < 0) - goto errout; + return err; + } if (tbRTA_CACHEINFO) { nla_memcpy(&route->rt_cacheinfo, tbRTA_CACHEINFO, @@ -1232,60 +1227,60 @@ if (tbRTA_OIF) { if (!old_nh && !(old_nh = rtnl_route_nh_alloc())) - goto errout_nomem; + return -NLE_NOMEM; rtnl_route_nh_set_ifindex(old_nh, nla_get_u32(tbRTA_OIF)); } if (tbRTA_GATEWAY) { + _nl_auto_nl_addr struct nl_addr *addr = NULL; + if (!old_nh && !(old_nh = rtnl_route_nh_alloc())) - goto errout_nomem; + return -NLE_NOMEM; if (!(addr = nl_addr_alloc_attr(tbRTA_GATEWAY, family))) - goto errout_nomem; + return -NLE_NOMEM; rtnl_route_nh_set_gateway(old_nh, addr); - nl_addr_put(addr); } if (tbRTA_FLOW) { if (!old_nh && !(old_nh = rtnl_route_nh_alloc())) - goto errout_nomem; + return -NLE_NOMEM; rtnl_route_nh_set_realms(old_nh, nla_get_u32(tbRTA_FLOW)); } if (tbRTA_NEWDST) { - struct nl_addr *addr; + _nl_auto_nl_addr struct nl_addr *addr = NULL; if (!old_nh && !(old_nh = rtnl_route_nh_alloc())) - goto errout_nomem; + return -NLE_NOMEM; addr = nl_addr_alloc_attr(tbRTA_NEWDST, route->rt_family); if (!addr) - goto errout_nomem; + return -NLE_NOMEM; err = rtnl_route_nh_set_newdst(old_nh, addr); - nl_addr_put(addr); - if (err) - goto errout; + if (err < 0) + return err; } if (tbRTA_VIA) { int alen = nla_len(tbRTA_VIA) - offsetof(struct rtvia, rtvia_addr); + _nl_auto_nl_addr struct nl_addr *addr = NULL; struct rtvia *via = nla_data(tbRTA_VIA); if (!old_nh && !(old_nh = rtnl_route_nh_alloc())) - goto errout_nomem; + return -NLE_NOMEM; addr = nl_addr_build(via->rtvia_family, via->rtvia_addr, alen); if (!addr) - goto errout_nomem; + return -NLE_NOMEM; err = rtnl_route_nh_set_via(old_nh, addr); - nl_addr_put(addr); - if (err) - goto errout; + if (err < 0) + return err; } if (tbRTA_TTL_PROPAGATE) { @@ -1295,12 +1290,12 @@ if (tbRTA_ENCAP && tbRTA_ENCAP_TYPE) { if (!old_nh && !(old_nh = rtnl_route_nh_alloc())) - goto errout_nomem; + return -NLE_NOMEM; err = nh_encap_parse_msg(tbRTA_ENCAP, tbRTA_ENCAP_TYPE, old_nh); - if (err) - goto errout; + if (err < 0) + return err; } if (old_nh) { @@ -1309,7 +1304,7 @@ /* If no nexthops have been provided via RTA_MULTIPATH * we add it as regular nexthop to maintain backwards * compatibility */ - rtnl_route_add_nexthop(route, old_nh); + rtnl_route_add_nexthop(route, _nl_steal_pointer(&old_nh)); } else { /* Kernel supports new style nexthop configuration, * verify that it is a duplicate and discard nexthop. */ @@ -1323,27 +1318,13 @@ if (rtnl_route_nh_compare(old_nh, first, old_nh->ce_mask, 0)) { - err = -NLE_INVAL; - goto errout; + return -NLE_INVAL; } - - rtnl_route_nh_free(old_nh); } - old_nh = NULL; } - *result = route; + *result = _nl_steal_pointer(&route); return 0; - -errout: - if (old_nh) - rtnl_route_nh_free(old_nh); - rtnl_route_put(route); - return err; - -errout_nomem: - err = -NLE_NOMEM; - goto errout; } int rtnl_route_build_msg(struct nl_msg *msg, struct rtnl_route *route)
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/route_utils.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/route_utils.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/route_utils.c Routing 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-2006 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/rtnl.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/rtnl.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/rtnl.c Routing 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-2012 Thomas Graf <tgraf@suug.ch> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/rule.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/rule.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/rule.c Routing Rules - * - * 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> */ @@ -66,6 +59,9 @@ struct rtnl_rule *dst = nl_object_priv(_dst); struct rtnl_rule *src = nl_object_priv(_src); + dst->r_src = NULL; + dst->r_dst = NULL; + if (src->r_src) if (!(dst->r_src = nl_addr_clone(src->r_src))) return -NLE_NOMEM;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/route/tc.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/route/tc.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/route/tc.c Traffic Control - * - * 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-2011 Thomas Graf <tgraf@suug.ch> */ @@ -536,7 +529,7 @@ || strlen (kind) >= sizeof (tc->tc_kind)) return -NLE_INVAL; - _nl_strncpy(tc->tc_kind, kind, sizeof(tc->tc_kind)); + _nl_strncpy_assert(tc->tc_kind, kind, sizeof(tc->tc_kind)); tc->ce_mask |= TCA_ATTR_KIND; @@ -815,14 +808,17 @@ struct rtnl_tc *src = TC_CAST(srcobj); struct rtnl_tc_ops *ops; + dst->tc_opts = NULL; + dst->tc_xstats = NULL; + dst->tc_subdata = NULL; + dst->tc_link = NULL; + dst->tc_ops = NULL; + if (src->tc_link) { nl_object_get(OBJ_CAST(src->tc_link)); dst->tc_link = src->tc_link; } - dst->tc_opts = NULL; - dst->tc_xstats = NULL; - dst->tc_subdata = NULL; dst->ce_mask &= ~(TCA_ATTR_OPTS | TCA_ATTR_XSTATS); @@ -844,18 +840,19 @@ if (!(dst->tc_subdata = nl_data_clone(src->tc_subdata))) { return -NLE_NOMEM; } - } - - ops = rtnl_tc_get_ops(src); - if (ops && ops->to_clone) { - void *a = rtnl_tc_data(dst), *b = rtnl_tc_data(src); - - if (!a) - return 0; - else if (!b) - return -NLE_NOMEM; - return ops->to_clone(a, b); + /* Warning: if the data contains pointer, then at this point, dst->tc_subdata + * will alias those pointers. + * + * ops->to_clone() MUST fix that. + * + * If the type is actually "struct rtnl_act", then to_clone() must also + * fix dangling "a_next" pointer. */ + + ops = rtnl_tc_get_ops(src); + if (ops && ops->to_clone) { + return ops->to_clone(rtnl_tc_data(dst), rtnl_tc_data(src)); + } } return 0; @@ -952,22 +949,19 @@ res = nl_cancel_down_bytes(tc->tc_statsRTNL_TC_BYTES, &unit); - nl_dump_line(p, - " %10.2f %3s %10u %-10u %-10u %-10u %-10u\n", - res, unit, - tc->tc_statsRTNL_TC_PACKETS, - tc->tc_statsRTNL_TC_DROPS, - tc->tc_statsRTNL_TC_OVERLIMITS, - tc->tc_statsRTNL_TC_QLEN, - tc->tc_statsRTNL_TC_BACKLOG); + nl_dump_line( + p, + " %10.2f %3s %10llu %-10llu %-10llu %-10llu %-10llu\n", + res, unit, (long long unsigned)tc->tc_statsRTNL_TC_PACKETS, + (long long unsigned)tc->tc_statsRTNL_TC_DROPS, + (long long unsigned)tc->tc_statsRTNL_TC_OVERLIMITS, + (long long unsigned)tc->tc_statsRTNL_TC_QLEN, + (long long unsigned)tc->tc_statsRTNL_TC_BACKLOG); res = nl_cancel_down_bytes(tc->tc_statsRTNL_TC_RATE_BPS, &unit); - nl_dump_line(p, - " %10.2f %3s/s %10u/s\n", - res, - unit, - tc->tc_statsRTNL_TC_RATE_PPS); + nl_dump_line(p, " %10.2f %3s/s %10llu/s\n", res, unit, + (long long unsigned)tc->tc_statsRTNL_TC_RATE_PPS); } uint64_t rtnl_tc_compare(struct nl_object *aobj, struct nl_object *bobj,
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/socket.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/socket.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/socket.c Netlink Socket - * - * 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> */ @@ -66,7 +59,8 @@ static uint32_t generate_local_port(void) { - int i, j, n, m; + int i, j, m; + uint16_t n; static uint16_t idx_state = 0; uint32_t pid = getpid() & 0x3FFFFF; @@ -98,7 +92,7 @@ continue; for (m = 0; m < 32; m++) { - n = (n + 13) % 32; + n = (n + 13u) % 32u; if (1UL & (used_ports_mapi >> n)) continue; @@ -111,7 +105,7 @@ nl_write_unlock(&port_map_lock); /* ensure we don't return zero. */ - pid = pid + (((uint32_t)n) << 22); + pid = pid + (n << 22); return pid ? pid : 1024; } }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/utils.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/utils.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/utils.c Utility Functions - * - * 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> */ @@ -475,7 +468,7 @@ else if ((ev = getenv("PROC_ROOT"))) snprintf(name, sizeof(name), "%s/net/psched", ev); else - strncpy(name, "/proc/net/psched", sizeof(name) - 1); + _nl_strncpy_assert(name, "/proc/net/psched", sizeof(name)); if ((fd = fopen(name, "re"))) { unsigned int ns_per_usec, ns_per_tick, nom, denom; @@ -1224,6 +1217,15 @@ NL_CAPABILITY_VERSION_3_4_0, NL_CAPABILITY_ROUTE_FIX_VLAN_SET_EGRESS_MAP, NL_CAPABILITY_VERSION_3_5_0, + NL_CAPABILITY_NL_OBJECT_IDENTICAL_PARTIAL, + NL_CAPABILITY_VERSION_3_6_0), + _NL_SET (4, + NL_CAPABILITY_VERSION_3_7_0, + 0, + 0, + 0, + 0, + 0, 0, 0), /* IMPORTANT: these capability numbers are intended to be universal and stable
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/version.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/version.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * lib/version.c Run-time version information - * - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/xfrm/ae.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/xfrm/ae.c
Changed
@@ -164,17 +164,23 @@ struct xfrmnl_ae* dst = nl_object_priv(_dst); struct xfrmnl_ae* src = nl_object_priv(_src); - if (src->sa_id.daddr) + dst->sa_id.daddr = NULL; + dst->saddr = NULL; + dst->replay_state_esn = NULL; + + if (src->sa_id.daddr) { if ((dst->sa_id.daddr = nl_addr_clone (src->sa_id.daddr)) == NULL) return -NLE_NOMEM; + } - if (src->saddr) + if (src->saddr) { if ((dst->saddr = nl_addr_clone (src->saddr)) == NULL) return -NLE_NOMEM; + } - if (src->replay_state_esn) - { + if (src->replay_state_esn) { uint32_t len = sizeof (struct xfrmnl_replay_state_esn) + (sizeof (uint32_t) * src->replay_state_esn->bmp_len); + if ((dst->replay_state_esn = malloc (len)) == NULL) return -NLE_NOMEM; memcpy (dst->replay_state_esn, src->replay_state_esn, len); @@ -308,8 +314,9 @@ ae->flags, ae->mark.m, ae->mark.v); nl_dump_line(p, "\tlifetime current: \n"); - nl_dump_line(p, "\t\tbytes %llu packets %llu \n", ae->lifetime_cur.bytes, - ae->lifetime_cur.packets); + nl_dump_line(p, "\t\tbytes %llu packets %llu \n", + (long long unsigned)ae->lifetime_cur.bytes, + (long long unsigned)ae->lifetime_cur.packets); if (ae->lifetime_cur.add_time != 0) { add_time = ae->lifetime_cur.add_time; @@ -375,6 +382,8 @@ !(tmpl->ce_mask & XFRM_AE_ATTR_PROTO)) return -NLE_MISSING_ATTR; + memset(&ae_id, 0, sizeof(ae_id)); + memcpy (&ae_id.sa_id.daddr, nl_addr_get_binary_addr (tmpl->sa_id.daddr), sizeof (uint8_t) * nl_addr_get_len (tmpl->sa_id.daddr)); ae_id.sa_id.spi = htonl(tmpl->sa_id.spi); ae_id.sa_id.family = tmpl->sa_id.family;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/xfrm/sa.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/xfrm/sa.c
Changed
@@ -78,6 +78,7 @@ #define XFRM_SA_ATTR_REPLAY_MAXDIFF 0x1000000 #define XFRM_SA_ATTR_REPLAY_STATE 0x2000000 #define XFRM_SA_ATTR_EXPIRE 0x4000000 +#define XFRM_SA_ATTR_OFFLOAD_DEV 0x8000000 static struct nl_cache_ops xfrmnl_sa_ops; static struct nl_object_ops xfrm_sa_obj_ops; @@ -125,6 +126,8 @@ free (sa->sec_ctx); if (sa->replay_state_esn) free (sa->replay_state_esn); + if (sa->user_offload) + free(sa->user_offload); } static int xfrm_sa_clone(struct nl_object *_dst, struct nl_object *_src) @@ -133,6 +136,20 @@ struct xfrmnl_sa* src = nl_object_priv(_src); uint32_t len = 0; + dst->sel = NULL; + dst->id.daddr = NULL; + dst->saddr = NULL; + dst->lft = NULL; + dst->aead = NULL; + dst->auth = NULL; + dst->crypt = NULL; + dst->comp = NULL; + dst->encap = NULL; + dst->coaddr = NULL; + dst->sec_ctx = NULL; + dst->replay_state_esn = NULL; + dst->user_offload = NULL; + if (src->sel) if ((dst->sel = xfrmnl_sel_clone (src->sel)) == NULL) return -NLE_NOMEM; @@ -149,40 +166,35 @@ if ((dst->saddr = nl_addr_clone (src->saddr)) == NULL) return -NLE_NOMEM; - if (src->aead) - { + if (src->aead) { len = sizeof (struct xfrmnl_algo_aead) + ((src->aead->alg_key_len + 7) / 8); if ((dst->aead = calloc (1, len)) == NULL) return -NLE_NOMEM; memcpy ((void *)dst->aead, (void *)src->aead, len); } - if (src->auth) - { + if (src->auth) { len = sizeof (struct xfrmnl_algo_auth) + ((src->auth->alg_key_len + 7) / 8); if ((dst->auth = calloc (1, len)) == NULL) return -NLE_NOMEM; memcpy ((void *)dst->auth, (void *)src->auth, len); } - if (src->crypt) - { + if (src->crypt) { len = sizeof (struct xfrmnl_algo) + ((src->crypt->alg_key_len + 7) / 8); if ((dst->crypt = calloc (1, len)) == NULL) return -NLE_NOMEM; memcpy ((void *)dst->crypt, (void *)src->crypt, len); } - if (src->comp) - { + if (src->comp) { len = sizeof (struct xfrmnl_algo) + ((src->comp->alg_key_len + 7) / 8); if ((dst->comp = calloc (1, len)) == NULL) return -NLE_NOMEM; memcpy ((void *)dst->comp, (void *)src->comp, len); } - if (src->encap) - { + if (src->encap) { len = sizeof (struct xfrmnl_encap_tmpl); if ((dst->encap = calloc (1, len)) == NULL) return -NLE_NOMEM; @@ -193,22 +205,26 @@ if ((dst->coaddr = nl_addr_clone (src->coaddr)) == NULL) return -NLE_NOMEM; - if (src->sec_ctx) - { + if (src->sec_ctx) { len = sizeof (*src->sec_ctx) + src->sec_ctx->ctx_len; if ((dst->sec_ctx = calloc (1, len)) == NULL) return -NLE_NOMEM; memcpy ((void *)dst->sec_ctx, (void *)src->sec_ctx, len); } - if (src->replay_state_esn) - { + if (src->replay_state_esn) { len = sizeof (struct xfrmnl_replay_state_esn) + (src->replay_state_esn->bmp_len * sizeof (uint32_t)); if ((dst->replay_state_esn = calloc (1, len)) == NULL) return -NLE_NOMEM; memcpy ((void *)dst->replay_state_esn, (void *)src->replay_state_esn, len); } + if (src->user_offload) { + dst->user_offload = _nl_memdup_ptr(src->user_offload); + if (!dst->user_offload) + return -NLE_NOMEM; + } + return 0; } @@ -333,6 +349,7 @@ __ADD(XFRM_SA_ATTR_REPLAY_MAXDIFF, replay_maxdiff), __ADD(XFRM_SA_ATTR_REPLAY_STATE, replay_state), __ADD(XFRM_SA_ATTR_EXPIRE, expire), + __ADD(XFRM_SA_ATTR_OFFLOAD_DEV, user_offload), }; static char* xfrm_sa_attrs2str(int attrs, char *buf, size_t len) @@ -430,14 +447,23 @@ sprintf (mode, "INF"); else sprintf (mode, "%" PRIu64, sa->lft->hard_packet_limit); - nl_dump_line(p, "\t\thard limit: %s (bytes), %s (packets)\n", flags, mode); - nl_dump_line(p, "\t\tsoft add_time: %llu (seconds), soft use_time: %llu (seconds) \n", - sa->lft->soft_add_expires_seconds, sa->lft->soft_use_expires_seconds); - nl_dump_line(p, "\t\thard add_time: %llu (seconds), hard use_time: %llu (seconds) \n", - sa->lft->hard_add_expires_seconds, sa->lft->hard_use_expires_seconds); + nl_dump_line(p, "\t\thard limit: %s (bytes), %s (packets)\n", flags, + mode); + nl_dump_line( + p, + "\t\tsoft add_time: %llu (seconds), soft use_time: %llu (seconds) \n", + (long long unsigned)sa->lft->soft_add_expires_seconds, + (long long unsigned)sa->lft->soft_use_expires_seconds); + nl_dump_line( + p, + "\t\thard add_time: %llu (seconds), hard use_time: %llu (seconds) \n", + (long long unsigned)sa->lft->hard_add_expires_seconds, + (long long unsigned)sa->lft->hard_use_expires_seconds); nl_dump_line(p, "\tlifetime current: \n"); - nl_dump_line(p, "\t\t%llu bytes, %llu packets\n", sa->curlft.bytes, sa->curlft.packets); + nl_dump_line(p, "\t\t%llu bytes, %llu packets\n", + (long long unsigned)sa->curlft.bytes, + (long long unsigned)sa->curlft.packets); if (sa->curlft.add_time != 0) { add_time = sa->curlft.add_time; @@ -639,6 +665,7 @@ XFRMA_SEC_CTX = { .minlen = sizeof(struct xfrm_sec_ctx) }, XFRMA_LTIME_VAL = { .minlen = sizeof(struct xfrm_lifetime_cur) }, XFRMA_REPLAY_VAL = { .minlen = sizeof(struct xfrm_replay_state) }, + XFRMA_OFFLOAD_DEV = { .minlen = sizeof(struct xfrm_user_offload) }, XFRMA_REPLAY_THRESH = { .type = NLA_U32 }, XFRMA_ETIMER_THRESH = { .type = NLA_U32 }, XFRMA_SRCADDR = { .minlen = sizeof(xfrm_address_t) }, @@ -650,11 +677,7 @@ static int xfrm_sa_request_update(struct nl_cache *c, struct nl_sock *h) { - struct xfrm_id sa_id; - - memset (&sa_id, 0, sizeof (sa_id)); - return nl_send_simple (h, XFRM_MSG_GETSA, NLM_F_DUMP, - &sa_id, sizeof (sa_id)); + return nl_send_simple (h, XFRM_MSG_GETSA, NLM_F_DUMP, NULL, 0); } int xfrmnl_sa_parse(struct nlmsghdr *n, struct xfrmnl_sa **result) @@ -699,6 +722,8 @@ addr = nl_addr_build (sa_info->sel.family, &sa_info->sel.daddr.a6, sizeof (sa_info->sel.daddr.a6)); nl_addr_set_prefixlen (addr, sa_info->sel.prefixlen_d); xfrmnl_sel_set_daddr (sa->sel, addr); + /* Drop the reference count from the above set operation */ + nl_addr_put(addr); xfrmnl_sel_set_prefixlen_d (sa->sel, sa_info->sel.prefixlen_d); if (sa_info->sel.family == AF_INET) @@ -707,6 +732,8 @@ addr = nl_addr_build (sa_info->sel.family, &sa_info->sel.saddr.a6, sizeof (sa_info->sel.saddr.a6)); nl_addr_set_prefixlen (addr, sa_info->sel.prefixlen_s); xfrmnl_sel_set_saddr (sa->sel, addr); + /* Drop the reference count from the above set operation */ + nl_addr_put(addr); xfrmnl_sel_set_prefixlen_s (sa->sel, sa_info->sel.prefixlen_s); xfrmnl_sel_set_dport (sa->sel, ntohs(sa_info->sel.dport)); @@ -913,6 +940,22 @@ sa->replay_state_esn = NULL; } + if (tbXFRMA_OFFLOAD_DEV) { + struct xfrm_user_offload *offload; + + len = sizeof(struct xfrmnl_user_offload); + + if ((sa->user_offload = calloc(1, len)) == NULL) { + err = -NLE_NOMEM; + goto errout; + } + + offload = nla_data(tbXFRMA_OFFLOAD_DEV); + sa->user_offload->ifindex = offload->ifindex; + sa->user_offload->flags = offload->flags; + sa->ce_mask |= XFRM_SA_ATTR_OFFLOAD_DEV; + } + *result = sa; return 0; @@ -1192,8 +1235,7 @@ return -NLE_NOMEM; } - strncpy(auth->alg_name, tmpl->auth->alg_name, sizeof(auth->alg_name)); - auth->alg_namesizeof(auth->alg_name) - 1 = '\0'; + _nl_strncpy_assert(auth->alg_name, tmpl->auth->alg_name, sizeof(auth->alg_name)); auth->alg_key_len = tmpl->auth->alg_key_len; memcpy(auth->alg_key, tmpl->auth->alg_key, (tmpl->auth->alg_key_len + 7) / 8); if (nla_put(msg, XFRMA_ALG_AUTH, len, auth) < 0) { @@ -1264,6 +1306,21 @@ } } + if (tmpl->ce_mask & XFRM_SA_ATTR_OFFLOAD_DEV) { + struct xfrm_user_offload *offload; + struct nlattr *attr; + + len = sizeof(struct xfrm_user_offload); + attr = nla_reserve(msg, XFRMA_OFFLOAD_DEV, len); + + if (!attr) + goto nla_put_failure; + + offload = nla_data(attr); + offload->ifindex = tmpl->user_offload->ifindex; + offload->flags = tmpl->user_offload->flags; + } + *result = msg; return 0; @@ -1336,6 +1393,7 @@ !(tmpl->ce_mask & XFRM_SA_ATTR_PROTO)) return -NLE_MISSING_ATTR; + memset(&sa_id, 0, sizeof(struct xfrm_usersa_id)); memcpy (&sa_id.daddr, nl_addr_get_binary_addr (tmpl->id.daddr), sizeof (uint8_t) * nl_addr_get_len (tmpl->id.daddr)); sa_id.family = nl_addr_get_family (tmpl->id.daddr); @@ -2156,6 +2214,57 @@ } +/** + * Get interface id and flags from xfrm_user_offload. + * + * @arg sa The xfrmnl_sa object. + * @arg ifindex An optional output value for the offload interface index. + * @arg flags An optional output value for the offload flags. + * + * @return 0 on success or a negative error code. + */ +int xfrmnl_sa_get_user_offload(struct xfrmnl_sa *sa, int *ifindex, uint8_t *flags) +{ + int ret = -1; + + if (sa->ce_mask & XFRM_SA_ATTR_OFFLOAD_DEV && sa->user_offload) { + if (ifindex) + *ifindex = sa->user_offload->ifindex; + if (flags) + *flags = sa->user_offload->flags; + ret = 0; + } + + return ret; +} + + +/** + * Set interface id and flags for xfrm_user_offload. + * + * @arg sa The xfrmnl_sa object. + * @arg ifindex Id of the offload interface. + * @arg flags Offload flags for the state. + * + * @return 0 on success or a negative error code. + */ +int xfrmnl_sa_set_user_offload(struct xfrmnl_sa *sa, int ifindex, uint8_t flags) +{ + _nl_auto_free struct xfrmnl_user_offload *b = NULL; + + if (!(b = calloc(1, sizeof(*b)))) + return -1; + + b->ifindex = ifindex; + b->flags = flags; + + free(sa->user_offload); + sa->user_offload = _nl_steal_pointer(&b); + sa->ce_mask |= XFRM_SA_ATTR_OFFLOAD_DEV; + + return 0; +} + int xfrmnl_sa_is_hardexpiry_reached (struct xfrmnl_sa* sa) { if (sa->ce_mask & XFRM_SA_ATTR_EXPIRE)
View file
_service:tar_scm:libnl-3.5.0.tar.gz/lib/xfrm/sp.c -> _service:tar_scm:libnl-3.7.0.tar.gz/lib/xfrm/sp.c
Changed
@@ -93,9 +93,8 @@ xfrmnl_sel_put (sp->sel); xfrmnl_ltime_cfg_put (sp->lft); - if(sp->sec_ctx) - { - free (sp->sec_ctx); + if (sp->sec_ctx) { + free(sp->sec_ctx); } nl_list_for_each_entry_safe(utmpl, tmp, &sp->usertmpl_list, utmpl_list) { @@ -106,33 +105,38 @@ static int xfrm_sp_clone(struct nl_object *_dst, struct nl_object *_src) { - struct xfrmnl_sp* dst = nl_object_priv(_dst); - struct xfrmnl_sp* src = nl_object_priv(_src); - uint32_t len = 0; - struct xfrmnl_user_tmpl *utmpl, *new; + struct xfrmnl_sp* dst = nl_object_priv(_dst); + struct xfrmnl_sp* src = nl_object_priv(_src); + struct xfrmnl_user_tmpl *utmpl; + struct xfrmnl_user_tmpl *new; - if (src->sel) + dst->sel = NULL; + dst->lft = NULL; + dst->sec_ctx = NULL; + nl_init_list_head(&dst->usertmpl_list); + + if (src->sel) { if ((dst->sel = xfrmnl_sel_clone (src->sel)) == NULL) return -NLE_NOMEM; + } - if (src->lft) + if (src->lft) { if ((dst->lft = xfrmnl_ltime_cfg_clone (src->lft)) == NULL) return -NLE_NOMEM; + } - if(src->sec_ctx) - { - len = sizeof (struct xfrmnl_user_sec_ctx) + src->sec_ctx->ctx_len; - if ((dst->sec_ctx = calloc (1, len)) == NULL) + if (src->sec_ctx) { + uint32_t len = sizeof (struct xfrmnl_user_sec_ctx) + src->sec_ctx->ctx_len; + + if ((dst->sec_ctx = malloc (len)) == NULL) return -NLE_NOMEM; - memcpy ((void *)dst->sec_ctx, (void *)src->sec_ctx, len); + memcpy(dst->sec_ctx, src->sec_ctx, len); } - nl_init_list_head(&dst->usertmpl_list); nl_list_for_each_entry(utmpl, &src->usertmpl_list, utmpl_list) { new = xfrmnl_user_tmpl_clone (utmpl); if (!new) return -NLE_NOMEM; - xfrmnl_sp_add_usertemplate(dst, new); } @@ -357,15 +361,25 @@ sprintf (share, "INF"); else sprintf (share, "%" PRIu64, sp->lft->hard_packet_limit); - nl_dump_line(p, "\t\tsoft limit: %s (bytes), %s (packets) \n", dir, action); - nl_dump_line(p, "\t\thard limit: %s (bytes), %s (packets) \n", flags, share); - nl_dump_line(p, "\t\tsoft add_time: %llu (seconds), soft use_time: %llu (seconds) \n", - sp->lft->soft_add_expires_seconds, sp->lft->soft_use_expires_seconds); - nl_dump_line(p, "\t\thard add_time: %llu (seconds), hard use_time: %llu (seconds) \n", - sp->lft->hard_add_expires_seconds, sp->lft->hard_use_expires_seconds); + nl_dump_line(p, "\t\tsoft limit: %s (bytes), %s (packets) \n", dir, + action); + nl_dump_line(p, "\t\thard limit: %s (bytes), %s (packets) \n", flags, + share); + nl_dump_line( + p, + "\t\tsoft add_time: %llu (seconds), soft use_time: %llu (seconds) \n", + (long long unsigned)sp->lft->soft_add_expires_seconds, + (long long unsigned)sp->lft->soft_use_expires_seconds); + nl_dump_line( + p, + "\t\thard add_time: %llu (seconds), hard use_time: %llu (seconds) \n", + (long long unsigned)sp->lft->hard_add_expires_seconds, + (long long unsigned)sp->lft->hard_use_expires_seconds); nl_dump_line(p, "\tlifetime current: \n"); - nl_dump_line(p, "\t\t%llu bytes, %llu packets\n", sp->curlft.bytes, sp->curlft.packets); + nl_dump_line(p, "\t\t%llu bytes, %llu packets\n", + (long long unsigned)sp->curlft.bytes, + (long long unsigned)sp->curlft.packets); if (sp->curlft.add_time != 0) { @@ -508,11 +522,7 @@ static int xfrm_sp_request_update(struct nl_cache *c, struct nl_sock *h) { - struct xfrm_userpolicy_id sp_id; - - memset (&sp_id, 0, sizeof (sp_id)); - return nl_send_simple (h, XFRM_MSG_GETPOLICY, NLM_F_DUMP, - &sp_id, sizeof (sp_id)); + return nl_send_simple (h, XFRM_MSG_GETPOLICY, NLM_F_DUMP, NULL, 0); } int xfrmnl_sp_parse(struct nlmsghdr *n, struct xfrmnl_sp **result) @@ -1090,16 +1100,16 @@ return 0; } -int xfrmnl_sp_get_curlifetime (struct xfrmnl_sp* sa, unsigned long long int* curr_bytes, +int xfrmnl_sp_get_curlifetime (struct xfrmnl_sp* sp, unsigned long long int* curr_bytes, unsigned long long int* curr_packets, unsigned long long int* curr_add_time, unsigned long long int* curr_use_time) { - if (sa == NULL || curr_bytes == NULL || curr_packets == NULL || curr_add_time == NULL || curr_use_time == NULL) + if (sp == NULL || curr_bytes == NULL || curr_packets == NULL || curr_add_time == NULL || curr_use_time == NULL) return -1; - *curr_bytes = sa->curlft.bytes; - *curr_packets = sa->curlft.packets; - *curr_add_time = sa->curlft.add_time; - *curr_use_time = sa->curlft.use_time; + *curr_bytes = sp->curlft.bytes; + *curr_packets = sp->curlft.packets; + *curr_add_time = sp->curlft.add_time; + *curr_use_time = sp->curlft.use_time; return 0; }
View file
_service:tar_scm:libnl-3.5.0.tar.gz/libnl-3.0.pc.in -> _service:tar_scm:libnl-3.7.0.tar.gz/libnl-3.0.pc.in
Changed
@@ -7,4 +7,5 @@ Description: Convenience library for netlink sockets Version: @PACKAGE_VERSION@ Libs: -L${libdir} -lnl-@MAJ_VERSION@ +Libs.private: @LIBS@ Cflags: -I${includedir}/libnl@MAJ_VERSION@
View file
_service:tar_scm:libnl-3.5.0.tar.gz/libnl-3.sym -> _service:tar_scm:libnl-3.7.0.tar.gz/libnl-3.sym
Changed
@@ -363,3 +363,8 @@ global: nla_nest_end_keep_empty; } libnl_3_2_29; + +libnl_3_6 { +global: + rtnl_link_info_ops_get; +} libnl_3_5;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/libnl-nf-3.sym -> _service:tar_scm:libnl-3.7.0.tar.gz/libnl-nf-3.sym
Changed
@@ -314,3 +314,32 @@ local: *; }; + +libnl_3_6 { +global: + nfnl_log_msg_get_ct; + nfnl_log_msg_get_ct_info; + nfnl_log_msg_get_hwheader; + nfnl_log_msg_get_hwlen; + nfnl_log_msg_get_hwtype; + nfnl_log_msg_get_vlan_cfi; + nfnl_log_msg_get_vlan_id; + nfnl_log_msg_get_vlan_prio; + nfnl_log_msg_get_vlan_proto; + nfnl_log_msg_get_vlan_tag; + nfnl_log_msg_set_ct; + nfnl_log_msg_set_ct_info; + nfnl_log_msg_set_hwheader; + nfnl_log_msg_set_hwlen; + nfnl_log_msg_set_hwtype; + nfnl_log_msg_set_vlan_proto; + nfnl_log_msg_set_vlan_tag; + nfnl_log_msg_test_ct; + nfnl_log_msg_test_ct_info; + nfnl_log_msg_test_hwheader; + nfnl_log_msg_test_hwlen; + nfnl_log_msg_test_hwtype; + nfnl_log_msg_test_vlan_proto; + nfnl_log_msg_test_vlan_tag; + nfnlmsg_ct_parse_nested; +} libnl_3;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/libnl-route-3.sym -> _service:tar_scm:libnl-3.7.0.tar.gz/libnl-route-3.sym
Changed
@@ -1150,3 +1150,121 @@ rtnl_vlan_set_vlan_id; rtnl_vlan_set_vlan_prio; } libnl_3_4; + +libnl_3_6 { +global: + rtnl_cls_find_by_handle; + rtnl_cls_find_by_prio; + rtnl_flower_append_action; + rtnl_flower_del_action; + rtnl_flower_get_action; + rtnl_flower_get_dst_mac; + rtnl_flower_get_ip_dscp; + rtnl_flower_get_proto; + rtnl_flower_get_src_mac; + rtnl_flower_get_vlan_id; + rtnl_flower_get_vlan_prio; + rtnl_flower_set_dst_mac; + rtnl_flower_set_flags; + rtnl_flower_set_ip_dscp; + rtnl_flower_set_proto; + rtnl_flower_set_src_mac; + rtnl_flower_set_vlan_ethtype; + rtnl_flower_set_vlan_id; + rtnl_flower_set_vlan_prio; + rtnl_link_can_get_data_bittiming; + rtnl_link_can_get_data_bittiming_const; + rtnl_link_can_set_data_bittiming; + rtnl_link_can_set_data_bittiming_const; + rtnl_link_ip6_tnl_get_fwmark; + rtnl_link_ip6_tnl_set_fwmark; + rtnl_link_ip6gre_add; + rtnl_link_ip6gre_alloc; + rtnl_link_ip6gre_get_encaplimit; + rtnl_link_ip6gre_get_flags; + rtnl_link_ip6gre_get_flowinfo; + rtnl_link_ip6gre_get_fwmark; + rtnl_link_ip6gre_get_iflags; + rtnl_link_ip6gre_get_ikey; + rtnl_link_ip6gre_get_link; + rtnl_link_ip6gre_get_local; + rtnl_link_ip6gre_get_oflags; + rtnl_link_ip6gre_get_okey; + rtnl_link_ip6gre_get_remote; + rtnl_link_ip6gre_get_ttl; + rtnl_link_ip6gre_set_encaplimit; + rtnl_link_ip6gre_set_flags; + rtnl_link_ip6gre_set_flowinfo; + rtnl_link_ip6gre_set_fwmark; + rtnl_link_ip6gre_set_iflags; + rtnl_link_ip6gre_set_ikey; + rtnl_link_ip6gre_set_link; + rtnl_link_ip6gre_set_local; + rtnl_link_ip6gre_set_oflags; + rtnl_link_ip6gre_set_okey; + rtnl_link_ip6gre_set_remote; + rtnl_link_ip6gre_set_ttl; + rtnl_link_ip6vti_add; + rtnl_link_ip6vti_alloc; + rtnl_link_ip6vti_get_fwmark; + rtnl_link_ip6vti_get_ikey; + rtnl_link_ip6vti_get_link; + rtnl_link_ip6vti_get_local; + rtnl_link_ip6vti_get_okey; + rtnl_link_ip6vti_get_remote; + rtnl_link_ip6vti_set_fwmark; + rtnl_link_ip6vti_set_ikey; + rtnl_link_ip6vti_set_link; + rtnl_link_ip6vti_set_local; + rtnl_link_ip6vti_set_okey; + rtnl_link_ip6vti_set_remote; + rtnl_link_ipgre_get_fwmark; + rtnl_link_ipgre_set_fwmark; + rtnl_link_ipip_get_fwmark; + rtnl_link_ipip_set_fwmark; + rtnl_link_ipvti_get_fwmark; + rtnl_link_ipvti_set_fwmark; + rtnl_link_is_ip6gre; + rtnl_link_is_ip6vti; + rtnl_link_macsec_get_offload; + rtnl_link_macsec_set_offload; + rtnl_link_sit_get_fwmark; + rtnl_link_sit_set_fwmark; + rtnl_link_team_add; + rtnl_link_team_alloc; + rtnl_mdb_add_entry; + rtnl_mdb_alloc_cache; + rtnl_mdb_alloc_cache_flags; + rtnl_mdb_entry_get_addr; + rtnl_mdb_entry_get_ifindex; + rtnl_mdb_entry_get_proto; + rtnl_mdb_entry_get_state; + rtnl_mdb_entry_get_vid; + rtnl_mdb_foreach_entry; + rtnl_mdb_get_ifindex; + rtnl_netconf_alloc_cache; + rtnl_netconf_get_ignore_routes_linkdown; + rtnl_netconf_get_proxy_neigh; + rtnl_qdisc_get_by_kind; + rtnl_route_lookup; + rtnl_route_nh_get_encap_mpls_dst; + rtnl_route_nh_get_encap_mpls_ttl; +} libnl_3_5; + +libnl_3_7 { +global: + rtnl_flower_get_ipv4_dst; + rtnl_flower_get_ipv4_src; + rtnl_flower_set_ipv4_dst; + rtnl_flower_set_ipv4_src; + rtnl_nat_get_action; + rtnl_nat_get_flags; + rtnl_nat_get_mask; + rtnl_nat_get_new_addr; + rtnl_nat_get_old_addr; + rtnl_nat_set_action; + rtnl_nat_set_flags; + rtnl_nat_set_mask; + rtnl_nat_set_new_addr; + rtnl_nat_set_old_addr; +} libnl_3_6;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/libnl-xfrm-3.sym -> _service:tar_scm:libnl-3.7.0.tar.gz/libnl-xfrm-3.sym
Changed
@@ -244,3 +244,8 @@ local: *; }; + +libnl_3_6 { + xfrmnl_sa_get_user_offload; + xfrmnl_sa_set_user_offload; +} libnl_3;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/m4/libtool.m4 -> _service:tar_scm:libnl-3.7.0.tar.gz/m4/libtool.m4
Changed
@@ -1,6 +1,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -31,7 +32,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. ) -# serial 58 LT_INIT +# serial 59 LT_INIT # LT_PREREQ(VERSION) @@ -181,6 +182,7 @@ m4_require(_LT_CHECK_SHELL_FEATURES)dnl m4_require(_LT_PATH_CONVERSION_FUNCTIONS)dnl m4_require(_LT_CMD_RELOAD)dnl +m4_require(_LT_DECL_FILECMD)dnl m4_require(_LT_CHECK_MAGIC_METHOD)dnl m4_require(_LT_CHECK_SHAREDLIB_FROM_LINKLIB)dnl m4_require(_LT_CMD_OLD_ARCHIVE)dnl @@ -219,8 +221,8 @@ ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -778,7 +780,7 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -1042,8 +1044,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1067,17 +1069,12 @@ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin91*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.012,.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.012,*|,*powerpc*-darwin5-8*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -1126,12 +1123,12 @@ output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if($1, CXX, if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ,) else @@ -1245,7 +1242,8 @@ # _LT_WITH_SYSROOT # ---------------- AC_DEFUN(_LT_WITH_SYSROOT, -AC_MSG_CHECKING(for sysroot) +m4_require(_LT_DECL_SED)dnl +AC_MSG_CHECKING(for sysroot) AC_ARG_WITH(sysroot, AS_HELP_STRING(--with-sysroot@<:@=DIR@:>@, Search for dependent libraries within DIR (or the compiler's sysroot @@ -1262,7 +1260,7 @@ fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1292,7 +1290,7 @@ # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1309,7 +1307,7 @@ echo '#line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1321,7 +1319,7 @@ ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1343,7 +1341,7 @@ echo '#line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1351,7 +1349,7 @@ emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1359,7 +1357,7 @@ emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1379,14 +1377,14 @@ # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1454,7 +1452,7 @@ # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1493,9 +1491,22 @@ m4_defun(_LT_PROG_AR, AC_CHECK_TOOLS(AR, ar, false) : ${AR=ar} -: ${AR_FLAGS=cru} _LT_DECL(, AR, 1, The archiver) -_LT_DECL(, AR_FLAGS, 1, Flags to create an archive) + +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because thats what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS +_LT_DECL(, lt_ar_flags, 0, Flags to create an archive (by configure)) + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. +_LT_DECL(, AR_FLAGS, \@S|@{ARFLAGS-"\@S|@lt_ar_flags"}, + Flags to create an archive) AC_CACHE_CHECK(for archiver @FILE support, lt_cv_ar_at_file, lt_cv_ar_at_file=no @@ -1714,7 +1725,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1757,7 +1768,7 @@ sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.* //'` + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.* //'` else lt_cv_sys_max_cmd_len=32768 fi @@ -2207,26 +2218,35 @@ striplib= old_striplib= AC_MSG_CHECKING(whether stripping libraries is possible) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT(yes) +if test -z "$STRIP"; then + AC_MSG_RESULT(no) else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT(yes) + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT(yes) - else + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + ;; + *) AC_MSG_RESULT(no) - fi - ;; - *) - AC_MSG_RESULT(no) - ;; - esac + ;; + esac + fi fi _LT_DECL(, old_striplib, 1, Commands to strip libraries) _LT_DECL(, striplib, 1) @@ -2549,7 +2569,7 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/./-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/./-/g'`$versuffix$shared_ext' m4_if($1, , sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api") ;; @@ -2559,14 +2579,14 @@ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/./-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/./-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/./-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -2585,7 +2605,7 @@ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\(a-zA-Z\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\(a-zA-Z\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -2622,7 +2642,7 @@ ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/./-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -2655,7 +2675,7 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -3457,7 +3477,7 @@ bsdi45*) lt_cv_deplibs_check_method='file_magic ELF 0-90-9*-bit MLSB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -3491,14 +3511,14 @@ lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i3-986 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -3512,7 +3532,7 @@ ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s0-90-90-9|ELF-0-90-9) shared object file - IA64' @@ -3559,7 +3579,7 @@ newos6*) lt_cv_deplibs_check_method='file_magic ELF 0-90-9*-bit MLSB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -3686,13 +3706,13 @@ mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -3718,7 +3738,7 @@ # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, dumpbin "link -dump", :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -3958,7 +3978,7 @@ if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -3976,20 +3996,20 @@ # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -4013,7 +4033,7 @@ if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, + # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ @@ -4031,9 +4051,9 @@ " s1~prfx {split(s1,t,\"@\"); print f,t1,substr(t1,length(prfx))}"\ " ' prfx=^$ac_symprfx" else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.* \($symcode$symcode*\) *$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.* \($symcode$symcode*\) *$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -4320,7 +4340,7 @@ ;; esac ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -4403,7 +4423,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4739,7 +4759,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ 1-7.* | *Sun*Fortran*\ 8.0-3*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4922,7 +4942,7 @@ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\(^B*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\(^B*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) @@ -4930,7 +4950,7 @@ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) + cl* | icl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) @@ -4987,15 +5007,15 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -5047,7 +5067,7 @@ _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ 01.* | *\ 2.0-9.* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -5159,6 +5179,7 @@ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; interix3-9*) @@ -5173,7 +5194,7 @@ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -5216,7 +5237,7 @@ _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes @@ -5228,7 +5249,7 @@ if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi @@ -5244,7 +5265,7 @@ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -5376,7 +5397,7 @@ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\(^B*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\(^B*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -5559,12 +5580,12 @@ cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl*) - # Native MSVC + cl* | icl*) + # Native MSVC or ICC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes @@ -5605,7 +5626,7 @@ fi' ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. @@ -5653,7 +5674,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes @@ -5864,6 +5885,7 @@ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; osf3*) @@ -6634,8 +6656,8 @@ cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC + ,cl* | no,cl* | ,icl* | no,icl*) + # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' @@ -6733,6 +6755,7 @@ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; dgux*) @@ -6763,7 +6786,7 @@ _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes @@ -6900,7 +6923,7 @@ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in @@ -7040,13 +7063,13 @@ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' @@ -8192,6 +8215,14 @@ AC_SUBST(DLLTOOL) ) +# _LT_DECL_FILECMD +# ---------------- +# Check for a file(cmd) program that can be used to detect file type and magic +m4_defun(_LT_DECL_FILECMD, +AC_CHECK_TOOL(FILECMD, file, :) +_LT_DECL(, FILECMD, 1, A file(cmd) program that detects file types) +)# _LD_DECL_FILECMD + # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates
View file
_service:tar_scm:libnl-3.5.0.tar.gz/m4/ltoptions.m4 -> _service:tar_scm:libnl-3.7.0.tar.gz/m4/ltoptions.m4
Changed
@@ -1,7 +1,7 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free +# Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives
View file
_service:tar_scm:libnl-3.5.0.tar.gz/m4/ltsugar.m4 -> _service:tar_scm:libnl-3.7.0.tar.gz/m4/ltsugar.m4
Changed
@@ -1,6 +1,6 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 #
View file
_service:tar_scm:libnl-3.5.0.tar.gz/m4/ltversion.m4 -> _service:tar_scm:libnl-3.7.0.tar.gz/m4/ltversion.m4
Changed
@@ -1,6 +1,7 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, +# Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -9,15 +10,15 @@ # @configure_input@ -# serial 4179 ltversion.m4 +# serial 4245 ltversion.m4 # This file is part of GNU Libtool -m4_define(LT_PACKAGE_VERSION, 2.4.6) -m4_define(LT_PACKAGE_REVISION, 2.4.6) +m4_define(LT_PACKAGE_VERSION, 2.4.7) +m4_define(LT_PACKAGE_REVISION, 2.4.7) AC_DEFUN(LTVERSION_VERSION, -macro_version='2.4.6' -macro_revision='2.4.6' +macro_version='2.4.7' +macro_revision='2.4.7' _LT_DECL(, macro_version, 0, Which release of libtool.m4 was used?) _LT_DECL(, macro_revision, 0) )
View file
_service:tar_scm:libnl-3.5.0.tar.gz/m4/lt~obsolete.m4 -> _service:tar_scm:libnl-3.7.0.tar.gz/m4/lt~obsolete.m4
Changed
@@ -1,7 +1,7 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free +# Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives
View file
_service:tar_scm:libnl-3.5.0.tar.gz/python/examples/iface.py -> _service:tar_scm:libnl-3.7.0.tar.gz/python/examples/iface.py
Changed
@@ -1,3 +1,4 @@ +from __future__ import print_function import netlink.capi as nl import netlink.genl.capi as genl import nl80211 @@ -6,7 +7,7 @@ class test_class: def __init__(self): - self.done = 1; + self.done = 1 def msg_handler(m, a): try: @@ -16,7 +17,7 @@ thiswiphy = nl.nla_get_u32(attrnl80211.NL80211_ATTR_WIPHY) print("phy#%d" % thiswiphy) if nl80211.NL80211_ATTR_IFNAME in attr: - print("\tinterface %s" % nl.nla_get_string(attrnl80211.NL80211_ATTR_IFNAME)); + print("\tinterface %s" % nl.nla_get_string(attrnl80211.NL80211_ATTR_IFNAME)) if nl80211.NL80211_ATTR_IFINDEX in attr: print("\tifindex %d" % nl.nla_get_u32(attrnl80211.NL80211_ATTR_IFINDEX)) if nl80211.NL80211_ATTR_WDEV in attr: @@ -31,7 +32,7 @@ if nl80211.NL80211_ATTR_WIPHY_FREQ in attr: freq = nl.nla_get_u32(attrnl80211.NL80211_ATTR_WIPHY_FREQ) - sys.stdout.write("\tfreq %d MHz" % freq); + sys.stdout.write("\tfreq %d MHz" % freq) if nl80211.NL80211_ATTR_CHANNEL_WIDTH in attr: chanw = nl.nla_get_u32(attrnl80211.NL80211_ATTR_CHANNEL_WIDTH) @@ -44,13 +45,13 @@ nl.nla_get_u32(attrnl80211.NL80211_ATTR_CENTER_FREQ2)) elif nl80211.NL80211_ATTR_WIPHY_CHANNEL_TYPE in attr: channel_type = nl.nla_get_u32(attrnl80211.NL80211_ATTR_WIPHY_CHANNEL_TYPE) - sys.stdout.write(" %s" % nl80211.nl80211_channel_type2str(channel_type)); + sys.stdout.write(" %s" % nl80211.nl80211_channel_type2str(channel_type)) - sys.stdout.write("\n"); - return nl.NL_SKIP; + sys.stdout.write("\n") + return nl.NL_SKIP except Exception as e: (t,v,tb) = sys.exc_info() - print v.message + print(v.message) traceback.print_tb(tb) def error_handler(err, a): @@ -69,10 +70,10 @@ tx_cb = nl.nl_cb_alloc(nl.NL_CB_DEFAULT) rx_cb = nl.nl_cb_clone(tx_cb) s = nl.nl_socket_alloc_cb(tx_cb) - nl.py_nl_cb_err(rx_cb, nl.NL_CB_CUSTOM, error_handler, cbd); - nl.py_nl_cb_set(rx_cb, nl.NL_CB_FINISH, nl.NL_CB_CUSTOM, finish_handler, cbd); - nl.py_nl_cb_set(rx_cb, nl.NL_CB_ACK, nl.NL_CB_CUSTOM, ack_handler, cbd); - nl.py_nl_cb_set(rx_cb, nl.NL_CB_VALID, nl.NL_CB_CUSTOM, msg_handler, cbd); + nl.py_nl_cb_err(rx_cb, nl.NL_CB_CUSTOM, error_handler, cbd) + nl.py_nl_cb_set(rx_cb, nl.NL_CB_FINISH, nl.NL_CB_CUSTOM, finish_handler, cbd) + nl.py_nl_cb_set(rx_cb, nl.NL_CB_ACK, nl.NL_CB_CUSTOM, ack_handler, cbd) + nl.py_nl_cb_set(rx_cb, nl.NL_CB_VALID, nl.NL_CB_CUSTOM, msg_handler, cbd) genl.genl_connect(s) family = genl.genl_ctrl_resolve(s, 'nl80211') @@ -80,14 +81,14 @@ genl.genlmsg_put(m, 0, 0, family, 0, 0, nl80211.NL80211_CMD_GET_INTERFACE, 0) nl.nla_put_u32(m, nl80211.NL80211_ATTR_IFINDEX, nl.if_nametoindex('wlan0')) - err = nl.nl_send_auto_complete(s, m); + err = nl.nl_send_auto_complete(s, m) if err < 0: - nl.nlmsg_free(msg) + nl.nlmsg_free(m) while cbd.done > 0 and not err < 0: err = nl.nl_recvmsgs(s, rx_cb) except Exception as e: (t, v, tb) = sys.exc_info() - print v.message + print(v.message) traceback.print_tb(tb)
View file
_service:tar_scm:libnl-3.5.0.tar.gz/python/examples/wiphy.py -> _service:tar_scm:libnl-3.7.0.tar.gz/python/examples/wiphy.py
Changed
@@ -1,3 +1,4 @@ +from __future__ import print_function import netlink.capi as nl import netlink.genl.capi as genl import nl80211 @@ -6,23 +7,23 @@ class test_class: def __init__(self): - self.done = 1; + self.done = 1 def freq_to_ch(freq): if freq == 2484: - return 14; + return 14 if freq < 2484: - return (freq - 2407) / 5; + return (freq - 2407) / 5 # FIXME: dot11ChannelStartingFactor (802.11-2007 17.3.8.3.2) if freq < 45000: - return freq/5 - 1000; + return freq/5 - 1000 if freq >= 58320 and freq <= 64800: - return (freq - 56160) / 2160; + return (freq - 56160) / 2160 - return 0; + return 0 def handle_freq(attr, pol): e, fattr = nl.py_nla_parse_nested(nl80211.NL80211_FREQUENCY_ATTR_MAX, attr, pol) @@ -83,7 +84,7 @@ ciphers = nl.nla_data(attrnl80211.NL80211_ATTR_CIPHER_SUITES) num = len(ciphers) / 4 if num > 0: - print("\tSupported Ciphers:"); + print("\tSupported Ciphers:") for i in range(0, num, 4): print("\t\t* %s" % cipher_name(ciphersi:i+4)) if nl80211.NL80211_ATTR_SUPPORTED_IFTYPES in attr: @@ -99,7 +100,7 @@ return nl.NL_SKIP except Exception as e: (t,v,tb) = sys.exc_info() - print v.message + print(v.message) traceback.print_tb(tb) def error_handler(err, a): @@ -118,10 +119,10 @@ tx_cb = nl.nl_cb_alloc(nl.NL_CB_DEFAULT) rx_cb = nl.nl_cb_clone(tx_cb) s = nl.nl_socket_alloc_cb(tx_cb) - nl.py_nl_cb_err(rx_cb, nl.NL_CB_CUSTOM, error_handler, cbd); - nl.py_nl_cb_set(rx_cb, nl.NL_CB_FINISH, nl.NL_CB_CUSTOM, finish_handler, cbd); - nl.py_nl_cb_set(rx_cb, nl.NL_CB_ACK, nl.NL_CB_CUSTOM, ack_handler, cbd); - nl.py_nl_cb_set(rx_cb, nl.NL_CB_VALID, nl.NL_CB_CUSTOM, msg_handler, cbd); + nl.py_nl_cb_err(rx_cb, nl.NL_CB_CUSTOM, error_handler, cbd) + nl.py_nl_cb_set(rx_cb, nl.NL_CB_FINISH, nl.NL_CB_CUSTOM, finish_handler, cbd) + nl.py_nl_cb_set(rx_cb, nl.NL_CB_ACK, nl.NL_CB_CUSTOM, ack_handler, cbd) + nl.py_nl_cb_set(rx_cb, nl.NL_CB_VALID, nl.NL_CB_CUSTOM, msg_handler, cbd) genl.genl_connect(s) family = genl.genl_ctrl_resolve(s, 'nl80211') @@ -129,13 +130,13 @@ genl.genlmsg_put(m, 0, 0, family, 0, 0, nl80211.NL80211_CMD_GET_WIPHY, 0) nl.nla_put_u32(m, nl80211.NL80211_ATTR_WIPHY, 7) - err = nl.nl_send_auto_complete(s, m); + err = nl.nl_send_auto_complete(s, m) if err < 0: - nl.nlmsg_free(msg) + nl.nlmsg_free(m) while cbd.done > 0 and not err < 0: err = nl.nl_recvmsgs(s, rx_cb) except Exception as e: (t, v, tb) = sys.exc_info() - print v.message + print(v.message) traceback.print_tb(tb)
View file
_service:tar_scm:libnl-3.5.0.tar.gz/python/netlink/core.py -> _service:tar_scm:libnl-3.7.0.tar.gz/python/netlink/core.py
Changed
@@ -127,7 +127,7 @@ capi.nlmsg_free(self._msg) def __len__(self): - return capi.nlmsg_len(nlmsg_hdr(self._msg)) + return capi.nlmsg_len(capi.nlmsg_hdr(self._msg)) @property def protocol(self):
View file
_service:tar_scm:libnl-3.5.0.tar.gz/python/netlink/route/link.py -> _service:tar_scm:libnl-3.7.0.tar.gz/python/netlink/route/link.py
Changed
@@ -40,7 +40,6 @@ __all__ = 'LinkCache', 'Link', - 'get_from_kernel', import socket @@ -159,7 +158,7 @@ if exc_type is None: self.change() else: - return false + return False @classmethod def from_capi(cls, obj):
View file
_service:tar_scm:libnl-3.5.0.tar.gz/python/netlink/route/links/inet.py -> _service:tar_scm:libnl-3.7.0.tar.gz/python/netlink/route/links/inet.py
Changed
@@ -8,9 +8,7 @@ from __future__ import absolute_import -__all__ = - '', - +__all__ = from ... import core as netlink from .. import capi as capi
View file
_service:tar_scm:libnl-3.5.0.tar.gz/python/tests/test-create-bridge.py -> _service:tar_scm:libnl-3.7.0.tar.gz/python/tests/test-create-bridge.py
Changed
@@ -1,3 +1,4 @@ +from __future__ import print_function import netlink.core as netlink import netlink.route.capi as capi import netlink.route.link as link @@ -8,21 +9,21 @@ cache.refill(sock) testtap1 = cache'testtap1' -print testtap1 +print(testtap1) lbr = link.Link() lbr.type = 'bridge' lbr.name = 'testbridge' -print lbr +print(lbr) lbr.add() cache.refill(sock) lbr = cache'testbridge' -print lbr +print(lbr) lbr.enslave(testtap1) cache.refill(sock) testtap1 = cache'testtap1' -print capi.rtnl_link_is_bridge(lbr._rtnl_link) -print capi.rtnl_link_get_master(testtap1._rtnl_link) +print(capi.rtnl_link_is_bridge(lbr._rtnl_link)) +print(capi.rtnl_link_get_master(testtap1._rtnl_link))
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/genl-ctrl-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/genl-ctrl-list.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/idiag-socket-details.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/idiag-socket-details.c
Changed
@@ -1,11 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-only */ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/lib/addr.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/lib/addr.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/lib/class.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/lib/class.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/lib/cls.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/lib/cls.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/lib/ct.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/lib/ct.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/lib/exp.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/lib/exp.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/lib/link.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/lib/link.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/lib/neigh.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/lib/neigh.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/lib/qdisc.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/lib/qdisc.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/lib/route.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/lib/route.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/lib/rule.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/lib/rule.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/lib/tc.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/lib/tc.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/lib/utils.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/lib/utils.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */ @@ -236,10 +229,13 @@ { void *handle; - if (!(handle = dlopen(path, RTLD_NOW))) { + handle = dlopen(path, RTLD_NOW); + if (!handle) { nl_cli_fatal(ENOENT, "Unable to load module \"%s\": %s\n", path, dlerror()); } + /* We intentionally leak the dlopen handle. */ + /* coverityRESOURCE_LEAK */ } #else nl_cli_fatal(ENOTSUP, "Unable to load module \"%s\": built without dynamic libraries support\n",
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nf-ct-add.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nf-ct-add.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * src/nf-ct-add.c Add Conntrack Entry - * - * 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
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nf-ct-events.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nf-ct-events.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * src/nf-ct-events.c Listen on Conntrack 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) 2018 Avast software */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nf-ct-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nf-ct-list.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nf-exp-add.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nf-exp-add.c
Changed
@@ -1,17 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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>
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nf-exp-delete.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nf-exp-delete.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nf-exp-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nf-exp-list.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nf-log.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nf-log.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nf-monitor.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nf-monitor.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nf-queue.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nf-queue.c
Changed
@@ -1,17 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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>
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-addr-add.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-addr-add.c
Changed
@@ -1,11 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-only */ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-addr-delete.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-addr-delete.c
Changed
@@ -1,11 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-only */ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-addr-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-addr-list.c
Changed
@@ -1,11 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-only */ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-class-add.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-class-add.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-class-delete.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-class-delete.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-class-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-class-list.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-classid-lookup.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-classid-lookup.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-cls-add.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-cls-add.c
Changed
@@ -1,11 +1,5 @@ -/* SPDX-License-Identifier: LGPL-2.1-only */ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-cls-delete.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-cls-delete.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-cls-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-cls-list.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-fib-lookup.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-fib-lookup.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-link-enslave.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-link-enslave.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-link-ifindex2name.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-link-ifindex2name.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-link-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-link-list.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-link-name2ifindex.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-link-name2ifindex.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-link-release.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-link-release.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-link-set.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-link-set.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-link-stats.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-link-stats.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-list-caches.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-list-caches.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-list-sockets.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-list-sockets.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-monitor.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-monitor.c
Changed
@@ -1,17 +1,11 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> +#include <netlink/cli/mdb.h> #include <linux/rtnetlink.h> @@ -36,6 +30,7 @@ { RTNLGRP_IPV4_NETCONF, "ipv4-netconf" }, { RTNLGRP_IPV6_NETCONF, "ipv6-netconf" }, { RTNLGRP_MPLS_NETCONF, "mpls-netconf" }, + { RTNLGRP_MDB, "mdb" }, { RTNLGRP_NONE, NULL } }; @@ -61,6 +56,7 @@ "Usage: nl-monitor OPTION <groups>\n" "\n" "Options\n" + " -d, --debug=LEVEL Set libnl debug level { 0 - 7 }\n" " -f, --format=TYPE Output format { brief | details | stats }\n" " -h, --help Show this help.\n" "\n" @@ -91,15 +87,20 @@ for (;;) { int c, optidx = 0; static struct option long_opts = { + { "debug", 1, 0, 'd' }, { "format", 1, 0, 'f' }, + { "help", 0, 0, 'h' }, { 0, 0, 0, 0 } }; - c = getopt_long(argc, argv, "f:h", long_opts, &optidx); + c = getopt_long(argc, argv, "d:f:h", long_opts, &optidx); if (c == -1) break; switch (c) { + case 'd': + nl_debug = atoi(optarg); + break; case 'f': dp.dp_type = nl_cli_parse_dumptype(optarg); break;
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-neigh-add.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-neigh-add.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-neigh-delete.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-neigh-delete.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-neigh-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-neigh-list.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-neightbl-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-neightbl-list.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-pktloc-lookup.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-pktloc-lookup.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */ @@ -14,6 +7,8 @@ #include <netlink/route/pktloc.h> #include <linux/tc_ematch/tc_em_cmp.h> +#include "netlink-private/utils.h" + static void print_usage(void) { printf( @@ -52,8 +47,19 @@ TCF_LAYER_TRANSPORT = "tcp" }; +static const char *get_align_txt(struct rtnl_pktloc *loc, char bufstatic 16) +{ + if (loc->align < _NL_N_ELEMENTS(align_txt)) + return align_txtloc->align; + + snprintf(buf, 16, "%u", loc->align); + return buf; +} + static void dump_u32_style(struct rtnl_pktloc *loc, uint32_t value) { + char buf16; + if (loc->align > 4) nl_cli_fatal(EINVAL, "u32 only supports alignments u8|u16|u32."); @@ -64,37 +70,35 @@ if (loc->shift > 0) nl_cli_fatal(EINVAL, "u32 does not support shifting."); - printf("%s %x %x at %s%u\n", - align_txtloc->align, - value, loc->mask ? loc->mask : align_maskloc->align, - loc->layer == TCF_LAYER_TRANSPORT ? "nexthdr+" : "", - loc->offset); -} - -static char *get_align_txt(struct rtnl_pktloc *loc) -{ - static char buf16; - - if (loc->align <= 4) - strcpy(buf, align_txtloc->align); - else - snprintf(buf, sizeof(buf), "%u", loc->align); - - return buf; + printf("%s %x %x at %s%u\n", get_align_txt(loc, buf), value, + loc->mask ? loc->mask : + (loc->align < _NL_N_ELEMENTS(align_mask) ? + align_maskloc->align : + 0), + loc->layer == TCF_LAYER_TRANSPORT ? "nexthdr+" : "", + loc->offset); } static void dump_loc(struct rtnl_pktloc *loc) { - printf("%s = %s at %s+%u & %#x >> %u\n", - loc->name, get_align_txt(loc), layer_txtloc->layer, - loc->offset, loc->mask, loc->shift); + char buf16; + + printf("%s = %s at %s+%u & %#x >> %u\n", loc->name, + get_align_txt(loc, buf), + loc->layer < _NL_N_ELEMENTS(layer_txt) ? layer_txtloc->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_txtloc->layer, - loc->offset, loc->mask, loc->shift, loc->refcnt); + char buf16; + + printf("%-26s %-5s %3s+%-4u %#-10x %-8u %u\n", loc->name, + get_align_txt(loc, buf), + loc->layer < _NL_N_ELEMENTS(layer_txt) ? layer_txtloc->layer : + "???", + loc->offset, loc->mask, loc->shift, loc->refcnt); } static void do_list(void)
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-qdisc-add.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-qdisc-add.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-qdisc-delete.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-qdisc-delete.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-qdisc-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-qdisc-list.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-route-add.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-route-add.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-route-delete.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-route-delete.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-route-get.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-route-get.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-route-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-route-list.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-rule-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-rule-list.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-tctree-list.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-tctree-list.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/src/nl-util-addr.c -> _service:tar_scm:libnl-3.7.0.tar.gz/src/nl-util-addr.c
Changed
@@ -1,12 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-only */ /* - * 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> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/tests/check-all.c -> _service:tar_scm:libnl-3.7.0.tar.gz/tests/check-all.c
Changed
@@ -1,17 +1,11 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * tests/check-all.c overall unit test program - * - * 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) 2013 Thomas Graf <tgraf@suug.ch> */ #include <check.h> -#include "util.h" +#include "cksuite-all.h" static Suite *main_suite(void) { @@ -24,16 +18,13 @@ { SRunner *runner; int nfailed; - - runner = srunner_create(main_suite()); - /* Add testsuites below */ + runner = srunner_create(main_suite()); srunner_add_suite(runner, make_nl_addr_suite()); srunner_add_suite(runner, make_nl_attr_suite()); srunner_add_suite(runner, make_nl_ematch_tree_clone_suite()); - - /* Do not add testsuites below this line */ + srunner_add_suite(runner, make_nl_netns_suite()); srunner_run_all(runner, CK_ENV);
View file
_service:tar_scm:libnl-3.7.0.tar.gz/tests/check-direct.c
Added
@@ -0,0 +1,69 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +#include <check.h> + +#include "linux/snmp.h" +#include "netlink-private/utils.h" +#include "netlink-private/route/utils.h" + +#include "netlink/route/link.h" + +START_TEST(static_checks) +{ + int i, j; + char strbuf100; + + _NL_STATIC_ASSERT(RTNL_LINK_RX_PACKETS == 0); + assert(_nltst_map_stat_id_from_IPSTATS_MIB_v20 == + RTNL_LINK_RX_PACKETS); + for (i = 1; i < __IPSTATS_MIB_MAX; i++) { + assert(_nltst_map_stat_id_from_IPSTATS_MIB_v2i > 0); + assert(_nltst_map_stat_id_from_IPSTATS_MIB_v2i < + __RTNL_LINK_STATS_MAX); + for (j = 1; j < i; j++) + assert(_nltst_map_stat_id_from_IPSTATS_MIB_v2i != + _nltst_map_stat_id_from_IPSTATS_MIB_v2j); + } + + for (i = 0; i <= RTNL_LINK_STATS_MAX + 1; i++) { + const char *s; + + s = rtnl_link_stat2str(i, strbuf, sizeof(strbuf)); + assert(s); + assert(s == strbuf); + assert(strlen(s) < sizeof(strbuf)); + if (strncmp(s, "0x", 2) == 0) { + assert(i == RTNL_LINK_STATS_MAX + 1); + ck_assert_int_eq(strtoll(&s2, NULL, 16), i); + } else + ck_assert_int_le(i, RTNL_LINK_STATS_MAX); + ck_assert_int_eq(i, rtnl_link_str2stat(s)); + } +} +END_TEST + +static Suite *make_suite(void) +{ + Suite *suite = suite_create("Direct"); + TCase *tc = tcase_create("Core"); + + tcase_add_test(tc, static_checks); + suite_add_tcase(suite, tc); + return suite; +} + +int main(int argc, char *argv) +{ + SRunner *runner; + int nfailed; + + runner = srunner_create(suite_create("main")); + + srunner_add_suite(runner, make_suite()); + + srunner_run_all(runner, CK_ENV); + + nfailed = srunner_ntests_failed(runner); + srunner_free(runner); + return nfailed != 0; +}
View file
_service:tar_scm:libnl-3.7.0.tar.gz/tests/cksuite-all-addr.c
Added
@@ -0,0 +1,227 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ +/* + * Copyright (c) 2013 Thomas Graf <tgraf@suug.ch> + */ + +#include <check.h> +#include <netlink/addr.h> +#include <netlink/route/addr.h> + +#include "cksuite-all.h" + +START_TEST(addr_alloc) +{ + struct nl_addr *addr; + + addr = nl_addr_alloc(16); + ck_assert_msg(addr, "Allocation should not return NULL"); + + ck_assert_msg(nl_addr_iszero(addr) != 0, + "New empty address should be all zeros"); + + ck_assert_msg(nl_addr_get_family(addr) == AF_UNSPEC, + "New empty address should have family AF_UNSPEC"); + + ck_assert_msg(nl_addr_get_prefixlen(addr) == 0, + "New empty address should have prefix length 0"); + + ck_assert_msg(!nl_addr_shared(addr), + "New empty address should not be shared"); + + ck_assert_msg(nl_addr_get(addr) == addr, + "nl_addr_get() should return pointer to address"); + + ck_assert_msg(nl_addr_shared(addr) != 0, + "Address should be shared after call to nl_addr_get()"); + + nl_addr_put(addr); + + ck_assert_msg( + !nl_addr_shared(addr), + "Address should not be shared after call to nl_addr_put()"); + + ck_assert_msg(nl_addr_fill_sockaddr(addr, NULL, 0) != 0, + "Socket address filling should fail for empty address"); + + nl_addr_put(addr); +} +END_TEST + +START_TEST(addr_binary_addr) +{ + struct nl_addr *addr, *addr2; + char baddr4 = { 0x1, 0x2, 0x3, 0x4 }; + char baddr26 = { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6 }; + + addr = nl_addr_alloc(4); + ck_assert_msg(addr != NULL, "Allocation should not return NULL"); + + ck_assert_msg(nl_addr_set_binary_addr(addr, baddr, 4) >= 0, + "Valid binary address should be settable"); + + ck_assert_msg( + nl_addr_get_prefixlen(addr) == 0, + "Prefix length should be unchanged after nl_addr_set_binary_addr()"); + + ck_assert_msg(nl_addr_get_len(addr) == 4, "Address length should be 4"); + + ck_assert_msg( + nl_addr_set_binary_addr(addr, baddr2, 6) != 0, + "Should not be able to set binary address exceeding maximum length"); + + ck_assert_msg(nl_addr_get_len(addr) == 4, + "Address length should still be 4"); + + ck_assert_msg( + nl_addr_guess_family(addr) == AF_INET, + "Binary address of length 4 should be guessed as AF_INET"); + + ck_assert_msg(memcmp(baddr, nl_addr_get_binary_addr(addr), 4) == 0, + "Binary address mismatches"); + + addr2 = nl_addr_build(AF_UNSPEC, baddr, 4); + ck_assert_msg(addr2 != NULL, "Building of address should not fail"); + + nl_addr_set_prefixlen(addr, 32); + ck_assert_msg( + nl_addr_get_prefixlen(addr) == 32, + "Prefix length should be successful changed after nl_addr_set_prefixlen()"); + + ck_assert_msg(!nl_addr_cmp(addr, addr2), + "Addresses built from same binary address should match"); + + nl_addr_put(addr); + nl_addr_put(addr2); +} +END_TEST + +START_TEST(addr_parse4) +{ + struct nl_addr *addr4, *clone; + struct sockaddr_in sin; + socklen_t len = sizeof(sin); + char *addr_str = "10.0.0.1/16"; + char buf128; + + ck_assert_msg(nl_addr_parse(addr_str, AF_INET6, &addr4) != 0, + "Should not be able to parse IPv4 address in IPv6 mode"); + + ck_assert_msg(nl_addr_parse(addr_str, AF_UNSPEC, &addr4) == 0, + "Should be able to parse \"%s\"", addr_str); + + ck_assert_msg(nl_addr_get_family(addr4) == AF_INET, + "Address family should be AF_INET"); + + ck_assert_msg(nl_addr_get_prefixlen(addr4) == 16, + "Prefix length should be 16"); + + ck_assert_msg(!nl_addr_iszero(addr4), + "Address should not be all zeroes"); + + clone = nl_addr_clone(addr4); + ck_assert_msg(clone != NULL, "Cloned address should not be NULL"); + + ck_assert_msg(nl_addr_cmp(addr4, clone) == 0, + "Cloned address should not mismatch original"); + + ck_assert_msg(nl_addr_fill_sockaddr(addr4, (struct sockaddr *)&sin, + &len) == 0, + "Should be able to fill socketaddr"); + + ck_assert_msg( + !strcmp(nl_addr2str(addr4, buf, sizeof(buf)), addr_str), + "Address translated back to string does not match original"); + + nl_addr_put(addr4); + nl_addr_put(clone); +} +END_TEST + +START_TEST(addr_parse6) +{ + struct nl_addr *addr6, *clone; + struct sockaddr_in6 sin; + socklen_t len = sizeof(sin); + char *addr_str = "2001:1:2::3/64"; + char buf128; + + ck_assert_msg(nl_addr_parse(addr_str, AF_INET, &addr6) != 0, + "Should not be able to parse IPv6 address in IPv4 mode"); + + ck_assert_msg(nl_addr_parse(addr_str, AF_UNSPEC, &addr6) == 0, + "Should be able to parse \"%s\"", addr_str); + + ck_assert_msg(nl_addr_get_family(addr6) == AF_INET6, + "Address family should be AF_INET6"); + + ck_assert_msg(nl_addr_get_prefixlen(addr6) == 64, + "Prefix length should be 64"); + + ck_assert_msg(!nl_addr_iszero(addr6), + "Address should not be all zeroes"); + + clone = nl_addr_clone(addr6); + ck_assert_msg(clone != NULL, "Cloned address should not be NULL"); + + ck_assert_msg(nl_addr_cmp(addr6, clone) == 0, + "Cloned address should not mismatch original"); + + ck_assert_msg(nl_addr_fill_sockaddr(addr6, (struct sockaddr *)&sin, + &len) == 0, + "Should be able to fill socketaddr"); + + ck_assert_msg( + !strcmp(nl_addr2str(addr6, buf, sizeof(buf)), addr_str), + "Address translated back to string does not match original"); + + nl_addr_put(addr6); + nl_addr_put(clone); +} +END_TEST + +START_TEST(addr_info) +{ + struct nl_addr *addr; + char *addr_str = "127.0.0.1"; + struct addrinfo *result; + + ck_assert_msg(nl_addr_parse(addr_str, AF_UNSPEC, &addr) == 0, + "Parsing of valid address should not fail"); + + ck_assert_msg(nl_addr_info(addr, &result) == 0, + "getaddrinfo() on loopback address should work"); + + freeaddrinfo(result); + nl_addr_put(addr); +} +END_TEST + +START_TEST(addr_flags2str) +{ + int ifa_flags = IFA_F_TENTATIVE | IFA_F_DADFAILED; + int ifa_flags2; + char buf128; + + rtnl_addr_flags2str(ifa_flags, buf, sizeof(buf)); + ck_assert_str_eq(buf, "dadfailed,tentative"); + + ifa_flags2 = rtnl_addr_str2flags(buf); + ck_assert_int_eq(ifa_flags2, ifa_flags); +} +END_TEST + +Suite *make_nl_addr_suite(void) +{ + Suite *suite = suite_create("Abstract addresses"); + TCase *tc = tcase_create("Core"); + + tcase_add_test(tc, addr_alloc); + tcase_add_test(tc, addr_binary_addr); + tcase_add_test(tc, addr_parse4); + tcase_add_test(tc, addr_parse6); + tcase_add_test(tc, addr_info); + tcase_add_test(tc, addr_flags2str); + suite_add_tcase(suite, tc); + + return suite; +}
View file
_service:tar_scm:libnl-3.7.0.tar.gz/tests/cksuite-all-attr.c
Added
@@ -0,0 +1,157 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ +/* + * Copyright (c) 2013 Thomas Graf <tgraf@suug.ch> + */ + +#include <linux/netlink.h> +#include <linux/if_ether.h> + +#include "cksuite-all.h" +#include "netlink/attr.h" +#include "netlink/msg.h" +#include "netlink/route/cls/u32.h" +#include "netlink-private/route/tc-api.h" +#include "netlink-private/nl-auto.h" + +START_TEST(attr_size) +{ + ck_assert_msg(nla_attr_size(0) == NLA_HDRLEN, + "Length of empty attribute should match header size"); + ck_assert_msg(nla_attr_size(1) == NLA_HDRLEN + 1, + "Length of 1 bytes payload should be NLA_HDRLEN + 1"); + ck_assert_msg(nla_attr_size(2) == NLA_HDRLEN + 2, + "Length of 2 bytes payload should be NLA_HDRLEN + 2"); + ck_assert_msg(nla_attr_size(3) == NLA_HDRLEN + 3, + "Length of 3 bytes payload should be NLA_HDRLEN + 3"); + ck_assert_msg(nla_attr_size(4) == NLA_HDRLEN + 4, + "Length of 4 bytes payload should be NLA_HDRLEN + 4"); + + ck_assert_msg(nla_total_size(1) == NLA_HDRLEN + 4, + "Total size of 1 bytes payload should result in 8 bytes"); + ck_assert_msg(nla_total_size(2) == NLA_HDRLEN + 4, + "Total size of 2 bytes payload should result in 8 bytes"); + ck_assert_msg(nla_total_size(3) == NLA_HDRLEN + 4, + "Total size of 3 bytes payload should result in 8 bytes"); + ck_assert_msg(nla_total_size(4) == NLA_HDRLEN + 4, + "Total size of 4 bytes payload should result in 8 bytes"); + + ck_assert_msg(nla_padlen(1) == 3, + "2 bytes of payload should result in 3 padding bytes"); + ck_assert_msg(nla_padlen(2) == 2, + "2 bytes of payload should result in 2 padding bytes"); + ck_assert_msg(nla_padlen(3) == 1, + "3 bytes of payload should result in 1 padding bytes"); + ck_assert_msg(nla_padlen(4) == 0, + "4 bytes of payload should result in 0 padding bytes"); + ck_assert_msg(nla_padlen(5) == 3, + "5 bytes of payload should result in 3 padding bytes"); +} +END_TEST + +START_TEST(msg_construct) +{ + struct nl_msg *msg; + struct nlmsghdr *nlh; + struct nlattr *a; + int i, rem; + + msg = nlmsg_alloc(); + ck_assert_msg(msg, "Unable to allocate netlink message"); + + for (i = 1; i < 256; i++) { + ck_assert_msg(nla_put_u32(msg, i, i + 1) == 0, + "Unable to add attribute %d", i); + } + + nlh = nlmsg_hdr(msg); + i = 1; + nlmsg_for_each_attr (a, nlh, 0, rem) { + ck_assert_msg(nla_type(a) == i, "Expected attribute %d", i); + i++; + ck_assert_msg(nla_get_u32(a) == i, + "Expected attribute value %d", i); + } + + nlmsg_free(msg); +} +END_TEST + +START_TEST(clone_cls_u32) +{ + _nl_auto_rtnl_link struct rtnl_link *link = NULL; + _nl_auto_rtnl_cls struct rtnl_cls *cls = NULL; + _nl_auto_rtnl_cls struct rtnl_cls *cls2 = NULL; + int r; + const uint32_t direction = 16; + + link = rtnl_link_alloc(); + ck_assert(link); + + rtnl_link_set_ifindex(link, 5); + + cls = rtnl_cls_alloc(); + ck_assert(cls); + + rtnl_tc_set_link(TC_CAST(cls), link); + + r = rtnl_tc_set_kind(TC_CAST(cls), "u32"); + ck_assert(r == 0); + + rtnl_cls_set_prio(cls, 1); + rtnl_cls_set_protocol(cls, ETH_P_IP); + + rtnl_tc_set_parent(TC_CAST(cls), TC_HANDLE(1, 0)); + + rtnl_u32_set_hashtable(cls, 5); + + rtnl_u32_add_key_uint32(cls, 0x0a000914, 0xffffffff, direction, 0); + + rtnl_u32_set_hashmask(cls, 0xff000000, direction); + + rtnl_u32_add_mark(cls, 55, 66); + + rtnl_u32_set_link(cls, 44); + + cls2 = (struct rtnl_cls *)nl_object_clone((struct nl_object *)cls); + ck_assert(cls2); +} +END_TEST + +/*****************************************************************************/ + +START_TEST(test_nltst_strtok) +{ +#define _assert_strtok(str, ...) \ + do { \ + const char *const _expected = { NULL, ##__VA_ARGS__, NULL }; \ + _nltst_auto_strfreev char **_tokens = NULL; \ + \ + _tokens = _nltst_strtokv(str); \ + _nltst_assert_strv_equal(_tokens, &_expected1); \ + } while (0) + + _assert_strtok(""); + _assert_strtok(" \n"); + _assert_strtok("a", "a"); + _assert_strtok(" a ", "a"); + _assert_strtok(" a\\ b", "a\\ ", "b"); + _assert_strtok(" a\\ b cc\\d", "a\\ ", "b", "cc\\d"); + _assert_strtok(" a\\ b\\ cc\\d", "a\\ ", "b\\ ", "cc\\d"); +} +END_TEST + +/*****************************************************************************/ + +Suite *make_nl_attr_suite(void) +{ + Suite *suite = suite_create("Netlink attributes"); + TCase *tc = tcase_create("Core"); + + tcase_add_test(tc, attr_size); + tcase_add_test(tc, msg_construct); + tcase_add_test(tc, clone_cls_u32); + tcase_add_test(tc, test_nltst_strtok); + suite_add_tcase(suite, tc); + + return suite; +}
View file
_service:tar_scm:libnl-3.7.0.tar.gz/tests/cksuite-all-ematch-tree-clone.c
Added
@@ -0,0 +1,142 @@ +#include <linux/netlink.h> +#include <stdio.h> +#include <time.h> +#include <check.h> + +#include "netlink-private/types.h" +#include "netlink/route/cls/ematch.h" +#include "cksuite-all.h" +#include "netlink-private/nl-auto.h" + +#define MAX_DEPTH 6 +#define MAX_CHILDREN 5 + +static int current_depth = 0; +static int id = 1; +static long long array_size = 0; + +static long long my_pow(long long x, long long y) +{ + int ret = x; + + if (y == 0) + return 1; + + if (y < 0 || x == 0) + return 0; + + while (--y) { + ret *= x; + } + + return ret; +} + +static long int generate_random(long int max) +{ + srandom(time(NULL) + id); + return (random() % max); +} + +static int build_children(struct nl_list_head *parent) +{ + int i, num = 0; + struct rtnl_ematch *child = NULL; + + if (!parent) + return 0; + + if (++current_depth > MAX_DEPTH) { + --current_depth; + return 0; + } + + num = generate_random(MAX_CHILDREN + 1); + for (i = 0; i < num; ++i) { + child = rtnl_ematch_alloc(); + if (!child) { + printf("Mem alloc error\n"); + exit(1); + } + build_children(&child->e_childs); + child->e_id = id++; + nl_list_add_tail(&child->e_list, parent); + } + + --current_depth; + return 0; +} + +static void build_src_cgroup(struct rtnl_ematch_tree *tree) +{ + build_children(&tree->et_list); +} + +static void dump_ematch_list(struct nl_list_head *head, int *result, int *index) +{ + struct rtnl_ematch *pos = NULL; + + nl_list_for_each_entry (pos, head, e_list) { + if (!nl_list_empty(&pos->e_childs)) + dump_ematch_list(&pos->e_childs, result, index); + result*index = pos->e_id; + (*index)++; + } +} + +static void dump_ematch_tree(struct rtnl_ematch_tree *tree, int *result, + int *index) +{ + if (!tree) + return; + + dump_ematch_list(&tree->et_list, result, index); +} + +static int compare(int *r1, int *r2, int len) +{ + int i = 0; + for (i = 0; i < len; ++i) { + if (r1i != r2i) + return -1; + } + return 0; +} + +START_TEST(ematch_tree_clone) +{ + _nl_auto_rtnl_ematch_tree struct rtnl_ematch_tree *src = NULL; + _nl_auto_rtnl_ematch_tree struct rtnl_ematch_tree *dst = NULL; + _nl_auto_free int *src_result = NULL; + _nl_auto_free int *dst_result = NULL; + int i = 0; + int j = 0; + + array_size = (MAX_DEPTH * my_pow(MAX_CHILDREN, MAX_DEPTH)) / 2; + src_result = calloc(4, array_size); + dst_result = calloc(4, array_size); + + src = rtnl_ematch_tree_alloc(2); + + build_src_cgroup(src); + dump_ematch_tree(src, src_result, &i); + + dst = rtnl_ematch_tree_clone(src); + dump_ematch_tree(dst, dst_result, &j); + + ck_assert(dst); + ck_assert(i == j); + ck_assert(!compare(src_result, dst_result, i)); +} +END_TEST + +Suite *make_nl_ematch_tree_clone_suite(void) +{ + Suite *suite = suite_create("Clone ematch tree"); + TCase *tc = tcase_create("Core"); + + tcase_add_test(tc, ematch_tree_clone); + suite_add_tcase(suite, tc); + + return suite; +}
View file
_service:tar_scm:libnl-3.7.0.tar.gz/tests/cksuite-all-netns.c
Added
@@ -0,0 +1,319 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ +/* + * Author: Susant Sahani <susant@redhat.com> + * Copyright (c) 2018 Red Hat, Inc. + */ + +#include <stdlib.h> +#include <stdbool.h> +#include <linux/netlink.h> + +#include "netlink-private/utils.h" +#include "netlink/route/link.h" +#include "netlink/route/link/sit.h" +#include <netlink/route/link/bonding.h> +#include <netlink/route/link/bridge.h> +#include <netlink/route/link/ip6tnl.h> +#include <netlink/route/link/ipgre.h> +#include <netlink/route/link/ipip.h> +#include <netlink/route/link/ipvlan.h> +#include <netlink/route/link/ipvti.h> +#include <netlink/route/link/macsec.h> +#include <netlink/route/link/macvlan.h> +#include <netlink/route/link/macvtap.h> +#include <netlink/route/link/veth.h> +#include <netlink/route/link/vlan.h> +#include <netlink/route/link/vrf.h> +#include <netlink/route/link/vxlan.h> + +#include "cksuite-all.h" + +/*****************************************************************************/ + +static void _nltst_delete_link2(const char *ifname) +{ + _nltst_delete_link(NULL, ifname); +} +#define _nltst_auto_delete_link _nl_auto(_nltst_auto_delete_link_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(const char *, _nltst_auto_delete_link_fcn, + _nltst_delete_link2); + +/*****************************************************************************/ + +START_TEST(cache_and_clone) +{ + _nl_auto_nl_socket struct nl_sock *sk = NULL; + _nl_auto_nl_cache struct nl_cache *link_cache = NULL; + _nl_auto_free struct nl_object **links_all = NULL; + static const struct { + const char *ifname; + const char *kind; + bool add; + } links = { + { + .ifname = "xbr0", + .kind = "bridge", + .add = true, + }, + { + .ifname = "xdummy0", + .kind = "dummy", + .add = true, + }, + { + .ifname = "xbond0", + .kind = "bond", + .add = true, + }, + { + .ifname = "lo", + .kind = NULL, + .add = false, + }, + }; + int i; + int r; + + for (i = 0; i < _NL_N_ELEMENTS(links); i++) { + if (linksi.add) + _nltst_add_link(NULL, linksi.ifname, linksi.kind, + NULL); + } + + sk = _nltst_socket(NETLINK_ROUTE); + + r = rtnl_link_alloc_cache(sk, AF_UNSPEC, &link_cache); + ck_assert_int_eq(r, 0); + + r = nl_cache_refill(sk, link_cache); + ck_assert_int_eq(r, 0); + + for (i = 0; i < _NL_N_ELEMENTS(links); i++) { + _nl_auto_rtnl_link struct rtnl_link *link_clone = NULL; + struct rtnl_link *link; + + link = _nltst_cache_get_link(link_cache, linksi.ifname); + ck_assert_ptr_nonnull(link); + + ck_assert_str_eq(rtnl_link_get_name(link), linksi.ifname); + + if (_nl_streq(linksi.ifname, "lo")) + ck_assert_int_eq(rtnl_link_get_ifindex(link), 1); + else + ck_assert_int_gt(rtnl_link_get_ifindex(link), 1); + + link_clone = (struct rtnl_link *)nl_object_clone( + (struct nl_object *)link); + ck_assert(link_clone); + + _nltst_object_identical(link, link_clone); + } + + links_all = _nltst_cache_get_all(link_cache, NULL); + for (i = 0; links_alli; i++) { + struct rtnl_link *link = (struct rtnl_link *)links_alli; + _nl_auto_rtnl_link struct rtnl_link *link_clone = NULL; + + link_clone = (struct rtnl_link *)nl_object_clone( + (struct nl_object *)link); + ck_assert(link_clone); + + _nltst_object_identical(link, link_clone); + } +} +END_TEST + +/*****************************************************************************/ + +START_TEST(test_create_iface) +{ + const int TEST_IDX = _i; + _nl_auto_nl_socket struct nl_sock *sk = _nltst_socket(NETLINK_ROUTE); + _nl_auto_rtnl_link struct rtnl_link *link = NULL; + _nl_auto_rtnl_link struct rtnl_link *link2 = NULL; + _nl_auto_rtnl_link struct rtnl_link *peer = NULL; + _nltst_auto_delete_link const char *IFNAME_DUMMY = NULL; + _nltst_auto_delete_link const char *IFNAME = "ifname"; + int ifindex_dummy; + uint32_t u32; + int r; + + switch (TEST_IDX) { + case 0: + link = _nltst_assert(rtnl_link_bridge_alloc()); + rtnl_link_set_name(link, IFNAME); + break; + case 1: + link = _nltst_assert(rtnl_link_vxlan_alloc()); + rtnl_link_set_name(link, IFNAME); + _nltst_assert_retcode(rtnl_link_vxlan_set_id(link, 128)); + break; + case 2: + link = _nltst_assert(rtnl_link_alloc()); + rtnl_link_set_type(link, "ifb"); + rtnl_link_set_name(link, IFNAME); + break; + case 3: + link = _nltst_assert(rtnl_link_ipgre_alloc()); + rtnl_link_set_name(link, IFNAME); + _nltst_assert_retcode(rtnl_link_ipgre_set_local( + link, _nltst_inet4("192.168.254.12"))); + _nltst_assert_retcode(rtnl_link_ipgre_set_remote( + link, _nltst_inet4("192.168.254.13"))); + _nltst_assert_retcode(rtnl_link_ipgre_set_ttl(link, 64)); + break; + case 4: + link = _nltst_assert(rtnl_link_ip6_tnl_alloc()); + rtnl_link_set_name(link, IFNAME); + _nltst_assert_retcode(rtnl_link_ip6_tnl_set_local( + link, _nltst_inet6p("2607:f0d0:1002:51::4"))); + _nltst_assert_retcode(rtnl_link_ip6_tnl_set_remote( + link, _nltst_inet6p("2607:f0d0:1002:52::5"))); + break; + case 5: + link = _nltst_assert(rtnl_link_ipgretap_alloc()); + rtnl_link_set_name(link, IFNAME); + _nltst_assert_retcode(rtnl_link_ipgre_set_local( + link, _nltst_inet4("10.211.55.10"))); + _nltst_assert_retcode(rtnl_link_ipgre_set_remote( + link, _nltst_inet4("10.133.6.33"))); + _nltst_assert_retcode(rtnl_link_ipgre_set_ttl(link, 64)); + break; + case 6: + link = _nltst_assert(rtnl_link_ipvti_alloc()); + rtnl_link_set_name(link, IFNAME); + _nltst_assert_retcode(rtnl_link_ipvti_set_local( + link, _nltst_inet4("192.168.254.12"))); + _nltst_assert_retcode(rtnl_link_ipvti_set_remote( + link, _nltst_inet4("192.168.254.13"))); + break; + case 7: + link = _nltst_assert(rtnl_link_sit_alloc()); + rtnl_link_set_name(link, IFNAME); + _nltst_assert_retcode(rtnl_link_sit_set_local( + link, _nltst_inet4("192.168.254.12"))); + _nltst_assert_retcode(rtnl_link_sit_set_remote( + link, _nltst_inet4("192.168.254.13"))); + _nltst_assert_retcode(rtnl_link_sit_set_ttl(link, 64)); + break; + case 8: + link = _nltst_assert(rtnl_link_ipip_alloc()); + rtnl_link_set_name(link, IFNAME); + _nltst_assert_retcode(rtnl_link_ipip_set_local( + link, _nltst_inet4("192.168.254.12"))); + _nltst_assert_retcode(rtnl_link_ipip_set_remote( + link, _nltst_inet4("192.168.254.13"))); + _nltst_assert_retcode(rtnl_link_ipip_set_ttl(link, 64)); + break; + case 9: + link = _nltst_assert(rtnl_link_bond_alloc()); + rtnl_link_set_name(link, IFNAME); + break; + case 10: + IFNAME_DUMMY = "ci-dummy"; + _nltst_add_link(sk, IFNAME_DUMMY, "dummy", &ifindex_dummy); + + link = _nltst_assert(rtnl_link_macvtap_alloc()); + rtnl_link_set_link(link, ifindex_dummy); + rtnl_link_set_name(link, IFNAME); + _nltst_assert_retcode(rtnl_link_macvtap_set_mode( + link, rtnl_link_macvtap_str2mode("bridge"))); + break; + case 11: + IFNAME_DUMMY = "ci-dummy"; + _nltst_add_link(sk, IFNAME_DUMMY, "dummy", &ifindex_dummy); + + link = _nltst_assert(rtnl_link_macvlan_alloc()); + rtnl_link_set_link(link, ifindex_dummy); + rtnl_link_set_name(link, IFNAME); + break; + case 12: + IFNAME_DUMMY = "ci-dummy"; + _nltst_add_link(sk, IFNAME_DUMMY, "dummy", &ifindex_dummy); + + link = _nltst_assert(rtnl_link_vlan_alloc()); + rtnl_link_set_link(link, ifindex_dummy); + rtnl_link_set_name(link, IFNAME); + _nltst_assert_retcode(rtnl_link_vlan_set_id(link, 10)); + break; + case 13: + IFNAME_DUMMY = "ci-dummy"; + _nltst_add_link(sk, IFNAME_DUMMY, "dummy", &ifindex_dummy); + + link = _nltst_assert(rtnl_link_macsec_alloc()); + rtnl_link_set_link(link, ifindex_dummy); + rtnl_link_set_name(link, IFNAME); + _nltst_assert_retcode(rtnl_link_macsec_set_port(link, 10)); + _nltst_assert_retcode(rtnl_link_macsec_set_encrypt(link, 1)); + _nltst_assert_retcode( + rtnl_link_macsec_set_replay_protect(link, 1)); + _nltst_assert_retcode(rtnl_link_macsec_set_window(link, 200)); + break; + case 14: + IFNAME_DUMMY = "ci-dummy"; + _nltst_add_link(sk, IFNAME_DUMMY, "dummy", &ifindex_dummy); + + link = _nltst_assert(rtnl_link_ipvlan_alloc()); + rtnl_link_set_link(link, ifindex_dummy); + _nltst_assert_retcode(rtnl_link_ipvlan_set_mode( + link, rtnl_link_ipvlan_str2mode("l2"))); + rtnl_link_set_name(link, IFNAME); + break; + case 15: + link = _nltst_assert(rtnl_link_vrf_alloc()); + rtnl_link_set_name(link, IFNAME); + _nltst_assert_retcode(rtnl_link_vrf_set_tableid(link, 10)); + break; + case 16: { + link = _nltst_assert(rtnl_link_veth_alloc()); + rtnl_link_set_name(link, IFNAME); + peer = _nltst_assert(rtnl_link_veth_get_peer(link)); + rtnl_link_set_name(peer, "ci-veth-peer"); + } break; + default: + ck_assert_msg(0, "unexpected TEST_IDX=%d", _i); + break; + } + + r = rtnl_link_add(sk, link, NLM_F_CREATE); + if (r == -NLE_OPNOTSUPP) { + /* Hm, no kernel module? Skip the test. */ + _nltst_assert_link_not_exists(IFNAME); + IFNAME = NULL; + return; + } + _nltst_assert_retcode(r); + + _nltst_assert_link_exists(IFNAME); + + switch (TEST_IDX) { + case 15: + _nltst_get_link(sk, IFNAME, NULL, &link2); + _nltst_assert_retcode(rtnl_link_vrf_get_tableid(link2, &u32)); + ck_assert_int_eq(u32, 10); + break; + case 16: + _nltst_assert_link_exists("ci-veth-peer"); + if (_nltst_rand_bool()) + IFNAME = "ci-veth-peer"; + break; + } +} +END_TEST + +/*****************************************************************************/ + +Suite *make_nl_netns_suite(void) +{ + Suite *suite = suite_create("netns"); + TCase *tc = tcase_create("Core"); + + tcase_add_checked_fixture(tc, nltst_netns_fixture_setup, + nltst_netns_fixture_teardown); + tcase_add_test(tc, cache_and_clone); + tcase_add_loop_test(tc, test_create_iface, 0, 17); + + suite_add_tcase(suite, tc); + + return suite; +}
View file
_service:tar_scm:libnl-3.7.0.tar.gz/tests/cksuite-all.h
Added
@@ -0,0 +1,12 @@ +#ifndef __LIBNL3_TESTS_CHECK_ALL_H__ +#define __LIBNL3_TESTS_CHECK_ALL_H__ + +#include <check.h> +#include "nl-test-util.h" + +Suite *make_nl_attr_suite(void); +Suite *make_nl_addr_suite(void); +Suite *make_nl_ematch_tree_clone_suite(void); +Suite *make_nl_netns_suite(void); + +#endif /* __LIBNL3_TESTS_CHECK_ALL_H__ */
View file
_service:tar_scm:libnl-3.7.0.tar.gz/tests/nl-test-util.c
Added
@@ -0,0 +1,657 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +#include "nl-test-util.h" + +#include <fcntl.h> +#include <inttypes.h> +#include <limits.h> +#include <sched.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <sys/mount.h> +#include <unistd.h> + +#include "netlink-private/utils.h" +#include "netlink/netlink.h" +#include "netlink/route/link.h" +#include "netlink/route/route.h" +#include "netlink/socket.h" + +/*****************************************************************************/ + +void _nltst_get_urandom(void *ptr, size_t len) +{ + int fd; + ssize_t nread; + + ck_assert_int_gt(len, 0); + ck_assert_ptr_nonnull(ptr); + + fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC | O_NOCTTY); + _nltst_assert_errno(fd >= 0); + + nread = read(fd, ptr, len); + _nltst_assert_errno(nread == len); + + _nltst_close(fd); +} + +uint32_t _nltst_rand_u32(void) +{ + _nl_thread_local static unsigned short entropy3; + _nl_thread_local static bool has_entropy = false; + + if (!has_entropy) { + unsigned long long seed; + uint64_t seed64; + const char *s; + char *s_end; + + memset(entropy, 0, sizeof(entropy)); + s = getenv("NLTST_SEED_RAND"); + if (!s) + seed = 0; + else if (s0 != '\0') { + errno = 0; + seed = strtoull(s, &s_end, 10); + if (errno != 0 || s_end0 != '\0') { + ck_assert_msg( + 0, + "invalid NLTST_SEED_RAND=\"%s\". Must be an integer to seed the random numbers", + s); + } + } else + _nltst_get_urandom(&seed, sizeof(seed)); + + seed64 = seed; + printf("runs with NLTST_SEED_RAND=%" PRIu64 "\n", seed64); + + entropy0 = (seed64 >> 0) ^ (seed64 >> 48); + entropy1 = (seed64 >> 16) ^ (seed64 >> 0); + entropy2 = (seed64 >> 32) ^ (seed64 >> 16); + has_entropy = true; + } + + _NL_STATIC_ASSERT(sizeof(long) >= sizeof(uint32_t)); + return jrand48(entropy); +} + +/*****************************************************************************/ + +#define _CANARY 539339 + +struct nltst_netns { + int canary; +}; + +/*****************************************************************************/ + +#define _assert_nltst_netns(nsdata) \ + do { \ + const struct nltst_netns *_nsdata = (nsdata); \ + \ + ck_assert_ptr_nonnull(_nsdata); \ + ck_assert_int_eq(_nsdata->canary, _CANARY); \ + } while (0) + +static struct { + struct nltst_netns *nsdata; +} _netns_fixture_global; + +void nltst_netns_fixture_setup(void) +{ + ck_assert(!_netns_fixture_global.nsdata); + + _netns_fixture_global.nsdata = nltst_netns_enter(); + _assert_nltst_netns(_netns_fixture_global.nsdata); +} + +void nltst_netns_fixture_teardown(void) +{ + _assert_nltst_netns(_netns_fixture_global.nsdata); + _nl_clear_pointer(&_netns_fixture_global.nsdata, nltst_netns_leave); +} + +/*****************************************************************************/ + +static void unshare_user(void) +{ + const uid_t uid = geteuid(); + const gid_t gid = getegid(); + FILE *f; + int r; + + /* Become a root in new user NS. */ + r = unshare(CLONE_NEWUSER); + _nltst_assert_errno(r == 0); + + /* Since Linux 3.19 we have to disable setgroups() in order to map users. + * Just proceed if the file is not there. */ + f = fopen("/proc/self/setgroups", "we"); + if (f) { + r = fprintf(f, "deny"); + _nltst_assert_errno(r > 0); + _nltst_fclose(f); + } + + /* Map current UID to root in NS to be created. */ + f = fopen("/proc/self/uid_map", "we"); + if (!f) { + if (errno == EACCES) { + /* Accessing uid_map might fail due to sandboxing. + * We ignore that error and proceed with the test. It will probably + * still work. */ + return; + } + _nltst_assert_errno(f); + } + r = fprintf(f, "0 %d 1", uid); + _nltst_assert_errno(r > 0); + _nltst_fclose(f); + + /* Map current GID to root in NS to be created. */ + f = fopen("/proc/self/gid_map", "we"); + _nltst_assert_errno(f); + r = fprintf(f, "0 %d 1", gid); + _nltst_assert_errno(r > 0); + _nltst_fclose(f); +} + +struct nltst_netns *nltst_netns_enter(void) +{ + struct nltst_netns *nsdata; + int r; + + nsdata = calloc(1, sizeof(struct nltst_netns)); + ck_assert(nsdata); + + nsdata->canary = _CANARY; + + unshare_user(); + + r = unshare(CLONE_NEWNET | CLONE_NEWNS); + _nltst_assert_errno(r == 0); + + /* We need a read-only /sys so that the platform knows there's no udev. */ + mount(NULL, "/sys", "sysfs", MS_SLAVE, NULL); + r = mount("sys", "/sys", "sysfs", MS_RDONLY, NULL); + _nltst_assert_errno(r == 0); + + return nsdata; +} + +void nltst_netns_leave(struct nltst_netns *nsdata) +{ + ck_assert(nsdata); + ck_assert_int_eq(nsdata->canary, _CANARY); + + /* nltst_netns_leave() was supposed to enter the original namespaces again + * and undo enter. + * + * However, I could get it to work (setns() always fails with EPERM) + * and valgrind on current Ubuntu seems not to support setns() call. + * + * So, do nothing. It's not really a problem, because the next test + * either should unshare yet another namespace, or not care about + * such things. */ + + free(nsdata); +} + +/*****************************************************************************/ + +void _nltst_object_identical(const void *a, const void *b) +{ + struct nl_object *o_a = (void *)a; + struct nl_object *o_b = (void *)b; + + ck_assert(a); + ck_assert(b); + + ck_assert_int_eq(nl_object_identical(o_a, o_b), 1); + ck_assert_int_eq(nl_object_identical(o_b, o_a), 1); + ck_assert_int_eq(nl_object_diff64(o_b, o_a), 0); + ck_assert_int_eq(nl_object_diff64(o_a, o_b), 0); + ck_assert_int_eq(nl_object_diff(o_a, o_b), 0); + ck_assert_int_eq(nl_object_diff(o_b, o_a), 0); +} + +/*****************************************************************************/ + +char *_nltst_object_to_string(struct nl_object *obj) +{ + size_t L = 1024; + size_t l; + char *s; + + if (!obj) + return strdup("(null)"); + + s = malloc(L); + ck_assert_ptr_nonnull(s); + + nl_object_dump_buf(obj, s, L); + l = strlen(s); + ck_assert_int_lt(l, L); + s = realloc(s, l + 1); + ck_assert_ptr_nonnull(s); + return s; +} + +struct cache_get_all_data { + struct nl_object **arr; + size_t len; + size_t idx; +}; + +static void _cache_get_all_fcn(struct nl_object *obj, void *user_data) +{ + struct cache_get_all_data *data = user_data; + size_t i; + + ck_assert(obj); + ck_assert_int_lt(data->idx, data->len); + + for (i = 0; i < data->idx; i++) + ck_assert_ptr_ne(data->arri, obj); + + data->arrdata->idx++ = obj; +} + +struct nl_object **_nltst_cache_get_all(struct nl_cache *cache, size_t *out_len) +{ + int nitems; + struct cache_get_all_data data = { + .idx = 0, + .len = 0, + }; + size_t len2 = 0; + size_t i; + size_t j; + + ck_assert(cache); + + nitems = nl_cache_nitems(cache); + ck_assert_int_ge(nitems, 0); + + data.len = nitems; + data.arr = malloc(sizeof(struct nl_object *) * (data.len + 1)); + ck_assert_ptr_nonnull(data.arr); + + nl_cache_foreach(cache, _cache_get_all_fcn, &data); + + ck_assert_int_eq(data.idx, data.len); + + ck_assert_int_le(data.len, SSIZE_MAX); + + data.arrdata.len = NULL; + if (out_len) + *out_len = data.len; + + /* double check the result. */ + for (struct nl_object *obj = nl_cache_get_first(cache); obj; + obj = nl_cache_get_next(obj)) { + ck_assert_ptr_eq(data.arrlen2, obj); + len2++; + } + ck_assert_ptr_null(data.arrlen2); + + for (i = 0; i < data.len; i++) { + ck_assert_ptr_nonnull(data.arri); + for (j = i + 1; j < data.len; j++) + ck_assert_ptr_ne(data.arri, data.arrj); + } + + return data.arr; +} + +struct rtnl_link *_nltst_cache_get_link(struct nl_cache *cache, + const char *ifname) +{ + _nl_auto_free struct nl_object **objs = NULL; + struct rtnl_link *link = NULL; + size_t i; + + ck_assert_ptr_nonnull(cache); + ck_assert_ptr_nonnull(ifname); + + objs = _nltst_cache_get_all(cache, NULL); + for (i = 0; objsi; i++) { + if (_nl_streq(rtnl_link_get_name((struct rtnl_link *)objsi), + ifname)) { + ck_assert_ptr_null(link); + link = (struct rtnl_link *)objsi; + } + } + + if (_nltst_rand_u32_range(5) == 0) { + _nl_auto_rtnl_link struct rtnl_link *link2 = NULL; + + link2 = rtnl_link_get_by_name(cache, ifname); + ck_assert_ptr_eq(link2, link); + } + + return link; +} + +/*****************************************************************************/ + +struct nl_sock *_nltst_socket(int protocol) +{ + struct nl_sock *sk; + int r; + + sk = nl_socket_alloc(); + ck_assert(sk); + + r = nl_connect(sk, protocol); + ck_assert_int_eq(r, 0); + + if (_nltst_rand_u32_range(5) == 0) + nl_cache_free(_nltst_rtnl_link_alloc_cache(sk, AF_UNSPEC, 0)); + + if (_nltst_rand_u32_range(5) == 0) + nl_cache_free(_nltst_rtnl_route_alloc_cache( + sk, _nltst_rand_select(AF_UNSPEC, AF_INET, AF_INET6))); + + return sk; +} + +void _nltst_add_link(struct nl_sock *sk, const char *ifname, const char *kind, + int *out_ifindex) +{ + _nl_auto_nl_socket struct nl_sock *sk_free = NULL; + _nl_auto_rtnl_link struct rtnl_link *link = NULL; + _nl_auto_nl_cache struct nl_cache *cache = NULL; + struct rtnl_link *link2; + int ifindex; + int r; + + ck_assert(ifname); + ck_assert(kind); + + if (_nltst_rand_u32_range(5) == 0) + _nltst_assert_link_not_exists(ifname); + + if (!sk) { + sk = _nltst_socket(NETLINK_ROUTE); + sk_free = sk; + } + + link = rtnl_link_alloc(); + ck_assert(link); + + r = rtnl_link_set_type(link, kind); + ck_assert_int_eq(r, 0); + + rtnl_link_set_name(link, ifname); + + r = rtnl_link_add(sk, link, NLM_F_CREATE); + ck_assert_int_eq(r, 0); + + if (!out_ifindex && _nltst_rand_u32_range(5) != 0) + return; + + cache = _nltst_rtnl_link_alloc_cache(sk, AF_UNSPEC, 0); + + link2 = _nltst_cache_get_link(cache, ifname); + ck_assert_ptr_nonnull(link2); + + ifindex = rtnl_link_get_ifindex(link2); + ck_assert_int_gt(ifindex, 0); + + if (out_ifindex) + *out_ifindex = ifindex; +} + +void _nltst_delete_link(struct nl_sock *sk, const char *ifname) +{ + _nl_auto_nl_socket struct nl_sock *sk_free = NULL; + _nl_auto_rtnl_link struct rtnl_link *link = NULL; + + _nltst_assert_link_exists(ifname); + + if (!sk) { + sk = _nltst_socket(NETLINK_ROUTE); + sk_free = sk; + } + + if (_nltst_rand_u32_range(5) == 0) { + _nl_auto_nl_cache struct nl_cache *cache = NULL; + + cache = _nltst_rtnl_link_alloc_cache(sk, AF_UNSPEC, 0); + ck_assert_ptr_nonnull(_nltst_cache_get_link(cache, ifname)); + } + + link = rtnl_link_alloc(); + ck_assert_ptr_nonnull(link); + + rtnl_link_set_name(link, ifname); + + _nltst_assert_retcode(rtnl_link_delete(sk, link)); + + _nltst_assert_link_not_exists(ifname); +} + +void _nltst_get_link(struct nl_sock *sk, const char *ifname, int *out_ifindex, + struct rtnl_link **out_link) +{ + _nl_auto_nl_cache struct nl_cache *cache = NULL; + struct rtnl_link *link; + + if (_nltst_rand_u32_range(5) == 0) + _nltst_assert_link_exists(ifname); + + cache = _nltst_rtnl_link_alloc_cache(sk, AF_UNSPEC, 0); + + link = _nltst_cache_get_link(cache, ifname); + ck_assert(link); + + if (out_ifindex) + *out_ifindex = rtnl_link_get_ifindex(link); + + if (out_link) { + nl_object_get((struct nl_object *)link); + *out_link = link; + } +} + +struct nl_cache *_nltst_rtnl_link_alloc_cache(struct nl_sock *sk, + int addr_family, unsigned flags) +{ + _nl_auto_nl_socket struct nl_sock *sk_free = NULL; + struct nl_cache *cache; + int r; + + if (!sk) { + sk = _nltst_socket(NETLINK_ROUTE); + sk_free = sk; + } + + if (flags == 0 && _nltst_rand_bool()) + r = rtnl_link_alloc_cache(sk, addr_family, &cache); + else + r = rtnl_link_alloc_cache_flags(sk, addr_family, &cache, flags); + + _nltst_assert_retcode(r); + + if (_nltst_rand_u32_range(5) == 0) + free(_nltst_cache_get_all(cache, NULL)); + + return _nltst_assert(cache); +} + +struct nl_cache *_nltst_rtnl_route_alloc_cache(struct nl_sock *sk, + int addr_family) +{ + struct nl_cache *cache; + + ck_assert_ptr_nonnull(sk); + ck_assert(addr_family == AF_UNSPEC || addr_family == AF_INET || + addr_family == AF_INET6); + + _nltst_assert_retcode( + rtnl_route_alloc_cache(sk, addr_family, 0, &cache)); + + if (_nltst_rand_u32_range(5) == 0) + free(_nltst_cache_get_all(cache, NULL)); + + return _nltst_assert(cache); +} + +/*****************************************************************************/ + +char *_nltst_strtok(const char **p_str) +{ + const char *str; + _nl_auto_free char *dst = NULL; + size_t dst_len = 0; + size_t dst_alloc = 0; + size_t i; + + ck_assert_ptr_nonnull(p_str); + + str = _nltst_str_skip_space(*p_str); + + if (str0 == '\0') { + *p_str = str; + return NULL; + } + + dst_len = 0; + dst_alloc = 10; + dst = malloc(dst_alloc); + ck_assert_ptr_nonnull(dst); + + i = 0; + while (true) { + char ch1 = '\0'; + char ch2 = '\0'; + + /* We take the first word, up until whitespace. Note that backslash + * escape is honored, so you can backslash escape spaces. The returned + * string will NOT have backslashes removed. */ + + if (stri == '\0') { + *p_str = &stri; + break; + } + if (_nltst_char_is_space(stri)) { + *p_str = _nltst_str_skip_space(&stri + 1); + break; + } + ch1 = stri; + if (stri == '\\') { + if (stri + 1 != '\0') { + ch2 = stri + 1; + i += 2; + } else + i += 1; + } else + i += 1; + + if (dst_len + 3 >= dst_alloc) { + dst_alloc *= 2; + dst = realloc(dst, dst_alloc); + ck_assert_ptr_nonnull(dst); + } + dstdst_len++ = ch1; + if (ch2 != '\0') + dstdst_len++ = ch2; + } + + ck_assert_int_gt(dst_len, 0); + return strndup(dst, dst_len); +} + +char **_nltst_strtokv(const char *str) +{ + _nl_auto_free char *s = NULL; + _nltst_auto_strfreev char **result = NULL; + size_t r_len = 0; + size_t r_alloc = 0; + + if (!str) + return NULL; + + r_alloc = 4; + result = malloc(sizeof(char *) * r_alloc); + ck_assert_ptr_nonnull(result); + + while ((s = _nltst_strtok(&str))) { + if (r_len + 2 >= r_alloc) { + r_alloc *= 2; + result = realloc(result, sizeof(char *) * r_alloc); + ck_assert_ptr_nonnull(result); + } + resultr_len++ = _nl_steal_pointer(&s); + } + ck_assert_int_lt(r_len, r_alloc); + resultr_len = NULL; + return _nl_steal_pointer(&result); +} + +/*****************************************************************************/ + +void _nltst_assert_link_exists_full(const char *ifname, bool exists) +{ + _nl_auto_nl_cache struct nl_cache *cache = NULL; + _nl_auto_rtnl_link struct rtnl_link *link_clone = NULL; + struct rtnl_link *link; + char path100; + struct stat st; + int rnd; + int r; + + ck_assert_pstr_ne(ifname, NULL); + ck_assert_int_lt(strlen(ifname), IFNAMSIZ); + + strcpy(path, "/sys/class/net/"); + strcat(path, ifname); + ck_assert_int_lt(strlen(path), sizeof(path)); + + r = stat(path, &st); + if (exists) { + if (r != 0) { + const int errsv = (errno); + + ck_assert_msg( + 0, + "link(%s) does not exist (stat(%s) failed with r=%d, errno=%d (%s)", + ifname, path, r, errsv, strerror(errsv)); + } + } else { + if (r != -1 && errno != ENOENT) { + const int errsv = (errno); + + ck_assert_msg( + 0, + "link(%s) should not exist but stat(%s) gave r=%d, errno=%d (%s)", + ifname, path, r, errsv, strerror(errsv)); + } + } + + rnd = _nltst_rand_u32_range(3); + + if (rnd == 0) + return; + + cache = _nltst_rtnl_link_alloc_cache(NULL, AF_UNSPEC, 0); + + link = _nltst_cache_get_link(cache, ifname); + if (exists) + ck_assert_ptr_nonnull(link); + else + ck_assert_ptr_null(link); + + if (!link || rnd == 1) + return; + + link_clone = + (struct rtnl_link *)nl_object_clone((struct nl_object *)link); + ck_assert(link_clone); + + /* FIXME: we would expect that the cloned object is identical. It is not. */ + /* _nltst_object_identical(link, link_clone); */ +}
View file
_service:tar_scm:libnl-3.7.0.tar.gz/tests/nl-test-util.h
Added
@@ -0,0 +1,400 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +#ifndef __NL_TEST_UTIL_H__ +#define __NL_TEST_UTIL_H__ + +#include <errno.h> +#include <sys/stat.h> +#include <check.h> +#include <string.h> +#include <stdbool.h> +#include <arpa/inet.h> + +#include "netlink/object.h" +#include "netlink/cache.h" + +#include "netlink-private/nl-auto.h" +#include "netlink-private/utils.h" + +/*****************************************************************************/ + +static inline void _nltst_strfreev(char **strv) +{ + size_t i; + + if (strv) { + for (i = 0; strvi; i++) + free(strvi); + free(strv); + } +} + +#define _nltst_auto_strfreev _nl_auto(_nltst_auto_strfreev_fcn) +_NL_AUTO_DEFINE_FCN_TYPED0(char **, _nltst_auto_strfreev_fcn, _nltst_strfreev); + +/*****************************************************************************/ + +#ifndef ck_assert_ptr_nonnull +#define ck_assert_ptr_nonnull(ptr) ck_assert(ptr) +#endif + +#ifndef ck_assert_pstr_ne +#define ck_assert_pstr_ne(a, b) \ + do { \ + const char *_a = (a); \ + const char *_b = (b); \ + \ + ck_assert(!(_a == _b || (_a && _b && strcmp(_a, _b) == 0))); \ + } while (0) +#endif + +#ifndef ck_assert_ptr_null +#define ck_assert_ptr_null(ptr) ck_assert(!(ptr)) +#endif + +/*****************************************************************************/ + +void _nltst_get_urandom(void *ptr, size_t len); + +uint32_t _nltst_rand_u32(void); + +static inline uint32_t _nltst_rand_u32_range(uint32_t n) +{ + uint32_t rem; + uint32_t i; + + if (n == 0) + return _nltst_rand_u32(); + if (n == 1) + return 0; + + rem = UINT32_MAX % n; + for (;;) { + i = _nltst_rand_u32(); + if (i < (UINT32_MAX - rem)) + return i % n; + } +} + +static inline bool _nltst_rand_bool(void) +{ + return _nltst_rand_u32() % 2 == 0; +} + +#define _nltst_rand_select(a, ...) \ + ({ \ + const typeof(a) _lst = { (a), ##__VA_ARGS__ }; \ + \ + _lst_nltst_rand_u32_range(_NL_N_ELEMENTS(_lst)); \ + }) + +/*****************************************************************************/ + +#define _nltst_assert(expr) \ + ({ \ + typeof(expr) _expr = (expr); \ + \ + if (!_expr) { \ + ck_assert_msg(0, "assert(%s) failed", #expr); \ + } \ + _expr; \ + }) + +#define _nltst_assert_errno(expr) \ + do { \ + if (expr) { \ + } else { \ + const int _errno = (errno); \ + \ + ck_assert_msg(0, "assert(%s) failed (errno=%d, %s)", \ + #expr, _errno, strerror(_errno)); \ + } \ + } while (0) + +#define _nltst_assert_retcode(expr) \ + do { \ + const int _r = (expr); \ + \ + if (_r < 0) { \ + ck_assert_msg( \ + 0, "command(%s) failed with return code %d", \ + #expr, _r); \ + } \ + if (_r > 0) { \ + ck_assert_msg( \ + 0, \ + "command(%s) has unexpected positive return code %d", \ + #expr, _r); \ + } \ + } while (0) + +#define _nltst_close(fd) \ + do { \ + int _r; \ + \ + _r = _nl_close((fd)); \ + _nltst_assert_errno(_r == 0); \ + } while (0) + +#define _nltst_fclose(f) \ + do { \ + int _r; \ + \ + _r = fclose((f)); \ + _nltst_assert_errno(_r == 0); \ + } while (0) + +void _nltst_assert_link_exists_full(const char *ifname, bool exists); + +#define _nltst_assert_link_exists(ifname) \ + _nltst_assert_link_exists_full((ifname), true) + +#define _nltst_assert_link_not_exists(ifname) \ + _nltst_assert_link_exists_full((ifname), false) + +/*****************************************************************************/ + +typedef union { + in_addr_t addr4; + struct in_addr a4; + struct in6_addr a6; +} NLTstIPAddr; + +static inline char *_nltst_inet_ntop(int addr_family, const void *addr, + char bufstatic INET_ADDRSTRLEN) +{ + char *r; + + ck_assert(addr_family == AF_INET || addr_family == AF_INET6); + ck_assert(addr); + + r = (char *)inet_ntop(addr_family, addr, buf, + (addr_family == AF_INET) ? INET_ADDRSTRLEN : + INET6_ADDRSTRLEN); + ck_assert_ptr_eq(r, buf); + ck_assert_int_lt(strlen(r), (addr_family == AF_INET) ? + INET_ADDRSTRLEN : + INET6_ADDRSTRLEN); + return r; +} + +static inline char *_nltst_inet_ntop_dup(int addr_family, const void *addr) +{ + return (char *)_nltst_inet_ntop(addr_family, addr, + malloc((addr_family == AF_INET) ? + INET_ADDRSTRLEN : + INET6_ADDRSTRLEN)); +} + +static inline bool _nltst_inet_pton(int addr_family, const char *str, + int *out_addr_family, void *out_addr) +{ + NLTstIPAddr a; + int r; + + ck_assert(addr_family == AF_UNSPEC || addr_family == AF_INET || + addr_family == AF_INET6); + + /* when requesting @out_addr, then the addr-family must either be + * pre-determined or requested too. */ + ck_assert(!out_addr || out_addr_family || addr_family != AF_UNSPEC); + + if (!str) + return false; + + if (addr_family == AF_UNSPEC) + addr_family = strchr(str, ':') ? AF_INET6 : AF_INET; + + r = inet_pton(addr_family, str, &a); + if (r != 1) + return false; + + if (out_addr) { + memcpy(out_addr, &a, + addr_family == AF_INET ? sizeof(in_addr_t) : + sizeof(struct in6_addr)); + } + if (out_addr_family) + *out_addr_family = addr_family; + + return true; +} + +static inline bool _nltst_inet_valid(int addr_family, const char *addr) +{ + return _nltst_inet_pton(addr_family, addr, NULL, NULL); +} + +static inline in_addr_t _nltst_inet4(const char *addr) +{ + in_addr_t addr_bin = 0; + + _nltst_assert(_nltst_inet_pton(AF_INET, addr, NULL, &addr_bin)); + return addr_bin; +} + +static inline struct in6_addr *_nltst_inet6p(const char *addr) +{ + _nl_thread_local static struct in6_addr addr_bin; + + ck_assert(_nltst_inet_pton(AF_INET6, addr, NULL, &addr_bin)); + return &addr_bin; +} + +static inline struct in6_addr _nltst_inet6(const char *addr) +{ + struct in6_addr addr_bin; + + ck_assert(_nltst_inet_pton(AF_INET6, addr, NULL, &addr_bin)); + return addr_bin; +} + +static inline int _nltst_inet_addr_family(int addr_family, const char *addr) +{ + if (!_nltst_inet_pton(addr_family, addr, &addr_family, NULL)) + return AF_UNSPEC; + return addr_family; +} + +static inline char *_nltst_inet_normalize(int addr_family, const char *addr, + char bufstatic INET_ADDRSTRLEN) +{ + NLTstIPAddr a; + + buf0 = '\0'; + if (!_nltst_inet_pton(addr_family, addr, &addr_family, &a)) + return NULL; + return _nltst_inet_ntop(addr_family, &a, buf); +} + +/*****************************************************************************/ + +char *_nltst_strtok(const char **p_str); + +char **_nltst_strtokv(const char *str); + +#define _nltst_assert_strv_equal(strv1, strv2) \ + do { \ + typeof(strv1) _strv1 = (strv1); \ + typeof(strv2) _strv2 = (strv2); \ + _nl_unused const void *_strv1_typecheck1 = _strv1; \ + _nl_unused const void *_strv2_typecheck1 = _strv2; \ + _nl_unused const char *_strv1_typecheck2 = \ + _strv1 ? _strv10 : NULL; \ + _nl_unused const char *_strv2_typecheck2 = \ + _strv2 ? _strv20 : NULL; \ + size_t _i; \ + \ + ck_assert_int_eq(!!_strv1, !!_strv2); \ + if (_strv1) { \ + for (_i = 0; _strv1_i || _strv2_i; _i++) { \ + ck_assert_str_eq(_strv1_i, _strv2_i); \ + } \ + } \ + } while (0) + +#define _NLTST_CHARSET_SPACE " \n\r\t" + +#define _nltst_char_is(ch, charset) (!!(strchr("" charset "", (ch)))) + +#define _nltst_char_is_space(ch) _nltst_char_is(ch, _NLTST_CHARSET_SPACE) + +#define _nltst_str_skip_predicate(s, ch, predicate) \ + ({ \ + typeof(s) _s1 = (s); \ + _nl_unused const char *_s1_typecheck = (_s1); \ + \ + if (_s1) { \ + while (({ \ + const char ch = _s10; \ + \ + (ch != '\0') && (predicate); \ + })) \ + _s1++; \ + } \ + _s1; \ + }) + +#define _nltst_str_skip_charset(s, charset) \ + _nltst_str_skip_predicate(s, _ch, _nltst_char_is(_ch, "" charset "")) + +#define _nltst_str_skip_space(s) \ + _nltst_str_skip_charset(s, _NLTST_CHARSET_SPACE) + +#define _nltst_str_has_prefix_and_space(s, prefix) \ + ({ \ + typeof(s) _s2 = (s); \ + _nl_unused const char *_s2_typecheck = (_s2); \ + const size_t _l = strlen("" prefix ""); \ + \ + if (_s2) { \ + if ((strncmp(_s2, "" prefix "", _l)) == 0 && \ + _nltst_char_is_space(_s2_l)) \ + _s2 = _nltst_str_skip_space(&_s2_l + 1); \ + else \ + _s2 = NULL; \ + } \ + _s2; \ + }) + +#define _nltst_str_find_first_not_from_charset(s, charset) \ + ({ \ + typeof(s) _s3 = (s); \ + _nl_unused const char *_s3_typecheck = (_s3); \ + size_t _l3; \ + \ + _l3 = strspn(_s3, "" charset ""); \ + \ + &_s3_l3; \ + }) + +#define _nltst_str_find_first_from_charset(s, charset) \ + ({ \ + typeof(s) _s3 = (s); \ + _nl_unused const char *_s3_typecheck = (_s3); \ + size_t _l3; \ + \ + _l3 = strcspn(_s3, "" charset ""); \ + \ + &_s3_l3; \ + }) + +/*****************************************************************************/ + +void nltst_netns_fixture_setup(void); +void nltst_netns_fixture_teardown(void); + +struct nltst_netns; + +struct nltst_netns *nltst_netns_enter(void); +void nltst_netns_leave(struct nltst_netns *nsdata); + +/*****************************************************************************/ + +void _nltst_object_identical(const void *a, const void *b); + +char *_nltst_object_to_string(struct nl_object *obj); + +struct nl_object **_nltst_cache_get_all(struct nl_cache *cache, + size_t *out_len); + +struct rtnl_link *_nltst_cache_get_link(struct nl_cache *cache, + const char *ifname); + +struct nl_cache *_nltst_rtnl_link_alloc_cache(struct nl_sock *sk, + int addr_family, unsigned flags); + +struct nl_cache *_nltst_rtnl_route_alloc_cache(struct nl_sock *sk, + int addr_family); + +struct nl_sock *_nltst_socket(int protocol); + +void _nltst_add_link(struct nl_sock *sk, const char *ifname, const char *kind, + int *out_ifindex); + +void _nltst_delete_link(struct nl_sock *sk, const char *ifname); + +void _nltst_get_link(struct nl_sock *sk, const char *ifname, int *out_ifindex, + struct rtnl_link **out_link); + +#endif /* __NL_TEST_UTIL_H__ */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/tests/test-complex-HTB-with-hash-filters.c -> _service:tar_scm:libnl-3.7.0.tar.gz/tests/test-complex-HTB-with-hash-filters.c
Changed
@@ -1,11 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * test/test-complex-HTB-with-hash-filters.c Add HTB qdisc, HTB classes and creates some hash filters - * - * 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 Adrian Ban <adrian.ban@mantech.ro> */
View file
_service:tar_scm:libnl-3.5.0.tar.gz/tests/test-u32-filter-with-actions.c -> _service:tar_scm:libnl-3.7.0.tar.gz/tests/test-u32-filter-with-actions.c
Changed
@@ -1,14 +1,8 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ /* - * test/tests-u32-with-actions.c Add ingress qdisc, create some hash filters, and add redirect action - * - * 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) 2013 Cong Wang <xiyou.wangcong@gmail.com> * * Stolen from tests/test-complex-HTB-with-hash-filters.c - * - * Copyright (c) 2013 Cong Wang <xiyou.wangcong@gmail.com> */ #include <netlink/route/link.h>
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2