Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Functions | Variables
analysis_rpc.c File Reference
#include "analysis_xml.h"
#include "analysis_rpc.h"
#include "log.h"
#include "monitor.h"
#include "analysis.h"
#include "target_api.h"
#include "target.h"
#include "generic_rpc.h"
#include "target_rpc.h"
#include "proxyreq.h"
#include "util.h"
#include "common_xml.h"
#include "target_xml.h"
#include "analysis_listener_moduleStub.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
Include dependency graph for analysis_rpc.c:

Go to the source code of this file.

Data Structures

struct  analysis_rpc_listener_result_data
 
struct  analysis_rpc_listener_event_data
 

Macros

#define _CB_SAVEBUF_INC   1024
 

Functions

void analysis_rpc_init (void)
 
void analysis_rpc_fini (void)
 
int analysis_rpc_handle_request (struct soap *soap)
 
int analysis_rpc_notify_listeners_result (struct analysis *analysis, struct analysis_datum *datum)
 
int analysis_rpc_stdout_callback (int fd, char *buf, int len, void *state)
 
int analysis_rpc_stderr_callback (int fd, char *buf, int len, void *state)
 
int vmi1__ListAnalysisDescNames (struct soap *soap, void *_, struct vmi1__AnalysisDescNamesResponse *r)
 
int vmi1__ListAnalysisDescs (struct soap *soap, void *_, struct vmi1__AnalysisDescsResponse *r)
 
int vmi1__ListAnalyses (struct soap *soap, void *_, struct vmi1__AnalysesResponse *r)
 
int vmi1__UploadAnalysis (struct soap *soap, struct vmi1__AnalysisDescT *analysisDesc, struct xsd__hexBinary *inputFileContents, struct vmi1__NoneResponse *r)
 
int vmi1__InstantiateAnalysis (struct soap *soap, struct vmi1__AnalysisSpecT *analysisSpec, struct vmi1__TargetSpecT *targetSpec, struct vmi1__ListenerT *ownerListener, struct vmi1__AnalysisResponse *r)
 
int __vmi1__InstantiateOverlayAnalysis (struct soap *soap, struct vmi1__AnalysisSpecT *analysisSpec, struct vmi1__TargetSpecT *targetSpec, struct vmi1__TargetSpecT *overlayTargetSpec, vmi1__ThreadIdT baseThid, char *baseThreadName, vmi1__ListenerT *ownerListener, struct vmi1__AnalysisResponse *r)
 
int vmi1__InstantiateOverlayAnalysis (struct soap *soap, struct vmi1__AnalysisSpecT *analysisSpec, struct vmi1__TargetSpecT *targetSpec, struct vmi1__TargetSpecT *overlayTargetSpec, vmi1__ThreadIdT baseThid, vmi1__ListenerT *ownerListener, struct vmi1__AnalysisResponse *r)
 
int vmi1__InstantiateOverlayAnalysisByThreadName (struct soap *soap, struct vmi1__AnalysisSpecT *analysisSpec, struct vmi1__TargetSpecT *targetSpec, struct vmi1__TargetSpecT *overlayTargetSpec, char *baseThreadName, vmi1__ListenerT *ownerListener, struct vmi1__AnalysisResponse *r)
 
int vmi1__PauseAnalysis (struct soap *soap, vmi1__AnalysisIdT aid, struct vmi1__NoneResponse *r)
 
int vmi1__ResumeAnalysis (struct soap *soap, vmi1__AnalysisIdT aid, struct vmi1__NoneResponse *r)
 
int vmi1__CloseAnalysis (struct soap *soap, vmi1__AnalysisIdT aid, struct vmi1__NoneResponse *r)
 
int vmi1__KillAnalysis (struct soap *soap, vmi1__AnalysisIdT aid, int kill_sig, struct vmi1__NoneResponse *r)
 
int vmi1__FinalizeAnalysis (struct soap *soap, vmi1__AnalysisIdT aid, struct vmi1__NoneResponse *r)
 
int vmi1__GetAnalysis (struct soap *soap, vmi1__AnalysisIdT aid, struct vmi1__AnalysisResponse *r)
 
