| /freebsd/sys/netpfil/ipfw/ |
| H A D | ip_fw_eaction.c | 97 ((struct eaction_obj *)SRV_OBJECT((ch), insntod((cmd), kidx)->kidx)) 128 cmd = insntod(cmd0, kidx); in eaction_classify() 129 EACTION_DEBUG("opcode %u, kidx %u", cmd0->opcode, cmd->kidx); in eaction_classify() 130 *puidx = cmd->kidx; in eaction_classify() 140 cmd = insntod(cmd0, kidx); in eaction_update() 141 cmd->kidx = idx; in eaction_update() 142 EACTION_DEBUG("opcode %u, kidx -> %u", cmd0->opcode, cmd->kidx); in eaction_update() 221 if (ipfw_objhash_alloc_idx(ni, &obj->no.kidx) != 0) { in create_eaction_obj() 229 SRV_OBJECT(ch, obj->no.kidx) = obj; in create_eaction_obj() 235 *eaction_id = obj->no.kidx; in create_eaction_obj() [all …]
|
| H A D | ip_fw_table.c | 106 get_table_value(struct ip_fw_chain *ch, struct table_config *tc, uint32_t kidx) in get_table_value() argument 112 return (&pval[kidx]); in get_table_value() 219 uint32_t kidx; in find_ref_table() local 252 error = create_table_compat(ch, ti, &kidx); in find_ref_table() 257 tc = (struct table_config *)ipfw_objhash_lookup_kidx(ni, kidx); in find_ref_table() 258 KASSERT(tc != NULL, ("create_table_compat returned bad idx %u", kidx)); in find_ref_table() 428 uint32_t kidx, num, numadd; in add_table_entry() local 463 kidx = tc->no.kidx; in add_table_entry() 464 error = check_table_space(ch, tc, KIDX_TO_TI(ch, kidx), count); in add_table_entry() 469 kidx = tc->no.kidx; in add_table_entry() [all …]
|
| H A D | ip_fw_dynamic.c | 172 uint32_t kidx; /* named object index */ member 197 uint16_t kidx; /* named object index */ member 594 cmd = insntod(cmd0, kidx); in dyn_classify() 595 DYN_DEBUG("opcode %u, kidx %u", cmd0->opcode, cmd->kidx); in dyn_classify() 597 if (cmd->kidx == 0 && in dyn_classify() 601 *puidx = cmd->kidx; in dyn_classify() 610 insntod(cmd0, kidx)->kidx = idx; in dyn_update() 693 *pkidx = no->kidx; in dyn_create() 699 if (ipfw_objhash_alloc_idx(ni, &obj->no.kidx) != 0) { in dyn_create() 705 SRV_OBJECT(ch, obj->no.kidx) = obj; in dyn_create() [all …]
|
| H A D | ip_fw_table_value.c | 163 ptv->pval = &pval[ptv->no.kidx]; in update_tvalue() 164 ptv->no.name = (char *)&pval[ptv->no.kidx]; in update_tvalue() 249 uint32_t kidx) in unref_table_value() argument 253 KASSERT(pval[kidx].refcnt > 0, ("Refcount is 0 on kidx %d", kidx)); in unref_table_value() 254 if (--pval[kidx].refcnt > 0) in unref_table_value() 258 ptvl = (struct table_val_link *)ipfw_objhash_lookup_kidx(vi, kidx); in unref_table_value() 259 KASSERT(ptvl != NULL, ("lookup on value kidx %d failed", kidx)); in unref_table_value() 261 ipfw_objhash_free_idx(vi, kidx); in unref_table_value() 294 (struct table_value *)ch->valuestate, tent->v.kidx); in unref_table_value_cb() 452 if (vlimit > 0 && vlimit <= ptv->no.kidx) in ipfw_link_table_values() [all …]
|
| H A D | ip_fw_sockopt.c | 157 static int export_objhash_ntlv(struct namedobj_instance *ni, uint32_t kidx, 820 uint32_t kidx; in move_objects() local 836 rw = find_op_rw(cmd, &kidx, NULL); in move_objects() 845 if (rw->manage_sets(ch, kidx, 1, COUNT_ONE) != 0) in move_objects() 863 rw = find_op_rw(cmd, &kidx, NULL); in move_objects() 867 c = rw->manage_sets(ch, kidx, in move_objects() 882 rw = find_op_rw(cmd, &kidx, NULL); in move_objects() 886 rw->manage_sets(ch, kidx, in move_objects() 891 rw->manage_sets(ch, kidx, in move_objects() 1320 if (insntod(cmd, kidx)->kidx == 0) in ipfw_check_opcode() [all …]
|
| H A D | ip_fw_private.h | 200 ((p)->kidx != 0 && (p)->kidx != (cmd)->arg1)) 203 (p)->kidx = 0; \ 207 uint32_t kidx; /* state name kidx */ member 348 uint16_t kidx; /* value kernel index */ member 363 uint32_t kidx; /* object kernel index */ member 490 uint32_t kidx; /* kernel object index */ member 571 uint32_t kidx); 666 int ipfw_mark_object_kidx(uint32_t *bmask, uint16_t etlv, uint32_t kidx); 781 uint32_t kidx); 782 int ipfw_ref_table(struct ip_fw_chain *ch, ipfw_obj_ntlv *ntlv, uint32_t *kidx); [all …]
|
| H A D | ip_fw_compat.c | 94 u_int16_t kidx; /* index of named object */ member 150 uint32_t kidx; /* value kernel index */ member 379 insntod(dst, kidx)->kidx = src->arg1; in convert_v0_to_v1() 383 insntod(dst, limit)->kidx = src->arg1; in convert_v0_to_v1() 400 insntod(dst, kidx)->kidx = src->arg1; in convert_v0_to_v1() 403 insntod(dst, table)->kidx = src->arg1; in convert_v0_to_v1()
|
| /freebsd/sbin/ipfw/tests/ |
| H A D | test_add_rule.py | 184 InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), 185 InsnKidx(IpFwOpcode.O_IP_DST_LOOKUP, kidx=2), 201 InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), 203 kidx=2, 221 InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), 223 kidx=2, 241 InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), 243 kidx=2, 261 InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), 263 kidx=2, [all …]
|
| /freebsd/sys/netpfil/ipfw/nat64/ |
| H A D | ip_fw_nat64.h | 65 insntod(icmd, kidx)->kidx != V_ ## mod ## _eid) \ 67 *puidx = insntod(cmd0, kidx)->kidx; \ 74 insntod(cmd0, kidx)->kidx = idx; \
|
| H A D | nat64clat.c | 62 (struct nat64clat_cfg *)SRV_OBJECT((chain), insntod(cmd, kidx)->kidx) 66 uint32_t kidx) in nat64clat_log() argument 75 plog->rulenr = htonl(kidx); in nat64clat_log() 104 nat64clat_log(logdata, m, AF_INET, cfg->no.kidx); in nat64clat_handle_ip4() 136 nat64clat_log(logdata, m, AF_INET6, cfg->no.kidx); in nat64clat_handle_ip6() 196 nat64clat_log(logdata, m, AF_INET6, cfg->no.kidx); in nat64clat_handle_icmp6() 215 insntod(cmd, kidx)->kidx != V_nat64clat_eid || in ipfw_nat64clat()
|
| H A D | nat64stl.c | 61 (struct nat64stl_cfg *)SRV_OBJECT((chain), insntod(cmd, kidx)->kidx) 65 uint32_t kidx) in nat64stl_log() argument 74 plog->rulenr = htonl(kidx); in nat64stl_log() 105 nat64stl_log(logdata, m, AF_INET, cfg->no.kidx); in nat64stl_handle_ip4() 138 nat64stl_log(logdata, m, AF_INET6, cfg->no.kidx); in nat64stl_handle_ip6() 196 nat64stl_log(logdata, m, AF_INET6, cfg->no.kidx); in nat64stl_handle_icmp6() 218 insntod(cmd, kidx)->kidx != V_nat64stl_eid || in ipfw_nat64stl()
|
| H A D | nat64stl_control.c | 147 if (ipfw_objhash_alloc_idx(CHAIN_TO_SRV(ch), &cfg->no.kidx) != 0) in nat64stl_create_internal() 222 SRV_OBJECT(ch, cfg->no.kidx) = cfg; in nat64stl_create() 228 ipfw_objhash_free_idx(ni, cfg->no.kidx); in nat64stl_create() 305 ipfw_objhash_free_idx(CHAIN_TO_SRV(ch), cfg->no.kidx); in nat64stl_detach_config() 342 ipfw_reset_eaction_instance(ch, V_nat64stl_eid, cfg->no.kidx); in nat64stl_destroy() 343 SRV_OBJECT(ch, cfg->no.kidx) = NULL; in nat64stl_destroy() 518 cfg = (struct nat64stl_cfg *)SRV_OBJECT(ch, no->kidx); in destroy_config_cb() 519 SRV_OBJECT(ch, no->kidx) = NULL; in destroy_config_cb()
|
| H A D | nat64clat_control.c | 190 if (ipfw_objhash_alloc_idx(ni, &cfg->no.kidx) != 0) { in nat64clat_create() 197 SRV_OBJECT(ch, cfg->no.kidx) = cfg; in nat64clat_create() 302 ipfw_objhash_free_idx(CHAIN_TO_SRV(ch), cfg->no.kidx); in nat64clat_detach_config() 337 ipfw_reset_eaction_instance(ch, V_nat64clat_eid, cfg->no.kidx); in nat64clat_destroy() 338 SRV_OBJECT(ch, cfg->no.kidx) = NULL; in nat64clat_destroy() 513 cfg = (struct nat64clat_cfg *)SRV_OBJECT(ch, no->kidx); in destroy_config_cb() 514 SRV_OBJECT(ch, no->kidx) = NULL; in destroy_config_cb()
|
| /freebsd/sys/netpfil/ipfw/nptv6/ |
| H A D | nptv6.c | 79 (struct nptv6_cfg *)SRV_OBJECT((chain), insntod(cmd, kidx)->kidx) 359 insntod(cmd, kidx)->kidx != V_nptv6_eid || in ipfw_nptv6() 377 insntod(cmd, kidx)->kidx, insntod(icmd, kidx)->kidx, in ipfw_nptv6() 579 cfg = (struct nptv6_cfg *)SRV_OBJECT(ch, no->kidx); in ifaddr_cb() 702 if (ipfw_objhash_alloc_idx(ni, &cfg->no.kidx) != 0) { in nptv6_create() 708 SRV_OBJECT(ch, cfg->no.kidx) = cfg; in nptv6_create() 748 ipfw_reset_eaction_instance(ch, V_nptv6_eid, cfg->no.kidx); in nptv6_destroy() 749 SRV_OBJECT(ch, cfg->no.kidx) = NULL; in nptv6_destroy() 751 ipfw_objhash_free_idx(CHAIN_TO_SRV(ch), cfg->no.kidx); in nptv6_destroy() 922 cmd->opcode, insntod(cmd, kidx)->kidx, in nptv6_classify() [all …]
|
| /freebsd/tests/atf_python/sys/netpfil/ipfw/ |
| H A D | insns.py | 315 def __init__(self, opcode, is_or=False, is_not=False, arg1=0, kidx=0): argument 316 super().__init__(opcode, is_or=is_or, is_not=is_not, arg1=arg1, u32=kidx) 319 def kidx(self): member in InsnKidx 322 @kidx.setter 323 def kidx(self, kidx): argument 324 self.u32 = kidx 327 return " arg1={}, kidx={}".format(self.arg1, self.kidx) 375 def __init__(self, opcode, is_or=False, is_not=False, arg1=0, kidx=0, value=None): argument 376 super().__init__(opcode, is_or=is_or, is_not=is_not, arg1=arg1, kidx=kidx) 387 (self.kidx,) = struct.unpack("@I", data[4:8]) [all …]
|
| /freebsd/sys/contrib/dev/rtw89/ |
| H A D | rtw8852b_rfk.c | 1691 u8 val, kidx = dpk->cur_idx[path]; in _dpk_onoff() local 1693 val = dpk->is_dpk_enable && !off && dpk->bp[path][kidx].path_ok; in _dpk_onoff() 1695 rtw89_phy_write32_mask(rtwdev, R_DPD_CH0A + (path << 8) + (kidx << 2), in _dpk_onoff() 1699 kidx, str_enable_disable(dpk->is_dpk_enable && !off)); in _dpk_onoff() 1757 u8 kidx = dpk->cur_idx[path]; in _dpk_information() local 1759 dpk->bp[path][kidx].band = chan->band_type; in _dpk_information() 1760 dpk->bp[path][kidx].ch = chan->channel; in _dpk_information() 1761 dpk->bp[path][kidx].bw = chan->band_width; in _dpk_information() 1768 dpk->bp[path][kidx].band == 0 ? "2G" : in _dpk_information() 1769 dpk->bp[path][kidx].band == 1 ? "5G" : "6G", in _dpk_information() [all …]
|
| H A D | rtw8852c_rfk.c | 1914 u8 kidx = dpk->cur_idx[path]; in _dpk_information() local 1916 dpk->bp[path][kidx].band = chan->band_type; in _dpk_information() 1917 dpk->bp[path][kidx].ch = chan->channel; in _dpk_information() 1918 dpk->bp[path][kidx].bw = chan->band_width; in _dpk_information() 1925 dpk->bp[path][kidx].band == 0 ? "2G" : in _dpk_information() 1926 dpk->bp[path][kidx].band == 1 ? "5G" : "6G", in _dpk_information() 1927 dpk->bp[path][kidx].ch, in _dpk_information() 1928 dpk->bp[path][kidx].bw == 0 ? "20M" : in _dpk_information() 1929 dpk->bp[path][kidx].bw == 1 ? "40M" : "80M"); in _dpk_information() 2064 enum rtw89_rf_path path, u8 kidx) in _dpk_rf_setting() argument [all …]
|
| H A D | rtw8851b_rfk.c | 1867 u8 kidx = dpk->cur_idx[path]; in _dpk_onoff() local 1871 val = dpk->is_dpk_enable * off_reverse * dpk->bp[path][kidx].path_ok; in _dpk_onoff() 1873 rtw89_phy_write32_mask(rtwdev, R_DPD_CH0A + (path << 8) + (kidx << 2), in _dpk_onoff() 1877 kidx, val == 0 ? "disable" : "enable"); in _dpk_onoff() 1884 u8 kidx = dpk->cur_idx[path]; in _dpk_init() local 1886 dpk->bp[path][kidx].path_ok = 0; in _dpk_init() 1895 u8 kidx = dpk->cur_idx[path]; in _dpk_information() local 1897 dpk->bp[path][kidx].band = chan->band_type; in _dpk_information() 1898 dpk->bp[path][kidx].ch = chan->band_width; in _dpk_information() 1899 dpk->bp[path][kidx].bw = chan->channel; in _dpk_information() [all …]
|
| H A D | rtw8852a_rfk.c | 1875 u8 kidx = dpk->cur_idx[path]; in _dpk_information() local 1877 dpk->bp[path][kidx].band = chan->band_type; in _dpk_information() 1878 dpk->bp[path][kidx].ch = chan->channel; in _dpk_information() 1879 dpk->bp[path][kidx].bw = chan->band_width; in _dpk_information() 1886 dpk->bp[path][kidx].band == 0 ? "2G" : in _dpk_information() 1887 dpk->bp[path][kidx].band == 1 ? "5G" : "6G", in _dpk_information() 1888 dpk->bp[path][kidx].ch, in _dpk_information() 1889 dpk->bp[path][kidx].bw == 0 ? "20M" : in _dpk_information() 1890 dpk->bp[path][kidx].bw == 1 ? "40M" : "80M"); in _dpk_information() 1956 enum rtw89_rf_path path, u8 kidx) in _dpk_kip_setting() argument [all …]
|
| H A D | rtw8852bt_rfk.c | 135 static void _rfk_get_thermal(struct rtw89_dev *rtwdev, u8 kidx, enum rtw89_rf_path path) in _rfk_get_thermal() argument 145 dpk->bp[path][kidx].ther_dpk = rtw89_read_rf(rtwdev, path, RR_TM, RR_TM_VAL); in _rfk_get_thermal() 148 dpk->bp[path][kidx].ther_dpk); in _rfk_get_thermal() 1801 u8 val, kidx = dpk->cur_idx[path]; in _dpk_onoff() local 1803 val = dpk->is_dpk_enable && !off && dpk->bp[path][kidx].path_ok; in _dpk_onoff() 1805 rtw89_phy_write32_mask(rtwdev, R_DPD_CH0A + (path << 8) + (kidx << 2), in _dpk_onoff() 1809 kidx, str_enable_disable(dpk->is_dpk_enable && !off)); in _dpk_onoff() 1869 u8 kidx = dpk->cur_idx[path]; in _dpk_information() local 1871 dpk->bp[path][kidx].band = chan->band_type; in _dpk_information() 1872 dpk->bp[path][kidx].ch = chan->channel; in _dpk_information() [all …]
|
| /freebsd/sys/netinet/ |
| H A D | ip_fw.h | 399 uint32_t kidx; member 413 uint32_t kidx; /* table name index */ member 419 uint32_t kidx; /* table name index */ member 510 uint32_t kidx; member 528 u_int32_t kidx; member 828 uint32_t kidx; /* index of named object */ member 1015 uint32_t kidx; /* value kernel index */ member 1042 uint32_t kidx; /* value kernel index */ member 1122 uint32_t kidx; /* kernel index */ member
|
| /freebsd/sys/dev/usb/wlan/ |
| H A D | if_mtwreg.h | 270 #define MTW_SKEY(vap, kidx) ((vap & 8) ? MTW_SKEY_1(vap, kidx) : \ argument 271 MTW_SKEY_0(vap, kidx)) 272 #define MTW_SKEY_0(vap, kidx) (0xac00 + (4 * (vap) + (kidx)) * 32) argument 273 #define MTW_SKEY_1(vap, kidx) (0xb400 + (4 * ((vap) & 7) + (kidx)) * 32) argument
|
| H A D | if_rumreg.h | 52 #define RT2573_SKEY(vap, kidx) (0x1000 + ((vap) * RT2573_SKEY_MAX + \ argument 53 (kidx)) * KEY_SIZE)
|
| /freebsd/sbin/ipfw/ |
| H A D | ipfw2.c | 1370 insntoc(&cmd->o, kidx)->kidx); in print_ip() 1407 insntoc(&cmd->o, kidx)->kidx); in print_ip() 1533 t = table_search_ctlv(fo->tstate, insntoc(cmd, kidx)->kidx); in print_mac_lookup() 1816 insntoc(cmd, if)->p.kidx)); in print_instruction() 1825 insntoc(cmd, kidx)->kidx); in print_instruction() 1942 insntoc(cmd, kidx)->kidx, in print_instruction() 1953 insntoc(cmd, kidx)->kidx, in print_instruction() 2093 if (insntoc(cmd, kidx)->kidx != 0) in print_action_instruction() 2095 insntoc(cmd, kidx)->kidx, in print_action_instruction() 2196 state->eaction = insntoc(cmd, kidx); in print_action_instruction() [all …]
|
| /freebsd/sys/netpfil/ipfw/pmod/ |
| H A D | tcpmod.c | 186 insntod(cmd, kidx)->kidx != V_tcpmod_setmss_eid || in ipfw_tcpmod()
|