Lines Matching defs:protocol
24 /* Transport protocol registration */
27 static const struct phonet_protocol *phonet_proto_get(unsigned int protocol)
31 if (protocol >= PHONET_NPROTO)
35 pp = rcu_dereference(proto_tab[protocol]);
48 /* protocol family functions */
50 static int pn_socket_create(struct net *net, struct socket *sock, int protocol,
61 if (protocol == 0) {
62 /* Default protocol selection */
65 protocol = PN_PROTO_PHONET;
68 protocol = PN_PROTO_PIPE;
75 pnp = phonet_proto_get(protocol);
77 request_module("net-pf-%d-proto-%d", PF_PHONET, protocol) == 0)
78 pnp = phonet_proto_get(protocol);
97 sk->sk_protocol = protocol;
178 skb->protocol = htons(ETH_P_PHONET);
187 err = dev_hard_header(skb, dev, ntohs(skb->protocol),
458 int __init_or_module phonet_proto_register(unsigned int protocol,
463 if (protocol >= PHONET_NPROTO)
471 if (proto_tab[protocol])
474 rcu_assign_pointer(proto_tab[protocol], pp);
481 void phonet_proto_unregister(unsigned int protocol,
485 BUG_ON(rcu_access_pointer(proto_tab[protocol]) != pp);
486 RCU_INIT_POINTER(proto_tab[protocol], NULL);
506 "phonet protocol family initialization failed\n");
538 MODULE_DESCRIPTION("Phonet protocol stack for Linux");