12 #include <linux/net.h>
14 #include <linux/export.h>
59 _enter(
",,,%zu,%d", len, flags);
86 skb = skb_peek(&rx->
sk.sk_receive_queue);
97 ret = sock_error(&rx->
sk);
101 if (skb_queue_empty(&rx->
sk.sk_receive_queue)) {
103 goto wait_interrupted;
119 spin_lock_bh(&call->
lock);
120 spin_unlock_bh(&call->
lock);
123 _debug(
"packet from released call");
133 if (call != continue_call ||
137 _leave(
" = %d [noncont]", copied);
145 if (!continue_call) {
148 &call->
conn->trans->peer->srx,
149 sizeof(call->
conn->trans->peer->srx));
150 sock_recv_ts_and_drops(msg, &rx->
sk, skb);
155 goto receive_non_data_message;
157 _debug(
"recvmsg DATA #%u { %d, %d }",
160 if (!continue_call) {
177 if (copy > len - copied)
187 goto csum_copy_error;
194 _debug(
"copied %d+%d", copy, copied);
211 if (call->
conn->out_clientflag) {
214 goto terminal_message;
218 if (!(flags & MSG_PEEK)) {
232 continue_call = sp->
call;
237 if (flags & MSG_PEEK) {
240 if (skb == (
struct sk_buff *) &rx->
sk.sk_receive_queue)
242 goto peek_next_packet;
259 _leave(
" = %d [data]", copied);
264 receive_non_data_message:
301 abort_code = sp->
error;
306 abort_code = sp->
error;
324 _net(
"free terminal skb %p", skb);
358 ret = sock_intr_errno(timeo);
365 _leave(
" = %d [waitfail %d]", copied, ret);
421 return sp->
call->abort_code;