Lines Matching refs:ipvti
60 struct ipvti_info *ipvti; in ipvti_alloc() local
62 ipvti = calloc(1, sizeof(*ipvti)); in ipvti_alloc()
63 if (!ipvti) in ipvti_alloc()
66 link->l_info = ipvti; in ipvti_alloc()
75 struct ipvti_info *ipvti; in ipvti_parse() local
88 ipvti = link->l_info; in ipvti_parse()
91 ipvti->link = nla_get_u32(tb[IFLA_VTI_LINK]); in ipvti_parse()
92 ipvti->ipvti_mask |= IPVTI_ATTR_LINK; in ipvti_parse()
96 ipvti->ikey = nla_get_u32(tb[IFLA_VTI_IKEY]); in ipvti_parse()
97 ipvti->ipvti_mask |= IPVTI_ATTR_IKEY; in ipvti_parse()
101 ipvti->okey = nla_get_u32(tb[IFLA_VTI_OKEY]); in ipvti_parse()
102 ipvti->ipvti_mask |= IPVTI_ATTR_OKEY; in ipvti_parse()
106 ipvti->local = nla_get_u32(tb[IFLA_VTI_LOCAL]); in ipvti_parse()
107 ipvti->ipvti_mask |= IPVTI_ATTR_LOCAL; in ipvti_parse()
111 ipvti->remote = nla_get_u32(tb[IFLA_VTI_REMOTE]); in ipvti_parse()
112 ipvti->ipvti_mask |= IPVTI_ATTR_REMOTE; in ipvti_parse()
123 struct ipvti_info *ipvti = link->l_info; in ipvti_put_attrs() local
130 if (ipvti->ipvti_mask & IPVTI_ATTR_LINK) in ipvti_put_attrs()
131 NLA_PUT_U32(msg, IFLA_VTI_LINK, ipvti->link); in ipvti_put_attrs()
133 if (ipvti->ipvti_mask & IPVTI_ATTR_IKEY) in ipvti_put_attrs()
134 NLA_PUT_U32(msg, IFLA_VTI_IKEY, ipvti->ikey); in ipvti_put_attrs()
136 if (ipvti->ipvti_mask & IFLA_VTI_IKEY) in ipvti_put_attrs()
137 NLA_PUT_U32(msg, IFLA_VTI_OKEY, ipvti->okey); in ipvti_put_attrs()
139 if (ipvti->ipvti_mask & IPVTI_ATTR_LOCAL) in ipvti_put_attrs()
140 NLA_PUT_U32(msg, IFLA_VTI_LOCAL, ipvti->local); in ipvti_put_attrs()
142 if (ipvti->ipvti_mask & IPVTI_ATTR_REMOTE) in ipvti_put_attrs()
143 NLA_PUT_U32(msg, IFLA_VTI_REMOTE, ipvti->remote); in ipvti_put_attrs()
154 struct ipvti_info *ipvti = link->l_info; in ipvti_free() local
156 free(ipvti); in ipvti_free()
167 struct ipvti_info *ipvti = link->l_info; in ipvti_dump_details() local
170 if (ipvti->ipvti_mask & IPVTI_ATTR_LINK) { in ipvti_dump_details()
176 nl_dump_line(p, "%u\n", ipvti->link); in ipvti_dump_details()
179 if (ipvti->ipvti_mask & IPVTI_ATTR_IKEY) { in ipvti_dump_details()
181 nl_dump_line(p, "%x\n",ipvti->ikey); in ipvti_dump_details()
184 if (ipvti->ipvti_mask & IPVTI_ATTR_OKEY) { in ipvti_dump_details()
186 nl_dump_line(p, "%x\n", ipvti->okey); in ipvti_dump_details()
189 if (ipvti->ipvti_mask & IPVTI_ATTR_LOCAL) { in ipvti_dump_details()
191 if(inet_ntop(AF_INET, &ipvti->local, addr, sizeof(addr))) in ipvti_dump_details()
194 nl_dump_line(p, "%#x\n", ntohs(ipvti->local)); in ipvti_dump_details()
197 if (ipvti->ipvti_mask & IPVTI_ATTR_REMOTE) { in ipvti_dump_details()
199 if(inet_ntop(AF_INET, &ipvti->remote, addr, sizeof(addr))) in ipvti_dump_details()
202 nl_dump_line(p, "%#x\n", ntohs(ipvti->remote)); in ipvti_dump_details()
308 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_set_link() local
312 ipvti->link = index; in rtnl_link_ipvti_set_link()
313 ipvti->ipvti_mask |= IPVTI_ATTR_LINK; in rtnl_link_ipvti_set_link()
326 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_get_link() local
330 return ipvti->link; in rtnl_link_ipvti_get_link()
342 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_set_ikey() local
346 ipvti->ikey = ikey; in rtnl_link_ipvti_set_ikey()
347 ipvti->ipvti_mask |= IPVTI_ATTR_IKEY; in rtnl_link_ipvti_set_ikey()
360 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_get_ikey() local
364 return ipvti->ikey; in rtnl_link_ipvti_get_ikey()
376 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_set_okey() local
380 ipvti->okey = okey; in rtnl_link_ipvti_set_okey()
381 ipvti->ipvti_mask |= IPVTI_ATTR_OKEY; in rtnl_link_ipvti_set_okey()
394 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_get_okey() local
398 return ipvti->okey; in rtnl_link_ipvti_get_okey()
410 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_set_local() local
414 ipvti->local = addr; in rtnl_link_ipvti_set_local()
415 ipvti->ipvti_mask |= IPVTI_ATTR_LOCAL; in rtnl_link_ipvti_set_local()
428 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_get_local() local
432 return ipvti->local; in rtnl_link_ipvti_get_local()
444 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_set_remote() local
448 ipvti->remote = remote; in rtnl_link_ipvti_set_remote()
449 ipvti->ipvti_mask |= IPVTI_ATTR_REMOTE; in rtnl_link_ipvti_set_remote()
462 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_get_remote() local
466 return ipvti->remote; in rtnl_link_ipvti_get_remote()