/* This function finds transition that matches with happened event, then executes related actions and finally changes state of connection. Returns 0 for success, 1 for failure.  */
static int llc_conn_service(struct sock *sk, struct sk_buff *skb)
/* This function finds transition that matches with happened event, then executes related actions and finally changes state of connection. Returns 0 for success, 1 for failure.  */
static int llc_conn_service(struct sock *sk, struct sk_buff *skb)
{
	int rc = 1;
	struct llc_sock *llc = llc_sk(sk);
	struct llc_conn_state_trans *trans;
	if (llc->state > NBR_CONN_STATES)
		goto out;
	rc = 0;
	trans = llc_qualify_conn_ev(sk, skb);
	if (trans) {
		rc = llc_exec_conn_trans_actions(sk, trans, skb);
		if (!rc && trans->next_state != NO_STATE_CHANGE) {
			llc->state = trans->next_state;
			if (!llc_data_accept_state(llc->state))
				sk->sk_state_change(sk);
		}
	}
out:
	return rc;
}