Lines Matching defs:meta

9  * 	The metadata ematch compares two meta objects where each object
10 * represents either a meta value stored in the kernel or a static
16 * The definition of a objects conists of the type (meta type), a
17 * identifier (meta id) and additional type specific information.
18 * The meta id is either TCF_META_TYPE_VALUE for values provided by
19 * userspace or a index to the meta operations table consisting of
20 * function pointers to type specific meta data collectors returning
21 * the value of the requested meta value.
43 * on the meta type. Obviously, the length of the data must also
53 * NOTE: Certain meta values depend on other subsystems and are
616 /* Meta value operations table listing all meta value collectors and
617 * assigns them to a type and meta id. */
847 struct meta_match *meta = (struct meta_match *) m->data;
850 if (meta_get(skb, info, &meta->lvalue, &l_value) < 0 ||
851 meta_get(skb, info, &meta->rvalue, &r_value) < 0)
854 r = meta_type_ops(&meta->lvalue)->compare(&l_value, &r_value);
856 switch (meta->lvalue.hdr.op) {
868 static void meta_delete(struct meta_match *meta)
870 if (meta) {
871 const struct meta_type_ops *ops = meta_type_ops(&meta->lvalue);
874 ops->destroy(&meta->lvalue);
875 ops->destroy(&meta->rvalue);
879 kfree(meta);
909 struct meta_match *meta = NULL;
927 meta = kzalloc(sizeof(*meta), GFP_KERNEL);
928 if (meta == NULL) {
933 memcpy(&meta->lvalue.hdr, &hdr->left, sizeof(hdr->left));
934 memcpy(&meta->rvalue.hdr, &hdr->right, sizeof(hdr->right));
936 if (!meta_is_supported(&meta->lvalue) ||
937 !meta_is_supported(&meta->rvalue)) {
942 if (meta_change_data(&meta->lvalue, tb[TCA_EM_META_LVALUE]) < 0 ||
943 meta_change_data(&meta->rvalue, tb[TCA_EM_META_RVALUE]) < 0)
946 m->datalen = sizeof(*meta);
947 m->data = (unsigned long) meta;
951 if (err && meta)
952 meta_delete(meta);
964 struct meta_match *meta = (struct meta_match *) em->data;
969 memcpy(&hdr.left, &meta->lvalue.hdr, sizeof(hdr.left));
970 memcpy(&hdr.right, &meta->rvalue.hdr, sizeof(hdr.right));
975 ops = meta_type_ops(&meta->lvalue);
976 if (ops->dump(skb, &meta->lvalue, TCA_EM_META_LVALUE) < 0 ||
977 ops->dump(skb, &meta->rvalue, TCA_EM_META_RVALUE) < 0)