Commit graph

28 commits

Author SHA1 Message Date
XANTRONIX Development
8b741cadc8 Remove patty_ax25_sock_mode_set() 2024-03-01 00:20:46 -05:00
XANTRONIX Development
052c7d94d0 Implement functions for setting params on sockets
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
2024-03-01 00:20:46 -05:00
XANTRONIX Development
a4f50d6bea Add Classes of Procedures, HDLC params to sockets
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
2024-03-01 00:20:46 -05:00
XANTRONIX Development
87a9f1eb3f Fix sequencing issues with SABM vs SABME sockets 2024-03-01 00:20:46 -05:00
XANTRONIX Development
e95994bf19 Implement patty_ax25_sock_send_xid()
Implement patty_ax25_sock_send_xid() to send the current socket
parameters to a remote peer
2024-03-01 00:20:46 -05:00
XANTRONIX Development
92ff180d57 Use bigger defaults for session parameters
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
2024-03-01 00:20:46 -05:00
XANTRONIX Development
5e1d74c971 Rename 'flag' arguments to 'pf' in sock methods 2024-03-01 00:20:46 -05:00
XANTRONIX Development
a722b8f9b3 Better implementation of AX.25 v2.2 default params 2024-03-01 00:20:46 -05:00
XANTRONIX Development
a638966486 Add peer parameter flags to patty_ax25_sock 2024-03-01 00:20:46 -05:00
XANTRONIX Development
7715a8c070 Implement variable size sock frame slots 2024-03-01 00:20:46 -05:00
XANTRONIX Development
c26c7509f4 Implement ring buffer for sock sent frames
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
2024-03-01 00:20:46 -05:00
XANTRONIX Development
9066fe10da Implement better handling of command/response bits
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
2024-03-01 00:20:46 -05:00
XANTRONIX Development
a4518a839a Implement better modulo-128 I and S frame support
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
2024-03-01 00:20:46 -05:00
XANTRONIX Development
a7cab09e47 Handle incrementing seq_send elsewhere 2024-03-01 00:20:46 -05:00
XANTRONIX Development
0bfd5795ad Do a slightly better job handling sock control fields 2024-03-01 00:20:46 -05:00
XANTRONIX Development
84ae427037 Move raw frame capture to patty_ax25_if
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()
2024-03-01 00:20:46 -05:00
XANTRONIX Development
8d24566e83 Implement generalized enumerate types; REJ reply 2024-03-01 00:20:46 -05:00
XANTRONIX Development
ab2c283542 Refactor socket(), openif() as setsockopt()
Other changes:

    * Fix blocking on disconnects when a raw socket is bound to an
      interface
2024-03-01 00:20:46 -05:00
XANTRONIX Development
c6aac035e1 Add proto arg to patty_ax25_sock_new()
Other changes:

    * Remove proto arg from patty_ax25_sock_send() and
      patty_ax25_sock_write(); instead, use the proto member of
      patty_ax25_sock
2024-03-01 00:20:46 -05:00
XANTRONIX Development
085ac4e650 Implement missing functions in src/sock.c
Implement the following missing functions in src/sock.c:

    * patty_ax25_sock_pty()

    * patty_ax25_sock_bind_if()
2024-03-01 00:20:46 -05:00
XANTRONIX Development
484e68e417 Remove commented cruft from src/sock.c 2024-03-01 00:20:46 -05:00
XANTRONIX Development
22bf692a61 SO BLOODY CLOSE 2024-03-01 00:20:46 -05:00
XANTRONIX Development
255e15fb7b Minor formatting foibles 2024-03-01 00:20:46 -05:00
XANTRONIX Development
b9c3568c43 This is a slog with no real end 2024-03-01 00:20:46 -05:00
XANTRONIX Development
4478241319 I'm in a world of hurt 2024-03-01 00:20:46 -05:00
XANTRONIX Development
d983672619 Fix address writing 2024-03-01 00:20:46 -05:00
XANTRONIX Development
bdb73c8805 Making significant headway towards a working server 2024-03-01 00:20:46 -05:00
XANTRONIX Development
4aced9e9c1 ...I've been busy. 2024-03-01 00:20:46 -05:00