tcpip

Connecting private IPs

A friend of mine told me there was a way to connect two private IPs without using a proxy server. The idea was that both computers connected to a public server and some how the server joined the private connections and won't use any more bandwidth. Is this true? How's this technique named? Thanks ...

Direct TCP/IP connections in P2P apps

From a Joel's post on Copilot: Direct Connect! We’ve always done everything we can to make sure that Fog Creek Copilot can connect in any networking situation, no matter what firewalls or NATs are in place. To make this happen, both parties make outbound connections to our server, which relays traffic on their behal...

How do I create RAW TCP/IP packets in C++?

I'm a beginning C++ programmer / network admin, but I figure I can learn how to do this if someone points me in the right direction. Most of the tutorials are demonstrated using old code that no longer works for some reason. Since I'm on Linux, all I need is an explanation on how to write raw Berkeley sockets. Can someone give me a qui...

Probability of finding TCP packets with the same payload?

I had a discussion with a developer earlier today re identifying TCP packets going out on a particular interface with the same payload. He told me that the probability of finding a TCP packet that has an equal payload (even if the same data is sent out several times) is very low due to the way TCP packets are constructed at system level....

Artificially create a connection timeout error

I've had a bug in our software that occurs when I receive a connection timeout. These errors are very rare (usually when my connection gets dropped by our internal network). How can I generate this kind of effect artificially so I can test our software? If it matters the app is written in C++/MFC using CAsyncSocket classes. Edit: I'v...

LSL communications

Years ago I created a programming collaboratory in Diversity University MOO -- a room written in MOOcode that used TCP/IP to communicate with a perl server back at my campus to compile and execute C, Perl, Bash and other programs and return results to the MOO collaboratory -- all for demonstrating programming languages in a MOO teaching ...

socket listen backlog parameter, how to determine this value?

How should I determine what to use for a listening socket's backlog parameter? Is it a problem to simply specify a very large number? ...

Can a TCP/IP Stack be killed programmatically?

Our server application is listening on a port, and after a period of time it no longer accepts incoming connections. (And while I'd love to solve this issue, it's not what I'm asking about here;) The strange this is that when our app stops accepting connections on port 44044, so does IIS (on port 8080). Killing our app fixes everythin...

Does TCP/IP prevent packet replays?

Does TCP/IP prevent multiple copies of the same packet from reaching the destination? Or is it up to the endpoint to layer idempotency logic above it? Please reference specific paragraphs from the TCP/IP specification if possible. ...

WCF is not binding to the correct IP address

We have a WCF service deployed on a Windows 2003 server that is exhibiting some problems. The configuration is using wsHttpBinding and we are specifying the IP address. The services is being hosted by a Windows Service. When we start the service up, most of the time it grabs the wrong IP address. A few times it bound to the correct a...

TCP Connection Life

How long can I expect a client/server TCP connection to last in the wild? I want it to stay permanently connected, but things happen, so the client will have to reconnect. At what point do I say that there's a problem in the code rather than there's a problem with some external equipment? ...

What are the best options for NAT port forwarding?

I'd like to make it easy for users to forward a port on their NAT to their local machine for my C++ app. I'd like to make this work on OSX & Windows. Linux would be a great bonus, but Linux users are probably more comfortable forwarding ports manually, so it is less of a concern. LGPL type code is OK, but I can't use anything that is ...

How to forward the TCP/IP traffic of a process in Windows XP?

(The curly lines with dots represent a network route.) Having a process called "foo.exe", is there a way to forward everything it communicates over TCP/IP to a forwarding proxy located elsewhere? This forwarding should not reflect to other processes. Another question: if there are multiple network adapters, is it possible to force a ...

Tcp/Ip Socket connections in .NET

For my current project, I need to request XML data over a tcp/ip socket connection. For this, I am using the TcpClient class: Dim client As New TcpClient() client.Connect(server, port) Dim stream As NetworkStream = client.GetStream() stream.Write(request) stream.Read(buffer, 0, buffer.length) // Output buffer and return results... ...

Best .NET comm component or protocol for very low bandwidth communication?

What's the best .NET communication component or protocol for very low bandwidth and intermittently connected communication (i.e.: < 10 kilobits/sec)? ...

Using Linux, how to specify which ethernet interface data is transmitted on

I'm working on a Linux based server system in which there are two network interfaces, both on the same subnet (for now, lets just say they are 172.17.32.10 & 172.17.32.11). When I send data to a host on the network, I would like to specify which interface on my server the data is transmitted on. I need to be able to switch from one int...

How does TCP/IP report errors?

How does TCP/IP report errors when packet delivery fails permanently? All Socket.write() APIs I've seen simply pass bytes to the underlying TCP/IP output buffer and transfer the data asynchronously. How then is TCP/IP supposed to notify the developer if packet delivery fails permanently (i.e. the destination host is no longer reachable)?...

Assigning TCP/IP Ports for In-House Application Use

I've written a WCF Service hosted by a Windows Service and it needs to listen on a known TCP/IP port. From what range can I safely allocate a port for use within my organization? That port will be embedded in the config files for the service and the clients that are consuming the service. ...

How do you go about compiling a modified version of FreeBSD?

I'm working on an assigned group project at University where we have to re-implement the TCP/IP stack to support some extra stuff (http://discolab.rutgers.edu/mtcp/), and then demonstrate it. The thesis/design we're working from says the original researchers changed the sourcecode for FreeBSD to support the extra bits and bobs. We've g...

What causes a TCP/IP reset (RST) flag to be sent?

I'm trying to figure out why my app's TCP/IP connection keeps hiccuping every 10 minutes (exactly, within 1-2 seconds). I ran Wireshark and discovered that after 10 minutes of inactivity the other end is sending a packet with the reset (RST) flag set. A google search tells me "the RESET flag signifies that the receiver has become confus...