ip

Is it possible in .NET to set the local endpoint (IP address) when using webclient to consume a web service

I'm wondering if it is possible using .NET to call a remote web service and in effect specify which IP the call is made on. I'm consuming a service that limits the number of calls I can make based on IP. The service costs in the 20k range after the free limit is used up. I'm very close to enough calls but not quite there using the fre...

urllib2 in Python 2.6.4: Any way to override windows hosts file?

I am using the urllib2 module in Python 2.6.4, running in Windows XP, to access a URL. I am making a post request, that does not involve cookies or https or anything too complicated. The domain is redirected in my C:\WINDOWS\system32\drivers\etc\hosts file. However, I would like the request from urllib2 to go to the "real" domain and ign...

getnameinfo prototype asks for sockaddr not sockaddr_in ?

The getnameinfo prototype asks for sockaddr but I have only seen examples using sockaddr_in. Can this example be re-written for sockaddr ? sin_family becomes sa_family but what about sin_port and sin_addr ? How are they included in sa_data ? struct sockaddr{ unsigned short sa_family; char sa_data[14]; }; struct soc...

HTTP Authentication if site accessed by IP through .htaccess

Hi all, Is there an easy was to force users to login if they access a page by IP (eg http:// 100.200.300.400/page.html) but not if they access the site through the regular URL (eg http:// site.com/page.html)? I am familar with HTTP authentication and PHP but not quite so comfortable with .htaccess directives. Many thanks for any help!...

Python thinks I'm a different IP

I'm trying to set a page that displays the visitor's IP. All the methods I have tried show an IP different from the IP my computer has. I've tried: Looking up http://www.whatismyip.com/automation/n09230945.asp Using socket.getaddrinfo(socket.gethostname(), None)[0][4][0] How can I find the real IP of the visitor? ...

In UDP, destination

In UDP, destination IP and destination port number are used to demultiplex the packets, but in TCP destination IP, source IP, destination port number and source port numbers (4-tuple) all needed to distinguish between the connections why reasoning for this usage. ...

Matching an IP address with an IP range?

I have a MySQL table setup as follows: +---------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------+-------------+------+-----+---------+----------------+ | ipaddress_s | varchar(15) | YES | MUL | NULL | | | ipaddres...

ISA Route Add Question

I asked this over at Serverfault.com but figured actually, you guys here may be more likely to have the knowledge to help. Hi All, I have a situation where I have and ISA 2006 server (on Win2k3) that has an internal and an externaly facing NIC's. All works fine but I need to add a couple of routes for the following reason: Our monito...

compare two ip with C#

How I can compare two IP address? string ip1 = "123.123.123.123"; string ip2 = "124.124.124.124"; I need some like this: if(ip1 == ip2) { //true } ...

Convert IP address string to binary in Python

As part of a larger application, I am trying to convert an IP address to binary. Purpose being to later calculate the broadcast address for Wake on LAN traffic. I am assuming that there is a much more efficient way to do this then the way I am thinking. Which is breaking up the IP address by octet, adding 0's to the beginning of each oct...

Detecting a change of IP address in Linux

Does anyone know a way to detect a change of IP address in Linux. Say I have dhcpcd running, and it assigns a new IP address, is there a way I can get a notification when it changes? I can't use D-Bus, because this is an embedded ucLinux build that doesn't have it. inotify on something in /proc/net/ ? ...

Where to find great proxy servers for testing GeoIP services?

We would like to test a GeoIP-Service. Therefore we need to go to the site with an IP from another country. There are a lot of free proxy lists like http://nntime.com/proxy-country/ The problem with them is, that only the CoDeen-Proxies are working. But with CoDeen you can't select your country of origin (the same as with TOR). You get...

PHP: detecting IP's entry to a specific IP range

I have the PHP function that determines whether one IP goes to a specific IP range, but I don't know how to find out the IP's network and mask. Can anyone help with this? <? // Example of calling and checking IP-address 192.168.0.4 // belonging to a network 192.168.0.0 with mask 255.255.255.248 if(ip_vs_net("192.168.0.4","192.168.0.0",...

3G/Edge/GPRS IP addresses and geocoding

Hey all! So, we're looking to develop a mobile website. On this mobile website, we'd like to automatically populate a user's location (with proper fallback) based on their IP address. I'm aware of geocoding a location based on IP address (mapping to latitude, longitude and then getting the location with that information). However, I'm ...

Can you explain how this ip_to_string function works?

#define IPTOSBUFFERS 12 char *iptos(u_long in) { static char output[IPTOSBUFFERS][3*4+3+1]; static short which; u_char *p; p = (u_char *)&in; which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1); _snprintf_s(output[which], sizeof(output[which]), sizeof(output[which]),"%d.%d.%d.%d", p[0], p[1], p[2], p[3]); ...

Change IP where domain is pointing

This is probably a very strange request. I need to programmaticaly (via code) change the IP where a domain name is pointing to. IE: xyz.com points to 100.100.100.100 setIP('xyz.com','100.100.100.100'); I know this [code] is practically impossible, however, what I need is to do this via domain host API etc or other possible ways you ...

How to calculate a subnet mask from IP address?

I just want to understand how this software works: http://www.subnet-calculator.com/ ...

How to get a list of IPs for a remote computer in Ruby

I have a app that needs to connect over a socket to a remote computer that now has multiple IP addresses. Is there a way to turn the remote Hostname or IP a list of all the IPs that the system has? Possibly (Hostname | Ip) => (RemoteMAC) => IPs? These will be windows server 2003/2008 machines. ...

How to get the LAN IP of a client using Java?

How can i get the LAN IP-address of a computer using Java? I want the IP-address which is connected to the router and the rest of the network. I've tried something like this: Socket s = new Socket("www.google.com", 80); String ip = s.getLocalAddress().getHostAddress(); s.close(); This seem to work on some cases, but sometimes it retu...

window opencv AXIS 213 IP streaming video capture

i am working on window os but not able to use cvCreateFileCapture to capture streaming video. It returns NULL.Is it possible to make it work? Or is there other solutions? ...