Re: [nox-dev] Flow collection- error

2011-03-22 Thread kk yap
I should have mentioned that the OpenFlow pack library in NOX does this for you, with the correct byte order. For details, check out: http://noxrepo.org/~yapkke/doc/classvigil_1_1openflow__pack.html http://noxrepo.org/~yapkke/doc/openflow-pack-raw_8hh.html Regards KK On 21 March 2011 13:11, Ric

Re: [nox-dev] Flow collection- error

2011-03-21 Thread Ricardo Bennesby
Hi Paulo and kk! You are right! Problem solved. Thank you very much for your help. Best Regards. 2011/3/21 Paulo César > Hi, Ricardo. > > I solved this problem. > Try to use ntohll() to uint64 and ntohs() to uint32*.* > > Best regards. > *** > * > 2011/3/21 Paulo César > >> Hi, >> >> I am hav

Re: [nox-dev] Flow collection- error

2011-03-21 Thread kk yap
Oops... should have spotted that. Thanks Paulo, that saved me. Regards KK PS>> This email comes 20 sec before I decide to spend a few mins on this. :) On 21 March 2011 12:24, Paulo César wrote: > Hi, Ricardo. > I solved this problem. > Try to use ntohll() to uint64 and ntohs() to uint32. > Be

Re: [nox-dev] Flow collection- error

2011-03-21 Thread Paulo César
Hi, Ricardo. I solved this problem. Try to use ntohll() to uint64 and ntohs() to uint32*.* Best regards. *** * 2011/3/21 Paulo César > Hi, > > I am having the same problem. > Any help? > > Best regards. > > > > 2011/3/20 Ricardo Bennesby > >> Sorry, forgot to paste that... >> fsie is fro

Re: [nox-dev] Flow collection- error

2011-03-21 Thread Paulo César
Hi, I am having the same problem. Any help? Best regards. 2011/3/20 Ricardo Bennesby > Sorry, forgot to paste that... > fsie is from Flow_stats_in event, declared in a handle_flow_stats_in > method (a handler): > > Disposition newcomp::handle_flow_stats_in(const Event& e){ > *c

Re: [nox-dev] Flow collection- error

2011-03-20 Thread Ricardo Bennesby
Sorry, forgot to paste that... fsie is from Flow_stats_in event, declared in a handle_flow_stats_in method (a handler): Disposition newcomp::handle_flow_stats_in(const Event& e){ *const Flow_stats_in_event& fsie* = assert_cast(e); So, fsie.flows has that informations abo

Re: [nox-dev] Flow collection- error

2011-03-20 Thread kk yap
Ricardo, Can you explain which component is fsie as with * fsie.flows.at(i) Regards KK On 20 March 2011 13:11, Ricardo Bennesby wrote: > Thanks kk. > > I think I did what you suggested: > >     uint32_t ds; //duration_sec >     uint64_t pc; //packet_count >     uint16_t pri; //prior

Re: [nox-dev] Flow collection- error

2011-03-20 Thread Ricardo Bennesby
Thanks kk. I think I did what you suggested: *uint32_t ds; //duration_sec uint64_t pc; //packet_count uint16_t pri; //priority uint64_t bc; //byte_count uint16_t len; //legth uint8_t tid; //table_id for(int i=0;i > Hi Ricardo, > > I mean t

Re: [nox-dev] Flow collection- error

2011-03-20 Thread kk yap
Hi Ricardo, I mean the result. Did you run ntoh on them. Regards KK On 20 March 2011 10:50, Ricardo Bennesby wrote: > Hi kk, thanks for quick reply. > > I changed request.match.wildcards = htonl(0x) to: > > request.match.wildcards = htons(0x); -> but it didn't work. Nothing >

Re: [nox-dev] Flow collection- error

2011-03-20 Thread Ricardo Bennesby
Hi kk, thanks for quick reply. I changed * request.match.wildcards = htonl(0x) *to: *request.match.wildcards = htons(0x); -> *but it didn't work. Nothing was printed about the packets* request.match.wildcards = ntohs(0x); -> *the same that happened with htons* request.ma

Re: [nox-dev] Flow collection- error

2011-03-20 Thread kk yap
Hi Ricardo, Did you consider network/host byte order? Regards KK On 20 March 2011 10:01, Ricardo Bennesby wrote: > Hi. > > I am running a C++ component that prints statistics of flows collected in > switches with the flow_stats_in_event. > I am also running the dpctl dump-flows command in minin

[nox-dev] Flow collection- error

2011-03-20 Thread Ricardo Bennesby
Hi. I am running a C++ component that prints statistics of flows collected in switches with the flow_stats_in_event. I am also running the dpctl dump-flows command in mininet to compare the values and they are very different. The request is as follows: *request.table_id = 0xff; reques