]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib, zebra: add missing extern "C" {} blocks to new header files
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 20 Apr 2020 23:53:19 +0000 (20:53 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Thu, 23 Apr 2020 02:49:22 +0000 (23:49 -0300)
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
20 files changed:
lib/atomlist.h
lib/defaults.h
lib/frrcu.h
lib/iana_afi.h
lib/log_vty.h
lib/printfrr.h
lib/pullwr.h
lib/resolver.h
lib/seqlock.h
lib/version.h.in
lib/yang_wrappers.h
lib/zassert.h
lib/zclient.h
lib/zlog.h
lib/zlog_targets.h
zebra/zebra_mlag.h
zebra/zebra_mlag_vty.h
zebra/zebra_nb.h
zebra/zebra_nhg.h
zebra/zebra_nhg_private.h

index 96476c2cd2e61401a1c15edb1c04f0a0bf0bec1a..5ca19cbcd4c7f21c8ada9c9225ca4e018f26e92f 100644 (file)
 #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 */
index 7cdd18120e73ccfa456ee6c917f3a4e2567f9f4d..20ef28db312bc58bb37c977dfe9e5e9acbefdeb6 100644 (file)
 
 #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 */
index 491e89aac24378854a057d350fa3d7203a7929ed..47751ae7df395a01fd82b0c1ff6d53cd1597737a 100644 (file)
 #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 */
index ac03f73193daa1da7e9404fa6d7d04b73a791e08..56e8a24b86f119c26cb6d27dbb436fe6dc4a224b 100644 (file)
 
 #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
index 0fd60e9b078ade35d8e7db6fdfa7b958ee8b4d8d..16c447546736a5c16b1b9c9706df97a786d37794 100644 (file)
 
 #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__ */
index 7d9e288655b40b7585bf545376da69e63589b3f2..a775e1517ba7ddb905748352f746f906de50a13d 100644 (file)
 #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
index 601eac1b79cf95624b5f1600622e5aeef66c2626..a0e89e0c30ad10e451a6967e41f5e5ba0be68189 100644 (file)
 #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 */
index 59bf0d0f55c704ad058a975da0ddeacef0801c73..5f922dcb579916b480c6c62f5d7f6cbc5a62f9a1 100644 (file)
 #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 */
index b551e3ffc4dad1c78fbd9612fe5465128a127498..bfbf97890ecfca05c2d79eeaf9f65238afd6ca3a 100644 (file)
 #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 */
index 52c10f7d6898d25b1d176ff2c803bb85df227253..d535d131c812bbabef68886bf72ea7df00823bdd 100644 (file)
 #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 */
index d853b61ae1c12a8a26974c21364b1e09b311219f..f61f252cdfb8552d86d978c9ff10c6d0c041b9a2 100644 (file)
 
 #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_ */
index d45e1be5f8392c26e8fdff60609fffd38daca7d8..e50a88f40781d85910ca8079e949ff2b25bb4169 100644 (file)
 #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 */
index 6e8066381fc2b3d3f6e30210d1e56381260499e1..4ada064623dcaf41ea67b07ca5a8dd8878041211 100644 (file)
 
 #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 */
index fd42ad50e459fbe3fecec49bf09bab9c0d1c41ec..904049c0f2d288f5ecfc6d91d1b5e2fccf18a36d 100644 (file)
 #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 */
index f95d349a57db91dfb5082711397b376c087446bd..6faf722ffd21a33ae353ae36a9e4dc5ce5e92413 100644 (file)
 
 #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 */
index d44a4006661e12063a4e5ab1c9d4805f99feca58..66f5c4c67ec0c1c6654915abade816e0f7136ef9 100644 (file)
 #include "mlag/mlag.pb-c.h"
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define ZEBRA_MLAG_BUF_LIMIT 2048
 #define ZEBRA_MLAG_LEN_SIZE 4
 
@@ -73,4 +77,8 @@ int zebra_mlag_protobuf_encode_client_data(struct stream *s,
                                           uint32_t *msg_type);
 int zebra_mlag_protobuf_decode_message(struct stream *s, uint8_t *data,
                                       uint32_t len);
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index c3dfdf74e017ddf66b9a4daa0c3bb08102843492..789154d684ea0e55f18cde749462cdaa7e9ef643 100644 (file)
 #ifndef __ZEBRA_MLAG_VTY_CODE__
 #define __ZEBRA_MLAG_VTY_CODE__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern int32_t zebra_mlag_test_mlag_internal(const char *none,
                                             const char *primary,
                                             const char *secondary);
 
 extern void zebra_mlag_vty_init(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index 01a44e55259ebb3d60cf24c0e3c292a79149a9e7..32c72371e37fc3f6c8224055c54a78480b595ac3 100644 (file)
 #ifndef ZEBRA_ZEBRA_NB_H_
 #define ZEBRA_ZEBRA_NB_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern const struct frr_yang_module_info frr_zebra_info;
 
 /* prototypes */
@@ -485,4 +489,8 @@ struct yang_data *
 lib_vrf_ribs_rib_route_route_entry_nexthop_group_frr_nexthops_nexthop_weight_get_elem(
        const char *xpath, const void *list_entry);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index 0a9e97ab4853fdcdd85f94a71514e122de995a14..5792584d0f15518571757b92b723f28dce6b8dab 100644 (file)
 #include "lib/nexthop.h"
 #include "lib/nexthop_group.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* This struct is used exclusively for dataplane
  * interaction via a dataplane context.
  *
@@ -269,4 +273,8 @@ extern void zebra_nhg_sweep_table(struct hash *hash);
 struct route_entry; /* Forward ref to avoid circular includes */
 extern int nexthop_active_update(struct route_node *rn, struct route_entry *re);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __ZEBRA_NHG_H__ */
index 92f438fcec75c217b43f70fa0f73b72cf940d8c9..25048258d5b96090f9d84844d97e3a42c1c705ce 100644 (file)
 
 #include "zebra/zebra_nhg.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Abstraction for connected trees */
 struct nhg_connected {
        struct nhg_connected_tree_item tree_item;
@@ -70,4 +74,8 @@ extern struct nhg_hash_entry *
 nhg_connected_tree_add_nhe(struct nhg_connected_tree_head *head,
                           struct nhg_hash_entry *nhe);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __ZEBRA_NHG_PRIVATE_H__ */