LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Tags used in this thread
Popular LQ Tags , , , ,

Reply
 
Thread Tools
Old 03-23-2009, 12:27 AM   #1
kalps
LQ Newbie
 
Registered: Mar 2009
Posts: 11
Thanked: 0
TCP Reconstruction(C ,libpcap,linux)


[Log in to get rid of this advertisement]
Hello all,

How to reassemble tcp packets of a particular HTTP session? How can I know the number of tcp packets /session? I tried capturing HTTP packets but dint know where to find these details in the packet....


Any help is appreciable..


Thanks in advance
kalps is offline  
Tag This Post
Reply With Quote
Old 03-23-2009, 07:17 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 16,716
Blog Entries: 30
Thanked: 283
Quote:
Originally Posted by kalps View Post
How to reassemble tcp packets of a particular HTTP session?
In Wireshark (formerly ethereal) "follow stream" or whatever it's called these days?
unSpawn is offline     Reply With Quote
Old 03-24-2009, 01:41 AM   #3
kalps
LQ Newbie
 
Registered: Mar 2009
Posts: 11
Thanked: 0

Original Poster
Thanku unspawn.
I have heard about wireshark.I am trying to develop a network analyser tool by myself using libpcap and C. This tcp reconstruction is one feature of it.As such I cant use another tool for this purpose.

Can you help me with some tips of how to use libpcap for reconstruction? I dint get great info on googling this topic.

I basically want to know how to approach this reconstruction..Can anyone help me???
kalps is offline  
Tag This Post , , , ,
Reply With Quote
Old 03-24-2009, 02:06 AM   #4
chakka.lokesh
Member
 
Registered: Mar 2008
Distribution: fedora
Posts: 183
Thanked: 5
try analyzing the sequence and acknowledge numbers.
chakka.lokesh is offline     Reply With Quote
Old 03-25-2009, 08:51 AM   #5
kalps
LQ Newbie
 
Registered: Mar 2009
Posts: 11
Thanked: 0

Original Poster
Thank you Chakka
I see http request as a single packet and http response comes as 2 or more packets(mostly 2). From which i infer dat the response packets 1 an 2.. had the same seq and ack number. Otherwise seq number of packet 1 will be the ack num of packet 2.Am i right.I don know any more to add..


Can you be specific r can u suggest some material for HTTP/TCP reconstruction??
kalps is offline     Reply With Quote
Old 03-26-2009, 12:16 AM   #6
chakka.lokesh
Member
 
Registered: Mar 2008
Distribution: fedora
Posts: 183
Thanked: 5
did u gone through RFC 793 ?
chakka.lokesh is offline     Reply With Quote
Thanked by:

Reply

Bookmarks


Thread Tools

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
how to send a tcp packet using libpcap? kalps Programming 3 05-07-2009 05:53 PM
Reconstruction of TCP Session from Captured IP Packets shreks Linux - Networking 3 11-15-2008 10:08 AM
Manual RAID-5 reconstruction possible? thamlin Linux - Hardware 1 12-29-2006 09:50 AM
Accessing TCP flags in TCP packets on Linux using C !! vishamr2000 Programming 2 10-16-2006 10:46 AM
Linux change TCP kernel Parameter for TCP DELAY ACK TICKS linux_mando Linux - Networking 5 08-22-2006 09:20 AM


All times are GMT -5. The time now is 12:41 PM.

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