int vmi1__GetAnalysisStatus (struct soap *soap, vmi1__AnalysisIdT aid, struct vmi1__AnalysisStatusResponse *r)
 
int vmi1__GetAnalysisResults (struct soap *soap, vmi1__AnalysisIdT aid, struct vmi1__AnalysisResultsResponse *r)
 
int vmi1__GetAnalysisLogs (struct soap *soap, vmi1__AnalysisIdT aid, int maxSize, struct vmi1__AnalysisLogsResponse *r)
 
int vmi1__AnalysisBindListener (struct soap *soap, vmi1__AnalysisIdT aid, vmi1__ListenerT *listener, struct vmi1__NoneResponse *r)
 
int vmi1__AnalysisUnbindListener (struct soap *soap, vmi1__AnalysisIdT aid, vmi1__ListenerT *listener, struct vmi1__NoneResponse *r)
 
int analysis_rpc_notify_listeners_event (struct analysis *analysis, enum _vmi1__analysisEventType type)
 

Variables

struct vmi1__DebugFileOptsT defDebugFileOpts
 
struct monitor_objtype_ops analysis_rpc_monitor_objtype_ops
 

Macro Definition Documentation

#define _CB_SAVEBUF_INC   1024

Definition at line 258 of file analysis_rpc.c.

Function Documentation

int __vmi1__InstantiateOverlayAnalysis ( struct soap *  soap,
struct vmi1__AnalysisSpecT *  analysisSpec,
struct vmi1__TargetSpecT *  targetSpec,
struct vmi1__TargetSpecT *  overlayTargetSpec,
vmi1__ThreadIdT  baseThid,
char *  baseThreadName,
vmi1__ListenerT *  ownerListener,
struct vmi1__AnalysisResponse r 
)

Definition at line 1252 of file analysis_rpc.c.

void analysis_rpc_fini ( void  )

Definition at line 110 of file analysis_rpc.c.

int analysis_rpc_handle_request ( struct soap *  soap)

The main handling function. Will use proxyreqs for now; perhaps later we'll optionally add a different model involving a SOAP server for each target/analysis, where the master server is a launchpad/registry.

Definition at line 159 of file analysis_rpc.c.

void analysis_rpc_init ( void  )

Module init/fini stuff.

Definition at line 86 of file analysis_rpc.c.

int analysis_rpc_notify_listeners_event ( struct analysis analysis,
enum _vmi1__analysisEventType  type 
)

Definition at line 2493 of file analysis_rpc.c.

int analysis_rpc_notify_listeners_result ( struct analysis analysis,
struct analysis_datum datum 
)

Definition at line 225 of file analysis_rpc.c.

int analysis_rpc_stderr_callback ( int  fd,
char *  buf,
int  len,
void *  state 
)

Definition at line 619 of file analysis_rpc.c.

int analysis_rpc_stdout_callback ( int  fd,
char *  buf,
int  len,
void *  state 
)

Definition at line 260 of file analysis_rpc.c.

int vmi1__AnalysisBindListener ( struct soap *  soap,
vmi1__AnalysisIdT  aid,
vmi1__ListenerT *  listener,
struct vmi1__NoneResponse r 
)

Definition at line 2218 of file analysis_rpc.c.

int vmi1__AnalysisUnbindListener ( struct soap *  soap,
vmi1__AnalysisIdT  aid,
vmi1__ListenerT *  listener,
struct vmi1__NoneResponse r 
)

Definition at line 2282 of file analysis_rpc.c.

int vmi1__CloseAnalysis ( struct soap *  soap,
vmi1__AnalysisIdT  aid,
struct vmi1__NoneResponse r 
)

Definition at line 2005 of file analysis_rpc.c.

int vmi1__FinalizeAnalysis ( struct soap *  soap,
vmi1__AnalysisIdT  aid,
struct vmi1__NoneResponse r 
)

Definition at line 2075 of file analysis_rpc.c.

int vmi1__GetAnalysis ( struct soap *  soap,
vmi1__AnalysisIdT  aid,
struct vmi1__AnalysisResponse r 
)

Definition at line 2106 of file analysis_rpc.c.

int vmi1__GetAnalysisLogs ( struct soap *  soap,
vmi1__AnalysisIdT  aid,
int  maxSize,
struct vmi1__AnalysisLogsResponse r 
)

