Programming :: How To Validate An IPv6 Address Through Javascript
Jun 18, 2010How can I validate an IPv6 address through javascript before using the IPv6 value in my cgi script?
View 2 RepliesHow can I validate an IPv6 address through javascript before using the IPv6 value in my cgi script?
View 2 RepliesI have been struggling to get FC15 to act as an IPv6 router for a while now, am sure I am missing something trivial.. The idea is that I have a ppp / adsl connection (this works fine), use the wireless card on my pc with hostapd and dhcpd to provide connections to other pcs (works fine), and radvd to delegate ipv6 addresses.
The issue seem to be that as soon as I turn on ipv6 forwarding (net.ipv6.conf.all.forwarding =1), the ppp connection no longer gets an IPv6 address. This means the router cannot ping any ipv6 address outside my network.
If I disable ipv6 routing, my router gets an IPv6 address on its ppp connection, and can ping things such as ipv6.google.com just fine, however (of course) no packets are forwarded from my network and radvd complains that forwarding is disabled.
I am trying to install a Red Hat cluster on my servers. In order to configure an heart bit between the servers I must give a valid multicast address. I wanted to know if there is a way to validate a multicast address before using it. For example if it is already in use i don't want to use it.
I read a little about it and there is a Perl module called IO::Socket::Multicast: [URL] There is a tool called mcasttrest.pl: [URL] Oracle use it to test multicast. But I am not sure what will do the trick in Red Hat cluster.
I am having an XML file,i want to verify the file for its syntax,
View 14 Replies View RelatedIs there any inbuilt function other than strncmp which can evaluate a string.my requirement is " if all 10 values are spaces print 1 else if it contains some values print 2 else print 3.if i use strlen, even space is counted.I know that i can evaluate using for loop by checking 1 by 1 char, and using strcmp function, is there any other way?
View 2 Replies View RelatedI need do a small interfaz, it works under bash. I read the user name and password from the terminal then i need validate this data.
My principal dude is:
how look in the /etc/passwd file a user and passwd?
The problem is the password is encrypted and i need compare with the data I read.
Only I can use BASH because it is school homework.
I have a problem with my ipv6 connection: although I can't get ipv6 address with DHCP, I can't use ipv6 network. I tried [URL], and the tortoise is static. I want to fix it out , so I use 'ifconfig' to see my network configuration:
eth0 Link encap:Ethernet HWaddr 00:50:8d:ef:dd:06
inet addr:210.77.9.102 Bcast:210.77.11.255 Mask:255.255.252.0
inet6 addr: 2002:d24d:b64:4:250:8dff:feef:dd06/64 Scope:Global
[code]....
Some people told me that the fisrt ipv6 address was wrong and unsuitable for ipv6 connecting. I tried /ect/init.d/networking restart but it didn't work. How can I use the second address as my ipv6 address and fix the problem out ? Now it seems there is not problem with the ip adress but the route. After watching some video, I suddenly could use ipv6. I did 'ifconfig' again and nothing was different. However, the result from the command 'ip -f inet6 route' changed: the last default route was gone and there was only one default route.
I have a networking problem with my computer. Under Windows, the computer can get both v4 and v6 address via DHCP. However, the same computer can only get v4 address under Ubuntu. Does anybody know how to solve this problem?
View 3 Replies View RelatedI have a host and typing ifconfig I get:
eth0 Link encap:Ethernet HWaddr 00:0E:7F:4F:E4:09
inet addr:130.130.9.9 Bcast:130.130.255.255 Mask:255.255.0.0
inet6 addr: fe80::20e:7fff:fe4f:e409/64 Scope:Link
[code]...
and to do a test i want to disable or delete the ipv6 address, but mainteining the other configured parameters. Looking on the ifcfg config file I have
DEVICE=eth0
BOOTPROTO=static
BROADCAST=130.130.255.255
[code]....
and nothing about IPv6... Then, using ifdown-ipv6 could i remove only the ipv6 address?
I want to add an ipv6 address in linux.
i am going to use the following command.
# /sbin/ifconfig <interface> inet6 add <ipv6address>/<prefixlength>
Can anyone explain how this command will works?
Is that prefix length value is fixed to 64 or is it vary?if so,can you explain how it could be?
When I do ifconfig than IPv6 address is appearing on an interface. However when I run the system-config-network and select to edit same interface than it shows the normal ip4 192.168.1.x address. Why is it like that? ipv4 at one place and ipv6 at other?
View 3 Replies View RelatedI've registered a top-level domain site.com pointing to my IPv6 address (6to4 tunnel). Everything looks ok, dig command, nslookup command shows requested output, but: I'm not able to connect to mail.site.som on 110 port. I still get an error messaged, that connection has been refused. I've populated the ip6tables with commands to open desired port but with no success. I'm listening on 25, am able to connect to this port, but not to 110.
Command netstat -an | grep "LISTEN " shows that I'm not listening on 110 port, although I'm just added this port to the firewall exceptions. Telnet to ::1/tunneled IPv6 address is successful. Postfix installed, configured properly, ping6 working. Everytime I try to send email from external domain, I'm advised that the mail domain is not pointing to A record.
I am trying to get the MX record using dig command supplying IPv6 address of host. but i am getting connection timed out .
while with IPv4 address and host-name its working fine.
I have retrieved IPv4 address successfully using
Code:
struct ifreq ifr;
fd = socket(AF_INET, SOCK_DGRAM, 0);
ifr.ifr_addr.sa_family = AF_INET;
ioctl(fd, SIOCGIFADDR, &ifr)
for IPv6 address I tried
[Code]....
I have an Ubuntu 10.04 server/router with IPv6 internet connectivity (I have an internet routable /64 subnet). Since I have this abundance of IPv6 addresses I wanted to try and assign v6 addresses to specific users on the local system. I've been looking at ip6tables with packet mangling but I don't seem to be able to find out how to do this or if this is even possible.
Current configuration: eth0: Local network, has the /64 IPv6 public range active and the IPv4 LAN range. tun0: 6in4 tunnel with a ISP assigned public v6 address. eth1: Standard IPv4 internet connection.
All users on my system use the v6 address configured on tun0. I want to force them to use the /64 range which is configured on eth0. If I can force users to use a specific v6 address, I'll configure more then one v6 address on this interface based on the users userID on the system.
I use DNS on my server as a chasing DNS so its not fully configured. I seem to be having trouble with IPV6 addresses. I'm guessing this is linked to the 6to4 tunnel I have set up to my windows box, but I'm not really sure.
Code:
May 21 18:00:16 hyrule named[1148]: error (network unreachable) resolving 'D.ROOT-SERVERS.NET/AAAA/IN': 2001:dc3::35#53
May 21 18:00:16 hyrule named[1148]: error (network unreachable) resolving 'B.ROOT-SERVERS.NET/AAAA/IN': 2001:500:1::803f:235#53
May 21 18:00:17 hyrule named[1148]: error (network unreachable) resolving 'zg.akamaitech.net/AAAA/IN': 2001:503:a83e::2:30#53 .....
I've two WLAN AP's with both a different IPv6 subnet. When I change from one AP to the other, my IPv6 Global address stays valid and so is the default IPv6 gateway. After a while I get another Global address from the second AP's subnet and another default IPv6 gateway for the second subnet. Both have the same metric. IPv6 connectivity is broken now. When I disable wireless on the laptop and reenable it, it flushes all IP addresses and receives new ones and connectivity is restored. Does anyone know if this is normal behaviour or should it normaly flush all the addresses when changing network? It's a bit silly to have to disable/enable wireless all the time..
View 4 Replies View RelatedI addes IPv6 address to my interface as
Code:
ifconfig eth0 inet6 add 3fff:ffff:6:5:4:3:2:1
But, when I restart the network service this IPv6 address is gone. How could I make it as a permanent IPv6 address( that should be edited or deleted when I want but not when I only restart the network)to my interface?
Please send me the code how to assign ipv6 address using ioctl system call using C.
View 1 Replies View RelatedOn our Home LAN, we have several different SuSE machines running. Now, I have run into a problem which I cannot solve myself. One of the computers (a 11.2) just doesn't receive any IPv6 lease from the main router. The router has radvd running and distributes addresses to the other computers just fine. The network card on the box ist a
[Code]...
I added an init script numbered just before bind9 starts, which needs to see the ipv6 link-local address on eth0. Sometimes this address is not configured, yet. In all cases it eventually is configured.
I am unable to find any script that is configuring the ipv6 link-local address (which is in part based on the MAC address). Does anyone know if there is some script or program that is supposed to be doing this, or is it an internal kernel function?
One workaround I am considering is making this init script go into a loop around sleep 1 to keep checking for the ipv6 address. But I'm concerned this might cause some problems. Any suggestions? I don't want to let it move on to start bind9 until the configuration this script does (more ipv6 addresses) is done.
This is on Ubuntu 9.10 server (for which there is not a prefix choice).
I can reach other hosts by means of their global addresses by either the IP address or hostname (that has the global address). What I want to (also) do is have a hostname that references the IPv6 link local IP address (an AAAA record in DNS, or just the fe80::<whatever> address in /etc/hosts) and use that host name in commands to access that host. The problem is, an interface ID is needed when making such a reference.
It sure looks like the programs just pass the host name string on to the resolver library, which does not understand the significance of the '%' even though it could find and see that the name preceding the '%' is consistent with that being an IPv6 link local address (e.g. the logic could have been "split at first % and see if preceeding name is found as a link local address and accept that if so, or ignore the split otherwise" ... but it isn't). Is there a different syntax for this ... or was it overlooked in the design of programming around IPv6?I want to be able to address a host by its link local address, while still using a mnemonic instead of having to type the IPv6 address.
There is this sample web page: [URL] and it has a clickable link / button that executes a JavaScript function: (Right-Click and Copy Shortcut would give this piece of code)
Code:
javascript:__doPostBack('lbtnUpdateStatus','')
whereas the source code for the link / button is as follows:
Code:
<a id="lbtnUpdateStatus" href="javascript:__doPostBack('lbtnUpdateStatus','')">
I want to automate the above function / link along with the said URL so that I won't have to open the webpage and click the button / link. I want a single URL hitting which we won't need to do the extra effort of "clicking the link / button" that executes the JavaScript function given above. I can't automate this task in the source webpage itself because that has to be there as it is for the users who access the webpage. How to achieve it?
I got some useful information here: [URL] but I want to call a javascript function along with a URL such as this:
Code:
[URL] javascript:alert("OKAY")
but the above line of code won't work.
Check out the frontpage of mail.com - how do I do the scrolling images in Javascript, like it's doing?
View 4 Replies View RelatedI went to [URL] the other day, and I'm really impressed with the way, when you click on domain, it adds it to the cart WITHOUT A REFRESH. But what I really want to know is - how does it do the slick little effect when you click "Add to basket", when it "appears" on the right hand side?
View 4 Replies View RelatedI have some variables that are loaded from mysql - in mysql, the line breaks are not indicated by ' or '<br>' or anything -they are just line breaks. the variable is loaded into javascript and then inserted into a <pre> element. the line breaks are not showing up.
pre1 = pre1.replace(/>/g,">"); - this works well, naturally. but how do i get those line breaks to show up as line breaks in a browser?
I've tried many variations of something like:
Lets say I have a site "Website1.com"
On that site I want to run a little javascript that verifies that the site was accessed as "Website1.com" and not "dev-Website1.com"
If it was accessed correctly, nothing happens. If it was accessed incorrectly, it displays an error saying "You are trying to access this site incorrectly."
What is the simplest way to accomplish this?
I am using window.onbeforeunload to keep people from accidentally leaving. I was hoping to intercept this event, run my own dialog box and load another page that closes the window, or of course, cancel.
I'm needing this because my site is a single page and I can't figure out how long people are visiting for, if I could load an exit page, then I can figure this out.
var param = function() { <whatever> } ;What exactly does the above MEAN, and why have they included this in the language this way?
View 6 Replies View RelatedIn my book, this is an example of a recursive algorithm:
var reverseArray = function(x,indx,str) {
return indx == 0 ? str : reverseArray(x,--indx,(str+= " " + x[indx])) ;; }
var arr = new Array('apple','orange','peach','lime');
var str = reverseArray(arr,arr.length,"");
alert(str) ;
I'm trying to understand it, I'm stuck at the (str+= " " + x[indx])) part - that part of the function definition expects an ARGUMENT, am I right? What's being passed to it is a bit of PROGRAM, the str+= stuff. So - how is it working?