PebbleOS v4.48.0-75-g7416f78a1
Loading...
Searching...
No Matches
net.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

Data Structures

struct  pbl_net_ipv4_addr
 IPv4 address, in network order. More...
 
struct  pbl_net_ipv6_addr
 IPv6 address, in network order. More...
 
struct  pbl_net_ipv4_config
 IPv4 configuration of the interface. More...
 
struct  pbl_net_stats
 Counters of the interface. More...
 

Typedefs

typedef void(* pbl_net_ping_cb_t) (int result, uint32_t rtt_ms, void *arg)
 Called with the outcome of an echo request.
 

Functions

int pbl_net_init (void)
 Start the stack on the board's Ethernet controller.
 
int pbl_net_set_ipv4 (const struct pbl_net_ipv4_config *cfg)
 Set the IPv4 configuration of the interface.
 
int pbl_net_clear_ipv4 (void)
 Clear the IPv4 configuration of the interface.
 
int pbl_net_get_ipv4 (struct pbl_net_ipv4_config *cfg)
 Get the IPv4 configuration of the interface.
 
size_t pbl_net_get_ipv6 (struct pbl_net_ipv6_addr *addrs, size_t max)
 Get the IPv6 addresses of the interface.
 
void pbl_net_get_stats (struct pbl_net_stats *stats)
 Get the counters of the interface.
 
int pbl_net_ping_ipv4 (const struct pbl_net_ipv4_addr *dst, size_t len, uint32_t timeout_ms, pbl_net_ping_cb_t cb, void *arg)
 Send an ICMP echo request.
 
int pbl_net_ping_ipv6 (const struct pbl_net_ipv6_addr *dst, size_t len, uint32_t timeout_ms, pbl_net_ping_cb_t cb, void *arg)
 Send an ICMPv6 echo request.