IDA SDK

- Main Page
- Header Files
- Classes
- Modules

- File List
- File Members

Classes | Functions | Macros | Typedefs | Variables
nalt.hpp File Reference

## Detailed Description

Definitions of various information kept in netnodes.

Each address in the program has a corresponding netnode: netnode(ea).

If we have no information about an address, the corresponding netnode is not created. Otherwise we will create a netnode and save information in it. All variable length information (names, comments, offset information, etc) is stored in the netnode.

Don't forget that some information is already stored in the flags (bytes.hpp)

Warning
  Many of the functions in this file are very low level (they are marked as low level functions). Use them only if you can't find higher level function to set/get/del information.

You can create your own nodes in IDP module and store information in them. See netnode.

## Classes
struct | xrefpos_t
| Position of cursor in the window with cross-references to the address. More...
struct | jumptable_info_t
| Information about jump tables. More...
struct | array_parameters_t
| Describes how to display an array. More...
struct | switch_info_t
| Information about a switch statement. More...
struct | switch_info_ex_t
| Extended information about a switch statement. More...
struct | custom_data_type_ids_t
| Information about custom data types. More...
struct | refinfo_t
| Information about a reference. More...
struct | custom_refinfo_handler_t
| Manage a custom refinfo type. More...
struct | strpath_t
| Information for structure offsets. More...
struct | enum_const_t
| See opinfo_t::ec. More...
union | opinfo_t
| Additional information about an operand type. More...

