Changes:
* Add 'format' member to patty_ax25_frame
* Drop 'format' argument in patty_ax25_encode_reply_to()
* Drop 'format' argument in patty_ax25_encode()
* Consolidate private functions for encoding frame addresses to one
much simpler function to perform encoding; simplify encoding of
addresses in frames sent in reply to other frames
Implement the AX.25 v2.2 XID parameter exchange as a preamble for
initiating connections with peers, with the following workflow:
* Upon a connect() call, send an XID frame to the peer
* When a DM is received, assume the peer is unable to accept a
connection
* When a FRMR is received, assume the peer does not adhere to the
AX.25 v2.2 standard, and attempt to initiate a connection with a
SABM frame instead
* When an XID is received, adapt local parameters to meet the
needs of the peer, and respond with an SABM or an SABME frame,
depending on which mode is indicated
Use patty_ax25_sock_bind_if() in server_connect() to ensure any other
functions which must take place are attended to when assigning an
interface to a socket
Fix byte order of extended format control encoding and decoding in the
following src/frame.c functions:
* patty_ax25_frame_decode_control()
* patty_ax25_frame_encode_reply_to()
Changes:
* Modify examples/ax25dump.c and decode.c to not die upon failure to
decode a specific frame or field; instead, indicate the error,
print a hex dump of the frame, and move on to the next frame
Changes:
* Implement patty_ax25_sock_upgrade() to upgrade a socket from the
default AX.25 2.0 parameters to AX.25 2.2 parameters, meant to be
used upon receipt of an XID frame
* Implement patty_ax25_sock_params_set() to set lowest common
denominator parameters to a socket, downgrading or adapting to the
parameters advertised by a peer XID frame as necessary
Changes:
* Define different sets of default parameters for AX.25 versions
2.2 and prior
* Add flags_classes, flags_hdlc and version to patty_ax25_sock
* Remove flags member from patty_ax25_sock
* Inherit Classes of Procedures value from interface when an
interface is bound to a socket
Changes:
* Declare bigger defaults for certain session parameters in
include/patty/ax25/sock.h
* Use patty_ax25_sock_reset() to initialize parameter variables in
patty_ax25_sock_new(), to save many lines of code
* Add patty_ax25_sock member n_ack
Changes:
* Implement patty_ax25_params struct to contain all parameters
supported by patty, at the interface and socket level alike
* Move parameter enumerate types into include/patty/ax25.h, from
include/patty/ax25/frame.h; make corrections as necessary
* Reimplement patty_ax25_frame_decode_xid() to parse known XID
information parameters into a patty_ax25_params object
* Implement patty_print_params() in src/print.c
* Refactor patty_print_frame() as patty_print_frame_header(),
without a call to patty_print_hexdump(); this allows
patty_print_params() to be called prior to patty_print_hexdump(),
for better readability
* Use patty_print_params() in examples/ax25dump.c, decode.c
* Refactor usage of patty_ax25_frame_decode_xid() in src/server.c to
parse XID frames into a patty_ax25_params object
Set default sock frame len to 328 as per AX.25 spec, to handle full
header with maximum number of repeaters, 8-bit control field, protocol
identifier, and 256 information field bytes
Implement ring buffer for frames sent in a SABM or SABME session,
facilitating the ability to retransmit select frames upon request,
retaining a copy of the full frame and its transmitted size
Implement better handling of command/response bits whilst decoding and
encoding addresses
Changes:
* Add an enum patty_ax25_frame_cr argument to functions in
src/sock.c which send specific types of frames
* Detect AX.25 version >2.0 based on the command/response SSID bits
* Simplify address copying/encoding by usage of the new function
patty_ax25_addr_copy()
* Implement showing AX.25 version, command/response indicator for
frames in src/print.c
Implement patty_ax25_addr_copy() as a means to copy a patty_ax25_addr
object from one location in memory to another, ensuring that the SSID
field only contains at minimum the station identifier (0-15) and the
reserved bits 0x60
Implement better handling of situations when read() captures multiple
TNC frames; ensure each frame is handled in src/server.c, function
handle_iface(), to ensure packets aren't ignored before the next
select() call