From 22e89e8a409703dc64fa23b3fdc6975ef5fd04f5 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Wed, 21 Sep 2022 18:27:58 +0200 Subject: net: Group events into struct --- src/net/inc/net.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/net/inc') diff --git a/src/net/inc/net.h b/src/net/inc/net.h index cdfeb0e..8359cda 100644 --- a/src/net/inc/net.h +++ b/src/net/inc/net.h @@ -15,9 +15,13 @@ union net_connect struct net_connect_common { enum net_domain domain; - void (*on_connected)(void *arg); - void (*on_disconnected)(void *arg); - void *arg; + + struct net_connect_ev + { + void (*connected)(void *arg); + void (*disconnected)(void *arg); + void *arg; + } ev; } common; struct net_connect_ipv4 -- cgit v1.2.3