Network event notification types.
More...
Network event notification types.
◆ netapi_notify_t
Definition of notification event types in the network stack.
- Note
- Expand at will. If event data is associated with the type, a helper function must also be added for parsing the data and calling gnrc_netapi_notify_ack.
| Enumerator |
|---|
| NETAPI_NOTIFY_L2_NEIGH_CONNECTED | Connection established on layer 2.
|
| NETAPI_NOTIFY_L2_NEIGH_DISCONNECTED | Connection closed on layer 2.
|
| NETAPI_NOTIFY_L3_DISCOVERED | Discovered node on the network layer.
|
| NETAPI_NOTIFY_L3_UNREACHABLE | Node became unreachable on the network layer.
|
Definition at line 48 of file notify.h.
◆ gnrc_netapi_notify_ack()
| static void gnrc_netapi_notify_ack |
( |
sema_inv_t * | ack | ) |
|
|
inlinestatic |
Acknowledge that a notify event was received and its data read.
- Parameters
-
| [in] | ack | Pointer to semaphore that is used to collect ack's. |
Definition at line 80 of file notify.h.
◆ gnrc_netapi_notify_copy_event_data()
| int gnrc_netapi_notify_copy_event_data |
( |
gnrc_netapi_notify_t * | notify, |
|
|
uint8_t | data_len, |
|
|
void * | data ) |
Copy the connection event data associated with a gnrc_netapi_notify_t event.
- Note
- This will call gnrc_netapi_notify_ack.
- Parameters
-
| [in] | notify | Pointer to the received notify event. |
| [in] | data_len | Size of the expected data type. |
| [out] | data | Connection data received in the notify event. |
- Return values
-
| Size | of the data type on success. |
| -EINVAL | if the data in notify is invalid or doesn't match the expected data length. |