]> sourceware.org Git - systemtap.git/blob - remote.h
stapbpf PR22330 fixes :: identify format types of pe_unknown arguments
[systemtap.git] / remote.h
1 // systemtap remote execution
2 // Copyright (C) 2010-2011 Red Hat Inc.
3 //
4 // This file is part of systemtap, and is free software. You can
5 // redistribute it and/or modify it under the terms of the GNU General
6 // Public License (GPL); either version 2, or (at your option) any
7 // later version.
8
9 #ifndef REMOTE_H
10 #define REMOTE_H
11
12 #include <string>
13 #include <vector>
14
15 extern "C" {
16 #include <poll.h>
17 }
18
19 #include "session.h"
20
21 class remote {
22 private:
23 virtual int prepare() { return 0; }
24 virtual int start() = 0;
25 virtual int finish() = 0;
26
27 virtual void prepare_poll(std::vector<pollfd>&) {}
28 virtual void handle_poll(std::vector<pollfd>&) {}
29
30 protected:
31 systemtap_session* s;
32 std::string prefix; // stap --remote-prefix
33 std::string staprun_r_arg; // PR13354 data: remote_uri()/remote_idx()
34
35 remote(systemtap_session& s): s(&s) {}
36
37 public:
38 static remote* create(systemtap_session& s, const std::string& uri, int idx);
39 static int run(const std::vector<remote*>& remotes);
40
41 systemtap_session* get_session() { return s; }
42
43 virtual ~remote() {}
44 };
45
46 #endif // REMOTE_H
47
48 /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */
This page took 0.037865 seconds and 5 git commands to generate.