Commit 268e75ff authored by EVPath Upstream's avatar EVPath Upstream Committed by Eisenhauer, Greg
Browse files

EVPath 2019-08-13 (bf28bb1e)

Code extracted from:

    https://github.com/GTkorvo/EVPath.git

at commit bf28bb1e56ba57b18a24bd3a6fb0f3867c004085 (master).

Upstream Shortlog
-----------------
parent fbf6b6dd
Copyright (c) 2010, Georgia Tech Research Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Georgia Tech Research Corporation nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY GEORGIA TECH RESEARCH CORPORATION ''AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL GEORGIA TECH BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
...@@ -1413,20 +1413,10 @@ INT_CMget_self_ip_addr(CManager cm) ...@@ -1413,20 +1413,10 @@ INT_CMget_self_ip_addr(CManager cm)
return IP; return IP;
} }
extern char *IP_config_diagnostics;
extern int IP_config_output_len;
extern char * extern char *
INT_CMget_ip_config_diagnostics(CManager cm) INT_CMget_ip_config_diagnostics(CManager cm)
{ {
char *output; return IP_get_diagnostics(cm, CMstatic_trans_svcs.trace_out);
IP_config_output_len = 0; /* setup output */
get_IP_config(NULL, 0, NULL, NULL, NULL, NULL, NULL,
CMstatic_trans_svcs.trace_out, cm);
IP_config_output_len = -1; /* disable output */
output = IP_config_diagnostics;
IP_config_diagnostics = NULL; /* not ours anymore */
return output;
} }
#define CURRENT_HANDSHAKE_VERSION 1 #define CURRENT_HANDSHAKE_VERSION 1
......
...@@ -186,6 +186,9 @@ extern void ...@@ -186,6 +186,9 @@ extern void
get_IP_config(char *hostname_buf, int len, int* IP_p, int *port_range_low_p, int *port_range_high_p, get_IP_config(char *hostname_buf, int len, int* IP_p, int *port_range_low_p, int *port_range_high_p,
int *use_hostname_p, attr_list attrs, CMTransport_trace trace_func, void *trace_data); int *use_hostname_p, attr_list attrs, CMTransport_trace trace_func, void *trace_data);
extern char *
IP_get_diagnostics(CManager cm, CMTransport_trace trace_out);
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)
} }
#endif #endif
......
...@@ -428,8 +428,21 @@ get_qual_hostname(char *buf, int len, attr_list attrs, ...@@ -428,8 +428,21 @@ get_qual_hostname(char *buf, int len, attr_list attrs,
} }
char *IP_config_diagnostics = NULL; static char *IP_config_diagnostics = NULL;
int IP_config_output_len = -1; static int IP_config_output_len = -1;
extern char*
IP_get_diagnostics(CManager cm, CMTransport_trace trace_out)
{
char *output;
IP_config_output_len = 0; /* setup output */
get_IP_config(NULL, 0, NULL, NULL, NULL, NULL, NULL,
trace_out, cm);
IP_config_output_len = -1; /* disable output */
output = IP_config_diagnostics;
IP_config_diagnostics = NULL; /* not ours anymore */
return output;
}
static void static void
dump_output(int length_estimate, char *format, ...) dump_output(int length_estimate, char *format, ...)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment