mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-03-24 18:16:24 +01:00

The 'common' library has been removed. The only project that actually used it was metsrv, so the code that metsrv required from common is now directly compiled in as part of that project. The common folder now contains files that are importanta cross all of the projects, with a primary focus on the new "API" style function. What this means is that MetSrv has an API that it exposes through a function pointer that is passed to the extension when it's initialised. This pointer references a structure with all the API functions wired in. This means that: * Extensions don't need to know anything about metsrv at compile time. * The delay loading code can be removed, which was one of the last instances of "metsrv.dll" as a string. * Metsrv.dll no longer exports any functions. More to come.
29 lines
911 B
C
29 lines
911 B
C
/*!
|
|
* @file list.h
|
|
* @brief Declarations for functions that operate on lists.
|
|
*/
|
|
#ifndef _METERPRETER_COMMON_LIST_H
|
|
#define _METERPRETER_COMMON_LIST_H
|
|
|
|
/*! @brief Container struct for data the lives in a list. */
|
|
typedef struct _NODE
|
|
{
|
|
struct _NODE * next; ///< Pointer to the next node in the list.
|
|
struct _NODE * prev; ///< Pointer to the previous node in the list.
|
|
LPVOID data; ///< Reference to the data in the list node.
|
|
} NODE, *PNODE;
|
|
|
|
/*! @brief Container structure for a list instance. */
|
|
typedef struct _LIST
|
|
{
|
|
NODE * start; ///< Pointer to the first node in the list.
|
|
NODE * end; ///< Pointer to the last node in the list.
|
|
DWORD count; ///< Count of elements in the list.
|
|
LOCK * lock; ///< Reference to the list's synchronisation lock.
|
|
} LIST, *PLIST;
|
|
|
|
typedef BOOL (*PLISTENUMCALLBACK)(LPVOID pState, LPVOID pData);
|
|
typedef VOID (*PCLEARFUNC)(LPVOID pData);
|
|
|
|
#endif
|