## Functions
void | set_visible_item (ea_t ea, bool visible)
| Change visibility of item at given ea.
bool | is_visible_item (ea_t ea)
| Test visibility of item at given ea.
bool | is_finally_visible_item (ea_t ea)
| Is instruction visible?
uchar idaapi | get_str_encoding_idx (int32 strtype)
| Get index of the string encoding for this string.
idaman reftype_t ida_export | get_reftype_by_size (size_t size)
| Get REF_... More...
idaman int ida_export | register_custom_refinfo (const custom_refinfo_handler_t *crh)
| Register a new custom refinfo type.
idaman bool ida_export | unregister_custom_refinfo (int crid)
| Unregister a new custom refinfo type.
idaman int ida_export | get_custom_refinfos (const custom_refinfo_handler_t ***infos)
| Get refinfo handlers.
ssize_t idaapi | get_input_file_path (char *buf, size_t bufsize)
| Get full path of the input file.
idaman ssize_t ida_export | get_root_filename (char *buf, size_t bufsize)
| Get file name only of the input file.
void | set_root_filename (const char *file)
| Set full path of the input file.
uint32 idaapi | retrieve_input_file_size (void)
| Get size of input file in bytes.
uint32 idaapi | retrieve_input_file_crc32 (void)
| Get input file crc32 stored in the database. More...
bool idaapi | retrieve_input_file_md5 (uchar hash[16])
| Get input file md5.
bool idaapi | retrieve_input_file_sha256 (uchar hash[32])
| Get input file sha256.
ssize_t idaapi | get_asm_inc_file (char *buf, size_t bufsize)
| Get name of the include file.
bool idaapi | set_asm_inc_file (const char *file)
| Set name of the include file.
ea_t idaapi | get_imagebase (void)
| Get image base address.
void idaapi | set_imagebase (ea_t base)
| Set image base address.
netnode idaapi | get_ids_modnode (void)
| Get ids modnode.
void idaapi | set_ids_modnode (netnode id)
| Set ids modnode.
ssize_t idaapi | get_auto_plugins (char *buf, size_t bufsize)
| Get auto plugins, works with comma separated list of plugins.
bool idaapi | set_auto_plugins (const char *list, size_t listsize=0)
| Set auto plugins, works with comma separated list of plugins.
ssize_t | dbg_get_input_path (char *buf, size_t bufsize)
| Get debugger input file name/path (see LFLG_DBG_NOPATH)
idaman int ida_export | validate_idb_names ()
| Check consistency of name records, return number of bad ones.
Wide values
Up to 32bit value for wide (more than 8-bit) byte processors. Use higher level functions: get_full_byte() get_full_word() get_full_long()
uint32 | get_wide_value (ea_t ea)
void | set_wide_value (ea_t ea, uint32 x)
void | del_wide_value (ea_t ea)
Structure ID
Structure ID for structures in structure definitions. Use higher level function get_opinfo()
ea_t | get_strid (ea_t ea)
void | _set_strid (ea_t ea, ea_t x)
void | _del_strid (ea_t ea)
xrefpos
ssize_t | get_xrefpos (ea_t ea, xrefpos_t *buf, size_t bufsize)
void | set_xrefpos (ea_t ea, const xrefpos_t *oi)
void | del_xrefpos (ea_t ea)
Source line numbers
They are sometimes present in object files.
ea_t | get_linnum0 (ea_t ea)
void | set_linnum0 (ea_t ea, ea_t x)
void | del_linnum0 (ea_t ea)
idaman void ida_export | set_source_linnum (ea_t ea, uval_t lnnum)
idaman uval_t ida_export | get_source_linnum (ea_t ea)
idaman void ida_export | del_source_linnum (ea_t ea)
Absolute segment base address
These functions may be used if necessary.
ea_t | get_absbase (ea_t ea)
void | set_absbase (ea_t ea, ea_t x)
void | del_absbase (ea_t ea)
Enum id (first operand)
Use higher level function get_enum_id()
ea_t | get_enum_id0 (ea_t ea)
void | set_enum_id0 (ea_t ea, ea_t x)
void | del_enum_id0 (ea_t ea)
Enum id (second operand)
Use higher level function get_enum_id()
ea_t | get_enum_id1 (ea_t ea)
void | set_enum_id1 (ea_t ea, ea_t x)
void | del_enum_id1 (ea_t ea)
Purged bytes
Number of bytes purged from the stack when a function is called indirectly get_ind_purged() may be used if necessary. Use set_purged() to modify this value (do not use set_ind_purged())
ea_t | get_ind_purged (ea_t ea)
void | set_ind_purged (ea_t ea, ea_t x)
void | del_ind_purged (ea_t ea)
Get type of string
Use higher level function get_opinfo().
uint32 | get_str_type (ea_t ea)
void | set_str_type (ea_t ea, uint32 x)
void | del_str_type (ea_t ea)
Work with string type codes
See String type codes
char idaapi | get_str_type_code (uval_t strtype)
char | get_str_term1 (int32 strtype)
char | get_str_term2 (int32 strtype)
bool | is_unicode (int32 strtype)
bool | is_pascal (int32 strtype)
Alignment value
(should be power of 2) These functions may be used if necessary.
uint32 | get_alignment (ea_t ea)
void | set_alignment (ea_t ea, uint32 x)
void | del_alignment (ea_t ea)
Instruction/Data background color
uint32 | _get_item_color (ea_t ea)
void | _set_item_color (ea_t ea, uint32 x)
void | _del_item_color (ea_t ea)
idaman void ida_export | set_item_color (ea_t ea, bgcolor_t color)
idaman bgcolor_t ida_export | get_item_color (ea_t ea)
idaman void ida_export | del_item_color (ea_t ea)
Regular comment
low level, don't use - use get_cmt()
ssize_t | get_nalt_cmt (ea_t ea, char *buf, size_t bufsize)
void | set_nalt_cmt (ea_t ea, const char *oi)
void | del_nalt_cmt (ea_t ea)
Repeatable comment
low level, don't use - use get_cmt()
ssize_t | get_nalt_rptcmt (ea_t ea, char *buf, size_t bufsize)
void | set_nalt_rptcmt (ea_t ea, const char *oi)
void | del_nalt_rptcmt (ea_t ea)
Forced operands
low level, don't use - use get_forced_operand()
ssize_t | get_fop1 (ea_t ea, char *buf, size_t bufsize)
void | set_fop1 (ea_t ea, const char *oi)
void | del_fop1 (ea_t ea)
ssize_t | get_fop2 (ea_t ea, char *buf, size_t bufsize)
void | set_fop2 (ea_t ea, const char *oi)
void | del_fop2 (ea_t ea)
ssize_t | get_fop3 (ea_t ea, char *buf, size_t bufsize)
void | set_fop3 (ea_t ea, const char *oi)
void | del_fop3 (ea_t ea)
ssize_t | get_fop4 (ea_t ea, char *buf, size_t bufsize)
void | set_fop4 (ea_t ea, const char *oi)
void | del_fop4 (ea_t ea)
ssize_t | get_fop5 (ea_t ea, char *buf, size_t bufsize)
void | set_fop5 (ea_t ea, const char *oi)
void | del_fop5 (ea_t ea)
ssize_t | get_fop6 (ea_t ea, char *buf, size_t bufsize)
void | set_fop6 (ea_t ea, const char *oi)
void | del_fop6 (ea_t ea)
Manual insn
low level, don't use - use get_manual_insn()
char * | get_manual_insn0 (ea_t ea, char *buf, size_t *bufsize)
void | set_manual_insn0 (ea_t ea, const char *oi, size_t size)
void | del_manual_insn0 (ea_t ea)
Graph group
low level, don't use - use mutable_graph_t::get_graph_groups()
uchar * | get_graph_groups0 (ea_t ea, uchar *buf, size_t *bufsize)
void | set_graph_groups0 (ea_t ea, const uchar *oi, size_t size)
void | del_graph_groups0 (ea_t ea)
Jump tables
ssize_t | get_jumptable_info (ea_t ea, jumptable_info_t *buf, size_t bufsize)
void | set_jumptable_info (ea_t ea, const jumptable_info_t *oi)
void | del_jumptable_info (ea_t ea)
Array representation
ssize_t | get_array_parameters (ea_t ea, array_parameters_t *buf, size_t bufsize)
void | set_array_parameters (ea_t ea, const array_parameters_t *oi)
void | del_array_parameters (ea_t ea)
Switch info Ex
See switch_info_ex_t, xref.hpp for related functions
ssize_t | get_switch_info_ex (ea_t ea, switch_info_ex_t *buf, size_t bufsize)
void | set_switch_info_ex (ea_t ea, const switch_info_ex_t *oi)
void | del_switch_info_ex (ea_t ea)
Switch parent
Address which holds the switch info (switch_info_t). Used at the jump targets.
ea_t | get_switch_parent (ea_t ea)
void | set_switch_parent (ea_t ea, ea_t x)
void | del_switch_parent (ea_t ea)
Custom data types
idaman int ida_export | get_custom_data_type_ids (ea_t ea, custom_data_type_ids_t *cdis, size_t bufsize)
idaman void ida_export | set_custom_data_type_ids (ea_t ea, const custom_data_type_ids_t *cdis)
void idaapi | del_custom_data_type_ids (ea_t ea)
Get/Set refinfo
n may be 0, 1, 2, OPND_MASK. OPND_OUTER may be used too. Don't use these functions, see get_opinfo(), set_opinfo()
idaman int ida_export | set_refinfo_ex (ea_t ea, int n, const refinfo_t *ri)
idaman int ida_export | set_refinfo (ea_t ea, int n, reftype_t type, ea_t target=BADADDR, ea_t base=0, adiff_t tdelta=0)
idaman int ida_export | get_refinfo (ea_t ea, int n, refinfo_t *ri)
idaman int ida_export | del_refinfo (ea_t ea, int n)
Segment translation
low level segment translation functions. please use functions from segment.hpp.
ssize_t | get__segtrans (ea_t ea, ea_t *buf, size_t bufsize)
void | set__segtrans (ea_t ea, const ea_t *oi, int size)
void | del__segtrans (ea_t ea)
Types
Work with function/data types These functions may be used if necessary.
idaman bool ida_export | get_tinfo2 (ea_t ea, tinfo_t *tif)
idaman bool ida_export | set_tinfo2 (ea_t ea, const tinfo_t *tif)
void idaapi | del_tinfo2 (ea_t ea)
Operand types
These functions may be used if necessary.
idaman bool ida_export | get_op_tinfo2 (ea_t ea, int n, tinfo_t *tif)
idaman bool ida_export | set_op_tinfo2 (ea_t ea, int n, const tinfo_t *tif)
void idaapi | del_tinfo2 (ea_t ea, int n)
String encodings
Encoding names can be a codepage names (CP1251, windows-1251), charset name (Shift-JIS, UTF-8), or just codepage number (866, 932). NB: not all platforms support all encodings user-accessible encodings are counted from 1 (index 0 is reserved)
idaman int ida_export | get_encodings_count ()
| Get total number of encodings (counted from 0)
idaman const char *ida_export | get_encoding_name (int idx)
| Get encoding name for specific index (1-based). More...
idaman int ida_export | add_encoding (const char *encoding)
| Add a new encoding (e.g. More...
idaman bool ida_export | del_encoding (int idx)
| Delete an encoding (1-based)
idaman bool ida_export | change_encoding_name (int idx, const char *encoding)
| Change name for an encoding (1-based)
idaman int ida_export | get_default_encoding_idx (int32 strtype)
| Get default encoding index for a specific string type. More...
idaman bool ida_export | set_default_encoding_idx (int32 strtype, int idx)
| set default encoding for a string type idx can be 0 to disable encoding conversion
const char *idaapi | encoding_from_strtype (int32 strtype)
| Get encoding name for this strtype.

## Work with additional location flags
See Additional flags for the location
#define | IMPLEMENT_AFLAG_FUNCTIONS(bit, test, set, clear)
| Used to define 3 functions to work with a bit: More...
#define | IMPL__IS_AFLAG_FUNCS(bit, name) IMPLEMENT_AFLAG_FUNCTIONS(bit, is_ ## name, set_ ## name, clr_ ## name)
| See IMPLEMENT_AFLAG_FUNCTIONS.
#define | IMPL_HAS_AFLAG_FUNCS(bit, name) IMPLEMENT_AFLAG_FUNCTIONS(bit, has_ ## name, set_has_ ## name, clr_has_ ## name)
| See IMPLEMENT_AFLAG_FUNCTIONS.
void | set_aflags0 (ea_t ea, uint32 flags)
uint32 | get_aflags0 (ea_t ea)
void | del_aflags0 (ea_t ea)
idaman void ida_export | set_aflags (ea_t ea, uint32 flags)
idaman void ida_export | set_abits (ea_t ea, uint32 bits)
idaman void ida_export | clr_abits (ea_t ea, uint32 bits)
idaman uint32 ida_export | get_aflags (ea_t ea)
idaman void ida_export | del_aflags (ea_t ea)
bool | is_hidden_item (ea_t ea)
void | hide_item (ea_t ea)
void | unhide_item (ea_t ea)
bool | is_hidden_border (ea_t ea)
void | hide_border (ea_t ea)
void | unhide_border (ea_t ea)
bool | uses_modsp (ea_t ea)
void | set_usemodsp (ea_t ea)
void | clr_usemodsp (ea_t ea)
bool | is_zstroff (ea_t ea)
void | set_zstroff (ea_t ea)
void | clr_zstroff (ea_t ea)
bool | is__bnot0 (ea_t ea)
void | set__bnot0 (ea_t ea)
void | clr__bnot0 (ea_t ea)
bool | is__bnot1 (ea_t ea)
void | set__bnot1 (ea_t ea)
void | clr__bnot1 (ea_t ea)
bool | is_libitem (ea_t ea)
void | set_libitem (ea_t ea)
void | clr_libitem (ea_t ea)
bool | has_ti (ea_t ea)
void | set_has_ti (ea_t ea)
void | clr_has_ti (ea_t ea)
bool | has_ti0 (ea_t ea)
void | set_has_ti0 (ea_t ea)
void | clr_has_ti0 (ea_t ea)
bool | has_ti1 (ea_t ea)
void | set_has_ti1 (ea_t ea)
void | clr_has_ti1 (ea_t ea)
bool | has_lname (ea_t ea)
void | set_has_lname (ea_t ea)
void | clr_has_lname (ea_t ea)
bool | is_tilcmt (ea_t ea)
void | set_tilcmt (ea_t ea)
void | clr_tilcmt (ea_t ea)
bool | is_usersp (ea_t ea)
void | set_usersp (ea_t ea)
void | clr_usersp (ea_t ea)
bool | is_lzero0 (ea_t ea)
void | set_lzero0 (ea_t ea)
void | clr_lzero0 (ea_t ea)
bool | is_lzero1 (ea_t ea)
void | set_lzero1 (ea_t ea)
void | clr_lzero1 (ea_t ea)
bool | is_colored_item (ea_t ea)
void | set_colored_item (ea_t ea)
void | clr_colored_item (ea_t ea)
bool | is_terse_struc (ea_t ea)
void | set_terse_struc (ea_t ea)
void | clr_terse_struc (ea_t ea)
bool | is__invsign0 (ea_t ea)
void | set__invsign0 (ea_t ea)
void | clr__invsign0 (ea_t ea)
bool | is__invsign1 (ea_t ea)
void | set__invsign1 (ea_t ea)
void | clr__invsign1 (ea_t ea)
bool | is_noret (ea_t ea)
void | set_noret (ea_t ea)
void | clr_noret (ea_t ea)
bool | is_fixed_spd (ea_t ea)
void | set_fixed_spd (ea_t ea)
void | clr_fixed_spd (ea_t ea)
bool | is_align_flow (ea_t ea)
void | set_align_flow (ea_t ea)
void | clr_align_flow (ea_t ea)
bool | is_userti (ea_t ea)
void | set_userti (ea_t ea)
void | clr_userti (ea_t ea)
bool | is_retfp (ea_t ea)
void | set_retfp (ea_t ea)
void | clr_retfp (ea_t ea)
bool | is_notcode (ea_t ea)
void | set_notcode (ea_t ea)
void | clr_notcode (ea_t ea)

## Structure paths
Structure paths for unions and structures with unions (strpath) a structure path is an array of id's. the first id is the id of the structure itself. additional id's (if any) specify which member of a union we should select the maximal size of array is MAXSTRUCPATH. strpaths are used to determine how to display structure offsets.
#define | DEFINE_PATH_FUNCS(name, code)
idaman void ida_export | write_struc_path (netnode node, int idx, const tid_t *path, int plen, adiff_t delta)
idaman int ida_export | read_struc_path (netnode node, int idx, tid_t *path, adiff_t *delta)
void | del_struc_path (netnode node, int idx, const tid_t *path, int plen)

## Functions to work with imports
typedef int idaapi | import_enum_cb_t(ea_t ea, const char *name, uval_t ord, void *param)
| Callback for enumerating imports. More...
idaman uint ida_export | get_import_module_qty ()
| Get number of import modules.
idaman bool ida_export | get_import_module_name (int mod_index, char *buf, size_t bufsize)
| Get import module name. More...
idaman int ida_export | enum_import_names (int mod_index, import_enum_cb_t *callback, void *param=NULL)
| Enumerate imports from specific module. More...

## Ignore micro
netnode to keep information about various kinds of instructions
#define | IM_NONE 0
#define | IM_PROLOG 1
#define | IM_EPILOG 2
#define | IM_SWITCH 3
netnode | ignore_micro
void | init_ignore_micro (void)
void | term_ignore_micro (void)
char | get_ignore_micro (ea_t ea)
bool | should_ignore_micro (ea_t ea)
void | set_ignore_micro (ea_t ea, uchar im_type)
void | clr_ignore_micro (ea_t ea)
void | mark_prolog_insn (ea_t ea)
void | mark_epilog_insn (ea_t ea)
void | mark_switch_insn (ea_t ea)
bool | is_prolog_insn (ea_t ea)
bool | is_epilog_insn (ea_t ea)
bool | is_switch_insn (ea_t ea)
ea_t | next_marked_insn (ea_t ea)

## Macros
#define | NALT_ENUM uval_t(-2)
| reserved for enums, see enum.hpp
#define | NALT_WIDE uval_t(-1)
| 16-bit byte value
#define | NALT_SWITCH 1
| switch idiom address (used at jump targets)
#define | NALT_STRUCT 3
| struct id
#define | NALT_AFLAGS 8
| additional flags for an item
#define | NALT_LINNUM 9
| source line number
#define | NALT_ABSBASE 10
| absolute segment location
#define | NALT_ENUM0 11
| enum id for the first operand
#define | NALT_ENUM1 12
| enum id for the second operand
#define | NALT_PURGE 15
| number of bytes purged from the stack when a function is called indirectly
#define | NALT_STRTYPE 16
| type of string item
#define | NALT_ALIGN 17
| alignment value if the item is FF_ALIGN More...
#define | NALT_COLOR 20
| instruction/data background color
#define | NSUP_CMT 0
| regular comment
#define | NSUP_REPCMT 1
| repeatable comment
#define | NSUP_FOP1 2
| forced operand 1
#define | NSUP_FOP2 3
| forced operand 2
#define | NSUP_JINFO 4
| jump table info
#define | NSUP_ARRAY 5
| array parameters
#define | NSUP_OMFGRP 6
| OMF: group of segments (not used anymore)
#define | NSUP_FOP3 7
| forced operand 3
#define | NSUP_SWITCH 8
| switch information
#define | NSUP_REF0 9
| complex reference information for operand 1
#define | NSUP_REF1 10
| complex reference information for operand 2
#define | NSUP_REF2 11
| complex reference information for operand 3
#define | NSUP_OREF0 12
| outer complex reference information for operand 1
#define | NSUP_OREF1 13
| outer complex reference information for operand 2
#define | NSUP_OREF2 14
| outer complex reference information for operand 3
#define | NSUP_STROFF0 15
| stroff: struct path for the first operand
#define | NSUP_STROFF1 16
| stroff: struct path for the second operand
#define | NSUP_SEGTRANS 17
| segment translations
#define | NSUP_FOP4 18
| forced operand 4
#define | NSUP_FOP5 19
| forced operand 5
#define | NSUP_FOP6 20
| forced operand 6
#define | NSUP_REF3 21
| complex reference information for operand 4
#define | NSUP_REF4 22
| complex reference information for operand 5
#define | NSUP_REF5 23
| complex reference information for operand 6
#define | NSUP_OREF3 24
| outer complex reference information for operand 4
#define | NSUP_OREF4 25
| outer complex reference information for operand 5
#define | NSUP_OREF5 26
| outer complex reference information for operand 6
#define | NSUP_XREFPOS 27
| saved xref address and type in the xrefs window
#define | NSUP_CUSTDT 28
| custom data type id
#define | NSUP_GROUPS 29
| SEG_GRP: pack_dd encoded list of selectors.
#define | NSUP_POINTS 0x1000
| SP change points blob (see funcs.cpp). More...
#define | NSUP_MANUAL 0x2000
| manual instruction. More...
#define | NSUP_TYPEINFO 0x3000
| type information. More...
#define | NSUP_REGVAR 0x4000
| register variables. More...
#define | NSUP_LLABEL 0x5000
| local labels. More...
#define | NSUP_REGARG 0x6000
| register argument type/name descriptions values NSUP_REGARG..NSUP_REGARG+0x1000 are reserved
#define | NSUP_FTAILS 0x7000
| function tails or tail referers values NSUP_FTAILS..NSUP_FTAILS+0x1000 are reserved
#define | NSUP_GROUP 0x8000
| graph group information values NSUP_GROUP..NSUP_GROUP+0x1000 are reserved
#define | NSUP_OPTYPES 0x9000
| operand type information. More...
#define | NALT_CREF_TO 'X'
| code xref to, idx: target address
#define | NALT_CREF_FROM 'x'
| code xref from, idx: source address
#define | NALT_DREF_TO 'D'
| data xref to, idx: target address
#define | NALT_DREF_FROM 'd'
| data xref from, idx: source address
#define | NSUP_GR_INFO 'g'
| group node info: color, ea, text
#define | NALT_GR_LAYX 'p'
| group layout ptrs, hash: md5 of 'belongs'
#define | NSUP_GR_LAYT 'l'
| group layouts, idx: layout pointer
#define | PATCH_TAG 'P'
| See net_patch.
#define | AFL_LINNUM 0x00000001L
| has line number info
#define | AFL_USERSP 0x00000002L
| user-defined SP value
#define | AFL_PUBNAM 0x00000004L
| name is public (inter-file linkage)
#define | AFL_WEAKNAM 0x00000008L
| name is weak
#define | AFL_HIDDEN 0x00000010L
| the item is hidden completely
#define | AFL_MANUAL 0x00000020L
| the instruction/data is specified by the user
#define | AFL_NOBRD 0x00000040L
| the code/data border is hidden
#define | AFL_ZSTROFF 0x00000080L
| display struct field name at 0 offset when displaying an offset. More...
#define | AFL_BNOT0 0x00000100L
| the 1st operand is bitwise negated
#define | AFL_BNOT1 0x00000200L
| the 2nd operand is bitwise negated
#define | AFL_LIB 0x00000400L
| item from the standard library. More...
#define | AFL_TI 0x00000800L
| has typeinfo? (NSUP_TYPEINFO)
#define | AFL_TI0 0x00001000L
| has typeinfo for operand 0? (NSUP_OPTYPES)
#define | AFL_TI1 0x00002000L
| has typeinfo for operand 1? (NSUP_OPTYPES+1)
#define | AFL_LNAME 0x00004000L
| has local name too (FF_NAME should be set)
#define | AFL_TILCMT 0x00008000L
| has type comment? (such a comment may be changed by IDA)
#define | AFL_LZERO0 0x00010000L
| toggle leading zeroes for the 1st operand
#define | AFL_LZERO1 0x00020000L
| toggle leading zeroes for the 2nd operand
#define | AFL_COLORED 0x00040000L
| has user defined instruction color?
#define | AFL_TERSESTR 0x00080000L
| terse structure variable display?
#define | AFL_SIGN0 0x00100000L
| code: toggle sign of the 1st operand
#define | AFL_SIGN1 0x00200000L
| code: toggle sign of the 2nd operand
#define | AFL_NORET 0x00400000L
| for imported function pointers: doesn't return. More...
#define | AFL_FIXEDSPD 0x00800000L
| sp delta value is fixed by analysis. More...
#define | AFL_ALIGNFLOW 0x01000000L
| the previous insn was created for alignment purposes only
#define | AFL_USERTI 0x02000000L
| the type information is definitive. More...
#define | AFL_RETFP 0x04000000L
| function returns a floating point value
#define | AFL_USEMODSP 0x08000000L
| insn modifes SP and uses the modified value More...
#define | AFL_NOTCODE 0x10000000L
| autoanalysis should not create code here
#define | ASCSTR_C ASCSTR_TERMCHR
| C-style ASCII string.
#define | ASCSTR_TERMCHR 0
| Character-terminated ASCII string. More...
#define | ASCSTR_PASCAL 1
| Pascal-style ASCII string (one byte length prefix)
#define | ASCSTR_LEN2 2
| Pascal-style, two-byte length prefix.
#define | ASCSTR_UNICODE 3
| Unicode string (UTF-16)
#define | ASCSTR_UTF16 3
| same
#define | ASCSTR_LEN4 4
| Pascal-style, four-byte length prefix.
#define | ASCSTR_ULEN2 5
| Pascal-style Unicode, two-byte length prefix.
#define | ASCSTR_ULEN4 6
| Pascal-style Unicode, four-byte length prefix.
#define | ASCSTR_UTF32 7
| four-byte Unicode codepoints
#define | ASCSTR_LAST 7
| Last string type.
#define | STRENC_DEFAULT 0x00
| use default encoding for this type (see get_default_encoding_idx())
#define | STRENC_NONE 0xFF
| force no-conversion encoding
#define | AP_ALLOWDUPS 0x00000001L
| use 'dup' construct
#define | AP_SIGNED 0x00000002L
| treats numbers as signed
#define | AP_INDEX 0x00000004L
| display array element indexes as comments
#define | AP_ARRAY 0x00000008L
| create as array (this flag is not stored in database)
#define | AP_IDXBASEMASK 0x000000F0L
| mask for number base of the indexes
#define | AP_IDXDEC 0x00000000L
| display indexes in decimal
#define | AP_IDXHEX 0x00000010L
| display indexes in hex
#define | AP_IDXOCT 0x00000020L
| display indexes in octal
#define | AP_IDXBIN 0x00000030L
| display indexes in binary
#define | SWI_SPARSE 0x01
| sparse switch (value table present) More...
#define | SWI_V32 0x02
| 32-bit values in table
#define | SWI_J32 0x04
| 32-bit jump offsets
#define | SWI_VSPLIT 0x08
| value table is split (only for 32-bit values)
#define | SWI_DEFAULT 0x10
| default case is present
#define | SWI_END_IN_TBL 0x20
| switchend in table (default entry)
#define | SWI_JMP_INV 0x40
| jumptable is inversed. More...
#define | SWI_SHIFT_MASK 0x180
| use formula (element<<shift) + elbase to find jump targets
#define | SWI_ELBASE 0x200
| elbase is present (if not and shift!=0, endof(jumpea) is used)
#define | SWI_JSIZE 0x400
| jump offset expansion bit
#define | SWI_VSIZE 0x800
| value table element size expansion bit
#define | SWI_SEPARATE 0x1000
| create an array of individual elements (otherwise separate items)
#define | SWI_SIGNED 0x2000
| jump table entries are signed
#define | SWI_CUSTOM 0x4000
| custom jump table. More...
#define | SWI_EXTENDED 0x8000
| this is a switch_info_ex_t
#define | SWI2_INDIRECT 0x0001
| value table elements are used as indexes into the jump table
#define | SWI2_SUBTRACT 0x0002
| table values are subtracted from the elbase instead of being added
#define | SWI2_HXNOLOWCASE 0x0004
| lowcase value should not be used by the decompiler (internal flag)
#define | SWI2_STDTBL 0x0008
| use standard table formatting (only xrefs are customized)
#define | SWI2_DEFRET 0x0010
| return in the default case (defjump==BADADDR)
#define | REFINFO_TYPE 0x000F
| reference type
#define | REFINFO_RVAOFF 0x0010
| based reference (rva) More...
#define | REFINFO_PASTEND 0x0020
| reference past an item More...
#define | REFINFO_CUSTOM 0x0040
| a custom reference More...
#define | REFINFO_NOBASE 0x0080
| don't create the base xref More...
#define | REFINFO_SUBTRACT 0x0100
| the reference value is subtracted from the base value instead of (as usual) being added to it
#define | REFINFO_SIGNEDOP 0x0200
| the operand value is sign-extended (only supported for REF_OFF8/16/32/64)
#define | MAXSTRUCPATH 32
| maximal inclusion depth of unions
#define | RIDX_FILE_FORMAT_NAME 1
| file format name for loader modules
#define | RIDX_SELECTORS 2
| 2..63 are for selector_t blob (see init_selectors())
#define | RIDX_GROUPS 64
| segment group information (see init_groups())
#define | RIDX_H_PATH 65
| C header path.
#define | RIDX_C_MACROS 66
| C predefined macros.
#define | RIDX_SMALL_IDC_OLD 67
| Instant IDC statements (obsolete)
#define | RIDX_NOTEPAD 68
| notepad blob, occupies 1000 indexes (1MB of text)
#define | RIDX_INCLUDE 1100
| assembler include file name
#define | RIDX_SMALL_IDC 1200
| Instant IDC statements, blob.
#define | RIDX_DUALOP_GRAPH 1300
| Graph text representation options.
#define | RIDX_DUALOP_TEXT 1301
| Text text representation options.
#define | RIDX_MD5 1302
| MD5 of the input file.
#define | RIDX_IDA_VERSION 1303
| version of ida which created the database
#define | RIDX_AUTO_PLUGINS 1304
| comma separated list of plugins to run More...
#define | RIDX_STR_ENCODINGS 1305
| a list of encodings for the program strings
#define | RIDX_SRCDBG_PATHS 1306
| source debug paths, occupies 20 indexes
#define | RIDX_SELECTED_EXTLANG 1327
| last selected extlang name (from the execute script box)
#define | RIDX_DBG_BINPATHS 1328
| debug binary paths, occupies 20 indexes
#define | RIDX_SHA256 1349
| SHA256 of the input file.
#define | RIDX_ALT_VERSION uval_t(-1)
| initial version of database
#define | RIDX_ALT_CTIME uval_t(-2)
| database creation timestamp
#define | RIDX_ALT_ELAPSED uval_t(-3)
| seconds database stayed open
#define | RIDX_ALT_NOPENS uval_t(-4)
| how many times the database is opened
#define | RIDX_ALT_CRC32 uval_t(-5)
| input file crc32
#define | RIDX_ALT_IMAGEBASE uval_t(-6)
| image base
#define | RIDX_ALT_IDSNODE uval_t(-7)
| ids modnode id (for import_module)
#define | RIDX_ALT_FSIZE uval_t(-8)
| input file size
Helper macros
#define | _N_PASTE(x, y) x ## y
#define | N_PASTE(x, y) _N_PASTE(x,y)
#define | NSUP_TYPE(name, type, code, size)
#define | NSUP_CHAR(name, code)
#define | NSUP_VTYPE(name, type, code)
#define | NSUP_BLOB(name, type, code)
#define | NALT_TYPE(get, set, del, type, code)
#define | NSUP_STRUCT(name, code) NSUP_TYPE(name,N_PASTE(name,_t),code,sizeof(N_PASTE(name,_t)))
#define | NSUP_STRING(name, code) NSUP_CHAR(name,code)
#define | NSUP_VAR(name, code, t) NSUP_VTYPE(name,t,code)
#define | NALT_EA( get, set, del, code) NALT_TYPE(get,set,del,ea_t, code)
#define | NALT_UINT32(get, set, del, code) NALT_TYPE(get,set,del,uint32,code)
#define | NALT_UINT16(get, set, del, code) NALT_TYPE(get,set,del,uint16,code)
#define | NALT_UINT8(get, set, del, code) NALT_TYPE(get,set,del,uint8, code)

## Typedefs
typedef uchar | reftype_t
| see Types of references
typedef qvector< const custom_refinfo_handler_t * > | custom_refinfo_handlers_t
| vector of refinfo handlers
typedef uchar | type_t
typedef uchar | p_list

## Variables
idaman netnode ida_export_data | net_patch
| Node with information about patched bytes. More...
idaman netnode ida_export_data | import_node
| Node with information about imported modules. More...
const reftype_t | REF_OFF8 = 0
| 8bit full offset
const reftype_t | REF_OFF16 = 1
| 16bit full offset
const reftype_t | REF_OFF32 = 2
| 32bit full offset
const reftype_t | REF_LOW8 = 3
| low 8bits of 16bit offset
const reftype_t | REF_LOW16 = 4
| low 16bits of 32bit offset
const reftype_t | REF_HIGH8 = 5
| high 8bits of 16bit offset
const reftype_t | REF_HIGH16 = 6
| high 16bits of 32bit offset
const reftype_t | REF_VHIGH = 7
| high processor_t::high_fixup_bits of 32bit offset
const reftype_t | REF_VLOW = 8
| low processor_t::high_fixup_bits of 32bit offset
const reftype_t | REF_OFF64 = 9
| 64bit full offset
const reftype_t | REF_LAST = REF_OFF64

## Macro Definition Documentation

#define NSUP_TYPE | ( |  | name,
|  |  | type,
|  |  | code,
|  |  | size
| ) |  |

