dect
/
dectmon
Archived
13
0
Fork 0

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>
This commit is contained in:
Patrick McHardy 2010-11-21 12:09:52 +01:00
parent d23e627b50
commit 42aff744b9
12 changed files with 57 additions and 38 deletions

17
include/audio.h Normal file
View File

@ -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 */

View File

@ -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 */

8
include/dsc.h Normal file
View File

@ -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 */

11
include/ops.h Normal file
View File

@ -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 */

12
include/raw.h Normal file
View File

@ -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 */

View File

@ -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,

View File

@ -12,6 +12,7 @@
#include <linux/byteorder/little_endian.h>
#include <dectmon.h>
#include <dsc.h>
#define R1_LEN 17
#define R2_LEN 19

View File

@ -9,6 +9,7 @@
#include <dect/libdect.h>
#include <dectmon.h>
#include <ops.h>
/*
* LLME Ops

View File

@ -13,6 +13,7 @@
#include <dect/libdect.h>
#include <dectmon.h>
#include <ops.h>
struct io_event {
const struct dect_handle *dh;

View File

@ -16,6 +16,7 @@
#include <dectmon.h>
#include <phl.h>
#include <mac.h>
#include <dsc.h>
#define BITS_PER_BYTE 8

View File

@ -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

View File

@ -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] = {