common-fun.h 1.15 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

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

10 11
/* returns -1 in case of error, see below */
int st_com_execute_slave(struct pp_instance *ppi);
12 13 14 15 16

void st_com_restart_annrec_timer(struct pp_instance *ppi);

int st_com_check_record_update(struct pp_instance *ppi);

17 18 19 20
/* 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
 */
21 22
int st_com_slave_handle_announce(struct pp_instance *ppi, unsigned char *buf,
				 int len);
23

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

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

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

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

36
int st_com_handle_pdelay_req(struct pp_instance *ppi, unsigned char *buf,
37
			     int len);