/* This function finds transition that matches with happened event. Returns the pointer to found transition on success or NULL for failure.  */
static struct llc_sap_state_trans* llc_find_sap_trans(struct llc_sap *sap, struct sk_buff *skb)
/* This function finds transition that matches with happened event. Returns the pointer to found transition on success or NULL for failure.  */
static struct llc_sap_state_trans* llc_find_sap_trans(struct llc_sap *sap, struct sk_buff *skb)
{
	int i = 0;
	struct llc_sap_state_trans *rc = NULL;
	struct llc_sap_state_trans **next_trans;
	struct llc_sap_state *curr_state = &llc_sap_state_table[sap->state - 1];
	for (next_trans = curr_state->transitions; next_trans[i]->ev; i++)
		if (!next_trans[i]->ev(sap, skb)) {
			rc = next_trans[i];
			break;
		}
	return rc;
}