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

How to captuare an IP packet, change its content and resend it on Linux?

My question is: How to captuare an incoming IP packet from a network interface, change its content and resend it from another network interface?
Amir Saniyan
  • 13,014
  • 20
  • 92
  • 137
6
votes
1 answer

Java Multicast Sending Data, Not Receiving

I am writing a class in Java which is used to greatly simplify the process of multicasting. However, I am having two big problems with it: The class sends data (I can verify this with my net monitor, Wireshark) but the data is not received by any…
Oliver Spryn
  • 16,871
  • 33
  • 101
  • 195
6
votes
1 answer

Sending hex packets in python

How would I send hex data in a packet? I'm trying to copy a packet exactly by using the hex instead of ASCII. All I'm looking for is what the sendto argument would be if, say, the hex I needed to send was 00AD12.
Michael
  • 157
  • 1
  • 2
  • 9
6
votes
2 answers

Send Raw IP packet in C#, everything above the ethernet layer

I don't want to modify the ethernet portions of the frame, but I need to modify the IP packet and the data portion of the frame. I try sending a raw frame and it still puts in the IP information. I basically need to send a frame without defining…
brandon
  • 1,230
  • 3
  • 13
  • 31
6
votes
3 answers

Python/Twisted - TCP packet fragmentation?

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…
ryeguy
  • 65,519
  • 58
  • 198
  • 260
6
votes
2 answers

Stream of example RTP packets

I am trying to tunnel RTP traffic through a user-defined protocol, and want to test this setup. Is there any C++ library, which I can use to generate example RTP packets and then tunnel them through my library? Thanks.
SkypeMeSM
  • 3,197
  • 8
  • 43
  • 61
6
votes
1 answer

Scapy: Using a PacketListField to dissect multiple packets contained in a packet

I am trying to dissect packets, which encapsulate another packet-like structure, called "tags". The structure looks like this +---------+ |Ether | +---------+ |IP | a tag +---------+ |UDP | …
vicco
  • 1,049
  • 2
  • 14
  • 33
6
votes
1 answer

Scapy SYN send on our own IP address

I tried to send SYN packets on my local network and monitoring them with Wireshark and everything works just fine, except when i try to send a packet to my own ip address it "seems" to work because it says Sent 1 packet, but it is not really sent, i…
Nolhian
  • 574
  • 2
  • 7
  • 18
6
votes
2 answers

How to Get uid from packet - android

I am developing a firewall application in android where I need to identify apps based on uid. I have created a vpn service and I am able to capture packets and get destination ip address. Is there any way to get uid of apps from packets or…
SwiftParser
  • 164
  • 1
  • 11
6
votes
2 answers

Reading a Struct Within a Struct via PHP's Unpack Function

I want to know how to read a struct within a struct via php's unpack function. When I get an IS_MCI packet, I check it's Type to make sure it's equal to ISP_MCI, and then I check NumC to find out how many CompCar structs there are within this…
Mark Tomlin
  • 8,593
  • 11
  • 57
  • 72
6
votes
2 answers

How to create a custom packet in c?

I'm trying to make a custom packet using C using the TCP/IP protocol. When I say custom, I mean being able to change any value from the packet; ex: MAC, IP address and so on. I tried searching around but I can't find anything that is actually…
user2033542
6
votes
1 answer

Receive UDP packet datagrams in PHP

I am working in php to build a listening server for a GPS tracking system. The GPS sends data through UDP packets, which I can display by running the below script. However the actual data comes out in symbols so I am guessing I am missing a…
dslauter
  • 75
  • 1
  • 3
  • 6
6
votes
2 answers

Send/receive Packets with TCP sockets

Recently, I managed to create sockets on my PC and my Raspberry Pi to enable communication between both devices. Currently, the client is able to automatically send messages to the server. I was wondering, if it is possible to modify the scripts to…
intensified
  • 159
  • 3
  • 4
  • 10
6
votes
2 answers

Match a lot of patterns in Haskell efficiently

I have thought of using Haskell for a game server but when coding, I found myself looking at the part where I parse packets thinking "wow, this will result in a lot of pattern matching". This seeing the amount of matches to be done are many (walk…
Plankt
  • 135
  • 4
6
votes
2 answers

Identification of packets in a byte stream

I'm having a bit of a problem with the communication to an accelerometer sensor. The sensor puts out about 8000 readings/second continuously. The sensor is plugged in to a usb port with an adaper and shows up as com4. My problem is that I can't seem…
karra
  • 176
  • 4
  • 15