udp

iPhone does not receive UDP data over WiFi

With a WiFi connection, UDP data is not received. It stops at: recvfrom(sock, buf, RECV_BUF_SIZE, 0, (SOCKADDR*)&rAddr, (SOCK_LEN*)&len); When I run the same program in iPhone simulator over ethernet it works well. What am I missing? ...

how to receive UDP packets one by one from the port which is sending infinite UDP packets??

Hi I want to receive UDP packets one by one from the port which is sending infinite UDP packets. For that I have used recvfrom(). But after that call, packet is not getting stored in a buffer. So could you please tell me how to receive one by one????Thanks in advance....Following is my code... int cnt =10; while(recv) { result = recv...

UDP client-server problem

import java.net.*; import java.io.*; class democlientUDP { public static void main(String[] args) throws Exception { DatagramSocket asock=new DatagramSocket(); byte []buf=args[0].getBytes(); int serverport=1234; InetAddress a=InetAddress.getByName("127.0.0.1"); DatagramPacket req=new DatagramPacket(buf,buf.length,a,serverpo...

Free alternative to RocketStream Station?

I just tried RocketStream Station (www.rocketstream.com) as an alternative to FTP for transferring large files over long Internet distances (relatively high latency) and was blown away by its performance which for me was over 125 times the speed of FTP. It uses Udp for the data channel or a protocol they call "Pdp". Are there any free ...

how to receive UDP packets continuously

Hi, I want to receive UDP packets continuously from the port. I'm using recvfrom() to receive packets. How to put delay after receiving a single packet. I want to receive more than 50 packets. For that I need help. Thanks in advance.... ...

How do I set the timeout of a SocketServer in Python?

I want to use server.get_request() to receive requests, but I want it to timeout after 500 milliseconds. Is this correct? Doesn't seem to work... thanks. class UDPServer(SocketServer.BaseRequestHandler): timeout = .500 if __name__ == "__main__": server = SocketServer.UDPServer(('localhost', '12345'), UDPServer) server.get_r...

Connect to remote UDP multicast service

How to connect to remote udp multicast if I have an IP address where the service resided (say 70.70.70.70), the multicast group to connect (say 224.25.25.25) and port (say 2020)? I use ACE framework and in the sniffer I see that ACE sends IGMP packet to 224.0.0.2, in order to join a group, but my home router (checkpoint) doesn't know wh...

How to forward IP packets with Ruby

I want to capture packets whoes has a special target ip, then forward these packets by UDP. Does Ruby can do this ? thanks ...

UDP socket starting to fail to receive

I have a very annoying bug showing up. We have left our iPhone app running overnight. Every 2 seconds it sends a broadcast ping out on to the network via the open socket to inform that the device is alive. Now the other application detects that ping and attempts to send messages back. The problem is that despite the ping continuing...

DNS relay UDP on port 53

I noticed that BT Home are sending back fake DNS results from their DNS servers and this allows sites to bypass the IP addresses i have blocked in the firewall so i was looking to create my own DNS relay/server. So far i can receive request on UDP port 53 and send them off to the DNS server and get a valid byte[] stream result and i the...

xinetd udp server - need access to message sent in PHP

I am invoking a script via xinetd with the following service definition: service gpsservice { socket_type = dgram protocol = udp wait = yes user = root server = path/to/my_php_script.php log_on_sucess = HOST PID USERID disable = no } which successfully lau...

udp socket programming in windows

Hi, I developed code to receive udp packets from the port. But after calling recvfrom() nothing is happening. Following is my code and output. Please help. Thanks in advance.... #include "udpSocket.h" int main(void) { SOCKET sockID; WSADATA wsaData = {0}; FILE *udp; char buf[512]; static int recvData; int iResult = 0; int s...

How big is an IP packet frame including headers ?

A bit of background. I'm writing an application that uses UDP. The application will run on a LAN (not internet). I've been assuming that if my MTU is 1500 then thats how big a UDP payload can be, but I'm not sure if the UDP header is meant to fit within that too. I'm suspecting that if I send a UDP packet with a 1500 byte payload and ...

UDP MITM by adding rules to iptables.

In http://stackoverflow.com/questions/3878303/c-udp-socket-port-multiplexing, I found that using DNAT PREROUTING, I can redirect the packets for a particular UDP port and listen to packets being received on it. iptables -t nat -A PREROUTING -i <iface> -p <proto> --dport <dport> -j REDIRECT --to-port <newport> Unfortunately this w...

Static memory for incoming UDP packets

Objective: To pass data from incoming UDP datagrams to 4 threads waiting on their respective queues. The application is supposed to work non-stop for pumping traffic to a DUT and process the incoming messages. This is what I am doing: 1. Public byte[] receiveData = new byte[512] 2. receivePacket = new DatagramPacket(receiveData, 0 , ...

Handling TUdpSocket

Hello. I'm trying to use the TUdpSocket in Delphi. What I want to do is connect to a UDP server, send some data and wait for answer. Data is sent correctly, but the control does not receive anything. I don't know why. I've been struggling with this problem for many hours now and I'm going to give up :-(. I tried to use TIdUDPClient, but...

Dealing with sendto failure for UDP socket

If sendto fails according to the manpage "On success, these calls return the number of characters sent. On error, -1 is returned, and errno is set appropriately." I know that with TCP that is definately the case and you should really attempt to send the remaining data as pointed out in Beej's guide to network programming. However, pa...

problem in receiving UDP packets

Hi, I'm getting UDP packets from the port continuously. Following is the log from wireshark. How to receive those packets continuously using winsock programming. I tried but I can't able to receive. After recvfrom() call it is not writing into a buffer.Give me idea, how to receive each packet in a buffer and write each packet into to a ...

C++ DGRAM socket get the RECEIVER address.

In C++, how can I get the receiver address of the UDP packet which I have received using recvfrom. I know that it should be the same host on which I am receiving the packet, but I need to extract it from the received packet, in order to verify something. How can I do this? I found that one way of doing this is: int r = getsockopt(r...

C++ UDP sockets packet queuing

I am using the same UDP socket for sending and receiving data. I am wondering if packet queuing for DGRAM sockets is already present, or do we have to handle it separately. If the user code has to handle queueing, how is it done? Do we have separate threads to recvfrom for the socket and put the packet in the reciver_queue and to sen...