Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-26-2004, 01:08 AM   #1
LQ Newbie
Registered: Apr 2004
Posts: 13

Rep: Reputation: 0
So weird!!!

destaddr.sin_addr.s_addr=;destport:300(Just for example)

when I use:
printf("src:%s: port%d--->dst:%s: port%d",
It output like this:
src: port200--->dst: port200(why the same?)

but when I use:
printf("src:%s: port%d--->",
printf("dst:%s: port%d ",
It output like this:
src: port200--->dst: port300(It's right!!!)
got any ideas???

and how can I catch the time when I capture the packet???
Btw,I didn't use libpcap,I use socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)),the packet it capture contain no timestamp,how should I do?

Last edited by docterling; 05-26-2004 at 08:26 AM.
Old 05-26-2004, 08:27 AM   #2
LQ Newbie
Registered: Apr 2004
Posts: 13

Original Poster
Rep: Reputation: 0
no one know?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
weird, weird problems with logitech precision USB gamepad ikataii Linux - Hardware 4 10-14-2005 04:31 AM
Weird Wish :D ekinox Linux - Networking 1 04-12-2005 12:30 PM
HP Photosmart weird weird weird.... Vlad_M Linux - General 5 02-20-2005 05:41 AM
Weird, weird apache2 problem atheist Debian 1 09-17-2004 08:26 PM
Weird Bigun Linux - Software 2 09-22-2002 02:04 AM

All times are GMT -5. The time now is 02:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration