Lines Matching refs:mask
35 * ba_insert(bataid, filter_id, val, mask)
38 * at position val& mask, mask is inserted into the mask list.
42 * return DONTCARE_VALUE if mask == 0, NORMAL_VALUE otherwise
45 ba_insert(ba_table_id_t *bataid, int filter_id, uint8_t val, uint8_t mask)
47 uint8_t mskd_val = val & mask;
51 if (mask == 0) {
65 /* insert mask */
66 (void) ipgpc_list_insert(&table->masks, mask);
78 * search is performed by appling each mask in bataid->table->masks list
98 if ((num_found = ipgpc_mark_found(bataid->info.mask,
105 /* apply each mask to the value and do the look up in the ba table */
114 if ((ret = ipgpc_mark_found(bataid->info.mask, filter_list,
125 * ba_remove(bataid, filter_id, value, mask)
127 * removes filter_id from bataid->table->masked_values[mask & value]
128 * mask is removed from bataid->table->masks if refcnt == 0 for that list
131 ba_remove(ba_table_id_t *bataid, int filter_id, uint8_t value, uint8_t mask)
133 uint8_t masked_value = value & mask;
137 if (mask == 0) {
154 /* remove mask if refcnt == 0 */
155 (void) ipgpc_list_remove(&table->masks, mask);