ipv6

How to check if someone connected via IPv6 / IPv4

Hi there, I want to check via php if someone connects to my site via IPv4 or IPv6. The client address can be found in $_SERVER["REMOTE_ADDR"] but how to check if it's IPv4 or IPv6 ? Thank you for your time Andre ...

IPv6 multicast addressing: Are all "Group IDs" considered valid/user-assignable?

Hi all, I'm seeing some "interesting" behavior in my program's link-local IPv6 multicast routines. It seems that if I set any of the upper 16 bits of the 112-bit Group ID field, then MacOS/X will no longer accept those multicast packets. My question is, is this a bug in the MacOS/X network stack, or is there some reason why setting th...

What are the possible return values for $_SERVER['REMOTE_ADDR'];?

In writing a login module, I want to log IP's as an additional measure for verifying who's on the other side is still the same person on the other side. I'm using $_SERVER['REMOTE_ADDR'] as one (of many) ways to get the remote machine's IP address. Aside from an IPv4 or IPv6 address, are there any other values i should expect this to r...

Does Mongrel do IPv6 well?

I'm using mongrel + apache 2.2 + mod_proxy_balancer. apache2.2 is IPv6 well http://httpd.apache.org/docs/2.2/en/bind.html#ipv6 Does Mongrel do IPv6 well? Platform:RHEL ruby:1.8.6 ...

how to force python httplib library to use only A requests

The problem is that urllib using httplib is querying fro AAAA records what i would like to avoid. Is there a nice way to do that? >>> import socket >>> socket.gethostbyname('www.python.org') '82.94.164.162' 21:52:37.302028 IP 192.168.0.9.44992 > 192.168.0.1.53: 27463+ A? www.python.org. (32) 21:52:37.312031 IP 192.168.0.1.53 > 192.168...

How to convert an address from IPv4 to IPv6

Is this possible? How can you convert an ipv4 to an ipv6 address? a few example from here: 0.0.0.0 -> :: 127.0.0.1 -> ::1 I'm searching a solution in Java. Thanks, ...

how to determine value for ipv6mr_interface field of ipv6_mreq structure

I am trying to create a BSD socket to listen for messages from a specific IPv6 multicast address. I currently have no problem creating the socket listening on the correct address 0::0. The problem is that I am running on a small embedded linux server with multiple NICs; here the ipv6mr_interface field of the ipv6_mreq is important. By...

How to support both IPv4 and IPv6 connections

Hello, I'm currently working on a UDP socket application and I need to build in support so that IPV4 and IPV6 connections can send packets to a server. I was hoping that someone could help me out and point me in the right direction; the majority of the documentation that I found was not complete. It'd also be helpful if you could poin...

Does Rails 2.0 do IPv6 well?

I'm using mongrel + apache 2.2 + mod_proxy_balancer. apache2.2 is IPv6 well http://httpd.apache.org/docs/2.2/en/bind.html#ipv6 Does Mongrel do IPv6 well? Platform:RHEL ruby:1.8.6 /actionpack-2.0.5/lib/action_controller/request.rb which is worried about the particularly . ...

How to initialize struct in6_addr?

I do know one method to do this, const struct in6_addr naddr6 = { { 0x3f, 0xfe, 0x05, 0x01, 0x00, 0x08, 0x00, 0x00, 0x02, 0x60, 0x97, 0xff, 0xfe, 0x40, 0xef, 0xab }}; but could not with this, const struct in6_addr naddr6 = { { { 0x3ffe0501, 0x00080000, 0x026097ff, 0xfe40efab } } }; and it seems th...

HttpContext IP Problem

Hi, I have a problem when I use HttpContext.Current.Request.UserHostAddress, some times returns "192.168.0.17" (IPv4) and some times returns "fe80::99be:a05d:7938:1c30%8" (IPv6), calling from the same computer and navigator. What I do to return always IPv4? ...

getaddrinfo() returning only ::1 as IPV6 address,

I'm using getaddrinfo() to return all assigned IP addresses (both IPv4 and IPv6) for my local machine. I see that on XP, getaddrinfo() only returns ::1 ( I installed the IPV6 stack on 2 XP machine and configured the IPV6 address and pinged the both peers. they are working fine. I check the Ipconfig its all working fine. ) ...

How do you determine equality between two ipv6 addresses?

I have an application that allows administrators to specify valid IP addresses from which web service requests can be made. I simply take the configured IP addresses and compare them against the incoming request. Comparing two IPv4 addresses is trivial and I thought comparing two IPv6 addresses would be as well. However, my networking...

How can I match IPv6 addresses with a Perl regex?

So I need to match an ipv6 address which may or may not have a mask. Unfortunately I can't just use a library to parse the string. The mask bit is easy enough, in this case: (?:\/\d{1,3})?$/ The hard part is the different formats of an ipv6 address. It needs to match ::beef, beef::, beef::beef, etc. An update: I'm almost there.. /^...

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? ...

WCF IPv6 Endpoints

I'm investigating the possibility of using the Peer 2 Peer along with WCF in a Windows app for an EPoS terminal. The app will sit on a number of PC's in a local network; there will only ever be one instance of the app per PC. My current thinking is that my app starts up and joins the peer mesh, on joining the mesh it periodically shout...

IPv6 multicast addresses: Is the Group ID field effectively 112 bits or 32 bits?

Hi all, I'm trying to understand the rules for choosing an IPv6 multicast address Group ID, and the RFC seems somewhat inconsistent. For example, in RFC 2373 section 2.7 this diagram is shown: | 8 | 4 | 4 | 112 bits | +------ -+----+----+---------------------------------------------+ |11111111...

Comparison operations on ipv6 address using C++

hi As IPV6 address has 16 bytes and their is no data type to store it in c++, i wanted to store the IPV6 address, and do some comparisions between to IPv6 address, please let me know how to do it ...

Windows Peer to Peer Global_ Group without third party ipv6 tunnel

I have been trying to develop a peer to peer application that uses Micosoft's Peer to Peer Group library. Basing my work on the Creating a Group Chat Application acrticle on msdn. This works fine for local groups and will also work for global groups if I have a thrid party tunnel adapter installed such as the gogo6 client. However fro...

Force python mechanize/urllib2 to only use A requests?

Here is a related question but I could not figure out how to apply the answer to mechanize/urllib2: http://stackoverflow.com/questions/1540749/how-to-force-python-httplib-library-to-use-only-a-requests Basically, given this simple code: #!/usr/bin/python import urllib2 print urllib2.urlopen('http://python.org/').read(100) This result...