Commit graph

34 commits

Author SHA1 Message Date
XANTRONIX Development
5a64ea15d3 Don't send TX I len, TX window in XID frames
Don't send TX I len, TX window in XID frames, as the only relevant
information the peer can action upon is the originating station's
RX parameters
2024-03-01 00:20:46 -05:00
XANTRONIX Development
afbaeea95e Implement patty_ax25_frame_encode_xid()
Implement patty_ax25_frame_encode_xid() to encode a patty_ax25_params
object into a buffer to be used as an Information field
2024-03-01 00:20:46 -05:00
XANTRONIX Development
6911a59455 Rename patty_ax25_params 'found' to 'flags' 2024-03-01 00:20:46 -05:00
XANTRONIX Development
1fbf09c9ba Refactor parameter decoding/display
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
2024-03-01 00:20:46 -05:00
XANTRONIX Development
c7410cb2a4 Refactor patty_ax25_frame_decode_xid()
Refactor patty_ax25_frame_decode_xid() to support the remote possibility
of multiple ISO 8885 groups
2024-03-01 00:20:46 -05:00
XANTRONIX Development
708d347e14 Fix bad logic parsing XID parameters 2024-03-01 00:20:46 -05:00
XANTRONIX Development
18134dde49 Implement patty_ax25_frame_decode_xid()
Implement patty_ax25_frame_decode_xid() to decode XID frame data,
adhering to the basic structure of ISO 8885 as closely as possible
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
7fd05f607a Huh, I managed to make something nice 2024-03-01 00:20:46 -05:00
XANTRONIX Development
d5ee0c7a9e No need to make a big fuss 2024-03-01 00:20:46 -05:00
XANTRONIX Development
a6666b4de4 Don't need that, either 2024-03-01 00:20:46 -05:00
XANTRONIX Development
4ff1f1a714 Nomenclature is important 2024-03-01 00:20:46 -05:00
XANTRONIX Development
e30f4bfb07 Fix regression decoding control bytes 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
89195bde69 Holy crap, getting deeper and deeper 2024-03-01 00:20:46 -05:00
XANTRONIX Development
b242cf9285 Hmmst, coalescing upon something 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
aa8cd2f350 Trifling in things that matter not 2024-03-01 00:20:46 -05:00
XANTRONIX Development
e8bf46854a Remove that; we won't need to expose this 2024-03-01 00:20:46 -05:00
XANTRONIX Development
0decdda086 Only need one of those memcpy() around 2024-03-01 00:20:46 -05:00
XANTRONIX Development
3759469611 First successful run of src/decode.c 2024-03-01 00:20:46 -05:00
XANTRONIX Development
a8db220bbd Major refactor WIP 2024-03-01 00:20:46 -05:00
XANTRONIX Development
c601e836fd Implement patty_ax25_frame_addressed_to() 2024-03-01 00:20:46 -05:00
XANTRONIX Development
7188a5f194 Rename things more in line with official AX.25 spec 2024-03-01 00:20:46 -05:00
XANTRONIX Development
c3667b08a1 Fix minor AX.25 version detection issue 2024-03-01 00:20:46 -05:00
XANTRONIX Development
4d9c45ad94 Minor changes 2024-03-01 00:20:46 -05:00
XANTRONIX Development
968c0bfd8c Implement patty_ax25_frame_payload() 2024-03-01 00:20:46 -05:00
XANTRONIX Development
e8e1c163a4 Remove naming redundancy in src/frame.c 2024-03-01 00:20:46 -05:00
XANTRONIX Development
dc55a7fc6c Prettification, set errno on errors 2024-03-01 00:20:46 -05:00
XANTRONIX Development
fba41f93df Remove all usages of patty_ax25_frame_format 2024-03-01 00:20:46 -05:00
XANTRONIX Development
71d43b5f11 Nearing the point of implementing an event loop 2024-03-01 00:20:46 -05:00
XANTRONIX Development
6adb4f098b I think that's much nicer 2024-03-01 00:20:46 -05:00
XANTRONIX Development
e5ee036423 This works out better 2015-07-18 12:15:59 -05:00
Renamed from src/ax25.c (Browse further)