summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-04-21 01:53:19 +0200
committerRenato Westphal <renato@opensourcerouting.org>2020-04-23 04:49:22 +0200
commit17e38209a593f6b95b56aba11bed11d233da07c2 (patch)
treec80f25fa35e9b76c20e4183ec93ba0940ad445dc /lib
parentMerge pull request #6242 from pguibert6WIND/flowspec_nlri_too_big (diff)
downloadfrr-17e38209a593f6b95b56aba11bed11d233da07c2.tar.xz
frr-17e38209a593f6b95b56aba11bed11d233da07c2.zip
lib, zebra: add missing extern "C" {} blocks to new header files
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/atomlist.h8
-rw-r--r--lib/defaults.h8
-rw-r--r--lib/frrcu.h8
-rw-r--r--lib/iana_afi.h8
-rw-r--r--lib/log_vty.h8
-rw-r--r--lib/printfrr.h8
-rw-r--r--lib/pullwr.h8
-rw-r--r--lib/resolver.h8
-rw-r--r--lib/seqlock.h8
-rw-r--r--lib/version.h.in8
-rw-r--r--lib/yang_wrappers.h8
-rw-r--r--lib/zassert.h8
-rw-r--r--lib/zclient.h8
-rw-r--r--lib/zlog.h8
-rw-r--r--lib/zlog_targets.h8
15 files changed, 120 insertions, 0 deletions
diff --git a/lib/atomlist.h b/lib/atomlist.h
index 96476c2cd..5ca19cbcd 100644
--- a/lib/atomlist.h
+++ b/lib/atomlist.h
@@ -20,6 +20,10 @@
#include "typesafe.h"
#include "frratomic.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* pointer with lock/deleted/invalid bit in lowest bit
*
* for atomlist/atomsort, "locked" means "this pointer can't be updated, the
@@ -361,4 +365,8 @@ void atomsort_del_hint(struct atomsort_head *h,
struct atomsort_item *atomsort_pop(struct atomsort_head *h);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FRR_ATOMLIST_H */
diff --git a/lib/defaults.h b/lib/defaults.h
index 7cdd18120..20ef28db3 100644
--- a/lib/defaults.h
+++ b/lib/defaults.h
@@ -22,6 +22,10 @@
#include "compiler.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* frr_default wraps information about a default that has different
* values depending on FRR version or default-set
*
@@ -135,4 +139,8 @@ extern bool frr_defaults_profile_valid(const char *profile);
/* like strcmp(), but with version ordering */
extern int frr_version_cmp(const char *aa, const char *bb);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FRR_DEFAULTS_H */
diff --git a/lib/frrcu.h b/lib/frrcu.h
index 491e89aac..47751ae7d 100644
--- a/lib/frrcu.h
+++ b/lib/frrcu.h
@@ -20,6 +20,10 @@
#include "memory.h"
#include "atomlist.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* quick RCU primer:
* There's a global sequence counter. Whenever a thread does a
* rcu_read_lock(), it is marked as holding the current sequence counter.
@@ -170,4 +174,8 @@ extern void rcu_enqueue(struct rcu_head *head, const struct rcu_action *action);
extern void rcu_close(struct rcu_head_close *head, int fd);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FRRCU_H */
diff --git a/lib/iana_afi.h b/lib/iana_afi.h
index ac03f7319..56e8a24b8 100644
--- a/lib/iana_afi.h
+++ b/lib/iana_afi.h
@@ -21,6 +21,10 @@
#include <prefix.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* The above AFI and SAFI definitions are for internal use. The protocol
* definitions (IANA values) as for example used in BGP protocol packets
@@ -130,4 +134,8 @@ static inline const char *iana_safi2str(iana_safi_t safi)
return safi2str(safi_iana2int(safi));
}
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/lib/log_vty.h b/lib/log_vty.h
index 0fd60e9b0..16c447546 100644
--- a/lib/log_vty.h
+++ b/lib/log_vty.h
@@ -23,6 +23,10 @@
#include "lib/hook.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct vty;
extern void log_cmd_init(void);
@@ -33,4 +37,8 @@ extern void log_show_syslog(struct vty *vty);
DECLARE_HOOK(zlog_rotate, (), ())
extern void zlog_rotate(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __LOG_VTY_H__ */
diff --git a/lib/printfrr.h b/lib/printfrr.h
index 7d9e28865..a775e1517 100644
--- a/lib/printfrr.h
+++ b/lib/printfrr.h
@@ -24,6 +24,10 @@
#include "compiler.h"
#include "memory.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct fbuf {
char *buf;
char *pos;
@@ -156,4 +160,8 @@ void printfrr_ext_reg(const struct printfrr_ext *);
} \
/* end */
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/lib/pullwr.h b/lib/pullwr.h
index 601eac1b7..a0e89e0c3 100644
--- a/lib/pullwr.h
+++ b/lib/pullwr.h
@@ -26,6 +26,10 @@
#include "thread.h"
#include "stream.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct pullwr;
/* This is a "pull-driven" write event handler. Instead of having some buffer
@@ -107,4 +111,8 @@ static inline void pullwr_write_stream(struct pullwr *pullwr,
extern void pullwr_stats(struct pullwr *pullwr, uint64_t *total_written,
size_t *pending, size_t *kernel_pending);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _WRITEPOLL_H */
diff --git a/lib/resolver.h b/lib/resolver.h
index 59bf0d0f5..5f922dcb5 100644
--- a/lib/resolver.h
+++ b/lib/resolver.h
@@ -13,6 +13,10 @@
#include "thread.h"
#include "sockunion.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct resolver_query {
void (*callback)(struct resolver_query *, const char *errstr, int n,
union sockunion *);
@@ -28,4 +32,8 @@ void resolver_resolve(struct resolver_query *query, int af,
const char *, int,
union sockunion *));
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FRR_RESOLVER_H */
diff --git a/lib/seqlock.h b/lib/seqlock.h
index b551e3ffc..bfbf97890 100644
--- a/lib/seqlock.h
+++ b/lib/seqlock.h
@@ -27,6 +27,10 @@
#include <pthread.h>
#include "frratomic.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* this locking primitive is intended to use in a 1:N setup.
*
@@ -135,4 +139,8 @@ extern void seqlock_release(struct seqlock *sqlo);
* anything other than reading RCU items was done
*/
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _SEQLOCK_H */
diff --git a/lib/version.h.in b/lib/version.h.in
index 52c10f7d6..d535d131c 100644
--- a/lib/version.h.in
+++ b/lib/version.h.in
@@ -28,6 +28,10 @@
#include "gitversion.h"
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef GIT_SUFFIX
#define GIT_SUFFIX ""
#endif
@@ -54,4 +58,8 @@
pid_t pid_output (const char *);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _ZEBRA_VERSION_H */
diff --git a/lib/yang_wrappers.h b/lib/yang_wrappers.h
index d853b61ae..f61f252cd 100644
--- a/lib/yang_wrappers.h
+++ b/lib/yang_wrappers.h
@@ -22,6 +22,10 @@
#include "prefix.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* bool */
extern bool yang_str2bool(const char *value);
extern struct yang_data *yang_data_new_bool(const char *xpath, bool value);
@@ -182,4 +186,8 @@ extern void yang_str2mac(const char *value, struct ethaddr *mac);
extern const char *yang_nexthop_type2str(uint32_t ntype);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FRR_NORTHBOUND_WRAPPERS_H_ */
diff --git a/lib/zassert.h b/lib/zassert.h
index d45e1be5f..e50a88f40 100644
--- a/lib/zassert.h
+++ b/lib/zassert.h
@@ -19,6 +19,10 @@
#ifndef _QUAGGA_ASSERT_H
#define _QUAGGA_ASSERT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern void _zlog_assert_failed(const char *assertion, const char *file,
unsigned int line, const char *function)
__attribute__((noreturn));
@@ -39,4 +43,8 @@ extern void _zlog_assert_failed(const char *assertion, const char *file,
#undef assert
#define assert(EX) zassert(EX)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _QUAGGA_ASSERT_H */
diff --git a/lib/zclient.h b/lib/zclient.h
index 6e8066381..4ada06462 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -38,6 +38,10 @@
#include "mlag.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Zebra types. Used in Zserv message header. */
typedef uint16_t zebra_size_t;
@@ -826,4 +830,8 @@ extern void zclient_send_mlag_data(struct zclient *client,
*/
extern int zclient_send_hello(struct zclient *client);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _ZEBRA_ZCLIENT_H */
diff --git a/lib/zlog.h b/lib/zlog.h
index fd42ad50e..904049c0f 100644
--- a/lib/zlog.h
+++ b/lib/zlog.h
@@ -30,6 +30,10 @@
#include "memory.h"
#include "hook.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern char zlog_prefix[];
extern size_t zlog_prefixsz;
extern int zlog_tmpdirfd;
@@ -183,4 +187,8 @@ extern void zlog_tls_buffer_init(void);
extern void zlog_tls_buffer_flush(void);
extern void zlog_tls_buffer_fini(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FRR_ZLOG_H */
diff --git a/lib/zlog_targets.h b/lib/zlog_targets.h
index f95d349a5..6faf722ff 100644
--- a/lib/zlog_targets.h
+++ b/lib/zlog_targets.h
@@ -21,6 +21,10 @@
#include "zlog.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* multiple file log targets can be active */
struct zlt_fd;
@@ -63,4 +67,8 @@ extern int zlog_syslog_get_facility(void);
extern void zlog_syslog_set_prio_min(int prio_min);
extern int zlog_syslog_get_prio_min(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FRR_ZLOG_TARGETS_H */