diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2011-10-30 21:32:40 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2011-10-30 21:32:40 +0100 |
commit | a145d368a12bc43c705ce6f918e61fb2767ff8a5 (patch) | |
tree | 0bcc1e350d1e9d2aa91e01373457b8e908499642 /src/gsmtap.c | |
parent | 9d1af55983088c8d2a7ae6c9beb5599e03f1ec91 (diff) |
gsmtap: Send proper FN & TN
... and adapt gsm1_rx consequently
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/gsmtap.c')
-rw-r--r-- | src/gsmtap.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gsmtap.c b/src/gsmtap.c index 26f3bf4..d3aa6bf 100644 --- a/src/gsmtap.c +++ b/src/gsmtap.c @@ -28,6 +28,8 @@ #include <stdint.h> #include <string.h> +#include <arpa/inet.h> + #include <osmocom/core/msgb.h> #include <osmocom/core/gsmtap.h> #include <osmocom/gmr1/gsmtap.h> @@ -39,7 +41,8 @@ * \param[in] len Length of the l2 data in bytes */ struct msgb * -gmr1_gsmtap_makemsg(uint8_t chan_type, const uint8_t *l2, int len) +gmr1_gsmtap_makemsg(uint8_t chan_type, uint32_t fn, uint8_t tn, + const uint8_t *l2, int len) { struct msgb *msg; struct gsmtap_hdr *gh; @@ -53,11 +56,11 @@ gmr1_gsmtap_makemsg(uint8_t chan_type, const uint8_t *l2, int len) gh->version = GSMTAP_VERSION; gh->hdr_len = sizeof(*gh)/4; gh->type = GSMTAP_TYPE_GMR1_UM; - gh->timeslot = 0; + gh->timeslot = tn; gh->sub_slot = 0; gh->snr_db = 0; gh->signal_dbm = 0; - gh->frame_number = 0; + gh->frame_number = htonl(fn); gh->sub_type = chan_type; gh->antenna_nr = 0; |