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),
459 int __init_or_module phonet_proto_register(unsigned int protocol,
464 if (protocol >= PHONET_NPROTO)
472 if (proto_tab[protocol])
475 rcu_assign_pointer(proto_tab[protocol], pp);
482 void phonet_proto_unregister(unsigned int protocol,
486 BUG_ON(proto_tab[protocol] != pp);
487 RCU_INIT_POINTER(proto_tab[protocol], NULL);
507 "phonet protocol family initialization failed\n");
539 MODULE_DESCRIPTION("Phonet protocol stack for Linux");