• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ eap_peer_method_free函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中eap_peer_method_free函数的典型用法代码示例。如果您正苦于以下问题:C++ eap_peer_method_free函数的具体用法?C++ eap_peer_method_free怎么用?C++ eap_peer_method_free使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了eap_peer_method_free函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: eap_peer_unregister_methods

/**
 * eap_peer_unregister_methods - Unregister EAP peer methods
 *
 * This function is called at program termination to unregister all EAP peer
 * methods.
 */
void eap_peer_unregister_methods(void)
{
	struct eap_method *m;
#ifdef CONFIG_DYNAMIC_EAP_METHODS
	void *handle;
#endif /* CONFIG_DYNAMIC_EAP_METHODS */

	while (eap_methods) {
		m = eap_methods;
		eap_methods = eap_methods->next;

#ifdef CONFIG_DYNAMIC_EAP_METHODS
		handle = m->dl_handle;
#endif /* CONFIG_DYNAMIC_EAP_METHODS */

		if (m->free)
			m->free(m);
		else
			eap_peer_method_free(m);

#ifdef CONFIG_DYNAMIC_EAP_METHODS
		if (handle)
			dlclose(handle);
#endif /* CONFIG_DYNAMIC_EAP_METHODS */
	}
}
开发者ID:ebichu,项目名称:dd-wrt,代码行数:32,代码来源:eap_methods.c


示例2: eap_peer_sim_register

int eap_peer_sim_register(void)
{
	struct eap_method *eap;
	int ret;

	eap = eap_peer_method_alloc(EAP_PEER_METHOD_INTERFACE_VERSION,
				    EAP_VENDOR_IETF, EAP_TYPE_SIM, "SIM");
	if (eap == NULL)
		return -1;

	eap->init = eap_sim_init;
	eap->deinit = eap_sim_deinit;
	eap->process = eap_sim_process;
	eap->isKeyAvailable = eap_sim_isKeyAvailable;
	eap->getKey = eap_sim_getKey;
	eap->getSessionId = eap_sim_get_session_id;
	eap->has_reauth_data = eap_sim_has_reauth_data;
	eap->deinit_for_reauth = eap_sim_deinit_for_reauth;
	eap->init_for_reauth = eap_sim_init_for_reauth;
	eap->get_identity = eap_sim_get_identity;
	eap->get_emsk = eap_sim_get_emsk;

	ret = eap_peer_method_register(eap);
	if (ret)
		eap_peer_method_free(eap);
	return ret;
}
开发者ID:Bananian,项目名称:hostapd-rtl,代码行数:27,代码来源:eap_sim.c


示例3: eap_peer_wfa_unauth_tls_register

int eap_peer_wfa_unauth_tls_register(void)
{
	struct eap_method *eap;
	int ret;

	eap = eap_peer_method_alloc(EAP_PEER_METHOD_INTERFACE_VERSION,
				    EAP_VENDOR_WFA_NEW,
				    EAP_VENDOR_WFA_UNAUTH_TLS,
				    "WFA-UNAUTH-TLS");
	if (eap == NULL)
		return -1;

	eap->init = eap_wfa_unauth_tls_init;
	eap->deinit = eap_tls_deinit;
	eap->process = eap_tls_process;
	eap->isKeyAvailable = eap_tls_isKeyAvailable;
	eap->getKey = eap_tls_getKey;
	eap->get_status = eap_tls_get_status;
	eap->has_reauth_data = eap_tls_has_reauth_data;
	eap->deinit_for_reauth = eap_tls_deinit_for_reauth;
	eap->init_for_reauth = eap_tls_init_for_reauth;
	eap->get_emsk = eap_tls_get_emsk;

	ret = eap_peer_method_register(eap);
	if (ret)
		eap_peer_method_free(eap);
	return ret;
}
开发者ID:Bananian,项目名称:hostapd-rtl,代码行数:28,代码来源:eap_tls.c


示例4: eap_peer_method_unload

/**
 * eap_peer_method_unload - Unload a dynamic EAP method library (shared object)
 * @method: Pointer to the dynamically loaded EAP method
 * Returns: 0 on success, -1 on failure
 *
 * This function can be used to unload EAP methods that have been previously
 * loaded with eap_peer_method_load(). Before unloading the method, all
 * references to the method must be removed to make sure that no dereferences
 * of freed memory will occur after unloading.
 */
int eap_peer_method_unload(struct eap_method *method)
{
	struct eap_method *m, *prev;
	void *handle;

	m = eap_methods;
	prev = NULL;
	while (m) {
		if (m == method)
			break;
		prev = m;
		m = m->next;
	}

	if (m == NULL || m->dl_handle == NULL)
		return -1;

	if (prev)
		prev->next = m->next;
	else
		eap_methods = m->next;

	handle = m->dl_handle;

	if (m->free)
		m->free(m);
	else
		eap_peer_method_free(m);

	dlclose(handle);

	return 0;
}
开发者ID:ebichu,项目名称:dd-wrt,代码行数:43,代码来源:eap_methods.c


示例5: eap_peer_tnc_register

