1 /* src/rxgk/rxgk_private.h - Declarations of RXGK-internal routines */
3 * Copyright (C) 2013, 2014 by the Massachusetts Institute of Technology.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29 * OF THE POSSIBILITY OF SUCH DAMAGE.
33 * Prototypes for routines internal to RXGK.
36 #ifndef RXGK_PRIVATE_H
37 #define RXGK_PRIVATE_H
39 /* RX-internal headers we depend on. */
40 #include <rx/rx_identity.h>
42 /** Statistics about a connection. Bytes and packets sent/received. */
55 * Security Object private data for the server.
57 * Per-connection flags, and a way to get a decryption key for what the client
60 struct rxgk_sprivate
{
63 rxgk_getkey_func getkey
;
66 * Per-connection security data for the server.
68 * Security level, authentication state, expiration, the current challenge
69 * nonce, status, the connection start time and current key derivation key
70 * number. Cache both the user identity and callback identity presented
71 * in the token, for later use.
75 unsigned char tried_auth
;
78 unsigned char challenge
[20];
79 struct rxgkStats stats
;
81 struct rx_identity
*client
;
82 afs_uint32 key_number
;
93 * Security Object private data for client.
95 * The session key ("token master key"), plust the enctype of the
96 * token and the token itself.
97 * UUIDs for both the client (cache manager) and target server. This is
98 * doable because the token is either a db server (the target has no UUID)
99 * or tied to a particular file server (which does have a UUID).
101 struct rxgk_cprivate
{
107 afsUUID
*client_uuid
;
108 afsUUID
*target_uuid
;
111 * Per-connection security data for client.
113 * The start time of the connection and connection key number are used
114 * for key derivation, information about the callback key to be presented in
115 * the authenticator for the connection, and the requisite connection
120 afs_uint32 key_number
;
123 afs_int32 cb_enctype
;
124 struct rxgkStats stats
;
127 #endif /* RXGK_PRIVATE_H */