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

Function analyze

src/remote/client/interface.cpp:7874–8070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7872
7873
7874static rem_port* analyze(ClntAuthBlock& cBlock, PathName& attach_name, unsigned flags,
7875 ClumpletWriter& pb, const ParametersSet& parSet, PathName& node_name, PathName* ref_db_name,
7876 ICryptKeyCallback* cryptCb)
7877{
7878/**************************************
7879 *
7880 * a n a l y z e
7881 *
7882 **************************************
7883 *
7884 * Functional description
7885 * Analyze an attach specification and determine whether
7886 * a remote server is required, and if so, what protocol
7887 * to use. If the target can be accessed via the
7888 * remote subsystem, return address of a port block
7889 * with which to communicate with the server.
7890 * Otherwise, return NULL.
7891 *
7892 * NOTE: The file name must have been expanded prior to this call.
7893 *
7894 **************************************/
7895
7896 cBlock.loadClnt(pb, &parSet);
7897 pb.deleteWithTag(parSet.auth_block);
7898
7899 bool needFile = !(flags & ANALYZE_EMP_NAME);
7900 const PathName save_attach_name(attach_name);
7901
7902#ifdef TRUSTED_AUTH
7903 bool legacySSP = false;
7904 Auth::setLegacySSP(legacySSP);
7905#endif
7906
7907 rem_port* port;
7908 while (true)
7909 {
7910 port = NULL;
7911 int inet_af = AF_UNSPEC;
7912
7913 authenticateStep0(cBlock);
7914 const NoCaseString savePluginName(cBlock.plugins.name());
7915
7916 try
7917 {
7918#ifdef WIN_NT
7919 if (ISC_analyze_protocol(PROTOCOL_XNET, attach_name, node_name, NULL, needFile))
7920 port = XNET_analyze(&cBlock, attach_name, flags & ANALYZE_USER_VFY, cBlock.getConfig(), ref_db_name);
7921 else
7922#endif
7923
7924 if (ISC_analyze_protocol(PROTOCOL_INET4, attach_name, node_name, INET_SEPARATOR, needFile))
7925 inet_af = AF_INET;
7926 else if (ISC_analyze_protocol(PROTOCOL_INET6, attach_name, node_name, INET_SEPARATOR, needFile))
7927 inet_af = AF_INET6;
7928
7929 if (inet_af != AF_UNSPEC ||
7930 ISC_analyze_protocol(PROTOCOL_INET, attach_name, node_name, INET_SEPARATOR, needFile) ||
7931 ISC_analyze_tcp(attach_name, node_name, needFile))

Callers 15

testMethod · 0.85
do_testMethod · 0.85
testMethod · 0.85
testMethod · 0.85
testMethod · 0.85
testMethod · 0.85
testMethod · 0.85
testMethod · 0.85
testMethod · 0.85
testMethod · 0.85
testMethod · 0.85
testMethod · 0.85

Calls 15

setLegacySSPFunction · 0.85
authenticateStep0Function · 0.85
ISC_analyze_protocolFunction · 0.85
XNET_analyzeFunction · 0.85
ISC_analyze_tcpFunction · 0.85
ISC_unescapeFunction · 0.85
ISC_utf8ToSystemFunction · 0.85
INET_analyzeFunction · 0.85
ISC_analyze_pclanFunction · 0.85
ISC_analyze_nfsFunction · 0.85
stricmpFunction · 0.85
GdsClass · 0.85

Tested by 15

testMethod · 0.68
do_testMethod · 0.68
testMethod · 0.68
testMethod · 0.68
testMethod · 0.68
testMethod · 0.68
testMethod · 0.68
testMethod · 0.68
testMethod · 0.68
testMethod · 0.68
testMethod · 0.68
testMethod · 0.68