1 /*
2  * Copyright (c) 2019, Prevas A/S
3  * Copyright (c) 2023 Nordic Semiconductor ASA
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  */
7 
8 /**
9  * @file
10  * @brief UDP transport for the MCUmgr SMP protocol.
11  */
12 
13 #ifndef ZEPHYR_INCLUDE_MGMT_SMP_UDP_H_
14 #define ZEPHYR_INCLUDE_MGMT_SMP_UDP_H_
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 /**
21  * @brief	Enables the UDP SMP MCUmgr transport thread(s) which will open a socket and
22  *		listen to requests.
23  *
24  * @note	API is not thread safe.
25  *
26  * @return	0 on success
27  * @return	-errno code on failure.
28  */
29 int smp_udp_open(void);
30 
31 /**
32  * @brief	Disables the UDP SMP MCUmgr transport thread(s) which will close open sockets.
33  *
34  * @note	API is not thread safe.
35  *
36  * @return	0 on success
37  * @return	-errno code on failure.
38  */
39 int smp_udp_close(void);
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 
45 #endif
46