network-programming

Find DNS HostName from IP Address in LAN

Hey all. I have written a program that sequentially scans certain parts of a LAN for computers (code will be provided). However, when I run this code, it only returns the DNS HostName of the computer it is running on. I looked into using WMI, but I cannot, as I will not always have priveleges to the computers being found. Is there any ot...

How to read a file from remote system using java ?

Hi, I have a file copied in one computer and I need to access the file from other computer. I am not sure, which protocol or which technology to use for this? Please provide me any hints for this.. Thanks In Advance Renjith M ...

Ignoring your own UDP broadcasts in Java

In my program I'm sending out UDP broadcasts and reacting to them. I need a way to ignore the UDP broadcasts that I send out, but react to ones that aren't from my machine. I did try using: if (NetworkInterface.getByInetAddress(packet.getAddress()) != null) but this generated IOExceptions in some cases (java.net.SocketException: no netw...

Send and Recive file in socket programming in Linux with C/C++ (GCC)

I have a Server Client structure , both server and client can send and receive file. how to send and receive file in socket programming. one solution that I think is partition the file and send one by one segment, is there any library for file send and receive in Linux and C/C++? ...

no route.h on the iPhone SDK

I am trying to build some code that is originally target at OSX/BSD/Linux for the iPhone. It uses struct rt_msghdr from route.h but as it turns out this header is not available in the iPhone SDK. Looks like the function tries to find the available bind addresses as a list of struct addrinfo. Does anyone have a suggestion how to proceed...

Generating all IP addresses in the IPv4 Range

What would be a efficient way to generate all possible IP v4 addresses? other than iterating all bytes in a one giant nested for loop. ...

Possible methods to send the output of a PHP-invoked .exe program (that runs as a separate process, not in PHP) back to the iPhone client

My iPhone client app uploads a data to the server, which runs on PHP. There is a code to invoke a .exe program on the server side on PHP. The .exe program will take the uploaded data and run on a process on its own. That means the PHP execution will end without waiting for the .exe program to finish. After the .exe program finished proce...

Send Network Message When iPhone Application is Closed

My iPhone application supports a proprietary network protocol using the CocoaAsyncSocket library. I need to be able to send a network message out when my iPhone application is closed. The code that sends the message is getting called from the app delegate, but the application shuts down before the message actually goes out. Is there a wa...

How to assure a UDP server does not lose incoming data?

There is a data feed server receives feed from various clients by means of UDP,because the clients are pumping data so fast,the receiving buffer is very easily to get full if the server spends time on processing the received data,so Will it help that if the feed server just multicasts all data it received to the other servers on LAN w...

Building a Network Appliance Prototype Using a standard PC with Linux and Two NIC's

Hi, I am willing to build a prototype of network appliance. This appliance is suppose to transparently manipulate Ethernet packets. It suppose to have two network interface cards having one card connected to the outside leg (i.e. eth0) and the other to the inside leg (i.e. eth1). In a typical network layout as in the attached image, i...

why when writting more than once to socket, it blocks?

hi I am facing a problem with socket and I would be glad if you could help ... The problem is that when I send data more than once it blocks, e.g: //--- client --- //.. send(sock, buf_1, sizeof(buf_1), 0); for (x10){ //... send(sock, buf_2, sizeof(buf_2), 0); if (recv(sock, buf_2, sizeof(buf_2), 0)<0) printf("recv_2() fai...

Good backend for downloading nzb files to seperate directories

I'm laying out a download management that will segregate each users downloads, separate watched directories each download to their own folders, can't see each others queues, etc. I wanted to use Hellanzb with xml-rpc, however it does not seem to allow me to set separate download directories for each file. I want to avoid trying to gues...

which language is better for packet capturing and processing

I want to write a program that has 2 threads , one thread continuously captures packets from the network and dumps them in a buffer every t seconds and the other thread continuously reads this buffer and processes it every t seconds.. Can this be done in C ? or will Java be a better option ? ...

What more socket APIs are available? What are the differences between each of these Socket API?

Everyone referred to it as Socket Programming or Network Programming in C and we started using it by using by including sys/socket.h & netinet/in.h. We thought it was 100% true. But question raised in my mind when I saw this book Internetworking With TCP/IP Volume III: Client-Server Programming and Applications, which was available in 4...

Network and Graph theory problem

You have N computers and [Ca, Cb] means a is connected to b and this connectivity is symmetric and transitive. The problem is to write a program which checks that all computers are interconnected and talk to each other. A time efficient algorithm is preferable. ...

writing a http sniffer

Hi all, I would like to write a program to extract the URLs of websites visited by a system (an IP address) through packet capture.. I think this URL will come in the data section ( ie not in any of the headers - ethernet / ip / tcp-udp ).. ( Such programs are sometimes referred to as http sniffers , i'm not supposed to use any availab...

how to create a vpn software

I want to create an application which creates a VPN between some endpoints, something like hamachi and i do not have a starting point. I haven't found any resource to explain how to create such a network application.I want to use c# because i have some experience with it. I really need some help, anything that can put me on the right way...

where to look for programs that use jpcap or jNetPcap ?

Is there any code available in java ( that uses jpcap or jNetPcap ), that captures packets and displays all header information.. ...

iPhone network game programming

I'm interested in writing an iPhone game which uses the network to allow users on different iPhones to play against each other. I'm looking for an example of a game with source code which does this. I need some simple examples and documentation. Where should I look? I'm brand new to iPhone programming. Thank you! ...

List-Array Error?

I was working on a project which required pulling down and parsing a .html page from a server, then parsing it for content. I searched a string for two values as a unit test, then saved each of them to a List, then compared them to a manually created String[]. The code is below: SiteGrabber.java: //some imports import java.util.ArrayLi...