MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / xdr_protocol

Function xdr_protocol

src/remote/protocol.cpp:255–1193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253
254
255bool_t xdr_protocol(RemoteXdr* xdrs, PACKET* p)
256{
257/**************************************
258 *
259 * x d r _ p r o t o c o l
260 *
261 **************************************
262 *
263 * Functional description
264 * Encode, decode, or free a protocol packet.
265 *
266 **************************************/
267 p_cnct::p_cnct_repeat* tail;
268 P_ACPT *accept;
269 P_ACPD *accept_with_data;
270 P_ATCH *attach;
271 P_RESP *response;
272 P_CMPL *compile;
273 P_STTR *transaction;
274 P_DATA *data;
275 P_RLSE *release;
276 P_BLOB *blob;
277 P_SGMT *segment;
278 P_INFO *info;
279 P_PREP *prepare;
280 P_REQ *request;
281 P_SLC *slice;
282 P_SLR *slice_response;
283 P_SEEK *seek;
284 P_SQLFREE *free_stmt;
285 P_SQLCUR *sqlcur;
286 P_SQLST *prep_stmt;
287 P_SQLDATA *sqldata;
288 P_TRRQ *trrq;
289#ifdef DEBUG
290 xdr_save_size = xdrs->x_handy;
291#endif
292
293 DEBUG_XDR_PACKET(xdrs, p);
294
295 if (!xdr_enum(xdrs, reinterpret_cast<xdr_op*>(&p->p_operation)))
296 return P_FALSE(xdrs, p);
297
298#if COMPRESS_DEBUG > 1
299 if (xdrs->x_op != XDR_FREE)
300 {
301 fprintf(stderr, "operation=%d %c\n", p->p_operation,
302 xdrs->x_op == XDR_ENCODE ? 'E' : xdrs->x_op == XDR_DECODE ? 'D' : xdrs->x_op == XDR_FREE ? 'F' : 'U');
303 }
304#endif
305
306 const auto port = xdrs->x_public;
307
308 if (xdrs->x_op != XDR_FREE)
309 port->bumpLogPackets(xdrs->x_op == XDR_ENCODE ? rem_port::SEND : rem_port::RECEIVE);
310
311 switch (p->p_operation)
312 {

Callers 7

receiveFunction · 0.85
send_fullFunction · 0.85
send_partialFunction · 0.85
REMOTE_free_packetFunction · 0.85
receiveFunction · 0.85
send_fullFunction · 0.85
send_partialFunction · 0.85

Calls 15

DEBUG_XDR_PACKETFunction · 0.85
xdr_enumFunction · 0.85
P_FALSEFunction · 0.85
P_TRUEFunction · 0.85
DEBUG_PRINTSIZEFunction · 0.85
xdr_requestFunction · 0.85
xdr_status_vectorFunction · 0.85
xdr_trrq_blrFunction · 0.85
xdr_trrq_messageFunction · 0.85
fixupLengthFunction · 0.85
reset_statementFunction · 0.85
xdr_sql_blrFunction · 0.85

Tested by

no test coverage detected