Lines Matching refs:tstate
80 ipfw_obj_ctlv *tstate; /* table state data */ member
414 static uint16_t pack_object(struct tidx *tstate, const char *name, int otype);
415 static uint16_t pack_table(struct tidx *tstate, const char *name);
1221 t = table_search_ctlv(fo->tstate, in print_ip()
1232 t = table_search_ctlv(fo->tstate, in print_ip()
1596 table_search_ctlv(fo->tstate, in print_instruction()
1605 s = table_search_ctlv(fo->tstate, cmd->arg1); in print_instruction()
1721 object_search_ctlv(fo->tstate, cmd->arg1, in print_instruction()
1731 object_search_ctlv(fo->tstate, cmd->arg1, in print_instruction()
1841 s = object_search_ctlv(fo->tstate, cmd->arg1, in print_action_instruction()
1938 s = object_search_ctlv(fo->tstate, cmd->arg1, in print_action_instruction()
1958 s = object_search_ctlv(fo->tstate, cmd->arg1, 0); in print_action_instruction()
1960 s = object_search_ctlv(fo->tstate, in print_action_instruction()
2328 bprintf(bp, " :%s", object_search_ctlv(fo->tstate, in show_dyn_state()
2794 ipfw_obj_ctlv *ctlv, *tstate; in ipfw_show_config() local
2800 tstate = NULL; in ipfw_show_config()
2812 fo->tstate = ctlv; in ipfw_show_config()
3037 pack_object(struct tidx *tstate, const char *name, int otype) in pack_object() argument
3042 for (i = 0; i < tstate->count; i++) { in pack_object()
3043 if (strcmp(tstate->idx[i].name, name) != 0) in pack_object()
3045 if (tstate->idx[i].set != tstate->set) in pack_object()
3047 if (tstate->idx[i].head.type != otype) in pack_object()
3050 return (tstate->idx[i].idx); in pack_object()
3053 if (tstate->count + 1 > tstate->size) { in pack_object()
3054 tstate->size += 4; in pack_object()
3055 tstate->idx = realloc(tstate->idx, tstate->size * in pack_object()
3057 if (tstate->idx == NULL) in pack_object()
3061 ntlv = &tstate->idx[i]; in pack_object()
3066 ntlv->set = tstate->set; in pack_object()
3067 ntlv->idx = ++tstate->counter; in pack_object()
3068 tstate->count++; in pack_object()
3074 pack_table(struct tidx *tstate, const char *name) in pack_table() argument
3080 return (pack_object(tstate, name, IPFW_TLV_TBL_NAME)); in pack_table()
3085 struct tidx *tstate) in fill_table() argument
3098 if ((uidx = pack_table(tstate, av + 6)) == 0) in fill_table()
3123 fill_ip(ipfw_insn_ip *cmd, char *av, int cblen, struct tidx *tstate) in fill_ip() argument
3139 fill_table(&cmd->o, av, O_IP_DST_LOOKUP, tstate); in fill_ip()
3425 fill_iface(ipfw_insn_if *cmd, char *arg, int cblen, struct tidx *tstate) in fill_iface() argument
3445 if ((uidx = pack_table(tstate, arg + 6)) == 0) in fill_iface()
3663 add_srcip(ipfw_insn *cmd, char *av, int cblen, struct tidx *tstate) in add_srcip() argument
3665 fill_ip((ipfw_insn_ip *)cmd, av, cblen, tstate); in add_srcip()
3680 add_dstip(ipfw_insn *cmd, char *av, int cblen, struct tidx *tstate) in add_dstip() argument
3682 fill_ip((ipfw_insn_ip *)cmd, av, cblen, tstate); in add_dstip()
3732 add_src(ipfw_insn *cmd, char *av, u_char proto, int cblen, struct tidx *tstate) in add_src() argument
3751 ret = add_srcip6(cmd, av, cblen, tstate); in add_src()
3755 ret = add_srcip(cmd, av, cblen, tstate); in add_src()
3763 add_dst(ipfw_insn *cmd, char *av, u_char proto, int cblen, struct tidx *tstate) in add_dst() argument
3782 ret = add_dstip6(cmd, av, cblen, tstate); in add_dst()
3786 ret = add_dstip(cmd, av, cblen, tstate); in add_dst()
3806 compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, struct tidx *tstate) in compile_rule() argument
3871 tstate->set = set; in compile_rule()
3896 action->arg1 = pack_object(tstate, in compile_rule()
3904 action->arg1 = pack_object(tstate, *av + 1, in compile_rule()
4196 idx = pack_object(tstate, "tcp-setmss", IPFW_TLV_EACTION); in compile_rule()
4230 idx = pack_object(tstate, *av, IPFW_TLV_EACTION); in compile_rule()
4247 idx = pack_object(tstate, *av, 0); in compile_rule()
4458 if (add_src(cmd, *av, proto, cblen, tstate)) { in compile_rule()
4494 if (add_dst(cmd, *av, proto, cblen, tstate)) { in compile_rule()
4611 fill_iface((ipfw_insn_if *)cmd, av[0], cblen, tstate); in compile_rule()
4837 uidx = pack_object(tstate, *av + 1, in compile_rule()
4841 uidx = pack_object(tstate, default_state_name, in compile_rule()
4886 cmd->arg1 = pack_object(tstate, *av + 1, in compile_rule()
4890 cmd->arg1 = pack_object(tstate, in compile_rule()
4906 if (add_srcip(cmd, *av, cblen, tstate)) { in compile_rule()
4913 if (add_dstip(cmd, *av, cblen, tstate)) { in compile_rule()
4920 if (add_srcip6(cmd, *av, cblen, tstate)) { in compile_rule()
4927 if (add_dstip6(cmd, *av, cblen, tstate)) { in compile_rule()
5049 if ((j = pack_table(tstate, *av)) == 0) in compile_rule()
5061 fill_table(cmd, *av, O_IP_FLOW_LOOKUP, tstate); in compile_rule()
5324 ipfw_obj_ctlv *ctlv, *tstate; in ipfw_add() local
5343 tstate = NULL; in ipfw_add()
5360 tstate = ctlv; in ipfw_add()
5383 sfo.tstate = tstate; in ipfw_add()