net: lwm2m: save remote address during setup
net_app contexts save the remote address and we use this during observe notifications and pending handling. If we move to another network layer such as sockets, then the remote address becomes harder to reference. Let's save it as a part of the client context. Signed-off-by: Michael Scott <mike@foundries.io>
This commit is contained in:
parent
3bfb7debb3
commit
a433af6e05
4 changed files with 42 additions and 52 deletions
|
@ -32,6 +32,7 @@
|
|||
*
|
||||
* @details Context structure for the LwM2M high-level API.
|
||||
*
|
||||
* @param remote_addr Stored remote IP address of the LwM2M client
|
||||
* @param net_app_ctx Related network application context.
|
||||
* @param net_init_timeout Used if the net_app API needs to do some time
|
||||
* consuming operation, like resolving DNS address.
|
||||
|
@ -39,6 +40,9 @@
|
|||
* giving up.
|
||||
*/
|
||||
struct lwm2m_ctx {
|
||||
/** destination address storage */
|
||||
struct sockaddr remote_addr;
|
||||
|
||||
/** Net app context structure */
|
||||
struct net_app_ctx net_app_ctx;
|
||||
s32_t net_init_timeout;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue