packet

What libraries are available for Java that parse IP header bytes?

On my project, we have been writing our own IP header parsing code for some time now. I'm starting to wonder if our time could be spent better elsewhere. A google search has not yielded much of use. Basically, what I am looking for is a third party library that will be able to parse out all of the meaningful information out of a IP pack...

Protocol Terminology: Message versus Packet

In practice, what is the most appropriate term for the communications transmitted over a network in higher level protocols (those above TCP/IP, for example)? Specifically, I am referring to small, binary units of data. I have seen both "message" and "packet" referred to in various client/server libraries, but I was interested in the com...

How to set the don't fragment (DF) flag on a socket?

I am trying to set the DF (don't fragment flag) for sending packets using UDP. Looking at the Richard Steven's book Volume 1 Unix Network Programming; The Sockets Networking API, I am unable to find how to set this. I suspect that I would do it with setsockopt() but can't find it in the table on page 193. Please suggest how this is do...

how to capture swf packet(???)

hi, I have a swf that retrive information from a xml file, but I do not know url of the xml. Is it possible to capture tcp/ip packet when swf start retriving information from the xml? I would like to know url of the xml. ...

Ping from Dynamic Language without using 'ping'

I'm on a Linux system where I am not allowed to use the 'ping' application (ping: icmp open socket: Operation not permitted). However, the script that I am writing (PHP, but I can use an exec() call to any script/program if needed) needs to determine if a host is 'alive'. How can I go about this without using 'ping'? ...

Sample read/write handling of packets in C

I'm a bit new to C, but I've done my homework (some tutorials, books, etc.) and I need to program a simple server to handle requests from clients and interact with a db. I've gone through Beej's Guide to Network programming, but I'm a bit unsure how to piece together and handle different parts of the data getting sent back and forth. Fo...

how to find the packet loss in Wireshark?

Hi, i need to test packetloss for FTP application. i used wireshark packet sniffer and I got TCP Stream. Help me how to find the packet loss using Wireshark. Thanks in advance, krishna ...

Free tools for local HTTP packet sniffing/intercepting?

I'm currently using HTTP Analyzer V5 trial version which expires very soon. Are there any [good] free tools for sniffing and inspecting the contents of HTTP packets, in a similar way to the above mentioned tool? ...

What does a working example of dealing with packet fragmentation in C# look like when using the Begin* End* method?

After enough playing with asynchronous socket programming I noticed that the server was receiving chunked payloads (ie: more than one complete payload sitting in the same buffer). So I came up with the following: if (bytes_to_read > 0) { while (bytes_to_read > 0) // Get payload size as int. // Get payload in byte f...

C# Async socket problem

Hi everyone, I'm having a weird problem with my code, at the moment everything works fine, except the sending part. Whenever I try to send a packet it actually sends many empty packets, and I can't find out why, I've checked with the debugger and the SendPacket function is being called only once. Thanks to everyone! ...

How to listen for broadcast packets on any port?

Using .NET, how can I listen to udp broadcast packets sent to .255 on any port without the need of binding to a specific port? ...

Drop packet with libpcap

Is it possible to have libpcap remove a packet instead of just sniff it as it passes through? I'm wanting to intercept each packet and encapsulate it into a new packet along with measurement data, but both packets (mine and the original) both reach the destination. Many thanks ...

CPP to Java conversion

Here's my scenario. I have an application written in C++ but not the complete source but the "meat" of it is there. I also have a compiled exe of this application. It communicates to a server somewhere here on our network. I am trying to replicate the C++ code in java, however it uses dwords and memory references, sizeof etc, all thi...

translate mainframe data packet to an XML packet in .net

is there a way to translate mainframe data packet Format(Flat Files,CVS) to an XML/NIEM Format in .net? or any suggestions would be appreciated Thanks ...

PHP How To Send Raw HTTP Packet

I want to send a raw http packet to a webserver and recieve its response but i cant find out a way to do it. im inexperianced with sockets and every link i find uses sockets to send udp packets. any help would be great. ...

How can I send network packets with Perl?

I'm trying to send a packet via Perl, I sniffed the traffic of the packet I want to send and the packet from wireshark is: 0000 00 19 e0 98 17 e8 00 1a 92 41 32 13 08 00 45 00 ........ .A2...E. 0010 00 a7 03 56 40 00 80 06 7f 5d c0 a8 01 64 5e 67 ...V@... .]...d^g 0020 57 2a ea a8 08 be 41 03 2a a1 5e 12 bf 5f 50 18 W*....A....

HTTP packet reconstruction

If I have a large HTTP packet which has been split up into a number of TCP packets, how can I reconstruct them back into a single HTTP packet? Basically, where in the packet do I look to tell when a HTTP packet is starting/ending? I can't seem to see any flags/fields in the TCP header that denote the start or end of the HTTP packet. ...

Linux's Windows Filtering Platform equivalent?

Hi, More than once I picked myself wanting to have an easy way to edit packets on-the-fly in my LAN, so I thought it was time for me to make some "machinery" to do the job. I think WFP would do exactly what I needed. Not only I wanted to filter and edit packets off the computer my program would be running, but I would also like to ARP ...

iPhone and WireShark

How can I sniff packets from my iPhone on my network? can someone give me some instructions? I tried Googling, but nothing teaches how to sniff iPhone packets、 I am on windows. ...

How does NetworkStream work in two directions?

I've read an example of a Tcp Echo Server and some things are unclear to me. TcpClient client = null; NetworkStream netStream = null; try { client = listener.AcceptTcpClient(); netStream = client.GetStream(); int totalBytesEchoed = 0; while ((bytesRcvd = netStream.Read(rcvBuffer, 0, rcvBuffer.Length)) > 0) { netStream.Wri...