Lines Matching refs:tm
31 struct text_match *tm = EM_TEXT_PRIV(m); in em_text_match() local
34 from = tcf_get_base_ptr(skb, tm->from_layer) - skb->data; in em_text_match()
35 from += tm->from_offset; in em_text_match()
37 to = tcf_get_base_ptr(skb, tm->to_layer) - skb->data; in em_text_match()
38 to += tm->to_offset; in em_text_match()
40 return skb_find_text(skb, from, to, tm->config) != UINT_MAX; in em_text_match()
46 struct text_match *tm; in em_text_change() local
80 tm = kmalloc(sizeof(*tm), GFP_KERNEL); in em_text_change()
81 if (tm == NULL) { in em_text_change()
86 tm->from_offset = conf->from_offset; in em_text_change()
87 tm->to_offset = conf->to_offset; in em_text_change()
88 tm->from_layer = conf->from_layer; in em_text_change()
89 tm->to_layer = conf->to_layer; in em_text_change()
90 tm->config = ts_conf; in em_text_change()
92 m->datalen = sizeof(*tm); in em_text_change()
93 m->data = (unsigned long) tm; in em_text_change()
108 struct text_match *tm = EM_TEXT_PRIV(m); in em_text_dump() local
111 strncpy(conf.algo, tm->config->ops->name, sizeof(conf.algo) - 1); in em_text_dump()
112 conf.from_offset = tm->from_offset; in em_text_dump()
113 conf.to_offset = tm->to_offset; in em_text_dump()
114 conf.from_layer = tm->from_layer; in em_text_dump()
115 conf.to_layer = tm->to_layer; in em_text_dump()
116 conf.pattern_len = textsearch_get_pattern_len(tm->config); in em_text_dump()
122 textsearch_get_pattern(tm->config)) < 0) in em_text_dump()