5 #ifndef LOG_WALKER_GIOP_BUFFER_H
6 #define LOG_WALKER_GIOP_BUFFER_H
8 #include "ace/SString.h"
9 #include "ace/CDR_Stream.h"
14 // Invocation holds the buffer contents for a request/response pair.
15 // This could be originating in this process, or in the peer process.
17 // The trigger for finding a new outgoing invocation is "Muxed_TMS[%d]"
18 // following that the process/thread will perform a dump_msg.
20 // The trigger for finding a new incoming invocation is
21 // "Transport[%d]::process_parsed_messages, entering (missing data == 0)"
22 // which could indicate a new request or reply, depending on the context
23 // in which the peer connection is made.
25 // It is possible that two or more threads may call dump_msg
26 // concurrently and thus have the preamble and body printed out of
27 // order. The HEXDUMP always reports a buffer size including the 12
28 // byte GIOP header. Also, the first line of the text contains header
29 // data which can be compared to the expected request ID.
34 static const char *size_leadin
;
35 static size_t leadin_len
;
36 static const size_t giop_header_len
;
37 static void init_leadin (int version
);
39 GIOP_Buffer (const char *text
,
42 Invocation
*owner
= 0);
46 void owner (Invocation
*);
49 void init_buf (const char *text
, size_t offset
);
50 int add_octets(const char *text
, size_t offset
);
52 char expected_type () const;
53 bool sending () const;
54 char minor_version () const;
55 size_t reply_status () const;
56 size_t num_contexts () const;
58 bool is_full () const;
59 size_t log_posn () const;
62 const ACE_Time_Value
& time () const;
63 void time (const ACE_Time_Value
&);
65 const ACE_CString
&preamble() const;
66 size_t expected_req_id() const;
67 size_t actual_req_id();
69 size_t expected_size () const;
70 size_t buf_size () const;
71 size_t cur_size() const;
74 const char * target_oid (size_t &len
);
75 const char * operation ();
76 ACE_InputCDR
&payload ();
78 bool has_octets () const;
80 bool matches (GIOP_Buffer
*other
) const;
83 void transfer_from (GIOP_Buffer
*other
);
84 void swap (GIOP_Buffer
*other
);
87 bool parse_svc_contexts ();
91 ACE_CString preamble_
;
95 size_t expected_req_id_
;
96 size_t expected_size_
;
109 size_t reply_status_
;
112 size_t num_contexts_
;
114 char * payload_start_
;
115 size_t payload_size_
;
118 #endif // LOG_WALKER_GIOP_BUFFER_H