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
correct tcp header.
I'll try to figure out the problem by myself..but obviously suggestions are
welcome.

Regards

2011/10/12 kk yap <yap...@stanford.edu>

> 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 the short term).  You will find
> that you will diverge from the main distribution and need to fix bugs
> on your own later.
>
> Regards
> KK
>
> On 12 October 2011 02:51, andrea simeoni <andreasimeon...@gmail.com>
> wrote:
> > 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 <yap...@stanford.edu>
> >>
> >> 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 October 2011 12:07, andrea simeoni <andreasimeon...@gmail.com>
> >> wrote:
> >> > 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 take too much time.
> >> >
> >> > Thank you very much
> >> >
> >> >
> >> > 2011/10/11 Murphy McCauley <jam...@nau.edu>
> >> >>
> >> >> 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 such task? Or I
> have
> >> >> > to
> >> >> > take an offset after calling the get_buffer() function from the
> >> >> > event?
> >> >> >
> >> >> > Thank you.
> >> >> > --
> >> >> > Andrea Simeoni
> >> >> > _______________________________________________
> >> >> > nox-dev mailing list
> >> >> > nox-dev@noxrepo.org
> >> >> > http://noxrepo.org/mailman/listinfo/nox-dev
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Andrea Simeoni
> >> >
> >> > _______________________________________________
> >> > nox-dev mailing list
> >> > nox-dev@noxrepo.org
> >> > http://noxrepo.org/mailman/listinfo/nox-dev
> >> >
> >> >
> >
> >
> >
> > --
> > Andrea Simeoni
> >
>



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

Reply via email to