• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/net/rxrpc/

Lines Matching refs:call

1 /* incoming call handling
70 * accept an incoming call that needs peer, transport and/or connection setting
82 struct rxrpc_call *call;
123 call = rxrpc_incoming_call(rx, conn, &sp->hdr, GFP_NOIO);
125 if (IS_ERR(call)) {
126 _debug("no call");
127 ret = PTR_ERR(call);
131 /* attach the call to the socket */
137 if (!test_and_set_bit(RXRPC_CALL_INIT_ACCEPT, &call->flags)) {
138 rxrpc_get_call(call);
140 spin_lock(&call->conn->state_lock);
142 call->conn->state == RXRPC_CONN_SERVER_UNSECURED) {
144 list_add_tail(&call->accept_link, &rx->secureq);
145 call->conn->state = RXRPC_CONN_SERVER_CHALLENGING;
146 atomic_inc(&call->conn->usage);
147 set_bit(RXRPC_CONN_CHALLENGE, &call->conn->events);
148 rxrpc_queue_conn(call->conn);
151 call->state = RXRPC_CALL_SERVER_ACCEPTING;
152 list_add_tail(&call->accept_link, &rx->acceptq);
153 rxrpc_get_call(call);
155 nsp->call = call;
157 ASSERTCMP(atomic_read(&call->usage), >=, 3);
160 spin_lock(&call->lock);
161 ret = rxrpc_queue_rcv_skb(call, notification, true,
163 spin_unlock(&call->lock);
167 spin_unlock(&call->conn->state_lock);
174 rxrpc_fast_process_packet(call, skb);
179 rxrpc_put_call(call);
187 read_lock_bh(&call->state_lock);
188 if (!test_bit(RXRPC_CALL_RELEASE, &call->flags) &&
189 !test_and_set_bit(RXRPC_CALL_RELEASE, &call->events)) {
190 rxrpc_get_call(call);
191 rxrpc_queue_call(call);
193 read_unlock_bh(&call->state_lock);
194 rxrpc_put_call(call);
239 _net("incoming call skb %p", skb);
316 * handle acceptance of a call by userspace
317 * - assign the user call ID to the call at the front of the queue
322 struct rxrpc_call *call;
342 call = rb_entry(parent, struct rxrpc_call, sock_node);
344 if (user_call_ID < call->user_call_ID)
346 else if (user_call_ID > call->user_call_ID)
352 /* dequeue the first call and check it's still valid */
353 call = list_entry(rx->acceptq.next, struct rxrpc_call, accept_link);
354 list_del_init(&call->accept_link);
357 write_lock_bh(&call->state_lock);
358 switch (call->state) {
360 call->state = RXRPC_CALL_SERVER_RECV_REQUEST;
367 ret = call->conn->error;
377 call->user_call_ID = user_call_ID;
378 rb_link_node(&call->sock_node, parent, pp);
379 rb_insert_color(&call->sock_node, &rx->calls);
380 if (test_and_set_bit(RXRPC_CALL_HAS_USERID, &call->flags))
382 if (test_and_set_bit(RXRPC_CALL_ACCEPTED, &call->events))
384 rxrpc_queue_call(call);
386 rxrpc_get_call(call);
387 write_unlock_bh(&call->state_lock);
389 _leave(" = %p{%d}", call, call->debug_id);
390 return call;
392 /* if the call is already dying or dead, then we leave the socket's ref
396 _debug("release %p", call);
397 if (!test_bit(RXRPC_CALL_RELEASED, &call->flags) &&
398 !test_and_set_bit(RXRPC_CALL_RELEASE, &call->events))
399 rxrpc_queue_call(call);
401 write_unlock_bh(&call->state_lock);
402 _debug("discard %p", call);
410 * handle rejectance of a call by userspace
411 * - reject the call at the front of the queue
415 struct rxrpc_call *call;
428 /* dequeue the first call and check it's still valid */
429 call = list_entry(rx->acceptq.next, struct rxrpc_call, accept_link);
430 list_del_init(&call->accept_link);
433 write_lock_bh(&call->state_lock);
434 switch (call->state) {
436 call->state = RXRPC_CALL_SERVER_BUSY;
437 if (test_and_set_bit(RXRPC_CALL_REJECT_BUSY, &call->events))
438 rxrpc_queue_call(call);
446 ret = call->conn->error;
455 /* if the call is already dying or dead, then we leave the socket's ref
459 _debug("release %p", call);
460 if (!test_bit(RXRPC_CALL_RELEASED, &call->flags) &&
461 !test_and_set_bit(RXRPC_CALL_RELEASE, &call->events))
462 rxrpc_queue_call(call);
464 write_unlock_bh(&call->state_lock);
465 _debug("discard %p", call);
473 * rxrpc_kernel_accept_call - Allow a kernel service to accept an incoming call
474 * @sock: The socket on which the impending call is waiting
475 * @user_call_ID: The tag to attach to the call
477 * Allow a kernel service to accept an incoming call, assuming the incoming
478 * call is still valid.
483 struct rxrpc_call *call;
486 call = rxrpc_accept_call(rxrpc_sk(sock->sk), user_call_ID);
487 _leave(" = %p", call);
488 return call;
494 * rxrpc_kernel_reject_call - Allow a kernel service to reject an incoming call
495 * @sock: The socket on which the impending call is waiting
497 * Allow a kernel service to reject an incoming call with a BUSY message,
498 * assuming the incoming call is still valid.