common-fun.h 1.16 KB
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
#include <pptp/pptp.h>
7 8 9 10 11 12 13 14 15

/* Contains all functions common to more than one state */

void st_com_execute_slave(struct pp_instance *ppi);

void st_com_restart_annrec_timer(struct pp_instance *ppi);

int st_com_check_record_update(struct pp_instance *ppi);

16 17 18 19
/* Each of the following "handle" functions" return 0 in case of correct
 * message, -1 in case the message contained in buf is not proper (e.g. size
 * is not the expected one
 */
20 21
int st_com_slave_handle_announce(struct pp_instance *ppi, unsigned char *buf,
				 int len);
22

23 24
int st_com_master_handle_announce(struct pp_instance *ppi, unsigned char *buf,
				  int len);
25

26 27
int st_com_slave_handle_sync(struct pp_instance *ppi, unsigned char *buf,
			     int len, TimeInternal *time);
28

29 30
int st_com_master_handle_sync(struct pp_instance *ppi, unsigned char *buf,
			      int len, TimeInternal *time);
31

32 33
int st_com_slave_handle_followup(struct pp_instance *ppi, unsigned char *buf,
				 int len);
34

35 36
int st_com_handle_pdelay_req(struct pp_instance *ppi, unsigned char *buf,
			     int len, TimeInternal *time);