First steps towards an open source implementation of the LE (Local Exchange) side of the ETSI/ITU V5 interface, in order to talk to Access Multiplexers (AN), such as Nokia EKSOS, DeTeWe ALIAN, etc.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
osmo-v5/v52_lcp_fsm.c

612 lines
17 KiB

/* ITu-T G.965 Section 16.2 V5.2-interface Link control FSM - LE side */
#include "v5x_internal.h"
/* 16.2.4.2.2 */
enum v52_lcp_fsm_state {
V52_LCPFSM_S_LE01_NOP_LINK_FAILURE,
V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED,
V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED,
V52_LCPFSM_S_LE11_NOP_LOCAL_LINK_UNBLOCK,
V52_LCPFSM_S_LE12_NOP_REMOTE_LINK_UNBLOCK,
V52_LCPFSM_S_LE20_OP_OPERATIONAL,
V52_LCPFSM_S_LE21_OP_REMOTE_LINK_ID,
V52_LCPFSM_S_LE22_OP_LOCAL_LINK_ID,
};
enum v52_lcp_event {
V52_LCPFSM_E_MPH_AI, /* Activate Indication (L1 link operational) */
V52_LCPFSM_E_MPH_DI, /* Deactivate Indication (L1 link not operational) */
V52_LCPFSM_E_MDU_IDReq, /* Identification Request */
V52_LCPFSM_E_FE_IDAck,
V52_LCPFSM_E_MPH_IDI, /* Identification Indication */
V52_LCPFSM_E_MPH_EIg, /* Identification Failure */
V52_LCPFSM_E_FE_IDReq,
V52_LCPFSM_E_MDU_IDAck, /* Send Link ID ACK */
V52_LCPFSM_E_FE_IDRel,
V52_LCPFSM_E_MDU_IDRej, /* Link ID Reject */
V52_LCPFSM_E_FE_IDRej,
V52_LCPFSM_E_MDU_LUBR, /* Link Unblock Request */
V52_LCPFSM_E_MDU_LBI, /* Link Block Indication */
V52_LCPFSM_E_FE302, /* AN Initiated unblocking */
V52_LCPFSM_E_FE304, /* AN initiated link block */
V52_LCPFSM_E_FE305, /* deferred link block request */
V52_LCPFSM_E_FE306, /* non-deferred link block request */
};
static struct msgb *v51_enc_link_control(uint8_t link_id, enum v52_link_ctrl_func lcf)
{
struct v51_l3_hdr *l3h;
uint8_t lcf_enc = lcf;
struct msgb *msg = msgb_alloc_v5x();
if (!msg)
return NULL;
l3h = (struct v51_l3_hdr *) msgb_put(msg, sizeof(*l3h));
l3h->pdisc = V51_LCP_PDISC;
l3h->l3_addr = link_id
l3h->msg_type = V52_CTRL_MSGT_LCP_LINK_CTRL;
msgb_tlv_put(msg, V52_CTRL_IEI_LCP_LINK_CTRL_FUNCTION, 1, &lcf_enc);
return msg;
}
static struct msgb *v51_enc_link_control_ack(uint8_t link_id, enum v52_link_ctrl_func lcf)
{
struct v51_l3_hdr *l3h;
uint8_t lcf_enc = lcf;
struct msgb *msg = msgb_alloc_v5x();
if (!msg)
return NULL;
l3h = (struct v51_l3_hdr *) msgb_put(msg, sizeof(*l3h));
l3h->pdisc = V51_LCP_PDISC;
l3h->l3_addr = link_id;
l3h->msg_type = V52_CTRL_MSGT_LCP_LINK_CTRL_ACK;
msgb_tlv_put(msg, V52_CTRL_IEI_LCP_LINK_CTRL_FUNCTION, 1, &lcf_enc);
return msg;
}
static void lcp_fsm_le01_link_failure(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
switch (event) {
case V52_LCPFSM_E_MPH_AI:
/* TODO: Send MDU-LAI */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE20_OP_OPERATIONAL, 0, 0);
break;
case V52_LCPFSM_E_MPH_DI:
/* ignore */
break;
case V52_LCPFSM_E_MDU_IDReq:
/* TODO: Send MDU-DI */
break;
case V52_LCPFSM_E_FE_IDReq:
/* TODO: Send FE303 */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE_IDRel:
case V52_LCPFSM_E_FE_IDRej:
/* ignore */
break;
case V52_LCPFSM_E_MDU_LUBR:
/* TODO: Send MDU-DI */
/* TODO: Send FE303 */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_MDU_LBI:
case V52_LCPFSM_E_FE302:
case V52_LCPFSM_E_FE305:
case V52_LCPFSM_E_FE306:
/* TODO: Send FE303 */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE304:
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED, 0, 0);
break;
default:
OSMO_ASSERT(0);
}
}
static void lcp_fsm_le02_link_failure_blocked(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
switch (event) {
case V52_LCPFSM_E_MPH_AI:
/* TODO: Send MDU-LAI */
/* TODO: Send MDU-LBl */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_MPH_DI:
/* ignore */
break;
case V52_LCPFSM_E_MDU_IDReq:
/* TODO: Send MDU-DI */
break;
case V52_LCPFSM_E_FE_IDReq:
/* TODO: Send FE303 */
break;
case V52_LCPFSM_E_MDU_LUBR:
/* TODO: Send MDU-DI */
/* TODO: Send FE303 */
break;
case V52_LCPFSM_E_MDU_LBI:
case V52_LCPFSM_E_FE302:
case V52_LCPFSM_E_FE305:
case V52_LCPFSM_E_FE306:
/* TODO: Send FE303 */
break;
case V52_LCPFSM_E_FE304:
/* ignore */
break;
default:
OSMO_ASSERT(0);
}
}
static void lcp_fsm_le10_link_blocked(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
switch (event) {
case V52_LCPFSM_E_MPH_AI:
/* TODO: Send MDU-LAI */
break;
case V52_LCPFSM_E_MPH_DI:
/* TODO: Send MDU-DI */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_MDU_IDReq:
/* TODO: Send MDU-LBl */
break;
case V52_LCPFSM_E_FE_IDReq:
/* TODO: Send FE303 */
break;
case V52_LCPFSM_E_FE_IDRel:
case V52_LCPFSM_E_FE_IDRej:
/* ignore */
break;
case V52_LCPFSM_E_MDU_LUBR:
/* TODO: Send FE303 */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE11_NOP_LOCAL_LINK_UNBLOCK, 0, 0);
break;
case V52_LCPFSM_E_FE302:
/* TODO: Send MDL-LUBR */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE12_NOP_REMOTE_LINK_UNBLOCK, 0, 0);
break;
case V52_LCPFSM_E_MDU_LBI:
case V52_LCPFSM_E_FE305:
case V52_LCPFSM_E_FE306:
/* TODO: Send FE303 */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE304:
break;
default:
OSMO_ASSERT(0);
}
}
static void lcp_fsm_le11_local_link_unblock(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
switch (event) {
case V52_LCPFSM_E_MPH_AI:
/* ignore */
break;
case V52_LCPFSM_E_MPH_DI:
/* TODO: Send MDU-DI */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_MDU_IDReq:
/* TODO: Send MDU-LBl */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE_IDReq:
/* TODO: Send FE-IDRej */
break;
case V52_LCPFSM_E_FE_IDRel:
case V52_LCPFSM_E_FE_IDRej:
/* ignore */
break;
case V52_LCPFSM_E_MDU_LUBR:
/* TODO: Send FE301 */
break;
case V52_LCPFSM_E_MDU_LBI:
/* TODO: Send FE303 */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE302:
/* TODO: Send MDU-LUBl */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE20_OP_OPERATIONAL, 0, 0);
break;
case V52_LCPFSM_E_FE304:
/* TODO: Send MDU-LBl */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE305:
case V52_LCPFSM_E_FE306:
/* TODO: Send FE303 */
/* TODO: Send MDU-LBl */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
default:
OSMO_ASSERT(0);
}
}
static void lcp_fsm_le12_remote_link_unblock(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
switch (event) {
case V52_LCPFSM_E_MPH_AI:
/* ignore */
break;
case V52_LCPFSM_E_MPH_DI:
/* TODO: Send MDU-Dl */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_MDU_IDReq:
/* TODO: Send MDU-LUBR */
/* TODO: Send MDU-IDRej */
break;
case V52_LCPFSM_E_FE_IDReq:
/* TODO: Send FE-IDRej */
break;
case V52_LCPFSM_E_MDU_LUBR:
/* TODO: Send FE301 */
/* TODO: Send MDU-LUBl */
break;
case V52_LCPFSM_E_MDU_LBI:
/* TODO: Send FE303 */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE20_OP_OPERATIONAL, 0, 0);
break;
case V52_LCPFSM_E_FE302:
/* TODO: Send MDU-LUBR */
break;
case V52_LCPFSM_E_FE304:
/* TODO: Send MDU-LBl */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE305:
case V52_LCPFSM_E_FE306:
/* TODO: Send FE303 */
/* TODO: Send MDU-LBl */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
default:
OSMO_ASSERT(0);
}
}
static void lcp_fsm_le20_operational(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
switch (event) {
case V52_LCPFSM_E_MPH_AI:
/* ignore */
break;
case V52_LCPFSM_E_MPH_DI:
/* TODO: Send MDU-DI */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE01_NOP_LINK_FAILURE, 0, 0);
break;
case V52_LCPFSM_E_MDU_IDReq:
/* TODO: Send FE-IDReq */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE22_OP_LOCAL_LINK_ID, 0, 0);
break;
case V52_LCPFSM_E_FE_IDReq:
/* TODO: Send MDU-IDReq */
break;
case V52_LCPFSM_E_MDU_IDAck:
/* TODO: Send MPH-ID */
/* TODO: Send FE-IDAck */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE21_OP_REMOTE_LINK_ID, 0, 0);
break;
case V52_LCPFSM_E_MDU_IDRej:
/* TODO: Send FE-IDRej */
break;
case V52_LCPFSM_E_MDU_LUBR:
/* TODO: Send FE301 */
break;
case V52_LCPFSM_E_MDU_LBI:
/* TODO: Send FE303 */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE302:
/* TODO: Send MDU-LUBI */
break;
case V52_LCPFSM_E_FE304:
/* TODO: Send MDU-LBI */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE305:
/* TODO: Send MDU-LBR */
break;
case V52_LCPFSM_E_FE306:
/* TODO: Send MDU-LBRN */
break;
default:
OSMO_ASSERT(0);
}
}
static void lcp_fsm_le21_op_remote_link_id(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
switch (event) {
case V52_LCPFSM_E_MPH_AI:
/* ignore */
break;
case V52_LCPFSM_E_MPH_DI:
/* TODO: Send MDU-DI */
/* TODO: Send MPH-NOR */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE01_NOP_LINK_FAILURE, 0, 0);
break;
case V52_LCPFSM_E_MDU_IDReq:
/* TODO: Send MDU-IDRej */
break;
case V52_LCPFSM_E_MDU_IDAck:
/* ignore */
break;
case V52_LCPFSM_E_FE_IDRel:
/* TODO: Send MDU-IDRel */
/* TODO: Sen MPH-NOR */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE20_OP_OPERATIONAL, 0, 0);
break;
case V52_LCPFSM_E_MDU_IDRej:
/* TODO: Send FE-IDRej */
/* TODO: Sen MPH-NOR */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE20_OP_OPERATIONAL, 0, 0);
break;
case V52_LCPFSM_E_MDU_LUBR:
/* TODO: Send FE301 */
/* TODO: Sen MPH-NOR */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE20_OP_OPERATIONAL, 0, 0);
break;
case V52_LCPFSM_E_MDU_LBI:
/* TODO: Send FE303 */
/* TODO: Sen MPH-NOR */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE302:
/* TODO: Send MDU-IDRel */
/* TODO: Send MDU-LUBI */
/* TODO: Sen MPH-NOR */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE20_OP_OPERATIONAL, 0, 0);
break;
case V52_LCPFSM_E_FE304:
/* TODO: Send MDU-LBI */
/* TODO: Sen MPH-NOR */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE305:
/* TODO: Send MDU-LBR */
break;
case V52_LCPFSM_E_FE306:
/* TODO: Send MDU-LBRN */
break;
default:
OSMO_ASSERT(0);
}
}
static void lcp_fsm_le22_op_local_link_id(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
switch (event) {
case V52_LCPFSM_E_MPH_AI:
/* ignore */
break;
case V52_LCPFSM_E_MPH_DI:
/* TODO: Send MDU-DI */
/* TODO: Send FE-IdRel */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE01_NOP_LINK_FAILURE, 0, 0);
break;
case V52_LCPFSM_E_MDU_IDReq:
/* ignore */
break;
case V52_LCPFSM_E_MDU_IDAck:
/* TODO: Send MPH-IDR */
break;
case V52_LCPFSM_E_MPH_IDI:
/* TODO: Send MDU-AI */
/* TODO: Send FE-IDRel */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE20_OP_OPERATIONAL, 0, 0);
break;
case V52_LCPFSM_E_MPH_EIg:
/* TODO: Send FE-IDRel */
/* TODO: Send MDU-ELg */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE20_OP_OPERATIONAL, 0, 0);
break;
case V52_LCPFSM_E_FE_IDRej:
/* TODO: Send MDU-IDRej */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE20_OP_OPERATIONAL, 0, 0);
break;
case V52_LCPFSM_E_MDU_LUBR:
/* TODO: Send FE301 */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE20_OP_OPERATIONAL, 0, 0);
break;
case V52_LCPFSM_E_MDU_LBI:
/* TODO: Send FE303 */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE302:
/* TODO: Send MDU-IDRej */
/* TODO: Send MDU-LUBI */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE20_OP_OPERATIONAL, 0, 0);
break;
case V52_LCPFSM_E_FE304:
/* TODO: Send MDU-LBI */
osmo_fsm_inst_state_chg(fi, V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED, 0, 0);
break;
case V52_LCPFSM_E_FE305:
/* TODO: Send MDU-LBR */
break;
case V52_LCPFSM_E_FE306:
/* TODO: Send MDU-LBRN */
break;
default:
OSMO_ASSERT(0);
}
}
/* Table 17G.965 */
static const struct osmo_fsm_state v52_lcp_le_fsm_states[] = {
[V52_LCPFSM_S_LE01_NOP_LINK_FAILURE] = {
.name = "LE0.1_LINK_FAILURE",
.in_event_mask = S(V52_LCPFSM_E_MPH_AI) |
S(V52_LCPFSM_E_MPH_DI) |
S(V52_LCPFSM_E_MDU_IDReq) |
S(V52_LCPFSM_E_FE_IDReq) |
S(V52_LCPFSM_E_FE_IDRel) |
S(V52_LCPFSM_E_FE_IDRej) |
S(V52_LCPFSM_E_MDU_LUBR) |
S(V52_LCPFSM_E_MDU_LBI) |
S(V52_LCPFSM_E_FE302) |
S(V52_LCPFSM_E_FE304) |
S(V52_LCPFSM_E_FE305) |
S(V52_LCPFSM_E_FE306),
.out_state_mask = S(V52_LCPFSM_S_LE20_OP_OPERATIONAL) |
S(V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED),
.action = lcp_fsm_le01_link_failure,
},
[V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED] = {
.name = "LE0.2_LINK_FAILURE_AND_BLOCKED",
.in_event_mask = S(V52_LCPFSM_E_MPH_AI) |
S(V52_LCPFSM_E_MPH_DI) |
S(V52_LCPFSM_E_MDU_IDReq) |
S(V52_LCPFSM_E_FE_IDReq) |
S(V52_LCPFSM_E_MDU_LUBR) |
S(V52_LCPFSM_E_MDU_LBI) |
S(V52_LCPFSM_E_FE302) |
S(V52_LCPFSM_E_FE304) |
S(V52_LCPFSM_E_FE305) |
S(V52_LCPFSM_E_FE306),
.out_state_mask = S(V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED),
.action = lcp_fsm_le02_link_failure_blocked,
},
[V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED] = {
.name = "LE1.0_NOP_LINK_BLOCKED",
.in_event_mask = S(V52_LCPFSM_E_MPH_AI) |
S(V52_LCPFSM_E_MPH_DI) |
S(V52_LCPFSM_E_MDU_IDReq) |
S(V52_LCPFSM_E_FE_IDReq) |
S(V52_LCPFSM_E_FE_IDRel) |
S(V52_LCPFSM_E_FE_IDRej) |
S(V52_LCPFSM_E_MDU_LUBR) |
S(V52_LCPFSM_E_MDU_LBI) |
S(V52_LCPFSM_E_FE302) |
S(V52_LCPFSM_E_FE304) |
S(V52_LCPFSM_E_FE305) |
S(V52_LCPFSM_E_FE306),
.out_state_mask = S(V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED) |
S(V52_LCPFSM_S_LE11_NOP_LOCAL_LINK_UNBLOCK) |
S(V52_LCPFSM_S_LE21_OP_REMOTE_LINK_ID),
.action = lcp_fsm_le10_link_blocked,
},
[V52_LCPFSM_S_LE11_NOP_LOCAL_LINK_UNBLOCK] = {
.name = "LE1.1_NOP_LOCAL_LINK_UNBLOCK",
.in_event_mask = S(V52_LCPFSM_E_MPH_AI) |
S(V52_LCPFSM_E_MPH_DI) |
S(V52_LCPFSM_E_MDU_IDReq) |
S(V52_LCPFSM_E_FE_IDReq) |
S(V52_LCPFSM_E_FE_IDRel) |
S(V52_LCPFSM_E_FE_IDRej) |
S(V52_LCPFSM_E_MDU_LUBR) |
S(V52_LCPFSM_E_MDU_LBI) |
S(V52_LCPFSM_E_FE302) |
S(V52_LCPFSM_E_FE304) |
S(V52_LCPFSM_E_FE305) |
S(V52_LCPFSM_E_FE306),
.out_state_mask = S(V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED) |
S(V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED) |
S(V52_LCPFSM_S_LE20_OP_OPERATIONAL),
.action = lcp_fsm_le11_local_link_unblock,
},
[V52_LCPFSM_S_LE12_NOP_REMOTE_LINK_UNBLOCK] = {
.name = "LE1.2_NOP_REMOTE_LINK_UNBLOCK",
.in_event_mask = S(V52_LCPFSM_E_MPH_AI) |
S(V52_LCPFSM_E_MPH_DI) |
S(V52_LCPFSM_E_MDU_IDReq) |
S(V52_LCPFSM_E_FE_IDReq) |
S(V52_LCPFSM_E_MDU_LUBR) |
S(V52_LCPFSM_E_MDU_LBI) |
S(V52_LCPFSM_E_FE302) |
S(V52_LCPFSM_E_FE304) |
S(V52_LCPFSM_E_FE305) |
S(V52_LCPFSM_E_FE306),
.out_state_mask = S(V52_LCPFSM_S_LE02_NOP_LINK_FAILURE_AND_BLOCKED) |
S(V52_LCPFSM_S_LE20_OP_OPERATIONAL) |
S(V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED),
.action = lcp_fsm_le12_remote_link_unblock,
},
[V52_LCPFSM_S_LE20_OP_OPERATIONAL] = {
.name = "LE2.0_OP_OPERATIONAL",
.in_event_mask = S(V52_LCPFSM_E_MPH_AI) |
S(V52_LCPFSM_E_MPH_DI) |
S(V52_LCPFSM_E_MDU_IDReq) |
S(V52_LCPFSM_E_FE_IDReq) |
S(V52_LCPFSM_E_MDU_IDAck) |
S(V52_LCPFSM_E_MDU_IDRej) |
S(V52_LCPFSM_E_MDU_LUBR) |
S(V52_LCPFSM_E_MDU_LBI) |
S(V52_LCPFSM_E_FE302) |
S(V52_LCPFSM_E_FE304) |
S(V52_LCPFSM_E_FE305) |
S(V52_LCPFSM_E_FE306),
.out_state_mask = S(V52_LCPFSM_S_LE01_NOP_LINK_FAILURE) |
S(V52_LCPFSM_S_LE22_OP_LOCAL_LINK_ID) |
S(V52_LCPFSM_S_LE21_OP_REMOTE_LINK_ID) |
S(V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED),
.action = lcp_fsm_le20_operational,
},
[V52_LCPFSM_S_LE21_OP_REMOTE_LINK_ID] = {
.name = "LE2.1_OP_REMOTE_LINK_ID",
.in_event_mask = S(V52_LCPFSM_E_MPH_AI) |
S(V52_LCPFSM_E_MPH_DI) |
S(V52_LCPFSM_E_MDU_IDReq) |
S(V52_LCPFSM_E_FE_IDReq) |
S(V52_LCPFSM_E_MDU_IDAck) |
S(V52_LCPFSM_E_MDU_IDRel) |
S(V52_LCPFSM_E_MDU_IDRej) |
S(V52_LCPFSM_E_MDU_LUBR) |
S(V52_LCPFSM_E_MDU_LBI) |
S(V52_LCPFSM_E_FE302) |
S(V52_LCPFSM_E_FE304) |
S(V52_LCPFSM_E_FE305) |
S(V52_LCPFSM_E_FE306),
.out_state_mask = S(V52_LCPFSM_S_LE01_NOP_LINK_FAILURE) |
S(V52_LCPFSM_S_LE20_OP_OPERATIONAL) |
S(V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED),
.action = lcp_fsm_le21_op_remote_link_id,
},
[V52_LCPFSM_S_LE22_OP_LOCAL_LINK_ID] = {
.name = "LE2.2_OP_LOCAL_LINK_ID",
.in_event_mask = S(V52_LCPFSM_E_MPH_AI) |
S(V52_LCPFSM_E_MPH_DI) |
S(V52_LCPFSM_E_MDU_IDReq) |
S(V52_LCPFSM_E_MDU_IDAck) |
S(V52_LCPFSM_E_MPH_IDI) |
S(V52_LCPFSM_E_MPH_EIg) |
S(V52_LCPFSM_E_FE_IDReq) |
S(V52_LCPFSM_E_MDU_LUBR) |
S(V52_LCPFSM_E_MDU_LBI) |
S(V52_LCPFSM_E_FE302) |
S(V52_LCPFSM_E_FE304) |
S(V52_LCPFSM_E_FE305) |
S(V52_LCPFSM_E_FE306),
.out_state_mask = S(V52_LCPFSM_S_LE01_NOP_LINK_FAILURE) |
S(V52_LCPFSM_S_LE20_OP_OPERATIONAL) |
S(V52_LCPFSM_S_LE10_NOP_LINK_BLOCKED),
.action =lcp_fsm_le22_op_local_link_id,
},
};
struct osmo_fsm v52_lcp_le_fsm = {
.name = "V52_LCP_LE",
.states = v52_lcp_le_fsm_states,
.num_states = ARRAY_SIZE(v52_lcp_le_fsm_states),
.timer_cb = NULL,
.log_subsys = 0,
.event_names = v52_lcp_le_fsm_event_names,
};