]> sourceware.org Git - systemtap.git/blame - cscommon.h
PR21065: dtrace .d usdt parser: tolerate probe ... (...) : (...); syntax
[systemtap.git] / cscommon.h
CommitLineData
3dc20443 1// Common functions and macros used by the compile-server and its client.
cc7c72cd
DB
2#ifndef CSCOMMON_H
3#define CSCOMMON_H 1
3dc20443 4
b83e9872 5#if HAVE_NSS
3dc20443
DB
6extern "C"
7{
8#include <ssl.h>
aa14e6d2 9#include <nspr.h>
3dc20443 10}
b83e9872 11#endif
cc7c72cd 12
c89fe89c
DB
13// Versioning system for the protocol used for communication between the compile-server and client.
14// The original version is 1.0. After that, we use the systemtap release number.
15//
16// By Policy:
17// - All servers are backward compatible with clients. Servers adapt to the protocol version
18// of the client.
19// - All clients are backward compatible with servers. Clients adapt to the protocol version
20// of the server. Warnings are issued for servers lacking features.
21//
22// Features:
23// Version 1.0
24// Original version
25// Versions 1.6 and higher
26// Client:
27// - Passes localization variables to the server in the file client_tmpdir + "/locale"
71a522b5
DB
28// - Looks for the uprobes module in server_response + "/uprobes"
29// - No longer needs to remove stap's "Keeping temporary directory ..." message from
30// the server's stderr response.
c89fe89c 31// - Looks for 'version' tag in server's avahi record and does not automatically connect to
71a522b5 32// an incompatible server. Also prefers newer servers over older ones.
c89fe89c 33// Server:
71a522b5
DB
34// - Applies localization variables passed from the client to stap during translation.
35// - Looks for the uprobes module in server_response + "/uprobes"
36// - Uses --tmpdir to specify temp directory to be used by stap, instead of -k, in order to
37// avoid parsing error messages in search of stap's randomly-generated temp dir.
38// - Advertises its protocol version using a 'version' tag in avahi.
cc7c72cd 39//
c89fe89c 40#define CURRENT_CS_PROTOCOL_VERSION VERSION
cc7c72cd 41
c89fe89c 42struct cs_protocol_version
cc7c72cd 43{
c89fe89c
DB
44 cs_protocol_version (const char *v = "1.0") : v(0) { *this = v; }
45 ~cs_protocol_version ();
46 const cs_protocol_version &operator= (const char *v);
47 bool operator< (const cs_protocol_version &that) const;
48
49 const char *v;
50};
51
11de93fb 52#if HAVE_NSS
49398925
CM
53struct thread_arg
54{
55 PRFileDesc *tcpSocket;
56 CERTCertificate *cert;
57 SECKEYPrivateKey *privKey;
58 PRNetAddr addr;
59};
60
c89fe89c 61extern int read_from_file (const std::string &fname, cs_protocol_version &data);
3dc20443 62extern std::string get_cert_serial_number (const CERTCertificate *cert);
b83e9872 63#endif
cc7c72cd
DB
64
65#endif // CSCOMMON_H
This page took 0.073396 seconds and 5 git commands to generate.