packet

Do you require deep packet inspection on a server-only firewall?

I have a server behind a firewall. It runs a web application (Java servlets under Apache Tomcat) and responds only to port 443 (HTTPS). There is no scripting code in the pages served - the forms use HTTP POST to receive the form, process the data (with appropriate input filtering) and then output an HTTP result page. I am currently usin...

Is there a Windows tool for capture and playback of modified UDP packets?

I'm looking for a tool (or a set of tools) for Windows that will perform the following: Capture UDP packets from a specific network interface to a file. Play a stream of packets from a file through a network interface. In addition to 2: replay the original packets to a different host than the original one. I've already got 1 and 2, b...

Packet data structure?

Hello, I'm designing a game server and I have never done anything like this before. I was just wondering what a good structure for a packet would be data-wise? I am using TCP if it matters. Here's an example, and what I was considering using as of now: (each value in brackets is a byte) [Packet length][Action ID][Number of Parameters]...

Compression algorithm for JSON encoded packets?

Hi I was just wondering what would be the best compression algorithm to use to compress packets before sending them over the wire? The packets are encoded using JSON. Would LZW be a good one for this or is there something better? ...

How to get data out of network packet data in Java

In C if you have a certain type of packet, what you generally do is define some struct and cast the char * into a pointer to the struct. After this you have direct programmatic access to all data fields in the network packet. Like so : struct rdp_header { int version; char serverId[20]; }; When you get a network packet you can do ...

Python/Twisted - TCP packet fragmentation?

Hello, In Twisted when implementing the dataReceived method, there doesn't seem to be any examples which refer to packets being fragmented. In every other language this is something you manually implement, so I was just wondering if this is done for you in twisted already or what? If so, do I need to prefix my packets with a length head...

libnet that properly calculates checksum on IPV6

I have recently started playing around with libnet and using it to generate IPV6 packets. I am very new at programming, however, I am quite happy with the library. I have one problem with it though. It seems that libnet currently does not have the ability to properly calculate checksums on IPV6 packets. Being so new to programming,...

python: how to send packets in multi thread and then the thread kill itself

Hi, I have a question. I'd like to send a continuous streams of byte to some host for certain amount of time (let's say 1 minute) using python. Here is my code so far: #! /usr/bin/env python import socket import thread import time IP = "192.168.0.2" PADDING = "a" * 1000 #assu...

creating a UDP packet I can split.

I'm building a simple udp lan chat application in vb.net and I'm wondering how I should split my packets. Each sent packet should have like an id, a username and ip address from where it's coming and maybe also a command part for like join or leave to update my userlist and a text message. I'd like to know what is the easiest way to put...

Configuring sockets to use small packets in Java

I am processing time critical messages which are routed to me via a very slow network connection. I am connecting to the originating server (which I have no control over) with a Java TCP/IP Socket. The data is of varying length but is usually around 5000bytes and so ends up getting broken into multiple packets of roughly 1400 bytes. ...

First packet to be sent when starting to browse

Imagine a user sitting at an Ethernet-connected PC. He has a browser open. He types "www.google.com" in the address bar and hits enter. Now tell me what the first packet to appear on the Ethernet is. I found this question here: http://stackoverflow.com/questions/177197/interview-questions-on-socket-programming-and-multi-threading As I...

How to make use of full bandwidth?

Using WinPcap I crafted a series of custom UDP packets and injected them into the Ethernet layer. I sent 1000 packets, 1440 bytes each. It takes 2.1 sec for 100 Mbps bandwidth. How do I make use of full bandwidth? ...

Why doesn't the handle_read method get called with asyncore?

I am trying to proto-type send/recv via a packet socket using the asyncore dispatcher (code below). Although my handle_write method gets called promptly, the handle_read method doesn't seem to get invoked. The loop() does call the readable method every so often, but I am not able to receive anything. I know there are packets received on ...

How to use pcap_sendqueue_queue() in winpcap library?

Hi, I used pcap_sendPacket() to send raw UDP packet which i crafted manually. i want to increase the performance of my code by reducing the context switches. But i got the sample code about pcap_sendqueue_queue() function it sends variable number of packets in a time.but it reads read from the already dumped .pcap file and .cap fi...

When will a TCP network packet be fragmented at the application layer?

When will a TCP packet be fragmented at the application layer? When a TCP packet is sent from an application, will the recipient at the application layer ever receive the packet in two or more packets? If so, what conditions cause the packet to be divided. It seems like a packet won't be fragmented until it reaches the Ethernet (at th...

[JAVA] how to send multiple data in 1 single UDP datagram?

hi all, i'm working on a network programming assignment about writing a simple IM system (pretty much like the simplest version of windows messenger). the spec specifies that i must send over 4 fields of data in a single datagram packet, those are: To From Type Message where type refers to message type, implemented as a user defined enu...

Average internet delay

Just wondering, what is the average packet transmission delay between two hosts over the internet (ignoring packet loss and retransmission). Now, hang a second before you write that it's too genenral and depends on too many factors (Location of the two hosts, network workload at a specific time, just to name a few), i'm aware of that. Y...

How to resist MITM and replay attacks when sending encrypted data?

Assuming I've securely exchanged keys with another computer (using Diffie-Hellman perhaps), here's my tentative solution: packet number + encrypted data + message authentication code (MAC) The packet number is an incrementally-increased number starting at 0. After that is the encrypted data itself, followed by a MAC of them both. If so...

What does BGP Path Attribute Type 18 refer to?

Does anyone know what Path Attribute Type 18 refers to and how to parse it? The best I can understand is that it is a new AGGREGATOR (type 7) and I'm assuming that it's reading the new AS32 format, but that's not cutting it because I can't parse this packet. Is there an RFC that describes how this works...is it something special that C...

replace packets of a connection

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