Some doc path fixes from Anders
[pkg-k5-afs_openafs.git] / src / rx / rx_call.c
blob43d6034fcb7021215cbf6ab10655606001e18ae1
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * Copyright 2011, Your File System Inc
4 * All Rights Reserved.
6 * This software has been released under the terms of the IBM Public
7 * License. For details, see the LICENSE file in the top-level source
8 * directory or online at http://www.openafs.org/dl/license10.html
9 */
11 #include <afsconfig.h>
12 #include <afs/param.h>
14 #include <roken.h>
16 #include "rx.h"
17 #include "rx_call.h"
18 #include "rx_conn.h"
19 #include "rx_atomic.h"
20 #include "rx_internal.h"
22 struct rx_connection *
23 rx_ConnectionOf(struct rx_call *call)
25 return call->conn;
28 int
29 rx_Error(struct rx_call *call)
31 return call->error;
34 int
35 rx_GetRemoteStatus(struct rx_call *call)
37 return call->remoteStatus;
40 void
41 rx_SetLocalStatus(struct rx_call *call, int status)
43 call->localStatus = status;
46 int
47 rx_GetCallAbortCode(struct rx_call *call)
49 return call->abortCode;
52 void
53 rx_SetCallAbortCode(struct rx_call *call, int code)
55 call->abortCode = code;
58 void
59 rx_RecordCallStatistics(struct rx_call *call, unsigned int rxInterface,
60 unsigned int currentFunc, unsigned int totalFunc,
61 int isServer)
63 struct clock queue;
64 struct clock exec;
66 clock_GetTime(&exec);
67 clock_Sub(&exec, &call->startTime);
68 queue = call->startTime;
69 clock_Sub(&queue, &call->queueTime);
71 rxi_IncrementTimeAndCount(call->conn->peer, rxInterface, currentFunc,
72 totalFunc, &queue, &exec, call->app.bytesSent,
73 call->app.bytesRcvd, 1);