mirror of
https://agent.ghink.cloud/wb2osz/direwolf
synced 2025-04-06 20:58:30 +00:00
modified: .gitattributes modified: APRStt-Implementation-Notes.pdf modified: CHANGES.txt modified: Makefile.linux modified: Makefile.win new file: Raspberry-Pi-APRS-Tracker.pdf modified: Raspberry-Pi-APRS.pdf modified: User-Guide.pdf modified: aclients.c modified: aprs_tt.c modified: aprs_tt.h modified: atest.c modified: audio.c modified: audio.h modified: audio_win.c modified: ax25_pad.c modified: ax25_pad.h modified: beacon.c modified: beacon.h modified: config.c modified: config.h modified: decode_aprs.c modified: decode_aprs.h modified: demod_afsk.c modified: digipeater.c modified: digipeater.h modified: direwolf.c modified: direwolf.conf modified: direwolf.h modified: dsp.c modified: dwgps.c modified: encode_aprs.c modified: encode_aprs.h modified: fsk_demod_state.h new file: grm_sym.h modified: hdlc_rec.c modified: hdlc_rec2.c modified: hdlc_rec2.h modified: kiss.c modified: kiss_frame.c modified: kiss_frame.h modified: kissnet.c modified: latlong.c modified: latlong.h new file: log.c new file: log.h new file: log2gpx.c new file: mgn_icon.h modified: misc/README-dire-wolf.txt modified: multi_modem.c new file: nmea.c new file: nmea.h modified: ptt.c modified: rdq.c modified: regex/README-dire-wolf.txt new file: rpack.h modified: rrbb.c modified: rrbb.h modified: server.c modified: symbols-new.txt modified: symbols.c modified: symbolsX.txt new file: telemetry.c new file: telemetry.h modified: textcolor.c modified: tocalls.txt modified: utm/README.txt modified: version.h modified: xmit.c modified: xmit.h
68 lines
1.4 KiB
C
68 lines
1.4 KiB
C
|
|
|
|
#ifndef DIGIPEATER_H
|
|
#define DIGIPEATER_H 1
|
|
|
|
#include "regex.h"
|
|
|
|
#include "direwolf.h" /* for MAX_CHANS */
|
|
#include "ax25_pad.h" /* for packet_t */
|
|
|
|
/*
|
|
* Information required for digipeating.
|
|
*
|
|
* The configuration file reader fills in this information
|
|
* and it is passed to digipeater_init at application start up time.
|
|
*/
|
|
|
|
|
|
struct digi_config_s {
|
|
|
|
int num_chans;
|
|
|
|
char mycall[MAX_CHANS][AX25_MAX_ADDR_LEN]; /* Call associated */
|
|
/* with each of the radio channels. */
|
|
/* Could be the same or different. */
|
|
|
|
int dedupe_time; /* Don't digipeat duplicate packets */
|
|
/* within this number of seconds. */
|
|
|
|
#define DEFAULT_DEDUPE 30
|
|
|
|
/*
|
|
* Rules for each of the [from_chan][to_chan] combinations.
|
|
*/
|
|
|
|
regex_t alias[MAX_CHANS][MAX_CHANS];
|
|
|
|
regex_t wide[MAX_CHANS][MAX_CHANS];
|
|
|
|
int enabled[MAX_CHANS][MAX_CHANS];
|
|
|
|
enum preempt_e { PREEMPT_OFF, PREEMPT_DROP, PREEMPT_MARK, PREEMPT_TRACE } preempt[MAX_CHANS][MAX_CHANS];
|
|
|
|
int regen[MAX_CHANS][MAX_CHANS]; // Regenerate packet.
|
|
// Sort of like digipeating but passed along unchanged.
|
|
};
|
|
|
|
/*
|
|
* Call once at application start up time.
|
|
*/
|
|
|
|
extern void digipeater_init (struct digi_config_s *p_digi_config);
|
|
|
|
/*
|
|
* Call this for each packet received.
|
|
* Suitable packets will be queued for transmission.
|
|
*/
|
|
|
|
extern void digipeater (int from_chan, packet_t pp);
|
|
|
|
void digi_regen (int from_chan, packet_t pp);
|
|
|
|
|
|
#endif
|
|
|
|
/* end digipeater.h */
|
|
|