hostAPd with Openflow

Sadiq Yakasai sadiqtanko
Mon Dec 15 11:20:49 PST 2014


How do you receive the data? If that comes with anything that you can
wait for with select() (or poll/epoll), it should be easy to integrate
with eloop. If it is something else, I'd consider converting it to a
socket operation within the process to make this work cleanly with
eloop.

I think you have solved my problem here! After your suggestion, I researched more about socket operations and found out AF_UNIX socket domain. I think it would work find for transferring my data between the Openflow interface and eloop.

Let me give this a go and find out how it goes.

Thanks again!

Sadiq

> Date: Sun, 14 Dec 2014 17:21:50 +0200
> From: j at w1.fi
> To: hostap at lists.shmoo.com
> Subject: Re: hostAPd with Openflow
> 
> On Fri, Dec 12, 2014 at 08:49:19PM +0000, Sadiq Yakasai wrote:
> > Now, because I am planning on receiving data from an openflow switch, I have a challenge with how the data is relayed to the handler function. These are 2 options I am considering:
> > 
> > 1. When I receive data from the openflow switch (and decapsulate it) - I then pass it directly to the handler function (handle_openflow_data for example) which then passes it on to the wpa_supplicant_event(). But my challenge here is how do I include the eloop_ctx and sock_ctx information? Since I am by-passing eloop altogether to send the data to the driver function that handles the data. I have attempted to not include these pieces of information and the program crashes (expected)!
> 
> How do you receive the data? If that comes with anything that you can
> wait for with select() (or poll/epoll), it should be easy to integrate
> with eloop. If it is something else, I'd consider converting it to a
> socket operation within the process to make this work cleanly with
> eloop.
> 
> > 2. The second option I am considering is to register the callback handler function with eloop_register_read_sock (as normally would be done). When data is received from my openflow switch, I then find a way to make eloop callback the handler function (with eloop_ctx and user_data), just as is the case for normal socket reading. But the challenge here is that the socket table, for readers/writers/exception requires an open socket context information passed across, which i dont have because I am not receiving my data from a socket!
> 
> So where are you receiving it from? It is a bit difficult to comment on
> the best approach without that key point being described in more detail.
> 
> -- 
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20141215/fc8bf706/attachment.htm>



More information about the Hostap mailing list