Value:
inline ssize_t N_PASTE(get_,name)(ea_t ea, type *buf, size_t bufsize) \
{ return netnode(ea).supval(code, buf, bufsize); } \
inline void N_PASTE(set_,name)(ea_t ea,const type *oi) \
{ netnode(ea).supset(code,oi,size); } \
inline void N_PASTE(del_,name)(ea_t ea) { netnode(ea).supdel(code); }
ea_t
uint32 ea_t
effective address
Definition: pro.h:403
netnode
Definition of the IDA database node.
Definition: netnode.hpp:202
netnode::supval
ssize_t supval(nodeidx_t alt, void *buf, size_t bufsize, char tag=stag) const
Get value of the specified supval array element.
Definition: netnode.hpp:548
netnode::supdel
bool supdel(nodeidx_t alt, char tag=stag)
Delete supval element.
Definition: netnode.hpp:592
ssize_t
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition: pro.h:351
netnode::supset
bool supset(nodeidx_t alt, const void *value, size_t length=0, char tag=stag)
Set value of supval array element.
Definition: netnode.hpp:584

#define NSUP_CHAR | ( |  | name,
|  |  | code
| ) |  |

Value:
inline ssize_t N_PASTE(get_,name)(ea_t ea, char *buf, size_t bufsize) \
{ return netnode(ea).supstr(code, buf, bufsize); } \
inline void N_PASTE(set_,name)(ea_t ea,const char *oi) \
{ netnode(ea).supset(code,oi); } \
inline void N_PASTE(del_,name)(ea_t ea) { netnode(ea).supdel(code); }
netnode::supstr
ssize_t supstr(nodeidx_t alt, char *buf, size_t bufsize, char tag=stag) const
Get string value of the specified supval array element.
Definition: netnode.hpp:573
ea_t
uint32 ea_t
effective address
Definition: pro.h:403
netnode
Definition of the IDA database node.
Definition: netnode.hpp:202
netnode::supdel
bool supdel(nodeidx_t alt, char tag=stag)
Delete supval element.
Definition: netnode.hpp:592
ssize_t
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition: pro.h:351
netnode::supset
bool supset(nodeidx_t alt, const void *value, size_t length=0, char tag=stag)
Set value of supval array element.
Definition: netnode.hpp:584

