Lines Matching refs:p1
231 * @p1: user specified parameter
234 static int ip6_tnl_parm_match(const struct ip6_tnl_parm *p1,
237 return ((!p1->link || p1->link == p2->link) &&
238 (!p1->name[0] || strcmp(p1->name, p2->name) == 0) &&
239 (memcmp(&p1->laddr, &in6addr_any, sizeof(p1->laddr)) == 0 ||
240 memcmp(&p1->laddr, &p2->laddr, sizeof(p1->laddr)) == 0) &&
241 (memcmp(&p1->raddr, &in6addr_any, sizeof(p1->raddr)) == 0 ||
242 memcmp(&p1->raddr, &p2->raddr, sizeof(p1->raddr)) == 0) &&
243 (!p1->proto || !p2->proto || p1->proto == p2->proto) &&
244 (!p1->encap_limit || p1->encap_limit == p2->encap_limit) &&
245 (!p1->hop_limit || p1->hop_limit == p2->hop_limit) &&
246 (!(p1->flowinfo & IP6_FLOWINFO_TCLASS) ||
247 !((p1->flowinfo ^ p2->flowinfo) & IP6_FLOWINFO_TCLASS)) &&
248 (!(p1->flowinfo & IP6_FLOWINFO_FLOWLABEL) ||
249 !((p1->flowinfo ^ p2->flowinfo) & IP6_FLOWINFO_FLOWLABEL)) &&
250 (!p1->flags || (p1->flags & p2->flags)));
274 struct ip6_tnl_parm p1;
298 memset(&p1, 0, sizeof(p1));
299 ip6_tnl_parm_init(&p1, 0);
300 strcpy(p1.name, name);
301 p1.link = tnl_ioctl_get_ifindex(p1.name);
302 if (p1.link == 0)
304 if (tnl_get_ioctl(p1.name, &p1))
306 if (!ip6_tnl_parm_match(p, &p1))
308 print_tunnel(&p1);