emu.h

Go to the documentation of this file.
00001 /********************************************************************************
00002  *                               libemu
00003  *
00004  *                    - x86 shellcode emulation -
00005  *
00006  *
00007  * Copyright (C) 2007  Paul Baecher & Markus Koetter
00008  * 
00009  * This program is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU General Public License
00011  * as published by the Free Software Foundation; either version 2
00012  * of the License, or (at your option) any later version.
00013  * 
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  * 
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00022  * 
00023  * 
00024  *             contact nepenthesdev@users.sourceforge.net  
00025  *
00026  *******************************************************************************/
00027 
00028 #ifndef HAVE_EMU_H
00029 #define HAVE_EMU_H
00030 
00031 #include <stdio.h>
00032 #include <stdint.h>
00033 
00034 #ifndef MIN
00035         #define        MIN(a,b) (((a)<(b))?(a):(b))
00036 #endif
00037 
00038 #ifndef MAX
00039         #define        MAX(a,b) (((a)>(b))?(a):(b))
00040 #endif
00041 
00042 
00043 struct emu;
00044 struct emu_logging;
00045 struct emu_cpu;
00046 struct emu_fpu;
00047 
00048 
00055 struct emu *emu_new(void);
00056 
00062 void emu_free(struct emu *e);
00063 
00071 struct emu_memory *emu_memory_get(struct emu *e);
00072 
00080 struct emu_logging *emu_logging_get(struct emu *e);
00081 
00089 struct emu_cpu *emu_cpu_get(struct emu *e);
00090 
00097 void emu_errno_set(struct emu *e, int err);
00098 
00106 int emu_errno(struct emu *c);
00107 
00114 void emu_strerror_set(struct emu *e, const char *format, ...);
00115 
00123 const char *emu_strerror(struct emu *e);
00124 
00125 
00126 /*int32_t emu_parse(struct emu *e);
00127 int32_t emu_step(struct emu *e);*/
00128 #endif // HAVE_EMU_H

Generated on Sun Jan 9 16:47:44 2011 for libemu by  doxygen 1.6.1