Lines Matching refs:method
2 * EAP peer: Method registration
29 * eap_sm_get_eap_methods - Get EAP method based on type number
31 * @method: EAP type number
32 * Returns: Pointer to EAP method or %NULL if not found
34 const struct eap_method * eap_sm_get_eap_methods(int vendor, EapType method)
38 if (m->vendor == vendor && m->method == method)
46 * eap_get_type - Get EAP type for the given EAP method name
47 * @name: EAP method name, e.g., TLS
49 * Returns: EAP method type or %EAP_TYPE_NONE if not found
60 return m->method;
69 * eap_get_name - Get EAP method name for the given EAP type
71 * @type: EAP method type
72 * Returns: EAP method name, e.g., TLS, or %NULL if not found
81 if (m->vendor == vendor && m->method == type)
182 * eap_peer_method_load - Load a dynamic EAP method library (shared object)
194 wpa_printf(MSG_ERROR, "EAP: Failed to open dynamic EAP method "
202 wpa_printf(MSG_ERROR, "EAP: Invalid EAP method '%s' - no "
210 wpa_printf(MSG_ERROR, "EAP: Failed to add EAP method '%s' - "
216 * dlclose() when the EAP method is unregistered. */
219 wpa_printf(MSG_DEBUG, "EAP: Loaded dynamic EAP method: '%s'", so);
226 * eap_peer_method_unload - Unload a dynamic EAP method library (shared object)
227 * @method: Pointer to the dynamically loaded EAP method
231 * loaded with eap_peer_method_load(). Before unloading the method, all
232 * references to the method must be removed to make sure that no dereferences
235 int eap_peer_method_unload(struct eap_method *method)
243 if (m == method)
272 * eap_peer_method_alloc - Allocate EAP peer method structure
273 * @version: Version of the EAP peer method interface (set to
276 * @method: EAP type number (EAP_TYPE_*)
277 * @name: Name of the method (e.g., "TLS")
278 * Returns: Allocated EAP method structure or %NULL on failure
284 EapType method, const char *name)
292 eap->method = method;
299 * eap_peer_method_free - Free EAP peer method structure
300 * @method: Method structure allocated with eap_peer_method_alloc()
302 void eap_peer_method_free(struct eap_method *method)
304 os_free(method);
309 * eap_peer_method_register - Register an EAP peer method
310 * @method: EAP method to register
311 * Returns: 0 on success, -1 on invalid method, or -2 if a matching EAP method
314 * Each EAP peer method needs to call this function to register itself as a
315 * supported EAP method.
317 int eap_peer_method_register(struct eap_method *method)
321 if (method == NULL || method->name == NULL ||
322 method->version != EAP_PEER_METHOD_INTERFACE_VERSION)
326 if ((m->vendor == method->vendor &&
327 m->method == method->method) ||
328 os_strcmp(m->name, method->name) == 0)
334 last->next = method;
336 eap_methods = method;