xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdMon
XrdMonDecStageInfo.hh
Go to the documentation of this file.
1
/*****************************************************************************/
2
/* */
3
/* XrdMonDecStageInfo.hh */
4
/* */
5
/* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */
6
/* All Rights Reserved */
7
/* Produced by Jacek Becla for Stanford University under contract */
8
/* DE-AC02-76SF00515 with the Department of Energy */
9
/*****************************************************************************/
10
11
// $Id$
12
13
#ifndef XRDMONDECSTAGEINFO_HH
14
#define XRDMONDECSTAGEINFO_HH
15
16
#include "
XrdMon/XrdMonCommon.hh
"
17
#include "
XrdMon/XrdMonTypes.hh
"
18
#include "
XrdSys/XrdSysHeaders.hh
"
19
20
#include <string>
21
#include <strings.h>
22
#include <string.h>
23
24
using
std::ostream;
25
using
std::string;
26
27
class
XrdMonDecStageInfo
{
28
public
:
29
30
XrdMonDecStageInfo
();
31
XrdMonDecStageInfo
(
dictid_t
id
,
32
dictid_t
uniqueId
,
33
const
char
* theString,
34
int
len,
35
senderid_t
senderId
);
36
XrdMonDecStageInfo
(
const
char
* buf,
int
& pos);
37
38
dictid_t
xrdId
()
const
{
return
_myXrdId
; }
39
dictid_t
uniqueId
()
const
{
return
_myUniqueId
; }
40
senderid_t
senderId
()
const
{
return
_senderId
; }
41
42
const
char
*
convert2string
()
const
;
43
const
char
*
writeRT2Buffer
()
const
;
44
45
private
:
46
int
doOne
(
const
char
* s,
char
* buf,
int
len,
char
delim) {
47
int
x = 0;
48
while
( x < len && *(s+x) != delim ) {
49
++x;
50
}
51
if
( x >= len ) {
52
return
-1;
53
}
54
55
memcpy(buf, s, x);
56
*(buf+x) =
'\0'
;
57
return
x;
58
}
59
60
dictid_t
_myXrdId
;
// the one that come inside packet, not unique
61
dictid_t
_myUniqueId
;
// unique (across all dictIds for given xrd server)
62
63
string
_user
;
64
kXR_int16
_pid
;
65
string
_cHost
;
// client host
66
string
_path
;
67
kXR_int32
_tod
;
68
senderid_t
_senderId
;
69
kXR_int32
_bytes
;
70
kXR_int32
_seconds
;
71
72
73
friend
ostream&
operator<<
(ostream& o,
74
const
XrdMonDecStageInfo
& m);
75
};
76
77
#endif
/* XRDMONDECSTAGEINFO_HH */
Generated by
1.8.3.1