forked from wb2osz/direwolf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
igate.h
87 lines (56 loc) · 2.16 KB
/
igate.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*----------------------------------------------------------------------------
*
* Name: igate.h
*
* Purpose: Interface to the Internet Gateway functions.
*
*-----------------------------------------------------------------------------*/
#ifndef IGATE_H
#define IGATE_H 1
#include "ax25_pad.h"
#include "digipeater.h"
#include "audio.h"
#define DEFAULT_IGATE_PORT 14580
struct igate_config_s {
/*
* For logging into the IGate server.
*/
char t2_server_name[40]; /* Tier 2 IGate server name. */
int t2_server_port; /* Typically 14580. */
char t2_login[AX25_MAX_ADDR_LEN];/* e.g. WA9XYZ-15 */
/* Note that the ssid could be any two alphanumeric */
/* characters not just 1 thru 15. */
/* Could be same or different than the radio call(s). */
/* Not sure what the consequences would be. */
char t2_passcode[8]; /* Max. 5 digits. Could be "-1". */
char *t2_filter; /* Optional filter for IS -> RF direction. */
/*
* For transmitting.
*/
int tx_chan; /* Radio channel for transmitting. */
/* 0=first, etc. -1 for none. */
char tx_via[80]; /* VIA path for transmitting third party packets. */
/* Usual text representation. */
/* Must start with "," if not empty so it can */
/* simply be inserted after the destination address. */
int tx_limit_1; /* Max. packets to transmit in 1 minute. */
int tx_limit_5; /* Max. packets to transmit in 5 minutes. */
/*
* Special SATgate mode to delay packets heard directly.
*/
int satgate_delay; /* seconds. 0 to disable. */
};
#define IGATE_TX_LIMIT_1_DEFAULT 6
#define IGATE_TX_LIMIT_1_MAX 20
#define IGATE_TX_LIMIT_5_DEFAULT 20
#define IGATE_TX_LIMIT_5_MAX 80
#define DEFAULT_SATGATE_DELAY 10
#define MIN_SATGATE_DELAY 5
#define MAX_SATGATE_DELAY 30
/* Call this once at startup */
void igate_init (struct audio_s *p_audio_config, struct igate_config_s *p_igate_config, struct digi_config_s *p_digi_config, int debug_level);
/* Call this with each packet received from the radio. */
void igate_send_rec_packet (int chan, packet_t recv_pp);
/* This when digipeater transmits. Set bydigi to 1 . */
void ig_to_tx_remember (packet_t pp, int chan, int bydigi);
#endif