Lines Matching refs:tstate

70 	ipfw_obj_ctlv *tstate;	/* table state data */
383 static uint16_t pack_object(struct tidx *tstate, char *name, int otype);
384 static uint16_t pack_table(struct tidx *tstate, char *name);
1184 t = table_search_ctlv(fo->tstate, ((ipfw_insn *)cmd)->arg1);
1197 t = table_search_ctlv(fo->tstate, ((ipfw_insn *)cmd)->arg1);
1604 ename = object_search_ctlv(fo->tstate, cmd->arg1,
1628 ename = object_search_ctlv(fo->tstate, cmd->arg1, 0);
1630 ename = object_search_ctlv(fo->tstate,
1919 t = table_search_ctlv(fo->tstate,
1931 t = table_search_ctlv(fo->tstate, cmd->arg1);
2617 ipfw_obj_ctlv *ctlv, *tstate;
2623 tstate = NULL;
2638 fo->tstate = ctlv;
2840 pack_object(struct tidx *tstate, char *name, int otype)
2845 for (i = 0; i < tstate->count; i++) {
2846 if (strcmp(tstate->idx[i].name, name) != 0)
2848 if (tstate->idx[i].set != tstate->set)
2850 if (tstate->idx[i].head.type != otype)
2853 return (tstate->idx[i].idx);
2856 if (tstate->count + 1 > tstate->size) {
2857 tstate->size += 4;
2858 tstate->idx = realloc(tstate->idx, tstate->size *
2860 if (tstate->idx == NULL)
2864 ntlv = &tstate->idx[i];
2869 ntlv->set = tstate->set;
2870 ntlv->idx = ++tstate->counter;
2871 tstate->count++;
2877 pack_table(struct tidx *tstate, char *name)
2883 return (pack_object(tstate, name, IPFW_TLV_TBL_NAME));
2887 fill_table(ipfw_insn *cmd, char *av, uint8_t opcode, struct tidx *tstate)
2900 if ((uidx = pack_table(tstate, av + 6)) == 0)
2925 fill_ip(ipfw_insn_ip *cmd, char *av, int cblen, struct tidx *tstate)
2941 fill_table(&cmd->o, av, O_IP_DST_LOOKUP, tstate);
3220 fill_iface(ipfw_insn_if *cmd, char *arg, int cblen, struct tidx *tstate)
3240 if ((uidx = pack_table(tstate, arg + 6)) == 0)
3458 add_srcip(ipfw_insn *cmd, char *av, int cblen, struct tidx *tstate)
3460 fill_ip((ipfw_insn_ip *)cmd, av, cblen, tstate);
3475 add_dstip(ipfw_insn *cmd, char *av, int cblen, struct tidx *tstate)
3477 fill_ip((ipfw_insn_ip *)cmd, av, cblen, tstate);
3527 add_src(ipfw_insn *cmd, char *av, u_char proto, int cblen, struct tidx *tstate)
3550 ret = add_srcip(cmd, av, cblen, tstate);
3558 add_dst(ipfw_insn *cmd, char *av, u_char proto, int cblen, struct tidx *tstate)
3581 ret = add_dstip(cmd, av, cblen, tstate);
3601 compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, struct tidx *tstate)
3664 tstate->set = set;
3963 idx = pack_object(tstate, *av, IPFW_TLV_EACTION);
3980 idx = pack_object(tstate, *av, 0);
4178 if (add_src(cmd, *av, proto, cblen, tstate)) {
4214 if (add_dst(cmd, *av, proto, cblen, tstate)) {
4321 fill_iface((ipfw_insn_if *)cmd, av[0], cblen, tstate);
4567 if (add_srcip(cmd, *av, cblen, tstate)) {
4574 if (add_dstip(cmd, *av, cblen, tstate)) {
4709 if ((j = pack_table(tstate, *av)) == 0)
4721 fill_table(cmd, *av, O_IP_FLOW_LOOKUP, tstate);
4956 ipfw_obj_ctlv *ctlv, *tstate;
4975 tstate = NULL;
4992 tstate = ctlv;
5015 sfo.tstate = tstate;