register for cb to set switch port state

Jouni Malinen j at w1.fi
Wed Sep 23 13:29:38 EDT 2015


On Wed, Sep 23, 2015 at 11:02:22AM -0400, Preyas Kamath wrote:
> I want to use the hostapd code to run on a ARM based processor to control a
> switch to authenticate ports. This will be a wired configuration. The ARM
> talks to the switch using serial bus(SMI). I have hostpad talking to Radius
> server and listening for EAPOL messages. It seems like hosapd has callbacks
> to handle enable/disabling of switch ports. In my case enabling/disabling
> of switch ports will be function calls made by the processor. Where are
> these callbacks registered in the hostpad code?

The hapd->sta_authorized_cb() is used only by wpa_supplicant when using
that shared functionality from hostapd to control AP mode operations.
For the type of used you describe here, it might make most sense to
extend the src/drivers/driver_*.c wrapper that you use to implement the
sta_set_flags() callback. It will be called to either add or remove the
WPA_STA_AUTHORIZED flag based on EAPOL port authorization state changes.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list