Lines Matching defs:key

178  * -find_tentry: finds entry specified by key @tei
183 * Finds entry specified by given key.
297 static int badd(const void *key, void *item, void *base, size_t nmemb,
299 static int bdel(const void *key, void *base, size_t nmemb, size_t size,
311 * is called with the offset in bits of the lookup key within the
372 static int ta_lookup_radix(struct table_info *ti, void *key, uint32_t keylen,
402 ta_lookup_radix(struct table_info *ti, void *key, uint32_t keylen,
411 sa.sin_addr.s_addr = *((in_addr_t *)key);
422 memcpy(&sa6.sin6_addr, key, sizeof(struct in6_addr));
948 static __inline uint32_t hash_ip6_slow(struct in6_addr *addr6, void *key,
950 static __inline uint32_t hash_ip6_al(struct in6_addr *addr6, void *key, int mask,
953 static int ta_lookup_chash_slow(struct table_info *ti, void *key, uint32_t keylen,
955 static int ta_lookup_chash_aligned(struct table_info *ti, void *key,
957 static int ta_lookup_chash_64(struct table_info *ti, void *key, uint32_t keylen,
1031 hash_ip6_slow(struct in6_addr *addr6, void *key, int mask, int hsize)
1036 memcpy(addr6, key, sizeof(struct in6_addr));
1042 hash_ip6_al(struct in6_addr *addr6, void *key, int mask, int hsize)
1049 memcpy(addr6, key, mask);
1055 ta_lookup_chash_slow(struct table_info *ti, void *key, uint32_t keylen,
1069 a = ntohl(*((in_addr_t *)key));
1086 hash = hash_ip6_slow(&addr6, key, imask, hsize);
1100 ta_lookup_chash_aligned(struct table_info *ti, void *key, uint32_t keylen,
1114 a = ntohl(*((in_addr_t *)key));
1133 hash = hash_ip6_al(&addr6, key, imask, hsize);
1149 ta_lookup_chash_64(struct table_info *ti, void *key, uint32_t keylen,
1163 a = ntohl(*((in_addr_t *)key));
1178 paddr = (uint64_t *)key;
1181 hash = hash_ip64((struct in6_addr *)key, hsize);
1940 static struct ifidx * ifidx_find(struct table_info *ti, void *key);
1941 static int ta_lookup_ifidx(struct table_info *ti, void *key, uint32_t keylen,
1983 uint16_t key;
1985 key = *((const uint16_t *)k);
1988 if (key < ifidx->kidx)
1990 else if (key > ifidx->kidx)
1997 * Adds item @item with key @key into ascending-sorted array @base.
2000 * Returns 1 on success, 0 on duplicate key.
2003 badd(const void *key, void *item, void *base, size_t nmemb,
2020 res = compar(key, (const void *)((caddr_t)base + mid * size));
2031 res = compar(key, (const void *)((caddr_t)base + mid * size));
2047 * Deletes item with key @key from ascending-sorted array @base.
2049 * Returns 1 on success, 0 for non-existent key.
2052 bdel(const void *key, void *base, size_t nmemb, size_t size,
2058 item = (caddr_t)bsearch(key, base, nmemb, size, compar);
2072 ifidx_find(struct table_info *ti, void *key)
2076 ifi = bsearch(key, ti->state, ti->data, sizeof(struct ifidx),
2083 ta_lookup_ifidx(struct table_info *ti, void *key, uint32_t keylen,
2088 ifi = ifidx_find(ti, key);
2285 * Prepare to delete key from table.
2306 * Remove key from both configuration list and
2648 static struct numarray *numarray_find(struct table_info *ti, void *key);
2649 static int ta_lookup_numarray(struct table_info *ti, void *key,
2683 uint32_t key;
2685 key = *((const uint32_t *)k);
2688 if (key < na->number)
2690 else if (key > na->number)
2697 numarray_find(struct table_info *ti, void *key)
2701 ri = bsearch(key, ti->state, ti->data, sizeof(struct numarray),
2708 ta_lookup_numarray(struct table_info *ti, void *key, uint32_t keylen,
2713 ri = numarray_find(ti, key);
2837 * Remove key from both configuration list and
2988 tent->k.key = na->number;
3003 ri = numarray_find(ti, &tent->k.key);
3115 static int ta_lookup_fhash(struct table_info *ti, void *key, uint32_t keylen,
3201 ta_lookup_fhash(struct table_info *ti, void *key, uint32_t keylen,
3211 id = (struct ipfw_flow_id *)key;
3789 static int ta_lookup_kfib(struct table_info *ti, void *key, uint32_t keylen,
3811 ta_lookup_kfib(struct table_info *ti, void *key, uint32_t keylen,
3826 in.s_addr = *(in_addr_t *)key;
3834 (struct in6_addr *)key, 0, 0, 0, &nh6);
4011 struct sockaddr *dst, *key, *mask;
4025 /* Prepare the lookup key */
4028 key = (struct sockaddr *)&key6;
4038 if (rib_lookup_info(ti->data, key, 0, 0, &info) != 0)