summaryrefslogtreecommitdiffstats
path: root/include/osmocom/core
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-04-16 17:23:56 +0200
committerHarald Welte <laforge@gnumonks.org>2017-04-16 17:28:23 +0200
commit4585e6755dd569ab620c711f20a3d45d4ad87216 (patch)
treefe76626f7771919be792dae0f2aff21759169ddd /include/osmocom/core
parent7bc88bbd7ea43082fec181c6892259218ce198a0 (diff)
osmo_fsm: Lookup functions to find FSM Instance by name or ID
Introduce two lookup helper functions to resolve a fsm_instance based on the FSM and name or ID. Also, add related test cases. Change-Id: I707f3ed2795c28a924e64adc612d378c21baa815
Diffstat (limited to 'include/osmocom/core')
-rw-r--r--include/osmocom/core/fsm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h
index 3a1f2338..f42dd0c6 100644
--- a/include/osmocom/core/fsm.h
+++ b/include/osmocom/core/fsm.h
@@ -141,6 +141,10 @@ void osmo_fsm_log_addr(bool log_addr);
int osmo_fsm_register(struct osmo_fsm *fsm);
void osmo_fsm_unregister(struct osmo_fsm *fsm);
struct osmo_fsm *osmo_fsm_find_by_name(const char *name);
+struct osmo_fsm_inst *osmo_fsm_inst_find_by_name(const struct osmo_fsm *fsm,
+ const char *name);
+struct osmo_fsm_inst *osmo_fsm_inst_find_by_id(const struct osmo_fsm *fsm,
+ const char *id);
struct osmo_fsm_inst *osmo_fsm_inst_alloc(struct osmo_fsm *fsm, void *ctx, void *priv,
int log_level, const char *id);
struct osmo_fsm_inst *osmo_fsm_inst_alloc_child(struct osmo_fsm *fsm,