Lines Matching refs:protocol
40 static struct phonet_protocol *phonet_proto_get(unsigned int protocol) in phonet_proto_get() argument
44 if (protocol >= PHONET_NPROTO) in phonet_proto_get()
48 pp = rcu_dereference(proto_tab[protocol]); in phonet_proto_get()
63 static int pn_socket_create(struct net *net, struct socket *sock, int protocol, in pn_socket_create() argument
74 if (protocol == 0) { in pn_socket_create()
78 protocol = PN_PROTO_PHONET; in pn_socket_create()
81 protocol = PN_PROTO_PIPE; in pn_socket_create()
88 pnp = phonet_proto_get(protocol); in pn_socket_create()
90 request_module("net-pf-%d-proto-%d", PF_PHONET, protocol) == 0) in pn_socket_create()
91 pnp = phonet_proto_get(protocol); in pn_socket_create()
110 sk->sk_protocol = protocol; in pn_socket_create()
191 skb->protocol = htons(ETH_P_PHONET); in pn_send()
200 err = dev_hard_header(skb, dev, ntohs(skb->protocol), in pn_send()
472 int __init_or_module phonet_proto_register(unsigned int protocol, in phonet_proto_register() argument
477 if (protocol >= PHONET_NPROTO) in phonet_proto_register()
485 if (proto_tab[protocol]) in phonet_proto_register()
488 rcu_assign_pointer(proto_tab[protocol], pp); in phonet_proto_register()
495 void phonet_proto_unregister(unsigned int protocol, struct phonet_protocol *pp) in phonet_proto_unregister() argument
498 BUG_ON(proto_tab[protocol] != pp); in phonet_proto_unregister()
499 RCU_INIT_POINTER(proto_tab[protocol], NULL); in phonet_proto_unregister()