mobipass.h 850 Bytes
Newer Older
Cedric Roux's avatar
Cedric Roux committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
#ifndef _MOBIPASS_H_
#define _MOBIPASS_H_

#include <stdint.h>
#include "ethernet_lib.h"

typedef struct {
  /* this has to come first */
  eth_state_t eth;

  void *qstate;

  uint8_t eth_local[6];
  uint8_t eth_remote[6];

  int samples_per_1024_frames;

  /* variables used by the function interface.c:mobipass_read */
  uint32_t mobipass_read_ts;
  unsigned char mobipass_read_seqno;

  /* variables used by the function interface.c:mobipass_write */
  uint32_t mobipass_write_last_timestamp;

  /* variables used by the function mobipass.c:[init_time|synch_time] */
  uint64_t t0;

  /* variables used by the function mobipass.c:synch_time */
  uint32_t synch_time_last_ts;
  uint64_t synch_time_mega_ts;

  /* sock is used in mobipass.c */
  int sock;
} mobipass_state_t;

void init_mobipass(mobipass_state_t *mobi);

#endif /* _MOBIPASS_H_ */