diff options
Diffstat (limited to 'include/sim.h')
-rw-r--r-- | include/sim.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/include/sim.h b/include/sim.h new file mode 100644 index 0000000..2adbfff --- /dev/null +++ b/include/sim.h @@ -0,0 +1,51 @@ +/* + * This file is part of QMI-RIL. + * + * Copyright (C) 2013-2014 Paul Kocialkowski <contact@paulk.fr> + * Copyright (C) 2017 Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> + * + * QMI-RIL is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * QMI-RIL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with QMI-RIL. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef _SIM_H_ +#define _SIM_H_ + +#define SIM_COMMAND_READ_BINARY 0xB0 +#define SIM_COMMAND_UPDATE_BINARY 0xD6 +#define SIM_COMMAND_READ_RECORD 0xB2 +#define SIM_COMMAND_UPDATE_RECORD 0xDC +#define SIM_COMMAND_SEEK 0xA2 +#define SIM_COMMAND_GET_RESPONSE 0xC0 + +#define SIM_FILE_STRUCTURE_TRANSPARENT 0x00 +#define SIM_FILE_STRUCTURE_LINEAR_FIXED 0x01 + +#define SIM_FILE_TYPE_MF 0x01 +#define SIM_FILE_TYPE_DF 0x02 +#define SIM_FILE_TYPE_EF 0x04 + +struct sim_file_response { + unsigned char rfu12[2]; + unsigned short file_size; + unsigned short file_id; + unsigned char file_type; + unsigned char rfu3; + unsigned char access_condition[3]; + unsigned char file_status; + unsigned char file_length; + unsigned char file_structure; + unsigned char record_length; +} __attribute__((__packed__)); + +#endif |