packet

Splitting up UDP packet

Heyo, I'm using UdpClient to query game servers about server name, map, number of players, etc. I've followed the guidelines on this page (A2S_INFO) http://developer.valvesoftware.com/wiki/Server_queries#Source_servers and I'm getting a correct reply: I have no idea how I would go about to get each chunk of information (server name...

Calculating packet loss, jitter and delay.

I am streaming an rtsp video to Android. How could I calculate network metrics like packet loss, jitter or delay? ...

How to wait until your TCP message has been ACKed

Background: We have a client/server application that uses a persistent connection to the server. Benchmarks show that it is many times faster to use an already open connection rather than spend significant time (2.5 seconds) setting up a new connection (crypto). Unfortunately, the old connection may be stale. Is there a way to wait f...

Why can't we send a UDP packet from an Android emulator?

My friend and I have a wireless robot dog connected to a wifi network which our computer is plugged into. The computer is running an Android emulator and we are trying to send a UDP packet to the wireless robot dog. If the dog receives it, it should start sending UDP packets back. The program we wrote works outside of the emulator, and u...

How can I tell if a user has left my website

Is there a way to tell if a user on my website has left (i.e. connection dropped, navigated away etc.) in real time? I am building a RoR website and want to initiate an event as soon as a user leaves my site for whatever reason (e.g. connection, navigating away from domain etc.) Thanks in advance for any help. ...

Scapy SYN send on our own IP address

Hello, 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 can't see the packet in Wireshark nor any answers to the packet. My setup is a co...

Forgin/Buiilding TCP packets in ANSI C

How do I, without using third-party tools, craft TCP (and even UDP for that matter) packets in ANSI C? I want to be able to set all option flags, source ip address etc. So full control. Haven't found any good text about it online. Or I'm just using the wrong search criteria. ...

HIS Server Protocol

To give a bit of context to my problem, we have a 3270 Telnet Emulator (WinVV) that connects to an HIS server that then connects to an SNA Server and eventually to an IBM mainframe. I now want to write an app that automates data retrieval and have chosen (not that there's much choice) to use the Jagacy library. Before I start coding I wa...

H.225 User Information Packet Parsing

I'm writing some code using PacketDotNet and SharpPCap to parse H.225 packets for a VOIP phone system. I've been using Wireshark to look at the structure, but I'm stuck. I've been using This as a reference. Most of the H.225 packets I see are user information type with an empty message body and the actual information apparently shows up...

General Socket Question - Transferring C++ Structs from Java to C++

Hi, friends. I have a general socket programming question for you. I have a C struct called Data: struct data { double speed; double length; char carName[32]; struct Attribs; } struct Attribs { int color; } I would like to be able to create a similar structure in Java, create a socket, create the data...

Sniffing and displaying TCP packets in UTF-8

Hi everyone, I am trying to use tcpdump to display the content of tcp packets flowing on my network. I have something like: tcpdump -i wlan0 -l -A The -A option displays the content as ASCII text, but my text seems to be UTF-8. Is there a way to display UTF-8 properly using tcpdump? Do you know any other tools which could help? Many...

How to detect HTTP Request in python + twisted?

I am learning network programming using twisted 10 in python. In below code is there any way to detect HTTP Request when data recieved? also retrieve Domain name, Sub Domain, Port values from this? Discard it if its not http data? from twisted.internet import stdio, reactor, protocol from twisted.protocols import basic import re c...

how to customize compareTo method to consider both direction flow

if I need to customize my code with this logic if this.srcAddr=other.srcAddr or this.src.Addr = other.sdstAddr this.srcPort=other.srcPort this.srcPort=other.dstPort because I am going to consider bi-directional flow, a packet from source to destination and a packet from destination to source belong to a flow. How should I change my c...

Receiving an entire UDP packet

I am programming a UDP proxy application for Windows in C++ that sends and receives UDP packets with Winsock. The problem is that I need to work with the ENTIRE packet, not just the data and UDP and/or IP header. I have tried raw sockets with IP_HDRINCL (might be misspelled), but it still chops off some information from the packet. Is th...

Multiple sockets receiving same packet

I have a C++ program written with Winsock that has multiple blocking sockets operating in multiple threads. They are all waiting at recvfrom(), and when I send a packet to one of them, they all get the packet. Here is how they are declared: _sock = socket(AF_INET, SOCK_RAW, IPPROTO_UDP); if (_sock == INVALID_SOCKET) { _error = WSAG...

Nagle algorithm in tcp/ip

can u kindly explain me the concept of nagle algorithm in tcp/ip,with an example? ...

How to read java stream until certain byte is reached

My question is similar to this post. But I don't send packet length rather a 0 byte at end. http://stackoverflow.com/questions/833744/most-efficient-way-to-read-in-a-tcp-stream-in-java So I'm wondering how would I code something that would. At the moment I just use this.socketIn = new BufferedReader(new InputStreamReader(this.socket....

How to split packets in flash, XMLSocket

Hello I believe my flash client is losing some packets the server sends, because some packets get joined together hence I believe it drops them. Here is my packetHandler in flash private var xmlsock:XMLSocket; this.xmlsock = new XMLSocket(); xmlsock.connect("127.0.0.1", 1234); this.xmlsock.addEventListener(DataEvent.DATA, this....

Does TCP send a SYN/ACK on every packet or only on the first connection?

I have a TCP server that listens for an incoming client, then sends it one packet of data every second. I was wondering, does the SYN/ACK packet only get sent on initial connection, so it looks like this: <client connect> SYN ACK DATA DATA DATA <client disconnect> Or does it get sent with every packet, like this? <client connect> SYN...

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. ...