12 #include <linux/module.h>
13 #include <linux/net.h>
15 #include <linux/slab.h>
41 INIT_LIST_HEAD(&local->
link);
60 static int rxrpc_create_local(
struct rxrpc_local *local)
65 _enter(
"%p{%d}", local, local->
srx.transport_type);
71 _leave(
" = %d [socket]", ret);
80 local->
srx.transport_len);
90 (
char *) &opt,
sizeof(opt));
92 _debug(
"setsockopt failed");
99 (
char *) &opt,
sizeof(opt));
101 _debug(
"setsockopt failed");
106 list_add(&local->
link, &rxrpc_locals);
135 _enter(
"{%d,%u,%pI4+%hu}",
147 _debug(
"CMP {%d,%u,%pI4+%hu}",
148 local->
srx.transport_type,
149 local->
srx.transport.family,
150 &local->
srx.transport.sin.sin_addr,
151 ntohs(local->
srx.transport.sin.sin_port));
159 if (local->
srx.transport.sin.sin_port !=
162 if (
memcmp(&local->
srx.transport.sin.sin_addr,
176 local = rxrpc_alloc_local(srx);
182 ret = rxrpc_create_local(local);
192 _net(
"LOCAL new %d {%d,%u,%pI4+%hu}",
194 local->
srx.transport_type,
195 local->
srx.transport.family,
196 &local->
srx.transport.sin.sin_addr,
197 ntohs(local->
srx.transport.sin.sin_port));
199 _leave(
" = %p [new]", local);
207 _net(
"LOCAL old %d {%d,%u,%pI4+%hu}",
209 local->
srx.transport_type,
210 local->
srx.transport.family,
211 &local->
srx.transport.sin.sin_addr,
212 ntohs(local->
srx.transport.sin.sin_port));
214 _leave(
" = %p [reuse]", local);
279 if (list_empty(&rxrpc_locals))
296 if (!list_empty(&rxrpc_locals)) {
300 while (!list_empty(&rxrpc_locals)) {