[strongSwan-dev] How to porting my own eap peer related codes from 4.4.0 to be 4.6.4

LIU Jingen Jingen.Liu at alcatel-sbell.com.cn
Wed Mar 13 11:22:25 CET 2013


Hello,

Can anyone help me on this? I don't want to waste too much time on this, so I send out the question, if you know it, please tell me.

// Codes for strongswan 4.4.0 added by myself.
plugin_t *eap_femto_DS2460B_plugin_create()
{
	eap_femto_Ds2460b_plugin_t *this = malloc_thing(eap_femto_Ds2460b_plugin_t);

	this->plugin.destroy = (void(*)(plugin_t*))destroy;
	charon->eap->add_method(charon->eap, EAP_FEMTO_EXP_VENDORTYPE, EAP_FEMTO_EXP_VENDORID, EAP_PEER,(eap_constructor_t)eap_femto_Ds2460_peer_create);
	return &this->plugin;
}


// Currently, I need port above codes from strongswan 4.4.0 to strongswan 4.6.4, I think I should write codes as below,
// Question 1: but I don't know how to deal with EAP_FEMTO_EXP_VENDORID, please help to give example codes if you know this.

METHOD(plugin_t, get_features, int,
	eap_femto_DS2460B_plugin_t *this, plugin_feature_t *features[])
{
	static plugin_feature_t f[] = {
		PLUGIN_CALLBACK(eap_method_register, eap_femto_DS2460B_create_peer),
			PLUGIN_PROVIDE(EAP_PEER, EAP_FEMTO_EXP_VENDORTYPE),   // Question 2: Should it be PLUGIN_PROVIDE(EAP_PEER, EAP_FEMTO_EXP_VENDORTYPE,EAP_FEMTO_EXP_VENDORID)?
	};
	*features = f;
	return countof(f);
}



Best regards
Jingen, Liu
------------
Alcatel-Lucent Shanghai Bell Co.,Ltd. WSPD NanJing R&D Center.
Floor 10, Changjiang Technological Park, No.40, Nanchang Road, GuLou District.
End of Dev Digest, Vol 38, Issue 7
**********************************




More information about the Dev mailing list