Definition at line 2179 of file analysis_rpc.c.

int vmi1__GetAnalysisResults ( struct soap *  soap,
vmi1__AnalysisIdT  aid,
struct vmi1__AnalysisResultsResponse r 
)

Definition at line 2156 of file analysis_rpc.c.

int vmi1__GetAnalysisStatus ( struct soap *  soap,
vmi1__AnalysisIdT  aid,
struct vmi1__AnalysisStatusResponse r 
)

Definition at line 2133 of file analysis_rpc.c.

int vmi1__InstantiateAnalysis ( struct soap *  soap,
struct vmi1__AnalysisSpecT *  analysisSpec,
struct vmi1__TargetSpecT *  targetSpec,
struct vmi1__ListenerT *  ownerListener,
struct vmi1__AnalysisResponse r 
)

Definition at line 722 of file analysis_rpc.c.

int vmi1__InstantiateOverlayAnalysis ( struct soap *  soap,
struct vmi1__AnalysisSpecT *  analysisSpec,
struct vmi1__TargetSpecT *  targetSpec,
struct vmi1__TargetSpecT *  overlayTargetSpec,
vmi1__ThreadIdT  baseThid,
vmi1__ListenerT *  ownerListener,
struct vmi1__AnalysisResponse r 
)

Definition at line 1871 of file analysis_rpc.c.

int vmi1__InstantiateOverlayAnalysisByThreadName ( struct soap *  soap,
struct vmi1__AnalysisSpecT *  analysisSpec,
struct vmi1__TargetSpecT *  targetSpec,
struct vmi1__TargetSpecT *  overlayTargetSpec,
char *  baseThreadName,
vmi1__ListenerT *  ownerListener,
struct vmi1__AnalysisResponse r 
)

Definition at line 1884 of file analysis_rpc.c.

int vmi1__KillAnalysis ( struct soap *  soap,
vmi1__AnalysisIdT  aid,
int  kill_sig,
struct vmi1__NoneResponse r 
)

Definition at line 2036 of file analysis_rpc.c.

int vmi1__ListAnalyses ( struct soap *  soap,
void *  _,
struct vmi1__AnalysesResponse r 
)

Definition at line 684 of file analysis_rpc.c.

int vmi1__ListAnalysisDescNames ( struct soap *  soap,
void *  _,
struct vmi1__AnalysisDescNamesResponse r 
)

Definition at line 629 of file analysis_rpc.c.

int vmi1__ListAnalysisDescs ( struct soap *  soap,
void *  _,
struct vmi1__AnalysisDescsResponse r 
)

Definition at line 654 of file analysis_rpc.c.

int vmi1__PauseAnalysis ( struct soap *  soap,
vmi1__AnalysisIdT  aid,
struct vmi1__NoneResponse r 
)

Definition at line 1897 of file analysis_rpc.c.

int vmi1__ResumeAnalysis ( struct soap *  soap,
vmi1__AnalysisIdT  aid,
struct vmi1__NoneResponse r 
)

Definition at line 1951 of file analysis_rpc.c.

int vmi1__UploadAnalysis ( struct soap *  soap,
struct vmi1__AnalysisDescT *  analysisDesc,
struct xsd__hexBinary inputFileContents,
struct vmi1__NoneResponse r 
)

Definition at line 715 of file analysis_rpc.c.

Variable Documentation

struct monitor_objtype_ops analysis_rpc_monitor_objtype_ops
Initial value:
= {
.evloop_attach = NULL,
.evloop_detach = NULL,
.close = analysis_rpc_monitor_close,
.fini = analysis_rpc_monitor_fini,
.evloop_is_attached = NULL,
.error = analysis_rpc_monitor_error,
.fatal_error = analysis_rpc_monitor_fatal_error,
.event = analysis_rpc_monitor_event,
.child_recv_msg = analysis_rpc_monitor_child_recv_msg,
.recv_msg = analysis_rpc_monitor_recv_msg,
}

Definition at line 70 of file analysis_rpc.c.

struct vmi1__DebugFileOptsT defDebugFileOpts

Definition at line 45 of file debuginfo_rpc.c.