#define NSUP_VTYPE | ( |  | name,
|  |  | type,
|  |  | code
| ) |  |

Value:
inline ssize_t N_PASTE(get_,name)(ea_t ea, type *buf, size_t bufsize) \
{ return netnode(ea).supval(code, buf, bufsize); } \
inline void N_PASTE(set_,name)(ea_t ea,const type *oi,int size) \
{ netnode(ea).supset(code,oi,size); } \
inline void N_PASTE(del_,name)(ea_t ea) { netnode(ea).supdel(code); }
ea_t
uint32 ea_t
effective address
Definition: pro.h:403
netnode
Definition of the IDA database node.
Definition: netnode.hpp:202
netnode::supval
ssize_t supval(nodeidx_t alt, void *buf, size_t bufsize, char tag=stag) const
Get value of the specified supval array element.
Definition: netnode.hpp:548
netnode::supdel
bool supdel(nodeidx_t alt, char tag=stag)
Delete supval element.
Definition: netnode.hpp:592
ssize_t
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition: pro.h:351
netnode::supset
bool supset(nodeidx_t alt, const void *value, size_t length=0, char tag=stag)
Set value of supval array element.
Definition: netnode.hpp:584

#define NSUP_BLOB | ( |  | name,
|  |  | type,
|  |  | code
| ) |  |

