Add tests for network commands
[tinc] / src / connection.h
index 6489ef4..600c954 100644 (file)
@@ -49,6 +49,7 @@ typedef union connection_status_t {
                bool control: 1;                /* 1 if this is a control connection */
                bool pcap: 1;                   /* 1 if this is a control connection requesting packet capture */
                bool log: 1;                    /* 1 if this is a control connection requesting log dump */
+               bool log_color: 1;              /* 1 if this connection supports ANSI escape codes */
                bool invitation: 1;             /* 1 if this is an invitation */
                bool invitation_used: 1;        /* 1 if the invitation has been consumed */
                bool tarpit: 1;                 /* 1 if the connection should be added to the tarpit */
@@ -78,7 +79,7 @@ typedef struct legacy_ctx_t {
        legacy_crypto_t out;           /* cipher/digest we will use to send data to him */
 } legacy_ctx_t;
 
-legacy_ctx_t *new_legacy_ctx(rsa_t *rsa) ATTR_MALLOC;
+legacy_ctx_t *new_legacy_ctx(rsa_t *rsa);
 void free_legacy_ctx(legacy_ctx_t *ctx);
 #endif
 
@@ -130,8 +131,8 @@ extern connection_t *everyone;
 
 extern void init_connections(void);
 extern void exit_connections(void);
-extern connection_t *new_connection(void) ATTR_MALLOC;
 extern void free_connection(connection_t *c);
+extern connection_t *new_connection(void) ATTR_MALLOC ATTR_DEALLOCATOR(free_connection);
 extern void connection_add(connection_t *c);
 extern void connection_del(connection_t *c);
 extern bool dump_connections(struct connection_t *c);