sniffer functionality fixed buffer

It is possible to use sniffer.py to sniff the phone-simcard-communication.

To be fixed: The buffer size read is fixed and the data is only send
over USB if the buffer max length is reached. which means we don not
get the last bytes of the transaction.
This should be changed in one of the next commits. Maybe the former
simtrace code can give some inspiration on this topic.
This commit is contained in:
Christina Quast
2015-03-02 16:14:09 +01:00
parent cafde00218
commit 4ba4d2230b
4 changed files with 70 additions and 15 deletions

View File

@@ -1,6 +1,19 @@
#ifndef SIMTRACE_H
#define SIMTRACE_H
/* Endpoint numbers */
#define DATAOUT 1
#define DATAIN 2
#define INT 3
#define BUFLEN 64
typedef struct ring_buffer
{
uint8_t buf[BUFLEN*2]; // data buffer
uint8_t idx; // number of items in the buffer
} ring_buffer;
enum confNum {
CFG_NUM_SNIFF = 1, CFG_NUM_PHONE, CFG_NUM_MITM, NUM_CONF
};