• Home
  • Raw
  • Download

Lines Matching refs:ipgre

75 	struct ipgre_info *ipgre;  in ipgre_alloc()  local
77 ipgre = calloc(1, sizeof(*ipgre)); in ipgre_alloc()
78 if (!ipgre) in ipgre_alloc()
81 link->l_info = ipgre; in ipgre_alloc()
90 struct ipgre_info *ipgre; in ipgre_parse() local
103 ipgre = link->l_info; in ipgre_parse()
106 ipgre->link = nla_get_u32(tb[IFLA_GRE_LINK]); in ipgre_parse()
107 ipgre->ipgre_mask |= IPGRE_ATTR_LINK; in ipgre_parse()
111 ipgre->iflags = nla_get_u16(tb[IFLA_GRE_IFLAGS]); in ipgre_parse()
112 ipgre->ipgre_mask |= IPGRE_ATTR_IFLAGS; in ipgre_parse()
116 ipgre->oflags = nla_get_u16(tb[IFLA_GRE_OFLAGS]); in ipgre_parse()
117 ipgre->ipgre_mask |= IPGRE_ATTR_OFLAGS; in ipgre_parse()
121 ipgre->ikey = nla_get_u32(tb[IFLA_GRE_IKEY]); in ipgre_parse()
122 ipgre->ipgre_mask |= IPGRE_ATTR_IKEY; in ipgre_parse()
126 ipgre->okey = nla_get_u32(tb[IFLA_GRE_OKEY]); in ipgre_parse()
127 ipgre->ipgre_mask |= IPGRE_ATTR_OKEY; in ipgre_parse()
131 ipgre->local = nla_get_u32(tb[IFLA_GRE_LOCAL]); in ipgre_parse()
132 ipgre->ipgre_mask |= IPGRE_ATTR_LOCAL; in ipgre_parse()
136 ipgre->remote = nla_get_u32(tb[IFLA_GRE_LOCAL]); in ipgre_parse()
137 ipgre->ipgre_mask |= IPGRE_ATTR_REMOTE; in ipgre_parse()
141 ipgre->ttl = nla_get_u8(tb[IFLA_GRE_TTL]); in ipgre_parse()
142 ipgre->ipgre_mask |= IPGRE_ATTR_TTL; in ipgre_parse()
146 ipgre->tos = nla_get_u8(tb[IFLA_GRE_TOS]); in ipgre_parse()
147 ipgre->ipgre_mask |= IPGRE_ATTR_TOS; in ipgre_parse()
151 ipgre->pmtudisc = nla_get_u8(tb[IFLA_GRE_PMTUDISC]); in ipgre_parse()
152 ipgre->ipgre_mask |= IPGRE_ATTR_PMTUDISC; in ipgre_parse()
163 struct ipgre_info *ipgre = link->l_info; in ipgre_put_attrs() local
170 if (ipgre->ipgre_mask & IPGRE_ATTR_LINK) in ipgre_put_attrs()
171 NLA_PUT_U32(msg, IFLA_GRE_LINK, ipgre->link); in ipgre_put_attrs()
173 if (ipgre->ipgre_mask & IFLA_GRE_IFLAGS) in ipgre_put_attrs()
174 NLA_PUT_U16(msg, IFLA_GRE_IFLAGS, ipgre->iflags); in ipgre_put_attrs()
176 if (ipgre->ipgre_mask & IFLA_GRE_OFLAGS) in ipgre_put_attrs()
177 NLA_PUT_U16(msg, IFLA_GRE_OFLAGS, ipgre->oflags); in ipgre_put_attrs()
179 if (ipgre->ipgre_mask & IPGRE_ATTR_IKEY) in ipgre_put_attrs()
180 NLA_PUT_U32(msg, IFLA_GRE_IKEY, ipgre->ikey); in ipgre_put_attrs()
182 if (ipgre->ipgre_mask & IPGRE_ATTR_OKEY) in ipgre_put_attrs()
183 NLA_PUT_U32(msg, IFLA_GRE_OKEY, ipgre->okey); in ipgre_put_attrs()
185 if (ipgre->ipgre_mask & IPGRE_ATTR_LOCAL) in ipgre_put_attrs()
186 NLA_PUT_U32(msg, IFLA_GRE_LOCAL, ipgre->local); in ipgre_put_attrs()
188 if (ipgre->ipgre_mask & IPGRE_ATTR_REMOTE) in ipgre_put_attrs()
189 NLA_PUT_U32(msg, IFLA_GRE_REMOTE, ipgre->remote); in ipgre_put_attrs()
191 if (ipgre->ipgre_mask & IPGRE_ATTR_TTL) in ipgre_put_attrs()
192 NLA_PUT_U8(msg, IFLA_GRE_TTL, ipgre->ttl); in ipgre_put_attrs()
194 if (ipgre->ipgre_mask & IPGRE_ATTR_TOS) in ipgre_put_attrs()
195 NLA_PUT_U8(msg, IFLA_GRE_TOS, ipgre->tos); in ipgre_put_attrs()
197 if (ipgre->ipgre_mask & IPGRE_ATTR_PMTUDISC) in ipgre_put_attrs()
198 NLA_PUT_U8(msg, IFLA_GRE_PMTUDISC, ipgre->pmtudisc); in ipgre_put_attrs()
209 struct ipgre_info *ipgre = link->l_info; in ipgre_free() local
211 free(ipgre); in ipgre_free()
222 struct ipgre_info *ipgre = link->l_info; in ipgre_dump_details() local
225 if (ipgre->ipgre_mask & IPGRE_ATTR_LINK) { in ipgre_dump_details()
231 nl_dump_line(p, "%u\n", ipgre->link); in ipgre_dump_details()
234 if (ipgre->ipgre_mask & IPGRE_ATTR_IFLAGS) { in ipgre_dump_details()
236 nl_dump_line(p, "%x\n", ipgre->iflags); in ipgre_dump_details()
239 if (ipgre->ipgre_mask & IPGRE_ATTR_OFLAGS) { in ipgre_dump_details()
241 nl_dump_line(p, "%x\n", ipgre->oflags); in ipgre_dump_details()
244 if (ipgre->ipgre_mask & IPGRE_ATTR_IKEY) { in ipgre_dump_details()
246 nl_dump_line(p, "%x\n",ipgre->ikey); in ipgre_dump_details()
249 if (ipgre->ipgre_mask & IPGRE_ATTR_OKEY) { in ipgre_dump_details()
251 nl_dump_line(p, "%x\n", ipgre->okey); in ipgre_dump_details()
254 if (ipgre->ipgre_mask & IPGRE_ATTR_LOCAL) { in ipgre_dump_details()
256 if(inet_ntop(AF_INET, &ipgre->local, addr, sizeof(addr))) in ipgre_dump_details()
259 nl_dump_line(p, "%#x\n", ntohs(ipgre->local)); in ipgre_dump_details()
262 if (ipgre->ipgre_mask & IPGRE_ATTR_REMOTE) { in ipgre_dump_details()
264 if(inet_ntop(AF_INET, &ipgre->remote, addr, sizeof(addr))) in ipgre_dump_details()
267 nl_dump_line(p, "%#x\n", ntohs(ipgre->remote)); in ipgre_dump_details()
270 if (ipgre->ipgre_mask & IPGRE_ATTR_TTL) { in ipgre_dump_details()
272 nl_dump_line(p, "%u\n", ipgre->ttl); in ipgre_dump_details()
275 if (ipgre->ipgre_mask & IPGRE_ATTR_TOS) { in ipgre_dump_details()
277 nl_dump_line(p, "%u\n", ipgre->tos); in ipgre_dump_details()
280 if (ipgre->ipgre_mask & IPGRE_ATTR_PMTUDISC) { in ipgre_dump_details()
282 nl_dump_line(p, "enabled (%#x)\n", ipgre->pmtudisc); in ipgre_dump_details()
388 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_set_link() local
392 ipgre->link = index; in rtnl_link_ipgre_set_link()
393 ipgre->ipgre_mask |= IPGRE_ATTR_LINK; in rtnl_link_ipgre_set_link()
406 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_get_link() local
410 return ipgre->link; in rtnl_link_ipgre_get_link()
422 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_set_iflags() local
426 ipgre->iflags = iflags; in rtnl_link_ipgre_set_iflags()
427 ipgre->ipgre_mask |= IPGRE_ATTR_IFLAGS; in rtnl_link_ipgre_set_iflags()
440 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_get_iflags() local
444 return ipgre->iflags; in rtnl_link_ipgre_get_iflags()
456 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_set_oflags() local
460 ipgre->oflags = oflags; in rtnl_link_ipgre_set_oflags()
461 ipgre->ipgre_mask |= IPGRE_ATTR_OFLAGS; in rtnl_link_ipgre_set_oflags()
474 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_get_oflags() local
478 return ipgre->oflags; in rtnl_link_ipgre_get_oflags()
490 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_set_ikey() local
494 ipgre->ikey = ikey; in rtnl_link_ipgre_set_ikey()
495 ipgre->ipgre_mask |= IPGRE_ATTR_IKEY; in rtnl_link_ipgre_set_ikey()
508 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_get_ikey() local
512 return ipgre->ikey; in rtnl_link_ipgre_get_ikey()
524 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_set_okey() local
528 ipgre->okey = okey; in rtnl_link_ipgre_set_okey()
529 ipgre->ipgre_mask |= IPGRE_ATTR_OKEY; in rtnl_link_ipgre_set_okey()
542 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_get_okey() local
546 return ipgre->okey; in rtnl_link_ipgre_get_okey()
558 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_set_local() local
562 ipgre->local = addr; in rtnl_link_ipgre_set_local()
563 ipgre->ipgre_mask |= IPGRE_ATTR_LOCAL; in rtnl_link_ipgre_set_local()
576 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_get_local() local
580 return ipgre->local; in rtnl_link_ipgre_get_local()
592 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_set_remote() local
596 ipgre->remote = remote; in rtnl_link_ipgre_set_remote()
597 ipgre->ipgre_mask |= IPGRE_ATTR_REMOTE; in rtnl_link_ipgre_set_remote()
610 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_get_remote() local
614 return ipgre->remote; in rtnl_link_ipgre_get_remote()
626 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_set_ttl() local
630 ipgre->ttl = ttl; in rtnl_link_ipgre_set_ttl()
631 ipgre->ipgre_mask |= IPGRE_ATTR_TTL; in rtnl_link_ipgre_set_ttl()
644 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_get_ttl() local
648 return ipgre->ttl; in rtnl_link_ipgre_get_ttl()
660 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_set_tos() local
664 ipgre->tos = tos; in rtnl_link_ipgre_set_tos()
665 ipgre->ipgre_mask |= IPGRE_ATTR_TOS; in rtnl_link_ipgre_set_tos()
678 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_get_tos() local
682 return ipgre->tos; in rtnl_link_ipgre_get_tos()
694 struct ipgre_info *ipgre = link->l_info; in rtnl_link_ipgre_set_pmtudisc() local
698 ipgre->pmtudisc = pmtudisc; in rtnl_link_ipgre_set_pmtudisc()
699 ipgre->ipgre_mask |= IPGRE_ATTR_PMTUDISC; in rtnl_link_ipgre_set_pmtudisc()
712 struct ipgre_info *ipgre = link->l_info; in rtnl_link_get_pmtudisc() local
716 return ipgre->pmtudisc; in rtnl_link_get_pmtudisc()