~ubuntu-branches/ubuntu/gutsy/wpasupplicant/gutsy

« back to all changes in this revision

Viewing changes to src/eap_peer/eap_methods.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2007-08-26 16:06:57 UTC
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20070826160657-mxk5ivjjh65ptxlr
Tags: upstream-0.6.0+0.5.8
ImportĀ upstreamĀ versionĀ 0.6.0+0.5.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * EAP peer: Method registration
3
 
 * Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi>
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License version 2 as
7
 
 * published by the Free Software Foundation.
8
 
 *
9
 
 * Alternatively, this software may be distributed under the terms of BSD
10
 
 * license.
11
 
 *
12
 
 * See README and COPYING for more details.
13
 
 */
14
 
 
15
 
#ifndef EAP_METHODS_H
16
 
#define EAP_METHODS_H
17
 
 
18
 
#include "eap_common/eap_defs.h"
19
 
 
20
 
const struct eap_method * eap_peer_get_eap_method(int vendor, EapType method);
21
 
const struct eap_method * eap_peer_get_methods(size_t *count);
22
 
 
23
 
struct eap_method * eap_peer_method_alloc(int version, int vendor,
24
 
                                          EapType method, const char *name);
25
 
void eap_peer_method_free(struct eap_method *method);
26
 
int eap_peer_method_register(struct eap_method *method);
27
 
 
28
 
 
29
 
#ifdef IEEE8021X_EAPOL
30
 
 
31
 
EapType eap_peer_get_type(const char *name, int *vendor);
32
 
const char * eap_get_name(int vendor, EapType type);
33
 
size_t eap_get_names(char *buf, size_t buflen);
34
 
char ** eap_get_names_as_string_array(size_t *num);
35
 
int eap_peer_register_methods(void);
36
 
void eap_peer_unregister_methods(void);
37
 
 
38
 
#else /* IEEE8021X_EAPOL */
39
 
 
40
 
static inline EapType eap_peer_get_type(const char *name, int *vendor)
41
 
{
42
 
        *vendor = EAP_VENDOR_IETF;
43
 
        return EAP_TYPE_NONE;
44
 
}
45
 
 
46
 
static inline const char * eap_get_name(int vendor, EapType type)
47
 
{
48
 
        return NULL;
49
 
}
50
 
 
51
 
static inline size_t eap_get_names(char *buf, size_t buflen)
52
 
{
53
 
        return 0;
54
 
}
55
 
 
56
 
static inline int eap_peer_register_methods(void)
57
 
{
58
 
        return 0;
59
 
}
60
 
 
61
 
static inline void eap_peer_unregister_methods(void)
62
 
{
63
 
}
64
 
 
65
 
#endif /* IEEE8021X_EAPOL */
66
 
 
67
 
 
68
 
#ifdef CONFIG_DYNAMIC_EAP_METHODS
69
 
 
70
 
int eap_peer_method_load(const char *so);
71
 
int eap_peer_method_unload(struct eap_method *method);
72
 
 
73
 
#else /* CONFIG_DYNAMIC_EAP_METHODS */
74
 
 
75
 
static inline int eap_peer_method_load(const char *so)
76
 
{
77
 
        return 0;
78
 
}
79
 
 
80
 
static inline int eap_peer_method_unload(struct eap_method *method)
81
 
{
82
 
        return 0;
83
 
}
84
 
 
85
 
#endif /* CONFIG_DYNAMIC_EAP_METHODS */
86
 
 
87
 
#endif /* EAP_METHODS_H */