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
target.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, 2013 The University of Utah
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of
7  * the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
17  */
18 
19 #include <argp.h>
20 
21 #include "log.h"
22 #include "generic_rpc.h"
23 #include "target_rpc.h"
24 
25 /* Pull in gsoap-generated namespace array. */
26 #include "target.nsmap"
27 
28 int main(int argc, char **argv) {
29  struct generic_rpc_config cfg;
30 
31  if (argp_parse(&generic_rpc_argp,argc,argv,0,NULL,&cfg))
32  exit(errno);
33 
35 
36  atexit(target_rpc_fini);
37 
38  /*
39  * Setup some config options.
40  *
41  * First, do the signals we want our dedicated sighandling thread to catch.
42  * Then set the name and our primary handler. That's it!
43  */
44  sigemptyset(&cfg.sigset);
45  //sigaddset(&cfg.sigset,SIGINT);
46  sigaddset(&cfg.sigset,SIGCHLD);
47  sigaddset(&cfg.sigset,SIGPIPE);
48 
49  cfg.name = "target";
50 
52 
53  return generic_rpc_serve(&cfg);
54 }
void target_rpc_fini(void)
Definition: target_rpc.c:416
int generic_rpc_serve(struct generic_rpc_config *cfg)
Definition: generic_rpc.c:349
struct argp generic_rpc_argp
Definition: generic_rpc.c:261
int target_rpc_handle_request(struct soap *soap)
Definition: target_rpc.c:465
void target_rpc_init(void)
Definition: target_rpc.c:393
int main(int argc, char **argv)
Definition: target.c:28
int(* handle_request)(struct soap *soap)
Definition: generic_rpc.h:51