This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Kévin Redon gerrit-no-reply at lists.osmocom.orgKévin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/9872 Change subject: USB device: add USB message structure for sniffer communication ...................................................................... USB device: add USB message structure for sniffer communication Change-Id: Id2c6f32ade2fec9b9ef91bd8c5e1fd195f2d7351 --- M firmware/libcommon/include/simtrace_prot.h 1 file changed, 52 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/72/9872/1 diff --git a/firmware/libcommon/include/simtrace_prot.h b/firmware/libcommon/include/simtrace_prot.h index 189264d..a43ac72 100644 --- a/firmware/libcommon/include/simtrace_prot.h +++ b/firmware/libcommon/include/simtrace_prot.h @@ -1,7 +1,3 @@ -#pragma once - -#include <stdint.h> - /* SIMtrace2 USB protocol */ /* (C) 2015-2017 by Harald Welte <hwelte at hmw-consulting.de> @@ -21,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ +#pragma once + +#include <stdint.h> +#include <stdbool.h> /*********************************************************************** * COMMON HEADER @@ -32,8 +32,8 @@ SIMTRACE_MSGC_CARDEM, /* Modem Control (if modem is attached next to device) */ SIMTRACE_MSGC_MODEM, - /* SIM protocol tracing */ - SIMTRACE_MSGC_TRACE, + /* Reader/phone-car/SIM communication sniff */ + SIMTRACE_MSGC_SNIFF, /* first vendor-specific request */ _SIMTRACE_MGSC_VENDOR_FIRST = 127, @@ -74,10 +74,18 @@ SIMTRACE_MSGT_BD_MODEM_STATUS, }; -/* SIMTRACE_MSGC_TRACE */ -enum simtrace_msg_type_trace { - /* FIXME */ - _dummy, +/* SIMTRACE_MSGC_SNIFF */ +enum simtrace_msg_type_sniff { + /* Status change (card inserted, reset, ...) */ + SIMTRACE_MSGT_SNIFF_CHANGE = 0, + /* Fi/Di baudrate change */ + SIMTRACE_MSGT_SNIFF_FIDI, + /* ATR data */ + SIMTRACE_MSGT_SNIFF_ATR, + /* PPS (request or response) data */ + SIMTRACE_MSGT_SNIFF_PPS, + /* TPDU data */ + SIMTRACE_MSGT_SNIFF_TPDU, }; /* common message header */ @@ -92,7 +100,7 @@ } __attribute__ ((packed)); /*********************************************************************** - * CARD EMULATOR / FORWARDER + * Capabilities ***********************************************************************/ /* generic capabilities */ @@ -137,7 +145,6 @@ SIMTRACE_CAP_SYSMO_QMOD_RESET_HUB, }; - /* SIMTRACE_CMD_BD_BOARD_INFO */ struct simtrace_board_info { struct { @@ -276,3 +283,36 @@ /* bit-field of changed status bits */ uint8_t changed_mask; } __attribute__((packed)); + +/*********************************************************************** + * SNIFF + ***********************************************************************/ + +/* SIMTRACE_MSGT_SNIFF_CHANGE flags */ +#define SNIFF_CHANGE_FLAG_CARD_INSERT (1<<0) +#define SNIFF_CHANGE_FLAG_CARD_EJECT (1<<1) +#define SNIFF_CHANGE_FLAG_RESET_HOLD (1<<2) +#define SNIFF_CHANGE_FLAG_RESET_RELEASE (1<<3) +#define SNIFF_CHANGE_FLAG_TIMEOUT_WT (1<<4) + +/* SIMTRACE_MSGT_SNIFF_CHANGE */ +struct sniff_change { + /* SIMTRACE_MSGT_SNIFF_CHANGE flags */ + uint32_t flags; +} __attribute__ ((packed)); + +/* SIMTRACE_MSGT_SNIFF_FIDI */ +struct sniff_fidi { + /* Fi/Di values as encoded in TA1 */ + uint8_t fidi; +} __attribute__ ((packed)); + +/* SIMTRACE_MSGT_SNIFF_ATR, SIMTRACE_MSGT_SNIFF_PPS, SIMTRACE_MSGT_SNIFF_TPDU */ +struct sniff_data { + /* if the data is complete (an error might have occurred during transmission */ + bool complete; + /* data length */ + uint16_t length; + /* data */ + uint8_t data[0]; +} __attribute__ ((packed)); -- To view, visit https://gerrit.osmocom.org/9872 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id2c6f32ade2fec9b9ef91bd8c5e1fd195f2d7351 Gerrit-Change-Number: 9872 Gerrit-PatchSet: 1 Gerrit-Owner: Kévin Redon <kredon at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180704/d0e57bb8/attachment.htm>