X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fconnection.h;h=5e3a7ac7e4f84f372ad9bbe6436184e09f8985f0;hb=HEAD;hp=5160422b346b9a01d054d7f828983dbe8421416a;hpb=8c8b506da9ce578fe6e6e406a91bbd21af13f7a3;p=meshlink diff --git a/src/connection.h b/src/connection.h index 5160422b..5e3a7ac7 100644 --- a/src/connection.h +++ b/src/connection.h @@ -41,6 +41,7 @@ typedef struct connection_status_t { uint16_t invitation: 1; /* 1 if this is an invitation */ uint16_t invitation_used: 1; /* 1 if the invitation has been consumed */ uint16_t initiator: 1; /* 1 if we initiated this connection */ + uint16_t raw_packet: 1; /* 1 if we are expecting a raw packet next */ } connection_status_t; #include "ecdsa.h" @@ -78,13 +79,14 @@ typedef struct connection_t { ecdsa_t *ecdsa; /* his public ECDSA key */ int protocol_major; /* used protocol */ int protocol_minor; /* used protocol */ + uint32_t flags; /* used protocol flags */ } connection_t; -extern void init_connections(struct meshlink_handle *mesh); -extern void exit_connections(struct meshlink_handle *mesh); -extern connection_t *new_connection(void) __attribute__((__malloc__)); -extern void free_connection(connection_t *); -extern void connection_add(struct meshlink_handle *mesh, connection_t *); -extern void connection_del(struct meshlink_handle *mesh, connection_t *); +void init_connections(struct meshlink_handle *mesh); +void exit_connections(struct meshlink_handle *mesh); +connection_t *new_connection(void) __attribute__((__malloc__)); +void free_connection(connection_t *); +void connection_add(struct meshlink_handle *mesh, connection_t *); +void connection_del(struct meshlink_handle *mesh, connection_t *); #endif