Lines Matching full: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) in proto_handlers() argument
28 switch (protocol) { in proto_handlers()
45 static int xfrm4_rcv_cb(struct sk_buff *skb, u8 protocol, int err) in xfrm4_rcv_cb() argument
49 struct xfrm4_protocol __rcu **head = proto_handlers(protocol); in xfrm4_rcv_cb()
203 static inline const struct net_protocol *netproto(unsigned char protocol) in netproto() argument
205 switch (protocol) { in netproto()
218 unsigned char protocol) in xfrm4_protocol_register() argument
226 if (!proto_handlers(protocol) || !netproto(protocol)) in xfrm4_protocol_register()
231 if (!rcu_dereference_protected(*proto_handlers(protocol), in xfrm4_protocol_register()
235 for (pprev = proto_handlers(protocol); in xfrm4_protocol_register()
254 if (inet_add_protocol(netproto(protocol), protocol)) { in xfrm4_protocol_register()
255 pr_err("%s: can't add protocol\n", __func__); in xfrm4_protocol_register()
265 unsigned char protocol) in xfrm4_protocol_deregister() argument
271 if (!proto_handlers(protocol) || !netproto(protocol)) in xfrm4_protocol_deregister()
276 for (pprev = proto_handlers(protocol); in xfrm4_protocol_deregister()
287 if (!rcu_dereference_protected(*proto_handlers(protocol), in xfrm4_protocol_deregister()
289 if (inet_del_protocol(netproto(protocol), protocol) < 0) { in xfrm4_protocol_deregister()
290 pr_err("%s: can't remove protocol\n", __func__); in xfrm4_protocol_deregister()