diff options
author | Harald Welte <laforge@osmocom.org> | 2021-01-31 18:33:31 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2021-02-02 11:37:48 +0000 |
commit | 2cc1d4d7dfc8fb9837fc62992ccb92c1f8613706 (patch) | |
tree | b63becc75a0997a9d1d2a794778e41fa484bb544 /include | |
parent | 943133cad89cc133dbe9fba8fc19249ce57d33ad (diff) |
frame_relay: Add status call-backs for link + DLC status changes
Change-Id: Iec19db4e48642c3fcb0aa11fa7787b8323fd0e5a
Related: Os#4999
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/gprs/frame_relay.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/osmocom/gprs/frame_relay.h b/include/osmocom/gprs/frame_relay.h index 2860c6be..1be37eec 100644 --- a/include/osmocom/gprs/frame_relay.h +++ b/include/osmocom/gprs/frame_relay.h @@ -87,11 +87,15 @@ struct osmo_fr_link { /* list of data link connections at this link */ struct llist_head dlc_list; + /* optional call-back to be called for each PDU received on an unknown DLC */ int (*unknown_dlc_rx_cb)(void *cb_data, struct msgb *msg); void *unknown_dlc_rx_cb_data; + /* call-back to be called for transmitting on the underlying hardware */ int (*tx_cb)(void *data, struct msgb *msg); - void *tx_cb_data; + /* optional call-back to be called each time the status changes active/inactive */ + void (*status_cb)(struct osmo_fr_link *link, void *cb_data, bool active); + void *cb_data; }; /* Frame Relay Data Link Connection */ @@ -113,8 +117,11 @@ struct osmo_fr_dlc { * NET must wait until USER confirms it implicitly by a seq number check */ bool state_send; + /* call-back to be called for each PDU received on this DLC */ int (*rx_cb)(void *cb_data, struct msgb *msg); - void *rx_cb_data; + /* optional call-back to be called each time the status changes active/inactive */ + void (*status_cb)(struct osmo_fr_dlc *dlc, void *cb_data, bool active); + void *cb_data; }; /* allocate a frame relay network */ |