Lines Matching refs:proto
36 int gre_add_protocol(const struct gre_protocol *proto, u8 version) in gre_add_protocol() argument
41 return (cmpxchg((const struct gre_protocol **)&gre_proto[version], NULL, proto) == NULL) ? in gre_add_protocol()
46 int gre_del_protocol(const struct gre_protocol *proto, u8 version) in gre_del_protocol() argument
53 ret = (cmpxchg((const struct gre_protocol **)&gre_proto[version], proto, NULL) == proto) ? in gre_del_protocol()
74 greh->protocol = tpi->proto; in gre_build_header()
119 tpi->proto = greh->protocol; in parse_gre_header()
150 if (greh->flags == 0 && tpi->proto == htons(ETH_P_WCCP)) { in parse_gre_header()
151 tpi->proto = htons(ETH_P_IP); in parse_gre_header()
159 return iptunnel_pull_header(skb, hdr_len, tpi->proto); in parse_gre_header()
181 struct gre_cisco_protocol *proto; in gre_cisco_rcv() local
184 proto = rcu_dereference(gre_cisco_proto_list[i]); in gre_cisco_rcv()
185 if (!proto) in gre_cisco_rcv()
187 ret = proto->handler(skb, &tpi); in gre_cisco_rcv()
241 struct gre_cisco_protocol *proto; in gre_cisco_err() local
243 proto = rcu_dereference(gre_cisco_proto_list[i]); in gre_cisco_err()
244 if (!proto) in gre_cisco_err()
247 if (proto->err_handler(skb, info, &tpi) == PACKET_RCVD) in gre_cisco_err()
257 const struct gre_protocol *proto; in gre_rcv() local
269 proto = rcu_dereference(gre_proto[ver]); in gre_rcv()
270 if (!proto || !proto->handler) in gre_rcv()
272 ret = proto->handler(skb); in gre_rcv()
285 const struct gre_protocol *proto; in gre_err() local
293 proto = rcu_dereference(gre_proto[ver]); in gre_err()
294 if (proto && proto->err_handler) in gre_err()
295 proto->err_handler(skb, info); in gre_err()
312 struct gre_cisco_protocol **proto = (struct gre_cisco_protocol **) in gre_cisco_register() local
315 return (cmpxchg(proto, NULL, newp) == NULL) ? 0 : -EBUSY; in gre_cisco_register()
321 struct gre_cisco_protocol **proto = (struct gre_cisco_protocol **) in gre_cisco_unregister() local
325 ret = (cmpxchg(proto, del_proto, NULL) == del_proto) ? 0 : -EINVAL; in gre_cisco_unregister()