#ifndef PDINRS_WANPIPE_H
// $Id: DEADpdinrs_wanpipe.h,v 1.1 2005/01/11 19:58:21 pdi Exp $
/* Copyright 1998-2022 Stonie R. Cooper, Licensed under the auspices of GPLv3,
 *  See top-level copyright disclaimer (COPYRIGHT) and license (LICENSE) */
#include <linux/version.h>
#include <pdinrs.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/types.h>

#include <stdio.h>
#include <ctype.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <string.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <linux/wanpipe.h>
#include <linux/wanpipe_defines.h>
#include <linux/sdla_chdlc.h>
#include <linux/if_packet.h>
#include <linux/if_wanpipe.h>
#include <linux/if_ether.h>

#define MDATALEN MAX_LGTH_UDP_MGNT_PKT

#define RESET_ESCC 0x2C

#define SANGOMA_LONGFRAME  -1
#define SANGOMA_READERROR  -2
#define SANGOMA_SHORTFRAME -3
#define SANGOMA_TIMEOUT    -4

#ifndef RESET_ESCC
#define RESET_ESCC 0x2C
#endif

#define LGTH_CRC_BYTES  2

/* Prototypes */
int sangoma_reset(char *i_name);

int sangoma_connect(char *r_name, char *i_name, struct wan_sockaddr_ll *sa);

signed short int sangoma_receive(int sock, unsigned char *Data, unsigned char *Rx_data,
		                 signed short int *rx_length,
		                 signed char *errcode, time_t seconds);

#endif