Value:
inline type *N_PASTE(get_,name)(ea_t ea,type *buf,size_t *bufsize) \
{ return (type *)netnode(ea).getblob(buf,bufsize,code,stag); } \
inline void N_PASTE(set_,name)(ea_t ea,const type *oi,size_t size) \
{ netnode(ea).setblob(oi,size,code,stag); } \
inline void N_PASTE(del_,name)(ea_t ea) { netnode(ea).delblob(code,stag); }
stag
const char stag
Array of supvals.
Definition: netnode.hpp:122
netnode::getblob
void * getblob(void *buf, size_t *bufsize, nodeidx_t _start, char tag)
Get blob from a netnode.
Definition: netnode.hpp:824
ea_t
uint32 ea_t
effective address
Definition: pro.h:403
netnode
Definition of the IDA database node.
Definition: netnode.hpp:202
netnode::delblob
int delblob(nodeidx_t _start, char tag)
Delete a blob.
Definition: netnode.hpp:850
netnode::setblob
bool setblob(const void *buf, size_t size, nodeidx_t _start, char tag)
Store a blob in a netnode.
Definition: netnode.hpp:838

#define NALT_TYPE | ( |  | get,
|  |  | set,
|  |  | del,
|  |  | type,
|  |  | code
| ) |  |

