mirror of https://gerrit.osmocom.org/libosmocore
ns2: Add gprs_ns2_nsvc_state_name() to get the current state of a VC
Change-Id: I4c4c5b9142d7240ed452218e263ba12e2b70d1a0 Related: SYS#4998
This commit is contained in:
parent
cce8828238
commit
f128654c7f
|
@ -192,9 +192,12 @@ struct gprs_ns2_vc *gprs_ns2_nsvc_by_sockaddr_nse(
|
|||
struct gprs_ns2_nse *nse,
|
||||
const struct osmo_sockaddr *sockaddr);
|
||||
void gprs_ns2_start_alive_all_nsvcs(struct gprs_ns2_nse *nse);
|
||||
|
||||
/* VC information */
|
||||
const char *gprs_ns2_ll_str(struct gprs_ns2_vc *nsvc);
|
||||
char *gprs_ns2_ll_str_buf(char *buf, size_t buf_len, struct gprs_ns2_vc *nsvc);
|
||||
char *gprs_ns2_ll_str_c(const void *ctx, struct gprs_ns2_vc *nsvc);
|
||||
const char *gprs_ns2_nsvc_state_name(struct gprs_ns2_vc *nsvc);
|
||||
|
||||
/* vty */
|
||||
int gprs_ns2_vty_init(struct gprs_ns2_inst *nsi,
|
||||
|
|
|
@ -292,6 +292,14 @@ char *gprs_ns2_ll_str_c(const void *ctx, struct gprs_ns2_vc *nsvc)
|
|||
return gprs_ns2_ll_str_buf(buf, NS2_LL_MAX_STR, nsvc);
|
||||
}
|
||||
|
||||
/*! Return the current state name of a given NS-VC to a thread-local static buffer.
|
||||
* \param[in] nsvc NS-VC to return the state of
|
||||
* \return pointer to the string on success; NULL on error */
|
||||
const char *gprs_ns2_nsvc_state_name(struct gprs_ns2_vc *nsvc)
|
||||
{
|
||||
return osmo_fsm_inst_state_name(nsvc->fi);
|
||||
}
|
||||
|
||||
/*! Receive a primitive from the NS User (Gb).
|
||||
* \param[in] nsi NS instance to which the primitive is issued
|
||||
* \param[in] oph The primitive
|
||||
|
|
|
@ -109,6 +109,7 @@ gprs_ns2_nse_nsei;
|
|||
gprs_ns2_nse_sns_remote;
|
||||
gprs_ns2_nsvc_by_nsvci;
|
||||
gprs_ns2_nsvc_by_sockaddr;
|
||||
gprs_ns2_nsvc_state_name;
|
||||
gprs_ns2_prim_strs;
|
||||
gprs_ns2_recv_prim;
|
||||
gprs_ns2_reset_persistent_nsvcs;
|
||||
|
|
Loading…
Reference in New Issue