diff -urN colinux-20040509/src/colinux/os/winnt/user/conet-bridged-daemon/main.c colinux-0509nics/src/colinux/os/winnt/user/conet-bridged-daemon/main.c --- colinux-20040509/src/colinux/os/winnt/user/conet-bridged-daemon/main.c 2004-04-24 01:31:22.000000000 -0500 +++ colinux-0509nics/src/colinux/os/winnt/user/conet-bridged-daemon/main.c 2004-05-18 17:19:49.000000000 -0500 @@ -567,7 +567,7 @@ goto out; } - rc = co_os_open_daemon_pipe(start_parameters.instance, + rc = co_os_open_daemon_pipe(daemon_parameters->instance, CO_MODULE_CONET0 + daemon_parameters->index, &daemon_handle_); if (!CO_OK(rc)) { co_debug("Error opening a pipe to the daemon\n"); diff -urN colinux-20040509/src/colinux/os/winnt/user/conet-daemon/main.c colinux-0509nics/src/colinux/os/winnt/user/conet-daemon/main.c --- colinux-20040509/src/colinux/os/winnt/user/conet-daemon/main.c 2004-04-29 10:10:55.000000000 -0500 +++ colinux-0509nics/src/colinux/os/winnt/user/conet-daemon/main.c 2004-05-18 17:19:49.000000000 -0500 @@ -39,6 +39,11 @@ char interface_name[0x100]; } start_parameters_t; +/******************************************************************************* + * Globals + */ +start_parameters_t *daemon_parameters; + co_win32_overlapped_t tap_overlapped, daemon_overlapped; co_rc_t co_win32_overlapped_write_async(co_win32_overlapped_t *overlapped, @@ -83,13 +88,13 @@ char data[overlapped->size]; } message; - message.message.from = CO_MODULE_CONET0; + message.message.from = CO_MODULE_CONET0 + daemon_parameters->index; message.message.to = CO_MODULE_LINUX; message.message.priority = CO_PRIORITY_DISCARDABLE; message.message.type = CO_MESSAGE_TYPE_OTHER; message.message.size = sizeof(message) - sizeof(message.message); message.linux.device = CO_DEVICE_NETWORK; - message.linux.unit = 0; + message.linux.unit = daemon_parameters->index; message.linux.size = overlapped->size; memcpy(message.data, overlapped->buffer, overlapped->size); @@ -324,7 +329,7 @@ char data[strlen(str)+1]; } message; - message.message.from = CO_MODULE_CONET0; + message.message.from = CO_MODULE_CONET0 + daemon_parameters->index; message.message.to = CO_MODULE_CONSOLE; message.message.priority = CO_PRIORITY_DISCARDABLE; message.message.type = CO_MESSAGE_TYPE_STRING; @@ -353,7 +358,9 @@ if (!CO_OK(rc)) return -1; - prefered_name = start_parameters.name_specified ? start_parameters.interface_name : NULL; + daemon_parameters = &start_parameters; + + prefered_name = daemon_parameters->name_specified ? daemon_parameters->interface_name : NULL; if (prefered_name == NULL) { co_terminal_print("conet-daemon: auto selecting TAP\n"); } else { @@ -381,8 +388,8 @@ } - rc = co_os_open_daemon_pipe(start_parameters.instance, - CO_MODULE_CONET0 + start_parameters.index, &daemon_handle_); + rc = co_os_open_daemon_pipe(daemon_parameters->instance, + CO_MODULE_CONET0 + daemon_parameters->index, &daemon_handle_); if (!CO_OK(rc)) { co_terminal_print("conet-daemon: Error opening a pipe to the daemon\n"); goto out_close; diff -urN colinux-20040509/src/colinux/user/daemon.c colinux-0509nics/src/colinux/user/daemon.c --- colinux-20040509/src/colinux/user/daemon.c 2004-05-08 22:35:48.000000000 -0500 +++ colinux-0509nics/src/colinux/user/daemon.c 2004-05-18 17:19:49.000000000 -0500 @@ -588,7 +588,7 @@ id = *((co_module_t *)packet_data); if (!((id == CO_MODULE_CONSOLE) || - (CO_MODULE_CONET0 >= id && id < CO_MODULE_CONET_END))) + (CO_MODULE_CONET0 <= id && id < CO_MODULE_CONET_END))) { rc = CO_RC(ERROR); break;