Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compilation issues #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/phy/tetra_burst_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <tetra_tdma.h>
#include <phy/tetra_burst_sync.h>

struct tetra_phy_state t_phy_state;

void tetra_burst_rx_cb(const uint8_t *burst, unsigned int len, enum tetra_train_seq type, void *priv);

Expand Down Expand Up @@ -113,7 +112,7 @@ int tetra_burst_sync_in(struct tetra_rx_state *trs, uint8_t *bits, unsigned int
/* we have successfully received (at least) one frame */
tetra_tdma_time_add_tn(&t_phy_state.time, 1);
printf("\nBURST");
DEBUGP(": %s", ubit_dump(trs->bitbuf, TETRA_BITS_PER_TS));
//DEBUGP(": %s", ubit_dump(trs->bitbuf, TETRA_BITS_PER_TS));
printf("\n");

/* log the burst frames. useful for scanning etc --sq5bpf */
Expand Down
19 changes: 19 additions & 0 deletions src/tetra_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,22 @@ void tetra_mac_state_init(struct tetra_mac_state *tms)
{
INIT_LLIST_HEAD(&tms->voice_channels);
}

struct tetra_hack_struct tetra_hack_db[HACK_NUM_STRUCTS];
int tetra_hack_live_socket;
struct sockaddr_in tetra_hack_live_sockaddr;
int tetra_hack_socklen;
int tetra_hack_live_idx;
int tetra_hack_live_lastseen;
int tetra_hack_rxid;
uint32_t tetra_hack_dl_freq, tetra_hack_ul_freq;
uint16_t tetra_hack_la;
uint8_t tetra_hack_freq_band;
uint8_t tetra_hack_freq_offset;
struct fragslot fragslots[FRAGSLOT_NR_SLOTS];
int tetra_hack_reassemble_fragments;
int tetra_hack_all_sds_as_text;
int tetra_hack_allow_encrypted;
struct tetra_phy_state t_phy_state;

int tetra_hack_reassemble_fragments;
30 changes: 15 additions & 15 deletions src/tetra_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,22 @@ struct tetra_hack_struct {
int seen; //czy juz to widzielismy
};

struct tetra_hack_struct tetra_hack_db[HACK_NUM_STRUCTS];
extern struct tetra_hack_struct tetra_hack_db[HACK_NUM_STRUCTS];


int tetra_hack_live_socket;
struct sockaddr_in tetra_hack_live_sockaddr;
int tetra_hack_socklen;
extern int tetra_hack_live_socket;
extern struct sockaddr_in tetra_hack_live_sockaddr;
extern int tetra_hack_socklen;

int tetra_hack_live_idx;
int tetra_hack_live_lastseen;
int tetra_hack_rxid;
extern int tetra_hack_live_idx;
extern int tetra_hack_live_lastseen;
extern int tetra_hack_rxid;

uint32_t tetra_hack_dl_freq, tetra_hack_ul_freq;
uint16_t tetra_hack_la;
extern uint32_t tetra_hack_dl_freq, tetra_hack_ul_freq;
extern uint16_t tetra_hack_la;

uint8_t tetra_hack_freq_band;
uint8_t tetra_hack_freq_offset;
extern uint8_t tetra_hack_freq_band;
extern uint8_t tetra_hack_freq_offset;

#define FRAGSLOT_MSGB_SIZE 8192
#define FRAGSLOT_NR_SLOTS 5
Expand All @@ -84,14 +84,14 @@ struct fragslot {
int encryption;
};

struct fragslot fragslots[FRAGSLOT_NR_SLOTS]; /* slots are 1-4 but sometimes slot==0 */
extern struct fragslot fragslots[FRAGSLOT_NR_SLOTS]; /* slots are 1-4 but sometimes slot==0 */


#define N203 6 /* see N.203 in the tetra docs, should be 4 or greater */

int tetra_hack_reassemble_fragments;
int tetra_hack_all_sds_as_text;
int tetra_hack_allow_encrypted;
extern int tetra_hack_reassemble_fragments;
extern int tetra_hack_all_sds_as_text;
extern int tetra_hack_allow_encrypted;

/* end tetra hack --sq5bpf */

Expand Down