packets

How to perform packet pair probing by sending multiple packets rather than just one pair ? (method for taking average)

痴心易碎 提交于 2020-01-13 06:39:19
问题 Generally in a packet pair estimation, you are supposed to send multiple bursts of packet pairs and take an average of the bandwidths. Say, you send 4 packets, calculate the time difference between the first two packets(1&2), time difference between the next two packets(3&4). Calculate bandwidth for each of these two and then take average. Or Calculate the time difference between (1&2), time difference between (3&2), time difference between (4&3)... and then take an average out of these

Packet modification with netfilter queue?

早过忘川 提交于 2020-01-02 07:59:07
问题 I'm currently trying to use codes with libnetfilter_queue in userspace to modify packets that were queued in the NFQUEUE target in iptables. However I have little idea as to how to go about doing it. I have set it to copy the packet with NFQNL_COPY_PACKET, if I were to modify the copied packet would it be automatically send back to the kernal by the function nfq_set_verdict()? Additionally, I have previously worked with extracting packets from a pcap file, however I noticed that the data that

How to calculate packet time from latency and bandwidth

为君一笑 提交于 2019-12-29 03:22:28
问题 I have a link between a host and a switch. The link has a bandwidth & a latency. How to calculate the time of 2 packets(with size 1KB) to be transferred from Host A to Switch 1 ? Here's the diagram(I am talking about the first link) Note: I just want to calculate it manually for these values, I want to know the principles/laws of calculating these problems. 回答1: Propagation time = (Frame Serialization Time) + (Link Media Delay) + (Queueing Delay) + (Node Processing Delay - if known) Formulas:

Android - BLE connection parameter and Storing BLE sensor data in SQLite Database

孤街浪徒 提交于 2019-12-25 08:30:22
问题 I am developing an Android app that receives data from a BLE sensor at a rate of about 8000 bytes per second. The connection logic in my app is based upon Google's BluetoothLeGatt sample. It works. I haven't changed anything and don't explicitly set any connection parameters like interval between connection events (I don't think the Android 4.4 APIs support that). I am testing on two Android phones, both using Android version 4.4.2 and am using the TI BLE sniffer to monitor BLE traffic. One

Parsing packets captured using wireshark for management frames identification using libpcap or similar library

前提是你 提交于 2019-12-24 07:12:30
问题 I want to parse packets captured by wireshark offline using libpcap. I am capturing packets from a wireless network in monitor mode. I have read that "libpcap" can be used to capture and parse packets captured in the ethernet. Can it be used for wireless networks too? If yes, can anyone suggest me some tutorial? and if No, which library is suitable for it and how to use it? 回答1: libpcap, and its Windows port, WinPcap can be used to capture network traffic (in fact, they're what Wireshark uses

How to Send Packets to a Remote Minecraft Classic Server in Python?

末鹿安然 提交于 2019-12-22 11:02:23
问题 Hello kind folks of StackOverflow. I am trying to make a sort of 'bot' which can connect to a Minecraft Classic server, post messages and possibly build. Anyway, I'm having some trouble understanding how to send packets in python, and how to correctly encode them. Here are the packets I need to send, I want to send the 'Player Identification' one: http://www.minecraftwiki.net/wiki/Classic_server_protocol#Client_.E2.86.92_Server_packets I know I need to be using sockets, and I need to be using

How to inject a raw L2 packet as an incoming packet to an interface on Linux?

帅比萌擦擦* 提交于 2019-12-22 10:50:46
问题 I need to inject some L2 packets(customized) to an specific interface as incoming packets in Linux to test some applications running on it. Is there any libraries(python preferred)/examples that can help? I was skimming through the Scrapy library, but then it looks like it can only inject packets to the network as outgoing packets? 回答1: If you have the native linux bridge module available then you can use it in this way. Create a bridge brctl addbr <brname> Now create a virtual eth pair

Decoding tcp packets using python

筅森魡賤 提交于 2019-12-21 23:59:28
问题 I am trying to decode data received over a tcp connection. The packets are small, no more than 100 bytes. However when there is a lot of them I receive some of the the packets joined together. Is there a way to prevent this. I am using python I have tried to separate the packets, my source is below. The packets start with STX byte and end with ETX bytes, the byte following the STX is the packet length, (packet lengths less than 5 are invalid) the checksum is the last bytes before the ETX def

Packet loss while receiving UDP broadcast in android device

牧云@^-^@ 提交于 2019-12-19 02:47:28
问题 For receiving UDP broadcast packets from the server to an android device, i used a service class and listen for packets in a thread. It receives the packet successfully. The problem is that if multiple packets are being sent from the server in the same time then packet loss will be the result. I even tried with a queue and processing the received packets in separate thread then also i am not getting the packet. I am completely new to network programming any help would be widely appreciated

How to create a packet in C#

泪湿孤枕 提交于 2019-12-13 09:39:37
问题 I always wondered how could a game generate a packet like this: 22 00 11 00 6D 79 75 73 65 72 6E 61 6D 65 00 00 00 00 00 00 6D 79 70 61 73 73 77 6F 72 64 00 00 00 00 00 00 LENGTH-HEADER-USERNAME-PASSWORD In the game code what should be their function or how do they write something like that? Is it simply Encoding.ASCII.GetBytes("Some String Values") ? Although I doubt it is written that way. Every time I try to ask someone that, he thinks that I want to analyze packet. I don't - I want to