Re: [nox-dev] Accessing TCP sequence numbers on packet-in-events

2011-10-12 Thread andrea simeoni
Hi KK, Thank you for the answer. I was able to call the pull_tcp(..) function, on the event buffer. By calling this function I would be able to get a tcp_header structure, or 0 in case something went wrong. And guess what I get from this function :) ? Always 0; even if the event buffer contains a

Re: [nox-dev] Accessing TCP sequence numbers on packet-in-events

2011-10-12 Thread kk yap
Hi Andrea, My suggestion would be for you to overload the Flow struct with your own. In that new struct, you can override how pull_tcp works and have an additional field that stores the seq number. Try not to muck with the main distribution, though it is the convenient thing to do (at least in t

Re: [nox-dev] Accessing TCP sequence numbers on packet-in-events

2011-10-12 Thread andrea simeoni
Hi KK, I think it is exactly want I need to solve my problem. Now the question is: I need to call the static pull_tcp(..) function defined in flow.cc. Well how do I include that file? Maybe it's a stupid question, but I'm not so used to C++. Thank you in advance 2011/10/11 kk yap > Hi Andrea,

Re: [nox-dev] Accessing TCP sequence numbers on packet-in-events

2011-10-11 Thread kk yap
Hi Andrea, In flow.cc, the flow struct is defined and that is used to parse the packet-in content. You can get the seq number for tcp_header which is described in packets.h. It should not be hard to parse this, since the packet is parsed for the various headers already. Regards KK On 11 Octobe

Re: [nox-dev] Accessing TCP sequence numbers on packet-in-events

2011-10-11 Thread andrea simeoni
Hi Murphy, thank you for answering. I' ve already checked in /inet++, and I found the tcp.hh file. At first hand it seems being not useful for my task. Or maybe it is, by I don't know how to make it useful :) I'm right? The file is only few lines of code, so if you have suggestions it would not ta

Re: [nox-dev] Accessing TCP sequence numbers on packet-in-events

2011-10-11 Thread Murphy McCauley
It's not quite as developed as the Python packet library, but take a look in include/netinet++. -- Murphy > Hi guys, > > I'm writing a C++ component that needs to access the TCP sequence number of a > packet upon packet-in-event notification. > Is there an high level function that simplifies s

[nox-dev] Accessing TCP sequence numbers on packet-in-events

2011-10-11 Thread andrea simeoni
Hi guys, I'm writing a C++ component that needs to access the TCP sequence number of a packet upon packet-in-event notification. Is there an high level function that simplifies such task? Or I have to take an offset after calling the get_buffer() function from the event? Thank you. -- Andrea Sim