From 82b628524f760e1b2ed979174dcb877cc72067e2 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 26 Aug 2018 11:40:46 +0200 Subject: simtrace2-sniff: Fix build with released libosmocore versions There's still no released libosmocore defining the GSMTAP_TYPE_SIM sub-types (Change-Id: I5bd0dff5a4a90cfe96d9c4f3dec6657e1d85bf7a dated Jul 26, 2018). Let's make sure users don't need an unreleased version of the library if it's only about a few #defines that we can just copy here for backwards compatibility. Change-Id: I2fd9e14873711d60f194bb404420bbfbb0a00f48 --- host/simtrace2-sniff.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'host') diff --git a/host/simtrace2-sniff.c b/host/simtrace2-sniff.c index 368ae60..dddf5cf 100644 --- a/host/simtrace2-sniff.c +++ b/host/simtrace2-sniff.c @@ -51,6 +51,19 @@ #include #include +/* as of August 26, 2018 we don't have any released libosmocore version which includes those + * definitions yet. Let's ensure some backwards compatibility: */ +#ifndef GSMTAP_SIM_APDU +#define GSMTAP_SIM_APDU 0x00 /* APDU data (complete APDU) */ +#define GSMTAP_SIM_ATR 0x01 /* card ATR data */ +#define GSMTAP_SIM_PPS_REQ 0x02 /* PPS request data */ +#define GSMTAP_SIM_PPS_RSP 0x03 /* PPS response data */ +#define GSMTAP_SIM_TPDU_HDR 0x04 /* TPDU command header */ +#define GSMTAP_SIM_TPDU_CMD 0x05 /* TPDU command body */ +#define GSMTAP_SIM_TPDU_RSP 0x06 /* TPDU response body */ +#define GSMTAP_SIM_TPDU_SW 0x07 /* TPDU response trailer */ +#endif + /* transport to a SIMtrace device */ struct st_transport { /* USB */ -- cgit v1.2.3