I'm sure I'm missing something easy here, but I need a set of
more experienced eyes to help me with this.
I do not consider my eyes as so much experienced, but it seems to me
to be a simple C/C++ problem.
In Sessions.cc, NetSessions::NextPacket(), there is:
uint32 src_addr = uint32(ip->ip_src.s_addr);
uint32 dst_addr = uint32(ip->ip_dst.s_addr);
uint32 src_port, dst_port;
// grue - print src/dst asap
fprintf(stderr, "src %s dst %s\n", dotted_addr(src_addr),
Here is it: dotted_aadr returns a pointer to the same static buffer.
So you get the result of the second call. However, the function
dotted_addr seems to include two static buffers (someone must have
had the same problem so you probably can try:
fprintf(stderr, "src %s dst %s\n", dotted_addr(src_addr,0),
Where 0/1 selects the buffer (see Net.cc).
Hopefully it helps; I'm not a C++ guru anyway, so maybe I'm completely
wrong and off-topic
Hoping this goes to the list as this is my first attempt to post to it.