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:
parent
d23e627b50
commit
42aff744b9
|
@ -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 */
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
|
@ -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 */
|
|
@ -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 */
|
|
@ -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,
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <linux/byteorder/little_endian.h>
|
||||
|
||||
#include <dectmon.h>
|
||||
#include <dsc.h>
|
||||
|
||||
#define R1_LEN 17
|
||||
#define R2_LEN 19
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <dect/libdect.h>
|
||||
#include <dectmon.h>
|
||||
#include <ops.h>
|
||||
|
||||
/*
|
||||
* LLME Ops
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <dect/libdect.h>
|
||||
#include <dectmon.h>
|
||||
#include <ops.h>
|
||||
|
||||
struct io_event {
|
||||
const struct dect_handle *dh;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <dectmon.h>
|
||||
#include <phl.h>
|
||||
#include <mac.h>
|
||||
#include <dsc.h>
|
||||
|
||||
#define BITS_PER_BYTE 8
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in New Issue