2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 /* Ticket lifetime. This defines the table used to lookup lifetime for the
11 fixed part of rande of the one byte lifetime field. Values less than 0x80
12 are intrpreted as the number of 5 minute intervals. Values from 0x80 to
13 0xBF should be looked up in this table. The value of 0x80 is the same using
14 both methods: 10 and two-thirds hours . The lifetime of 0xBF is 30 days.
15 The intervening values of have a fixed ratio of roughly 1.06914. The value
16 oxFF is defined to mean a ticket has no expiration time. This should be
17 used advisedly since individual servers may impose defacto upperbounds on
20 #define TKTLIFENUMFIXED 64
21 #define TKTLIFEMINFIXED 0x80
22 #define TKTLIFEMAXFIXED 0xBF
23 #define TKTLIFENOEXPIRE 0xFF
24 #define MAXTKTLIFETIME (30*24*3600) /* 30 days */
26 static const int tkt_lifetimes
[TKTLIFENUMFIXED
] = {
27 38400, /* 10.67 hours, 0.44 days */
28 41055, /* 11.40 hours, 0.48 days */
29 43894, /* 12.19 hours, 0.51 days */
30 46929, /* 13.04 hours, 0.54 days */
31 50174, /* 13.94 hours, 0.58 days */
32 53643, /* 14.90 hours, 0.62 days */
33 57352, /* 15.93 hours, 0.66 days */
34 61318, /* 17.03 hours, 0.71 days */
35 65558, /* 18.21 hours, 0.76 days */
36 70091, /* 19.47 hours, 0.81 days */
37 74937, /* 20.82 hours, 0.87 days */
38 80119, /* 22.26 hours, 0.93 days */
39 85658, /* 23.79 hours, 0.99 days */
40 91581, /* 25.44 hours, 1.06 days */
41 97914, /* 27.20 hours, 1.13 days */
42 104684, /* 29.08 hours, 1.21 days */
43 111922, /* 31.09 hours, 1.30 days */
44 119661, /* 33.24 hours, 1.38 days */
45 127935, /* 35.54 hours, 1.48 days */
46 136781, /* 37.99 hours, 1.58 days */
47 146239, /* 40.62 hours, 1.69 days */
48 156350, /* 43.43 hours, 1.81 days */
49 167161, /* 46.43 hours, 1.93 days */
50 178720, /* 49.64 hours, 2.07 days */
51 191077, /* 53.08 hours, 2.21 days */
52 204289, /* 56.75 hours, 2.36 days */
53 218415, /* 60.67 hours, 2.53 days */
54 233517, /* 64.87 hours, 2.70 days */
55 249664, /* 69.35 hours, 2.89 days */
56 266926, /* 74.15 hours, 3.09 days */
57 285383, /* 79.27 hours, 3.30 days */
58 305116, /* 84.75 hours, 3.53 days */
59 326213, /* 90.61 hours, 3.78 days */
60 348769, /* 96.88 hours, 4.04 days */
61 372885, /* 103.58 hours, 4.32 days */
62 398668, /* 110.74 hours, 4.61 days */
63 426234, /* 118.40 hours, 4.93 days */
64 455705, /* 126.58 hours, 5.27 days */
65 487215, /* 135.34 hours, 5.64 days */
66 520904, /* 144.70 hours, 6.03 days */
67 556921, /* 154.70 hours, 6.45 days */
68 595430, /* 165.40 hours, 6.89 days */
69 636601, /* 176.83 hours, 7.37 days */
70 680618, /* 189.06 hours, 7.88 days */
71 727680, /* 202.13 hours, 8.42 days */
72 777995, /* 216.11 hours, 9.00 days */
73 831789, /* 231.05 hours, 9.63 days */
74 889303, /* 247.03 hours, 10.29 days */
75 950794, /* 264.11 hours, 11.00 days */
76 1016537, /* 282.37 hours, 11.77 days */
77 1086825, /* 301.90 hours, 12.58 days */
78 1161973, /* 322.77 hours, 13.45 days */
79 1242318, /* 345.09 hours, 14.38 days */
80 1328218, /* 368.95 hours, 15.37 days */
81 1420057, /* 394.46 hours, 16.44 days */
82 1518247, /* 421.74 hours, 17.57 days */
83 1623226, /* 450.90 hours, 18.79 days */
84 1735464, /* 482.07 hours, 20.09 days */
85 1855462, /* 515.41 hours, 21.48 days */
86 1983758, /* 551.04 hours, 22.96 days */
87 2120925, /* 589.15 hours, 24.55 days */
88 2267576, /* 629.88 hours, 26.25 days */
89 2424367, /* 673.44 hours, 28.06 days */
91 }; /* 720.00 hours, 30.00 days */