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

Function ISC_extract_host

src/common/isc_file.cpp:536–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534
535
536iscProtocol ISC_extract_host(Firebird::PathName& file_name,
537 Firebird::PathName& host_name,
538 bool implicit_flag)
539{
540/**************************************
541 *
542 * I S C _ e x t r a c t _ h o s t
543 *
544 **************************************
545 *
546 * Functional description
547 * Check to see if a file name resolves to a
548 * remote file. If implicit_flag is true, then
549 * analyze the path to see if it resolves to a
550 * file on a remote machine. Otherwise, simply
551 * check for an explicit node name.
552 * If file is found to be remote, extract
553 * the node name and compute the residual file name.
554 * Return protocol type.
555 *
556 **************************************/
557
558 // Always check for an explicit TCP node name
559
560 if (ISC_analyze_tcp(file_name, host_name))
561 return ISC_PROTOCOL_TCPIP;
562
563 if (implicit_flag)
564 {
565 // Check for a file on a network mount
566
567#ifdef WIN_NT
568 if (ISC_analyze_pclan(file_name, host_name))
569 return ISC_PROTOCOL_TCPIP;
570#endif
571
572#ifndef NO_NFS
573 if (ISC_analyze_nfs(file_name, host_name))
574 return ISC_PROTOCOL_TCPIP;
575#endif
576 }
577
578 return ISC_PROTOCOL_LOCAL;
579}
580
581
582#ifndef WIN_NT

Callers 3

NBackupMethod · 0.85
gsecFunction · 0.85
ISC_check_if_remoteFunction · 0.85

Calls 3

ISC_analyze_tcpFunction · 0.85
ISC_analyze_pclanFunction · 0.85
ISC_analyze_nfsFunction · 0.85

Tested by

no test coverage detected