Value:
inline type get(ea_t ea) { type x; return netnode(ea).supval(code, &x, sizeof(x), atag) > 0 ? type(x-1) : type(-1); } \
inline void set(ea_t ea,type x) { x++; netnode(ea).supset(code, &x, sizeof(x), atag); } \
inline void del(ea_t ea) { netnode(ea).supdel(code, atag); }
atag
const char atag
Array of altvals.
Definition: netnode.hpp:121
ea_t
uint32 ea_t
effective address
Definition: pro.h:403
netnode
Definition of the IDA database node.
Definition: netnode.hpp:202
netnode::supval
ssize_t supval(nodeidx_t alt, void *buf, size_t bufsize, char tag=stag) const
Get value of the specified supval array element.
Definition: netnode.hpp:548
netnode::supdel
bool supdel(nodeidx_t alt, char tag=stag)
Delete supval element.
Definition: netnode.hpp:592
netnode::supset
bool supset(nodeidx_t alt, const void *value, size_t length=0, char tag=stag)
Set value of supval array element.
Definition: netnode.hpp:584

#define IMPLEMENT_AFLAG_FUNCTIONS | ( |  | bit,
|  |  | test,
|  |  | set,
|  |  | clear
| ) |  |

Value:
inline bool test(ea_t ea) { return (get_aflags(ea) & bit) != 0; } \
inline void set(ea_t ea) { set_abits(ea, bit); } \
inline void clear(ea_t ea) { clr_abits(ea, bit); }
ea_t
uint32 ea_t
effective address
Definition: pro.h:403

