Home | History | Annotate | Download | only in extensions

Lines Matching refs:cb

294 static void conntrack_parse(struct xt_option_call *cb)
296 struct xt_conntrack_info *sinfo = cb->data;
298 xtables_option_parse(cb);
299 switch (cb->entry->id) {
301 parse_states(cb->arg, sinfo);
302 if (cb->invert)
306 if (cb->invert)
308 sinfo->tuple[IP_CT_DIR_ORIGINAL].dst.protonum = cb->val.protocol;
318 if (cb->invert)
320 sinfo->tuple[IP_CT_DIR_ORIGINAL].src.ip = cb->val.haddr.ip;
324 if (cb->invert)
326 sinfo->tuple[IP_CT_DIR_ORIGINAL].dst.ip = cb->val.haddr.ip;
330 if (cb->invert)
332 sinfo->tuple[IP_CT_DIR_REPLY].src.ip = cb->val.haddr.ip;
336 if (cb->invert)
338 sinfo->tuple[IP_CT_DIR_REPLY].dst.ip = cb->val.haddr.ip;
342 parse_statuses(cb->arg, sinfo);
343 if (cb->invert)
348 sinfo->expires_min = cb->val.u32_range[0];
349 sinfo->expires_max = cb->val.u32_range[0];
350 if (cb->nvals >= 2)
351 sinfo->expires_max = cb->val.u32_range[1];
352 if (cb->invert)
359 static void conntrack_mt_parse(struct xt_option_call *cb, uint8_t rev)
361 struct xt_conntrack_mtinfo3 *info = cb->data;
363 xtables_option_parse(cb);
364 switch (cb->entry->id) {
366 conntrack_ps_states(info, cb->arg);
368 if (cb->invert)
372 info->l4proto = cb->val.protocol;
378 if (cb->invert)
382 info->origsrc_addr = cb->val.haddr;
383 info->origsrc_mask = cb->val.hmask;
385 if (cb->invert)
389 info->origdst_addr = cb->val.haddr;
390 info->origdst_mask = cb->val.hmask;
392 if (cb->invert)
396 info->replsrc_addr = cb->val.haddr;
397 info->replsrc_mask = cb->val.hmask;
399 if (cb->invert)
403 info->repldst_addr = cb->val.haddr;
404 info->repldst_mask = cb->val.hmask;
406 if (cb->invert)
410 conntrack_ps_statuses(info, cb->arg);
412 if (cb->invert)
416 info->expires_min = cb->val.u32_range[0];
417 info->expires_max = cb->val.u32_range[0];
418 if (cb->nvals >= 2)
419 info->expires_max = cb->val.u32_range[1];
421 if (cb->invert)
425 info->origsrc_port = cb->val.port_range[0];
426 info->origsrc_port_high = cb->val.port_range[cb->nvals >= 2];
428 if (cb->invert)
432 info->origdst_port = cb->val.port_range[0];
433 info->origdst_port_high = cb->val.port_range[cb->nvals >= 2];
435 if (cb->invert)
439 info->replsrc_port = cb->val.port_range[0];
440 info->replsrc_port_high = cb->val.port_range[cb->nvals >= 2];
442 if (cb->invert)
446 info->repldst_port = cb->val.port_range[0];
447 info->repldst_port_high = cb->val.port_range[cb->nvals >= 2];
449 if (cb->invert)
453 if (strcasecmp(cb->arg, "ORIGINAL") == 0) {
456 } else if (strcasecmp(cb->arg, "REPLY") == 0) {
460 xtables_param_act(XTF_BAD_VALUE, "conntrack", "--ctdir", cb->arg);
473 static void conntrack1_mt_parse(struct xt_option_call *cb)
475 struct xt_conntrack_mtinfo1 *info = cb->data;
484 cb->data = &up;
485 conntrack_mt_parse(cb, 3);
493 cb->data = info;
496 static void conntrack2_mt_parse(struct xt_option_call *cb)
501 struct xt_conntrack_mtinfo2 *info = cb->data;
510 cb->data = &up;
511 conntrack_mt_parse(cb, 3);
519 cb->data = info;
523 cb)
525 conntrack_mt_parse(cb, 3);
528 static void conntrack_mt_check(struct xt_fcheck_call *cb)
530 if (cb->xflags == 0)