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

Function XNET_analyze

src/remote/os/win32/xnet.cpp:236–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234#endif
235
236rem_port* XNET_analyze(ClntAuthBlock* cBlock,
237 const PathName& file_name,
238 bool uv_flag,
239 RefPtr<const Config>* config,
240 const PathName* ref_db_name)
241{
242/**************************************
243 *
244 * X N E T _ a n a l y z e
245 *
246 **************************************
247 *
248 * Functional description
249 * Client performs attempt to establish connection
250 * based on the set of protocols.
251 * If a connection is established, return a port block,
252 * otherwise return NULL.
253 *
254 **************************************/
255
256 // We need to establish a connection to a remote server.
257 // Allocate the necessary blocks and get ready to go.
258
259 Rdb* rdb = FB_NEW Rdb;
260 PACKET* packet = &rdb->rdb_packet;
261
262 // Pick up some user identification information
263
264 string buffer;
265 ClumpletWriter user_id(ClumpletReader::UnTagged, 64000);
266 if (cBlock)
267 {
268 cBlock->extractDataFromPluginTo(user_id);
269 }
270
271 ISC_get_user(&buffer, 0, 0);
272 buffer.lower();
273 ISC_systemToUtf8(buffer);
274 user_id.insertString(CNCT_user, buffer);
275
276 ISC_get_host(buffer);
277 buffer.lower();
278 ISC_systemToUtf8(buffer);
279 user_id.insertString(CNCT_host, buffer);
280
281 if (uv_flag) {
282 user_id.insertTag(CNCT_user_verification);
283 }
284
285 // Establish connection to server
286
287 P_CNCT* cnct = &packet->p_cnct;
288 packet->p_operation = op_connect;
289 cnct->p_cnct_operation = 0;
290 cnct->p_cnct_cversion = CONNECT_VERSION3;
291 cnct->p_cnct_client = ARCHITECTURE;
292
293 const PathName& cnct_file(ref_db_name ? (*ref_db_name) : file_name);

Callers 1

analyzeFunction · 0.85

Calls 15

ISC_get_userFunction · 0.85
ISC_systemToUtf8Function · 0.85
ISC_get_hostFunction · 0.85
XNET_connectFunction · 0.85
REMOTE_check_responseFunction · 0.85
GdsClass · 0.85
REMOTE_make_stringFunction · 0.85
lowerMethod · 0.80
storeDataForPluginMethod · 0.80
resetClntMethod · 0.80
disconnectFunction · 0.70

Tested by

no test coverage detected