Lines Matching refs:af

76 	u_int8_t af = target->family;
78 mutex_lock(&xt[af].mutex);
79 list_add(&target->list, &xt[af].target);
80 mutex_unlock(&xt[af].mutex);
88 u_int8_t af = target->family;
90 mutex_lock(&xt[af].mutex);
92 mutex_unlock(&xt[af].mutex);
126 u_int8_t af = match->family;
128 mutex_lock(&xt[af].mutex);
129 list_add(&match->list, &xt[af].match);
130 mutex_unlock(&xt[af].mutex);
138 u_int8_t af = match->family;
140 mutex_lock(&xt[af].mutex);
142 mutex_unlock(&xt[af].mutex);
182 struct xt_match *xt_find_match(u8 af, const char *name, u8 revision)
187 mutex_lock(&xt[af].mutex);
188 list_for_each_entry(m, &xt[af].match, list) {
192 mutex_unlock(&xt[af].mutex);
199 mutex_unlock(&xt[af].mutex);
201 if (af != NFPROTO_UNSPEC)
225 struct xt_target *xt_find_target(u8 af, const char *name, u8 revision)
230 mutex_lock(&xt[af].mutex);
231 list_for_each_entry(t, &xt[af].target, list) {
235 mutex_unlock(&xt[af].mutex);
242 mutex_unlock(&xt[af].mutex);
244 if (af != NFPROTO_UNSPEC)
252 struct xt_target *xt_request_find_target(u8 af, const char *name, u8 revision)
256 target = xt_find_target(af, name, revision);
258 request_module("%st_%s", xt_prefix[af], name);
259 target = xt_find_target(af, name, revision);
266 static int match_revfn(u8 af, const char *name, u8 revision, int *bestp)
271 list_for_each_entry(m, &xt[af].match, list) {
280 if (af != NFPROTO_UNSPEC && !have_rev)
286 static int target_revfn(u8 af, const char *name, u8 revision, int *bestp)
291 list_for_each_entry(t, &xt[af].target, list) {
300 if (af != NFPROTO_UNSPEC && !have_rev)
307 int xt_find_revision(u8 af, const char *name, u8 revision, int target,
312 mutex_lock(&xt[af].mutex);
314 have_rev = target_revfn(af, name, revision, &best);
316 have_rev = match_revfn(af, name, revision, &best);
317 mutex_unlock(&xt[af].mutex);
422 int xt_compat_add_offset(u_int8_t af, unsigned int offset, int delta)
424 struct xt_af *xp = &xt[af];
447 void xt_compat_flush_offsets(u_int8_t af)
449 if (xt[af].compat_tab) {
450 vfree(xt[af].compat_tab);
451 xt[af].compat_tab = NULL;
452 xt[af].number = 0;
453 xt[af].cur = 0;
458 int xt_compat_calc_jump(u_int8_t af, unsigned int offset)
460 struct compat_delta *tmp = xt[af].compat_tab;
461 int mid, left = 0, right = xt[af].cur - 1;
476 void xt_compat_init_offsets(u_int8_t af, unsigned int number)
478 xt[af].number = number;
479 xt[af].cur = 0;
713 struct xt_table *xt_find_table_lock(struct net *net, u_int8_t af,
718 mutex_lock(&xt[af].mutex);
719 list_for_each_entry(t, &net->xt.tables[af], list)
722 mutex_unlock(&xt[af].mutex);
729 mutex_unlock(&xt[table->af].mutex);
734 void xt_compat_lock(u_int8_t af)
736 mutex_lock(&xt[af].compat_mutex);
740 void xt_compat_unlock(u_int8_t af)
742 mutex_unlock(&xt[af].compat_mutex);
840 table->name, table->af,
867 mutex_lock(&xt[table->af].mutex);
869 list_for_each_entry(t, &net->xt.tables[table->af], list) {
888 list_add(&table->list, &net->xt.tables[table->af]);
889 mutex_unlock(&xt[table->af].mutex);
893 mutex_unlock(&xt[table->af].mutex);
904 mutex_lock(&xt[table->af].mutex);
907 mutex_unlock(&xt[table->af].mutex);
917 u_int8_t af;
923 u_int8_t af = priv->af;
925 mutex_lock(&xt[af].mutex);
926 return seq_list_start(&net->xt.tables[af], *pos);
933 u_int8_t af = priv->af;
935 return seq_list_next(v, &net->xt.tables[af], pos);
941 u_int8_t af = priv->af;
943 mutex_unlock(&xt[af].mutex);
972 priv->af = (unsigned long)PDE_DATA(inode);
1206 ops[i].pf = table->af;
1234 int xt_proto_init(struct net *net, u_int8_t af)
1241 if (af >= ARRAY_SIZE(xt_prefix))
1246 strlcpy(buf, xt_prefix[af], sizeof(buf));
1249 (void *)(unsigned long)af);
1253 strlcpy(buf, xt_prefix[af], sizeof(buf));
1256 (void *)(unsigned long)af);
1260 strlcpy(buf, xt_prefix[af], sizeof(buf));
1263 (void *)(unsigned long)af);
1272 strlcpy(buf, xt_prefix[af], sizeof(buf));
1277 strlcpy(buf, xt_prefix[af], sizeof(buf));
1286 void xt_proto_fini(struct net *net, u_int8_t af)
1291 strlcpy(buf, xt_prefix[af], sizeof(buf));
1295 strlcpy(buf, xt_prefix[af], sizeof(buf));
1299 strlcpy(buf, xt_prefix[af], sizeof(buf));