contrib/hostapd/hostapd/driver_prism54.c
static void prism54_handle_probe(struct prism54_driver_data *drv,
				 void *buf, size_t len)
{
	struct obj_mlmeex *mlme;
	pimdev_hdr *hdr;
	struct sta_info *sta;
	hdr = (pimdev_hdr *)buf;
	mlme = (struct obj_mlmeex *) &hdr[1];
	sta = ap_get_sta(drv->hapd, (u8 *) &mlme->address[0]);
	if (sta != NULL) {
		if (sta->flags & (WLAN_STA_AUTH | WLAN_STA_ASSOC))
			return;
	}
	if (len < sizeof(*mlme)) {
		printf("bad probe packet\n");
		return;
	}
	mlme->state = htons(DOT11_STATE_AUTHING);
	mlme->code = 0;
	hdr->op = htonl(PIMOP_SET);
	hdr->oid = htonl(DOT11_OID_AUTHENTICATEEX);
	mlme->size = 0;
	send(drv->pim_sock, hdr, sizeof(*hdr)+sizeof(*mlme), 0);
}
/* tell the card to auth the sta */
tell the card to auth the sta
tell the card to auth the sta
static void prism54_handle_probe(struct prism54_driver_data *drv,
				 void *buf, size_t len)
{
	struct obj_mlmeex *mlme;
	pimdev_hdr *hdr;
	struct sta_info *sta;
	hdr = (pimdev_hdr *)buf;
	mlme = (struct obj_mlmeex *) &hdr[1];
	sta = ap_get_sta(drv->hapd, (u8 *) &mlme->address[0]);
	if (sta != NULL) {
		if (sta->flags & (WLAN_STA_AUTH | WLAN_STA_ASSOC))
			return;
	}
	if (len < sizeof(*mlme)) {
		printf("bad probe packet\n");
		return;
	}
	mlme->state = htons(DOT11_STATE_AUTHING);
	mlme->code = 0;
	hdr->op = htonl(PIMOP_SET);
	hdr->oid = htonl(DOT11_OID_AUTHENTICATEEX);
	mlme->size = 0;
	send(drv->pim_sock, hdr, sizeof(*hdr)+sizeof(*mlme), 0);
}
static void prism54_handle_probe ( struct prism54_driver_data * drv , void * buf , size_t len ) { struct obj_mlmeex * mlme ; pimdev_hdr * hdr ; struct sta_info * sta ; hdr = ( pimdev_hdr * ) buf ; mlme = ( struct obj_mlmeex * ) & hdr [ 1 ] ; sta = ap_get_sta ( drv -> hapd , ( u8 * ) & mlme -> address [ 0 ] ) ; if ( sta != NULL ) { if ( sta -> flags & ( WLAN_STA_AUTH | WLAN_STA_ASSOC ) ) return ; } if ( len < sizeof ( * mlme ) ) { printf ( " \n " ) ; return ; } mlme -> state = htons ( DOT11_STATE_AUTHING ) ; mlme -> code = 0 ; hdr -> op = htonl ( PIMOP_SET ) ; hdr -> oid = htonl ( DOT11_OID_AUTHENTICATEEX ) ; mlme -> size = 0 ; send ( drv -> pim_sock , hdr , sizeof ( * hdr ) + sizeof ( * mlme ) , 0 ) ; }
tell the card to auth the sta
tell the card to auth the sta