diff options
author | Levend Sayar <levendsayar@gmail.com> | 2021-07-25 14:29:02 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-03-03 12:31:35 (GMT) |
commit | c0e82dbea554786ab396d4b8f1fb0a77d772b3d8 (patch) | |
tree | 476a2e840e109536008dd61c8abef4427cb9d276 | |
parent | 000a3bd64107fc609c2f4d30bd779d9168e5e54f (diff) | |
download | libnl-c0e82dbea554786ab396d4b8f1fb0a77d772b3d8.zip libnl-c0e82dbea554786ab396d4b8f1fb0a77d772b3d8.tar.gz libnl-c0e82dbea554786ab396d4b8f1fb0a77d772b3d8.tar.bz2 |
cli: Add C++ linkage support
https://github.com/thom311/libnl/pull/291
-rw-r--r-- | include/netlink/cli/addr.h | 8 | ||||
-rw-r--r-- | include/netlink/cli/class.h | 8 | ||||
-rw-r--r-- | include/netlink/cli/cls.h | 8 | ||||
-rw-r--r-- | include/netlink/cli/ct.h | 8 | ||||
-rw-r--r-- | include/netlink/cli/exp.h | 7 | ||||
-rw-r--r-- | include/netlink/cli/link.h | 8 | ||||
-rw-r--r-- | include/netlink/cli/neigh.h | 8 | ||||
-rw-r--r-- | include/netlink/cli/qdisc.h | 8 | ||||
-rw-r--r-- | include/netlink/cli/route.h | 8 | ||||
-rw-r--r-- | include/netlink/cli/rule.h | 8 | ||||
-rw-r--r-- | include/netlink/cli/tc.h | 8 |
11 files changed, 87 insertions, 0 deletions
diff --git a/include/netlink/cli/addr.h b/include/netlink/cli/addr.h index 39264e6..5fcf734 100644 --- a/include/netlink/cli/addr.h +++ b/include/netlink/cli/addr.h @@ -8,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) @@ -23,4 +27,8 @@ extern void nl_cli_addr_parse_broadcast(struct rtnl_addr *, char *); 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 diff --git a/include/netlink/cli/class.h b/include/netlink/cli/class.h index 9075210..9552374 100644 --- a/include/netlink/cli/class.h +++ b/include/netlink/cli/class.h @@ -9,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 diff --git a/include/netlink/cli/cls.h b/include/netlink/cli/cls.h index 32c9170..602b198 100644 --- a/include/netlink/cli/cls.h +++ b/include/netlink/cli/cls.h @@ -9,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 diff --git a/include/netlink/cli/ct.h b/include/netlink/cli/ct.h index 1abc249..a50b430 100644 --- a/include/netlink/cli/ct.h +++ b/include/netlink/cli/ct.h @@ -9,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 *); @@ -26,4 +30,8 @@ extern void nl_cli_ct_parse_tcp_state(struct nfnl_ct *, char *); 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 diff --git a/include/netlink/cli/exp.h b/include/netlink/cli/exp.h index 42d479d..64d3b08 100644 --- a/include/netlink/cli/exp.h +++ b/include/netlink/cli/exp.h @@ -10,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 *); @@ -32,5 +36,8 @@ extern void nl_cli_exp_parse_icmp_id(struct nfnl_exp *, int, char *); 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 diff --git a/include/netlink/cli/link.h b/include/netlink/cli/link.h index 2fc2143..fb6c0a4 100644 --- a/include/netlink/cli/link.h +++ b/include/netlink/cli/link.h @@ -9,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, @@ -25,4 +29,8 @@ extern void nl_cli_link_parse_txqlen(struct rtnl_link *, char *); 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 diff --git a/include/netlink/cli/neigh.h b/include/netlink/cli/neigh.h index b96d286..89a336c 100644 --- a/include/netlink/cli/neigh.h +++ b/include/netlink/cli/neigh.h @@ -8,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) @@ -19,4 +23,8 @@ extern void nl_cli_neigh_parse_dev(struct rtnl_neigh *, struct nl_cache *, char 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 diff --git a/include/netlink/cli/qdisc.h b/include/netlink/cli/qdisc.h index a96e840..d70e559 100644 --- a/include/netlink/cli/qdisc.h +++ b/include/netlink/cli/qdisc.h @@ -8,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 diff --git a/include/netlink/cli/route.h b/include/netlink/cli/route.h index 1c964af..3650d8b 100644 --- a/include/netlink/cli/route.h +++ b/include/netlink/cli/route.h @@ -8,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); @@ -25,4 +29,8 @@ extern void nl_cli_route_parse_protocol(struct rtnl_route *, char *); 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 diff --git a/include/netlink/cli/rule.h b/include/netlink/cli/rule.h index 9d33bd6..82bf067 100644 --- a/include/netlink/cli/rule.h +++ b/include/netlink/cli/rule.h @@ -8,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 diff --git a/include/netlink/cli/tc.h b/include/netlink/cli/tc.h index 5bb9c01..7d4ed7a 100644 --- a/include/netlink/cli/tc.h +++ b/include/netlink/cli/tc.h @@ -8,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 *); @@ -32,4 +36,8 @@ extern struct nl_cli_tc_module *nl_cli_tc_lookup(struct rtnl_tc_ops *); 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 |