Commit graph

600 commits

Author SHA1 Message Date
XANTRONIX Development
8a5a2a7c31 Add LICENSE 2024-10-31 10:50:50 -04:00
XANTRONIX Development
2222f2052a Switch to gettimeofday() from clock_gettime()
Switch to gettimeofday() from clock_gettime() for portability with older
versions of Mac OS X
2024-10-13 22:48:49 -04:00
XANTRONIX Development
05ee17a9fc Use GNU struct pack/align attribute 2024-10-13 22:47:57 -04:00
XANTRONIX Development
22e1f5b3e8 Remove unnecessary forward declaration 2024-10-13 22:45:57 -04:00
XANTRONIX Development
b9a1c0b73d Fix argument parsing bug in pattyd(8) 2024-03-01 00:20:47 -05:00
XANTRONIX Development
b5f31264ac Support routes via interfaces without hops 2024-03-01 00:20:47 -05:00
XANTRONIX Development
595a58f32a Add access() test to KISS device configuration
Add access() test to KISS device configuration, providing a formatted
error message to present upon failure
2024-03-01 00:20:47 -05:00
XANTRONIX Development
d2fc96a777 Once again, fix linker flag placement 2024-03-01 00:20:47 -05:00
XANTRONIX Development
6ff6ae3ef7 Slightly more compact 2024-03-01 00:20:47 -05:00
XANTRONIX Development
615ec140e8 Remove irrelevant doc/NOTES 2024-03-01 00:20:47 -05:00
XANTRONIX Development
25da758257 Implement patty_strlcpy()
Implement patty_strlcpy() for portability and correctness, to provide
BSD strlcpy() functionality for glibc systems while ensuring a nul
terminated string is written to a destination, truncating the source
string by one byte if need be to make room for the nul terminator
2024-03-01 00:20:47 -05:00
XANTRONIX Development
4722c859b6 Change linker flag argument order 2024-03-01 00:20:47 -05:00
XANTRONIX Development
ba1e3f049c Replace LLFLAGS with LDFLAGS_SO 2024-03-01 00:20:47 -05:00
XANTRONIX Development
cc94d615ec Use CFLAGS_ prefix for CFLAGS sub-parts 2024-03-01 00:20:47 -05:00
XANTRONIX Development
f80cc4055f Implement interface resetting
Changes:

    * Implement patty_ax25_if_reset() to allow pattyd(8) to attempt to
      reset the network interface in the event of an I/O error

    * Move existing link resetting code in src/aprs_is.c to
      patty_ax25_aprs_is_reset(); allow src/server.c to call this rather
      than within src/aprs_is.c itself

    * Implement patty_kiss_tnc_reset(); this simply sets errno to ENOSYS
      and returns -1 for the time being
2024-03-01 00:20:47 -05:00
XANTRONIX Development
021eca720d Search for patty.sock in ax25dump(8), tncd(8)
Changes:

    * Modify patty_client_new() to accept NULL as a Unix domain socket
      path; when NULL is provided, search for the pattyd(8) socket in
      pattyd.sock, followed by the default full socket path,
      /var/run/patty/patty.sock

    * Modify bin/ax25dump.c, bin/tncd.c to use default socket paths when
      calling patty_client_new() by defaulting to NULL when no -s flag
      is provided
2024-03-01 00:20:47 -05:00
XANTRONIX Development
1ca11de03f Use intptr_t, not int64_t, for pointer->int casts 2024-03-01 00:20:47 -05:00
XANTRONIX Development
c359682928 Use %zx specifier in patty_print_hexdump() 2024-03-01 00:20:47 -05:00
XANTRONIX Development
b05202e9bf Use size_t for length in patty_list 2024-03-01 00:20:47 -05:00
XANTRONIX Development
00879d33c5 Fix strncpy() compilation warnings
Fix strncpy() compilation warnings wherein the target string length did
not account for a nul terminator
2024-03-01 00:20:47 -05:00
XANTRONIX Development
58d9a37786 Don't include patty/ax25.h in includes 2024-03-01 00:20:47 -05:00
XANTRONIX Development
dacfa282e7 Prevent #include loop in include/ax25/aprs_is.h 2024-03-01 00:20:47 -05:00
XANTRONIX Development
6a18811b04 Make patty/client.h types opaque 2024-03-01 00:20:47 -05:00
XANTRONIX Development
4f2f01ec0a Refactor patty_kiss_tnc_new()
Refactor patty_kiss_tnc_new() into the following initialization methods:

    * init_sock()
    * init_device()
    * init_termios()
