IDA C++ SDK 9.2
Loading...
Searching...
No Matches
libfuncs.hpp
Go to the documentation of this file.
1/*
2 * Interactive disassembler (IDA).
3 * Copyright (c) 2005-2025 Hex-Rays SA <support@hex-rays.com>
4 * ALL RIGHTS RESERVED.
5 *
6 * Routines and data structures for working with library signatures (e.g. FLIRT).
7 */
8#ifndef __LIBFUNC_HPP
9#define __LIBFUNC_HPP
10#pragma pack(push, 1)
12{
13 char magic[6]; // 'IDASGN'
14#define SIGN_HEADER_MAGIC "IDASGN"
15 uchar version; // currently 7 (see fix_version() below)
16#define SIGN_HEADER_VERSION 10
18 uint32 file_formats; // allowed file formats (filetype_t)
19 uint16 ostype; // operation system type (bit field)
20#define OSTYPE_MSDOS 0x0001
21#define OSTYPE_WIN 0x0002
22#define OSTYPE_OS2 0x0004
23#define OSTYPE_NETW 0x0008
24#define OSTYPE_UNIX 0x0010
25#define OSTYPE_OTHER 0x0020
26 uint16 apptype; // application type:
27#define APPT_CONSOLE 0x0001 // console
28#define APPT_GRAPHIC 0x0002 // graphics
29#define APPT_PROGRAM 0x0004 // EXE
30#define APPT_LIBRARY 0x0008 // DLL
31#define APPT_DRIVER 0x0010 // DRIVER
32#define APPT_1THREAD 0x0020 // Singlethread
33#define APPT_MTHREAD 0x0040 // Multithread
34#define APPT_16BIT 0x0080 // 16 bit application
35#define APPT_32BIT 0x0100 // 32 bit application
36#define APPT_64BIT 0x0200 // 64 bit application
37 //
38 // Idea: check library date and exe date
39 //
40 uint16 flags; // signature file flags
41#define LS_STARTUP 0x0001 // has startup entry as first module
42#define LS_CTYPE 0x0002 // has ctype
43#define LS_CTYPE2 0x0004 // ctype element is 2 bytes
44#define LS_CTYPE_ALT 0x0008 // alternative ctype checksum present
45#define LS_ZIP 0x0010 // compressed signature
46#define LS_CTYPE_3V 0x0020 // 3rd variant of ctype checksum present
49 char ctype_name[12];
51 uint16 ctype_crc_alt; // added in version 5
52 uint32 number_of_modules; // added in version 6
54 uint16 ctype_crc_3v; // added in version 10
55
56 void fix_version(FILE *infp);
57};
58#pragma pack(pop)
59
65
66idaman bool ida_export get_idasgn_header_by_short_name(idasgn_header_t *out_header, qstring *out_libname, const char *name);
67
72
73idaman bool ida_export get_idasgn_path_by_short_name(qstring *out_fullpath, const char *name);
74#endif
idaman bool ida_export get_idasgn_header_by_short_name(idasgn_header_t *out_header, qstring *out_libname, const char *name)
Get idasgn header by a short signature name.
idaman bool ida_export get_idasgn_path_by_short_name(qstring *out_fullpath, const char *name)
Get idasgn full path by a short signature name.
unsigned short uint16
unsigned 16 bit value
Definition pro.h:346
unsigned int uint32
unsigned 32 bit value
Definition pro.h:348
unsigned char uchar
unsigned 8 bit value
Definition pro.h:337
_qstring< char > qstring
regular string
Definition pro.h:3694
Definition libfuncs.hpp:12
char magic[6]
Definition libfuncs.hpp:13
uint32 file_formats
Definition libfuncs.hpp:18
uint16 ctype_crc
Definition libfuncs.hpp:48
uint16 number_of_modules_v5
Definition libfuncs.hpp:47
uint16 flags
Definition libfuncs.hpp:40
uchar processor_id
Definition libfuncs.hpp:17
uint16 ctype_crc_alt
Definition libfuncs.hpp:51
char ctype_name[12]
Definition libfuncs.hpp:49
uint16 ctype_crc_3v
Definition libfuncs.hpp:54
uchar version
Definition libfuncs.hpp:15
uchar libname_length
Definition libfuncs.hpp:50
uint32 number_of_modules
Definition libfuncs.hpp:52
uint16 apptype
Definition libfuncs.hpp:26
uint16 ostype
Definition libfuncs.hpp:19
uint16 pattern_length
Definition libfuncs.hpp:53
void fix_version(FILE *infp)