sys/netccitt/llc_subr.c
/*
 * D_CONN --- At the request of the service access point user, the local LLC
 *            has sent a DISC command PDU to the remote LLC DSAP and is waiting
 *            for a reply.
 */
At the request of the service access point user, the local LLC
has sent a DISC command PDU to the remote LLC DSAP and is waiting
for a reply.
At the request of the service access point user the local LLC has sent a DISC command PDU to the remote LLC DSAP and is waiting for a reply .
int
llc_state_D_CONN(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_send(linkp, LLCFT_DM, LLC_RSP, pollfinal);
		LLC_STOP_ACK_TIMER(linkp);
		LLC_NEWSTATE(linkp, ADM);
		break;
	case LLCFT_UA + LLC_RSP:
		if (LLC_GETFLAG(linkp, P) == pollfinal) {
			LLC_STOP_ACK_TIMER(linkp);
			LLC_NEWSTATE(linkp, ADM);
		}
		break;
	case LLCFT_DISC + LLC_CMD:
		llc_send(linkp, LLCFT_UA, LLC_RSP, pollfinal);
		break;
	case LLCFT_DM + LLC_RSP:
		LLC_STOP_ACK_TIMER(linkp);
		LLC_NEWSTATE(linkp, ADM);
		break;
	case LLC_ACK_TIMER_EXPIRED:
		if (linkp->llcl_retry < llc_n2) {
			llc_send(linkp, LLCFT_DISC, LLC_CMD, pollfinal);
			LLC_SETFLAG(linkp, P, pollfinal);
			LLC_START_ACK_TIMER(linkp);
			linkp->llcl_retry++;
		} else LLC_NEWSTATE(linkp, ADM);
		break;
	}
	return action;
}
int llc_state_D_CONN ( 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_send ( linkp , LLCFT_DM , LLC_RSP , pollfinal ) ; LLC_STOP_ACK_TIMER ( linkp ) ; LLC_NEWSTATE ( linkp , ADM ) ; break ; case LLCFT_UA + LLC_RSP : if ( LLC_GETFLAG ( linkp , P ) == pollfinal ) { LLC_STOP_ACK_TIMER ( linkp ) ; LLC_NEWSTATE ( linkp , ADM ) ; } break ; case LLCFT_DISC + LLC_CMD : llc_send ( linkp , LLCFT_UA , LLC_RSP , pollfinal ) ; break ; case LLCFT_DM + LLC_RSP : LLC_STOP_ACK_TIMER ( linkp ) ; LLC_NEWSTATE ( linkp , ADM ) ; break ; case LLC_ACK_TIMER_EXPIRED : if ( linkp -> llcl_retry < llc_n2 ) { llc_send ( linkp , LLCFT_DISC , LLC_CMD , pollfinal ) ; LLC_SETFLAG ( linkp , P , pollfinal ) ; LLC_START_ACK_TIMER ( linkp ) ; linkp -> llcl_retry ++ ; } else LLC_NEWSTATE ( linkp , ADM ) ; break ; } return action ; }
D_CONN --- At the request of the service access point user, the local LLC
            has sent a DISC command PDU to the remote LLC DSAP and is waiting
            for a reply.
D_CONN --- At the request of the service access point user the local LLC has sent a DISC command PDU to the remote LLC DSAP and is waiting for a reply .