packet

.NET Framework for network data packet parsing/assembling?

when programming Tcp/IP program, we often will do data packet assembling and parsing, so is there a framework to make our life easier? I know this is hard to implement. Edit: to clarify: application level packet it may need to talk to c++ application, so .net serialization is not applicable. ...

How should I mark the end of a TCP packet?

In a client/server application were text data of varying length will be sent back and forth between the client and server, how should I mark the end of a packet that is being sent? For example, when the server is receiving packet data from a client how does the server know that the client packet has fully been received? Is it more commo...

Issue reading packets from a pcap file. dpkt module. What gives?

I am running the following test script to try to read packets from a sample .pcap file I have downloaded. It won't seem to run. I have all of the modules, but no examples seem to be running. import socket import dpkt import sys pcapReader = dpkt.pcap.Reader(file("test1.pcap", "rb")) for ts, data in pcapReader: ether = dpkt.etherne...

'module' object has no attribute 'pcapObject'

I have the following sample code which doesn't seem to want to run. import pcap pc = pcap.pcapObject() dev = sys.argv[1] pc.open_live(dev, 1600, 0, 100) pc.setfilter("udp port 53", 0, 0) while 1: pc.dispatch(1, p.pcap_dispatch) I'm really not sure why. I'm using pypcap. I'm running this on both 2.5.1 and 2.6 versions of python (...

What happens after a packet is captured?

Hi all, I've been reading about what happens after packets are captured by NICs, and the more I read, the more I'm confused. Firstly, I've read that traditionally, after a packet is captured by the NIC, it gets copied to a block of memory in the kernel space, then to the user space for whatever application that then works on the packet...

Protocol/Packet Design Questions

I'm looking to a design a protocol for a client-server application and need some links to some resources that may help me. The big part is I'm trying to create my own "packet" format so I can minimize the amount of information being sent. I'm looking for some resources to dissect their protocol, but it seems some completely lack packet ...

Correct usage of socket_select().

What is the correct way to use socket_select within PHP to send and receive data? I have a connection to the server that allows for both TCP & UDP packet connections, I am utilizing both. Within these connections I'm both sending and receiving packets on the same port, but the TCP packet will be sent on one port (29999) and UDP will be ...

Receiving broadcast packets using packet socket

Hello I try to send DHCP RENEW packets to the network and receive the responses. I broadcast the packet and I can see that it's successfully sent using Wireshark. But I have difficulties receiving the responses.I use packet sockets to catch the packets. I can see that there are responses to my RENEW packet using Wireshark, but my functi...

Sending UDP Packet in C#

Hello everybody! I have a game server (WoW). I want my players to download my custom patches to the game. I've done a program that checks for update/downloading things. I want my program to send a packet to my game server if player have all my patches. I dont need any response from the server, it will handle it, but its another story. ...

How can you access the packet information in a JpCap Packet

How can I pull relevant packet information from a JpCap packet? I am trying to find the source/destination ip and port. So far I have tried string parsing the Packet's toString() method, but that seems brutish. ...

PCAP Web Service Usage Logging for Dummies

I've been assigned the task (for work) of working with PCAP for the first time in my life. I've read through the tutorials and have hacked together a real simple capture program which, it turns out, isn't that hard. However, making use of the data is more difficult. My goal is to log incomming and outgoing web service requests. Are t...

How to debug packet loss ?

I wrote a C++ application (running on Linux) that serves an RTP stream of about 400 kbps. To most destinations this works fine, but some destinations expericence packet loss. The problematic destinations seem to have a slower connection in common, but it should be plenty fast enough for the stream I'm sending. Since these destinations a...

Network programming and Packets interactions.

Greeting, This month I will start working on my master thesis. My thesis's subject is about network security. I need to deal with network interfaces and packets. I've used shappcap before to interact with packets but I'm not sure if C# is the most powerful language to deal with network programing and packets. I worked a bit with wire...

how does teamviewer find my computer even if my comp. behind of the firewall and firewall isn't configured?

Did you use teamviewer? (comic question i know... Who doesn't use it?) Do you have any idea how does teamviewer make connection even if i am behind the router, firewall, switch and my local firewall..? I'm trying to imagine a connection that is between remote machinge and my computer. Remote machine is sending the packets (and its head...

Benefits of "Don't Fragment" on TCP Packets?

One of our customers is having trouble submitting data from our application (on their PC) to a server (different geographical location). When sending packets under 1100 bytes everything works fine, but above this we see TCP retransmitting the packet every few seconds and getting no response. The packets we are using for testing are about...

HTTP Data chunks over multiple packets?

What is the correct way for a HTTP server to send data over multiple packets? For example I want to transfer a file, the first packet I send is: HTTP/1.1 200 OK Content-type: application/force-download Content-Type: application/download Content-Type: application/octet-stream Content-Description: File Transfer Content-disposition: attac...

Is there a public / private key encryption scheme that will not change a message's length?

Is there a public / private key encryption scheme that will not change a message's length? I would like to encrypt a message one packet at a time, but if the packet grows, it would no longer just be one packet long. ...

[Android] Datagrampacket to xml

Hi, Im trying to parse a Soap ProbeMatch message with XMLPullParser. I receive this via UDP Multicast. I use the following code to receive it. byte[] buf = new byte[1900]; DatagramPacket packet = new DatagramPacket(buf, buf.length); mSocket.receive(packet); // Damn ugly.... String data = new String(packet.getData()) If i convert th...

How can we avoid packet missing in UDP Flex?

Hi all, I'm trying to send large files using UDP Adobe air to CPP. While transferring large files some packets are missing. How can I retrieve the missing packets data? I'm first of all connecting client(air) with server(cpp) using tcp. After connection establishment I'm starting file transfer. I am planning to get the file missing data ...

Why do we need libnet_do_checksum? HTTP checksum doesnt work

I understood that the tcp checksum calculates automaticly if we write 0 in the function libnet_build_tcp, so why do we need libnet_do_checksum? I have an error, when I am trying to build a new packet. A regulat TCP packet(SYN,ACK) works fine, but an HTTP packet don't work, beacuse a tcp checksum error. Do I have to use libnet_do_checksu...