| 534 | |
| 535 | |
| 536 | iscProtocol 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 |
no test coverage detected