mirror of https://github.com/wb2osz/direwolf.git
new option to silence aprs-is traffic
This commit is contained in:
parent
4ecaf478cf
commit
c446c8f5f3
|
@ -176,6 +176,7 @@ static int d_p_opt = 0; /* "-d p" option for dumping packets over radio. */
|
||||||
|
|
||||||
static int q_h_opt = 0; /* "-q h" Quiet, suppress the "heard" line with audio level. */
|
static int q_h_opt = 0; /* "-q h" Quiet, suppress the "heard" line with audio level. */
|
||||||
static int q_d_opt = 0; /* "-q d" Quiet, suppress the printing of decoded of APRS packets. */
|
static int q_d_opt = 0; /* "-q d" Quiet, suppress the printing of decoded of APRS packets. */
|
||||||
|
static int q_i_opt = 0; /* "-q i" Quiet, suppress the printing of APRS-IS packets. */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -509,6 +510,7 @@ int main (int argc, char *argv[])
|
||||||
switch (*p) {
|
switch (*p) {
|
||||||
case 'h': q_h_opt = 1; break;
|
case 'h': q_h_opt = 1; break;
|
||||||
case 'd': q_d_opt = 1; break;
|
case 'd': q_d_opt = 1; break;
|
||||||
|
case 'i': q_i_opt = 1; break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -782,7 +784,7 @@ int main (int argc, char *argv[])
|
||||||
* Initialize the digipeater and IGate functions.
|
* Initialize the digipeater and IGate functions.
|
||||||
*/
|
*/
|
||||||
digipeater_init (&audio_config, &digi_config);
|
digipeater_init (&audio_config, &digi_config);
|
||||||
igate_init (&audio_config, &igate_config, &digi_config, d_i_opt);
|
igate_init (&audio_config, &igate_config, &digi_config, d_i_opt, q_i_opt);
|
||||||
cdigipeater_init (&audio_config, &cdigi_config);
|
cdigipeater_init (&audio_config, &cdigi_config);
|
||||||
pfilter_init (&igate_config, d_f_opt);
|
pfilter_init (&igate_config, d_f_opt);
|
||||||
ax25_link_init (&misc_config);
|
ax25_link_init (&misc_config);
|
||||||
|
@ -1274,6 +1276,7 @@ static void usage (char **argv)
|
||||||
dw_printf (" -q Quiet (suppress output) options:\n");
|
dw_printf (" -q Quiet (suppress output) options:\n");
|
||||||
dw_printf (" h h = Heard line with the audio level.\n");
|
dw_printf (" h h = Heard line with the audio level.\n");
|
||||||
dw_printf (" d d = Decoding of APRS packets.\n");
|
dw_printf (" d d = Decoding of APRS packets.\n");
|
||||||
|
dw_printf (" i i = Display of APRS-IS packets.\n");
|
||||||
dw_printf (" -t n Text colors. 1=normal, 0=disabled.\n");
|
dw_printf (" -t n Text colors. 1=normal, 0=disabled.\n");
|
||||||
dw_printf (" -a n Audio statistics interval in seconds. 0 to disable.\n");
|
dw_printf (" -a n Audio statistics interval in seconds. 0 to disable.\n");
|
||||||
#if __WIN32__
|
#if __WIN32__
|
||||||
|
|
31
igate.c
31
igate.c
|
@ -291,6 +291,7 @@ static struct audio_s *save_audio_config_p;
|
||||||
static struct igate_config_s *save_igate_config_p;
|
static struct igate_config_s *save_igate_config_p;
|
||||||
static struct digi_config_s *save_digi_config_p;
|
static struct digi_config_s *save_digi_config_p;
|
||||||
static int s_debug;
|
static int s_debug;
|
||||||
|
static int s_quiet;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -388,6 +389,7 @@ int igate_get_dnl_cnt (void) {
|
||||||
* 1 plus packets sent TO server or why not.
|
* 1 plus packets sent TO server or why not.
|
||||||
* 2 plus duplicate detection overview.
|
* 2 plus duplicate detection overview.
|
||||||
* 3 plus duplicate detection details.
|
* 3 plus duplicate detection details.
|
||||||
|
* quiet - Silence iGate Traffic from Logs
|
||||||
*
|
*
|
||||||
* Description: This starts two threads:
|
* Description: This starts two threads:
|
||||||
*
|
*
|
||||||
|
@ -397,7 +399,7 @@ int igate_get_dnl_cnt (void) {
|
||||||
*--------------------------------------------------------------------*/
|
*--------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
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)
|
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, int quiet)
|
||||||
{
|
{
|
||||||
#if __WIN32__
|
#if __WIN32__
|
||||||
HANDLE connnect_th;
|
HANDLE connnect_th;
|
||||||
|
@ -410,6 +412,7 @@ void igate_init (struct audio_s *p_audio_config, struct igate_config_s *p_igate_
|
||||||
int e;
|
int e;
|
||||||
#endif
|
#endif
|
||||||
s_debug = debug_level;
|
s_debug = debug_level;
|
||||||
|
s_quiet = quiet;
|
||||||
dp_queue_head = NULL;
|
dp_queue_head = NULL;
|
||||||
|
|
||||||
#if DEBUGx
|
#if DEBUGx
|
||||||
|
@ -1469,22 +1472,24 @@ static void * igate_recv_thread (void *arg)
|
||||||
* channels, each with own client side filtering and via path.
|
* channels, each with own client side filtering and via path.
|
||||||
* Loop here over all configured channels.
|
* Loop here over all configured channels.
|
||||||
*/
|
*/
|
||||||
text_color_set(DW_COLOR_REC);
|
if (s_quiet == 0) {
|
||||||
dw_printf ("\n[ig>tx] "); // formerly just [ig]
|
text_color_set(DW_COLOR_REC);
|
||||||
ax25_safe_print ((char *)message, len, 0);
|
dw_printf ("\n[ig>tx] "); // formerly just [ig]
|
||||||
dw_printf ("\n");
|
ax25_safe_print ((char *)message, len, 0);
|
||||||
|
dw_printf ("\n");
|
||||||
|
|
||||||
if ((int)strlen((char*)message) != len) {
|
if ((int)strlen((char*)message) != len) {
|
||||||
|
|
||||||
// Invalid. Either drop it or pass it along as-is. Don't change.
|
// Invalid. Either drop it or pass it along as-is. Don't change.
|
||||||
|
|
||||||
text_color_set(DW_COLOR_ERROR);
|
text_color_set(DW_COLOR_ERROR);
|
||||||
dw_printf("'nul' character found in packet from IS. This should never happen.\n");
|
dw_printf("'nul' character found in packet from IS. This should never happen.\n");
|
||||||
dw_printf("The source station is probably transmitting with defective software.\n");
|
dw_printf("The source station is probably transmitting with defective software.\n");
|
||||||
|
|
||||||
//if (strcmp((char*)pinfo, "4P") == 0) {
|
//if (strcmp((char*)pinfo, "4P") == 0) {
|
||||||
// dw_printf("The TM-D710 will do this intermittently. A firmware upgrade is needed to fix it.\n");
|
// dw_printf("The TM-D710 will do this intermittently. A firmware upgrade is needed to fix it.\n");
|
||||||
//}
|
//}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
2
igate.h
2
igate.h
|
@ -101,7 +101,7 @@ struct igate_config_s {
|
||||||
|
|
||||||
/* Call this once at startup */
|
/* 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);
|
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, int quiet);
|
||||||
|
|
||||||
/* Call this with each packet received from the radio. */
|
/* Call this with each packet received from the radio. */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue