From 112fca0df425c18be6fbdad24431c0057e72dc52 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Wed, 27 May 2020 22:03:42 -0400 Subject: [PATCH] Remove unused header files Changes: * Remove patty/ax25/defs.h * Remove patty/ax25/stats.h * Add forward declaration for patty_ax25 to top of patty/ax25.h * Rename patty_ax25_stats to patty_ax25_if_stats, move into patty/ax25/if.h --- include/patty/ax25.h | 7 ++++--- include/patty/ax25/defs.h | 17 ----------------- include/patty/ax25/if.h | 10 +++++++++- include/patty/ax25/stats.h | 12 ------------ 4 files changed, 13 insertions(+), 33 deletions(-) delete mode 100644 include/patty/ax25/defs.h delete mode 100644 include/patty/ax25/stats.h 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 */