networking

self organizing computer networks & node discovery: libraries, algorithms, docs: where do I begin?

hi, I would like to write a networked software without centralized directory, capable to automatically discover its fellow nodes and "self-organize" a resilient, "not too unbalanced" logical network (maybe i should define it as a graph with relatively short routes between each pair of nodes). in witch hunting times like these, maybe it...

Java Network application cache dependinces locally

I have several Java apps that run directly from the a shared drive on the LAN. This has worked fine until recently when we setup a remote office on a VPN. The actual applications are small, but have nearly 20 megs of dependencies in their classpath. Is there a way to continue to run the applications from the network, but cache the depe...

What are some tips for buffer usage and tuning in custom TCP services?

I've been researching a number of networking libraries and frameworks lately such as libevent, libev, Facebook Tornado, and Concurrence (Python). One thing I notice in their implementations is the use of application-level per-client read/write buffers (e.g. IOStream in Tornado) -- even HAProxy has such buffers. In addition to these a...

How to show different homepage based on the user's Country?

I had two domains. rajasekar.com and rajasekar.in. What I need to do is that, when a user from India types the url in the address bar as www.rajasekar.com then it should open www.rajasekar.in When user from other country types the url in the address bar as www.rajasekar.com it should open www.rajasekar.com I think this is what im...

Test harness software for networking failures

During integration testing it is important to simulate various kinds of low-level networking failure to ensure that the components involved properly handle them. Some socket connection examples (from the Release It! book by Michael Nygard) include connection refused remote end replies with SYN/ACK but never sends any data remote end se...

What is the state of C10K-like event-based server development in TCL?

TCL is a nice simple programming language, but does not seem to get the credit and/or respect it deserves [1]. I learned it back in 1995 in college and promptly forgot about it only to stumble upon it again recently. I am mostly interested TCL for developing TCP-based network services as well as for web development. It has been ment...

TCPIP networking with C#

HI everyone, I'm going to be writing some code that has to listen for TCPIP messages coming from GSM mobile phones over GPRS. In the fullness of time, I see this as running on a Virtual Private Server, and it could well be processing multiple messages every second. I'm a bit of a network programming virgin, so I've done a bit of resea...

Comunicating to server with queries through stream. What is the right way?

I'm writing my first network application. It manipulates jabber client and comunicates with some service with IQ-stanzas. But details are not important. This interaction works through twisted xmlstream (python language). Typical situations are described here: http://juick.com/help/api/xmpp/ To be short, I can send a "query" and server r...

High rate data stream and memory deficiency

I have a program that accumulates traffic from network interface in 800 Mb/s. This program is developed by Delphi, also in 32bit platform(Delphi does not support 64bit architecture). I'm writing received date on the memory(RAM) and after a while (unknown and depends on received data), write a block of received data (unknown size and dep...

Is it possible to use private IP address on GPRS connection

Hello, I need to connect my Windows Mobile 5.0 phone to the WAVECOM Q2686 processor acting as a server. The problem is I don't have a public IP address for the server side. I tried to solve it by using the CSD dial-up connection, where the all you need is phone number of the server and you can use any IP you want. But as of now I could...

Binding JVM to An IP Other than Default

I have a multihomed system with multiple NICs and IPs. I am not %100 sure how my Sun JVM chooses the IP representing 'this' system (that's the "source IP" when connecting to another system using Socket or URLConnection). Does it pick the system default NIC, or perhaps it does a reverse lookup on the system's name? etc. In any case, is ...

Using C#/C++, is it possible to limit network traffic?

I'm developing a parental monitoring/tracking application that has a feature to lock down all internet activity. While disabling the network adapter would seem like a simple solution, the application must have the ability to turn the internet back on remotely -- so the network needs to remain enabled, to a certain limit. Unfortunately,...

Local Network - Windows 7 and Vista can't see each other

I've got a strange issue at home that has been bugging me for weeks, but I really need to get it sorted now so I'll detail as much as I can and hopefully someone can spot what might might be wrong. I have a wireless router connected to the internet and 3 devices connected to it. They are: Name OS Network IPv4 PC1 Wi...

Caching is orthogonal to recursion... Explain ?

Although it's true that some recursive-nameserver configurations are (sloppily) referred to as "caching", e.g., by RHEL/Fedora/CentOS, that's a really bad name for that function -- because caching is orthogonal to recursion. Theoretically, you could write a nameserver that does recursive service but doesn't cache ...

Redirecting TCP-traffic to a UNIX domain socket under Linux

Assume a legacy Linux application listening on a UNIX domain socket /tmp/foo. In addition to communicating with this legacy application over the UNIX domain socket mechanism I want to be able to connect to it via a TCP-connection on port say 1234. What is the easiest way to bind to TCP port 1234 and then redirect all incoming connectio...

How to reset a socket back to blocking mode (after I set it to nonblocking mode)?

I have read this regarding setting a socket to non-blocking mode. http://www.ia.pw.edu.pl/~wujek/dokumentacja/gnu/libc/libc_8.html#SEC141 Here is what I did: static void setnonblocking(int sock) { int opts; opts = fcntl(sock,F_GETFL); if (opts < 0) { perror("fcntl(F_GETFL)"); exit(EXIT_FAILURE); } ...

Basics of string based protocol security

I wasn't sure how to phrase this question, so apologies in advance if it's a duplicate of something else. I wanted to sanity check how I've secured my twisted based application and think I've done a good job at it, but it's been over a decade since I've written anything that uses raw or managed sockets. Authentication transaction: Cl...

How does getaddrinfo() do DNS lookup?

getaddrinfo() is a function we need to use before creating a socket() or connect()ing, right? Then how does getaddrinfo communicate with DNS server in the first place? PS: Where can I see the complete source of getaddrinfo? ...

C: Using a select call, when I am reading, how do I keep track of the data?

First of all, I've never worked with C before (mostly Java which is the reason you'll find me write some naive C code). I am writing a simple command interpreter in C. I have something like this: //Initialization code if (select(fdmax+1, &read_fds, NULL, NULL, NULL) == -1) { perror("Select dead"); exit(EXIT_FAILURE); } .... .....

Server multi-threading, a must for Protocol ? and more

Suppose a application level protocol is implemented via UDP. Client timeout is required, thus server need to keep state of each client it talks to. Also suppose select is used. Is it always the best to implement multi-threading server? I figure a link-list will do the same, where server timeout time=Earliest Timeout of a client- Curre...