| 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */cxx . . $ `<file>/src/expr/log.c`/ |
| 2 | /* |
| 3 | * (C) 2012-2013 by Pablo Neira Ayuso <[email protected]> |
| 4 | * |
| 5 | * This code has been sponsored by Sophos Astaro <http://www.sophos.com> |
| 6 | */ |
| 7 | |
| 8 | #include <stdio.h> |
| 9 | #include <stdint.h> |
| 10 | #include <string.h> |
| 11 | #include <arpa/inet.h> |
| 12 | #include <errno.h> |
| 13 | #include <linux/netfilter/nf_tables.h>cxx . . $ `<file>/include/linux/netfilter/nf_tables.h`/ |
| 14 | #include <linux/netfilter/nf_log.h>cxx . . $ `<file>/include/linux/netfilter/nf_log.h`/ |
| 15 | |
| 16 | #include "internal.h"cxx . . $ `<file>/include/internal.h`/ |
| 17 | #include <libmnl/libmnl.h> |
| 18 | #include <libnftnl/expr.h>cxx . . $ `<file>/include/libnftnl/expr.h`/ |
| 19 | #include <libnftnl/rule.h>cxx . . $ `<file>/include/libnftnl/rule.h`/ |
| 20 | |
| 21 | struct nftnl_expr_logcxx . . $ nftnl_expr_log# { |
| 22 | uint32_tcxx . . $ uint32_t# snaplencxx . . $ nftnl_expr_log#snaplen.; |
| 23 | uint16_tcxx . . $ uint16_t# groupcxx . . $ nftnl_expr_log#group.; |
| 24 | uint16_tcxx . . $ uint16_t# qthresholdcxx . . $ nftnl_expr_log#qthreshold.; |
| 25 | uint32_tcxx . . $ uint32_t# levelcxx . . $ nftnl_expr_log#level.; |
| 26 | uint32_tcxx . . $ uint32_t# flagscxx . . $ nftnl_expr_log#flags.; |
| 27 | const char *prefixcxx . . $ nftnl_expr_log#prefix.; |
| 28 | }; |
| 29 | |
| 30 | static int |
| 31 | nftnl_expr_log_setcxx . . $ nftnl_expr_log_set(211371a3e3842127).(struct nftnl_exprcxx . . $ nftnl_expr# *e, uint16_tcxx . . $ uint16_t# type, |
| 32 | const void *data, uint32_tcxx . . $ uint32_t# data_len, uint32_tcxx . . $ uint32_t# byteorder) |
| 33 | { |
| 34 | struct nftnl_expr_logcxx . . $ nftnl_expr_log# *log = nftnl_expr_datacxx . . $ `include/expr_ops.h:31:9`!(e); |
| 35 | |
| 36 | switch(type) { |
| 37 | case NFTNL_EXPR_LOG_PREFIXcxx . . $ NFTNL_EXPR_LOG_PREFIX.: |
| 38 | if (log->flagscxx . . $ nftnl_expr_log#flags. & (1 << NFTNL_EXPR_LOG_PREFIXcxx . . $ NFTNL_EXPR_LOG_PREFIX.)) |
| 39 | xfreecxx . . $ `include/utils.h:22:9`!(log->prefix); |
| 40 | |
| 41 | log->prefixcxx . . $ nftnl_expr_log#prefix. = strdupcxx . . $ strdup(a8b8e32347182212).(data); |
| 42 | if (!log->prefixcxx . . $ nftnl_expr_log#prefix.) |
| 43 | return -1; |
| 44 | break; |
| 45 | case NFTNL_EXPR_LOG_GROUPcxx . . $ NFTNL_EXPR_LOG_GROUP.: |
| 46 | memcpycxx . . $ memcpy(cc817cb175f282d).(&log->groupcxx . . $ nftnl_expr_log#group., data, data_len); |
| 47 | break; |
| 48 | case NFTNL_EXPR_LOG_SNAPLENcxx . . $ NFTNL_EXPR_LOG_SNAPLEN.: |
| 49 | memcpycxx . . $ memcpy(cc817cb175f282d).(&log->snaplencxx . . $ nftnl_expr_log#snaplen., data, data_len); |
| 50 | break; |
| 51 | case NFTNL_EXPR_LOG_QTHRESHOLDcxx . . $ NFTNL_EXPR_LOG_QTHRESHOLD.: |
| 52 | memcpycxx . . $ memcpy(cc817cb175f282d).(&log->qthresholdcxx . . $ nftnl_expr_log#qthreshold., data, data_len); |
| 53 | break; |
| 54 | case NFTNL_EXPR_LOG_LEVELcxx . . $ NFTNL_EXPR_LOG_LEVEL.: |
| 55 | memcpycxx . . $ memcpy(cc817cb175f282d).(&log->levelcxx . . $ nftnl_expr_log#level., data, data_len); |
| 56 | break; |
| 57 | case NFTNL_EXPR_LOG_FLAGScxx . . $ NFTNL_EXPR_LOG_FLAGS.: |
| 58 | memcpycxx . . $ memcpy(cc817cb175f282d).(&log->flagscxx . . $ nftnl_expr_log#flags., data, data_len); |
| 59 | break; |
| 60 | } |
| 61 | return 0; |
| 62 | } |
| 63 | |
| 64 | static const void * |
| 65 | nftnl_expr_log_getcxx . . $ nftnl_expr_log_get(9de263c4f9e71c4b).(const struct nftnl_exprcxx . . $ nftnl_expr# *e, uint16_tcxx . . $ uint16_t# type, |
| 66 | uint32_tcxx . . $ uint32_t# *data_len) |
| 67 | { |
| 68 | struct nftnl_expr_logcxx . . $ nftnl_expr_log# *log = nftnl_expr_datacxx . . $ `include/expr_ops.h:31:9`!(e); |
| 69 | |
| 70 | switch(type) { |
| 71 | case NFTNL_EXPR_LOG_PREFIXcxx . . $ NFTNL_EXPR_LOG_PREFIX.: |
| 72 | *data_len = strlencxx . . $ strlen(751346f8406fd082).(log->prefixcxx . . $ nftnl_expr_log#prefix.)+1; |
| 73 | return log->prefixcxx . . $ nftnl_expr_log#prefix.; |
| 74 | case NFTNL_EXPR_LOG_GROUPcxx . . $ NFTNL_EXPR_LOG_GROUP.: |
| 75 | *data_len = sizeof(log->groupcxx . . $ nftnl_expr_log#group.); |
| 76 | return &log->groupcxx . . $ nftnl_expr_log#group.; |
| 77 | case NFTNL_EXPR_LOG_SNAPLENcxx . . $ NFTNL_EXPR_LOG_SNAPLEN.: |
| 78 | *data_len = sizeof(log->snaplencxx . . $ nftnl_expr_log#snaplen.); |
| 79 | return &log->snaplencxx . . $ nftnl_expr_log#snaplen.; |
| 80 | case NFTNL_EXPR_LOG_QTHRESHOLDcxx . . $ NFTNL_EXPR_LOG_QTHRESHOLD.: |
| 81 | *data_len = sizeof(log->qthresholdcxx . . $ nftnl_expr_log#qthreshold.); |
| 82 | return &log->qthresholdcxx . . $ nftnl_expr_log#qthreshold.; |
| 83 | case NFTNL_EXPR_LOG_LEVELcxx . . $ NFTNL_EXPR_LOG_LEVEL.: |
| 84 | *data_len = sizeof(log->levelcxx . . $ nftnl_expr_log#level.); |
| 85 | return &log->levelcxx . . $ nftnl_expr_log#level.; |
| 86 | case NFTNL_EXPR_LOG_FLAGScxx . . $ NFTNL_EXPR_LOG_FLAGS.: |
| 87 | *data_len = sizeof(log->flagscxx . . $ nftnl_expr_log#flags.); |
| 88 | return &log->flagscxx . . $ nftnl_expr_log#flags.; |
| 89 | } |
| 90 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 91 | } |
| 92 | |
| 93 | static int nftnl_expr_log_cbcxx . . $ nftnl_expr_log_cb(de2ef18c48fd675c).(const struct nlattrcxx . . $ nlattr# *attr, void *data) |
| 94 | { |
| 95 | const struct nlattrcxx . . $ nlattr# **tb = data; |
| 96 | int type = mnl_attr_get_typecxx . . $ mnl_attr_get_type(1da47bcc4c4b975).(attr); |
| 97 | |
| 98 | if (mnl_attr_type_validcxx . . $ mnl_attr_type_valid(47df1cce1c7be855).(attr, NFTA_LOG_MAXcxx . . $ `include/linux/netfilter/nf_tables.h:1311:9`!) < 0) |
| 99 | return MNL_CB_OKcxx . . $ `<external>/12386019527593959648/libmnl.h:174:9`!; |
| 100 | |
| 101 | switch(type) { |
| 102 | case NFTA_LOG_PREFIXcxx . . $ NFTA_LOG_PREFIX.: |
| 103 | if (mnl_attr_validatecxx . . $ mnl_attr_validate(e419697a5e1ae2b1).(attr, MNL_TYPE_STRINGcxx . . $ MNL_TYPE_STRING.) < 0) |
| 104 | abi_breakagecxx . . $ `include/utils.h:28:9`!(); |
| 105 | break; |
| 106 | case NFTA_LOG_GROUPcxx . . $ NFTA_LOG_GROUP.: |
| 107 | case NFTA_LOG_QTHRESHOLDcxx . . $ NFTA_LOG_QTHRESHOLD.: |
| 108 | if (mnl_attr_validatecxx . . $ mnl_attr_validate(e419697a5e1ae2b1).(attr, MNL_TYPE_U16cxx . . $ MNL_TYPE_U16.) < 0) |
| 109 | abi_breakagecxx . . $ `include/utils.h:28:9`!(); |
| 110 | break; |
| 111 | case NFTA_LOG_SNAPLENcxx . . $ NFTA_LOG_SNAPLEN.: |
| 112 | case NFTA_LOG_LEVELcxx . . $ NFTA_LOG_LEVEL.: |
| 113 | case NFTA_LOG_FLAGScxx . . $ NFTA_LOG_FLAGS.: |
| 114 | if (mnl_attr_validatecxx . . $ mnl_attr_validate(e419697a5e1ae2b1).(attr, MNL_TYPE_U32cxx . . $ MNL_TYPE_U32.) < 0) |
| 115 | abi_breakagecxx . . $ `include/utils.h:28:9`!(); |
| 116 | break; |
| 117 | } |
| 118 | |
| 119 | tb[type] = attr; |
| 120 | return MNL_CB_OKcxx . . $ `<external>/12386019527593959648/libmnl.h:174:9`!; |
| 121 | } |
| 122 | |
| 123 | static void |
| 124 | nftnl_expr_log_buildcxx . . $ nftnl_expr_log_build(93c7528a9cf90b41).(struct nlmsghdrcxx . . $ nlmsghdr# *nlh, const struct nftnl_exprcxx . . $ nftnl_expr# *e) |
| 125 | { |
| 126 | struct nftnl_expr_logcxx . . $ nftnl_expr_log# *log = nftnl_expr_datacxx . . $ `include/expr_ops.h:31:9`!(e); |
| 127 | |
| 128 | if (e->flagscxx . . $ nftnl_expr#flags. & (1 << NFTNL_EXPR_LOG_PREFIXcxx . . $ NFTNL_EXPR_LOG_PREFIX.)) |
| 129 | mnl_attr_put_strzcxx . . $ mnl_attr_put_strz(eb76286d4bfc1a8d).(nlh, NFTA_LOG_PREFIXcxx . . $ NFTA_LOG_PREFIX., log->prefixcxx . . $ nftnl_expr_log#prefix.); |
| 130 | if (e->flagscxx . . $ nftnl_expr#flags. & (1 << NFTNL_EXPR_LOG_GROUPcxx . . $ NFTNL_EXPR_LOG_GROUP.)) |
| 131 | mnl_attr_put_u16cxx . . $ mnl_attr_put_u16(951fb5ebe92f4b45).(nlh, NFTA_LOG_GROUPcxx . . $ NFTA_LOG_GROUP., htonscxx . . $ `<external>/9581057695539925927/in.h:431:12`!(log->group)); |
| 132 | if (e->flagscxx . . $ nftnl_expr#flags. & (1 << NFTNL_EXPR_LOG_SNAPLENcxx . . $ NFTNL_EXPR_LOG_SNAPLEN.)) |
| 133 | mnl_attr_put_u32cxx . . $ mnl_attr_put_u32(b46fd0aeb0cfb96d).(nlh, NFTA_LOG_SNAPLENcxx . . $ NFTA_LOG_SNAPLEN., htonlcxx . . $ `<external>/9581057695539925927/in.h:430:12`!(log->snaplen)); |
| 134 | if (e->flagscxx . . $ nftnl_expr#flags. & (1 << NFTNL_EXPR_LOG_QTHRESHOLDcxx . . $ NFTNL_EXPR_LOG_QTHRESHOLD.)) |
| 135 | mnl_attr_put_u16cxx . . $ mnl_attr_put_u16(951fb5ebe92f4b45).(nlh, NFTA_LOG_QTHRESHOLDcxx . . $ NFTA_LOG_QTHRESHOLD., htonscxx . . $ `<external>/9581057695539925927/in.h:431:12`!(log->qthreshold)); |
| 136 | if (e->flagscxx . . $ nftnl_expr#flags. & (1 << NFTNL_EXPR_LOG_LEVELcxx . . $ NFTNL_EXPR_LOG_LEVEL.)) |
| 137 | mnl_attr_put_u32cxx . . $ mnl_attr_put_u32(b46fd0aeb0cfb96d).(nlh, NFTA_LOG_LEVELcxx . . $ NFTA_LOG_LEVEL., htonlcxx . . $ `<external>/9581057695539925927/in.h:430:12`!(log->level)); |
| 138 | if (e->flagscxx . . $ nftnl_expr#flags. & (1 << NFTNL_EXPR_LOG_FLAGScxx . . $ NFTNL_EXPR_LOG_FLAGS.)) |
| 139 | mnl_attr_put_u32cxx . . $ mnl_attr_put_u32(b46fd0aeb0cfb96d).(nlh, NFTA_LOG_FLAGScxx . . $ NFTA_LOG_FLAGS., htonlcxx . . $ `<external>/9581057695539925927/in.h:430:12`!(log->flags)); |
| 140 | } |
| 141 | |
| 142 | static int |
| 143 | nftnl_expr_log_parsecxx . . $ nftnl_expr_log_parse(ed61207049d8af9a).(struct nftnl_exprcxx . . $ nftnl_expr# *e, struct nlattrcxx . . $ nlattr# *attr) |
| 144 | { |
| 145 | struct nftnl_expr_logcxx . . $ nftnl_expr_log# *log = nftnl_expr_datacxx . . $ `include/expr_ops.h:31:9`!(e); |
| 146 | struct nlattrcxx . . $ nlattr# *tb[NFTA_LOG_MAXcxx . . $ `include/linux/netfilter/nf_tables.h:1311:9`!+1] = {}; |
| 147 | |
| 148 | if (mnl_attr_parse_nestedcxx . . $ mnl_attr_parse_nested(f99c0e9fa94f99d9).(attr, nftnl_expr_log_cbcxx . . $ nftnl_expr_log_cb(de2ef18c48fd675c)., tb) < 0) |
| 149 | return -1; |
| 150 | |
| 151 | if (nftnl_parse_str_attrcxx . . $ nftnl_parse_str_attr(2002c8408bf98f7f).(tb[NFTA_LOG_PREFIXcxx . . $ NFTA_LOG_PREFIX.], |
| 152 | NFTNL_EXPR_LOG_PREFIXcxx . . $ NFTNL_EXPR_LOG_PREFIX., |
| 153 | &log->prefixcxx . . $ nftnl_expr_log#prefix., &e->flagscxx . . $ nftnl_expr#flags.) < 0) |
| 154 | return -1; |
| 155 | if (tb[NFTA_LOG_GROUPcxx . . $ NFTA_LOG_GROUP.]) { |
| 156 | log->groupcxx . . $ nftnl_expr_log#group. = ntohscxx . . $ `<external>/9581057695539925927/in.h:429:12`!(mnl_attr_get_u16(tb[NFTA_LOG_GROUP])); |
| 157 | e->flagscxx . . $ nftnl_expr#flags. |= (1 << NFTNL_EXPR_LOG_GROUPcxx . . $ NFTNL_EXPR_LOG_GROUP.); |
| 158 | } |
| 159 | if (tb[NFTA_LOG_SNAPLENcxx . . $ NFTA_LOG_SNAPLEN.]) { |
| 160 | log->snaplencxx . . $ nftnl_expr_log#snaplen. = ntohlcxx . . $ `<external>/9581057695539925927/in.h:428:12`!(mnl_attr_get_u32(tb[NFTA_LOG_SNAPLEN])); |
| 161 | e->flagscxx . . $ nftnl_expr#flags. |= (1 << NFTNL_EXPR_LOG_SNAPLENcxx . . $ NFTNL_EXPR_LOG_SNAPLEN.); |
| 162 | } |
| 163 | if (tb[NFTA_LOG_QTHRESHOLDcxx . . $ NFTA_LOG_QTHRESHOLD.]) { |
| 164 | log->qthresholdcxx . . $ nftnl_expr_log#qthreshold. = ntohscxx . . $ `<external>/9581057695539925927/in.h:429:12`!(mnl_attr_get_u16(tb[NFTA_LOG_QTHRESHOLD])); |
| 165 | e->flagscxx . . $ nftnl_expr#flags. |= (1 << NFTNL_EXPR_LOG_QTHRESHOLDcxx . . $ NFTNL_EXPR_LOG_QTHRESHOLD.); |
| 166 | } |
| 167 | if (tb[NFTA_LOG_LEVELcxx . . $ NFTA_LOG_LEVEL.]) { |
| 168 | log->levelcxx . . $ nftnl_expr_log#level. = ntohlcxx . . $ `<external>/9581057695539925927/in.h:428:12`!(mnl_attr_get_u32(tb[NFTA_LOG_LEVEL])); |
| 169 | e->flagscxx . . $ nftnl_expr#flags. |= (1 << NFTNL_EXPR_LOG_LEVELcxx . . $ NFTNL_EXPR_LOG_LEVEL.); |
| 170 | } |
| 171 | if (tb[NFTA_LOG_FLAGScxx . . $ NFTA_LOG_FLAGS.]) { |
| 172 | log->flagscxx . . $ nftnl_expr_log#flags. = ntohlcxx . . $ `<external>/9581057695539925927/in.h:428:12`!(mnl_attr_get_u32(tb[NFTA_LOG_FLAGS])); |
| 173 | e->flagscxx . . $ nftnl_expr#flags. |= (1 << NFTNL_EXPR_LOG_FLAGScxx . . $ NFTNL_EXPR_LOG_FLAGS.); |
| 174 | } |
| 175 | |
| 176 | return 0; |
| 177 | } |
| 178 | |
| 179 | static int |
| 180 | nftnl_expr_log_snprintfcxx . . $ nftnl_expr_log_snprintf(2b4af69501aef780).(char *buf, size_t remain, |
| 181 | uint32_tcxx . . $ uint32_t# flags, const struct nftnl_exprcxx . . $ nftnl_expr# *e) |
| 182 | { |
| 183 | struct nftnl_expr_logcxx . . $ nftnl_expr_log# *log = nftnl_expr_datacxx . . $ `include/expr_ops.h:31:9`!(e); |
| 184 | int ret, offset = 0; |
| 185 | |
| 186 | if (e->flagscxx . . $ nftnl_expr#flags. & (1 << NFTNL_EXPR_LOG_PREFIXcxx . . $ NFTNL_EXPR_LOG_PREFIX.)) { |
| 187 | ret = snprintfcxx . . $ snprintf(ea502d73e74c754c).(buf, remain, "prefix %s ", log->prefixcxx . . $ nftnl_expr_log#prefix.); |
| 188 | SNPRINTF_BUFFER_SIZEcxx . . $ `include/utils.h:55:9`!(ret, remain, offset); |
| 189 | } |
| 190 | |
| 191 | if (e->flagscxx . . $ nftnl_expr#flags. & (1 << NFTNL_EXPR_LOG_GROUPcxx . . $ NFTNL_EXPR_LOG_GROUP.)) { |
| 192 | ret = snprintfcxx . . $ snprintf(ea502d73e74c754c).(buf + offset, remain, |
| 193 | "group %u snaplen %u qthreshold %u ", |
| 194 | log->groupcxx . . $ nftnl_expr_log#group., log->snaplencxx . . $ nftnl_expr_log#snaplen., log->qthresholdcxx . . $ nftnl_expr_log#qthreshold.); |
| 195 | SNPRINTF_BUFFER_SIZEcxx . . $ `include/utils.h:55:9`!(ret, remain, offset); |
| 196 | } else { |
| 197 | if (e->flagscxx . . $ nftnl_expr#flags. & (1 << NFTNL_EXPR_LOG_LEVELcxx . . $ NFTNL_EXPR_LOG_LEVEL.)) { |
| 198 | ret = snprintfcxx . . $ snprintf(ea502d73e74c754c).(buf + offset, remain, "level %u ", |
| 199 | log->levelcxx . . $ nftnl_expr_log#level.); |
| 200 | SNPRINTF_BUFFER_SIZEcxx . . $ `include/utils.h:55:9`!(ret, remain, offset); |
| 201 | } |
| 202 | if (e->flagscxx . . $ nftnl_expr#flags. & (1 << NFTNL_EXPR_LOG_FLAGScxx . . $ NFTNL_EXPR_LOG_FLAGS.)) { |
| 203 | if (log->flagscxx . . $ nftnl_expr_log#flags. & NF_LOG_TCPSEQcxx . . $ `include/linux/netfilter/nf_log.h:5:9`!) { |
| 204 | ret = snprintfcxx . . $ snprintf(ea502d73e74c754c).(buf + offset, remain, "tcpseq "); |
| 205 | SNPRINTF_BUFFER_SIZEcxx . . $ `include/utils.h:55:9`!(ret, remain, offset); |
| 206 | } |
| 207 | if (log->flagscxx . . $ nftnl_expr_log#flags. & NF_LOG_TCPOPTcxx . . $ `include/linux/netfilter/nf_log.h:6:9`!) { |
| 208 | ret = snprintfcxx . . $ snprintf(ea502d73e74c754c).(buf + offset, remain, "tcpopt "); |
| 209 | SNPRINTF_BUFFER_SIZEcxx . . $ `include/utils.h:55:9`!(ret, remain, offset); |
| 210 | } |
| 211 | if (log->flagscxx . . $ nftnl_expr_log#flags. & NF_LOG_IPOPTcxx . . $ `include/linux/netfilter/nf_log.h:7:9`!) { |
| 212 | ret = snprintfcxx . . $ snprintf(ea502d73e74c754c).(buf + offset, remain, "ipopt "); |
| 213 | SNPRINTF_BUFFER_SIZEcxx . . $ `include/utils.h:55:9`!(ret, remain, offset); |
| 214 | } |
| 215 | if (log->flagscxx . . $ nftnl_expr_log#flags. & NF_LOG_UIDcxx . . $ `include/linux/netfilter/nf_log.h:8:9`!) { |
| 216 | ret = snprintfcxx . . $ snprintf(ea502d73e74c754c).(buf + offset, remain, "uid "); |
| 217 | SNPRINTF_BUFFER_SIZEcxx . . $ `include/utils.h:55:9`!(ret, remain, offset); |
| 218 | } |
| 219 | if (log->flagscxx . . $ nftnl_expr_log#flags. & NF_LOG_MACDECODEcxx . . $ `include/linux/netfilter/nf_log.h:10:9`!) { |
| 220 | ret = snprintfcxx . . $ snprintf(ea502d73e74c754c).(buf + offset, remain, |
| 221 | "macdecode "); |
| 222 | SNPRINTF_BUFFER_SIZEcxx . . $ `include/utils.h:55:9`!(ret, remain, offset); |
| 223 | } |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | return offset; |
| 228 | } |
| 229 | |
| 230 | static void nftnl_expr_log_freecxx . . $ nftnl_expr_log_free(cbe1a28527736226).(const struct nftnl_exprcxx . . $ nftnl_expr# *e) |
| 231 | { |
| 232 | struct nftnl_expr_logcxx . . $ nftnl_expr_log# *log = nftnl_expr_datacxx . . $ `include/expr_ops.h:31:9`!(e); |
| 233 | |
| 234 | xfreecxx . . $ `include/utils.h:22:9`!(log->prefix); |
| 235 | } |
| 236 | |
| 237 | static struct attr_policycxx . . $ attr_policy# log_attr_policycxx . . $ log_attr_policy.[__NFTNL_EXPR_LOG_MAXcxx . . $ __NFTNL_EXPR_LOG_MAX.] = { |
| 238 | [NFTNL_EXPR_LOG_PREFIXcxx . . $ NFTNL_EXPR_LOG_PREFIX.] = { .maxlen = NF_LOG_PREFIXLENcxx . . $ `include/linux/netfilter/nf_log.h:13:9`! }, |
| 239 | [NFTNL_EXPR_LOG_GROUPcxx . . $ NFTNL_EXPR_LOG_GROUP.] = { .maxlen = sizeof(uint16_tcxx . . $ uint16_t#) }, |
| 240 | [NFTNL_EXPR_LOG_SNAPLENcxx . . $ NFTNL_EXPR_LOG_SNAPLEN.] = { .maxlen = sizeof(uint32_tcxx . . $ uint32_t#) }, |
| 241 | [NFTNL_EXPR_LOG_QTHRESHOLDcxx . . $ NFTNL_EXPR_LOG_QTHRESHOLD.] = { .maxlen = sizeof(uint16_tcxx . . $ uint16_t#) }, |
| 242 | [NFTNL_EXPR_LOG_LEVELcxx . . $ NFTNL_EXPR_LOG_LEVEL.] = { .maxlen = sizeof(uint32_tcxx . . $ uint32_t#) }, |
| 243 | [NFTNL_EXPR_LOG_FLAGScxx . . $ NFTNL_EXPR_LOG_FLAGS.] = { .maxlen = sizeof(uint32_tcxx . . $ uint32_t#) }, |
| 244 | }; |
| 245 | |
| 246 | struct expr_opscxx . . $ expr_ops# expr_ops_logcxx . . $ expr_ops_log. = { |
| 247 | .name = "log", |
| 248 | .alloc_len = sizeof(struct nftnl_expr_logcxx . . $ nftnl_expr_log#), |
| 249 | .nftnl_max_attr = __NFTNL_EXPR_LOG_MAXcxx . . $ __NFTNL_EXPR_LOG_MAX. - 1, |
| 250 | .attr_policy = log_attr_policycxx . . $ log_attr_policy., |
| 251 | .free = nftnl_expr_log_freecxx . . $ nftnl_expr_log_free(cbe1a28527736226)., |
| 252 | .set = nftnl_expr_log_setcxx . . $ nftnl_expr_log_set(211371a3e3842127)., |
| 253 | .get = nftnl_expr_log_getcxx . . $ nftnl_expr_log_get(9de263c4f9e71c4b)., |
| 254 | .parse = nftnl_expr_log_parsecxx . . $ nftnl_expr_log_parse(ed61207049d8af9a)., |
| 255 | .build = nftnl_expr_log_buildcxx . . $ nftnl_expr_log_build(93c7528a9cf90b41)., |
| 256 | .output = nftnl_expr_log_snprintfcxx . . $ nftnl_expr_log_snprintf(2b4af69501aef780)., |
| 257 | }; |