packets

Probability of finding TCP packets with the same payload?

I had a discussion with a developer earlier today re identifying TCP packets going out on a particular interface with the same payload. He told me that the probability of finding a TCP packet that has an equal payload (even if the same data is sent out several times) is very low due to the way TCP packets are constructed at system level....

When I send a packet over tcp, it is split into two packets

Hello guys, I am developing an application in C#, using the server-client model, where the server sends a byte array with a bitmap to the client, the client loads it into the screen, sends an "OK" to the server, and the server sends another image, and so on. The length of the image buffer deppends, usually it is between 60kb and 90kb, ...

replace packets of a connection

How to replace a string in packets of a connection? I use Delphi. Thanks in advance Leo ...

Method for making a variable size struct

I need to craft a packet that has a header, a trailer, and a variable length payload field. So far I have been using a vector for the payload so my struct is set up like this: struct a_struct{ hdr a_hdr; vector<unsigned int> a_vector; tr a_tr; }; When I try to access members of the vector I get a seg fault and a sizeof of an entir...

how to send request through web service proxy as a single packet (don't chunk)

Hello, I'm trying to utilize a web service through C#. In the web service documentation it states that the web service only accepts requests as a single packet/stream and not multiple packets. Does anyone know how to change this setting when accessing the web service through a web reference in Visual Studio? I am getting a SOAPExceptio...

Have been cursing over data packets for 36 hours now, please help!!

Ok Here is the problem. I am trying to send through a structure or anything through the apple bluetooth send network packet code. The code to send is below -(void)sendMessagePacket:(GKSession *)session packetID:(int)packetID withData:(void *)data ofLength:(int)length reliable:(BOOL)howtosend { static unsigned char networkPacket[maxPack...

How to split data into equal size packets having variable header size.. .

I am building peer to peer application in python. Its going to work over UDP. I have function called getHeader(packetNo,totalPackets) which returns me the header for that packet.Depending on size of header I am chopping data, attaching data to header and getting same packet size. Header size is not fixed because length consumed by diffe...

New not allocating enough memory?

Well, I'm taking packets straight off the wire and extracting TCP streams from them. In the short, this means stripping off the various headers (eg, eth->IP->TCP->stream data). In the function that is called when I've finally gotten through all the headers, I am experiencing a strange error. /*Meta is a pointer to the IP heade...

C# Getting packet data

Hi, I've been trying to write a script that will sniff HTTP headers. So far I've got the socket bound to port 80 and packets seem to be received, but I can't get them into string form. All that outputs is "E" continuously. I changed the bytes into hex earlier and there seems to be some data coming in, but the current code is unable to c...

Decoding tcp packets using python

Hello I am trying to decode data received over a tcp connection. The packets are small, no more than 100 bytes. However when there is a lot of them I receive some of the the packets joined together. Is there a way to prevent this. I am using python I have tried to separate the packets, my source is below. The packets start with STX byt...

How can I capture and print packets from the internet on Windows?

How can I capture them? Is there any module/lib to do it? Please if it do, post an example ...

How to gain greater control of network packets on Android

I'm looking to design an application that will require some deep control over IP packets. Looking over the reference guide on the developers site at Android I see very limited control over packets from java.net:SocketOptions and java.net:DatagramPacket. Specifically I'm looking to control the individual bits within the packet to set TCP ...

How to implement a bidirectional "mailbox service" over tcp?

The idea is to allow to peer processes to exchange messages (packets) over tcp as much asynchronously as possible. The way I'd like it to work is each process to have an outbox and an inbox. The send operation is just a push on the outbox. The receive operation is just a pop on the inbox. Underlying protocol would take care of the commu...

What happens with TCP packets between two Socket.BeginReceive calls?

I have a doubt about socket programming. I am developing a TCP packet sniffer. I am using Socket.BeginAccept, Socket.BeginReceive to capture every packet, but when a packet is received I have to process something. It is a fast operation, but would take some milliseconds, and then call BeginReceive again. My question is, what would happ...

how to send data to server with the same TCP connection using ajax or JS trick

Hi, I know how to keep a connection indifinetely open server side to stream continuously data to javascript. BUT I do not know how to send data reusing the same TCP from browser to server. so there is not the 3 way handshake and only 2 tcp packets. I know it is possible but I do not how to do it : use xmlhttprequest? or script tag ajax ...

Is it possible to craft your own packets with python?

Well, I know its possible, using external libraries and modules such as scapy. But how about without external modules? Without running the script as root? No external dependencies? I've been doing a lot of googling, but haven't found much help. I'd like to be able to create my own packets, but without running as root, or installing extr...

Timeline control in C#

Hi, I am implementing a packet analyzer in C#. I need a timeline control which would display the packets on a line, and they would be selectable. Something like this. Are there ready made controls like this in C#? Thanks. ...

Sending recorded packets

Hello, is there a library or a class that would allow me to record on going packets from my computer (which is done on tools such as ETHEREAL[WIRESHARK] & WPE PRO(if you happen to be a gamer). To then resend it on a loop. I'm trying to make a service that would interact with my router on a timely basis. Thanks ;). ...

Broadcast a UDP message in LAN with fake source IP with delphi

hi.. I want to broadcast a UDP message in my LAN with fake source IP ( spoofing ) 1. Do winpcap able to do this ? 2. Do this work on winxp, win7 ? 3. i'm using delphi, is there any good components available ? Thanks. ...

Why aren't all packets sent to the client?

I'm writing a simple proxy (more a packet logger) for an online game in C#. All the packets get received by the proxy but some aren't sent to the client (not sure about the server). For example: Client->Server: Login Packet - My proxy receives the packet, displays it and sends it to the server. Server->Client: Connected! Packet - My pr...