Loading...
Searching...
No Matches
Notification events for network APIs.

Network event notification types. More...

Detailed Description

Network event notification types.

Files

file  notify.h
 Network event notification type definitions.
 

Data Structures

struct  gnrc_netapi_notify_t
 Data structure to be sent for netapi notification events. More...
 
struct  netapi_notify_l2_connection_t
 L2 connection event data associated with NETAPI_NOTIFY_L2_NEIGH_CONNECTED or NETAPI_NOTIFY_L2_NEIGH_DISCONNECTED events. More...
 

Enumerations

enum  netapi_notify_t { NETAPI_NOTIFY_L2_NEIGH_CONNECTED , NETAPI_NOTIFY_L2_NEIGH_DISCONNECTED , NETAPI_NOTIFY_L3_DISCOVERED , NETAPI_NOTIFY_L3_UNREACHABLE }
 Definition of notification event types in the network stack. More...
 

Functions

static void gnrc_netapi_notify_ack (sema_inv_t *ack)
 Acknowledge that a notify event was received and its data read.
 
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.
 

Enumeration Type Documentation

◆ 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.

Function Documentation

◆ 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]ackPointer 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]notifyPointer to the received notify event.
[in]data_lenSize of the expected data type.
[out]dataConnection data received in the notify event.
Return values
Sizeof the data type on success.
-EINVALif the data in notify is invalid or doesn't match the expected data length.