aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/core/connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-light/src/hicn/core/connection.h')
-rw-r--r--hicn-light/src/hicn/core/connection.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/hicn-light/src/hicn/core/connection.h b/hicn-light/src/hicn/core/connection.h
index 6297e193c..d9ef817d2 100644
--- a/hicn-light/src/hicn/core/connection.h
+++ b/hicn-light/src/hicn/core/connection.h
@@ -87,6 +87,7 @@ typedef struct {
#define connection_get_name(C) ((C)->name)
#define connection_get_type(C) ((C)->type)
#define connection_has_valid_id(C) (connection_id_is_valid(connection_get_id(C)))
+#define connection_has_valid_type(C) (face_type_is_valid(connection_get_type(C)))
#define connection_get_pair(C) (&(C)->pair)
#define connection_get_local(C) (address_pair_local(connection_get_pair(C)))
#define connection_get_remote(C) (address_pair_remote(connection_get_pair(C)))
@@ -191,7 +192,9 @@ int connection_finalize(connection_t * connection);
int connection_send_packet(const connection_t * connection,
const uint8_t * packet, size_t size);
-bool connection_send(const connection_t * connection, msgbuf_t * msgbuf,
+bool connection_flush(const connection_t * connection);
+
+bool connection_send(const connection_t * connection, off_t msgbuf_id,
bool queue);
size_t connection_process_buffer(connection_t * connection, const uint8_t * buffer, size_t size);
@@ -200,14 +203,16 @@ size_t connection_process_buffer(connection_t * connection, const uint8_t * buff
void connection_wldr_allow_autostart(connection_t * connection, bool value);
-bool connection_wldr_autostart_is_allowed(connection_t * connection);
+bool connection_wldr_autostart_is_allowed(const connection_t * connection);
void connection_wldr_enable(connection_t * connection, bool value);
bool connection_has_wldr(const connection_t * connection);
-void connection_wldr_detect_losses(const connection_t * connection, msgbuf_t * msgbuf);
+void connection_wldr_detect_losses(const connection_t * connection, const msgbuf_t * msgbuf);
+
+void connection_wldr_handle_notification(const connection_t * connection, const msgbuf_t * msgbuf);
-void connection_wldr_handle_notification(const connection_t * connection, msgbuf_t * msgbuf);
+#define connection_get_forwarder(connection) (connection->forwarder)
#endif /* HICNLIGHT_CONNECTION_H */