doc/networking: Update network management part relevantly
There had been some changes applied on the API after that documentation was made. Reflect the API behavior change and correct a minor issue. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
62ded2ded4
commit
c7d7b8cd19
1 changed files with 8 additions and 3 deletions
|
@ -47,7 +47,9 @@ Listening to network events
|
|||
|
||||
You can receive notifications on network events by registering a
|
||||
callback function and specifying a set of events used to filter when
|
||||
your callback is invoked.
|
||||
your callback is invoked. The callback will have to be unique for a
|
||||
pair of layer and code, whereas on the command part it will be a mask of
|
||||
events.
|
||||
|
||||
Two functions are available, :cpp:func:`net_mgmt_add_event_callback()` for
|
||||
registering the callback function, and
|
||||
|
@ -99,9 +101,12 @@ An example follows.
|
|||
void register_cb(void)
|
||||
{
|
||||
net_mgmt_init_event_callback(&callback, callback_handler, EVENT_SET);
|
||||
netmgmt_add_event_callback(&callback);
|
||||
net_mgmt_add_event_callback(&callback);
|
||||
}
|
||||
|
||||
See :zephyr_file:`include/net/net_event.h` for available generic core events that
|
||||
can be listened to.
|
||||
|
||||
|
||||
Defining a network management procedure
|
||||
***************************************
|
||||
|
@ -113,7 +118,7 @@ associated mgmt_request code.
|
|||
Management request code are defined in relevant places depending on
|
||||
the targeted layer or eventually, if l2 is the layer, on the
|
||||
technology as well. For instance, all IP layer management request code
|
||||
will be found in the :zephyr_file:`include/net/net_mgmt.h` header file. But in case
|
||||
will be found in the :zephyr_file:`include/net/net_event.h` header file. But in case
|
||||
of an L2 technology, let's say Ethernet, these would be found in
|
||||
:zephyr_file:`include/net/ethernet.h`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue