Questions tagged [packet]

A packet is one unit of binary data capable of being routed through a computer network.

This is a small amount of computer data sent over a network. Any time you receive data from the Internet, it comes to your computer in the form of many little packets.

Each packet contains:

  • A label which uniquely identifies it
  • The IP address of its origin and destination
  • A sequence number (for sorting)
  • A checksum (for error checking

The process of sending and receiving packets is known as "packet-switching." Packets from many different locations can be sent on the same lines and be sorted and directed to different routes by various computers along the way, the packets are then sorted by their sequence number once they reach their destination. It works a lot like the post office, except billions of packets are transferred each day, and most packets take less than a few seconds to reach their destination. Even FedEx same-day delivery can't compete with that.

Packet Definition. 2013. Packet Definition. [ONLINE] Available at: http://www.techterms.com/definition/packet. [Accessed 30 April 2013].

1562 questions
6
votes
3 answers

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.
Ozzy
  • 10,285
  • 26
  • 94
  • 138
6
votes
4 answers

Maximum value of TCP sequence number

I'm trying to capture packets and reorganize packets for obtaining original HTTP request. I'm capturing packets by IPQUEUE(by iptables rule), and I figured out that packets are not captured in order. I already know that in TCP protocol, packets have…
Wonjae Lee
  • 111
  • 1
  • 1
  • 8
6
votes
2 answers

Is it possible to use just 1 UDPSocket for sending/receiving on the same port?

I'm trying to send a DatagramPacket, and then must wait for an Acknowlegment from sever, so that I know if I have to resend the same packet or send the next one.. I'm using for that the same socket on the client, to send the datapacket and to…
ZelelB
  • 1,836
  • 7
  • 45
  • 71
6
votes
3 answers

How can the "packet" option of socket in Erlang accelerate the tcp transmission so much?

It takes only 8 seconds to transfer 1G data through two different ports on localhost using {packet,4}, while the same task can't be finished within 30 seconds using {packet,raw}. I know if use the latter method, the data will arrive in tens of…
wizawu
  • 1,881
  • 21
  • 33
6
votes
2 answers

Capture packets for certain process or package on Android

Can I capture packets for certain process or package on Android or even through adb?
dpro
  • 83
  • 1
  • 1
  • 3
6
votes
3 answers

size of ICMP type 11 packet payload

What's the size of the ICMP packet payload when the type is 11, i.e. time exceeded? Since it contains an IP header and the first 8 Bytes of the IP packet payload generating the ICMP message, I thought its size was 20 + 8 = 28. I'm replaying some…
Ricky Robinson
  • 21,798
  • 42
  • 129
  • 185
6
votes
1 answer

not getting all ICMP time-exceeded messages: why?

I'm using Scapy to replay some dumped packets in which I change the TTL value. I've been getting very odd results even with TTL=1. When I run my test hours apart from each other, I can get from roughly 40% to 95% of packets replied to with an…
Ricky Robinson
  • 21,798
  • 42
  • 129
  • 185
5
votes
3 answers

Packet Level networking in Android

I know how to develop in Android and use the Apache HTTP lib, but I want to go lower, get hold of the wireless interface adapter and be able to send & receive packets wirelessly. I know its possible since there are sniffer apps in the android…
Rushil Paul
  • 2,010
  • 4
  • 26
  • 39
5
votes
1 answer

How to read a FSM diagram

How do I take this diagram and translate it into a useable program. I'm not really sure how to read this diagram. Walk me through it, maybe show an example of code and how it relates to the diagram.
Matt
  • 7,049
  • 7
  • 50
  • 77
5
votes
2 answers

How can I parse an ethernet packet using libpcap?

I'm using libpcap in C++ for reading packets from pcap files, e.g.: rc = pcap_next_ex((pcap_t*)handle, &header, (const unsigned char**)packet); I would like to parse the packets header (without the payload). For example, how can I parse a given…
user515766
  • 349
  • 2
  • 5
  • 7
5
votes
7 answers

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

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 …
user69790
  • 71
  • 1
  • 3
5
votes
2 answers

Sending UDP packets over the Internet

I'm trying to learn some of the ins and outs of P2P/decentralized networks. My question is the following. Say I have two machines named comp1 and comp2. Now comp1 is setup on my home network behind a router, and comp2 is located in my office at…
cskwrd
  • 2,803
  • 8
  • 38
  • 51
5
votes
1 answer

Efficiently convert Foreign.Ptr Word8 (or ByteString) to UArray Int Word8

I'm doing some Network capture with Network.Pcap (pcap) and plan to do some inspection using Net.PacketParsing (network-house). To do so, it looks like i have to put my packet parsing in either Pcap.Callback :: PktHdr -> Ptr Word8 -> IO () or…
trevor cook
  • 1,531
  • 8
  • 22
5
votes
0 answers

Raw socket UDP programming

I am looking for a way of sending packets using the go language which grants me the ability to view and set the TTL and other low level fields of packets(I don't need to modify Ethernet headers just IP & UDP headers). I have attempted to craft and…
Brash Man
  • 81
  • 4
5
votes
6 answers

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…
christopher
  • 1,061
  • 2
  • 8
  • 10