eaptnc.h

来自「linux 下通过802.1认证的安装包」· C头文件 代码 · 共 54 行

H
54
字号
/*******************************************************************
 *
 * License under a dual GPL/BSD license.  (See LICENSE file for more info.)
 *
 * \file eaptnc.h
 *
 * \author chris@open1x.org
 *
 *******************************************************************/

#ifndef _EAPTNC_H_
#define _EAPTNC_H_

#ifdef HAVE_TNC

#include "../../../lib/liblist/queue.h"

/***************************************************************
 *
 *  The TNC Flags/Version byte looks similar to the Flags/Version byte in
 *  PEAP.  It's format is :
 *
 *  L M S R R V V V   --  (Each character is one bit.)
 *
 ***************************************************************/

#define TNC_VERSION_MASK     0x07
#define TNC_LENGTH_FLAG      0x80
#define TNC_MORE_FLAG        0x40
#define TNC_START_FLAG       0x20
#define TNC_RESERVED_FLAGS   0x18
#define TNC_MASK_OUT_VER     0xf8

#define TNC_RESULT_SUCCESS 0

#define TNC_MAX_VERSION_SUPPORTED     1

struct tnc_data {
	queue_data *tncinqueue;
	uint32_t expected_in;
	queue_data *tncoutqueue;
};

void eaptnc_check(eap_type_data *);
void eaptnc_process(eap_type_data *);
uint8_t *eaptnc_buildResp(eap_type_data *);
uint8_t eaptnc_isKeyAvailable(eap_type_data *);
uint8_t *eaptnc_getKey(eap_type_data *);
void eaptnc_deinit(eap_type_data *);

#endif // HAVE_TNC

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?