• Home
  • Raw
  • Download

Lines Matching refs:ipvti

61 	struct ipvti_info *ipvti;  in ipvti_alloc()  local
64 memset(link->l_info, 0, sizeof(*ipvti)); in ipvti_alloc()
66 ipvti = calloc(1, sizeof(*ipvti)); in ipvti_alloc()
67 if (!ipvti) in ipvti_alloc()
70 link->l_info = ipvti; in ipvti_alloc()
80 struct ipvti_info *ipvti; in ipvti_parse() local
93 ipvti = link->l_info; in ipvti_parse()
96 ipvti->link = nla_get_u32(tb[IFLA_VTI_LINK]); in ipvti_parse()
97 ipvti->ipvti_mask |= IPVTI_ATTR_LINK; in ipvti_parse()
101 ipvti->ikey = nla_get_u32(tb[IFLA_VTI_IKEY]); in ipvti_parse()
102 ipvti->ipvti_mask |= IPVTI_ATTR_IKEY; in ipvti_parse()
106 ipvti->okey = nla_get_u32(tb[IFLA_VTI_OKEY]); in ipvti_parse()
107 ipvti->ipvti_mask |= IPVTI_ATTR_OKEY; in ipvti_parse()
111 ipvti->local = nla_get_u32(tb[IFLA_VTI_LOCAL]); in ipvti_parse()
112 ipvti->ipvti_mask |= IPVTI_ATTR_LOCAL; in ipvti_parse()
116 ipvti->remote = nla_get_u32(tb[IFLA_VTI_REMOTE]); in ipvti_parse()
117 ipvti->ipvti_mask |= IPVTI_ATTR_REMOTE; in ipvti_parse()
128 struct ipvti_info *ipvti = link->l_info; in ipvti_put_attrs() local
135 if (ipvti->ipvti_mask & IPVTI_ATTR_LINK) in ipvti_put_attrs()
136 NLA_PUT_U32(msg, IFLA_VTI_LINK, ipvti->link); in ipvti_put_attrs()
138 if (ipvti->ipvti_mask & IPVTI_ATTR_IKEY) in ipvti_put_attrs()
139 NLA_PUT_U32(msg, IFLA_VTI_IKEY, ipvti->ikey); in ipvti_put_attrs()
141 if (ipvti->ipvti_mask & IFLA_VTI_IKEY) in ipvti_put_attrs()
142 NLA_PUT_U32(msg, IFLA_VTI_OKEY, ipvti->okey); in ipvti_put_attrs()
144 if (ipvti->ipvti_mask & IPVTI_ATTR_LOCAL) in ipvti_put_attrs()
145 NLA_PUT_U32(msg, IFLA_VTI_LOCAL, ipvti->local); in ipvti_put_attrs()
147 if (ipvti->ipvti_mask & IPVTI_ATTR_REMOTE) in ipvti_put_attrs()
148 NLA_PUT_U32(msg, IFLA_VTI_REMOTE, ipvti->remote); in ipvti_put_attrs()
159 struct ipvti_info *ipvti = link->l_info; in ipvti_free() local
161 free(ipvti); in ipvti_free()
172 struct ipvti_info *ipvti = link->l_info; in ipvti_dump_details() local
176 if (ipvti->ipvti_mask & IPVTI_ATTR_LINK) { in ipvti_dump_details()
180 parent = link_lookup(link->ce_cache, ipvti->link); in ipvti_dump_details()
187 nl_dump_line(p, "%u\n", ipvti->link); in ipvti_dump_details()
190 if (ipvti->ipvti_mask & IPVTI_ATTR_IKEY) { in ipvti_dump_details()
192 nl_dump_line(p, "%x\n",ipvti->ikey); in ipvti_dump_details()
195 if (ipvti->ipvti_mask & IPVTI_ATTR_OKEY) { in ipvti_dump_details()
197 nl_dump_line(p, "%x\n", ipvti->okey); in ipvti_dump_details()
200 if (ipvti->ipvti_mask & IPVTI_ATTR_LOCAL) { in ipvti_dump_details()
202 if(inet_ntop(AF_INET, &ipvti->local, addr, sizeof(addr))) in ipvti_dump_details()
205 nl_dump_line(p, "%#x\n", ntohs(ipvti->local)); in ipvti_dump_details()
208 if (ipvti->ipvti_mask & IPVTI_ATTR_REMOTE) { in ipvti_dump_details()
210 if(inet_ntop(AF_INET, &ipvti->remote, addr, sizeof(addr))) in ipvti_dump_details()
213 nl_dump_line(p, "%#x\n", ntohs(ipvti->remote)); in ipvti_dump_details()
319 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_set_link() local
323 ipvti->link = index; in rtnl_link_ipvti_set_link()
324 ipvti->ipvti_mask |= IPVTI_ATTR_LINK; in rtnl_link_ipvti_set_link()
337 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_get_link() local
341 return ipvti->link; in rtnl_link_ipvti_get_link()
353 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_set_ikey() local
357 ipvti->ikey = ikey; in rtnl_link_ipvti_set_ikey()
358 ipvti->ipvti_mask |= IPVTI_ATTR_IKEY; in rtnl_link_ipvti_set_ikey()
371 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_get_ikey() local
375 return ipvti->ikey; in rtnl_link_ipvti_get_ikey()
387 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_set_okey() local
391 ipvti->okey = okey; in rtnl_link_ipvti_set_okey()
392 ipvti->ipvti_mask |= IPVTI_ATTR_OKEY; in rtnl_link_ipvti_set_okey()
405 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_get_okey() local
409 return ipvti->okey; in rtnl_link_ipvti_get_okey()
421 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_set_local() local
425 ipvti->local = addr; in rtnl_link_ipvti_set_local()
426 ipvti->ipvti_mask |= IPVTI_ATTR_LOCAL; in rtnl_link_ipvti_set_local()
439 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_get_local() local
443 return ipvti->local; in rtnl_link_ipvti_get_local()
455 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_set_remote() local
459 ipvti->remote = remote; in rtnl_link_ipvti_set_remote()
460 ipvti->ipvti_mask |= IPVTI_ATTR_REMOTE; in rtnl_link_ipvti_set_remote()
473 struct ipvti_info *ipvti = link->l_info; in rtnl_link_ipvti_get_remote() local
477 return ipvti->remote; in rtnl_link_ipvti_get_remote()