Used to define 3 functions to work with a bit:

- int test(ea_t ea); // test if the bit is set
- void set(ea_t ea); // set bit
- void clear(ea_t ea); // clear bit

#define DEFINE_PATH_FUNCS | ( |  | name,
|  |  | code
| ) |  |

Value:
inline int N_PASTE(get_,name)(ea_t ea, tid_t *path, adiff_t *delta) \
{ return read_struc_path(netnode(ea), code, path, delta); } \
inline void N_PASTE(set_,name)(ea_t ea, const tid_t *path, int plen, adiff_t delta) \
{ write_struc_path(netnode(ea), code, path, plen, delta); } \
inline void N_PASTE(del_,name)(ea_t ea, const tid_t *path, int plen) \
{ del_struc_path(netnode(ea), code, path, plen); }
ea_t
uint32 ea_t
effective address
Definition: pro.h:403
tid_t
ea_t tid_t
type id (for enums, structs, etc)
Definition: pro.h:3298
netnode
Definition of the IDA database node.
Definition: netnode.hpp:202
adiff_t
int32 adiff_t
address difference
Definition: pro.h:406

## Typedef Documentation

typedef int idaapi import_enum_cb_t(ea_t ea, const char *name, uval_t ord, void *param)

Callback for enumerating imports.

