Lines Matching refs: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);
206 static inline const struct net_protocol *netproto(unsigned char protocol)
208 switch (protocol) {
221 unsigned char protocol)
229 if (!proto_handlers(protocol) || !netproto(protocol))
234 if (!rcu_dereference_protected(*proto_handlers(protocol),
238 for (pprev = proto_handlers(protocol);
257 if (inet_add_protocol(netproto(protocol), protocol)) {
258 pr_err("%s: can't add protocol\n", __func__);
268 unsigned char protocol)
274 if (!proto_handlers(protocol) || !netproto(protocol))
279 for (pprev = proto_handlers(protocol);
290 if (!rcu_dereference_protected(*proto_handlers(protocol),
292 if (inet_del_protocol(netproto(protocol), protocol) < 0) {
293 pr_err("%s: can't remove protocol\n", __func__);