- See also
- gnrc_netif_ops_t
Definition at line 194 of file netif.h.
#include <netif.h>
◆ get
Gets an option from the network interface.
Use gnrc_netif_get_from_netdev() to just get options from gnrc_netif_t::dev.
- Parameters
-
[in] | netif | The network interface. |
[in] | opt | The option parameters. |
- Returns
- Number of bytes in
data
.
-
-EOVERFLOW, if
max_len
is lesser than the required space.
-
-ENOTSUP, if
opt
is not supported to be set.
-
Any negative error code reported by gnrc_netif_t::dev.
Definition at line 266 of file netif.h.
◆ init
Initializes network interface beyond the default settings.
- Precondition
netif != NULL
- Parameters
-
[in] | netif | The network interface. |
This is called after the network device's initial configuration, right before the interface's thread starts receiving messages. It is not necessary to lock the interface's mutex gnrc_netif_t::mutex, since it is already locked. Set to gnrc_netif_default_init() if you do not need any special initialization. If you do need special initialization, it is recommended to call gnrc_netif_default_init() at the start of the custom initialization function set here.
Definition at line 210 of file netif.h.
◆ msg_handler
Message handler for network interface.
This message handler is used, when the network interface needs to handle message types beyond the ones defined in netapi. Leave NULL if this is not the case.
- Parameters
-
[in] | netif | The network interface. |
[in] | msg | Message to be handled. |
Definition at line 295 of file netif.h.
◆ recv
◆ send
Send a packet over the network interface.
- Precondition
netif != NULL && pkt != NULL
- Note
- The function re-formats the content of
pkt
to a format expected by the netdev_driver_t::send() method of gnrc_netif_t::dev and releases the packet before returning (so no additional release should be required after calling this method).
- Parameters
-
[in] | netif | The network interface. |
[in] | pkt | A packet to send. |
- Returns
- The number of bytes actually sent on success
-
-EBADMSG, if the Generic network interface header in
pkt
is missing or is in an unexpected format.
-
-ENOTSUP, if sending
pkt
in the given format isn't supported (e.g. empty payload with Ethernet).
-
Any negative error code reported by gnrc_netif_t::dev.
Definition at line 232 of file netif.h.
◆ set
The documentation for this struct was generated from the following file: