Lines Matching defs:protocol
2 /* xfrm4_protocol.c - Generic xfrm protocol multiplexer.
18 #include <net/protocol.h>
26 static inline struct xfrm4_protocol __rcu **proto_handlers(u8 protocol)
28 switch (protocol) {
45 static int xfrm4_rcv_cb(struct sk_buff *skb, u8 protocol, int err)
49 struct xfrm4_protocol __rcu **head = proto_handlers(protocol);
203 static inline const struct net_protocol *netproto(unsigned char protocol)
205 switch (protocol) {
218 unsigned char protocol)
226 if (!proto_handlers(protocol) || !netproto(protocol))
231 if (!rcu_dereference_protected(*proto_handlers(protocol),
235 for (pprev = proto_handlers(protocol);
254 if (inet_add_protocol(netproto(protocol), protocol)) {
255 pr_err("%s: can't add protocol\n", __func__);
265 unsigned char protocol)
271 if (!proto_handlers(protocol) || !netproto(protocol))
276 for (pprev = proto_handlers(protocol);
287 if (!rcu_dereference_protected(*proto_handlers(protocol),
289 if (inet_del_protocol(netproto(protocol), protocol) < 0) {
290 pr_err("%s: can't remove protocol\n", __func__);