if pcap uses the 32-bit libraries, you'll need glibc 32 bit, etc.
- Original Message -
From: "Chris Davies"
To:
Sent: Thursday, July 16, 2009 4:13 AM
Subject: [tcpdump-workers] Libpcap
Trying to get libpacp to work in 32 bit mode on 64 bit machines.
I have a program that uses li
Is there a way to specify 1 out of every N packets sampling using an
existing filter combination?
short term, dirty hack:
For the function that you use to loop, just keep a static counter.
when you hit 10, set it to 0 and start over or what ever.
Thanks,
Tyler Littlefield
Web: tysdomain.com
you are able to send packets to eth0, set the ip address to 127.0.0.1
Hope that's what your asking.
- Original Message -
From: "Oliver Zheng"
To:
Sent: Sunday, February 22, 2009 3:04 PM
Subject: [tcpdump-workers] Sending a packet to localhost?
Hi,
Is it possible to send a packet to
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 tcp packet, thi
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
here I'm going wrong.
Thanks,
Tyler Littlefield
//code:
//main.cpp:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "packet.h"
using namespace std;
//function prototypes:
void PrintErr(const char* message);
size=sizeof(ether_hdr)+ipsize;
cout << packsize << endl;
tcp_hdr *tcp=(tcp_hdr*)(packet+packsize);
cout << "Source port: " << tcp->th_sport << "\t\tDestination port: " <<
tcp->th_dport << "." << endl;
}
Thanks,
Tyler Littlefield
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.
col: unknown." << endl;
return;
break;
}
int packsize=0;
int ipsize=((IP_HL(recv))*4);
packsize=sizeof(ether_hdr)+ipsize;
cout << packsize << endl;
tcp_hdr *tcp=(tcp_hdr*)(packet+packsize);
cout << "Source port: " << tcp->th_sport << "\t\tDestinat
;< endl;
//now we determine the protocol:
switch(recv->ip_p)
{
case IPPROTO_TCP:
cout << "Protocol: TCP." << endl;
break;
default:
cout << "Protocol: unknown." << endl;
return;
break;
}
int packsize=0;
int ipsize=sizeof(*recv);
packsize=sizeof(tcp_hdr)+ips