Parameters

  ea | import address
  name | import name (NULL if imported by ordinal)
  ord | import ordinal (0 for imports by name)
  param | user parameter passed to enum_import_names()

Return values

  1 | ok
  0 | stop enumeration

## Function Documentation

idaman reftype_t ida_export get_reftype_by_size | ( | size_t | size | ) |

Get REF_...

constant from size Supported sizes: 1,2,4,8,16 For other sizes returns reftype(-1)

uint32 idaapi retrieve_input_file_crc32 | ( | void |  | ) |
| inline

Get input file crc32 stored in the database.

it can be used to check that the input file has not been changed.

idaman const char* ida_export get_encoding_name | ( | int | idx | ) |

Get encoding name for specific index (1-based).

Returns
  NULL if idx is out of bounds

idaman int ida_export add_encoding | ( | const char * | encoding | ) |

Add a new encoding (e.g.

"utf-8").

Returns
  its index (1-based) if it's already in the list, return its index

idaman int ida_export get_default_encoding_idx | ( | int32 | strtype | ) |

Get default encoding index for a specific string type.

0 means no specific encoding is set - byte values are displayed without conversion.

idaman bool ida_export get_import_module_name | ( | int | mod_index,
|  | char * | buf,
|  | size_t | bufsize
| ) |  |

Get import module name.

Return values

  true | ok
  false | bad index

idaman int ida_export enum_import_names | ( | int | mod_index,
|  | import_enum_cb_t * | callback,
|  | void * | param = `NULL`
| ) |  |

Enumerate imports from specific module.

Return values

  1 | finished ok
  -1 | error
  other | callback return value (<=0)

## Variable Documentation

idaman netnode ida_export_data net_patch

Node with information about patched bytes.

altval(ea)<-(oldval). charval(ea, PATCH_TAG)==1 => byte has been patched.

idaman netnode ida_export_data import_node

Node with information about imported modules.

Note
  Please use enum_import_names() to work with imports! supval(i) -> module name; altval(i) -> module node. altval(-1) -> number of modules. the module node is:
  - supval(ea) -> function name
  - altval(ord) -> import ea
  - for modules that import the same ordinal multiple times: altval(ea, 'O') -> ordinal