10 #define _SYSIO_AX25_H_ 12 #include <sysio/defs.h> 35 #define AX25_MAX_RPT 8 40 #define AX25_CALL_LEN 6 45 #define AX25_INFO_LEN 256 50 #define AX25_FRAME_BUF_LEN ((AX25_CALL_LEN+1)*(2+AX25_MAX_RPT)+AX25_INFO_LEN+4) 57 #define AX25_CTRL_UI 0x03 64 #define AX25_PID_NOLAYER3 0xF0 71 #define HDLC_FLAG 0x7E 72 #define HDLC_RESET 0x7F 81 AX25_FILE_ACCESS_ERROR = -1,
82 AX25_ILLEGAL_CALLSIGN = -2,
83 AX25_INVALID_FRAME = -3,
85 AX25_NOT_ENOUGH_MEMORY = -5,
86 AX25_NOT_ENOUGH_REPEATER = -6,
87 AX25_OBJECT_NOT_FOUND = -7,
88 AX25_FILE_NOT_FOUND = -8,
89 AX25_ILLEGAL_REPEATER = -9,
90 AX25_NO_FRAME_RECEIVED = -10
uint16_t crc_out
CRC of current sent frame.
uint8_t repeaters_len
Number of repeaters.
char callsign[AX25_CALL_LEN+1]
Callsign, max 6 character.
xAx25Node * xAx25NodeNew(void)
int iAx25NodeFilePrint(const xAx25Node *n, FILE *f)
xAx25Frame * xAx25FrameNew(void)
int iAx25Send(xAx25 *ax25, const xAx25Frame *frame)
uint8_t ctrl
AX25 control field.
int fin
stream used to access the physical input
size_t info_len
payload length
bool sync
True if we have received a HDLC flag.
bool frm_recv
True if we have received a valid frame.
int iAx25Read(xAx25 *ax25, xAx25Frame *frame)
int iAx25FrameSetRepeaterFlag(xAx25Frame *frame, uint8_t index, bool flag)
void vAx25FrameDelete(xAx25Frame *frame)
int iAx25SetFdout(xAx25 *p, int fdout)
xAx25Node * dst
Destination node.
bool escape
True when we have to escape the following char.
int iAx25FrameClear(xAx25Frame *frame)
uint8_t pid
AX25 PID field.
uint8_t ssid
SSID (secondary station ID) for the call.
int iAx25FrameAddRepeater(xAx25Frame *frame, const char *callsign, uint8_t ssid)
int iAx25NodePrint(const xAx25Node *n)
int iAx25Error(xAx25 *ax25)
struct xAx25Frame xAx25Frame
int iAx25NodeClear(xAx25Node *n)
char * xAx25NodeToStr(const xAx25Node *p)
int fout
stream used to access the physical output
int iAx25NodeSetCallsign(xAx25Node *n, const char *callsign)
int iAx25SetFdin(xAx25 *p, int fdin)
int iAx25FramePrint(const xAx25Frame *frame)
#define AX25_FRAME_BUF_LEN
char * xAx25FrameToStr(const xAx25Frame *frame)
uint16_t crc_in
CRC for current received frame.
void vAx25NodeDelete(xAx25Node *n)
void vAx25Delete(xAx25 *p)
bool bAx25Poll(xAx25 *ax25)
struct xAx25Node xAx25Node
int iAx25FrameSetInfo(xAx25Frame *frame, const void *info, size_t info_len)
int iAx25FrameSetDst(xAx25Frame *frame, const char *callsign, uint8_t ssid)
int iAx25FrameSetSrc(xAx25Frame *frame, const char *callsign, uint8_t ssid)
bool flag
boolean flag: has-been-repeated, general purpose ...
int iAx25FrameFilePrint(const xAx25Frame *frame, FILE *f)
xAx25Node * src
Source node.