2024-03-01 00:20:47 -05:00
XANTRONIX Development
ab3679b788 Die when too many arguments are given to ax25dump 2024-03-01 00:20:47 -05:00
XANTRONIX Development
7fdf3a8416 More argument parsing fixes 2024-03-01 00:20:47 -05:00
XANTRONIX Development
6942af9832 Slight tweaks to argument parsing 2024-03-01 00:20:47 -05:00
XANTRONIX Development
379264a956 Use getopt_long() in bin/tncd.c 2024-03-01 00:20:47 -05:00
XANTRONIX Development
535e71c472 Use getopt_long() in bin/ax25dump.c
Use getopt_long() in bin/ax25dump.c to accept Unix domain socket and
interface name arguments for dumping packets from a connected pattyd(8)
process
2024-03-01 00:20:47 -05:00
XANTRONIX Development
4fb64760b6 Change names of sock, PID file #defines
Change names of sock, PID file #defines in include/patty/daemon.h
2024-03-01 00:20:47 -05:00
XANTRONIX Development
a672b4e44a Use heap-allocated buffer in ax25dump(8) 2024-03-01 00:20:47 -05:00
XANTRONIX Development
5b59b163d2 Bring interfaces down when an error is encountered
Modify src/server.c to bring interfaces down when an I/O error is
encountered
2024-03-01 00:20:47 -05:00
XANTRONIX Development
8e118a3b56 Implement interface statuses in src/if.c
Implement interface statuses in src/if.c to represent interfaces that
are down, up, or in an erroneous condition
2024-03-01 00:20:47 -05:00
XANTRONIX Development
6148977adf Fix bug parsing KISS frames not for port 0
Fix bug parsing KISS frames not for port 0 in patty_kiss_tnc_drain();
furthermore, ensure frames are only handled when they are indeed for
port 0
2024-03-01 00:20:47 -05:00
XANTRONIX Development
14354337cc Ensure dropped packets are not counted as RXed
Ensure dropped packets are not counted as RXed in the following
interface drivers:

    * src/tnc.c
    * src/aprs_is.c
2024-03-01 00:20:47 -05:00
XANTRONIX Development
f127bd2fc2 Track received frames, bytes in src/aprs_is.c 2024-03-01 00:20:47 -05:00
XANTRONIX Development
986f329dd7 Track received frames, bytes in src/tnc.c 2024-03-01 00:20:47 -05:00
XANTRONIX Development
59fce6bdf9 Track sent frames, bytes in src/aprs_is.c 2024-03-01 00:20:47 -05:00
XANTRONIX Development
1e3d919fd5 Track dropped frames in src/aprs_is.c 2024-03-01 00:20:47 -05:00
XANTRONIX Development
675e6cf727 Implement patty_ax25_if_addr_set()
Changes:

    * Remove the initial address argument from patty_ax25_if_new()

    * Implement patty_ax25_if_addr_set() to set the AX.25 address of an
      interface at any time
2024-03-01 00:20:47 -05:00
XANTRONIX Development
7415ef8573 Add arg names to functions in patty/ax25/aprs_is.h 2024-03-01 00:20:47 -05:00
XANTRONIX Development
2b931ec357 Implement patty_ax25_if_ready()
Implement patty_ax25_if_ready() to provide a means of testing an
interface's readiness for performing I/O; this may also be used in the
future for some interface drivers which may require occasional keepalive
timers to maintain a link
2024-03-01 00:20:47 -05:00
XANTRONIX Development
4604cccdb4 Rename patty_ax25_sock_assembler_ready()
Rename patty_ax25_sock_assembler_ready() to assembler_pending() to
better fit naming conventions; ready() is meant more for "does this
channel have any I/O readiness conditions", whereas pending() is best
suited for "does this state machine have a frame pending receipt"
2024-03-01 00:20:47 -05:00
XANTRONIX Development
80469ac535 Rename patty_ax25_if_ready() to if_pending()
Rename patty_ax25_if_ready() to if_pending() in src/if.c, as well as in
each driver implementing this method and any direct invocations of said
driver methods
2024-03-01 00:20:47 -05:00
XANTRONIX Development
b97b927e0c Remove unused patty_ax25_if_pending()
Remove unused patty_ax25_if_pending() from src/if.c, as well as from all
drivers implementing this method
2024-03-01 00:20:47 -05:00
XANTRONIX Development
50d0af3f35 Remove unused patty_ax25_sock_recv_pending() 2024-03-01 00:20:47 -05:00
XANTRONIX Development
92164908aa Remove declaration of unimplemented method
Remove declaration of unimplemented method from include/patty/kiss/tnc.h
2024-03-01 00:20:47 -05:00
XANTRONIX Development
530d2a4555 Add bin/tncd.8 2024-03-01 00:20:47 -05:00
XANTRONIX Development
65ae821342 Re-establish broken APRS-IS connections
Re-establish broken APRS-IS connections in src/aprs_is.c; when read() or
write() sets errno to EIO, attempt at most 3 times to re-establish the
APRS-IS connection per read()/write() failure; if the maximum number of
attempts is met, the I/O operation is considered a total failure
2024-03-01 00:20:47 -05:00
XANTRONIX Development
88743a5754 Decouple interface names from patty_ax25_if
Changes:

    * Remove interface name argument from patty_ax25_if_new()

    * Add interface name argument to patty_ax25_server_if_add()

    * Add interface name argument to patty_daemon_if_add()

    * In src/server.c, implement 'struct if_entry' to hold the interface
      name, file descriptor, and pointer to a patty_ax25_if object, to
      recouple names to their respective interfaces

    * Add a return argument to patty_bin_if_create() to store a pointer
      to a new interface name created from a declaration
2024-03-01 00:20:47 -05:00