From a5fe9be0547e250437bdc6a8b7dd38bdeee9f664 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Fri, 14 Aug 2020 17:37:23 -0400 Subject: [PATCH] Add comments to include/ax25/sock.h functions Add comments to include/ax25/sock.h functions to improve readability --- include/patty/ax25/sock.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/patty/ax25/sock.h b/include/patty/ax25/sock.h index 71ff5f0..6a44f50 100644 --- a/include/patty/ax25/sock.h +++ b/include/patty/ax25/sock.h @@ -138,6 +138,9 @@ typedef struct _patty_ax25_sock { unsigned int hops; } patty_ax25_sock; +/* + * Socket instantiation, destruction and initialization + */ patty_ax25_sock *patty_ax25_sock_new(enum patty_ax25_proto proto, enum patty_ax25_sock_type type); @@ -147,6 +150,9 @@ void patty_ax25_sock_init(patty_ax25_sock *sock); void patty_ax25_sock_reset(patty_ax25_sock *sock); +/* + * Setters for specific parameters + */ void patty_ax25_sock_mtu_set(patty_ax25_sock *sock, size_t mtu); void patty_ax25_sock_ack_set(patty_ax25_sock *sock, time_t ack); @@ -155,6 +161,9 @@ void patty_ax25_sock_window_set(patty_ax25_sock *sock, size_t window); void patty_ax25_sock_retry_set(patty_ax25_sock *sock, size_t retry); +/* + * AX.25 version-specific parameter defaults and negotiation + */ void patty_ax25_sock_params_upgrade(patty_ax25_sock *sock); void patty_ax25_sock_params_max(patty_ax25_sock *sock); @@ -162,6 +171,9 @@ void patty_ax25_sock_params_max(patty_ax25_sock *sock); int patty_ax25_sock_params_negotiate(patty_ax25_sock *sock, patty_ax25_params *params); +/* + * TX/RX buffer allocation + */ int patty_ax25_sock_realloc_bufs(patty_ax25_sock *sock); char *patty_ax25_sock_pty(patty_ax25_sock *sock); @@ -169,10 +181,16 @@ char *patty_ax25_sock_pty(patty_ax25_sock *sock); int patty_ax25_sock_bind_if(patty_ax25_sock *sock, patty_ax25_if *iface); +/* + * Stream-oriented state management + */ void patty_ax25_sock_vs_incr(patty_ax25_sock *sock); void patty_ax25_sock_vr_incr(patty_ax25_sock *sock); +/* + * Socket I/O methods + */ ssize_t patty_ax25_sock_send(patty_ax25_sock *sock, void *buf, size_t len);