validate IPV6 address in windows using c++


 
Thread Tools Search this Thread
Top Forums Programming validate IPV6 address in windows using c++
# 1  
Old 05-28-2009
validate IPV6 address in windows using c++

I know there is a function inet_tpon for unix platforms to validate ipv6 addresses.But i need an equivalent of windows.When i use this function with the header file <winsock2.h> the visual studio 2005 on win2003 issues an error saying identifier not found

Smilie
# 2  
Old 05-28-2009
Not sure if this guide will help you. It has been a long while since I experimented with IPv6.

IPv6 Guide for Windows Sockets Applications (Windows)

Look at the "function calls" section.

-----Post Update-----

By the way, I found this:

http://msdn.microsoft.com/en-us/libr...44(VS.85).aspx
# 3  
Old 05-28-2009
My problem is that inet_pton function is not working with Visual studio
# 4  
Old 05-28-2009
If you have actually taken the time to look at the link I gave you (likely you didn't as you replied so quickly), you'll find that the documentation indicates that function is only available since Vista or Windows Server 2008. That may explain why it doesn't work for you. And it requires another header, not winsock2.h. They're all written in the documentation.

Please take a look at that guide thoroughly and I think there must be another way to achieve what you want on Windows without using inet_pton. Windows is a different animal from Unix and you cannot always expect to use the same code as you do on Unix, and then you must seek alternatives.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

What determines DNS will query IPV6 address?

When I do simple nslookup it does not generate any query for IPV6 (AAAA). But sometimes I see DNS query for both A and AAAA are generated. What decides this? The reason I do not want AAAA query is in most of the cases AAAA records are absent. Hence, if one DNS server fails, the clients keeps... (1 Reply)
Discussion started by: broy32000
1 Replies

2. Red Hat

Find DHCPv6 server's IPv6 address

I want to find out the DHCPv6 server's ip address in the network. I went through the lease files but could find only duid/server-id and not the IPv6 address of the dhcp server. And I couldn't find any commands to get that information. Is there a way to get the DHCPv6 server's IPv6 address? ... (0 Replies)
Discussion started by: bshalini
0 Replies

3. IP Networking

IPv6 address block assign/associate with an interface

Hello all, I am trying to receive (tcp/udp/sctp) traffic from all IPs and, eventually, all ports of an IPv6 address block using as few sockets as possible short of implementing my own network stack. One possible solution was to associate an IP block to an interface then bind to that... (6 Replies)
Discussion started by: redwil
6 Replies

4. Shell Programming and Scripting

How to extract IPv6 address from string?

Hi All, Would anyone know how to modify the below, so only the IPv6 address (red) is printed, please? (in other words, what's between inet6 and the / sign) ipv6=`/sbin/ifconfig lo0:5 inet6 | grep 'inet6'` print $ipv6 Currently the output of the above script is: inet6... (7 Replies)
Discussion started by: chatguy
7 Replies

5. BSD

Link Local IPv6 Address

Hi, Am using FreeBSD7.4/i386 During IPv6 configuration, I added the following in rc.conf as Restarted IPv6 network using /etc/rc.d/network_ipv6 restart.. My problem is I need to set link local IPv6 address auto-configured.. Is my proceeding right?? I feel something missing to make... (0 Replies)
Discussion started by: Priya Amaresh
0 Replies

6. HP-UX

configuring site-local IPv6 address

How do I configure site-local IPv6 address in HP-UX box? I can get link local IPv6 address automatically when I put IPv6 up. aps39-88-root# ifconfig lan0 inet6 up (0 Replies)
Discussion started by: kirtikjr
0 Replies

7. Shell Programming and Scripting

Regular expression to extract ipv6 address

Hi all , I have a string in my weblog xheader v6-day-2011:xx:yy:zz:qq:qq:ww:ee:rr My requirement is to lookup the sting v6-day-2011 in this header and if found would like to extract the V6 ip part . v6-day-2011 is always constant for a ipv6 entry so i would like to extract every thing... (4 Replies)
Discussion started by: jambesh
4 Replies

8. Solaris

IPMP + IPv6 test address

Hi, inspired by this article, I decided to implement IPMP + IPv6 in Solaris 10. It worked for me only this way: 1. Setup # cat /etc/hostname* 10.23.10.113/24 broadcast + group data failover up <- hostname.e1000g0 0.0.0.0/24 broadcast + group data -failover deprecated up standby... (3 Replies)
Discussion started by: masloff
3 Replies

9. Shell Programming and Scripting

Validate an IP address - Return to menu

hi! I need a script that, among other things, presents a menu to the user, checks the user input for an IP address (in quad dotted notation), and then "redirects" (with sed) that IP address to the Firewall script. The script must check that all of the inputs are valid IP addresses (numeric,... (1 Reply)
Discussion started by: zetetic
1 Replies

10. Shell Programming and Scripting

How to validate an IP address

hi I need a simple script to do the following. I need to check the user input for 1. quad dotted notation. 2. check that all of the inputs are numeric and within 1-255 range. Could someone please help me? I tried to use egrep to check for dotted notation. quad=1.1.1.12 ... (5 Replies)
Discussion started by: sabina
5 Replies
Login or Register to Ask a Question