added parameter to control i/fs used for oob messaging
This commit was SVN r3989.
Этот коммит содержится в:
родитель
3c0bde10d0
Коммит
6e37862637
@ -185,6 +185,10 @@ int mca_oob_tcp_component_open(void)
|
||||
mca_oob_tcp_param_register_int("peer_retries", 60);
|
||||
mca_oob_tcp_component.tcp_debug =
|
||||
mca_oob_tcp_param_register_int("debug", 1);
|
||||
mca_oob_tcp_component.tcp_include =
|
||||
mca_oob_tcp_param_register_str("include", NULL);
|
||||
mca_oob_tcp_component.tcp_exclude =
|
||||
mca_oob_tcp_param_register_str("exclude", NULL);
|
||||
|
||||
/* initialize state */
|
||||
mca_oob_tcp_component.tcp_listen_sd = -1;
|
||||
@ -741,6 +745,14 @@ char* mca_oob_tcp_get_addr(void)
|
||||
|
||||
for(i=ompi_ifbegin(); i>0; i=ompi_ifnext(i)) {
|
||||
struct sockaddr_in addr;
|
||||
char name[32];
|
||||
ompi_ifindextoname(i, name, sizeof(name));
|
||||
if (mca_oob_tcp_component.tcp_include != NULL &&
|
||||
strstr(mca_oob_tcp_component.tcp_include,name) == NULL)
|
||||
continue;
|
||||
if (mca_oob_tcp_component.tcp_exclude != NULL &&
|
||||
strstr(mca_oob_tcp_component.tcp_exclude,name) != NULL)
|
||||
continue;
|
||||
ompi_ifindextoaddr(i, (struct sockaddr*)&addr, sizeof(addr));
|
||||
if(ompi_ifcount() > 1 && addr.sin_addr.s_addr == inet_addr("127.0.0.1"))
|
||||
continue;
|
||||
|
@ -241,6 +241,8 @@ void mca_oob_tcp_registry_callback(
|
||||
*/
|
||||
struct mca_oob_tcp_component_t {
|
||||
mca_oob_base_component_1_0_0_t super; /**< base OOB component */
|
||||
char* tcp_include; /**< list of interfaces to include */
|
||||
char* tcp_exclude; /**< list of interfaces to exclude */
|
||||
int tcp_listen_sd; /**< listen socket for incoming connection requests */
|
||||
unsigned short tcp_listen_port; /**< listen port */
|
||||
ompi_list_t tcp_subscriptions; /**< list of registry subscriptions */
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user