hent
BY_DIR_HASH htmp, *hent;
hent = sk_BY_DIR_HASH_value(ent->hashes, idx);
k = hent->suffix;
hent = NULL;
hent = NULL;
if (hent == NULL) {
hent = sk_BY_DIR_HASH_value(ent->hashes, idx);
if (hent == NULL) {
hent = malloc(sizeof(*hent));
if (hent == NULL) {
hent->hash = h;
hent->suffix = k;
if (!sk_BY_DIR_HASH_push(ent->hashes, hent)) {
free(hent);
} else if (hent->suffix < k)
hent->suffix = k;
struct ng_bridge_hent *hent;
SLIST_FOREACH(hent, &priv->tab[bucket], next)
ary->hosts[i++] = hent->host;
struct ng_bridge_hent *hent;
SLIST_FOREACH(hent, &priv->tab[bucket], next) {
if (ETHER_EQUAL(hent->host.addr, addr))
return (&hent->host);
struct ng_bridge_hent *hent;
SLIST_FOREACH(hent, &priv->tab[bucket], next) {
KASSERT(!ETHER_EQUAL(hent->host.addr, addr),
hent = kmalloc(sizeof(*hent), M_NETGRAPH, M_NOWAIT);
if (hent == NULL)
bcopy(addr, hent->host.addr, ETHER_ADDR_LEN);
hent->host.linkNum = linkNum;
hent->host.staleness = 0;
hent->host.age = 0;
SLIST_INSERT_HEAD(&priv->tab[bucket], hent, next);
struct ng_bridge_hent *const hent
newBucket = HASH(hent->host.addr, newMask);
SLIST_INSERT_HEAD(&newTab[newBucket], hent, next);
struct ng_bridge_hent *const hent = *hptr;
if (linkNum == -1 || hent->host.linkNum == linkNum) {
*hptr = SLIST_NEXT(hent, next);
kfree(hent, M_NETGRAPH);
hptr = &SLIST_NEXT(hent, next);
struct ng_bridge_hent *const hent = *hptr;
KASSERT(priv->links[hent->host.linkNum] != NULL,
__func__, kether_ntoa(hent->host.addr, ethstr),
hent->host.linkNum));
if (++hent->host.staleness >= priv->conf.maxStaleness) {
*hptr = SLIST_NEXT(hent, next);
kfree(hent, M_NETGRAPH);
if (hent->host.age < 0xffff)
hent->host.age++;
hptr = &SLIST_NEXT(hent, next);
struct ng_bridge_hent *hent;
SLIST_FOREACH(hent, &priv->tab[bucket], next)
ary->hosts[i++] = hent->host;
struct ng_bridge_hent *hent;
SLIST_FOREACH(hent, &priv->tab[bucket], next) {
if (ETHER_EQUAL(hent->host.addr, addr))
return (&hent->host);
struct ng_bridge_hent *hent;
SLIST_FOREACH(hent, &priv->tab[bucket], next) {
KASSERT(!ETHER_EQUAL(hent->host.addr, addr),
hent = kmalloc(sizeof(*hent), M_NETGRAPH_BRIDGE, M_WAITOK | M_NULLOK);
if (hent == NULL)
bcopy(addr, hent->host.addr, ETHER_ADDR_LEN);
hent->host.linkNum = linkNum;
hent->host.staleness = 0;
hent->host.age = 0;
SLIST_INSERT_HEAD(&priv->tab[bucket], hent, next);
struct ng_bridge_hent *const hent
newBucket = HASH(hent->host.addr, newMask);
SLIST_INSERT_HEAD(&newTab[newBucket], hent, next);
struct ng_bridge_hent *const hent = *hptr;
if (linkNum == -1 || hent->host.linkNum == linkNum) {
*hptr = SLIST_NEXT(hent, next);
kfree(hent, M_NETGRAPH_BRIDGE);
hptr = &SLIST_NEXT(hent, next);
struct ng_bridge_hent *const hent = *hptr;
KASSERT(priv->links[hent->host.linkNum] != NULL,
__func__, kether_ntoa(hent->host.addr, ethstr),
hent->host.linkNum));
if (++hent->host.staleness >= priv->conf.maxStaleness) {
*hptr = SLIST_NEXT(hent, next);
kfree(hent, M_NETGRAPH_BRIDGE);
if (hent->host.age < 0xffff)
hent->host.age++;
hptr = &SLIST_NEXT(hent, next);
hent = gethostbyaddr(&ss_addr, sizeof(ss_addr), AF_INET);
if (hent)
printf("%s\n", hent->h_name);
struct hostent *hent;
hent = gethostbyname(argv[optind]);
if (!hent)
bcopy((char *)hent->h_addr_list[0],
struct hostent *hent = NULL;
struct hent *hp;
struct hent **base;
struct hent *hp, **ap;
base = (struct hent **) calloc(sizeof hp, hcount);
struct hent *hp;
static struct hent *
struct hent *hp;
hp = (struct hent *) calloc(sizeof *hp, (size_t)1);
static struct hent *
struct hent *hp;
const struct hent *h1, *h2;
h1 = *(const struct hent * const *)a;
h2 = *(const struct hent * const *)b;
struct hent *h_link; /* Forward hash link */
static struct hent *hashtab[HSHSIZE]; /* Hash table proper */
static struct hent *enter(const char _name[]);
static struct hent *lookup(const char _name[]);
struct hostent *hent;
if ((hent = gethostbyname(host)) == NULL) {
memcpy(&srvp->addr.sin_addr, hent->h_addr,
struct hostent *hent;
hent = __dns_getanswer(buf, rval, q->name, q->type);
if (hent != NULL) {
hent->h_addr = (char *)q->addr;
hent->h_addrtype = q->addrtype;
hent->h_length = q->addrlen;
yp_send_dns_reply(q, parse(hent));
struct hostent *hent;
hent = gethostbyname(optarg);
if (hent == NULL)
bcopy(&hent->h_addr_list[0], &sin.sin_addr,