diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2024-01-14 14:29:00 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2024-01-19 18:23:01 +0100 |
commit | cd7d8a96a2c3c1ec06d92a003ba481a611676464 (patch) | |
tree | 6446ffd1328b3e9c1972da1ce7e7fc0d1a69d930 /include/osmocom/e1d | |
parent | 69459b0a03a6937a6b1e76d22a4291042f1e076c (diff) |
Add functions for events from server to client
The client may register a callback function to receive events.
Because there is no relation between the connected client and the
interface, all events are broadcasted to all clients that are
connected to the server.
Change-Id: I5ee3268f8349b611c3cf3fa0572dc5eab280ab2e
Diffstat (limited to 'include/osmocom/e1d')
-rw-r--r-- | include/osmocom/e1d/proto_clnt.h | 2 | ||||
-rw-r--r-- | include/osmocom/e1d/proto_srv.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/osmocom/e1d/proto_clnt.h b/include/osmocom/e1d/proto_clnt.h index 53ccf89..26bd44e 100644 --- a/include/osmocom/e1d/proto_clnt.h +++ b/include/osmocom/e1d/proto_clnt.h @@ -49,3 +49,5 @@ int osmo_e1dp_client_ts_open(struct osmo_e1dp_client *clnt, int osmo_e1dp_client_ts_open_force(struct osmo_e1dp_client *clnt, uint8_t intf, uint8_t line, uint8_t ts, enum osmo_e1dp_ts_mode mode, uint16_t read_bufsize); +void osmo_e1dp_client_event_register(struct osmo_e1dp_client *clnt, + void (*cb)(enum osmo_e1dp_msg_type event, uint8_t intf, uint8_t line, uint8_t ts, uint8_t *data, int len)); diff --git a/include/osmocom/e1d/proto_srv.h b/include/osmocom/e1d/proto_srv.h index e794725..f95ae13 100644 --- a/include/osmocom/e1d/proto_srv.h +++ b/include/osmocom/e1d/proto_srv.h @@ -46,3 +46,5 @@ struct osmo_e1dp_server_handler { struct osmo_e1dp_server *osmo_e1dp_server_create(void *ctx, const char *path, struct osmo_e1dp_server_handler *handlers, void *handler_data); void osmo_e1dp_server_destroy(struct osmo_e1dp_server *srv); +void osmo_e1dp_server_event(struct osmo_e1dp_server *srv, enum osmo_e1dp_msg_type event, + uint8_t intf, uint8_t line, uint8_t ts, uint8_t *data, int len); |