Rearrange patty_ax25_sock struct definition
Rearrange patty_ax25_sock struct definition for better readability and cohesion, and for the sake of future documentation
This commit is contained in:
parent
ec9066167b
commit
5ccd2efbda
1 changed files with 47 additions and 25 deletions
|
@ -99,6 +99,9 @@ typedef struct _patty_ax25_sock_assembler {
|
|||
} patty_ax25_sock_assembler;
|
||||
|
||||
typedef struct _patty_ax25_sock {
|
||||
/*
|
||||
* Socket attributes
|
||||
*/
|
||||
enum patty_ax25_proto proto;
|
||||
enum patty_ax25_sock_type type;
|
||||
enum patty_ax25_version version;
|
||||
|
@ -106,6 +109,44 @@ typedef struct _patty_ax25_sock {
|
|||
enum patty_ax25_sock_mode mode;
|
||||
enum patty_ax25_sock_flow flow;
|
||||
|
||||
/*
|
||||
* Network interface, bound addresses and source routing information
|
||||
*/
|
||||
patty_ax25_if *iface;
|
||||
|
||||
patty_ax25_addr local,
|
||||
remote,
|
||||
repeaters[PATTY_AX25_MAX_HOPS];
|
||||
|
||||
int hops;
|
||||
|
||||
/*
|
||||
* Reader for raw packets for PATTY_AX25_SOCK_RAW type
|
||||
*/
|
||||
patty_kiss_tnc *raw;
|
||||
|
||||
/*
|
||||
* File descriptor information
|
||||
*/
|
||||
int fd;
|
||||
char pty[PATTY_AX25_SOCK_PATH_SIZE];
|
||||
|
||||
/*
|
||||
* Transmit and receive buffers
|
||||
*/
|
||||
void *tx_buf,
|
||||
*rx_buf;
|
||||
|
||||
void *tx_slots;
|
||||
|
||||
patty_ax25_sock_assembler *assembler;
|
||||
|
||||
/*
|
||||
* Socket runtime parameter flags and values
|
||||
*/
|
||||
uint32_t flags_classes,
|
||||
flags_hdlc;
|
||||
|
||||
size_t n_maxlen_tx,
|
||||
n_maxlen_rx,
|
||||
n_window_tx,
|
||||
|
@ -113,9 +154,9 @@ typedef struct _patty_ax25_sock {
|
|||
n_ack,
|
||||
n_retry;
|
||||
|
||||
uint32_t flags_classes,
|
||||
flags_hdlc;
|
||||
|
||||
/*
|
||||
* Socket timers
|
||||
*/
|
||||
patty_timer timer_t1,
|
||||
timer_t2,
|
||||
timer_t3;
|
||||
|
@ -123,31 +164,12 @@ typedef struct _patty_ax25_sock {
|
|||
/*
|
||||
* AX.25 v2.2 Section 4.2.4 "Frame Variables and Sequence Numbers"
|
||||
*/
|
||||
unsigned int vs,
|
||||
vr,
|
||||
va;
|
||||
int vs,
|
||||
vr,
|
||||
va;
|
||||
|
||||
size_t retries,
|
||||
rx_pending;
|
||||
|
||||
int fd;
|
||||
char pty[PATTY_AX25_SOCK_PATH_SIZE];
|
||||
|
||||
void *tx_buf,
|
||||
*rx_buf;
|
||||
|
||||
void *tx_slots;
|
||||
|
||||
patty_ax25_sock_assembler *assembler;
|
||||
|
||||
patty_ax25_if *iface;
|
||||
patty_kiss_tnc *raw;
|
||||
|
||||
patty_ax25_addr local,
|
||||
remote,
|
||||
repeaters[PATTY_AX25_MAX_HOPS];
|
||||
|
||||
unsigned int hops;
|
||||
} patty_ax25_sock;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue