BSB Developer Docs
Loading...
Searching...
No Matches
usb_network.h File Reference

USB Network (virtual Ethernet) API. More...

#include <core/state.h>

Go to the source code of this file.

Data Structures

struct  UsbNetworkInfo
 USB Network information structure. More...
 

Macros

#define RECORD_USB_NETWORK   "usb_network"
 

Typedefs

typedef struct UsbNetwork UsbNetwork
 UsbNetwork opaque type.
 

Enumerations

enum  UsbNetworkState { UsbNetworkStateUnknown , UsbNetworkStateDown , UsbNetworkStateUp }
 Enumeration of possible UsbNetwork states. More...
 

Functions

bool usb_network_is_dhcp_addr (UsbNetwork *usb_network, const uint8_t *addr)
 Check whether the provided IPv4 address was configured via DHCP.
 
FuriState * usb_network_get_state (UsbNetwork *usb_network)
 Get the UsbNetwork dynamic info object.
 

Detailed Description

USB Network (virtual Ethernet) API.

Enumeration Type Documentation

◆ UsbNetworkState

Enumeration of possible UsbNetwork states.

Enumerator
UsbNetworkStateUnknown 

Unknown state (e.g.

service is starting up)

UsbNetworkStateDown 

USB Network is down (e.g.

cable disconnected)

UsbNetworkStateUp 

USB Network is up (normal operation)

Function Documentation

◆ usb_network_get_state()

FuriState * usb_network_get_state ( UsbNetwork * usb_network)

Get the UsbNetwork dynamic info object.

The enclosed type is UsbNetworkInfo

Parameters
[in]usb_networkService instance
Returns
pointer to the state object

◆ usb_network_is_dhcp_addr()

bool usb_network_is_dhcp_addr ( UsbNetwork * usb_network,
const uint8_t * addr )

Check whether the provided IPv4 address was configured via DHCP.

Parameters
[in]usb_networkService instance
[in]addrIPv4 address to be checked