• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/wpa/src/eap_peer/

Lines Matching defs:method

21 static void eap_peer_method_free(struct eap_method *method);
25 * eap_peer_get_eap_method - Get EAP method based on type number
27 * @method: EAP type number
28 * Returns: Pointer to EAP method or %NULL if not found
30 const struct eap_method * eap_peer_get_eap_method(int vendor, EapType method)
34 if (m->vendor == vendor && m->method == method)
42 * eap_peer_get_type - Get EAP type for the given EAP method name
43 * @name: EAP method name, e.g., TLS
45 * Returns: EAP method type or %EAP_TYPE_NONE if not found
56 return m->method;
65 * eap_get_name - Get EAP method name for the given EAP type
67 * @type: EAP method type
68 * Returns: EAP method name, e.g., TLS, or %NULL if not found
79 if (m->vendor == vendor && m->method == type)
180 * eap_peer_method_load - Load a dynamic EAP method library (shared object)
192 wpa_printf(MSG_ERROR, "EAP: Failed to open dynamic EAP method "
200 wpa_printf(MSG_ERROR, "EAP: Invalid EAP method '%s' - no "
208 wpa_printf(MSG_ERROR, "EAP: Failed to add EAP method '%s' - "
214 * dlclose() when the EAP method is unregistered. */
217 wpa_printf(MSG_DEBUG, "EAP: Loaded dynamic EAP method: '%s'", so);
224 * eap_peer_method_unload - Unload a dynamic EAP method library (shared object)
225 * @method: Pointer to the dynamically loaded EAP method
229 * loaded with eap_peer_method_load(). Before unloading the method, all
230 * references to the method must be removed to make sure that no dereferences
233 int eap_peer_method_unload(struct eap_method *method)
241 if (m == method)
270 * eap_peer_method_alloc - Allocate EAP peer method structure
271 * @version: Version of the EAP peer method interface (set to
274 * @method: EAP type number (EAP_TYPE_*)
275 * @name: Name of the method (e.g., "TLS")
276 * Returns: Allocated EAP method structure or %NULL on failure
282 EapType method, const char *name)
290 eap->method = method;
297 * eap_peer_method_free - Free EAP peer method structure
298 * @method: Method structure allocated with eap_peer_method_alloc()
300 static void eap_peer_method_free(struct eap_method *method)
302 os_free(method);
307 * eap_peer_method_register - Register an EAP peer method
308 * @method: EAP method to register from eap_peer_method_alloc()
309 * Returns: 0 on success, -1 on invalid method, or -2 if a matching EAP method
312 * Each EAP peer method needs to call this function to register itself as a
313 * supported EAP method. The caller must not free the allocated method data
316 int eap_peer_method_register(struct eap_method *method)
320 if (method == NULL || method->name == NULL ||
321 method->version != EAP_PEER_METHOD_INTERFACE_VERSION) {
322 eap_peer_method_free(method);
327 if ((m->vendor == method->vendor &&
328 m->method == method->method) ||
329 os_strcmp(m->name, method->name) == 0) {
330 eap_peer_method_free(method);
337 last->next = method;
339 eap_methods = method;