From: Saverio Proto Date: Sat, 28 Jun 2014 12:52:46 +0000 (+0200) Subject: Typedef of bitmap X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=829c628276b76b8ac92c985e207a547c67645715;p=meshlink Typedef of bitmap --- diff --git a/src/meshlink.h b/src/meshlink.h index 917d4548..0ef56e22 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -37,6 +37,18 @@ typedef struct meshlink_node meshlink_node_t; typedef struct meshlink_connection meshlink_connection_t; +//Structure to hold a single bit + +typedef struct { +unsigned int bit : 1; +} Bit; + +//BitArray structure. + +typedef struct { +Bit bitValues[1024]; //we will be able to use MAX 1024 sockets +} bitmap_t; + /// Code of most recent error encountered. typedef enum { MESHLINK_OK, ///< Everything is fine diff --git a/src/meshlink_internal.h b/src/meshlink_internal.h index f625857d..ab33c859 100644 --- a/src/meshlink_internal.h +++ b/src/meshlink_internal.h @@ -90,7 +90,7 @@ struct meshlink_handle { struct list_t *outpacketqueue; - uint16_t socketsbitmap; //bitmap of 16 bits + bitmap_t socketsbitmap; //bitmap of 16 bits int contradicting_add_edge; int contradicting_del_edge;