Lines Matching defs:p1
241 * @p1: user specified parameter
244 static int ip6_tnl_parm_match(const struct ip6_tnl_parm *p1,
247 return ((!p1->link || p1->link == p2->link) &&
248 (!p1->name[0] || strcmp(p1->name, p2->name) == 0) &&
249 (memcmp(&p1->laddr, &in6addr_any, sizeof(p1->laddr)) == 0 ||
250 memcmp(&p1->laddr, &p2->laddr, sizeof(p1->laddr)) == 0) &&
251 (memcmp(&p1->raddr, &in6addr_any, sizeof(p1->raddr)) == 0 ||
252 memcmp(&p1->raddr, &p2->raddr, sizeof(p1->raddr)) == 0) &&
253 (!p1->proto || !p2->proto || p1->proto == p2->proto) &&
254 (!p1->encap_limit || p1->encap_limit == p2->encap_limit) &&
255 (!p1->hop_limit || p1->hop_limit == p2->hop_limit) &&
256 (!(p1->flowinfo & IP6_FLOWINFO_TCLASS) ||
257 !((p1->flowinfo ^ p2->flowinfo) & IP6_FLOWINFO_TCLASS)) &&
258 (!(p1->flowinfo & IP6_FLOWINFO_FLOWLABEL) ||
259 !((p1->flowinfo ^ p2->flowinfo) & IP6_FLOWINFO_FLOWLABEL)) &&
260 (!p1->flags || (p1->flags & p2->flags)));
287 struct ip6_tnl_parm p1;
314 memset(&p1, 0, sizeof(p1));
315 ip6_tnl_parm_init(&p1, 0);
316 strcpy(p1.name, name);
317 p1.link = ll_name_to_index(p1.name);
318 if (p1.link == 0)
320 if (tnl_get_ioctl(p1.name, &p1))
322 if (!ip6_tnl_parm_match(p, &p1))
324 print_tunnel(&p1);