Lines Matching defs:protocol
2 /* xfrm6_protocol.c - Generic xfrm protocol multiplexer for ipv6.
19 #include <net/protocol.h>
27 static inline struct xfrm6_protocol __rcu **proto_handlers(u8 protocol)
29 switch (protocol) {
46 static int xfrm6_rcv_cb(struct sk_buff *skb, u8 protocol, int err)
50 struct xfrm6_protocol __rcu **head = proto_handlers(protocol);
55 for_each_protocol_rcu(*proto_handlers(protocol), handler)
219 static inline const struct inet6_protocol *netproto(unsigned char protocol)
221 switch (protocol) {
234 unsigned char protocol)
242 if (!proto_handlers(protocol) || !netproto(protocol))
247 if (!rcu_dereference_protected(*proto_handlers(protocol),
251 for (pprev = proto_handlers(protocol);
270 if (inet6_add_protocol(netproto(protocol), protocol)) {
271 pr_err("%s: can't add protocol\n", __func__);
281 unsigned char protocol)
287 if (!proto_handlers(protocol) || !netproto(protocol))
292 for (pprev = proto_handlers(protocol);
303 if (!rcu_dereference_protected(*proto_handlers(protocol),
305 if (inet6_del_protocol(netproto(protocol), protocol) < 0) {
306 pr_err("%s: can't remove protocol\n", __func__);