Issue reported by Pavel Odintsov.
struct ipset_data;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern void ipset_strlcpy(char *dst, const char *src, size_t len);
extern void ipset_strlcat(char *dst, const char *src, size_t len);
extern bool ipset_data_flags_test(const struct ipset_data *data,
extern size_t ipset_data_sizeof(enum ipset_opt opt, uint8_t family);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* LIBIPSET_DATA_H */
const char *message; /* error message the code translated to */
};
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern int ipset_errcode(struct ipset_session *session, enum ipset_cmd cmd,
int errcode);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* LIBIPSET_ERRCODE_H */
#include <stdint.h> /* uintxx_t */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const char *id_to_icmp(uint8_t id);
extern const char *icmp_to_name(uint8_t type, uint8_t code);
extern int name_to_icmp(const char *str, uint16_t *typecode);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* LIBIPSET_ICMP_H */
#include <stdint.h> /* uintxx_t */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const char *id_to_icmpv6(uint8_t id);
extern const char *icmpv6_to_name(uint8_t type, uint8_t code);
extern int name_to_icmpv6(const char *str, uint16_t *typecode);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* LIBIPSET_ICMPV6_H */
};
#endif
-extern int ipset_get_nlmsg_type(const struct nlmsghdr *nlh);
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern int ipset_get_nlmsg_type(const struct nlmsghdr *nlh);
extern const struct ipset_transport ipset_mnl_transport;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* LIBIPSET_MNL_H */
typedef int (*ipset_parsefn)(struct ipset_session *s,
enum ipset_opt opt, const char *str);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern int ipset_parse_ether(struct ipset_session *session,
enum ipset_opt opt, const char *str);
extern int ipset_parse_port(struct ipset_session *session,
extern int ipset_parse_name_compat(struct ipset_session *session,
enum ipset_opt opt, const char *str);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* LIBIPSET_PARSE_H */
const struct ipset_data *data,
enum ipset_opt opt, uint8_t env);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern int ipset_print_ether(char *buf, unsigned int len,
const struct ipset_data *data,
enum ipset_opt opt, uint8_t env);
const struct ipset_data *data,
enum ipset_opt opt, uint8_t env);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* LIBIPSET_PRINT_H */
struct ipset_data;
struct ipset_handle;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern struct ipset_data *
ipset_session_data(const struct ipset_session *session);
extern struct ipset_handle *
extern void ipset_debug_msg(const char *dir, void *buffer, int len);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* LIBIPSET_SESSION_H */
const char *alias[]; /* name alias(es) */
};
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern int ipset_cache_add(const char *name, const struct ipset_type *type,
uint8_t family);
extern int ipset_cache_del(const char *name);
const struct ipset_type *t);
extern void ipset_load_types(void);
+#ifdef __cplusplus
+}
+#endif
+
#ifdef TYPE_INCLUSIVE
# ifdef _INIT
# undef _init
const char *help;
};
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const struct ipset_commands ipset_commands[];
struct ipset_session;
extern void ipset_port_usage(void);
extern int ipset_parse_file(struct ipset_session *s, int opt, const char *str);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* LIBIPSET_UI_H */