#include <kernel.h>
Go to the source code of this file.
◆ zephyr_smp_transport_get_mtu_fn
| zephyr_smp_transport_get_mtu_fn |
SMP MTU query function for Zephyr.
The supplied net_buf should contain a request received from the peer whose MTU is being queried. This function takes a net_buf parameter because some transports store connection-specific information in the net_buf user header (e.g., the BLE transport stores the peer address).
- Parameters
-
| nb | Contains a request from the relevant peer. |
- Returns
- The transport's MTU; 0 if transmission is currently not possible.
◆ zephyr_smp_transport_out_fn
| zephyr_smp_transport_out_fn |
SMP transmit function for Zephyr.
The supplied net_buf is always consumed, regardless of return code.
- Parameters
-
| zst | The transport to send via. |
| nb | The net_buf to transmit. |
- Returns
- 0 on success, MGMT_ERR_[...] code on failure.
◆ zephyr_smp_transport_ud_copy_fn
| zephyr_smp_transport_ud_copy_fn |
SMP copy buffer user_data function for Zephyr.
The supplied src net_buf should contain a user_data that cannot be copied using regular memcpy function (e.g., the BLE transport net_buf user_data stores the connection reference that has to be incremented when is going to be used by another buffer).
- Parameters
-
| dst | Source buffer user_data pointer. |
| src | Destination buffer user_data pointer. |
- Returns
- 0 on success, MGMT_ERR_[...] code on failure.
◆ zephyr_smp_transport_ud_free_fn
| zephyr_smp_transport_ud_free_fn |
SMP free buffer user_data function for Zephyr.
This function frees net_buf user data, because some transports store connection-specific information in the net_buf user data (e.g., the BLE transport stores the connection reference that has to be decreased).
- Parameters
-
| ud | Contains a user_data pointer to be freed. |
◆ zephyr_smp_rx_req()
Enqueues an incoming SMP request packet for processing.
This function always consumes the supplied net_buf.
- Parameters
-
| zst | The transport to use to send the corresponding response(s). |
| nb | The request packet to process. |
◆ zephyr_smp_transport_init()
Initializes a Zephyr SMP transport object.
- Parameters
-
| zst | The transport to construct. |
| output_func | The transport's send function. |
| get_mtu_func | The transport's get-MTU function. |
| ud_copy_func | The transport buffer user_data copy function. |
| ud_free_func | The transport buffer user_data free function. |
- Returns
- 0 on success, MGMT_ERR_[...] code on failure.