-#ifndef __TINC_BUFFER_H__
-#define __TINC_BUFFER_H__
+#ifndef __MESHLINK_BUFFER_H__
+#define __MESHLINK_BUFFER_H__
typedef struct buffer_t {
char *data;
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_CONF_H__
-#define __TINC_CONF_H__
+#ifndef __MESHLINK_CONF_H__
+#define __MESHLINK_CONF_H__
#include "list.h"
#include "meshlink_internal.h"
extern bool read_host_config(struct meshlink_handle *mesh, struct splay_tree_t *, const char *);
extern bool append_config_file(struct meshlink_handle *mesh, const char *, const char *, const char *);
-#endif /* __TINC_CONF_H__ */
+#endif /* __MESHLINK_CONF_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_CONNECTION_H__
-#define __TINC_CONNECTION_H__
+#ifndef __MESHLINK_CONNECTION_H__
+#define __MESHLINK_CONNECTION_H__
#include "buffer.h"
#include "list.h"
extern void connection_add(struct meshlink_handle *mesh, connection_t *);
extern void connection_del(struct meshlink_handle *mesh, connection_t *);
-#endif /* __TINC_CONNECTION_H__ */
+#endif /* __MESHLINK_CONNECTION_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_CRYPTO_H__
-#define __TINC_CRYPTO_H__
+#ifndef __MESHLINK_CRYPTO_H__
+#define __MESHLINK_CRYPTO_H__
extern void crypto_init();
extern void crypto_exit();
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_ECDH_H__
-#define __TINC_ECDH_H__
+#ifndef __MESHLINK_ECDH_H__
+#define __MESHLINK_ECDH_H__
#define ECDH_SIZE 32
#define ECDH_SHARED_SIZE 32
-#ifndef __TINC_ECDH_INTERNAL__
+#ifndef __MESHLINK_ECDH_INTERNAL__
typedef struct ecdh ecdh_t;
#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_ECDSA_H__
-#define __TINC_ECDSA_H__
+#ifndef __MESHLINK_ECDSA_H__
+#define __MESHLINK_ECDSA_H__
-#ifndef __TINC_ECDSA_INTERNAL__
+#ifndef __MESHLINK_ECDSA_INTERNAL__
typedef struct ecdsa ecdsa_t;
#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_ECDSAGEN_H__
-#define __TINC_ECDSAGEN_H__
+#ifndef __MESHLINK_ECDSAGEN_H__
+#define __MESHLINK_ECDSAGEN_H__
#include "ecdsa.h"
#include "ed25519.h"
-#define __TINC_ECDH_INTERNAL__
+#define __MESHLINK_ECDH_INTERNAL__
typedef struct ecdh_t {
uint8_t private[64];
} ecdh_t;
#include "ed25519.h"
-#define __TINC_ECDSA_INTERNAL__
+#define __MESHLINK_ECDSA_INTERNAL__
typedef struct {
uint8_t private[64];
uint8_t public[32];
#include "../crypto.h"
#include "ed25519.h"
-#define __TINC_ECDSA_INTERNAL__
+#define __MESHLINK_ECDSA_INTERNAL__
typedef struct {
uint8_t private[64];
uint8_t public[32];
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_EDGE_H__
-#define __TINC_EDGE_H__
+#ifndef __MESHLINK_EDGE_H__
+#define __MESHLINK_EDGE_H__
#include "splay_tree.h"
#include "connection.h"
extern void edge_del(struct meshlink_handle *mesh, edge_t *);
extern edge_t *lookup_edge(struct node_t *, struct node_t *);
-#endif /* __TINC_EDGE_H__ */
+#endif /* __MESHLINK_EDGE_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_EVENT_H__
-#define __TINC_EVENT_H__
+#ifndef __MESHLINK_EVENT_H__
+#define __MESHLINK_EVENT_H__
#include "splay_tree.h"
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_GRAPH_H__
-#define __TINC_GRAPH_H__
+#ifndef __MESHLINK_GRAPH_H__
+#define __MESHLINK_GRAPH_H__
extern void graph(struct meshlink_handle *mesh);
-#endif /* __TINC_GRAPH_H__ */
+#endif /* __MESHLINK_GRAPH_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_HASH_H__
-#define __TINC_HASH_H__
+#ifndef __MESHLINK_HASH_H__
+#define __MESHLINK_HASH_H__
typedef struct hash_t {
size_t n;
extern void hash_clear(hash_t *);
extern void hash_resize(hash_t *, size_t n);
-#endif /* __TINC_HASH_H__ */
+#endif /* __MESHLINK_HASH_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_HAVE_H__
-#define __TINC_HAVE_H__
+#ifndef __MESHLINK_HAVE_H__
+#define __MESHLINK_HAVE_H__
#ifdef HAVE_MINGW
#ifdef WITH_WINDOWS2000
#define SLASH "/"
#endif
-#endif /* __TINC_SYSTEM_H__ */
+#endif /* __MESHLINK_SYSTEM_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_LIST_H__
-#define __TINC_LIST_H__
+#ifndef __MESHLINK_LIST_H__
+#define __MESHLINK_LIST_H__
typedef struct list_node_t {
struct list_node_t *prev;
#define list_each(type, item, list) (type *item = (type *)1; item; item = NULL) for(list_node_t *node = (list)->head, *next; item = node ? node->data : NULL, next = node ? node->next : NULL, node; node = next)
-#endif /* __TINC_LIST_H__ */
+#endif /* __MESHLINK_LIST_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_LOGGER_H__
-#define __TINC_LOGGER_H__
+#ifndef __MESHLINK_LOGGER_H__
+#define __MESHLINK_LOGGER_H__
typedef enum debug_t {
DEBUG_NOTHING = 0, /* Quiet mode, only show starting/stopping of the daemon */
extern void logger(int, int, const char *, ...) __attribute__ ((__format__(printf, 3, 4)));
-#endif /* __TINC_LOGGER_H__ */
+#endif /* __MESHLINK_LOGGER_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_META_H__
-#define __TINC_META_H__
+#ifndef __MESHLINK_META_H__
+#define __MESHLINK_META_H__
#include "connection.h"
extern void broadcast_meta(struct meshlink_handle *mesh, struct connection_t *, const char *, int);
extern bool receive_meta(struct meshlink_handle *mesh, struct connection_t *);
-#endif /* __TINC_META_H__ */
+#endif /* __MESHLINK_META_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_NET_H__
-#define __TINC_NET_H__
+#ifndef __MESHLINK_NET_H__
+#define __MESHLINK_NET_H__
#include "event.h"
#include "sockaddr.h"
extern CRITICAL_SECTION mutex;
#endif
-#endif /* __TINC_NET_H__ */
+#endif /* __MESHLINK_NET_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_NETUTL_H__
-#define __TINC_NETUTL_H__
+#ifndef __MESHLINK_NETUTL_H__
+#define __MESHLINK_NETUTL_H__
#include "net.h"
extern void sockaddrfree(sockaddr_t *);
extern void sockaddrcpy(sockaddr_t *, const sockaddr_t *);
-#endif /* __TINC_NETUTL_H__ */
+#endif /* __MESHLINK_NETUTL_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_NODE_H__
-#define __TINC_NODE_H__
+#ifndef __MESHLINK_NODE_H__
+#define __MESHLINK_NODE_H__
#include "event.h"
#include "sockaddr.h"
extern node_t *lookup_node_udp(struct meshlink_handle *mesh, const sockaddr_t *);
extern void update_node_udp(struct meshlink_handle *mesh, node_t *, const sockaddr_t *);
-#endif /* __TINC_NODE_H__ */
+#endif /* __MESHLINK_NODE_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_PRF_H__
-#define __TINC_PRF_H__
+#ifndef __MESHLINK_PRF_H__
+#define __MESHLINK_PRF_H__
extern bool prf(const char *secret, size_t secretlen, char *seed, size_t seedlen, char *out, size_t outlen) __attribute__ ((__warn_unused_result__));
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_PROTOCOL_H__
-#define __TINC_PROTOCOL_H__
+#ifndef __MESHLINK_PROTOCOL_H__
+#define __MESHLINK_PROTOCOL_H__
#include "ecdsa.h"
extern bool ans_key_h(struct meshlink_handle *mesh, struct connection_t *, const char *);
extern bool tcppacket_h(struct meshlink_handle *mesh, struct connection_t *, const char *);
-#endif /* __TINC_PROTOCOL_H__ */
+#endif /* __MESHLINK_PROTOCOL_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_ROUTE_H__
-#define __TINC_ROUTE_H__
+#ifndef __MESHLINK_ROUTE_H__
+#define __MESHLINK_ROUTE_H__
#include "net.h"
#include "node.h"
extern void route(struct meshlink_handle *mesh, struct node_t *, struct vpn_packet_t *);
-#endif /* __TINC_ROUTE_H__ */
+#endif /* __MESHLINK_ROUTE_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_SYSTEM_H__
-#define __TINC_SYSTEM_H__
+#ifndef __MESHLINK_SYSTEM_H__
+#define __MESHLINK_SYSTEM_H__
#include "../config.h"
typedef int socklen_t;
#endif
-#endif /* __TINC_SYSTEM_H__ */
+#endif /* __MESHLINK_SYSTEM_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_TINCCTL_H__
-#define __TINC_TINCCTL_H__
+#ifndef __MESHLINK_TINCCTL_H__
+#define __MESHLINK_TINCCTL_H__
extern bool tty;
extern char line[4096];
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_UTILS_H__
-#define __TINC_UTILS_H__
+#ifndef __MESHLINK_UTILS_H__
+#define __MESHLINK_UTILS_H__
extern int hex2bin(const char *src, void *dst, int length);
extern int bin2hex(const void *src, char *dst, int length);
extern unsigned int bitfield_to_int(const void *bitfield, size_t size);
-#endif /* __TINC_UTILS_H__ */
+#endif /* __MESHLINK_UTILS_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __TINC_XALLOC_H__
-#define __TINC_XALLOC_H__
+#ifndef __MESHLINK_XALLOC_H__
+#define __MESHLINK_XALLOC_H__
static inline void *xmalloc(size_t n) __attribute__ ((__malloc__));
static inline void *xmalloc(size_t n) {