mirror of
https://github.com/brmlab/osmo-tetra.git
synced 2025-06-07 17:34:10 +02:00
fixed warnings from compiler findings
- added missing header definition for tun_alloc - added missing switch cases -> fixed by TODO/FIXME comment
This commit is contained in:
parent
42dead06be
commit
dafde94bfe
5 changed files with 36 additions and 2 deletions
|
@ -306,8 +306,11 @@ int build_sb()
|
|||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int err, i;
|
||||
int i;
|
||||
#if 0
|
||||
int err;
|
||||
uint16_t out;
|
||||
#endif
|
||||
uint32_t ret;
|
||||
|
||||
/* first: run some subsystem tests */
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <tetra_common.h>
|
||||
#include <lower_mac/tetra_conv_enc.h>
|
||||
|
||||
#if 0
|
||||
static char *dump_state(struct conv_enc_state *ces)
|
||||
{
|
||||
static char pbuf[1024];
|
||||
|
@ -38,6 +39,7 @@ static char *dump_state(struct conv_enc_state *ces)
|
|||
ces->delayed[1], ces->delayed[2], ces->delayed[3]);
|
||||
return pbuf;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Mother code according to Section 8.2.3.1.1 */
|
||||
static uint8_t conv_enc_in_bit(struct conv_enc_state *ces, uint8_t bit, uint8_t *out)
|
||||
|
|
|
@ -314,6 +314,10 @@ void tetra_burst_rx_cb(const uint8_t *burst, unsigned int len, enum tetra_train_
|
|||
uint8_t ndbf_buf[2*NDB_BLK_BITS];
|
||||
|
||||
switch (type) {
|
||||
case TETRA_TRAIN_EXT:
|
||||
// TODO: currently not handled!
|
||||
// FIXME
|
||||
break;
|
||||
case TETRA_TRAIN_SYNC:
|
||||
/* Split SB1, SB2 and Broadcast Block */
|
||||
/* send three parts of the burst via TP-SAP into lower MAC */
|
||||
|
@ -321,6 +325,10 @@ void tetra_burst_rx_cb(const uint8_t *burst, unsigned int len, enum tetra_train_
|
|||
tp_sap_udata_ind(TPSAP_T_BBK, burst+SB_BBK_OFFSET, SB_BBK_BITS, priv);
|
||||
tp_sap_udata_ind(TPSAP_T_SB2, burst+SB_BLK2_OFFSET, SB_BLK2_BITS, priv);
|
||||
break;
|
||||
case TETRA_TRAIN_NORM_3:
|
||||
// TODO: currently not handled!
|
||||
// FIXME
|
||||
break;
|
||||
case TETRA_TRAIN_NORM_2:
|
||||
/* re-combine the broadcast block */
|
||||
memcpy(bbk_buf, burst+NDB_BBK1_OFFSET, NDB_BBK1_BITS);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <osmocom/core/bits.h>
|
||||
|
||||
#include "tetra_llc_pdu.h"
|
||||
#include "tuntap.h"
|
||||
|
||||
static int tun_fd = -1;
|
||||
|
||||
|
@ -78,7 +79,7 @@ static int tllc_defrag_in(struct tllc_state *llcs,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int tllc_defrag_out(struct tllc_state *llcs,
|
||||
static void tllc_defrag_out(struct tllc_state *llcs,
|
||||
struct tetra_llc_pdu *lpp)
|
||||
{
|
||||
struct tllc_defrag_q_e *dqe;
|
||||
|
@ -147,6 +148,18 @@ int rx_tm_sdu(struct msgb *msg, unsigned int len)
|
|||
/* check if the fragment is complete and hand it off*/
|
||||
tllc_defrag_out(&g_llcs, &lpp);
|
||||
break;
|
||||
case TLLC_PDUT_DEC_UNKNOWN:
|
||||
// TODO: currently not handled!
|
||||
// FIXME
|
||||
break;
|
||||
case TLLC_PDUT_DEC_ALX_ACK:
|
||||
// TODO: currently not handled!
|
||||
// FIXME
|
||||
break;
|
||||
case TLLC_PDUT_DEC_ALX_RNR:
|
||||
// TODO: currently not handled!
|
||||
// FIXME
|
||||
break;
|
||||
}
|
||||
|
||||
if (lpp.tl_sdu && lpp.ss == 0) {
|
||||
|
|
8
src/tuntap.h
Normal file
8
src/tuntap.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef TUNTAP_H
|
||||
#define TUNTAP_H
|
||||
|
||||
/* Allocate a tun interface */
|
||||
int tun_alloc(char *dev);
|
||||
|
||||
|
||||
#endif /* TUNTAP_H */
|
Loading…
Add table
Add a link
Reference in a new issue