static void * wired_driver_init(struct hostapd_data *hapd) { struct wired_driver_data *drv; drv = os_zalloc(sizeof(struct wired_driver_data)); if (drv == NULL) { printf("Could not allocate memory for wired driver data\n"); return NULL; } drv->hapd = hapd; drv->use_pae_group_addr = hapd->conf->use_pae_group_addr; if (wired_init_sockets(drv)) { free(drv); return NULL; } return drv; }
static void * wired_driver_hapd_init(struct hostapd_data *hapd, struct wpa_init_params *params) { struct wpa_driver_wired_data *drv; drv = os_zalloc(sizeof(struct wpa_driver_wired_data)); if (drv == NULL) { printf("Could not allocate memory for wired driver data\n"); return NULL; } drv->ctx = hapd; os_strlcpy(drv->ifname, params->ifname, sizeof(drv->ifname)); drv->use_pae_group_addr = params->use_pae_group_addr; if (wired_init_sockets(drv, params->own_addr)) { os_free(drv); return NULL; } return drv; }