state-faulty.c 491 Bytes
Newer Older
1
/*
2 3
 * Aurelio Colosimo for CERN, 2011 -- GNU LGPL v2.1 or later
 * Based on PTPd project v. 2.1.0 (see AUTHORS for details)
4
 */
5

6 7
#include <pptp/pptp.h>
#include <pptp/diag.h>
8 9 10 11 12 13 14 15 16

/*
 * Fault troubleshooting. Now only prints an error messages and comes back to
 * PTP_INITIALIZING state
 */

int pp_faulty(struct pp_instance *ppi, unsigned char *pkt, int plen)
{
	pp_printf("event FAULT_CLEARED\n");
17
	ppi->next_state = PPS_INITIALIZING;
18
	ppi->next_delay = PP_DEFAULT_NEXT_DELAY_MS;
19 20
	return 0;
}