Lines Matching refs:protocol
37 /* Transport protocol registration */
40 static struct phonet_protocol *phonet_proto_get(int protocol)
44 if (protocol >= PHONET_NPROTO)
48 pp = rcu_dereference(proto_tab[protocol]);
61 /* protocol family functions */
63 static int pn_socket_create(struct net *net, struct socket *sock, int protocol,
74 if (protocol == 0) {
75 /* Default protocol selection */
78 protocol = PN_PROTO_PHONET;
81 protocol = PN_PROTO_PIPE;
88 pnp = phonet_proto_get(protocol);
90 request_module("net-pf-%d-proto-%d", PF_PHONET, protocol) == 0)
91 pnp = phonet_proto_get(protocol);
110 sk->sk_protocol = protocol;
190 skb->protocol = htons(ETH_P_PHONET);
203 err = dev_hard_header(skb, dev, ntohs(skb->protocol),
444 int __init_or_module phonet_proto_register(int protocol,
449 if (protocol >= PHONET_NPROTO)
457 if (proto_tab[protocol])
460 rcu_assign_pointer(proto_tab[protocol], pp);
467 void phonet_proto_unregister(int protocol, struct phonet_protocol *pp)
470 BUG_ON(proto_tab[protocol] != pp);
471 rcu_assign_pointer(proto_tab[protocol], NULL);
491 "phonet protocol family initialization failed\n");
523 MODULE_DESCRIPTION("Phonet protocol stack for Linux");