Lines Matching refs:tstate

72 	ipfw_obj_ctlv *tstate;	/* table state data */  member
446 static uint32_t pack_object(struct tidx *tstate, const char *name, int otype);
447 static uint32_t pack_table(struct tidx *tstate, const char *name);
1355 t = table_search_ctlv(fo->tstate, in print_ip()
1368 t = table_search_ctlv(fo->tstate, in print_ip()
1482 t = table_search_ctlv(fo->tstate, insntoc(cmd, kidx)->kidx); in print_mac_lookup()
1762 table_search_ctlv(fo->tstate, in print_instruction()
1771 s = table_search_ctlv(fo->tstate, in print_instruction()
1888 object_search_ctlv(fo->tstate, in print_instruction()
1899 object_search_ctlv(fo->tstate, in print_instruction()
2041 s = object_search_ctlv(fo->tstate, in print_action_instruction()
2144 s = object_search_ctlv(fo->tstate, in print_action_instruction()
2165 s = object_search_ctlv(fo->tstate, in print_action_instruction()
2168 s = object_search_ctlv(fo->tstate, in print_action_instruction()
2566 bprintf(bp, " :%s", object_search_ctlv(fo->tstate, in show_dyn_state()
3044 fo->tstate = ctlv; in ipfw_show_config()
3265 pack_object(struct tidx *tstate, const char *name, int otype) in pack_object() argument
3270 for (i = 0; i < tstate->count; i++) { in pack_object()
3271 if (strcmp(tstate->idx[i].name, name) != 0) in pack_object()
3273 if (tstate->idx[i].set != tstate->set) in pack_object()
3275 if (tstate->idx[i].head.type != otype) in pack_object()
3278 return (tstate->idx[i].idx); in pack_object()
3281 if (tstate->count + 1 > tstate->size) { in pack_object()
3282 tstate->size += 4; in pack_object()
3283 tstate->idx = realloc(tstate->idx, tstate->size * in pack_object()
3285 if (tstate->idx == NULL) in pack_object()
3289 ntlv = &tstate->idx[i]; in pack_object()
3294 ntlv->set = tstate->set; in pack_object()
3295 ntlv->idx = ++tstate->counter; in pack_object()
3296 tstate->count++; in pack_object()
3302 pack_table(struct tidx *tstate, const char *name) in pack_table() argument
3308 return (pack_object(tstate, name, IPFW_TLV_TBL_NAME)); in pack_table()
3334 fill_table(ipfw_insn *cmd, char *av, uint8_t opcode, struct tidx *tstate) in fill_table() argument
3346 if ((c->kidx = pack_table(tstate, av + 6)) == 0) in fill_table()
3371 fill_ip(ipfw_insn_ip *cmd, char *av, int cblen, struct tidx *tstate) in fill_ip() argument
3387 fill_table(&cmd->o, av, O_IP_DST_LOOKUP, tstate); in fill_ip()
3668 fill_iface(ipfw_insn_if *cmd, char *arg, int cblen, struct tidx *tstate) in fill_iface() argument
3688 if ((uidx = pack_table(tstate, arg + 6)) == 0) in fill_iface()
3906 add_srcip(ipfw_insn *cmd, char *av, int cblen, struct tidx *tstate) in add_srcip() argument
3908 fill_ip((ipfw_insn_ip *)cmd, av, cblen, tstate); in add_srcip()
3923 add_dstip(ipfw_insn *cmd, char *av, int cblen, struct tidx *tstate) in add_dstip() argument
3925 fill_ip((ipfw_insn_ip *)cmd, av, cblen, tstate); in add_dstip()
3940 add_srcmac(ipfw_insn *cmd, char *av, struct tidx *tstate) in add_srcmac() argument
3944 fill_table(cmd, av, O_MAC_SRC_LOOKUP, tstate); in add_srcmac()
3951 add_dstmac(ipfw_insn *cmd, char *av, struct tidx *tstate) in add_dstmac() argument
3955 fill_table(cmd, av, O_MAC_DST_LOOKUP, tstate); in add_dstmac()
4000 add_src(ipfw_insn *cmd, char *av, u_char proto, int cblen, struct tidx *tstate) in add_src() argument
4019 ret = add_srcip6(cmd, av, cblen, tstate); in add_src()
4023 ret = add_srcip(cmd, av, cblen, tstate); in add_src()
4031 add_dst(ipfw_insn *cmd, char *av, u_char proto, int cblen, struct tidx *tstate) in add_dst() argument
4050 ret = add_dstip6(cmd, av, cblen, tstate); in add_dst()
4054 ret = add_dstip(cmd, av, cblen, tstate); in add_dst()
4145 compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, struct tidx *tstate) in compile_rule() argument
4210 tstate->set = set; in compile_rule()
4237 insntod(have_state, kidx)->kidx = pack_object(tstate, in compile_rule()
4246 tstate, *av + 1, IPFW_TLV_STATE_NAME); in compile_rule()
4577 idx = pack_object(tstate, "tcp-setmss", IPFW_TLV_EACTION); in compile_rule()
4615 idx = pack_object(tstate, *av, IPFW_TLV_EACTION); in compile_rule()
4633 idx = pack_object(tstate, *av, 0); in compile_rule()
4865 if (add_src(cmd, *av, proto, cblen, tstate)) { in compile_rule()
4901 if (add_dst(cmd, *av, proto, cblen, tstate)) { in compile_rule()
5018 fill_iface(insntod(cmd, if), av[0], cblen, tstate); in compile_rule()
5240 uidx = pack_object(tstate, *av + 1, in compile_rule()
5244 uidx = pack_object(tstate, default_state_name, in compile_rule()
5292 c->kidx = pack_object(tstate, *av + 1, in compile_rule()
5296 c->kidx = pack_object(tstate, in compile_rule()
5312 if (add_srcip(cmd, *av, cblen, tstate)) { in compile_rule()
5319 if (add_dstip(cmd, *av, cblen, tstate)) { in compile_rule()
5326 if (add_srcip6(cmd, *av, cblen, tstate)) { in compile_rule()
5333 if (add_dstip6(cmd, *av, cblen, tstate)) { in compile_rule()
5341 if (add_srcmac(cmd, *av, tstate)) { in compile_rule()
5348 if (add_dstmac(cmd, *av, tstate)) { in compile_rule()
5496 c->kidx = pack_table(tstate, *av); in compile_rule()
5508 fill_table(cmd, *av, O_IP_FLOW_LOOKUP, tstate); in compile_rule()
5779 ipfw_obj_ctlv *ctlv, *tstate; in ipfw_add() local
5798 tstate = NULL; in ipfw_add()
5815 tstate = ctlv; in ipfw_add()
5838 sfo.tstate = tstate; in ipfw_add()