I believe you are looking for do_recv_openflow in src/lib/openflow.cc
On Jan 19, 2009, at 9:00 PM, Ye Deng wrote:
Hi all,
I am wondering where is the framing code for the OpenFlow protocol.
I mean the OpenFlow talks to NOX through a reliable byte stream
channel (e.i. TCP or SSL).
So, there must be a model to buffer the received bytes from a
OpenFlow Switch, and returns a completed OpenFlow message when it
has received enough bytes.
Please see the comments, [1] [2], I added into the source code below:
in the file "noxcore/src/builtin":
bool
Conn::do_poll()
{
int error;
std::auto_ptr<Buffer> b(oconn->recv_openflow(error, false));
switch (error) {
case 0: {
datapathid dp_id = oconn->get_datapath_id();
// [2]
std::auto_ptr<Event> event(openflow_packet_to_event(dp_id,
b));
if (event.get()) {
event_dispatcher.dispatch(*event);
}
return true;
}
... ...
}
_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org