thanks, that was it, I think.
Does this need to be used for the ID and that too?
- Original Message -
From: "Gisle Vanem"
To:
Sent: Thursday, February 19, 2009 6:38 AM
Subject: Re: [tcpdump-workers] help with packet tracer
the size of the Ip works, but when I get the
the size of the Ip works, but when I get the tcp packet, things don't work
as planned--it gives invalid ports.
I see:
tcp = (tcp_hdr *) ((packet + sizeof (ether_hdr)) + ip_size);
cout << "Source port: " << tcp->th_sport << "\t\tDestination port: " << tcp->th_dport <<
"." << endl;
You forgot
the size of the Ip works, but when I get the tcp packet, things don't work
as planned--it gives invalid ports.
- Original Message -
From: "Gisle Vanem"
To:
Sent: Thursday, February 19, 2009 1:29 AM
Subject: Re: [tcpdump-workers] help with packet tracer
"Tyler
"Tyler Littlefield" wrote:
I rewrote my callback function to work a bit differently, but it's still giving
me weird sizes.
What do you mean exactly?
in capt_h():
ip_hdr* ip=(ip_hdr*)(packet+sizeof(ether_hdr));
cout << "From: " << inet_ntoa(ip->ip_src) << "\t\t" << "to: " << inet_ntoa(ip->
Hello list,
I'm still working on this for college.
I rewrote my callback function to work a bit differently, but it's still giving
me weird sizes.
If someone would check this out, I'd really really appriciate it.
I don't want you to tell me exactly how to fix it, just where I'm going wrong.
Thanks