Questions tagged [packets]

Packets refer to network packets. A network packet is a formatted unit of data carried by a packet-switched network.

A network packet is a formatted unit of data carried by a packet-switched network.

A packet consists of control information and user data, which is also known as the payload. Control information provides data for delivering the payload, for example: source and destination network addresses, error detection codes, and sequencing information. Typically, control information is found in packet headers and trailers.

Use this tag for programming questions related to packet creation, packets contents analysis, packet sending and receiving, or other tasks that can be done with network packets.

Source: Wikipedia

372 questions
3
votes
1 answer

How to ensure the whole packet is received

public void read(byte[] bytess) { int davar = this.clientSocket.Receive(bytess); MemoryStream m = new MemoryStream(bytess); BinaryFormatter b = new BinaryFormatter(); m.Position = 0; SPacket information =…
Shay Sandler
  • 111
  • 10
3
votes
2 answers

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…
Rob
  • 7,980
  • 30
  • 75
  • 115
3
votes
3 answers

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…
Rodrigo
  • 31
  • 1
3
votes
1 answer

Python UDP packets never arrive

The last couple of days I spent trying to figure out how to send data back and forth via UDP (I have plans for a simple multiplayer game). So far so good, until I realized it only works fine over LAN but none of the packets ever arrive over…
3
votes
1 answer

how to intercept IP packets on linux

I am trying to achieve this goal on Linux (not sure if it is possible and how if so): I need to write a program to intercept all IP packets on an interface, and deliver this packet to a specific set of user-space programs. By intercept I mean, an IP…
user2975098
  • 115
  • 1
  • 7
3
votes
3 answers

tcpdump and wifi retransmissions

With tcpdump, I am dumping traffic going out of and coming in from a wifi interface. Are wifi retransmissions captured by tcpdump? I am measuring the round-trip time of packets, so knowing this would greatly affect my measurements.
Ricky Robinson
  • 21,798
  • 42
  • 129
  • 185
3
votes
2 answers

Is a UDP packet guaranteed to be complete, practical sense, if delivered?

Is it a well known fact that UDP (User Datagram Protocol) is not secure, because the order of the packets sent with it may not be delivered in order, even at all. However if an UDP packet is delivered. Are the information in that packet in practical…
Fredrik
  • 893
  • 2
  • 10
  • 20
3
votes
1 answer

libipq performance issues

I am making a packet filtering program running on Ubuntu 12.04 which uses libipq as the library for copying packets into userspace. The logic of libipq works fine for me, my issue is that I have noticed a significant performance hit from using…
Olivier Trahan
  • 95
  • 1
  • 1
  • 5
3
votes
3 answers

Are TCP packets reordered usually?

I am reimplementing an old network layer library, but using boost asio this time. Our software is tcpip dialoging with a 3rd party software. Several messages behave very well on both sides, but there is one case I misunderstand: The 3rd party sends…
Stephane Rolland
  • 38,876
  • 35
  • 121
  • 169
3
votes
2 answers

Is it possible to Inject packets into an existing tcp connection using Python?

As the title says, I would like to send data using an existing tcp connection. Said connection has already been established by a 3rd party program. I haven't been able to find much information about this, and it's safe to say I don't know how this…
Aran-Fey
  • 39,665
  • 11
  • 104
  • 149
3
votes
2 answers

Sending packets on a defined Ethernet Interface

I have 2 Ethernet interfaces configured in my Linux Machine. Lets say Interface A and Interface B. I am writing a tcp client socket program and need to send the packets on the defined interface. For example. ./client -intf interface A/B if it the…
Saravana
  • 31
  • 1
  • 6
3
votes
1 answer

Sending data in order with SocketAsyncEventArgs

I originally had a race condition when sending data, the issue was that I was allowing multiple SocketAsyncEventArgs to be used to send data, but the first packet didn't send fully before the 2nd packet, this is because I have it so if the data…
Matty
  • 37
  • 1
  • 8
3
votes
0 answers

How to send Minecraft Server packets from Objective-C

I did take a look at the question Sending Packets to Minecraft Server: Objective-C It could have been related if they used this link here: Protocol - Minecraft Server however, They did not use that. They used the wiki which is mainly for general…
Tyler McMaster
  • 1,407
  • 2
  • 14
  • 15
3
votes
1 answer

Why doesn't the server receive all UDP packets in a local transfer using sockets in C#?

I have a server and a client application where the client sends a bunch of packets to the server. The protocol used is UDP. The client application spawns a new thread to send the packets in a loop. The server application also spwans a new thread to…
rfgamaral
  • 16,546
  • 57
  • 163
  • 275
2
votes
1 answer

SSLStrip not working for me

I am having trouble with SSLStrip in a MITM Setup with Backtrack 5. I am using an external wireless card to broadcast the wireless signal, and routing through an Ethernet. I am successfully viewing the packets in Wireshark, however I would like to…
Suraj Kulkarni
  • 207
  • 3
  • 6