usr.sbin/atm/atmarpd/atmarp_timer.c
void
atmarp_keepalive_timeout(Harp_timer *tp)
{
	Atmarp_intf	*aip;
	Scsp_if_msg	*msg;

	/*
	 * Back off to start of DCS entry
	 */
	aip = (Atmarp_intf *) ((caddr_t)tp -
			(uintptr_t)(&((Atmarp_intf *)0)->ai_keepalive_t));

	/*
	 * Get a message buffer
	 */
	msg = (Scsp_if_msg *)UM_ALLOC(sizeof(Scsp_if_msg));
	if (!msg) {
	}
	UM_ZERO(msg, sizeof(Scsp_if_msg));

	/*
	 * Build a NOP message
	 */
	msg->si_type = SCSP_NOP_REQ;
	msg->si_proto = SCSP_PROTO_ATMARP;
	msg->si_len = sizeof(Scsp_if_msg_hdr);

	/*
	 * Send the message to SCSP
	 */
	atmarp_scsp_out(aip, (char *)msg, msg->si_len);
	UM_FREE(msg);

	/*
	 * Restart the keepalive timer
	 */
	HARP_TIMER(&aip->ai_keepalive_t, ATMARP_KEEPALIVE_INTERVAL,
			atmarp_keepalive_timeout);
}
/*
 * Keepalive timeout processing
 *
 * When the keepalive timer fires, we send a NOP to SCSP.  This
 * will help us detect a broken connection.
 *
 * Arguments:
 *	tp	pointer to a HARP timer block
 *
 * Returns:
 *	None
 *
 */
Keepalive timeout processing
When the keepalive timer fires, we send a NOP to SCSP.  This
will help us detect a broken connection.

tp      pointer to a HARP timer block

None
Keepalive timeout processing When the keepalive timer fires we send a NOP to SCSP . This will help us detect a broken connection . tp pointer to a HARP timer block None
void
atmarp_keepalive_timeout(Harp_timer *tp)
{
	Atmarp_intf	*aip;
	Scsp_if_msg	*msg;
	aip = (Atmarp_intf *) ((caddr_t)tp -
			(uintptr_t)(&((Atmarp_intf *)0)->ai_keepalive_t));
	msg = (Scsp_if_msg *)UM_ALLOC(sizeof(Scsp_if_msg));
	if (!msg) {
	}
	UM_ZERO(msg, sizeof(Scsp_if_msg));
	msg->si_type = SCSP_NOP_REQ;
	msg->si_proto = SCSP_PROTO_ATMARP;
	msg->si_len = sizeof(Scsp_if_msg_hdr);
	atmarp_scsp_out(aip, (char *)msg, msg->si_len);
	UM_FREE(msg);
	HARP_TIMER(&aip->ai_keepalive_t, ATMARP_KEEPALIVE_INTERVAL,
			atmarp_keepalive_timeout);
}
void atmarp_keepalive_timeout ( Harp_timer * tp ) { Atmarp_intf * aip ; Scsp_if_msg * msg ; aip = ( Atmarp_intf * ) ( ( caddr_t ) tp - ( uintptr_t ) ( & ( ( Atmarp_intf * ) 0 ) -> ai_keepalive_t ) ) ; msg = ( Scsp_if_msg * ) UM_ALLOC ( sizeof ( Scsp_if_msg ) ) ; if ( ! msg ) { } UM_ZERO ( msg , sizeof ( Scsp_if_msg ) ) ; msg -> si_type = SCSP_NOP_REQ ; msg -> si_proto = SCSP_PROTO_ATMARP ; msg -> si_len = sizeof ( Scsp_if_msg_hdr ) ; atmarp_scsp_out ( aip , ( char * ) msg , msg -> si_len ) ; UM_FREE ( msg ) ; HARP_TIMER ( & aip -> ai_keepalive_t , ATMARP_KEEPALIVE_INTERVAL , atmarp_keepalive_timeout ) ; }
Keepalive timeout processing
 When the keepalive timer fires, we send a NOP to SCSP.
Keepalive timeout processing When the keepalive timer fires we send a NOP to SCSP .
/*
	 * Back off to start of DCS entry
	 */ /*
	 * Get a message buffer
	 */ /*
	 * Build a NOP message
	 */ /*
	 * Send the message to SCSP
	 */ /*
	 * Restart the keepalive timer
	 */