Re: [tcpdump-workers] Libpcap

2009-07-16 Thread Tyler Littlefield
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

Re: [tcpdump-workers] Question regarding libpcap filters and sflow, how to filter 1 out of every N packets.

2009-04-06 Thread Tyler Littlefield
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

Re: [tcpdump-workers] Sending a packet to localhost?

2009-02-22 Thread Tyler Littlefield
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

Re: [tcpdump-workers] help with packet tracer

2009-02-19 Thread Tyler Littlefield
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

Re: [tcpdump-workers] help with packet tracer

2009-02-19 Thread Tyler Littlefield
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

[tcpdump-workers] help with packet tracer

2009-02-18 Thread Tyler Littlefield
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);

[tcpdump-workers] more tcp packet issues(?)

2009-02-09 Thread Tyler Littlefield
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.

Re: [tcpdump-workers] a problem with some code

2009-02-06 Thread Tyler Littlefield
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

[tcpdump-workers] a problem with some code

2009-02-05 Thread Tyler Littlefield
;< 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