lib/libtelnet/auth.c
/*
 * This routine is called by the server to start authentication
 * negotiation.
 */
This routine is called by the server to start authentication
negotiation.
This routine is called by the server to start authentication negotiation .
void
auth_request()
{
	static unsigned char str_request[64] = { IAC, SB,
						 TELOPT_AUTHENTICATION,
						 TELQUAL_SEND, };
	Authenticator *ap = authenticators;
	unsigned char *e = str_request + 4;
	if (!authenticating) {
		authenticating = 1;
		while (ap->type) {
			if (i_support & ~i_wont_support & typemask(ap->type)) {
				if (auth_debug_mode) {
					printf(">>>%s: Sending type %d %d\r\n",
						Name, ap->type, ap->way);
				}
				*e++ = ap->type;
				*e++ = ap->way;
			}
			++ap;
		}
		*e++ = IAC;
		*e++ = SE;
		net_write(str_request, e - str_request);
		printsub('>', &str_request[2], e - str_request - 2);
	}
}
void auth_request ( ) { static unsigned char str_request [ 64 ] = { IAC , SB , TELOPT_AUTHENTICATION , TELQUAL_SEND , } ; Authenticator * ap = authenticators ; unsigned char * e = str_request + 4 ; if ( ! authenticating ) { authenticating = 1 ; while ( ap -> type ) { if ( i_support & ~ i_wont_support & typemask ( ap -> type ) ) { if ( auth_debug_mode ) { printf ( " \r \n " , Name , ap -> type , ap -> way ) ; } * e ++ = ap -> type ; * e ++ = ap -> way ; } ++ ap ; } * e ++ = IAC ; * e ++ = SE ; net_write ( str_request , e - str_request ) ; printsub ( ' ' , & str_request [ 2 ] , e - str_request - 2 ) ; } }
This routine is called by the server to start authentication
 negotiation.
This routine is called by the server to start authentication negotiation .