Main Page   Modules   Data Structures   File List   Data Fields   Examples  

melf_internal.h

00001 /*
00002  * nologin   http://www.nologin.org
00003  * --------------------------------
00004  *
00005  * ELF manipulation library
00006  *
00007  * skape
00008  * [email protected]
00009  */
00010 #ifndef _MELF_INTERNAL_H
00011 #define _MELF_INTERNAL_H
00012 
00013 #include <stdlib.h>
00014 #include <stdio.h>
00015 #include <string.h>
00016 #include <sys/stat.h>
00017 #include <sys/types.h>
00018 #include <sys/mman.h>
00019 #include <unistd.h>
00020 #include <fcntl.h>
00021 
00022 #include <netinet/in.h>
00023 
00024 ELF_SPEC_HEADER *_melf_listAppend(ELF_SPEC_HEADER_LIST *list, void *header, unsigned long headerLength, void *content, unsigned long contentLength); 
00025 unsigned long _melf_listRemove(ELF_SPEC_HEADER_LIST *list, unsigned long id);
00026 unsigned long _melf_listFlush(ELF_SPEC_HEADER_LIST *list);
00027 void _melf_listDestroyItem(ELF_SPEC_HEADER *header);
00028 
00029 /*
00030  * These methods are used for inline buffer manipulation where one large buffer is being used (read-only access).
00031  *
00032  * This method is more efficient, but has problems with memory addresses changing between modifications.
00033  */
00034 void *_melf_sectionAllocateItem(ELF_SPEC_HEADER *sect, unsigned long itemSize);
00035 void _melf_sectionShrink(ELF_SPEC_HEADER *sect, void *at, unsigned long itemSize);
00036 void _melf_sectionDestroy(ELF_SPEC_HEADER *sect);
00037 
00038 /*
00039  * These methods are used to operate on items that are really stored in a linked list with next/prev pointers appended to the backs of the 
00040  * structures.
00041  */
00042 void *_melf_sectionAppendEntryList(ELF_SPEC_HEADER *sect, void *item, unsigned long itemSize);
00043 void _melf_sectionRemoveEntryList(ELF_SPEC_HEADER *sect, void *item);
00044 void *_melf_sectionEnumEntryList(ELF_SPEC_HEADER *sect, unsigned long index);
00045 void _melf_sectionFlushEntryList(ELF_SPEC_HEADER *sect);
00046 
00047 void _melf_sectionInitializeEntryList(MELF *melf, ELF_SPEC_HEADER *sect);
00048 void _melf_sectionSynchronizeEntryList(MELF *melf, ELF_SPEC_HEADER *sect);
00049 
00050 /*
00051  * Program header stuff
00052  */
00053 void _melf_programDestroy(ELF_SPEC_HEADER *sect);
00054 
00055 #endif

Generated on Tue May 4 00:14:34 2004 for libmelf by doxygen1.2.15