From a7b9b7f25f7b460d2627a9bd904ae5ca411ff2a5 Mon Sep 17 00:00:00 2001 From: Jean-Roland Date: Tue, 5 Dec 2023 16:18:56 +0100 Subject: [PATCH] feat: fuse multicast transport code --- .../zenoh-pico/transport/raweth/transport.h | 28 --- src/transport/manager.c | 23 +- src/transport/multicast/transport.c | 92 ++++--- src/transport/raweth/transport.c | 228 ------------------ src/transport/transport.c | 9 +- 5 files changed, 59 insertions(+), 321 deletions(-) delete mode 100644 include/zenoh-pico/transport/raweth/transport.h delete mode 100644 src/transport/raweth/transport.c diff --git a/include/zenoh-pico/transport/raweth/transport.h b/include/zenoh-pico/transport/raweth/transport.h deleted file mode 100644 index a91eba18a..000000000 --- a/include/zenoh-pico/transport/raweth/transport.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright (c) 2022 ZettaScale Technology -// -// This program and the accompanying materials are made available under the -// terms of the Eclipse Public License 2.0 which is available at -// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 -// which is available at https://www.apache.org/licenses/LICENSE-2.0. -// -// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 -// -// Contributors: -// ZettaScale Zenoh Team, -// - -#ifndef ZENOH_PICO_RAWETH_TRANSPORT_H -#define ZENOH_PICO_RAWETH_TRANSPORT_H - -#include "zenoh-pico/api/types.h" - -int8_t _z_raweth_transport_create(_z_transport_t *zt, _z_link_t *zl, _z_transport_multicast_establish_param_t *param); -int8_t _z_raweth_open_peer(_z_transport_multicast_establish_param_t *param, const _z_link_t *zl, - const _z_id_t *local_zid); -int8_t _z_raweth_open_client(_z_transport_multicast_establish_param_t *param, const _z_link_t *zl, - const _z_id_t *local_zid); -int8_t _z_raweth_send_close(_z_transport_multicast_t *ztm, uint8_t reason, _Bool link_only); -int8_t _z_raweth_transport_close(_z_transport_multicast_t *ztm, uint8_t reason); -void _z_raweth_transport_clear(_z_transport_t *zt); -#endif /* ZENOH_PICO_RAWETH_TRANSPORT_H */ diff --git a/src/transport/manager.c b/src/transport/manager.c index 351e67f83..3d430465f 100644 --- a/src/transport/manager.c +++ b/src/transport/manager.c @@ -18,7 +18,6 @@ #include #include "zenoh-pico/transport/multicast/transport.h" -#include "zenoh-pico/transport/raweth/transport.h" #include "zenoh-pico/transport/unicast/transport.h" int8_t _z_new_transport_client(_z_transport_t *zt, char *locator, _z_id_t *local_zid) { @@ -45,6 +44,7 @@ int8_t _z_new_transport_client(_z_transport_t *zt, char *locator, _z_id_t *local break; } // Multicast transport + case Z_LINK_CAP_TRANSPORT_RAWETH: case Z_LINK_CAP_TRANSPORT_MULTICAST: { _z_transport_multicast_establish_param_t tp_param; ret = _z_multicast_open_client(&tp_param, &zl, local_zid); @@ -55,16 +55,6 @@ int8_t _z_new_transport_client(_z_transport_t *zt, char *locator, _z_id_t *local ret = _z_multicast_transport_create(zt, &zl, &tp_param); break; } - case Z_LINK_CAP_TRANSPORT_RAWETH: { - _z_transport_multicast_establish_param_t tp_param; - ret = _z_raweth_open_client(&tp_param, &zl, local_zid); - if (ret != _Z_RES_OK) { - _z_link_clear(&zl); - return ret; - } - ret = _z_raweth_transport_create(zt, &zl, &tp_param); - break; - } default: ret = _Z_ERR_GENERIC; break; @@ -93,6 +83,7 @@ int8_t _z_new_transport_peer(_z_transport_t *zt, char *locator, _z_id_t *local_z ret = _z_unicast_transport_create(zt, &zl, &tp_param); break; } + case Z_LINK_CAP_TRANSPORT_RAWETH: case Z_LINK_CAP_TRANSPORT_MULTICAST: { _z_transport_multicast_establish_param_t tp_param; ret = _z_multicast_open_peer(&tp_param, &zl, local_zid); @@ -103,16 +94,6 @@ int8_t _z_new_transport_peer(_z_transport_t *zt, char *locator, _z_id_t *local_z ret = _z_multicast_transport_create(zt, &zl, &tp_param); break; } - case Z_LINK_CAP_TRANSPORT_RAWETH: { - _z_transport_multicast_establish_param_t tp_param; - ret = _z_raweth_open_peer(&tp_param, &zl, local_zid); - if (ret != _Z_RES_OK) { - _z_link_clear(&zl); - return ret; - } - ret = _z_raweth_transport_create(zt, &zl, &tp_param); - break; - } default: ret = _Z_ERR_GENERIC; break; diff --git a/src/transport/multicast/transport.c b/src/transport/multicast/transport.c index 8df2f7907..2e5796399 100644 --- a/src/transport/multicast/transport.c +++ b/src/transport/multicast/transport.c @@ -24,32 +24,45 @@ #include "zenoh-pico/transport/multicast.h" #include "zenoh-pico/transport/multicast/rx.h" #include "zenoh-pico/transport/multicast/tx.h" +#include "zenoh-pico/transport/raweth/tx.h" #include "zenoh-pico/transport/unicast/rx.h" #include "zenoh-pico/transport/utils.h" #include "zenoh-pico/utils/logging.h" -#if Z_FEATURE_MULTICAST_TRANSPORT == 1 +#if Z_FEATURE_MULTICAST_TRANSPORT == 1 || Z_FEATURE_RAWETH_TRANSPORT == 1 int8_t _z_multicast_transport_create(_z_transport_t *zt, _z_link_t *zl, _z_transport_multicast_establish_param_t *param) { int8_t ret = _Z_RES_OK; - - zt->_type = _Z_TRANSPORT_MULTICAST_TYPE; - zt->_transport._multicast._send_f = _z_multicast_send_t_msg; - + // Transport specific information + _z_transport_multicast_t *ztm = NULL; + switch (zl->_cap._transport) { + case Z_LINK_CAP_TRANSPORT_MULTICAST: + zt->_type = _Z_TRANSPORT_MULTICAST_TYPE; + ztm = &zt->_transport._multicast; + ztm->_send_f = _z_multicast_send_t_msg; + break; + case Z_LINK_CAP_TRANSPORT_RAWETH: + zt->_type = _Z_TRANSPORT_RAWETH_TYPE; + ztm = &zt->_transport._raweth; + ztm->_send_f = _z_raweth_send_t_msg; + break; + default: + return _Z_ERR_GENERIC; + } #if Z_FEATURE_MULTI_THREAD == 1 // Initialize the mutexes - ret = _z_mutex_init(&zt->_transport._multicast._mutex_tx); + ret = _z_mutex_init(&ztm->_mutex_tx); if (ret == _Z_RES_OK) { - ret = _z_mutex_init(&zt->_transport._multicast._mutex_rx); + ret = _z_mutex_init(&ztm->_mutex_rx); if (ret == _Z_RES_OK) { - ret = _z_mutex_init(&zt->_transport._multicast._mutex_peer); + ret = _z_mutex_init(&ztm->_mutex_peer); if (ret != _Z_RES_OK) { - _z_mutex_free(&zt->_transport._multicast._mutex_tx); - _z_mutex_free(&zt->_transport._multicast._mutex_rx); + _z_mutex_free(&ztm->_mutex_tx); + _z_mutex_free(&ztm->_mutex_rx); } } else { - _z_mutex_free(&zt->_transport._multicast._mutex_tx); + _z_mutex_free(&ztm->_mutex_tx); } } #endif // Z_FEATURE_MULTI_THREAD == 1 @@ -57,53 +70,51 @@ int8_t _z_multicast_transport_create(_z_transport_t *zt, _z_link_t *zl, // Initialize the read and write buffers if (ret == _Z_RES_OK) { uint16_t mtu = (zl->_mtu < Z_BATCH_MULTICAST_SIZE) ? zl->_mtu : Z_BATCH_MULTICAST_SIZE; - zt->_transport._multicast._wbuf = _z_wbuf_make(mtu, false); - zt->_transport._multicast._zbuf = _z_zbuf_make(Z_BATCH_MULTICAST_SIZE); + ztm->_wbuf = _z_wbuf_make(mtu, false); + ztm->_zbuf = _z_zbuf_make(Z_BATCH_MULTICAST_SIZE); // Clean up the buffers if one of them failed to be allocated - if ((_z_wbuf_capacity(&zt->_transport._multicast._wbuf) != mtu) || - (_z_zbuf_capacity(&zt->_transport._multicast._zbuf) != Z_BATCH_MULTICAST_SIZE)) { + if ((_z_wbuf_capacity(&ztm->_wbuf) != mtu) || (_z_zbuf_capacity(&ztm->_zbuf) != Z_BATCH_MULTICAST_SIZE)) { ret = _Z_ERR_SYSTEM_OUT_OF_MEMORY; #if Z_FEATURE_MULTI_THREAD == 1 - _z_mutex_free(&zt->_transport._multicast._mutex_tx); - _z_mutex_free(&zt->_transport._multicast._mutex_rx); - _z_mutex_free(&zt->_transport._multicast._mutex_peer); + _z_mutex_free(&ztm->_mutex_tx); + _z_mutex_free(&ztm->_mutex_rx); + _z_mutex_free(&ztm->_mutex_peer); #endif // Z_FEATURE_MULTI_THREAD == 1 - _z_wbuf_clear(&zt->_transport._multicast._wbuf); - _z_zbuf_clear(&zt->_transport._multicast._zbuf); + _z_wbuf_clear(&ztm->_wbuf); + _z_zbuf_clear(&ztm->_zbuf); } } if (ret == _Z_RES_OK) { // Set default SN resolution - zt->_transport._multicast._sn_res = _z_sn_max(param->_seq_num_res); + ztm->_sn_res = _z_sn_max(param->_seq_num_res); // The initial SN at TX side - zt->_transport._multicast._sn_tx_reliable = param->_initial_sn_tx._val._plain._reliable; - zt->_transport._multicast._sn_tx_best_effort = param->_initial_sn_tx._val._plain._best_effort; + ztm->_sn_tx_reliable = param->_initial_sn_tx._val._plain._reliable; + ztm->_sn_tx_best_effort = param->_initial_sn_tx._val._plain._best_effort; // Initialize peer list - zt->_transport._multicast._peers = _z_transport_peer_entry_list_new(); + ztm->_peers = _z_transport_peer_entry_list_new(); #if Z_FEATURE_MULTI_THREAD == 1 // Tasks - zt->_transport._multicast._read_task_running = false; - zt->_transport._multicast._read_task = NULL; - zt->_transport._multicast._lease_task_running = false; - zt->_transport._multicast._lease_task = NULL; + ztm->_read_task_running = false; + ztm->_read_task = NULL; + ztm->_lease_task_running = false; + ztm->_lease_task = NULL; #endif // Z_FEATURE_MULTI_THREAD == 1 - zt->_transport._multicast._lease = Z_TRANSPORT_LEASE; + ztm->_lease = Z_TRANSPORT_LEASE; // Notifiers - zt->_transport._multicast._transmitted = false; + ztm->_transmitted = false; // Transport link for multicast - zt->_transport._multicast._link = *zl; + ztm->_link = *zl; } - return ret; } @@ -125,14 +136,22 @@ int8_t _z_multicast_open_peer(_z_transport_multicast_establish_param_t *param, c // Encode and send the message _Z_INFO("Sending Z_JOIN message\n"); - ret = _z_link_send_t_msg(zl, &jsm); + switch (zl->_cap._transport) { + case Z_LINK_CAP_TRANSPORT_MULTICAST: + ret = _z_link_send_t_msg(zl, &jsm); + break; + case Z_LINK_CAP_TRANSPORT_RAWETH: + ret = _z_raweth_link_send_t_msg(zl, &jsm); + break; + default: + return _Z_ERR_GENERIC; + } _z_t_msg_clear(&jsm); if (ret == _Z_RES_OK) { param->_seq_num_res = jsm._body._join._seq_num_res; param->_initial_sn_tx = next_sn; } - return ret; } @@ -150,7 +169,7 @@ int8_t _z_multicast_send_close(_z_transport_multicast_t *ztm, uint8_t reason, _B int8_t ret = _Z_RES_OK; // Send and clear message _z_transport_message_t cm = _z_t_msg_make_close(reason, link_only); - ret = _z_multicast_send_t_msg(ztm, &cm); + ret = ztm->_send_f(ztm, &cm); _z_t_msg_clear(&cm); return ret; } @@ -171,7 +190,6 @@ void _z_multicast_transport_clear(_z_transport_t *zt) { _z_task_join(ztm->_lease_task); _z_task_free(&ztm->_lease_task); } - // Clean up the mutexes _z_mutex_free(&ztm->_mutex_tx); _z_mutex_free(&ztm->_mutex_rx); @@ -228,4 +246,4 @@ int8_t _z_multicast_transport_close(_z_transport_multicast_t *ztm, uint8_t reaso } void _z_multicast_transport_clear(_z_transport_t *zt) { _ZP_UNUSED(zt); } -#endif // Z_FEATURE_MULTICAST_TRANSPORT == 1 +#endif // Z_FEATURE_MULTICAST_TRANSPORT == 1 || Z_FEATURE_RAWETH_TRANSPORT == 1 diff --git a/src/transport/raweth/transport.c b/src/transport/raweth/transport.c deleted file mode 100644 index ddc0d7b8b..000000000 --- a/src/transport/raweth/transport.c +++ /dev/null @@ -1,228 +0,0 @@ -// -// Copyright (c) 2022 ZettaScale Technology -// -// This program and the accompanying materials are made available under the -// terms of the Eclipse Public License 2.0 which is available at -// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 -// which is available at https://www.apache.org/licenses/LICENSE-2.0. -// -// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 -// -// Contributors: -// ZettaScale Zenoh Team, - -#include "zenoh-pico/transport/raweth/transport.h" - -#include -#include -#include -#include -#include - -#include "zenoh-pico/link/link.h" -#include "zenoh-pico/transport/common/lease.h" -#include "zenoh-pico/transport/common/read.h" -#include "zenoh-pico/transport/common/tx.h" -#include "zenoh-pico/transport/raweth/rx.h" -#include "zenoh-pico/transport/raweth/tx.h" -#include "zenoh-pico/transport/utils.h" -#include "zenoh-pico/utils/logging.h" - -#if Z_FEATURE_RAWETH_TRANSPORT == 1 - -int8_t _z_raweth_transport_create(_z_transport_t *zt, _z_link_t *zl, _z_transport_multicast_establish_param_t *param) { - int8_t ret = _Z_RES_OK; - - zt->_type = _Z_TRANSPORT_RAWETH_TYPE; - zt->_transport._raweth._send_f = _z_raweth_send_t_msg; - -#if Z_FEATURE_MULTI_THREAD == 1 - // Initialize the mutexes - ret = _z_mutex_init(&zt->_transport._raweth._mutex_tx); - if (ret == _Z_RES_OK) { - ret = _z_mutex_init(&zt->_transport._raweth._mutex_rx); - if (ret == _Z_RES_OK) { - ret = _z_mutex_init(&zt->_transport._raweth._mutex_peer); - if (ret != _Z_RES_OK) { - _z_mutex_free(&zt->_transport._raweth._mutex_tx); - _z_mutex_free(&zt->_transport._raweth._mutex_rx); - } - } else { - _z_mutex_free(&zt->_transport._raweth._mutex_tx); - } - } -#endif // Z_FEATURE_MULTI_THREAD == 1 - - // Initialize the read and write buffers - if (ret == _Z_RES_OK) { - uint16_t mtu = (zl->_mtu < Z_BATCH_MULTICAST_SIZE) ? zl->_mtu : Z_BATCH_MULTICAST_SIZE; - zt->_transport._raweth._wbuf = _z_wbuf_make(mtu, false); - zt->_transport._raweth._zbuf = _z_zbuf_make(Z_BATCH_MULTICAST_SIZE); - - // Clean up the buffers if one of them failed to be allocated - if ((_z_wbuf_capacity(&zt->_transport._raweth._wbuf) != mtu) || - (_z_zbuf_capacity(&zt->_transport._raweth._zbuf) != Z_BATCH_MULTICAST_SIZE)) { - ret = _Z_ERR_SYSTEM_OUT_OF_MEMORY; - -#if Z_FEATURE_MULTI_THREAD == 1 - _z_mutex_free(&zt->_transport._raweth._mutex_tx); - _z_mutex_free(&zt->_transport._raweth._mutex_rx); - _z_mutex_free(&zt->_transport._raweth._mutex_peer); -#endif // Z_FEATURE_MULTI_THREAD == 1 - - _z_wbuf_clear(&zt->_transport._raweth._wbuf); - _z_zbuf_clear(&zt->_transport._raweth._zbuf); - } - } - - if (ret == _Z_RES_OK) { - // Set default SN resolution - zt->_transport._raweth._sn_res = _z_sn_max(param->_seq_num_res); - - // The initial SN at TX side - zt->_transport._raweth._sn_tx_reliable = param->_initial_sn_tx._val._plain._reliable; - zt->_transport._raweth._sn_tx_best_effort = param->_initial_sn_tx._val._plain._best_effort; - - // Initialize peer list - zt->_transport._raweth._peers = _z_transport_peer_entry_list_new(); - -#if Z_FEATURE_MULTI_THREAD == 1 - // Tasks - zt->_transport._raweth._read_task_running = false; - zt->_transport._raweth._read_task = NULL; - zt->_transport._raweth._lease_task_running = false; - zt->_transport._raweth._lease_task = NULL; -#endif // Z_FEATURE_MULTI_THREAD == 1 - - zt->_transport._raweth._lease = Z_TRANSPORT_LEASE; - - // Notifiers - zt->_transport._raweth._transmitted = false; - - // Transport link for raweth - zt->_transport._raweth._link = *zl; - } - - return ret; -} - -int8_t _z_raweth_open_peer(_z_transport_multicast_establish_param_t *param, const _z_link_t *zl, - const _z_id_t *local_zid) { - int8_t ret = _Z_RES_OK; - - _z_zint_t initial_sn_tx = 0; - z_random_fill(&initial_sn_tx, sizeof(initial_sn_tx)); - initial_sn_tx = initial_sn_tx & !_z_sn_modulo_mask(Z_SN_RESOLUTION); - - _z_conduit_sn_list_t next_sn; - next_sn._is_qos = false; - next_sn._val._plain._best_effort = initial_sn_tx; - next_sn._val._plain._reliable = initial_sn_tx; - - _z_id_t zid = *local_zid; - _z_transport_message_t jsm = _z_t_msg_make_join(Z_WHATAMI_PEER, Z_TRANSPORT_LEASE, zid, next_sn); - - // Encode and send the message - _Z_INFO("Sending Z_JOIN message\n"); - ret = _z_raweth_link_send_t_msg(zl, &jsm); - _z_t_msg_clear(&jsm); - - if (ret == _Z_RES_OK) { - param->_seq_num_res = jsm._body._join._seq_num_res; - param->_initial_sn_tx = next_sn; - } - - return ret; -} - -int8_t _z_raweth_open_client(_z_transport_multicast_establish_param_t *param, const _z_link_t *zl, - const _z_id_t *local_zid) { - _ZP_UNUSED(param); - _ZP_UNUSED(zl); - _ZP_UNUSED(local_zid); - int8_t ret = _Z_ERR_CONFIG_UNSUPPORTED_CLIENT_MULTICAST; - // @TODO: not implemented - return ret; -} - -int8_t _z_raweth_send_close(_z_transport_multicast_t *ztm, uint8_t reason, _Bool link_only) { - int8_t ret = _Z_RES_OK; - // Send and clear message - _z_transport_message_t cm = _z_t_msg_make_close(reason, link_only); - ret = _z_raweth_send_t_msg(ztm, &cm); - _z_t_msg_clear(&cm); - return ret; -} - -int8_t _z_raweth_transport_close(_z_transport_multicast_t *ztm, uint8_t reason) { - return _z_raweth_send_close(ztm, reason, false); -} - -void _z_raweth_transport_clear(_z_transport_t *zt) { - _z_transport_multicast_t *ztm = &zt->_transport._raweth; -#if Z_FEATURE_MULTI_THREAD == 1 - // Clean up tasks - if (ztm->_read_task != NULL) { - _z_task_join(ztm->_read_task); - _z_task_free(&ztm->_read_task); - } - if (ztm->_lease_task != NULL) { - _z_task_join(ztm->_lease_task); - _z_task_free(&ztm->_lease_task); - } - // Clean up the mutexes - _z_mutex_free(&ztm->_mutex_tx); - _z_mutex_free(&ztm->_mutex_rx); - _z_mutex_free(&ztm->_mutex_peer); -#endif // Z_FEATURE_MULTI_THREAD == 1 - - // Clean up the buffers - _z_wbuf_clear(&ztm->_wbuf); - _z_zbuf_clear(&ztm->_zbuf); - - // Clean up peer list - _z_transport_peer_entry_list_free(&ztm->_peers); - _z_link_clear(&ztm->_link); -} - -#else - -int8_t _z_raweth_transport_create(_z_transport_t *zt, _z_link_t *zl, _z_transport_multicast_establish_param_t *param) { - _ZP_UNUSED(zt); - _ZP_UNUSED(zl); - _ZP_UNUSED(param); - return _Z_ERR_TRANSPORT_NOT_AVAILABLE; -} - -int8_t _z_raweth_open_peer(_z_transport_multicast_establish_param_t *param, const _z_link_t *zl, - const _z_id_t *local_zid) { - _ZP_UNUSED(param); - _ZP_UNUSED(zl); - _ZP_UNUSED(local_zid); - return _Z_ERR_TRANSPORT_NOT_AVAILABLE; -} - -int8_t _z_raweth_open_client(_z_transport_multicast_establish_param_t *param, const _z_link_t *zl, - const _z_id_t *local_zid) { - _ZP_UNUSED(param); - _ZP_UNUSED(zl); - _ZP_UNUSED(local_zid); - return _Z_ERR_TRANSPORT_NOT_AVAILABLE; -} - -int8_t _z_raweth_send_close(_z_transport_multicast_t *ztm, uint8_t reason, _Bool link_only) { - _ZP_UNUSED(ztm); - _ZP_UNUSED(reason); - _ZP_UNUSED(link_only); - return _Z_ERR_TRANSPORT_NOT_AVAILABLE; -} - -int8_t _z_raweth_transport_close(_z_transport_multicast_t *ztm, uint8_t reason) { - _ZP_UNUSED(ztm); - _ZP_UNUSED(reason); - return _Z_ERR_TRANSPORT_NOT_AVAILABLE; - ; -} - -void _z_raweth_transport_clear(_z_transport_t *zt) { _ZP_UNUSED(zt); } -#endif // Z_FEATURE_RAWETH_TRANSPORT == 1 diff --git a/src/transport/transport.c b/src/transport/transport.c index b6fd7ac66..a53b7e364 100644 --- a/src/transport/transport.c +++ b/src/transport/transport.c @@ -25,7 +25,6 @@ #include "zenoh-pico/transport/multicast/transport.h" #include "zenoh-pico/transport/multicast/tx.h" #include "zenoh-pico/transport/raweth/rx.h" -#include "zenoh-pico/transport/raweth/transport.h" #include "zenoh-pico/transport/raweth/tx.h" #include "zenoh-pico/transport/unicast/rx.h" #include "zenoh-pico/transport/unicast/transport.h" @@ -41,10 +40,8 @@ int8_t _z_send_close(_z_transport_t *zt, uint8_t reason, _Bool link_only) { ret = _z_unicast_send_close(&zt->_transport._unicast, reason, link_only); break; case _Z_TRANSPORT_MULTICAST_TYPE: - ret = _z_multicast_send_close(&zt->_transport._multicast, reason, link_only); - break; case _Z_TRANSPORT_RAWETH_TYPE: - ret = _z_raweth_send_close(&zt->_transport._raweth, reason, link_only); + ret = _z_multicast_send_close(&zt->_transport._multicast, reason, link_only); break; default: ret = _Z_ERR_TRANSPORT_NOT_AVAILABLE; @@ -61,10 +58,8 @@ void _z_transport_clear(_z_transport_t *zt) { _z_unicast_transport_clear(zt); break; case _Z_TRANSPORT_MULTICAST_TYPE: - _z_multicast_transport_clear(zt); - break; case _Z_TRANSPORT_RAWETH_TYPE: - _z_raweth_transport_clear(zt); + _z_multicast_transport_clear(zt); break; default: break;