Changes:
* Combine patty_ax25_sock_ack_timer_restart() and _set() into one
method, patty_ax25_sock_ack_timer_start(), which accepts a new
struct timeval argument to potentially add the Timer T1 value to
* Reorder some functions in src/sock.c, include/patty/ax25/sock.h
Changes:
* Implement patty_ax25_sock_timeR_ack_restart() to initialize the
XID/SABM/SABME ack Timer T1
* Implement patty_ax25_sock_timer_ack_cancel() to clear Timer T1
* Implement patty_ax25_sock_timer_ack_sub() to subtract the value of
a struct timeval from Timer T1
* Implement patty_ax25_sock_timer_ack_expired() to indicate if the
ack Timer T1 has expired
Other changes:
* Rearrange patty_ax25_sock a bit
Begin to reimplement patty_ax25_sock_reset() to follow the AX.25 v2.2
Specification, Section 6.5 "Resetting Procedure" indications to set V(S)
and V(R) to 0
Rename patty_ax25_sock_reset() to patty_ax25_sock_init(), so as to allow
for the implementation of a future _reset() method which shall be used
to implement AX.25 v2.2 Section 6.5 "Resetting Procedure"
Changes:
* Make patty_ax25_sock_send_rr() accept a P/F flag value
* Make patty_ax25_sock_send_rnr() accept a P/F flag value
* Make patty_ax25_sock_send_rej() accept a P/F flag value
After performing XID parameter negotiation, do not simply use the
negotiated TX buffer size when allocating the RX buffer; this resolves
an issue wherein read()s into the RX buffer (allocated with a size equal
to the TX buffer, which may be smaller) would cause memory errors
Changes:
* Allow REJ handling to occur when the V(S) send state counter wraps
to a value lower than indicated in the frame N(R) field
* Fix tx_slot() in src/sock.c to not buffer overflow when the TX
window is less than the maximum for the SABM/SABME mode
Changes:
* Add an enum patty_ax25_version argument to the function
patty_ax25_sock_upgrade() to allow upgrading a socket to a certain
set of AX.25 defaults
Changes:
* Improve patty_ax25_sock_params_set() validation by setting ENOTSUP
when setting options on a socket that don't make sense, such as no
Asynchronous Balanced Mode
Changes:
* Make patty_ax25_sock_send() set ENETDOWN when no network interface
is associated with a sock
* Make patty_ax25_sock_send() set EBADF when no remote address is
associated with a sock
Keep distinct default Classes of Procedures parameter flag values for
sockets and interfaces, as the Asynchronous Balanced Mode parameter does
not apply to the interface itself, and the Half/Full Duplex parameters
do not apply to the sock
Changes:
* Replace patty_ax25_sock member 'buf' with 'tx_buf' and 'rx_buf'
for transmitting or receiving single, non-sequential packets
* Make patty_ax25_sock_upgrade() reallocate all I/O buffers based on
window size and MTU/MRU, useful when entering SABME mode
Changes:
* Modify patty_ax25_sock_send_xid() to require the 'cr' argument,
which specifies whether the frame address field is to be encoded
with the 'command' or 'response' bits set as appropriate
Fix subtle sequence issues in src/sock.c wherein non-I frames which are
sent may overwrite a previously sent I frame with the same sequence
number, which would cause issues with the remote end expecting an I
frame and possibly getting a non-I 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
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
Changes:
* Split patty_ax25_frame_decode() into the following:
- patty_ax25_frame_decode_address()
- patty_ax25_frame_decode_control()
This allows for look up an established socket for a given address
pair, to determine if an SABME session is in progress,
necessitating modulo-128 control decoding
* Decode I and S N(R), N(S) sequence numbers, poll/final
bits properly in both modulo-8 and modulo-128 mode
* Perform better frame control validation
* Implement the following functions in src/sock.c:
- patty_ax25_sock_send_rr()
- patty_ax25_sock_send_rnr()
- patty_ax25_sock_send_rej()
- patty_ax25_sock_send_srej()
Corresponding functions have been removed from src/server.c
* Implement better functions in src/sock.c for encoding frame
control, with send/receive sequences associated with the socket,
with modulo-128 encoding for SABME sessions
Other changes:
* Move or delete macros from include/patty/ax25/macros.h into
include/patty/ax25.h and include/patty/ax25/frame.h
* Move definitions from include/patty/ax25/proto.h to header file
include/patty/ax25.h
* Perform better bounds checking while decoding frames
* Improve frame control printing in src/print.c; display frame
type names, N(R), (NS) sequence numbers, and poll/final bits
Move raw frame interface capture to patty_ax25_if, patty_ax25_sock; this
resolves the issue wherein only bytes received, not sent, would be
captured by a raw socket bound to a specific interface with setsockopt()