• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7800-V1.0.2.28/package/qca-nss-ecm/src/

Lines Matching refs:tuple

152  * helper for sending basic genl commands requiring only a tuple attribute
159 struct ecm_cl_nl_genl_attr_tuple *tuple)
165 skb = genlmsg_new(sizeof(*tuple) + ecm_cl_nl_genl_family.hdrsize,
184 ret = nla_put(skb, ECM_CL_NL_GENL_ATTR_TUPLE, sizeof(*tuple), tuple);
186 DEBUG_WARN("failed to put tuple into genl msg: %d\n", ret);
212 static int ecm_cl_nl_genl_attr_tuple_encode(struct ecm_cl_nl_genl_attr_tuple *tuple,
220 memset(tuple, 0, sizeof(*tuple));
221 tuple->proto = (uint8_t)proto;
222 tuple->src_port = htons((uint16_t)src_port);
223 tuple->dst_port = htons((uint16_t)dst_port);
225 tuple->af = AF_INET;
226 ECM_IP_ADDR_TO_NIN4_ADDR(tuple->src_ip.in.s_addr, src_ip);
227 ECM_IP_ADDR_TO_NIN4_ADDR(tuple->dst_ip.in.s_addr, dst_ip);
232 tuple->af = AF_INET6;
233 ECM_IP_ADDR_TO_NIN6_ADDR(tuple->src_ip.in6, src_ip);
234 ECM_IP_ADDR_TO_NIN6_ADDR(tuple->dst_ip.in6, dst_ip);
245 static int ecm_cl_nl_genl_attr_tuple_decode(struct ecm_cl_nl_genl_attr_tuple *tuple,
252 *proto = tuple->proto;
253 *src_port = ntohs(tuple->src_port);
254 *dst_port = ntohs(tuple->dst_port);
255 if (AF_INET == tuple->af) {
256 ECM_NIN4_ADDR_TO_IP_ADDR(src_ip, tuple->src_ip.in.s_addr);
257 ECM_NIN4_ADDR_TO_IP_ADDR(dst_ip, tuple->dst_ip.in.s_addr);
261 if (AF_INET6 == tuple->af) {
262 ECM_NIN6_ADDR_TO_IP_ADDR(src_ip, tuple->src_ip.in6);
263 ECM_NIN6_ADDR_TO_IP_ADDR(dst_ip, tuple->dst_ip.in6);
284 struct ecm_cl_nl_genl_attr_tuple tuple;
316 ret = ecm_cl_nl_genl_attr_tuple_encode(&tuple,
329 &tuple);
353 struct ecm_cl_nl_genl_attr_tuple tuple;
360 ret = ecm_cl_nl_genl_attr_tuple_encode(&tuple,
372 ecm_classifier_nl_send_genl_msg(ECM_CL_NL_GENL_CMD_CONNECTION_CLOSED, &tuple);
384 struct ecm_cl_nl_genl_attr_tuple *tuple;
407 tuple = nla_data(na);
409 ret = ecm_cl_nl_genl_attr_tuple_decode(tuple,
421 * Locate the connection using the tuple given
431 tuple->proto);
895 struct nf_conntrack_tuple tuple = {};
906 tuple.src.l3num = AF_INET;
907 ECM_IP_ADDR_TO_NIN4_ADDR(tuple.src.u3.ip, src_ip);
908 ECM_IP_ADDR_TO_NIN4_ADDR(tuple.dst.u3.ip, dst_ip);
913 tuple.src.l3num = AF_INET6;
914 ECM_IP_ADDR_TO_NIN6_ADDR(tuple.src.u3.in6, src_ip);
915 ECM_IP_ADDR_TO_NIN6_ADDR(tuple.dst.u3.in6, dst_ip);
922 tuple.dst.protonum = proto;
923 tuple.src.u.all = htons(src_port);
924 tuple.dst.u.all = htons(dst_port);
926 h = nf_conntrack_find_get(&init_net, NF_CT_DEFAULT_ZONE, &tuple);
1194 * Locate the connection using the serial or tuple given