aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_common
diff options
context:
space:
mode:
authorDan Harkins <dharkins@lounge.org>2012-02-11 10:46:30 (GMT)
committerJouni Malinen <j@w1.fi>2012-02-11 10:46:30 (GMT)
commit5ea93947ca67ba83529798b806a15b247cdb2e93 (patch)
treef89dfd7a27ccbe3ec19d144850fda067c6ccb0e1 /src/eap_common
parent27c9d333d4bfab2b3ac377e5a7920e14a0fc6fe9 (diff)
downloadhostap-5ea93947ca67ba83529798b806a15b247cdb2e93.zip
hostap-5ea93947ca67ba83529798b806a15b247cdb2e93.tar.gz
hostap-5ea93947ca67ba83529798b806a15b247cdb2e93.tar.bz2
EAP-pwd: Add support for fragmentation
Signed-hostap: Dan Harkins <dharkins@lounge.org>
Diffstat (limited to 'src/eap_common')
-rw-r--r--src/eap_common/eap_pwd_common.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/eap_common/eap_pwd_common.h b/src/eap_common/eap_pwd_common.h
index 4b841b7..01e6a49 100644
--- a/src/eap_common/eap_pwd_common.h
+++ b/src/eap_common/eap_pwd_common.h
@@ -37,16 +37,17 @@ typedef struct group_definition_ {
* EAP-pwd header, included on all payloads
* L(1 bit) | M(1 bit) | exch(6 bits) | total_length(if L is set)
*/
+#define EAP_PWD_HDR_SIZE 1
#define EAP_PWD_OPCODE_ID_EXCH 1
#define EAP_PWD_OPCODE_COMMIT_EXCH 2
#define EAP_PWD_OPCODE_CONFIRM_EXCH 3
-#define EAP_PWD_GET_LENGTH_BIT(x) ((x)->lm_exch & 0x80)
-#define EAP_PWD_SET_LENGTH_BIT(x) ((x)->lm_exch |= 0x80)
-#define EAP_PWD_GET_MORE_BIT(x) ((x)->lm_exch & 0x40)
-#define EAP_PWD_SET_MORE_BIT(x) ((x)->lm_exch |= 0x40)
-#define EAP_PWD_GET_EXCHANGE(x) ((x)->lm_exch & 0x3f)
-#define EAP_PWD_SET_EXCHANGE(x,y) ((x)->lm_exch |= (y))
+#define EAP_PWD_GET_LENGTH_BIT(x) ((x) & 0x80)
+#define EAP_PWD_SET_LENGTH_BIT(x) ((x) |= 0x80)
+#define EAP_PWD_GET_MORE_BIT(x) ((x) & 0x40)
+#define EAP_PWD_SET_MORE_BIT(x) ((x) |= 0x40)
+#define EAP_PWD_GET_EXCHANGE(x) ((x) & 0x3f)
+#define EAP_PWD_SET_EXCHANGE(x,y) ((x) |= (y))
/* EAP-pwd-ID payload */
struct eap_pwd_id {