sys/netccitt/llc_subr.c
/*
 * ERROR --- The local connection component has detected an error in a received
 *           PDU and has sent a FRMR response PDU. It is waiting for a reply from 
 *           the remote connection component.
 */
The local connection component has detected an error in a received
PDU and has sent a FRMR response PDU. It is waiting for a reply from
the remote connection component.
The local connection component has detected an error in a received PDU and has sent a FRMR response PDU . It is waiting for a reply from the remote connection component .
int
llc_state_ERROR(struct llc_linkcb *linkp, struct llc *frame, int frame_kind,
		int cmdrsp, int pollfinal)
{
	int action = 0;
	switch(frame_kind + cmdrsp) {
	case LLCFT_SABME + LLC_CMD:
		LLC_STOP_ACK_TIMER(linkp);
		LLC_NEWSTATE(linkp, RESET_CHECK);
		action = LLC_RESET_INDICATION_REMOTE;
		break;
	case LLCFT_DISC + LLC_CMD:
		llc_send(linkp, LLCFT_UA, LLC_RSP, pollfinal);
		LLC_STOP_ACK_TIMER(linkp);
		LLC_NEWSTATE(linkp, ADM);
		action = LLC_DISCONNECT_INDICATION;
		break;
	case LLCFT_DM + LLC_RSP:
		LLC_STOP_ACK_TIMER(linkp);
		LLC_NEWSTATE(linkp, ADM);
		action = LLC_DISCONNECT_INDICATION;
		break;
	case LLCFT_FRMR + LLC_RSP:
		LLC_STOP_ACK_TIMER(linkp);
		LLC_SETFLAG(linkp, S, 0);
		LLC_NEWSTATE(linkp, RESET_WAIT);
		action = LLC_FRMR_RECEIVED;
		break;
	case LLC_ACK_TIMER_EXPIRED:
		if (linkp->llcl_retry < llc_n2) {
			llc_send(linkp, LLCFT_FRMR, LLC_RSP, 0);
			LLC_START_ACK_TIMER(linkp);
			linkp->llcl_retry++;
		} else {
			LLC_SETFLAG(linkp, S, 0);
			LLC_NEWSTATE(linkp, RESET_WAIT);
			action = LLC_RESET_INDICATION_LOCAL;
		}
		break;
	default:
		if (cmdrsp == LLC_CMD){
			llc_send(linkp, LLCFT_FRMR, LLC_RSP, pollfinal);
			LLC_START_ACK_TIMER(linkp);
		}
		break;
	}
	return action;
}
int llc_state_ERROR ( struct llc_linkcb * linkp , struct llc * frame , int frame_kind , int cmdrsp , int pollfinal ) { int action = 0 ; switch ( frame_kind + cmdrsp ) { case LLCFT_SABME + LLC_CMD : LLC_STOP_ACK_TIMER ( linkp ) ; LLC_NEWSTATE ( linkp , RESET_CHECK ) ; action = LLC_RESET_INDICATION_REMOTE ; break ; case LLCFT_DISC + LLC_CMD : llc_send ( linkp , LLCFT_UA , LLC_RSP , pollfinal ) ; LLC_STOP_ACK_TIMER ( linkp ) ; LLC_NEWSTATE ( linkp , ADM ) ; action = LLC_DISCONNECT_INDICATION ; break ; case LLCFT_DM + LLC_RSP : LLC_STOP_ACK_TIMER ( linkp ) ; LLC_NEWSTATE ( linkp , ADM ) ; action = LLC_DISCONNECT_INDICATION ; break ; case LLCFT_FRMR + LLC_RSP : LLC_STOP_ACK_TIMER ( linkp ) ; LLC_SETFLAG ( linkp , S , 0 ) ; LLC_NEWSTATE ( linkp , RESET_WAIT ) ; action = LLC_FRMR_RECEIVED ; break ; case LLC_ACK_TIMER_EXPIRED : if ( linkp -> llcl_retry < llc_n2 ) { llc_send ( linkp , LLCFT_FRMR , LLC_RSP , 0 ) ; LLC_START_ACK_TIMER ( linkp ) ; linkp -> llcl_retry ++ ; } else { LLC_SETFLAG ( linkp , S , 0 ) ; LLC_NEWSTATE ( linkp , RESET_WAIT ) ; action = LLC_RESET_INDICATION_LOCAL ; } break ; default : if ( cmdrsp == LLC_CMD ) { llc_send ( linkp , LLCFT_FRMR , LLC_RSP , pollfinal ) ; LLC_START_ACK_TIMER ( linkp ) ; } break ; } return action ; }
ERROR --- The local connection component has detected an error in a received
           PDU and has sent a FRMR response PDU.
ERROR --- The local connection component has detected an error in a received PDU and has sent a FRMR response PDU .