1 2 3 /* xid.h */ 4 5 6 #include "ax25_pad.h" // for enum ax25_modulo_e 7 8 9 struct xid_param_s { 10 11 int full_duplex; 12 13 // Order is important because negotiation keeps the lower value of 14 // REJ (srej_none), SREJ (default without negotiation), Multi-SREJ (if both agree). 15 16 enum srej_e { srej_none=0, srej_single=1, srej_multi=2, srej_not_specified=3 } srej; 17 18 enum ax25_modulo_e modulo; 19 20 int i_field_length_rx; /* In bytes. XID has it in bits. */ 21 22 int window_size_rx; 23 24 int ack_timer; /* "T1" in mSec. */ 25 26 int retries; /* "N1" */ 27 }; 28 29 30 int xid_parse (unsigned char *info, int info_len, struct xid_param_s *result, char *desc, int desc_size); 31 32 int xid_encode (struct xid_param_s *param, unsigned char *info, cmdres_t cr);