Home
last modified time | relevance | path

Searched refs:ctlv (Results 1 – 11 of 11) sorted by relevance

/freebsd/sys/netpfil/ipfw/
H A Dip_fw_compat.c225 ipfw_obj_ctlv *ctlv, *rtlv, *tstate; in parse_rules_v0() local
234 ctlv = (ipfw_obj_ctlv *)(op3 + 1); in parse_rules_v0()
236 if (read + sizeof(*ctlv) > sd->valsize) in parse_rules_v0()
243 if (ctlv->head.type == IPFW_TLV_TBLNAME_LIST) { in parse_rules_v0()
245 clen = ctlv->head.length; in parse_rules_v0()
246 if (read + clen > sd->valsize || clen < sizeof(*ctlv) || in parse_rules_v0()
250 count = (ctlv->head.length - sizeof(*ctlv)) / sizeof(*ntlv); in parse_rules_v0()
251 if (ctlv->count != count || ctlv->objsize != sizeof(*ntlv)) in parse_rules_v0()
259 ntlv = (ipfw_obj_ntlv_v0 *)(ctlv + 1); in parse_rules_v0()
276 tstate = ctlv; in parse_rules_v0()
[all …]
H A Dip_fw_sockopt.c1752 ipfw_obj_ctlv *ctlv; in dump_named_objects() local
1757 ctlv = (ipfw_obj_ctlv *)ipfw_get_sopt_space(sd, sizeof(*ctlv)); in dump_named_objects()
1758 if (ctlv == NULL) in dump_named_objects()
1760 ctlv->head.type = IPFW_TLV_TBLNAME_LIST; in dump_named_objects()
1761 ctlv->head.length = da->tcount * sizeof(ipfw_obj_ntlv) + in dump_named_objects()
1762 sizeof(*ctlv); in dump_named_objects()
1763 ctlv->count = da->tcount; in dump_named_objects()
1764 ctlv->objsize = sizeof(ipfw_obj_ntlv); in dump_named_objects()
1784 ipfw_obj_ctlv *ctlv; in dump_static_rules() local
1790 ctlv = (ipfw_obj_ctlv *)ipfw_get_sopt_space(sd, sizeof(*ctlv)); in dump_static_rules()
[all …]
H A Dip_fw_table.c909 ipfw_obj_ctlv *ctlv; in manage_table_ent_v1() local
917 if (sd->valsize < (sizeof(*oh) + sizeof(*ctlv))) in manage_table_ent_v1()
932 ctlv = (ipfw_obj_ctlv *)(oh + 1); in manage_table_ent_v1()
933 if (ctlv->head.length + read != sd->valsize) in manage_table_ent_v1()
936 read += sizeof(*ctlv); in manage_table_ent_v1()
937 tent = (ipfw_obj_tentry *)(ctlv + 1); in manage_table_ent_v1()
938 if (ctlv->count * sizeof(*tent) + read != sd->valsize) in manage_table_ent_v1()
941 if (ctlv->count == 0) in manage_table_ent_v1()
954 for (i = 0; i < ctlv->count; i++, ptent++) { in manage_table_ent_v1()
967 if (ctlv->count == 1) { in manage_table_ent_v1()
[all …]
H A Dip_fw_dynamic.c3064 ipfw_obj_ctlv *ctlv; in ipfw_dump_states() local
3077 ctlv = (ipfw_obj_ctlv *)ipfw_get_sopt_space(sd, sizeof(*ctlv)); in ipfw_dump_states()
3078 if (ctlv == NULL) in ipfw_dump_states()
3080 ctlv->head.type = IPFW_TLV_DYNSTATE_LIST; in ipfw_dump_states()
3081 ctlv->objsize = sizeof(ipfw_obj_dyntlv); in ipfw_dump_states()
H A Dip_fw_private.h496 ipfw_obj_ctlv *ctlv; /* name TLV containter */ member
/freebsd/sys/netpfil/ipfw/nat64/
H A Dnat64stl_control.c426 ipfw_obj_ctlv *ctlv; in nat64stl_stats() local
448 ctlv = (ipfw_obj_ctlv *)(oh + 1); in nat64stl_stats()
449 memset(ctlv, 0, sizeof(*ctlv)); in nat64stl_stats()
450 ctlv->head.type = IPFW_TLV_COUNTERS; in nat64stl_stats()
451 ctlv->head.length = sz - sizeof(ipfw_obj_header); in nat64stl_stats()
452 ctlv->count = sizeof(stats) / sizeof(uint64_t); in nat64stl_stats()
453 ctlv->objsize = sizeof(uint64_t); in nat64stl_stats()
454 ctlv->version = IPFW_NAT64_VERSION; in nat64stl_stats()
455 memcpy(ctlv + 1, &stats, sizeof(stats)); in nat64stl_stats()
H A Dnat64clat_control.c421 ipfw_obj_ctlv *ctlv; in nat64clat_stats() local
443 ctlv = (ipfw_obj_ctlv *)(oh + 1); in nat64clat_stats()
444 memset(ctlv, 0, sizeof(*ctlv)); in nat64clat_stats()
445 ctlv->head.type = IPFW_TLV_COUNTERS; in nat64clat_stats()
446 ctlv->head.length = sz - sizeof(ipfw_obj_header); in nat64clat_stats()
447 ctlv->count = sizeof(stats) / sizeof(uint64_t); in nat64clat_stats()
448 ctlv->objsize = sizeof(uint64_t); in nat64clat_stats()
449 ctlv->version = IPFW_NAT64_VERSION; in nat64clat_stats()
450 memcpy(ctlv + 1, &stats, sizeof(stats)); in nat64clat_stats()
H A Dnat64lsn_control.c487 ipfw_obj_ctlv *ctlv; in nat64lsn_stats() local
510 ctlv = (ipfw_obj_ctlv *)(oh + 1); in nat64lsn_stats()
511 memset(ctlv, 0, sizeof(*ctlv)); in nat64lsn_stats()
512 ctlv->head.type = IPFW_TLV_COUNTERS; in nat64lsn_stats()
513 ctlv->head.length = sz - sizeof(ipfw_obj_header); in nat64lsn_stats()
514 ctlv->count = sizeof(stats) / sizeof(uint64_t); in nat64lsn_stats()
515 ctlv->objsize = sizeof(uint64_t); in nat64lsn_stats()
516 ctlv->version = IPFW_NAT64_VERSION; in nat64lsn_stats()
517 memcpy(ctlv + 1, &stats, sizeof(stats)); in nat64lsn_stats()
/freebsd/sbin/ipfw/
H A Dipfw2.c447 static char *table_search_ctlv(ipfw_obj_ctlv *ctlv, uint32_t idx);
448 static void object_sort_ctlv(ipfw_obj_ctlv *ctlv);
449 static char *object_search_ctlv(ipfw_obj_ctlv *ctlv, uint32_t idx,
2817 ipfw_obj_ctlv *ctlv; in foreach_state() local
2823 ctlv = (ipfw_obj_ctlv *)base; in foreach_state()
2824 switch (ctlv->head.type) { in foreach_state()
2826 base += sizeof(*ctlv); in foreach_state()
2827 sz -= sizeof(*ctlv); in foreach_state()
3025 ipfw_obj_ctlv *ctlv; in ipfw_show_config() local
3039 ctlv = (ipfw_obj_ctlv *)(cfg + 1); in ipfw_show_config()
[all …]
H A Dtables.c900 ipfw_obj_ctlv *ctlv; in table_do_modify_record() local
907 sz = sizeof(*ctlv) + sizeof(*tent) * count; in table_do_modify_record()
920 ctlv = (ipfw_obj_ctlv *)(oh + 1); in table_do_modify_record()
921 ctlv->count = count; in table_do_modify_record()
922 ctlv->head.length = sz; in table_do_modify_record()
924 ctlv->flags |= IPFW_CTF_ATOMIC; in table_do_modify_record()
927 memcpy(ctlv + 1, tent, sizeof(*tent) * count); in table_do_modify_record()
928 tent = (ipfw_obj_tentry *)(ctlv + 1); in table_do_modify_record()
938 tent = (ipfw_obj_tentry *)(ctlv + 1); in table_do_modify_record()
940 memcpy(tent_base, ctlv + 1, sizeof(*tent) * count); in table_do_modify_record()
/freebsd/sys/netpfil/ipfw/nptv6/
H A Dnptv6.c838 ipfw_obj_ctlv *ctlv; in nptv6_stats() local
863 ctlv = (ipfw_obj_ctlv *)(oh + 1); in nptv6_stats()
864 memset(ctlv, 0, sizeof(*ctlv)); in nptv6_stats()
865 ctlv->head.type = IPFW_TLV_COUNTERS; in nptv6_stats()
866 ctlv->head.length = sz - sizeof(ipfw_obj_header); in nptv6_stats()
867 ctlv->count = sizeof(stats) / sizeof(uint64_t); in nptv6_stats()
868 ctlv->objsize = sizeof(uint64_t); in nptv6_stats()
869 ctlv->version = 1; in nptv6_stats()
870 memcpy(ctlv + 1, &stats, sizeof(stats)); in nptv6_stats()