Support multiple listening ports per listener type.

Beast input defaults to listening on both 30004 and 30104.
Drop the FATSV listener entirely (use faup1090 for that)
Ignore --net-beast.
This commit is contained in:
Oliver Jowett 2016-01-24 18:45:35 +00:00
parent 1a2926b311
commit 2b466535de
11 changed files with 124 additions and 120 deletions

View file

@ -191,14 +191,6 @@ typedef struct rtlsdr_dev rtlsdr_dev_t;
#define MODES_NET_HEARTBEAT_INTERVAL 60000 // milliseconds
#define MODES_NET_SERVICES_NUM 7
#define MODES_NET_INPUT_RAW_PORT 30001
#define MODES_NET_OUTPUT_RAW_PORT 30002
#define MODES_NET_OUTPUT_SBS_PORT 30003
#define MODES_NET_INPUT_BEAST_PORT 30004
#define MODES_NET_OUTPUT_BEAST_PORT 30005
#define MODES_NET_HTTP_PORT 8080
#define MODES_NET_OUTPUT_FA_TSV_PORT 10001
#define MODES_CLIENT_BUF_SIZE 1024
#define MODES_NET_SNDBUF_SIZE (1024*64)
#define MODES_NET_SNDBUF_MAX (7)
@ -296,22 +288,20 @@ struct { // Internal state
int nfix_crc; // Number of crc bit error(s) to correct
int check_crc; // Only display messages with good CRC
int raw; // Raw output format
int beast; // Beast binary format output
int mode_ac; // Enable decoding of SSR Modes A & C
int debug; // Debugging mode
int net; // Enable networking
int net_only; // Enable just networking
uint64_t net_heartbeat_interval; // TCP heartbeat interval (milliseconds)
int net_output_sbs_port; // SBS output TCP port
int net_output_flush_size; // Minimum Size of output data
uint64_t net_output_flush_interval; // Maximum interval (in milliseconds) between outputwrites
int net_output_raw_port; // Raw output TCP port
int net_input_raw_port; // Raw input TCP port
int net_output_beast_port; // Beast output TCP port
int net_input_beast_port; // Beast input TCP port
char *net_bind_address; // Bind address
int net_http_port; // HTTP port
int net_fatsv_port; // FlightAware TSV port
char *net_output_raw_ports; // List of raw output TCP ports
char *net_input_raw_ports; // List of raw input TCP ports
char *net_output_sbs_ports; // List of SBS output TCP ports
char *net_input_beast_ports; // List of Beast input TCP ports
char *net_output_beast_ports; // List of Beast output TCP ports
char *net_http_ports; // List of HTTP ports
char *net_bind_address; // Bind address
int net_sndbuf_size; // TCP output buffer size (64Kb * 2^n)
int net_verbatim; // if true, send the original message, not the CRC-corrected one
int forward_mlat; // allow forwarding of mlat messages to output ports