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
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
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
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
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
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"
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
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
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
Attempt to set raw attributes on new socket PTYs to fix an issue on
Linux wherein any data written to a socket before the PTY subordinate
has been opened would be looped back in canonical mode, causing
frame errors; if tcsetattr() fails (usually on a non-Linux platform),
set errno to 0
Fix invalid return in patty_ax25_aprs_is_send() wherein the number of
bytes written to APRS-IS was returned, rather than the number of AX.25
packet bytes; the number of bytes read is the more important value as it
is used later for repeating the frame to promiscuous mode SOCK_RAW
sockets