~ubuntu-branches/ubuntu/vivid/wpasupplicant/vivid

« back to all changes in this revision

Viewing changes to radius_client.h

  • Committer: Bazaar Package Importer
  • Author(s): Kel Modderman
  • Date: 2008-03-12 20:03:04 UTC
  • mfrom: (1.1.10 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20080312200304-4331y9wj46pdd34z
Tags: 0.6.3-1
* New upstream release.
* Drop patches applied upstream:
  - debian/patches/30_wpa_gui_qt4_eventhistoryui_rework.patch
  - debian/patches/31_wpa_gui_qt4_eventhistory_always_scrollbar.patch
  - debian/patches/32_wpa_gui_qt4_eventhistory_scroll_with_events.patch
  - debian/patches/40_dbus_ssid_data.patch
* Tidy up the clean target of debian/rules. Now that the madwifi headers are
  handled differently we no longer need to do any cleanup.
* Fix formatting error in debian/ifupdown/wpa_action.8 to make lintian
  quieter.
* Add patch to fix formatting errors in manpages build from sgml source. Use
  <emphasis> tags to hightlight keywords instead of surrounding them in
  strong quotes.
  - debian/patches/41_manpage_format_fixes.patch
* wpasupplicant binary package no longer suggests pcscd, guessnet, iproute
  or wireless-tools, nor does it recommend dhcp3-client. These are not
  needed.
* Add debian/patches/10_silence_siocsiwauth_icotl_failure.patch to disable
  ioctl failure messages that occur under normal conditions.
* Cherry pick two upstream git commits concerning the dbus interface:
  - debian/patches/11_avoid_dbus_version_namespace.patch
  - debian/patches/12_fix_potential_use_after_free.patch
* Add debian/patches/42_manpage_explain_available_drivers.patch to explain
  that not all of the driver backends are available in the provided
  wpa_supplicant binary, and that the canonical list of supported driver
  backends can be retrieved from the wpa_supplicant -h (help) output.
  (Closes: #466910)
* Add debian/patches/20_wpa_gui_qt4_disable_link_prl.patch to remove
  link_prl CONFIG compile flag added by qmake-qt4 >= 4.3.4-2 to avoid excess
  linking.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * hostapd / RADIUS client
3
 
 * Copyright (c) 2002-2005, 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 RADIUS_CLIENT_H
16
 
#define RADIUS_CLIENT_H
17
 
 
18
 
#include "config_types.h"
19
 
 
20
 
struct radius_msg;
21
 
 
22
 
struct hostapd_radius_server {
23
 
        /* MIB prefix for shared variables:
24
 
         * @ = radiusAuth or radiusAcc depending on the type of the server */
25
 
        struct hostapd_ip_addr addr; /* @ServerAddress */
26
 
        int port; /* @ClientServerPortNumber */
27
 
        u8 *shared_secret;
28
 
        size_t shared_secret_len;
29
 
 
30
 
        /* Dynamic (not from configuration file) MIB data */
31
 
        int index; /* @ServerIndex */
32
 
        int round_trip_time; /* @ClientRoundTripTime; in hundredths of a
33
 
                              * second */
34
 
        u32 requests; /* @Client{Access,}Requests */
35
 
        u32 retransmissions; /* @Client{Access,}Retransmissions */
36
 
        u32 access_accepts; /* radiusAuthClientAccessAccepts */
37
 
        u32 access_rejects; /* radiusAuthClientAccessRejects */
38
 
        u32 access_challenges; /* radiusAuthClientAccessChallenges */
39
 
        u32 responses; /* radiusAccClientResponses */
40
 
        u32 malformed_responses; /* @ClientMalformed{Access,}Responses */
41
 
        u32 bad_authenticators; /* @ClientBadAuthenticators */
42
 
        u32 timeouts; /* @ClientTimeouts */
43
 
        u32 unknown_types; /* @ClientUnknownTypes */
44
 
        u32 packets_dropped; /* @ClientPacketsDropped */
45
 
        /* @ClientPendingRequests: length of hapd->radius->msgs for matching
46
 
         * msg_type */
47
 
};
48
 
 
49
 
struct hostapd_radius_servers {
50
 
        /* RADIUS Authentication and Accounting servers in priority order */
51
 
        struct hostapd_radius_server *auth_servers, *auth_server;
52
 
        int num_auth_servers;
53
 
        struct hostapd_radius_server *acct_servers, *acct_server;
54
 
        int num_acct_servers;
55
 
 
56
 
        int retry_primary_interval;
57
 
        int acct_interim_interval;
58
 
 
59
 
        int msg_dumps;
60
 
};
61
 
 
62
 
 
63
 
typedef enum {
64
 
        RADIUS_AUTH,
65
 
        RADIUS_ACCT,
66
 
        RADIUS_ACCT_INTERIM /* used only with radius_client_send(); just like
67
 
                             * RADIUS_ACCT, but removes any pending interim
68
 
                             * RADIUS Accounting packages for the same STA
69
 
                             * before sending the new interim update */
70
 
} RadiusType;
71
 
 
72
 
typedef enum {
73
 
        RADIUS_RX_PROCESSED,
74
 
        RADIUS_RX_QUEUED,
75
 
        RADIUS_RX_UNKNOWN,
76
 
        RADIUS_RX_INVALID_AUTHENTICATOR
77
 
} RadiusRxResult;
78
 
 
79
 
struct radius_client_data;
80
 
 
81
 
int radius_client_register(struct radius_client_data *radius,
82
 
                           RadiusType msg_type,
83
 
                           RadiusRxResult (*handler)
84
 
                           (struct radius_msg *msg, struct radius_msg *req,
85
 
                            u8 *shared_secret, size_t shared_secret_len,
86
 
                            void *data),
87
 
                           void *data);
88
 
int radius_client_send(struct radius_client_data *radius,
89
 
                       struct radius_msg *msg,
90
 
                       RadiusType msg_type, const u8 *addr);
91
 
u8 radius_client_get_id(struct radius_client_data *radius);
92
 
 
93
 
void radius_client_flush(struct radius_client_data *radius, int only_auth);
94
 
struct radius_client_data *
95
 
radius_client_init(void *ctx, struct hostapd_radius_servers *conf);
96
 
void radius_client_deinit(struct radius_client_data *radius);
97
 
void radius_client_flush_auth(struct radius_client_data *radius, u8 *addr);
98
 
int radius_client_get_mib(struct radius_client_data *radius, char *buf,
99
 
                          size_t buflen);
100
 
struct radius_client_data *
101
 
radius_client_reconfig(struct radius_client_data *old, void *ctx,
102
 
                       struct hostapd_radius_servers *oldconf,
103
 
                       struct hostapd_radius_servers *newconf);
104
 
 
105
 
#endif /* RADIUS_CLIENT_H */