Lines Matching refs:p

138 vti6_tnl_bucket(struct vti6_net *ip6n, const struct __ip6_tnl_parm *p)  in vti6_tnl_bucket()  argument
140 const struct in6_addr *remote = &p->raddr; in vti6_tnl_bucket()
141 const struct in6_addr *local = &p->laddr; in vti6_tnl_bucket()
204 static struct ip6_tnl *vti6_tnl_create(struct net *net, struct __ip6_tnl_parm *p) in vti6_tnl_create() argument
211 if (p->name[0]) { in vti6_tnl_create()
212 if (!dev_valid_name(p->name)) in vti6_tnl_create()
214 strscpy(name, p->name, IFNAMSIZ); in vti6_tnl_create()
226 t->parms = *p; in vti6_tnl_create()
255 static struct ip6_tnl *vti6_locate(struct net *net, struct __ip6_tnl_parm *p, in vti6_locate() argument
258 const struct in6_addr *remote = &p->raddr; in vti6_locate()
259 const struct in6_addr *local = &p->laddr; in vti6_locate()
264 for (tp = vti6_tnl_bucket(ip6n, p); in vti6_locate()
277 return vti6_tnl_create(net, p); in vti6_locate()
657 struct __ip6_tnl_parm *p = &t->parms; in vti6_link_config() local
661 __dev_addr_set(dev, &p->laddr, sizeof(struct in6_addr)); in vti6_link_config()
662 memcpy(dev->broadcast, &p->raddr, sizeof(struct in6_addr)); in vti6_link_config()
664 p->flags &= ~(IP6_TNL_F_CAP_XMIT | IP6_TNL_F_CAP_RCV | in vti6_link_config()
666 p->flags |= ip6_tnl_get_cap(t, &p->laddr, &p->raddr); in vti6_link_config()
668 if (p->flags & IP6_TNL_F_CAP_XMIT && p->flags & IP6_TNL_F_CAP_RCV) in vti6_link_config()
678 if (p->flags & IP6_TNL_F_CAP_XMIT) { in vti6_link_config()
679 int strict = (ipv6_addr_type(&p->raddr) & in vti6_link_config()
682 &p->raddr, &p->laddr, in vti6_link_config()
683 p->link, NULL, strict); in vti6_link_config()
690 if (!tdev && p->link) in vti6_link_config()
691 tdev = __dev_get_by_index(t->net, p->link); in vti6_link_config()
711 vti6_tnl_change(struct ip6_tnl *t, const struct __ip6_tnl_parm *p, in vti6_tnl_change() argument
714 t->parms.laddr = p->laddr; in vti6_tnl_change()
715 t->parms.raddr = p->raddr; in vti6_tnl_change()
716 t->parms.link = p->link; in vti6_tnl_change()
717 t->parms.i_key = p->i_key; in vti6_tnl_change()
718 t->parms.o_key = p->o_key; in vti6_tnl_change()
719 t->parms.proto = p->proto; in vti6_tnl_change()
720 t->parms.fwmark = p->fwmark; in vti6_tnl_change()
726 static int vti6_update(struct ip6_tnl *t, struct __ip6_tnl_parm *p, in vti6_update() argument
735 err = vti6_tnl_change(t, p, keep_mtu); in vti6_update()
742 vti6_parm_from_user(struct __ip6_tnl_parm *p, const struct ip6_tnl_parm2 *u) in vti6_parm_from_user() argument
744 p->laddr = u->laddr; in vti6_parm_from_user()
745 p->raddr = u->raddr; in vti6_parm_from_user()
746 p->link = u->link; in vti6_parm_from_user()
747 p->i_key = u->i_key; in vti6_parm_from_user()
748 p->o_key = u->o_key; in vti6_parm_from_user()
749 p->proto = u->proto; in vti6_parm_from_user()
751 memcpy(p->name, u->name, sizeof(u->name)); in vti6_parm_from_user()
755 vti6_parm_to_user(struct ip6_tnl_parm2 *u, const struct __ip6_tnl_parm *p) in vti6_parm_to_user() argument
757 u->laddr = p->laddr; in vti6_parm_to_user()
758 u->raddr = p->raddr; in vti6_parm_to_user()
759 u->link = p->link; in vti6_parm_to_user()
760 u->i_key = p->i_key; in vti6_parm_to_user()
761 u->o_key = p->o_key; in vti6_parm_to_user()
766 u->proto = p->proto; in vti6_parm_to_user()
768 memcpy(u->name, p->name, sizeof(u->name)); in vti6_parm_to_user()
803 struct ip6_tnl_parm2 p; in vti6_siocdevprivate() local
814 if (copy_from_user(&p, data, sizeof(p))) { in vti6_siocdevprivate()
818 vti6_parm_from_user(&p1, &p); in vti6_siocdevprivate()
821 memset(&p, 0, sizeof(p)); in vti6_siocdevprivate()
825 vti6_parm_to_user(&p, &t->parms); in vti6_siocdevprivate()
826 if (copy_to_user(data, &p, sizeof(p))) in vti6_siocdevprivate()
835 if (copy_from_user(&p, data, sizeof(p))) in vti6_siocdevprivate()
838 if (p.proto != IPPROTO_IPV6 && p.proto != 0) in vti6_siocdevprivate()
840 vti6_parm_from_user(&p1, &p); in vti6_siocdevprivate()
855 vti6_parm_to_user(&p, &t->parms); in vti6_siocdevprivate()
856 if (copy_to_user(data, &p, sizeof(p))) in vti6_siocdevprivate()
869 if (copy_from_user(&p, data, sizeof(p))) in vti6_siocdevprivate()
872 vti6_parm_from_user(&p1, &p); in vti6_siocdevprivate()
1040 struct __ip6_tnl_parm p; in vti6_changelink() local
1047 vti6_netlink_parms(data, &p); in vti6_changelink()
1049 t = vti6_locate(net, &p, 0); in vti6_changelink()
1057 return vti6_update(t, &p, tb && tb[IFLA_MTU]); in vti6_changelink()