usr.sbin/timed/timed/readmsg.c
/*
 * Send the necessary acknowledgements:
 * only the type ACK is to be sent by a slave
 */
Send the necessary acknowledgements:
only the type ACK is to be sent by a slave
Send the necessary acknowledgements : only the type ACK is to be sent by a slave
void
slaveack()
{
	switch(msgin.tsp_type) {
	case TSP_ADJTIME:
	case TSP_SETTIME:
	case TSP_ACCEPT:
	case TSP_REFUSE:
	case TSP_TRACEON:
	case TSP_TRACEOFF:
	case TSP_QUIT:
		if (trace) {
			fprintf(fd, "Slaveack: ");
			print(&msgin, &from);
		}
		xmit(TSP_ACK,msgin.tsp_seq, &from);
		break;
	default:
		if (trace) {
			fprintf(fd, "Slaveack: no ack: ");
			print(&msgin, &from);
		}
		break;
	}
}
void slaveack ( ) { switch ( msgin . tsp_type ) { case TSP_ADJTIME : case TSP_SETTIME : case TSP_ACCEPT : case TSP_REFUSE : case TSP_TRACEON : case TSP_TRACEOFF : case TSP_QUIT : if ( trace ) { fprintf ( fd , " " ) ; print ( & msgin , & from ) ; } xmit ( TSP_ACK , msgin . tsp_seq , & from ) ; break ; default : if ( trace ) { fprintf ( fd , " " ) ; print ( & msgin , & from ) ; } break ; } }
Send the necessary acknowledgements:
 only the type ACK is to be sent by a slave
Send the necessary acknowledgements : only the type ACK is to be sent by a slave