networking

How do I make a program "discoverable" on the network?

Hey guys, I was working on a simple chat program to brush up on my C#, and ran into a roadblock. I wanted to allow one computer to broadcast its location, and the other to find that computer, and display it (and any others) in a list.. Just a push in the right direction would be great, Thanks, Max ...

length of captured packets more than MTU

Hi, I m running iperf between two machines (linux) and I can observe the mtu of both the interfaces connected is 1500. I ran tcpdump to capture packets and I observed some packets have "length as 2962"....how come this is possible with mtu as only 1500? Please clarify. Thanks! Note: flags field is set as DF. and proto is TCP ...

Why does a SYN or FIN bit in a TCP segment consume a byte in the sequence number space?

I am trying to understand the rationale behind such a design. I skimmed through a few RFCs but did not find anything obvious. ...

IPv4 and IPv6 In a Single Network Segment

Hi there. I need someone to back me up, or prove me wrong, in regard to the comments I've made some time ago. Here is the original thread: http://stackoverflow.com/questions/2277536/dual-stack-ipv6-ipv4-on-localhost/2277596#2277596 Basically, I'd like to know if we can have 2 different kinds of IP addresses (IPv4 and IPv6) running on...

C socket API is thread safe?

I'm using both Linux and Win32 socket APIs. In my program, multiple threads share a socket handle. In particular, multiple threads call send with the shared socket handle (i.e., the same port). In this case, do I have to put a lock for thread safety? I was unable to find the answer. I may do a test, but want to hear your experiences. ED...

Detecting private IP addresses using one member in the .NET Framework?

Is there one method or property in the .NET Framework that tells if an IP address is private? Or must a custom check be coded? ...

Rationale behind ACKs and SEQs?

I am not sure if people find this obvious but I have two questions: During the 3-way handshake, why is ACK = SEQ + 1 i.e. why am I ACKing for the next byte that I am expecting from the sender? After the handshake, my ACK = SEQ + len. Why is this different from the handshake? Why not just ACK for the next byte I am expecting as well (th...

How to check if its a Router or a Switch? Address in packet from a host in private lan?

I'm in a campus network, Where the network has an hierarchy. We connect to internet using Proxy servers. All our computer IPs are something like 10.*.*.*. 10.1.*.* => Dept 1 (mathematics) 10.1.1.* => 1st floor of this dept. 10.1.1.2 => Default gateway for this floor1 10.1.2.* => 2nd floor of this dept. 10.1.2.2 => Default gateway for...

How to utilize network for p2p file sharing on Android Platform?

I'm working on some apps for the android platform and I have two problems that I'm not quite sure how to approach, and both are closely related. How can I send a relatively small data file from one android device to another (preferably over the internet or directly through wireless network)? Is it possible to create a temporary p2p liv...

Opening up Ports on the Nexus One (Version 2.1)

I'm trying to load a web application that needs to connect to port 873. I'm getting an error message that seems to imply that it can't reach that port and I'm guessing that Android 2.1 doesn't expose that port out of the box. Is there any way to open up ports in the 2.1 operating system? Thanks in advance, =Ryan ...

C# invoking a web service but IP being blocked after some amount of time.

Hello, I m invoking a web service and they stop my service calls after an hour, the hourly limit of 5000 requests for the IP address MY IP :) has been exceeded. I m using C#, and is there a way around this? Can i programatically send the requests as if they are coming from different IP ? Is that possible? Thanks ...

Tile-based MMORPG movements protocol

Hi, I'm working in a tile-based MMORPG and I have a problem. Each user has a fixed position (one tile) all the time, so the rest of the users can see him there, and cannot move to that tile. So there is only one object or user in each tile. If a user becomes invisible, the rest of the users can't see him, but they still unable to move ...

Does lwIP support Zeroconf?

I see that lwIP has some AutoIP (aka IPv4LL, aka RFC 3927) code, but I can't tell if it does anything higher up in the Zeroconf stack, namely mDNS and DNS-SD (with RFC 2782). So, does lwIP support DNS-SD service discovery? If not, would it be easy to port code from a project like Avahi that does (assuming licensing allows it)? ...

Detecting uploading using HTTP and copying using USB device

Hi there, I have been asked by my (pananoid!) boss to do two things 1. Detect when a user uploaded files to the net using HTTP. So for example how can I detect if a user uploads fire to a free webserver somewhere and can hense steal company data Detect that a user is copying files to a USB device and what the name of these files are. ...

Which programming languages can I use to write a Bonjour software?

Am I really restricted by programming languages? I can imagine that, to use Bonjour, I need to have special libraries which could be not available for any language. So, then I need to use those languages which have corresponding libraries. As the second option, I can imagine, that Bonjour provide an interface which can be used almost by ...

Can I use Bonjour from command line?

Is it possible to use Bonjour from command line? For example if I want to register a service I type something like that: bonjour -register service_name port. And then Bonjour allocate a free IP for my service. Or, for example, if I want to see a list of available services I type something like: bonjour -showServices. And then I get list ...

java InetAddress.getLocalHost(); returns 127.0.0.1 ... how to get REAL IP?

I'm writing a simple networking app... I need to know the real ip of my machine on the network, like 192.168.1.3 . getLocalHost returns 127.0.0.1 (on Linux, dunno if it is the same on windows) how to do it?; ...

iPhone SDK: Network connectivity and Reachability flags.

I am using the Reachability code and also doing a server login. What I am finding is that the reachability is responding with a negative, even though I have already logged into the server, and then reachability returns positive. 2010-03-04 18:39:36.088 FLinkerDebug[18472:207] reply from server: 3/4/2010 6:40:21 PM15bcc06c-2c20-43cb-ab8...

[C#]Network Discovery of an application for peer to peer network

I wish to have two classes, a server class and a client class. The server class should recieve the IP address and Port number of each new client and store them in a list. It should supply each of the clients with a list of connected clients and their IP addresses. The clients could then communicate with each other using TCP connection...

Is it possible to test an iPhone web application over an ad hoc wireless network?

I'm working on a web application that will have a custom UI for the iPhone platform. At the moment I have my Apple laptop but I'm away from a wired or wi-fi Internet connection. I want to run the app on the laptop and then preview it on the iPhone. Is this possible? I created an ad hoc wireless (AirPort) connection on the Mac and could ...