diff --git a/mesh/agent.h b/mesh/agent.h
index fe19353..9db4321 100644
--- a/mesh/agent.h
+++ b/mesh/agent.h
*
*/
-#ifndef __MESH_AGENT_H
-#define __MESH_AGENT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#define MAX_HEXADECIMAL_OOB_LEN 128
#define DECIMAL_OOB_LEN 4
#define MAX_ASCII_OOB_LEN 16
bool agent_completion(void);
bool agent_input(const char *input);
void agent_release(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_AGENT_H */
diff --git a/mesh/config-model.h b/mesh/config-model.h
index 115491f..be7acab 100644
--- a/mesh/config-model.h
+++ b/mesh/config-model.h
*
*/
-#ifndef __MESH_CONFIG_MODEL_H
-#define __MESH_CONFIG_MODEL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#define CONFIG_SERVER_MODEL_ID 0x0000
#define CONFIG_CLIENT_MODEL_ID 0x0001
bool config_client_init(void);
void config_client_get_composition(uint32_t dst);
void config_set_node(const char *args);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_CONFIG_MODEL_H */
diff --git a/mesh/crypto.h b/mesh/crypto.h
index 98bc065..e8f16f3 100644
--- a/mesh/crypto.h
+++ b/mesh/crypto.h
*
*/
-#ifndef __MESH_CRYPTO_H
-#define __MESH_CRYPTO_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <stdbool.h>
#include <stdint.h>
size_t msg_len, uint8_t res[16]);
bool mesh_get_random_bytes(void *buf, size_t num_bytes);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/mesh/gatt.h b/mesh/gatt.h
index 2f7a3fc..a2aae25 100644
--- a/mesh/gatt.h
+++ b/mesh/gatt.h
*
*/
-#ifndef __MESH_GATT_H
-#define __MESH_GATT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include "gdbus/gdbus.h"
-#include "mesh/node.h"
uint16_t mesh_gatt_sar(uint8_t **pkt, uint16_t size);
bool mesh_gatt_is_child(GDBusProxy *proxy, GDBusProxy *parent,
bool mesh_gatt_notify(GDBusProxy *proxy, bool enable, GDBusReturnFunction cb,
void *user_data);
void mesh_gatt_cleanup(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_GATT_H */
diff --git a/mesh/keys.h b/mesh/keys.h
index 5b955b2..477ff13 100644
--- a/mesh/keys.h
+++ b/mesh/keys.h
*
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#define KR_PHASE_NONE 0x00
#define KR_PHASE_ONE 0x01
#define KR_PHASE_TWO 0x02
diff --git a/mesh/mesh-net.h b/mesh/mesh-net.h
index cb6c6e4..76a9822 100644
--- a/mesh/mesh-net.h
+++ b/mesh/mesh-net.h
*
*/
-#ifndef __MESH_NETORK_H
-#define __MESH_NETORK_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Proxy PDU Types */
#define PROXY_NETWORK_PDU 0x00
#define PROXY_MESH_BEACON 0x01
#define PROXY_PROVISIONING_PDU 0x03
#define CTL 0x80
-#define TTL_MASK 0x7f
+#define TTL_MASK 0x7f
#define SEQ_MASK 0xffffff
#define CREDFLAG_MASK 0x1000
#define MESH_STATUS_CANNOT_SET 0x0f
#define MESH_STATUS_UNSPECIFIED_ERROR 0x10
#define MESH_STATUS_INVALID_BINDING 0x11
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_NETORK_H */
diff --git a/mesh/net.h b/mesh/net.h
index b357afa..b388d61 100644
--- a/mesh/net.h
+++ b/mesh/net.h
*
*/
-#ifndef __MESH_NET_H
-#define __MESH_NET_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include "gdbus/gdbus.h"
-#include "mesh/node.h"
typedef void (*net_mesh_session_open_callback)(int status);
uint32_t net_register_virtual(uint8_t buf[16]);
bool mesh_model_recv(uint16_t app_idx, uint16_t src, uint32_t dst,
uint8_t *payload, uint16_t len);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_NET_H */
diff --git a/mesh/node.h b/mesh/node.h
index 40b964c..68c60eb 100644
--- a/mesh/node.h
+++ b/mesh/node.h
*
*/
-#ifndef __MESH_NODE_H
-#define __MESH_NODE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Largest Possible GATT Packet: Provisioning Public Key + type + sar */
#define MAX_GATT_SIZE (64 + 1 + 1)
struct mesh_publication *pub);
struct mesh_publication *node_model_pub_get(struct mesh_node *node, uint8_t ele,
uint32_t model_id);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_NODE_H */
diff --git a/mesh/onoff-model.h b/mesh/onoff-model.h
index 57f3ecc..3159905 100644
--- a/mesh/onoff-model.h
+++ b/mesh/onoff-model.h
*
*/
-#ifndef __MESH_GENERIC_ONOFF_MODEL_H
-#define __MESH_GENERIC_ONOFF_MODEL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#define GENERIC_ONOFF_SERVER_MODEL_ID 0x1000
#define GENERIC_ONOFF_CLIENT_MODEL_ID 0x1001
void onoff_set_node(const char *args);
bool onoff_client_init(uint8_t ele);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_GENERIC_ONOFF_MODEL_H */
diff --git a/mesh/prov-db.h b/mesh/prov-db.h
index 6b95937..b1e4c62 100644
--- a/mesh/prov-db.h
+++ b/mesh/prov-db.h
*
*/
-#ifndef __MESH_PROV_DB_H
-#define __MESH_PROV_DB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
bool prov_db_show(const char *filename);
bool prov_db_read(const char *filename);
bool prov_db_read_local_node(const char *filename, bool provisioner);
uint32_t model_id,
struct mesh_publication *pub);
void prov_db_print_node_composition(struct mesh_node *node);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_PROV_DB_H */
diff --git a/mesh/prov.h b/mesh/prov.h
index c4e068a..94ce7a1 100644
--- a/mesh/prov.h
+++ b/mesh/prov.h
*
*/
-#ifndef __MESH_PROV_H
-#define __MESH_PROV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct prov;
typedef void (*provision_done_cb)(void *user_data, int status);
provision_done_cb cb, void *user_data);
bool prov_data_ready(struct mesh_node *node, uint8_t *buf, uint8_t len);
bool prov_complete(struct mesh_node *node, uint8_t status);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_PROV_H */
diff --git a/mesh/util.c b/mesh/util.c
index b084c45..fac4bab 100644
--- a/mesh/util.c
+++ b/mesh/util.c
#include "client/display.h"
#include "src/shared/util.h"
#include "mesh/mesh-net.h"
+#include "mesh/node.h"
#include "mesh/util.h"
struct cmd_menu {
diff --git a/mesh/util.h b/mesh/util.h
index eaf4857..7f729ab 100644
--- a/mesh/util.h
+++ b/mesh/util.h
*
*/
-#ifndef __MESH_UTIL_H
-#define __MESH_UTIL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <stdbool.h>
-#include "mesh/node.h"
+struct mesh_publication;
#define OP_UNRELIABLE 0x0100
void print_model_pub(uint16_t ele_addr, uint32_t mod_id,
struct mesh_publication *pub);
void swap_u256_bytes(uint8_t *u256);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_UTIL_H */