Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_llatbl.h
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | |||||
typedef void (llt_post_resolved_t)(struct lltable *, struct llentry *); | typedef void (llt_post_resolved_t)(struct lltable *, struct llentry *); | ||||
typedef int (llt_foreach_cb_t)(struct lltable *, struct llentry *, void *); | typedef int (llt_foreach_cb_t)(struct lltable *, struct llentry *, void *); | ||||
typedef int (llt_foreach_entry_t)(struct lltable *, llt_foreach_cb_t *, void *); | typedef int (llt_foreach_entry_t)(struct lltable *, llt_foreach_cb_t *, void *); | ||||
struct lltable { | struct lltable { | ||||
SLIST_ENTRY(lltable) llt_link; | SLIST_ENTRY(lltable) llt_link; | ||||
sa_family_t llt_af; | sa_family_t llt_af; | ||||
uint8_t llt_spare[3]; | uint8_t llt_flags; | ||||
uint8_t llt_spare[2]; | |||||
int llt_hsize; | int llt_hsize; | ||||
int llt_entries; | int llt_entries; | ||||
int llt_maxentries; | int llt_maxentries; | ||||
struct llentries *lle_head; | struct llentries *lle_head; | ||||
struct ifnet *llt_ifp; | struct ifnet *llt_ifp; | ||||
llt_lookup_t *llt_lookup; | llt_lookup_t *llt_lookup; | ||||
llt_alloc_t *llt_alloc_entry; | llt_alloc_t *llt_alloc_entry; | ||||
Show All 10 Lines | struct lltable { | ||||
llt_free_tbl_t *llt_free_tbl; | llt_free_tbl_t *llt_free_tbl; | ||||
llt_mark_used_t *llt_mark_used; | llt_mark_used_t *llt_mark_used; | ||||
llt_post_resolved_t *llt_post_resolved; | llt_post_resolved_t *llt_post_resolved; | ||||
}; | }; | ||||
MALLOC_DECLARE(M_LLTABLE); | MALLOC_DECLARE(M_LLTABLE); | ||||
/* | /* | ||||
* LLtable flags | |||||
*/ | |||||
#define LLT_ADDEDPROXY 0x01 /* added a proxy llentry */ | |||||
/* | |||||
* LLentry flags | * LLentry flags | ||||
*/ | */ | ||||
#define LLE_DELETED 0x0001 /* entry must be deleted */ | #define LLE_DELETED 0x0001 /* entry must be deleted */ | ||||
#define LLE_STATIC 0x0002 /* entry is static */ | #define LLE_STATIC 0x0002 /* entry is static */ | ||||
#define LLE_IFADDR 0x0004 /* entry is interface addr */ | #define LLE_IFADDR 0x0004 /* entry is interface addr */ | ||||
#define LLE_VALID 0x0008 /* ll_addr is valid */ | #define LLE_VALID 0x0008 /* ll_addr is valid */ | ||||
#define LLE_REDIRECT 0x0010 /* installed by redirect; has host rtentry */ | #define LLE_REDIRECT 0x0010 /* installed by redirect; has host rtentry */ | ||||
#define LLE_PUB 0x0020 /* publish entry ??? */ | #define LLE_PUB 0x0020 /* publish entry ??? */ | ||||
Show All 35 Lines | |||||
int lltable_calc_llheader(struct ifnet *ifp, int family, char *lladdr, | int lltable_calc_llheader(struct ifnet *ifp, int family, char *lladdr, | ||||
char *buf, size_t *bufsize, int *lladdr_off); | char *buf, size_t *bufsize, int *lladdr_off); | ||||
void lltable_update_ifaddr(struct lltable *llt); | void lltable_update_ifaddr(struct lltable *llt); | ||||
struct llentry *lltable_alloc_entry(struct lltable *llt, u_int flags, | struct llentry *lltable_alloc_entry(struct lltable *llt, u_int flags, | ||||
const struct sockaddr *l4addr); | const struct sockaddr *l4addr); | ||||
void lltable_free_entry(struct lltable *llt, struct llentry *lle); | void lltable_free_entry(struct lltable *llt, struct llentry *lle); | ||||
int lltable_delete_addr(struct lltable *llt, u_int flags, | int lltable_delete_addr(struct lltable *llt, u_int flags, | ||||
const struct sockaddr *l3addr); | const struct sockaddr *l3addr); | ||||
void lltable_flags_free(struct lltable *llt, u_int flags, | |||||
void (*cleanup_cb)(struct lltable *llt, struct llentry *lle, void *arg), | |||||
void *farg); | |||||
int lltable_link_entry(struct lltable *llt, struct llentry *lle); | int lltable_link_entry(struct lltable *llt, struct llentry *lle); | ||||
int lltable_unlink_entry(struct lltable *llt, struct llentry *lle); | int lltable_unlink_entry(struct lltable *llt, struct llentry *lle); | ||||
void lltable_link_child_entry(struct llentry *parent_lle, struct llentry *child_lle); | void lltable_link_child_entry(struct llentry *parent_lle, struct llentry *child_lle); | ||||
void lltable_unlink_child_entry(struct llentry *child_lle); | void lltable_unlink_child_entry(struct llentry *child_lle); | ||||
void lltable_fill_sa_entry(const struct llentry *lle, struct sockaddr *sa); | void lltable_fill_sa_entry(const struct llentry *lle, struct sockaddr *sa); | ||||
struct ifnet *lltable_get_ifp(const struct lltable *llt); | struct ifnet *lltable_get_ifp(const struct lltable *llt); | ||||
int lltable_get_af(const struct lltable *llt); | int lltable_get_af(const struct lltable *llt); | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |