ipv4

problem with IPv4 protocol...

using IPv4 protocol around 4 billion computers can be connected.(including classA, class B, class C networks). What should be done if the number exceeds beyond 4 billion? what are the consequences of such a situation? ...

Finding the type of data in IPv4 packet

Excluding options field in IPv4 header, after 20 bytes of header, data follows. That data may be TCP packet, or UDP etc. Now given a IPv4 packet (with header and data), How to find out which type of transport layer packet (TCP/UDP/etc.) is present in data? Actually I am parsing a IPv4 packet so I need to understand this. ...

IIS Request.UserHostAddress returning IPV6 (::1), even when IPV6 disabled.

In the properties section of my network card, on windows server 2008, i have IPV6 disabled, leaving only IPV4 enabled. However in ASP.NET, Request.UserHostAddress returns '::1', an IPV6 address. Has anyone got any idea how to revert back to IPV4? ...

Programmer using Request.UserHostAddress wants an integer

I'm using Request.UserHostAddress in a C# ASP.NET MVC web application to get the IP address of the client. Request.UserHostAddress returns a string which is simple enough to convert into its integer form. However, this appears to be 2 levels of inefficiency because deep in the bowels of the .Net stack it probably takes the integer repre...

Is it possible to receive a web client request from a reserved IP block ?

My webapp received a request from 10.18.255.249 (but the 10.0.0.0/9 cidr block is reserved) according to https://www.arin.net/knowledge/rfc/rfc1918.txt How is this even possible? ...

Update Route Tables on Windows Mobile 5 or 6

Anyone know how to show and update the routing table on Windows Mobile (like you would with the route utility on Windows)? My first choice would be a utility, second choice would be C# code, third choice C code. ...

How can I generate a range of IP addresses in Perl?

I need to generate a list of IP-addresses (IPv4) in Perl. I have start and end addresses, for example 1.1.1.1 and 1.10.20.30. How can I print all the addresses inbetween? ...

Device auto discovery in IPv6/IPv4 network

We have Win CE IPv6/IPv4 devices installed in a room and connected to a network. Every now and then a person would come with a laptop, plug it into the network and run a diagnostics program. This program should be able to somehow auto find or discover all those devices. The catch is that device IPs are unknown to the diag program. I've ...

How to calculate an IPv6 IP Number?

I'm adding GeoIP tracking to WCF Web Service using MaxMinds' GeoIP Lite Country. All works well for their IPv4 database but they don't give any samples to calculate an IPv6 IP Number. I've contacted them and they said to use a search engine. Anyone have a sample they're willing to share? Any language will do. ...

Converting C++ TCP/IP applications from IPv4 to IPv6. Difficult? Worth the trouble?

Over the years I've developed a small mass of C++ server/client applications for Windows using WinSock (Routers, Web/Mail/FTP Servers, etc... etc...). I’m starting to think more and more of creating an IPv6 version of these applications (While maintaining the original IPv4 version as well, of course). Questions: What pitfalls might I...

What is the total amount of public IPv4 addresses?

Yes, I am needing to know what the total number possible IPs in the public IPv4 space. I'm not sure where to even get a neat list of all the IP address ranges, so could someone point me to a resource to calculate this myself or calculate the total number of IPs for me? Also, by Public IPs I mean not counting reserved or private-range...

Use UdpClient with IPv4 and IPv6?

A little while ago I created a class to deal with my LAN networking programs. I recently upgraded one of my laptops to windows 7 and relized that windows 7 (or at least the way I have it set up) only supports IPv6, but my desktop is still back in the Windows xp days, and only uses IPv4. The class I created uses the UdpClient class, and...

Scrubbing IPv4 dotted-quad addresses in SQL

Given a table containing dotted quad IPv4 addresses stored as a VARCHAR(15), for example: ipv4 -------------- 172.16.1.100 172.16.50.5 172.30.29.28 what's a convenient way to SELECT all "ipv4" fields with the final two octets scrubbed, so that the above would become: ipv4 ------------ 172.16.x.y 172.16.x.y 172.30.x.y ...

How to find out on which internet addresses a java program can listen.

My program needs to listen incoming socket connections (lets agree on port 8765), but it doesn't know which addresses it can bind on a particular machine. Of, course, it could simply to listen to all of them, but it need to send to the client program over a different(slower) channel the addresses which it should try in order to rich me ...

REMOTE_ADDR and IPv6 in PHP

Is it safe to assume that $_SERVER['REMOTE_ADDR'] always returns a IPv4 address? Thanks! ...

Is gethostbyname guaranteed to return hostent structures with IPv4 addresses?

I cannot use getaddrinfo(...) for resolving hostnames and therefore must stick to gethostbyname(...) Is the gethostbyname(...) function guaranteed to return hostent structures that contain only IPv4 (AF_INET) addresses on success, so that the following code would always lead to an IPv4 address: int resolve(const char *name, struct in_a...

VB.Net Return IPv4 Address

How can I return the IPv4 address in VB.Net? eg. 192.168.1.5 ...

API for configuring static IP addresses in an android application

Is it possible to set the IP address of an interface in Android within an application? I can query the available interfaces and their current addresses using java.net.NetworkInterface, but this doesn't provide a facility to change these. Did I just miss something somewhere or is it not allowed? I was hoping to be able to make my applica...

Converting an IP address to a number:

Question: When I convert the IP address 192.168.115.67 to a number, is it done like this: 192*256^3 + 168*256^2+115*256^1+67*256^0 = 3232265027 or like this: 192*256^0 + 168*256^1+115*256^2+67*256^3 = 1131653312 I find both variants online, and frankly it doesn't matter as long as I do all the internal IP-range comparison using the sam...

How do I get the IPv4 subnetmask on interface with both v4 and v6 address?

I have an InterfaceAddress that returns an ipv4 address (4 octets). However the network prefix length seems to be for the ipv6 address associated with the interface (it's returning as 128). How do I find the correct network prefix length? Enumeration<NetworkInterface> NetworkInterface.getNetworkInterfaces() for (; interfaces.hasMoreElem...