Disconnect hostapd from building in base
[dragonfly.git] / contrib / hostapd / src / utils / pcsc_funcs.h
CommitLineData
a875087d
JL
1/*
2 * WPA Supplicant / PC/SC smartcard interface for USIM, GSM SIM
4781064b 3 * Copyright (c) 2004-2006, 2012, Jouni Malinen <j@w1.fi>
a875087d 4 *
4781064b
JM
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
a875087d
JL
7 */
8
9#ifndef PCSC_FUNCS_H
10#define PCSC_FUNCS_H
11
a875087d 12#ifdef PCSC_FUNCS
4781064b 13struct scard_data * scard_init(const char *reader);
a875087d
JL
14void scard_deinit(struct scard_data *scard);
15
16int scard_set_pin(struct scard_data *scard, const char *pin);
17int scard_get_imsi(struct scard_data *scard, char *imsi, size_t *len);
4781064b 18int scard_get_mnc_len(struct scard_data *scard);
a875087d
JL
19int scard_gsm_auth(struct scard_data *scard, const unsigned char *_rand,
20 unsigned char *sres, unsigned char *kc);
21int scard_umts_auth(struct scard_data *scard, const unsigned char *_rand,
22 const unsigned char *autn,
23 unsigned char *res, size_t *res_len,
24 unsigned char *ik, unsigned char *ck, unsigned char *auts);
4781064b
JM
25int scard_get_pin_retry_counter(struct scard_data *scard);
26int scard_supports_umts(struct scard_data *scard);
a875087d
JL
27
28#else /* PCSC_FUNCS */
29
4781064b 30#define scard_init(r) NULL
a875087d
JL
31#define scard_deinit(s) do { } while (0)
32#define scard_set_pin(s, p) -1
33#define scard_get_imsi(s, i, l) -1
4781064b 34#define scard_get_mnc_len(s) -1
a875087d
JL
35#define scard_gsm_auth(s, r, s2, k) -1
36#define scard_umts_auth(s, r, a, r2, rl, i, c, a2) -1
4781064b
JM
37#define scard_get_pin_retry_counter(s) -1
38#define scard_supports_umts(s) 0
a875087d
JL
39
40#endif /* PCSC_FUNCS */
41
42#endif /* PCSC_FUNCS_H */