diff options
author | 2023-01-24 01:46:29 +0100 | |
---|---|---|
committer | 2023-02-09 13:51:14 +0000 | |
commit | 0ac147d632ed6a150bf0216964888a21b1c8d43c (patch) | |
tree | 11bd1fb98916e9f2d464357deebb7c57a7b10e74 /libtransport/src | |
parent | e30c3a102081ccf345c457658dc557703fae67bb (diff) |
feat: libhicnctrl: new API to allow sending MAP-Me command on specific face
Change-Id: Iac39a1d145a5c1b4f19e1fa35d713ca720393760
Ticket: HICN-832
Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
(cherry picked from commit 49776ceac54eecadabca6c0e2fdc0b9ee2e8e663)
Diffstat (limited to 'libtransport/src')
-rw-r--r-- | libtransport/src/io_modules/hicn-light/hicn_forwarder_module.cc | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/libtransport/src/io_modules/hicn-light/hicn_forwarder_module.cc b/libtransport/src/io_modules/hicn-light/hicn_forwarder_module.cc index 0d45ba49d..98bd42fb5 100644 --- a/libtransport/src/io_modules/hicn-light/hicn_forwarder_module.cc +++ b/libtransport/src/io_modules/hicn-light/hicn_forwarder_module.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Cisco and/or its affiliates. + * Copyright (c) 2021-2023 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -218,20 +218,16 @@ utils::MemBuf::Ptr HicnForwarderModule::createCommandDeleteConnection() { utils::MemBuf::Ptr HicnForwarderModule::createCommandMapmeSendUpdate() { auto ret = PacketManager<>::getInstance().getMemBuf(); - auto command = - reinterpret_cast<msg_mapme_send_update_t *>(ret->writableData()); - ret->append(sizeof(msg_mapme_send_update_t)); + auto command = reinterpret_cast<msg_mapme_add_t *>(ret->writableData()); + ret->append(sizeof(msg_mapme_add_t)); std::memset(command, 0, sizeof(*command)); - *command = { - .header = - { - .message_type = REQUEST_LIGHT, - .command_id = COMMAND_TYPE_MAPME_SEND_UPDATE, - .length = 1, - .seq_num = seq_++, - }, - }; + *command = {.header = { + .message_type = REQUEST_LIGHT, + .command_id = COMMAND_TYPE_MAPME_ADD, + .length = 1, + .seq_num = seq_++, + }}; return ret; } |