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
31
votes
8 answers

How to configure a static IP address, netmask, gateway programmatically on Android 3.x or 4.x

I have checked in Stack Overflow question API for configuring static IP addresses in an Android application. It works until Android 2.3. However, there is no luck on a higher API level. For example, I put the…
Yeung
  • 2,202
  • 2
  • 27
  • 50
30
votes
11 answers

How do I determine the local host’s IPv4 addresses?

How do I get only Internet Protocol version 4 addresses from Dns.GetHostAddresses()? I have the code below, and it gives me IPv4 and IPv6 addresses. I have to make it work with boxes that have multiple IPv4 addresses. IPAddress[] localIPs =…
John Ryann
  • 2,283
  • 11
  • 43
  • 60
29
votes
3 answers

Why request.getRemoteAddr() returns ipv4 or ipv6 depending on context (post query or ajax query)

I've donne a web app with Spring/GWT that uses Flash to upload files. When I send an ajax request with GWT and try to get the user ip address, I get an ipv4 address like: 127.0.0.1 but when I upload my files with flash (and so a post request on the…
Jerome Cance
  • 8,103
  • 12
  • 53
  • 106
28
votes
1 answer

List of possible internal socket statuses from /proc

I would like to know the possible values of st column in /proc/net/tcp. I think the st column equates to STATE column from netstat(8) or ss(8). I have managed to identify three codes: sl local_address rem_address st tx_queue rx_queue tr tm->when…
The_Viper
  • 391
  • 1
  • 6
  • 14
26
votes
2 answers

Node.js dns.resolve() vs dns.lookup()

I need to lookup a given host to its corresponding IP in Node.js. There seems to be two native methods of doing this: > dns.resolve('google.com', (error, addresses) => { console.error(error); console.log(addresses); }); QueryReqWrap { bindingName:…
Justin
  • 42,716
  • 77
  • 201
  • 296
25
votes
2 answers

Get destination address of a received UDP packet

Upon receiving a UDP packet, I need to respond to the sender with the address he used to send the packet to which I'm replying. The recvfrom call lets me get the address of the sender, but how do I get the destination address of the received…
Matt Joiner
  • 112,946
  • 110
  • 377
  • 526
22
votes
4 answers

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…
NTDLS
  • 4,757
  • 4
  • 44
  • 70
21
votes
1 answer

Node.js server only listening on ipv6

I am running a node.js server on port 5403. I can telent to the private ip on this port but cannot telnet to the public ip on the same port. I assume the cause of this is because node.js is only listening on ipv6. This is the result of netstat…
codeyard
  • 327
  • 1
  • 2
  • 10
21
votes
8 answers

Geolocation with IPv6?

I'm working on an IP geolocation library that uses the first three octets of an IPv4 address to determine a user's country, city, lat, lon, etc. Works like a charm. But it doesn't handle IPv6 addresses, and I'd like it to do so. Is there any way to…
benjismith
  • 16,559
  • 9
  • 57
  • 80
20
votes
4 answers

Validate IPv4, IPv6 and hostname

I'm working on a project in .net , that can connect to different machines by an IP address that the user inputs. I'm trying to validate the inputted IP Address using a regular expression. I've searched the internet for some time now, and i cannot…
Daniel
  • 1,225
  • 2
  • 15
  • 31
20
votes
4 answers

getaddrinfo and IPv6

I'm trying to understand what the getaddrinfo function returns : #include #include #include #include #include int main (int argc, char *argv[]) { struct addrinfo *res = 0 ; …
lilawood
  • 333
  • 2
  • 4
  • 10
20
votes
2 answers

REMOTE_ADDR and IPv6 in PHP

Is it safe to assume that $_SERVER['REMOTE_ADDR'] always returns a IPv4 address? Thanks!
Alix Axel
  • 151,645
  • 95
  • 393
  • 500
16
votes
5 answers

How can I convert IPV6 address to IPV4 address?

I have application that uses IPv4 addresses (it stores them as long), so it only understands IPv4 addresses. Is it possible to convert IPv6 address to IPv4 with Java?
newbie
  • 24,286
  • 80
  • 201
  • 301
16
votes
1 answer

Difference in Ethernet and Wireless IP addresses?

This is probably a pretty basic question with a fairly simple answer, but I was just wondering if anyone could clarify why there is a different IP address for my Ethernet connection and my Wireless LAN connection, rather than just one IP address for…
Lauripops
  • 412
  • 1
  • 3
  • 11
15
votes
7 answers

Representing IPv4/IPv6 addresses in Oracle

In Oracle, what is the appropriate data type or technique for representing network addresses, which addresses may be IPv4 or IPv6? Background: I'm converting a table recording network activity, built using the PostgreSQL inet data type to hold both…
pilcrow
  • 56,591
  • 13
  • 94
  • 135
1
2
3
69 70