thank you so much !


I will try it !!


--------- 원본 메일 ---------
보낸사람: kk yap <yap...@stanford.edu>
받는사람 : Min-Hyup KANG <kang-min-h...@hanmail.net>
참조 : NOX-dev <nox-dev@noxrepo.org>
날짜: 2011년 7월 22일 금요일, 12시 44분 27초 +0900
제목: Re: [nox-dev] handle_flow_route Event


2011/7/21 Min-Hyup KANG <kang-min-h...@hanmail.net>

Thank you for your great response.

Yes, 

handle_flow_route is existing in lavi_hostflow.cc line 34~60.

and handle_flow_route event call send_flow_list_function.


My main question is "when does handle_flow_route event occur? "


I guess the answer is when there is a flow mod to the host.  You can verify by doing a grep to see which component post the event.

Hope this is useful.

Regards
KK
 

for example handle_req handling JSON event occur, when lavi receive json message from envi.



--------- 원본 메일 ---------
보낸사람: kk yap <yap...@stanford.edu>
받는사람 : Min-Hyup KANG <kang-min-h...@hanmail.net>
참조 : NOX-dev <nox-dev@noxrepo.org>
날짜: 2011년 7월 22일 금요일, 10시 25분 34초 +0900

제목: Re: [nox-dev] handle_flow_route Event
Sorry, I continue to be lost.

if you want to send flows to ENVI, look at lavi_hostflow.cc line 34 to 60 for an example.  Basically, a list of flow is created and the send_flow_list function is called.

Regards
KK

2011/7/21 Min-Hyup KANG <kang-min-h...@hanmail.net>

Yes, sorry for not clearness.


2, "One of the lavi component (though I forgot which one) will listen for that event and send a message to ENVI.  " 

....

....

so, I don't know flow_route_event is run at some point in lavi_hostflow.cc

can you give me some tips ?


thanks,

 

--------- 원본 메일 ---------
보낸사람: kk yap <yap...@stanford.edu>
받는사람 : Min-Hyup KANG <kang-min-h...@hanmail.net>
참조 : NOX-dev <nox-dev@noxrepo.org>
날짜: 2011년 7월 22일 금요일, 09시 36분 46초 +0900, and which one of the lavi com

제목: Re: [nox-dev] handle_flow_route Event
Is there a question in this email?

KK

2011/7/21 Min-Hyup KANG <kang-min-h...@hanmail.net>

Thank you for your response.


1. " You need to include the header file for the definition of the event, then create the event, populate it and post it."

->Basically, there is part of flow_route_event in lavi_hostflow.cc. so I don't have to include the header file, right ?

..... 

register_handler<Flow_route_event>

      (boost::bind(&lavi_hostflow::handle_flow_route, this, _1));

  Disposition lavi_hostflow::handle_flow_route(const Event& e)

.....


2, "One of the lavi component (though I forgot which one) will listen for that event and send a message to ENVI.  "

-> lavi_hostflow inherit lavi_flows, so lavi_hostflow has JSONmsg_event handler.

I think JSONmsg_event handler seems to check type, command, node_type.

if command is request,  send_list->send_flow_list(reply add)

if subscribe , interested.push_back

if unsubscribe, interested.erase,

so, I don't know flow_route_event is run at some point,  

....

 register_handler<JSONMsg_event>

     (boost::bind(&lavi_flows::handle_req, this, _1));


  Disposition lavi_flows::handle_req(const Event& e)

  {

    const JSONMsg_event& jme = assert_cast<const JSONMsg_event&>(e)

....


Thanks,


--------- 원본 메일 ---------
보낸사람: kk yap <yap...@stanford.edu>
받는사람 : Min-Hyup KANG <kang-min-h...@hanmail.net>
참조 : NOX-dev <nox-dev@noxrepo.org>
날짜: 2011년 7월 22일 금요일, 01시 59분 28초 +0900
제목: Re: [nox-dev] handle_flow_route Event

Hi,

This is a standard procedure in NOX.  You need to include the header file for the definition of the event, then create the event, populate it and post it.  One of the lavi component (though I forgot which one) will listen for that event and send a message to ENVI.  Look at lavi_hosts (I think) for an example.

Regards
KK

PS>> Sorry, I did not find time to look up the code before replying. 

2011/7/18 Min-Hyup KANG <kang-min-h...@hanmail.net>

Hi All,


I am currently trying to understand relation between LAVI and ENVI.


especially, I am looking at part of lavi_flow and lavi_hostflow to add and delete on ENVI.


To handle event such as add and delete flows on ENVI,


 I think I should generate Handle_flow_route event in netapps/lavi/lavi_hostflow.cc.


so, how can I generate handle_flow_route event ? or where does it operate the event ?





Best Regards,
Min-Hyup KANG



_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev








Best Regards,
Min-Hyup KANG









Best Regards,
Min-Hyup KANG









Best Regards,
Min-Hyup KANG









Best Regards,
Min-Hyup KANG


_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to