Changeset View
Changeset View
Standalone View
Standalone View
sys/net/debugnet.h
Show First 20 Lines • Show All 171 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
const unsigned char *debugnet_get_gw_mac(const struct debugnet_pcb *); | const unsigned char *debugnet_get_gw_mac(const struct debugnet_pcb *); | ||||
/* | /* | ||||
* Callbacks from core mbuf code. | * Callbacks from core mbuf code. | ||||
*/ | */ | ||||
void debugnet_any_ifnet_update(struct ifnet *); | void debugnet_any_ifnet_update(struct ifnet *); | ||||
/* | |||||
* DDB parsing helper for common debugnet options. | |||||
* | |||||
* -s <server> [-g <gateway] -c <localip> -i <interface> | |||||
* | |||||
* Order is not significant. Interface is an online interface that supports | |||||
* debugnet and can route to the debugnet server. The other parameters are all | |||||
* IP addresses. For now, all parameters are mandatory, except gateway. | |||||
* | |||||
* Provides basic '-h' using provided 'cmd' string. | |||||
* | |||||
* Returns zero on success, or errno. | |||||
*/ | |||||
struct debugnet_ddb_config { | |||||
struct ifnet *dd_ifp; /* not ref'd */ | |||||
in_addr_t dd_client; | |||||
in_addr_t dd_server; | |||||
in_addr_t dd_gateway; | |||||
bool dd_has_gateway : 1; | |||||
}; | |||||
int debugnet_parse_ddb_cmd(const char *cmd, | |||||
struct debugnet_ddb_config *result); | |||||
/* Expose sysctl variables for netdump(4) to alias. */ | /* Expose sysctl variables for netdump(4) to alias. */ | ||||
extern int debugnet_npolls; | extern int debugnet_npolls; | ||||
extern int debugnet_nretries; | extern int debugnet_nretries; | ||||
extern int debugnet_arp_nretries; | extern int debugnet_arp_nretries; | ||||
/* | /* | ||||
* Conditionally-defined macros for device drivers so we can avoid ifdef | * Conditionally-defined macros for device drivers so we can avoid ifdef | ||||
* wrappers in every single implementation. | * wrappers in every single implementation. | ||||
Show All 28 Lines |