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