Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subsys/mgmt: Add UDP transport for SMP #20983

Merged
merged 3 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@
/samples/shields/ @avisconti
/samples/subsys/logging/ @nordic-krch @jakub-uC
/samples/subsys/shell/ @jakub-uC @nordic-krch
/samples/subsys/mgmt/mcumgr/smp_svr/ @aunsbjerg
/samples/subsys/usb/ @jfischer-phytec-iot @finikorg
/samples/subsys/power/ @wentongwu @pabigot
/samples/userspace/ @andrewboie
Expand Down Expand Up @@ -434,6 +435,7 @@
/subsys/logging/ @nordic-krch
/subsys/logging/log_backend_net.c @nordic-krch @jukkar
/subsys/mgmt/ @carlescufi @nvlsianpu
/subsys/mgmt/smp_udp.c @aunsbjerg
/subsys/net/buf.c @jukkar @jhedberg @tbursztyka @pfalcon
/subsys/net/ip/ @jukkar @tbursztyka @pfalcon
/subsys/net/lib/ @jukkar @tbursztyka @pfalcon
Expand Down
37 changes: 37 additions & 0 deletions include/mgmt/smp_udp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2019, Prevas A/S
*
* SPDX-License-Identifier: Apache-2.0
*/

/**
* @file
* @brief UDP transport for the mcumgr SMP protocol.
*/

#ifndef ZEPHYR_INCLUDE_MGMT_SMP_UDP_H_
#define ZEPHYR_INCLUDE_MGMT_SMP_UDP_H_

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Opens a UDP socket for the SMP UDP service.
*
* @return 0 on success; negative error code on failure.
*/
int smp_udp_open(void);

/**
* @brief Closes the UDP socket for the SMP UDP service.
*
* @return 0 on success; negative error code on failure.
*/
int smp_udp_close(void);

#ifdef __cplusplus
}
#endif

#endif
6 changes: 3 additions & 3 deletions samples/subsys/mgmt/mcumgr/smp_svr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ cmake_minimum_required(VERSION 3.13.1)
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
project(smp_svr)

target_sources(app PRIVATE
src/main.c
)
target_sources(app PRIVATE src/main.c)
target_sources_ifdef(CONFIG_MCUMGR_SMP_BT app PRIVATE src/bluetooth.c)
target_sources_ifdef(CONFIG_MCUMGR_SMP_UDP app PRIVATE src/udp.c)
Loading