Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_llatbl.h
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | |||||
#define LLE_WLOCK_ASSERT(lle) rw_assert(&(lle)->lle_lock, RA_WLOCKED) | #define LLE_WLOCK_ASSERT(lle) rw_assert(&(lle)->lle_lock, RA_WLOCKED) | ||||
#define LLE_REQ_INIT(lle) mtx_init(&(lle)->req_mtx, "lle req", \ | #define LLE_REQ_INIT(lle) mtx_init(&(lle)->req_mtx, "lle req", \ | ||||
NULL, MTX_DEF) | NULL, MTX_DEF) | ||||
#define LLE_REQ_DESTROY(lle) mtx_destroy(&(lle)->req_mtx) | #define LLE_REQ_DESTROY(lle) mtx_destroy(&(lle)->req_mtx) | ||||
#define LLE_REQ_LOCK(lle) mtx_lock(&(lle)->req_mtx) | #define LLE_REQ_LOCK(lle) mtx_lock(&(lle)->req_mtx) | ||||
#define LLE_REQ_UNLOCK(lle) mtx_unlock(&(lle)->req_mtx) | #define LLE_REQ_UNLOCK(lle) mtx_unlock(&(lle)->req_mtx) | ||||
#define LLE_TIMER_INIT(lle) callout_init_rw(&(lle)->lle_timer, \ | |||||
&(lle)->lle_lock, CALLOUT_RETURNUNLOCKED) | |||||
#define LLE_IS_VALID(lle) (((lle) != NULL) && ((lle) != (void *)-1)) | #define LLE_IS_VALID(lle) (((lle) != NULL) && ((lle) != (void *)-1)) | ||||
#define LLE_ADDREF(lle) do { \ | #define LLE_ADDREF(lle) do { \ | ||||
LLE_WLOCK_ASSERT(lle); \ | LLE_WLOCK_ASSERT(lle); \ | ||||
KASSERT((lle)->lle_refcnt >= 0, \ | KASSERT((lle)->lle_refcnt >= 0, \ | ||||
("negative refcnt %d on lle %p", \ | ("negative refcnt %d on lle %p", \ | ||||
(lle)->lle_refcnt, (lle))); \ | (lle)->lle_refcnt, (lle))); \ | ||||
(lle)->lle_refcnt++; \ | (lle)->lle_refcnt++; \ | ||||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | |||||
void lltable_link(struct lltable *llt); | void lltable_link(struct lltable *llt); | ||||
void lltable_prefix_free(int, struct sockaddr *, | void lltable_prefix_free(int, struct sockaddr *, | ||||
struct sockaddr *, u_int); | struct sockaddr *, u_int); | ||||
#if 0 | #if 0 | ||||
void lltable_drain(int); | void lltable_drain(int); | ||||
#endif | #endif | ||||
int lltable_sysctl_dumparp(int, struct sysctl_req *); | int lltable_sysctl_dumparp(int, struct sysctl_req *); | ||||
void llentry_timer_start(struct llentry *, int, void (*)(void *)); | |||||
void llentry_timer_stop(struct llentry *); | |||||
void llentry_timer_uninit(struct llentry *); | |||||
size_t llentry_free(struct llentry *); | size_t llentry_free(struct llentry *); | ||||
struct llentry *llentry_alloc(struct ifnet *, struct lltable *, | struct llentry *llentry_alloc(struct ifnet *, struct lltable *, | ||||
struct sockaddr_storage *); | struct sockaddr_storage *); | ||||
/* helper functions */ | /* helper functions */ | ||||
size_t lltable_drop_entry_queue(struct llentry *); | size_t lltable_drop_entry_queue(struct llentry *); | ||||
void lltable_set_entry_addr(struct ifnet *ifp, struct llentry *lle, | void lltable_set_entry_addr(struct ifnet *ifp, struct llentry *lle, | ||||
const char *lladdr); | const char *lladdr); | ||||
Show All 38 Lines |