networking

C# Testing active internet connection. Pinging google.com

Hello, C# 2008 I am using this code to test for an internet connection. As my application will have to login to a web server. However, if the user internet connection was to fail or cable pulled out. I will have to notify the user. // Ping www.google.com to check if the user has a internet connection. public bool PingTest() { Pin...

Emulate incoming network messages for Indy

Is it possible to emulate incoming messages using Indy (if it's of any importance: I'm using Indy 10 and Delphi 2009)? I want to be able to create these messages locally and I want Indy to believe that they come from specific clients in the network. All the internal Indy handling (choice of the thread in which the message is received and...

How to use WMI to add an IP route?

I need to add a route into the IP4 routing table on windows xp. However, the Win32_IP4RouteTable class seems to only be able to query existing routes. Basically I need the same functionality as: route ADD 192.168.127.254 MASK 255.255.255.255 192.168.1.10 Is it possible to use WMI to add an entry into the IP4 routing table? Could I ...

C# NetworkAvailabilitychangedEvent

Hello, VS 2008 I am developing an application that has to detect whether a client has a network connection. i.e. LAN cable plugged in or wireless switched on. I have been using the code below. I am using the NetworkAvailabilitychangedEvent to fire an event when their wireless is turned off or the cable has been pulled out. However, th...

What does LAN/traffic congestion mean?

While talking about UDP I saw/heard congestion come up a few times. What does that mean? ...

Are there any articles or advice on creating a C++ chat server with a C# client?

My current class is planning on creating a basic networked game, but we have decided to take on the task of making a C++ server with a C# client. I understand this is probably a difficult task, but I was wondering if there is any advice on making this happen. I am sorry I do not have any more information than this. We are just getti...

How to detect the physical connected state of a network cable/connector?

In a Linux environment, I need to detect the physical connected or disconnected state of an RJ45 connector to its socket. Preferably using BASH scripting only. The following solutions which have been proposed on other sites do NOT work for this purpose: Using 'ifconfig' - since a network cable may be connected but the network not pro...

Unable to investigate DNS poisoning between China and US

I am interested to know how the DNS requests to political sites differ in different countries. I need to know how I can send a DNS query to a remote computer, let say, in China. Then, I want to compare the results to US. The goal of the experiment is to get a hand-on experience on the concept about DNS poison. I feel my lectures so the...

Distributed computing vs threads

How similar is distributed computing and threading? I've found two papers coming to quite opposite conclusions: "Multi-Threading is Easier Than Networking. How threading is easy and similar to network code" http://software.intel.com/file/14723 (this gives me an impression that they're so similar that after encapsulation these two appr...

UDP protocol support in common web browser

Entering "udp://host:666" in the location bar doesn't work very well. Is there any work-around for sending a single "empty" datagram to a host using an ordinary web browser? The response is no issue since the use case I'm think about is port knocking ("http://host:666" doesn't work well since browsers tend to repeat the request if there...

how can I get the saddress from the struct "skbuff"

Hi, I have a program that it need get the source address from the struct "skbuff", In the previous kernel version, I can get the "saddr" using the following line: static __u32 get_src_ip(const struct sk_buff *skb){ return ntohl(skb->nh.iph->saddr); } The following is error message: error: 'const struct sk_buff' has no member name...

Unit testing with NSURLConnection

Hello! I want to test a piece of code that uses network (the NSURLConnection class, to be specific). The code (let’s call it NetworkManager) looks a bit like this: - (id) buildConnection { // some more code and then: return [NSURLConnection …]; } - (void) startNetworkSync { id connection = [self buildConnection]; //… }...

Send large byte arrays between AppDomains in the same process

I'm building a network server and starting a lot of AppDomains on the server to which requests are routed. What will be the fastest way to send off a request payload to one of the AppDomains for processing? Read in the payload from the socket into a byte array and marshal it. Marshal the network stream (inherits from MarshalByRef) to t...

c# socket tcp proxy server

Hello, VS 2008 I am using the code below to detect if the client can connect to our sip server. This was working fine. However, the client has changed there network and now my application has to connect to the sip server from behind a proxy server. The error I get is the "A connection attempt failed because the connected party did not...

How can I check if an ip is in a network in python

Given an ip address (say 192.168.0.1), how do I check if it's in a network (say 192.168.0.0/24) in Python? Are there general tools in Python for ip address manipulation? Stuff like host lookups, ip adddress to int, network address with netmask to int and so on? Hopefully in the standard Python library for 2.5. ...

Using single RMI Registry

Hi I've been using RMI for a project I am currently working on and I want to bind from multiple hosts to a single RMI registry. However when I attempt to do so I get an error saying java.rmi.AccessException: Registry.Registry.bind disallowed; origin / 192.168.0.9 is non-local host I did so googling and it seems that RMI stops remote...

Difference between specifying IP in host file vs using IP directly

Is there any difference between the following when a intranet URL in accessed in IE Add an entry in drivers/etc/host file for a name and IP vs Use IP directly e.g. it works with the following link if I have a host entry as (XYZ 10.0.10.200) http://XYZ/SiteDirectory/ABC/Default.aspx but when I tried to use IP instead of name http://1...

How to get hardware MAC address on Windows

I'm playing around with retrieving the MAC address from the NIC - there are a variety of ways to get it, this article covers the most common: http://www.codeguru.com/Cpp/I-N/network/networkinformation/article.php/c5451 I'm currently using the GetAdaptersInfo method, which seems the most bulletproof, but if the MAC address has been set ...

Trouble Extending Network with Apple Airport Extreme (PC won't connect with Ethernet)

So I have an Apple Airport Extreme base station that I use to create a wifi network at my house. But on a separate story from this station i have a PC (running Windows 7) that does not have a wireless card. Luckily, I have another Airport Extreme Base Station, so I figured I'd have my second station "extend" the existing network. I as...

Can we sniff packets between 2 machines in a network from a third machine using wireshark or ethereal

I have a small network in which there are 2 electronic devices and one desktop connected using a switch. Through the desktop with Ethereal/wireshark installed on it, can I sniff the packets that are being communicated between the 2 electronic devices? I cannot install ethereal or wireshark on either of the electronic devices, but need t...