diff --git a/include/patty/ax25.h b/include/patty/ax25.h index bea2060..4adb262 100644 --- a/include/patty/ax25.h +++ b/include/patty/ax25.h @@ -8,7 +8,8 @@ #include #include -#include +typedef struct _patty_ax25 patty_ax25; + #include #include #include @@ -68,7 +69,7 @@ typedef struct _patty_ax25_event { patty_ax25_sock * sock; } patty_ax25_event; -struct _patty_ax25 { +typedef struct _patty_ax25 { patty_list * ifaces; patty_list * socks; @@ -83,7 +84,7 @@ struct _patty_ax25 { patty_dict * fd_lookup; int fd; int current; -}; +} patty_ax25; int patty_ax25_init(patty_ax25 *ax25); diff --git a/include/patty/ax25/defs.h b/include/patty/ax25/defs.h deleted file mode 100644 index 76c6d57..0000000 --- a/include/patty/ax25/defs.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _PATTY_AX25_DEFS_H -#define _PATTY_AX25_DEFS_H - -#include - -#include -#include - -typedef struct _patty_ax25_stats { - size_t rx; - size_t tx; - size_t dropped; -} patty_ax25_stats; - -typedef struct _patty_ax25 patty_ax25; - -#endif /* _PATTY_AX25_DEFS_H */ diff --git a/include/patty/ax25/if.h b/include/patty/ax25/if.h index 09cd200..84f5a03 100644 --- a/include/patty/ax25/if.h +++ b/include/patty/ax25/if.h @@ -20,9 +20,17 @@ enum patty_ax25_if_type { PATTY_AX25_IF_SOFT_TNC = 0x10 }; +typedef struct _patty_ax25_if_stats { + size_t rx_frames, + tx_frames, + rx_bytes, + tx_bytes, + dropped; +} patty_ax25_if_stats; + typedef struct _patty_ax25_if { enum patty_ax25_if_type type; - patty_ax25_stats stats; + patty_ax25_if_stats stats; char name[8]; diff --git a/include/patty/ax25/stats.h b/include/patty/ax25/stats.h deleted file mode 100644 index 1355092..0000000 --- a/include/patty/ax25/stats.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _PATTY_AX25_STATS_H -#define _PATTY_AX25_STATS_H - -#include - -typedef struct _patty_ax25_stats { - size_t frame_tx; - size_t frame_rx; - size_t frame_drop; -} patty_ax25_stats; - -#endif /* _PATTY_AX25_STATS_H */