Questions tagged [ipv4]

IPv4 is the "old style" IP protocol currently used in most circumstances.

IPv4 is the protocol which has been in use since the early 1980s, described in IETF publication RFC791. It gets gradually replaced with nowadays as the IPv4 addresses become exhausted.

More information at http://en.wikipedia.org/wiki/Ipv4

1045 questions
10
votes
1 answer

Get only IPv4 ips via NodeJS express

I have a NodeJS express service running on Centos and listens to GET requests and I need to identify the IP of the user. Currently, I'm using this script ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress || …
Avi L
  • 1,558
  • 2
  • 15
  • 33
10
votes
4 answers

Swift 3 how to resolve NetService IP?

Just trying Bonjour in swift 3 Here is my code , I can receive the delegate func netServiceDidResolveAddress(_ sender: NetService) { print("netServiceDidResolveAddress service name \(sender.name) of type \(sender.type)," + "port…
Webber Lai
  • 2,014
  • 5
  • 35
  • 66
9
votes
2 answers

How to get IPv6 Address in c#?

I use Request.UserHostAddress, can only get IPv4 address, how to get IPv6 address of a visitor?
Eric Yin
  • 8,737
  • 19
  • 77
  • 118
9
votes
4 answers

Change from IPv4 to IPv6: What are its effects on web development?

Do web developers need to be concerned by the end of IPv4? Or is this strictly a hosting level concern? What can the average PHP/JavaScript/Ajax etc. developer do to mitigate the impact of the changeover? Discuss! (if this has come up before I…
YsoL8
  • 2,186
  • 5
  • 29
  • 47
9
votes
1 answer

Check network interface ip version ios

I am trying to understand what my active network interface ip version is - IPv4 or IPv6. I am using the next instructions http://www.brianjcoleman.com/tutorial-how-to-test-your-app-for-ipv6-compatibility/ to test my app for IPv6 compatibility. I…
Igor Nazarov
  • 193
  • 1
  • 6
9
votes
4 answers

Running Spring app on local network IP 192.168.X.X

I run my Spring web app on localhost, so both addresses work: http://localhost:9999/app http://127.0.0.1:9999/app I would also like to see this app running on concrete IP of my machine (in order to access it from a mobile, but that is less important…
jarosik
  • 4,136
  • 10
  • 36
  • 53
9
votes
5 answers

Java regex for accepting a valid hostname, IPv4, or IPv6 address

Does anyone have a good (preferably tested) regex for accepting only a valid DNS hostname, IPv4, or IPv6 address?
ljbade
  • 4,576
  • 4
  • 30
  • 35
9
votes
3 answers

Efficient way to store IPv4/IPv6 addresses

I am working on a C/C++ networking project that it should be able to both use the IPv4 and IPv6 networking stacks. The project works only on Linux. So, I tried to find an efficient way to store the IP addresses and differentiate between the…
evelina
  • 157
  • 1
  • 1
  • 8
9
votes
4 answers

Given a subnet range and a list of IPs select all rows which the IPs fall between

I am working on modeling various aspects of a network in a database. One of the more annoying issues that we are dealing is creating subnet ranges and then determining if a given set of IPs are within those ranges. Our current model accounts for the…
ahsteele
  • 26,243
  • 28
  • 134
  • 248
9
votes
4 answers

Testing if a network in cidr notation overlaps another network

I'm searching for a php algorithm that efficiently test if one cidr notated network overlaps another. Basically I have the following situation: Array of cidr adresses: $cidrNetworks = array( '192.168.10.0/24', '10.10.0.30/20', etc. ); I…
Damien Overeem
  • 4,487
  • 4
  • 36
  • 55
8
votes
1 answer

How to specify the multicast SEND interface in Python?

There is quite a few examples to RECEIVE multicast messages with a spcific network interface (NIC, e.g. eth0, 127.0.0.1 etc). However, there is few discussion/examples about how to SEND multicast (UDP) messages to a specific interface, e.g. local…
user1268888
  • 83
  • 1
  • 4
8
votes
3 answers

Why in a IPV4 packet, checksum is calculated against the IP header and not the entire packet like transport protocols tcp/udp?

Why in a IPV4 packet, checksum is calculated against the IP header and not on the data like transport protocols tcp/udp?
kuchiku
  • 113
  • 1
  • 2
  • 5
8
votes
4 answers

Porting getifaddrs to Win XP

I'm trying to port a MacOSX app to windows and I've come up against a problem around getifaddrs. Basically windows does not support it. I'm trying to figure a way to re-implement it (for AF_INET and AF_INET6) but the "equivalent" functionality on…
Goz
  • 61,365
  • 24
  • 124
  • 204
8
votes
5 answers

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?
planetp
  • 14,248
  • 20
  • 86
  • 160
8
votes
2 answers

Binding Sockets to IPv6 Addresses

I am trying to write a web server that listens on both IPv4 and IPv6 addresses. However, the code that I originally wrote did not work. Then I found out that the IPv6 structures work for both IPv4 and IPv6. So now I use the IPv6 structures…
tpar44
  • 1,431
  • 4
  • 22
  • 35