I may sound pretty novice but i just want to avoid any silly mistakes. Do these two functions work properly with negative offset ?
Thanks in advance!! asked 13 Aug '12, 04:13 yogeshg |
One Answer:
I believe so, both those functions, and most of the other tvb accessors, take a gint for offset where a negative value indicates bytes from the end of the buffer to start at. answered 13 Aug '12, 04:45 grahamb ♦ |
Okay , so if (tvb,0) points to chunk of address from 10 to 20 then (tvb,-1) will point to 19 rather than 9. Am i getting it correct ?
Say your tvb has 20 bytes in it, then (tvb, -1) will point to offset 19. You can't "step back" into data before the start of the tvb, that will be held in a different tvb owned by the preceding dissector.