rx: Remove multi_End_Ignore
[openafs.git] / src / rx / rx_conn.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * Copyright 2011, Your File System Inc
4  * All Rights Reserved.
5  *
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  */
10
11 #include <afsconfig.h>
12 #include <afs/param.h>
13
14 #include <roken.h>
15
16 #include "rx.h"
17 #include "rx_conn.h"
18
19 afs_uint32
20 rx_GetConnectionEpoch(struct rx_connection *conn) {
21     return conn->epoch;
22 }
23
24 afs_uint32
25 rx_GetConnectionId(struct rx_connection *conn) {
26     return conn->cid;
27 }
28
29 void
30 rx_SetSecurityData(struct rx_connection *conn, void *data) {
31     conn->securityData = data;
32 }
33
34 void *
35 rx_GetSecurityData(struct rx_connection *conn)
36 {
37     return conn->securityData;
38 }
39
40 int
41 rx_IsUsingPktCksum(struct rx_connection *conn)
42 {
43     return conn->flags & RX_CONN_USING_PACKET_CKSUM;
44 }
45
46 void
47 rx_SetSecurityHeaderSize(struct rx_connection *conn, afs_uint32 size)
48 {
49     conn->securityHeaderSize = size;
50 }
51
52 afs_uint32
53 rx_GetSecurityHeaderSize(struct rx_connection *conn)
54 {
55     return conn->securityHeaderSize;
56 }
57
58 void
59 rx_SetSecurityMaxTrailerSize(struct rx_connection *conn, afs_uint32 size)
60 {
61     conn->securityMaxTrailerSize = size;
62 }
63
64 afs_uint32
65 rx_GetSecurityMaxTrailerSize(struct rx_connection *conn)
66 {
67     return conn->securityMaxTrailerSize;
68 }
69
70 void
71 rx_SetMsgsizeRetryErr(struct rx_connection *conn, int err)
72 {
73     conn->msgsizeRetryErr = err;
74 }
75
76 int
77 rx_IsServerConn(struct rx_connection *conn)
78 {
79     return conn->type == RX_SERVER_CONNECTION;
80 }
81
82 int
83 rx_IsClientConn(struct rx_connection *conn)
84 {
85     return conn->type == RX_CLIENT_CONNECTION;
86 }
87
88 struct rx_peer *
89 rx_PeerOf(struct rx_connection *conn)
90 {
91     return conn->peer;
92 }
93
94 u_short
95 rx_ServiceIdOf(struct rx_connection *conn)
96 {
97     return conn->serviceId;
98 }
99
100 int
101 rx_SecurityClassOf(struct rx_connection *conn)
102 {
103     return conn->securityIndex;
104 }
105
106 struct rx_securityClass *
107 rx_SecurityObjectOf(const struct rx_connection *conn)
108 {
109     return conn->securityObject;
110 }
111
112 struct rx_service *
113 rx_ServiceOf(struct rx_connection *conn)
114 {
115     return conn->service;
116 }
117
118 int
119 rx_ConnError(struct rx_connection *conn)
120 {
121     return conn->error;
122 }