Lines Matching refs:ipip

63 	struct ipip_info *ipip;  in ipip_alloc()  local
65 ipip = calloc(1, sizeof(*ipip)); in ipip_alloc()
66 if (!ipip) in ipip_alloc()
69 link->l_info = ipip; in ipip_alloc()
78 struct ipip_info *ipip; in ipip_parse() local
91 ipip = link->l_info; in ipip_parse()
94 ipip->link = nla_get_u32(tb[IFLA_IPTUN_LINK]); in ipip_parse()
95 ipip->ipip_mask |= IPIP_ATTR_LINK; in ipip_parse()
99 ipip->local = nla_get_u32(tb[IFLA_IPTUN_LOCAL]); in ipip_parse()
100 ipip->ipip_mask |= IPIP_ATTR_LOCAL; in ipip_parse()
104 ipip->remote = nla_get_u32(tb[IFLA_IPTUN_REMOTE]); in ipip_parse()
105 ipip->ipip_mask |= IPIP_ATTR_REMOTE; in ipip_parse()
109 ipip->ttl = nla_get_u8(tb[IFLA_IPTUN_TTL]); in ipip_parse()
110 ipip->ipip_mask |= IPIP_ATTR_TTL; in ipip_parse()
114 ipip->tos = nla_get_u8(tb[IFLA_IPTUN_TOS]); in ipip_parse()
115 ipip->ipip_mask |= IPIP_ATTR_TOS; in ipip_parse()
119 ipip->pmtudisc = nla_get_u8(tb[IFLA_IPTUN_PMTUDISC]); in ipip_parse()
120 ipip->ipip_mask |= IPIP_ATTR_PMTUDISC; in ipip_parse()
131 struct ipip_info *ipip = link->l_info; in ipip_put_attrs() local
138 if (ipip->ipip_mask & IPIP_ATTR_LINK) in ipip_put_attrs()
139 NLA_PUT_U32(msg, IFLA_IPTUN_LINK, ipip->link); in ipip_put_attrs()
141 if (ipip->ipip_mask & IPIP_ATTR_LOCAL) in ipip_put_attrs()
142 NLA_PUT_U32(msg, IFLA_IPTUN_LOCAL, ipip->local); in ipip_put_attrs()
144 if (ipip->ipip_mask & IPIP_ATTR_REMOTE) in ipip_put_attrs()
145 NLA_PUT_U32(msg, IFLA_IPTUN_REMOTE, ipip->remote); in ipip_put_attrs()
147 if (ipip->ipip_mask & IPIP_ATTR_TTL) in ipip_put_attrs()
148 NLA_PUT_U8(msg, IFLA_IPTUN_TTL, ipip->ttl); in ipip_put_attrs()
150 if (ipip->ipip_mask & IPIP_ATTR_TOS) in ipip_put_attrs()
151 NLA_PUT_U8(msg, IFLA_IPTUN_TOS, ipip->tos); in ipip_put_attrs()
153 if (ipip->ipip_mask & IPIP_ATTR_PMTUDISC) in ipip_put_attrs()
154 NLA_PUT_U8(msg, IFLA_IPTUN_PMTUDISC, ipip->pmtudisc); in ipip_put_attrs()
164 struct ipip_info *ipip = link->l_info; in ipip_free() local
166 free(ipip); in ipip_free()
177 struct ipip_info *ipip = link->l_info; in ipip_dump_details() local
180 if (ipip->ipip_mask & IPIP_ATTR_LINK) { in ipip_dump_details()
186 nl_dump_line(p, "%u\n", ipip->link); in ipip_dump_details()
189 if (ipip->ipip_mask & IPIP_ATTR_LOCAL) { in ipip_dump_details()
191 if(inet_ntop(AF_INET, &ipip->local, addr, sizeof(addr))) in ipip_dump_details()
194 nl_dump_line(p, "%#x\n", ntohs(ipip->local)); in ipip_dump_details()
197 if (ipip->ipip_mask & IPIP_ATTR_REMOTE) { in ipip_dump_details()
199 if(inet_ntop(AF_INET, &ipip->remote, addr, sizeof(addr))) in ipip_dump_details()
202 nl_dump_line(p, "%#x\n", ntohs(ipip->remote)); in ipip_dump_details()
205 if (ipip->ipip_mask & IPIP_ATTR_TTL) { in ipip_dump_details()
207 nl_dump_line(p, "%u\n", ipip->ttl); in ipip_dump_details()
210 if (ipip->ipip_mask & IPIP_ATTR_TOS) { in ipip_dump_details()
212 nl_dump_line(p, "%u\n", ipip->tos); in ipip_dump_details()
215 if (ipip->ipip_mask & IPIP_ATTR_PMTUDISC) { in ipip_dump_details()
217 nl_dump_line(p, "enabled (%#x)\n", ipip->pmtudisc); in ipip_dump_details()
325 struct ipip_info *ipip = link->l_info; in rtnl_link_ipip_set_link() local
329 ipip->link = index; in rtnl_link_ipip_set_link()
330 ipip->ipip_mask |= IPIP_ATTR_LINK; in rtnl_link_ipip_set_link()
343 struct ipip_info *ipip = link->l_info; in rtnl_link_ipip_get_link() local
347 return ipip->link; in rtnl_link_ipip_get_link()
359 struct ipip_info *ipip = link->l_info; in rtnl_link_ipip_set_local() local
363 ipip->local = addr; in rtnl_link_ipip_set_local()
364 ipip->ipip_mask |= IPIP_ATTR_LOCAL; in rtnl_link_ipip_set_local()
377 struct ipip_info *ipip = link->l_info; in rtnl_link_ipip_get_local() local
381 return ipip->local; in rtnl_link_ipip_get_local()
393 struct ipip_info *ipip = link->l_info; in rtnl_link_ipip_set_remote() local
397 ipip->remote = addr; in rtnl_link_ipip_set_remote()
398 ipip->ipip_mask |= IPIP_ATTR_REMOTE; in rtnl_link_ipip_set_remote()
411 struct ipip_info *ipip = link->l_info; in rtnl_link_ipip_get_remote() local
415 return ipip->remote; in rtnl_link_ipip_get_remote()
427 struct ipip_info *ipip = link->l_info; in rtnl_link_ipip_set_ttl() local
431 ipip->ttl = ttl; in rtnl_link_ipip_set_ttl()
432 ipip->ipip_mask |= IPIP_ATTR_TTL; in rtnl_link_ipip_set_ttl()
445 struct ipip_info *ipip = link->l_info; in rtnl_link_ipip_get_ttl() local
449 return ipip->ttl; in rtnl_link_ipip_get_ttl()
461 struct ipip_info *ipip = link->l_info; in rtnl_link_ipip_set_tos() local
465 ipip->tos = tos; in rtnl_link_ipip_set_tos()
466 ipip->ipip_mask |= IPIP_ATTR_TOS; in rtnl_link_ipip_set_tos()
479 struct ipip_info *ipip = link->l_info; in rtnl_link_ipip_get_tos() local
483 return ipip->tos; in rtnl_link_ipip_get_tos()
495 struct ipip_info *ipip = link->l_info; in rtnl_link_ipip_set_pmtudisc() local
499 ipip->pmtudisc = pmtudisc; in rtnl_link_ipip_set_pmtudisc()
500 ipip->ipip_mask |= IPIP_ATTR_PMTUDISC; in rtnl_link_ipip_set_pmtudisc()
513 struct ipip_info *ipip = link->l_info; in rtnl_link_ipip_get_pmtudisc() local
517 return ipip->pmtudisc; in rtnl_link_ipip_get_pmtudisc()