6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but 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 this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 * Copyright 2014 Network RADIUS SARL
21 * Copyright 2014 The FreeRADIUS server project
27 RCSIDH(eap_chbind_h, "$Id$")
31 #include <sys/types.h>
34 #include <freeradius-devel/radiusd.h>
38 /* Structure to represent eap channel binding packet format */
39 typedef struct chbind_packet_t {
44 /* Structure to hold channel bindings req/resp information */
45 typedef struct CHBIND_REQ {
46 VALUE_PAIR *username; /* the username */
47 chbind_packet_t *request; /* channel binding request buffer */
48 chbind_packet_t *response; /* channel binding response buffer */
51 /* Protocol constants */
52 #define CHBIND_NSID_RADIUS 1
54 #define CHBIND_CODE_REQUEST 1
55 #define CHBIND_CODE_SUCCESS 2
56 #define CHBIND_CODE_FAILURE 3
58 /* Channel binding function prototypes */
59 PW_CODE chbind_process(REQUEST *request, CHBIND_REQ *chbind_req);
61 extern VALUE_PAIR *eap_chbind_packet2vp(REQUEST *request, const chbind_packet_t *packet);
62 extern chbind_packet_t *eap_chbind_vp2packet(TALLOC_CTX *ctx, VALUE_PAIR *vps);
64 #endif /*_EAP_CHBIND_H*/