1 /* internal.h --- Internal header file for Shishi.
2 * Copyright (C) 2002, 2003, 2004, 2006, 2007 Simon Josefsson
4 * This file is part of Shishi.
6 * Shishi is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * Shishi is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with Shishi; if not, see http://www.gnu.org/licenses or write
18 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
19 * Floor, Boston, MA 02110-1301, USA
37 #include <sys/types.h>
38 #include <sys/socket.h>
39 #include <sys/select.h>
43 #ifdef HAVE_SYS_IOCTL_H
44 #include <sys/ioctl.h>
51 #if defined HAVE_DECL_H_ERRNO && !HAVE_DECL_H_ERRNO
52 /*extern int h_errno;*/
67 #if TIME_WITH_SYS_TIME
68 # include <sys/time.h>
72 # include <sys/time.h>
82 #ifdef HAVE_NETINET_IN_H
83 #include <netinet/in.h>
85 #ifdef HAVE_NETINET_IN6_H
86 #include <netinet/in6.h>
88 #ifdef HAVE_ARPA_INET_H
89 #include <arpa/inet.h>
92 #ifdef HAVE_ARPA_NAMESER_H
93 #include <arpa/nameser.h>
105 #include "xvasprintf.h"
108 #include "read-file.h"
110 #include "xgethostname.h"
111 #include "xgetdomainname.h"
112 #include "xstrndup.h"
116 #define _(String) dgettext (PACKAGE, String)
117 #define gettext_noop(String) String
118 #define N_(String) gettext_noop (String)
120 #define MAX_KEY_LEN 32
121 #define MAX_RANDOM_LEN 32
122 #define MAX_HASH_LEN 32
123 #define MAX_CKSUM_LEN 32
125 #define SHISHI_VERBOSE_NOISE (1<<1)
126 #define SHISHI_VERBOSE_ASN1 (1<<2)
127 #define SHISHI_VERBOSE_CRYPTO (1<<3)
128 #define SHISHI_VERBOSE_CRYPTO_NOISE (1<<4)
130 #define KRBTGT "krbtgt"
131 #define PRINCIPAL_DELIMITER "/"
133 #define VERBOSENOISE(h) (h->verbose & SHISHI_VERBOSE_NOISE)
134 #define VERBOSEASN1(h) (h->verbose & SHISHI_VERBOSE_ASN1)
135 #define VERBOSECRYPTO(h) (h->verbose & SHISHI_VERBOSE_CRYPTO)
136 #define VERBOSECRYPTONOISE(h) (h->verbose & SHISHI_VERBOSE_CRYPTO_NOISE)
137 #define VERBOSES (SHISHI_VERBOSE_ASN1 | \
138 SHISHI_VERBOSE_CRYPTO | \
139 SHISHI_VERBOSE_NOISE | \
140 SHISHI_VERBOSE_CRYPTO_NOISE)
141 #define VERBOSE(h) (h->verbose & ~VERBOSES)
143 /* For resolv.c and netio.c, on old systems. */
155 struct Shishi_kdcinfo
158 struct sockaddr sockaddress
;
162 struct Shishi_realminfo
165 struct Shishi_kdcinfo
*kdcaddresses
;
166 size_t nkdcaddresses
;
167 char **serverwildcards
;
168 size_t nserverwildcards
;
177 char *default_principal
;
182 int32_t *clientkdcetypes
;
183 size_t nclientkdcetypes
;
184 int32_t *authorizationtypes
;
185 size_t nauthorizationtypes
;
186 struct Shishi_realminfo
*realminfos
;
193 char *tktsdefaultfile
;
195 char *hostkeysdefaultfile
;
203 #define TICKETLIFE (60*60*8) /* Work day */
204 #define RENEWLIFE (60*60*24*7) /* Week */
206 #endif /* _INTERNAL_H */