Lines Matching refs:tm
35 struct text_match *tm = EM_TEXT_PRIV(m); in em_text_match() local
38 from = tcf_get_base_ptr(skb, tm->from_layer) - skb->data; in em_text_match()
39 from += tm->from_offset; in em_text_match()
41 to = tcf_get_base_ptr(skb, tm->to_layer) - skb->data; in em_text_match()
42 to += tm->to_offset; in em_text_match()
44 return skb_find_text(skb, from, to, tm->config) != UINT_MAX; in em_text_match()
50 struct text_match *tm; in em_text_change() local
84 tm = kmalloc(sizeof(*tm), GFP_KERNEL); in em_text_change()
85 if (tm == NULL) { in em_text_change()
90 tm->from_offset = conf->from_offset; in em_text_change()
91 tm->to_offset = conf->to_offset; in em_text_change()
92 tm->from_layer = conf->from_layer; in em_text_change()
93 tm->to_layer = conf->to_layer; in em_text_change()
94 tm->config = ts_conf; in em_text_change()
96 m->datalen = sizeof(*tm); in em_text_change()
97 m->data = (unsigned long) tm; in em_text_change()
110 struct text_match *tm = EM_TEXT_PRIV(m); in em_text_dump() local
113 strncpy(conf.algo, tm->config->ops->name, sizeof(conf.algo) - 1); in em_text_dump()
114 conf.from_offset = tm->from_offset; in em_text_dump()
115 conf.to_offset = tm->to_offset; in em_text_dump()
116 conf.from_layer = tm->from_layer; in em_text_dump()
117 conf.to_layer = tm->to_layer; in em_text_dump()
118 conf.pattern_len = textsearch_get_pattern_len(tm->config); in em_text_dump()
124 textsearch_get_pattern(tm->config)) < 0) in em_text_dump()