mgmt: smp: add UDP transport for SMP
Adds a UDP driver dedicated to transporting mcumgr SMP requests and responses. Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
This commit is contained in:
parent
4dcca7f640
commit
7288f51519
6 changed files with 356 additions and 1 deletions
37
include/mgmt/smp_udp.h
Normal file
37
include/mgmt/smp_udp.h
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue