X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fprotocol.h;h=f97682a1717af4277fc460f01f31b88fd8d8a562;hb=HEAD;hp=fb1e10960cc25539971a4250f8c9f358a1e87556;hpb=7870cb4a1882fb0e3fd4e90784f81327fc0cab08;p=meshlink diff --git a/src/protocol.h b/src/protocol.h index fb1e1096..94f760f1 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -62,6 +62,10 @@ typedef struct past_request_t { time_t firstseen; } past_request_t; +/* Protocol support flags */ + +static const uint32_t PROTOCOL_TINY = 1; // Peer is using meshlink-tiny + /* Maximum size of strings in a request. * scanf terminates %2048s with a NUL character, * but the NUL character can be written after the 2048th non-NUL character. @@ -96,6 +100,7 @@ bool send_add_edge(struct meshlink_handle *mesh, struct connection_t *, const st bool send_del_edge(struct meshlink_handle *mesh, struct connection_t *, const struct edge_t *, int contradictions); bool send_req_key(struct meshlink_handle *mesh, struct node_t *); bool send_canonical_address(struct meshlink_handle *mesh, struct node_t *); +bool send_raw_packet(struct meshlink_handle *mesh, struct connection_t *, const vpn_packet_t *); /* Request handlers */ @@ -112,5 +117,6 @@ bool key_changed_h(struct meshlink_handle *mesh, struct connection_t *, const ch bool req_key_h(struct meshlink_handle *mesh, struct connection_t *, const char *); bool ans_key_h(struct meshlink_handle *mesh, struct connection_t *, const char *); bool tcppacket_h(struct meshlink_handle *mesh, struct connection_t *, const char *); +bool raw_packet_h(struct meshlink_handle *mesh, struct connection_t *, const char *); #endif