Standarize lle and llme state enum & value_string
Change-Id: Iaf102ce5ca60854fe7eb1af17c73a80e7c76181bchanges/56/30856/2
parent
e5614e434f
commit
13c00008b4
|
@ -90,6 +90,7 @@ enum gprs_llc_lle_state {
|
|||
GPRS_LLES_LOCAL_REL = 6, /* Local Release */
|
||||
GPRS_LLES_TIMER_REC = 7, /* Timer Recovery */
|
||||
};
|
||||
extern const struct value_string gprs_llc_lle_state_names[];
|
||||
|
||||
enum gprs_llc_llme_state {
|
||||
GPRS_LLMS_UNASSIGNED = 1, /* No TLLI yet */
|
||||
|
|
|
@ -50,6 +50,17 @@ const struct value_string gprs_llc_llme_state_names[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
const struct value_string gprs_llc_lle_state_names[] = {
|
||||
{ GPRS_LLES_UNASSIGNED, "TLLI Unassigned" },
|
||||
{ GPRS_LLES_ASSIGNED_ADM, "TLLI Assigned" },
|
||||
{ GPRS_LLES_LOCAL_EST, "Local Establishment" },
|
||||
{ GPRS_LLES_REMOTE_EST, "Remote Establishment" },
|
||||
{ GPRS_LLES_ABM, "Asynchronous Balanced Mode" },
|
||||
{ GPRS_LLES_LOCAL_REL, "Local Release" },
|
||||
{ GPRS_LLES_TIMER_REC, "Timer Recovery" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static struct gprs_llc_llme *llme_alloc(uint32_t tlli);
|
||||
static int gprs_llc_tx_xid(const struct gprs_llc_lle *lle, struct msgb *msg,
|
||||
int command);
|
||||
|
|
|
@ -39,22 +39,11 @@
|
|||
#include <osmocom/vty/vty.h>
|
||||
#include <osmocom/vty/command.h>
|
||||
|
||||
struct value_string gprs_llc_state_strs[] = {
|
||||
{ GPRS_LLES_UNASSIGNED, "TLLI Unassigned" },
|
||||
{ GPRS_LLES_ASSIGNED_ADM, "TLLI Assigned" },
|
||||
{ GPRS_LLES_LOCAL_EST, "Local Establishment" },
|
||||
{ GPRS_LLES_REMOTE_EST, "Remote Establishment" },
|
||||
{ GPRS_LLES_ABM, "Asynchronous Balanced Mode" },
|
||||
{ GPRS_LLES_LOCAL_REL, "Local Release" },
|
||||
{ GPRS_LLES_TIMER_REC, "Timer Recovery" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static void vty_dump_lle(struct vty *vty, struct gprs_llc_lle *lle)
|
||||
{
|
||||
struct gprs_llc_params *par = &lle->params;
|
||||
vty_out(vty, " SAPI %2u State %s VUsend=%u, VUrecv=%u", lle->sapi,
|
||||
get_value_string(gprs_llc_state_strs, lle->state),
|
||||
get_value_string(gprs_llc_lle_state_names, lle->state),
|
||||
lle->vu_send, lle->vu_recv);
|
||||
vty_out(vty, " Vsent=%u Vack=%u Vrecv=%u, RetransCtr=%u%s",
|
||||
lle->v_sent, lle->v_ack, lle->v_recv,
|
||||
|
|
Loading…
Reference in New Issue