int eap_peer_tnc_register(void)
{
	struct eap_method *eap;
	int ret;

	eap = eap_peer_method_alloc(EAP_PEER_METHOD_INTERFACE_VERSION,
				    EAP_VENDOR_IETF, EAP_TYPE_TNC, "TNC");
	if (eap == NULL)
		return -1;

	eap->init = eap_tnc_init;
	eap->deinit = eap_tnc_deinit;
	eap->process = eap_tnc_process;

	ret = eap_peer_method_register(eap);
	if (ret)
		eap_peer_method_free(eap);
	return ret;
}
开发者ID:xiaoyeqiannian,项目名称:githubck,代码行数:19,代码来源:eap_tnc.c


示例6: eap_peer_wsc_register

int eap_peer_wsc_register(void)
{
	struct eap_method *eap;
	int ret;

	eap = eap_peer_method_alloc(EAP_PEER_METHOD_INTERFACE_VERSION, EAP_VENDOR_WFA, EAP_VENDOR_TYPE_WSC, "WSC");
	if (eap == NULL) {
		return -1;
	}

	eap->init = eap_wsc_init;
	eap->deinit = eap_wsc_deinit;
	eap->process = eap_wsc_process;

	ret = eap_peer_method_register(eap);
	if (ret) {
		eap_peer_method_free(eap);
	}
	return ret;
}
开发者ID:drashti304,项目名称:TizenRT,代码行数:20,代码来源:eap_wsc.c


示例7: eap_peer_leap_register

int eap_peer_leap_register(void)
{
	struct eap_method *eap;
	int ret;

	eap = eap_peer_method_alloc(EAP_PEER_METHOD_INTERFACE_VERSION,
				    EAP_VENDOR_IETF, EAP_TYPE_LEAP, "LEAP");
	if (eap == NULL)
		return -1;

	eap->init = eap_leap_init;
	eap->deinit = eap_leap_deinit;
	eap->process = eap_leap_process;
	eap->isKeyAvailable = eap_leap_isKeyAvailable;
	eap->getKey = eap_leap_getKey;

	ret = eap_peer_method_register(eap);
	if (ret)
		eap_peer_method_free(eap);
	return ret;
}
开发者ID:09sea98,项目名称:rtl8188eu,代码行数:21,代码来源:eap_leap.c


示例8: eap_peer_wps_register

int eap_peer_wps_register(void)
{
#define EAP_VENDOR_ID_WPS	0x0000372a
#define EAP_VENDOR_TYPE_WPS	1

	struct eap_method *eap;
	int ret;

	eap = eap_peer_method_alloc(EAP_PEER_METHOD_INTERFACE_VERSION,
					EAP_VENDOR_ID_WPS, EAP_VENDOR_TYPE_WPS, "WPS");
	if (eap == NULL)
		return -1;

	eap->init = eap_wps_init;
	eap->deinit = eap_wps_deinit;
	eap->process = eap_wps_process;

	ret = eap_peer_method_register(eap);
	if (ret)
		eap_peer_method_free(eap);
	return ret;
}
开发者ID:KHATEEBNSIT,项目名称:AP,代码行数:22,代码来源:intel_eap_wps.c


示例9: eap_peer_pwd_register

int eap_peer_pwd_register(void)
{
	struct eap_method *eap;
	int ret;

	EVP_add_digest(EVP_sha256());
	eap = eap_peer_method_alloc(EAP_PEER_METHOD_INTERFACE_VERSION,
				    EAP_VENDOR_IETF, EAP_TYPE_PWD, "PWD");
	if (eap == NULL)
		return -1;

	eap->init = eap_pwd_init;
	eap->deinit = eap_pwd_deinit;
	eap->process = eap_pwd_process;
	eap->isKeyAvailable = eap_pwd_key_available;
	eap->getKey = eap_pwd_getkey;
	eap->get_emsk = eap_pwd_get_emsk;

	ret = eap_peer_method_register(eap);
	if (ret)
		eap_peer_method_free(eap);
	return ret;
}
开发者ID:0x000000FF,项目名称:wpa_supplicant_for_edison,代码行数:23,代码来源:eap_pwd.c


示例10: eap_peer_pax_register

int eap_peer_pax_register(void)
{
	struct eap_method *eap;
	int ret;

	eap = eap_peer_method_alloc(EAP_PEER_METHOD_INTERFACE_VERSION,
				    EAP_VENDOR_IETF, EAP_TYPE_PAX, "PAX");
	if (eap == NULL)
		return -1;

	eap->init = eap_pax_init;
	eap->deinit = eap_pax_deinit;
	eap->process = eap_pax_process;
	eap->isKeyAvailable = eap_pax_isKeyAvailable;
	eap->getKey = eap_pax_getKey;
	eap->get_emsk = eap_pax_get_emsk;
	eap->getSessionId = eap_pax_get_session_id;

	ret = eap_peer_method_register(eap);
	if (ret)
		eap_peer_method_free(eap);
	return ret;
}
开发者ID:2asoft,项目名称:freebsd,代码行数:23,代码来源:eap_pax.c



注:本文中的eap_peer_method_free函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ eap_peer_method_register函数代码示例发布时间:2022-05-30
下一篇:
C++ eap_msg_alloc函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap