direwolf/ax25_link.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

82 lines
1.8 KiB
C

/* ax25_link.h */
#ifndef AX25_LINK_H
#define AX25_LINK_H 1
#include "ax25_pad.h" // for AX25_MAX_INFO_LEN
#include "dlq.h" // for dlq_item_t
#include "config.h" // for struct misc_config_s
// Limits and defaults for parameters.
#define AX25_N1_PACLEN_MIN 1 // Max bytes in Information part of frame.
#define AX25_N1_PACLEN_DEFAULT 256 // some v2.0 implementations have 128
#define AX25_N1_PACLEN_MAX AX25_MAX_INFO_LEN // from ax25_pad.h
#define AX25_N2_RETRY_MIN 1 // Number of times to retry before giving up.
#define AX25_N2_RETRY_DEFAULT 10
#define AX25_N2_RETRY_MAX 15
#define AX25_T1V_FRACK_MIN 1 // Number of seconds to wait before retrying.
#define AX25_T1V_FRACK_DEFAULT 3 // KPC-3+ has 4. TM-D710A has 3.
#define AX25_T1V_FRACK_MAX 15
#define AX25_K_MAXFRAME_BASIC_MIN 1 // Window size - number of I frames to send before waiting for ack.
#define AX25_K_MAXFRAME_BASIC_DEFAULT 4
#define AX25_K_MAXFRAME_BASIC_MAX 7
#define AX25_K_MAXFRAME_EXTENDED_MIN 1
#define AX25_K_MAXFRAME_EXTENDED_DEFAULT 32
#define AX25_K_MAXFRAME_EXTENDED_MAX 63 // In theory 127 but I'm restricting as explained in SREJ handling.
// Call once at startup time.
void ax25_link_init (struct misc_config_s *pconfig);
// IMPORTANT:
// These functions must be called on a single thread, one at a time.
// The Data Link Queue (DLQ) is used to serialize events from multiple sources.
void dl_connect_request (dlq_item_t *E);
void dl_disconnect_request (dlq_item_t *E);
void dl_data_request (dlq_item_t *E);
void dl_register_callsign (dlq_item_t *E);
void dl_unregister_callsign (dlq_item_t *E);
void dl_client_cleanup (dlq_item_t *E);
void lm_data_indication (dlq_item_t *E);
void lm_channel_busy (dlq_item_t *E);
void dl_timer_expiry (void);
double ax25_link_get_next_timer_expiry (void);
#endif
/* end ax25_link.h */