summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2010-11-21 12:09:52 +0100
committerPatrick McHardy <kaber@trash.net>2010-11-21 20:04:09 +0100
commit42aff744b9d9fdbd992991d56b1d11e9f4e70d1a (patch)
tree4b002b16f534f4a40461c495a5366f9b79371e07
parentd23e627b50f6b1be2bc9e30ab784cfc1240529ef (diff)
dectmon: split up header files
Split up header files in a more logical fashion to avoid rebuilding the entire tree on each change. Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r--include/audio.h17
-rw-r--r--include/dectmon.h38
-rw-r--r--include/dsc.h8
-rw-r--r--include/ops.h11
-rw-r--r--include/raw.h12
-rw-r--r--src/audio.c1
-rw-r--r--src/dsc.c1
-rw-r--r--src/dummy_ops.c1
-rw-r--r--src/event_ops.c1
-rw-r--r--src/mac.c1
-rw-r--r--src/main.c3
-rw-r--r--src/nwk.c1
12 files changed, 57 insertions, 38 deletions
diff --git a/include/audio.h b/include/audio.h
new file mode 100644
index 0000000..d352a96
--- /dev/null
+++ b/include/audio.h
@@ -0,0 +1,17 @@
+#ifndef _DECTMON_AUDIO_H
+#define _DECTMON_AUDIO_H
+
+#include "../src/ccitt-adpcm/g72x.h"
+
+struct dect_audio_handle {
+ struct g72x_state codec[2];
+ struct dect_msg_buf *queue[2];
+};
+
+extern int dect_audio_init(void);
+extern struct dect_audio_handle *dect_audio_open(void);
+extern void dect_audio_close(struct dect_audio_handle *ah);
+extern void dect_audio_queue(struct dect_audio_handle *ah, unsigned int queue,
+ struct dect_msg_buf *mb);
+
+#endif /* _DECTMON_AUDIO_H */
diff --git a/include/dectmon.h b/include/dectmon.h
index 11999cc..5d48530 100644
--- a/include/dectmon.h
+++ b/include/dectmon.h
@@ -20,13 +20,6 @@ extern const char *auth_pin;
extern uint32_t dumpopts;
extern uint32_t debug_mask;
-struct dect_ops;
-extern int dect_event_ops_init(struct dect_ops *ops);
-extern void dect_event_loop_stop(void);
-extern void dect_event_loop(void);
-extern void dect_event_ops_cleanup(void);
-extern void dect_dummy_ops_init(struct dect_ops *ops);
-
extern void dectmon_log(const char *fmt, ...);
extern void dect_hexdump(const char *prefix, const uint8_t *buf, size_t size);
@@ -128,35 +121,4 @@ struct dect_tbc {
extern void dect_mac_rcv(struct dect_handle *dh, struct dect_msg_buf *mb);
-/* DSC */
-
-extern void dect_dsc_keystream(uint64_t iv, const uint8_t *key,
- uint8_t *output, unsigned int len);
-extern uint64_t dect_dsc_iv(uint32_t mfn, uint8_t framenum);
-
-/* Audio */
-
-#include "../src/ccitt-adpcm/g72x.h"
-
-struct dect_audio_handle {
- struct g72x_state codec[2];
- struct dect_msg_buf *queue[2];
-};
-
-extern int dect_audio_init(void);
-extern struct dect_audio_handle *dect_audio_open(void);
-extern void dect_audio_close(struct dect_audio_handle *ah);
-extern void dect_audio_queue(struct dect_audio_handle *ah, unsigned int queue,
- struct dect_msg_buf *mb);
-
-/* Raw dump */
-
-struct dect_raw_frame_hdr {
- uint8_t len;
- uint8_t slot;
- uint8_t frame;
- uint8_t pad;
- uint32_t mfn;
-};
-
#endif /* _DECTMON_H */
diff --git a/include/dsc.h b/include/dsc.h
new file mode 100644
index 0000000..e7d7d0a
--- /dev/null
+++ b/include/dsc.h
@@ -0,0 +1,8 @@
+#ifndef _DECTMON_DSC_H
+#define _DECTMON_DSC_H
+
+extern void dect_dsc_keystream(uint64_t iv, const uint8_t *key,
+ uint8_t *output, unsigned int len);
+extern uint64_t dect_dsc_iv(uint32_t mfn, uint8_t framenum);
+
+#endif /* _DECTMON_DSC_H */
diff --git a/include/ops.h b/include/ops.h
new file mode 100644
index 0000000..b7422a2
--- /dev/null
+++ b/include/ops.h
@@ -0,0 +1,11 @@
+#ifndef _DECTMON_OPS_H
+#define _DECTMON_OPS_H
+
+struct dect_ops;
+extern int dect_event_ops_init(struct dect_ops *ops);
+extern void dect_event_loop_stop(void);
+extern void dect_event_loop(void);
+extern void dect_event_ops_cleanup(void);
+extern void dect_dummy_ops_init(struct dect_ops *ops);
+
+#endif /* _DECTMON_OPS_H */
diff --git a/include/raw.h b/include/raw.h
new file mode 100644
index 0000000..ed6243d
--- /dev/null
+++ b/include/raw.h
@@ -0,0 +1,12 @@
+#ifndef _DECTMON_RAW_H
+#define _DECTMON_RAW_H
+
+struct dect_raw_frame_hdr {
+ uint8_t len;
+ uint8_t slot;
+ uint8_t frame;
+ uint8_t pad;
+ uint32_t mfn;
+};
+
+#endif /* _DECTMON_RAW_H */
diff --git a/src/audio.c b/src/audio.c
index 60338e2..88c41b8 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -2,6 +2,7 @@
#include <SDL/SDL_audio.h>
#include <dectmon.h>
+#include <audio.h>
#include <utils.h>
void dect_audio_queue(struct dect_audio_handle *ah, unsigned int queue,
diff --git a/src/dsc.c b/src/dsc.c
index 2f008a9..c40aa80 100644
--- a/src/dsc.c
+++ b/src/dsc.c
@@ -12,6 +12,7 @@
#include <linux/byteorder/little_endian.h>
#include <dectmon.h>
+#include <dsc.h>
#define R1_LEN 17
#define R2_LEN 19
diff --git a/src/dummy_ops.c b/src/dummy_ops.c
index 7f5c750..ffd1182 100644
--- a/src/dummy_ops.c
+++ b/src/dummy_ops.c
@@ -9,6 +9,7 @@
#include <dect/libdect.h>
#include <dectmon.h>
+#include <ops.h>
/*
* LLME Ops
diff --git a/src/event_ops.c b/src/event_ops.c
index 75c306b..fbbcbf3 100644
--- a/src/event_ops.c
+++ b/src/event_ops.c
@@ -13,6 +13,7 @@
#include <dect/libdect.h>
#include <dectmon.h>
+#include <ops.h>
struct io_event {
const struct dect_handle *dh;
diff --git a/src/mac.c b/src/mac.c
index 513667a..ca12aa0 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -16,6 +16,7 @@
#include <dectmon.h>
#include <phl.h>
#include <mac.h>
+#include <dsc.h>
#define BITS_PER_BYTE 8
diff --git a/src/main.c b/src/main.c
index 3177668..ec86855 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,7 +14,10 @@
#include <dect/libdect.h>
#include <dect/raw.h>
#include <dectmon.h>
+#include <audio.h>
+#include <raw.h>
#include <cli.h>
+#include <ops.h>
#define DECT_MAX_CLUSTERS 16
#define DECT_LOCK_TIMEOUT 15
diff --git a/src/nwk.c b/src/nwk.c
index 267ee7f..844e487 100644
--- a/src/nwk.c
+++ b/src/nwk.c
@@ -15,6 +15,7 @@
#include <dect/libdect.h>
#include <dect/s_fmt.h>
#include <dectmon.h>
+#include <audio.h>
#include <nwk.h>
static const char * const nwk_msg_types[256] = {