26#define VAULT_CACHE_SUBDIR ".vault"
27#define VAULT_CACHE_FNAME ".vault_cache"
37idaman THREAD_SAFE
const char *ida_export
idadir(
const char *subdir);
68#define CFG_SUBDIR "cfg"
69#define IDC_SUBDIR "idc"
70#define IDS_SUBDIR "ids"
71#define IDP_SUBDIR "procs"
72#define LDR_SUBDIR "loaders"
73#define SIG_SUBDIR "sig"
74#define TIL_SUBDIR "til"
75#define PLG_SUBDIR "plugins"
76#define THM_SUBDIR "themes"
106#define IDA_SUBDIR_IDP 0x0001
107#define IDA_SUBDIR_IDADIR_FIRST 0x0002
108#define IDA_SUBDIR_ONLY_EXISTING 0x0004
120#ifndef CSIDL_PERSONAL
121#define CSIDL_PERSONAL 0x0005
124#define CSIDL_APPDATA 0x001a
126#ifndef CSIDL_LOCAL_APPDATA
127#define CSIDL_LOCAL_APPDATA 0x001c
130#define CSIDL_PROFILE 0x0028
132#ifndef CSIDL_PROGRAM_FILES
133#define CSIDL_PROGRAM_FILES 0x0026
135#ifndef CSIDL_PROGRAM_FILES_COMMON
136#define CSIDL_PROGRAM_FILES_COMMON 0x002b
138#ifndef CSIDL_PROGRAM_FILESX86
139#define CSIDL_PROGRAM_FILESX86 0x002a
188idaman THREAD_SAFE FILE *ida_export
fopenWT(
const char *file);
195idaman THREAD_SAFE FILE *ida_export
fopenWB(
const char *file);
201idaman THREAD_SAFE FILE *ida_export
fopenRT(
const char *file);
207idaman THREAD_SAFE FILE *ida_export
fopenRB(
const char *file);
213idaman THREAD_SAFE FILE *ida_export
fopenM(
const char *file);
219idaman THREAD_SAFE FILE *ida_export
fopenA(
const char *file);
225idaman THREAD_SAFE FILE *ida_export
openR(
const char *file);
231idaman THREAD_SAFE FILE *ida_export
openRT(
const char *file);
237idaman THREAD_SAFE FILE *ida_export
openM(
const char *file);
357 const char *(idaapi *parse_params)(
359 const char *line)=
nullptr);
376#define IOPORT_SKIP_DEVICE ((const char *)(-1))
399idaman THREAD_SAFE
int ida_export
call_system(
const char *command);
432idaman
void ida_export
lread(linput_t *li,
void *buf,
size_t size);
444idaman
char *ida_export
qlgets(
char *s,
size_t len, linput_t *li);
450idaman
int ida_export
qlgetc(linput_t *li);
464#define DEF_LREADBYTES(read, type, size) \
466inline int idaapi read(linput_t *li, type *res, bool mf) \
467 { return lreadbytes(li, res, size, mf); }
495idaman qoff64_t ida_export
qlseek(linput_t *li, qoff64_t
pos,
int whence=SEEK_SET);
500inline qoff64_t idaapi
qltell(linput_t *li) {
return qlseek(li, 0, SEEK_CUR); }
505idaman linput_t *ida_export
open_linput(
const char *file,
bool remote);
518idaman THREAD_SAFE FILE *ida_export
qlfile(linput_t *li);
Reimplementation of vector class from STL.
Definition pro.h:2262
idaman THREAD_SAFE FILE *ida_export openM(const char *file)
Open a file for read/write in binary mode or die, deny write.
idaman int ida_export lreadbytes(linput_t *li, void *buf, size_t size, bool mf)
Read multiple bytes and swap if necessary.
idaman THREAD_SAFE FILE *ida_export fopenA(const char *file)
Open a file for append in text mode, deny none.
idaman ssize_t ida_export qlread(linput_t *li, void *buf, size_t size)
Read the input source.
uint64
Definition diskio.hpp:473
THREAD_SAFE linput_type_t idaapi get_linput_type(linput_t *li)
Get linput type.
Definition diskio.hpp:576
idaman THREAD_SAFE FILE *ida_export openR(const char *file)
Open a file for read in binary mode or die, deny none.
idaman THREAD_SAFE void ida_export close_linput(linput_t *li)
Close loader input.
idaman THREAD_SAFE FILE *ida_export fopenRB(const char *file)
Open a file for read in binary mode, deny none.
DEF_LREADBYTES(lread2bytes, int16, 2) DEF_LREADBYTES(lread2bytes
idaman char *ida_export qlgetz(linput_t *li, int64 fpos, char *buf, size_t bufsize)
Read a zero-terminated string from the input.
idaman THREAD_SAFE FILE *ida_export openRT(const char *file)
Open a file for read in text mode or die, deny none.
idaman THREAD_SAFE FILE *ida_export fopenWT(const char *file)
Open a new file for write in text mode, deny write.
qvector< ioport_t > ioports_t
Definition diskio.hpp:287
idaman THREAD_SAFE char *ida_export getsysfile(char *buf, size_t bufsize, const char *filename, const char *subdir)
Search for IDA system file.
qvector< ioport_bit_t > ioport_bits_t
Definition diskio.hpp:270
idaman THREAD_SAFE int ida_export enumerate_files(char *answer, size_t answer_size, const char *path, const char *fname, file_enumerator_t &fv)
idaman THREAD_SAFE const char *ida_export get_user_idadir(void)
Get user ida related directory.
idaman int64 ida_export qlsize(linput_t *li)
Get the input source size.
idaman qoff64_t ida_export qlseek(linput_t *li, qoff64_t pos, int whence=SEEK_SET)
Set input source position.
idaman THREAD_SAFE FILE *ida_export qlfile(linput_t *li)
Get FILE* from the input source.
qoff64_t idaapi qltell(linput_t *li)
Get input source position.
Definition diskio.hpp:500
idaman linput_t *ida_export create_memory_linput(ea_t start, asize_t size)
Create a linput for process memory.
idaman THREAD_SAFE FILE *ida_export fopenWB(const char *file)
Open a new file for write in binary mode, deny read/write.
idaman THREAD_SAFE bool ida_export choose_ioport_device(qstring *_device, const char *file, const char *(idaapi *parse_params)(qstring *buf, const char *line)=nullptr)
Allow the user to choose the ioport device.
idaman THREAD_SAFE const ioport_t *ida_export find_ioport(const ioports_t &ports, ea_t address)
Find ioport in the array of ioports.
idaman THREAD_SAFE const ioport_bit_t *ida_export find_ioport_bit(const ioports_t &ports, ea_t address, size_t bit)
Find ioport bit in the array of ioports.
idaman THREAD_SAFE FILE *ida_export fopenM(const char *file)
Open a file for read/write in binary mode, deny write.
uint32
Definition diskio.hpp:471
janitor_t< linput_t * > linput_janitor_t
Object that will free an linput_t at destruction-time.
Definition diskio.hpp:582
idaman void ida_export lread(linput_t *li, void *buf, size_t size)
Read the input source.
idaman THREAD_SAFE linput_t *ida_export create_bytearray_linput(const uchar *start, size_t size)
Trivial memory linput.
linput_close_code_t
Upon closing outer linput, perform one of these actions.
Definition diskio.hpp:617
@ LOC_KEEP
do nothing
Definition diskio.hpp:620
@ LOC_UNMAKE
unmake the inner linput
Definition diskio.hpp:619
@ LOC_CLOSE
close the inner linput
Definition diskio.hpp:618
idaman char *ida_export qlgets(char *s, size_t len, linput_t *li)
Read one line from the input source.
idaman THREAD_SAFE linput_t *ida_export make_linput(FILE *fp)
Convert FILE* to input source.
idaman THREAD_SAFE const char *ida_export idadir(const char *subdir)
Get IDA directory (if subdir==nullptr) or the specified subdirectory (see IDA subdirectories)
idaman THREAD_SAFE FILE *ida_export fopenRT(const char *file)
Open a file for read in text mode, deny none.
idaman THREAD_SAFE bool ida_export get_special_folder(char *buf, size_t bufsize, int csidl)
Get a folder location by CSIDL (see Common CSIDLs).
idaman THREAD_SAFE void ida_export unmake_linput(linput_t *li)
Free an linput_t object (also see make_linput())
idaman void ida_export get_install_root(qstring *out)
Get the directory where IDA is installed.
idaman THREAD_SAFE void ida_export echsize(FILE *fp, uint64 size)
Change size of file or die.
idaman THREAD_SAFE uint64 ida_export get_free_disk_space(const char *path)
Get free disk space in bytes.
idaman THREAD_SAFE ssize_t ida_export read_ioports(ioports_t *ports, qstring *device, const char *file, ioports_fallback_t *callback=nullptr)
idaman linput_t *ida_export open_linput(const char *file, bool remote)
Open loader input.
idaman THREAD_SAFE int ida_export call_system(const char *command)
Execute a operating system command.
idaman THREAD_SAFE int ida_export get_ida_subdirs(qstrvec_t *dirs, const char *subdir, int flags=0)
Get list of directories in which to find a specific IDA resource (see IDA subdirectories).
linput_type_t
loader input source
Definition diskio.hpp:418
@ LINPUT_LOCAL
local file
Definition diskio.hpp:420
@ LINPUT_GENERIC
generic linput
Definition diskio.hpp:423
@ LINPUT_RFILE
remote file ( debugger_t::open_file, debugger_t::read_file)
Definition diskio.hpp:421
@ LINPUT_PROCMEM
debugged process memory (read_dbg_memory())
Definition diskio.hpp:422
@ LINPUT_NONE
invalid linput
Definition diskio.hpp:419
DECLARE_TYPE_AS_MOVABLE(ioport_bit_t)
idaman THREAD_SAFE bool ida_export choose_ioport_device2(qstring *_device, const char *file, choose_ioport_parser_t *parse_params)
idaman THREAD_SAFE linput_t *ida_export create_generic_linput(generic_linput_t *gl)
Create a generic linput.
idaman int ida_export qlgetc(linput_t *li)
Read one character from the input source.
idaman size_t n
Definition pro.h:1000
char * answer
Definition kernwin.hpp:8465
int nbytes
Definition kernwin.hpp:3037
idaman int64 pos
Definition kernwin.hpp:1398
idaman size_t len
Definition kernwin.hpp:1389
asize_t size
Definition kernwin.hpp:6701
unsigned __int64 uint64
Definition llong.hpp:13
__int64 int64
Definition llong.hpp:14
qvector< qstring > qstrvec_t
Definition lumina.hpp:831
This is the first header included in the IDA project.
unsigned short uint16
unsigned 16 bit value
Definition pro.h:350
unsigned int uint32
unsigned 32 bit value
Definition pro.h:352
uint64 asize_t
Definition pro.h:427
short int16
signed 16 bit value
Definition pro.h:349
uint64 ea_t
Definition pro.h:425
int int32
signed 32 bit value
Definition pro.h:351
unsigned char uchar
unsigned 8 bit value
Definition pro.h:341
idaman size_t bufsize
Definition pro.h:604
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition pro.h:385
_qstring< char > qstring
regular string
Definition pro.h:3771
Definition diskio.hpp:362
virtual ~choose_ioport_parser_t()
Definition diskio.hpp:363
virtual bool parse(qstring *param, const char *line)=0
Enumerate files in the specified directory.
Definition diskio.hpp:159
virtual int visit_file(const char *file)=0
virtual ~file_enumerator_t()
Definition diskio.hpp:161
Describes an I/O port bit.
Definition diskio.hpp:265
qstring name
name of the bit
Definition diskio.hpp:266
qstring cmt
comment
Definition diskio.hpp:267
Describes an I/O port.
Definition diskio.hpp:274
qstring cmt
comment
Definition diskio.hpp:277
qstring name
name of the port
Definition diskio.hpp:276
ioport_t()
Definition diskio.hpp:281
ea_t address
address of the port
Definition diskio.hpp:275
ioport_bits_t bits
bit names
Definition diskio.hpp:278
void * userdata
arbitrary data. initialized to nullptr.
Definition diskio.hpp:279
Read i/o port definitions from a config file.
Definition diskio.hpp:321
virtual ~ioports_fallback_t()
Definition diskio.hpp:322
virtual bool handle(qstring *errbuf, const ioports_t &ports, const char *line)=0
Resource janitor to facilitate use of the RAII idiom.
Definition pro.h:4579
linput_t *& resource
Definition pro.h:4584
~janitor_t()
Definition diskio.hpp:584