direwolf/cdigipeater.h
WB2OSZ d85abe214f AX.25 v2.2 connected mode.
modified:   CHANGES.md
	modified:   Makefile.linux
	modified:   Makefile.macosx
	modified:   Makefile.win
	modified:   README.md
	modified:   atest.c
	modified:   audio.h
	new file:   ax25_link.c
	new file:   ax25_link.h
	modified:   ax25_pad.c
	modified:   ax25_pad.h
	modified:   ax25_pad2.c
	new file:   cdigipeater.c
	new file:   cdigipeater.h
	modified:   config.c
	modified:   config.h
	modified:   digipeater.c
	modified:   direwolf.c
	modified:   direwolf.h
	modified:   dlq.c
	modified:   dlq.h
	modified:   doc/Going-beyond-9600-baud.pdf
	modified:   doc/Raspberry-Pi-APRS.pdf
	modified:   doc/Raspberry-Pi-SDR-IGate.pdf
	modified:   doc/User-Guide.pdf
	modified:   gen_packets.c
	modified:   hdlc_rec.c
	modified:   hdlc_send.c
	modified:   hdlc_send.h
	modified:   igate.c
	modified:   log.c
	modified:   log.h
	modified:   multi_modem.c
	modified:   pfilter.c
	modified:   pfilter.h
	modified:   ptt.c
	modified:   recv.c
	modified:   serial_port.c
	modified:   server.c
	modified:   server.h
	modified:   symbols-new.txt
	modified:   tocalls.txt
	modified:   tq.c
	modified:   tq.h
	modified:   waypoint.c
	modified:   xid.c
	new file:   xid.h
	modified:   xmit.c
2016-11-20 14:58:51 -05:00

60 lines
1.2 KiB
C

#ifndef CDIGIPEATER_H
#define CDIGIPEATER_H 1
#include "regex.h"
#include "direwolf.h" /* for MAX_CHANS */
#include "ax25_pad.h" /* for packet_t */
#include "audio.h" /* for radio channel properties */
/*
* Information required for Connected mode digipeating.
*
* The configuration file reader fills in this information
* and it is passed to cdigipeater_init at application start up time.
*/
struct cdigi_config_s {
/*
* Rules for each of the [from_chan][to_chan] combinations.
*/
regex_t alias[MAX_CHANS][MAX_CHANS];
int enabled[MAX_CHANS][MAX_CHANS];
char *filter_str[MAX_CHANS+1][MAX_CHANS+1];
// NULL or optional Packet Filter strings such as "t/m".
// Notice the size of arrays is one larger than normal.
// That extra position is for the IGate.
};
/*
* Call once at application start up time.
*/
extern void cdigipeater_init (struct audio_s *p_audio_config, struct cdigi_config_s *p_cdigi_config);
/*
* Call this for each packet received.
* Suitable packets will be queued for transmission.
*/
extern void cdigipeater (int from_chan, packet_t pp);
/* Make statistics available. */
int cdigipeater_get_count (int from_chan, int to_chan);
#endif
/* end cdigipeater.h */