sys/netccitt/llc_subr.c
/*
 * ADM --- The connection component is in the asynchronous disconnected mode.
 *         It can accept an SABME PDU from a remote LLC SSAP or, at the request
 *         of the service access point user, can initiate an SABME PDU
 *         transmission to a remote LLC DSAP, to establish a data link
 *         connection. It also responds to a DISC command PDU and to any
 *         command PDU with the P bit set to ``1''.
 */
The connection component is in the asynchronous disconnected mode.
It can accept an SABME PDU from a remote LLC SSAP or, at the request
of the service access point user, can initiate an SABME PDU
transmission to a remote LLC DSAP, to establish a data link
connection. It also responds to a DISC command PDU and to any
command PDU with the P bit set to ``1''.
The connection component is in the asynchronous disconnected mode . It can accept an SABME PDU from a remote LLC SSAP or at the request of the service access point user can initiate an SABME PDU transmission to a remote LLC DSAP to establish a data link connection . It also responds to a DISC command PDU and to any command PDU with the P bit set to ` ` 1 ' ' .
int
llc_state_ADM(struct llc_linkcb *linkp, struct llc *frame, int frame_kind,
	      int cmdrsp, int pollfinal)
{
	int action = 0;
	switch(frame_kind + cmdrsp) {
	case NL_CONNECT_REQUEST:
		llc_send(linkp, LLCFT_SABME, LLC_CMD, pollfinal);
		LLC_SETFLAG(linkp, P, pollfinal);
		LLC_SETFLAG(linkp, S, 0);
		linkp->llcl_retry = 0;
		LLC_NEWSTATE(linkp, SETUP);
		break;
	case LLCFT_SABME + LLC_CMD:
		LLC_SETFLAG(linkp, F, pollfinal);
		LLC_NEWSTATE(linkp, CONN);
		action = LLC_CONNECT_INDICATION;
		break;
	case LLCFT_DISC + LLC_CMD:
		llc_send(linkp, LLCFT_DM, LLC_RSP, pollfinal);
		break;
	default:
		if (cmdrsp == LLC_CMD && pollfinal == 1) 
			llc_send(linkp, LLCFT_DM, LLC_RSP, 1);
	}
	return action;
}
int llc_state_ADM ( struct llc_linkcb * linkp , struct llc * frame , int frame_kind , int cmdrsp , int pollfinal ) { int action = 0 ; switch ( frame_kind + cmdrsp ) { case NL_CONNECT_REQUEST : llc_send ( linkp , LLCFT_SABME , LLC_CMD , pollfinal ) ; LLC_SETFLAG ( linkp , P , pollfinal ) ; LLC_SETFLAG ( linkp , S , 0 ) ; linkp -> llcl_retry = 0 ; LLC_NEWSTATE ( linkp , SETUP ) ; break ; case LLCFT_SABME + LLC_CMD : LLC_SETFLAG ( linkp , F , pollfinal ) ; LLC_NEWSTATE ( linkp , CONN ) ; action = LLC_CONNECT_INDICATION ; break ; case LLCFT_DISC + LLC_CMD : llc_send ( linkp , LLCFT_DM , LLC_RSP , pollfinal ) ; break ; default : if ( cmdrsp == LLC_CMD && pollfinal == 1 ) llc_send ( linkp , LLCFT_DM , LLC_RSP , 1 ) ; } return action ; }
ADM --- The connection component is in the asynchronous disconnected mode.
ADM --- The connection component is in the asynchronous disconnected mode .
/* 
		 * ISO 8802-2, table 7-1, ADM state says to set
		 * the P flag, yet this will cause an SABME [P] to be
		 * answered with an UA only, not an UA [F], all
		 * other `disconnected' states set the F flag, so ...
		 */ /* remain in ADM state */