ipv6

Network connection check crashing on IPv6 networks in Swift

ぃ、小莉子 提交于 2019-12-02 02:50:06
I've recently got an app rejected for not being compatible with IPv6. The app was causing a crash when the following code was called. I suspect the crash is because it makes use of SCNetworkReachabilityCreateWithAddress when Apple recommends to not use that anymore. Could anyone give me a hand and help making this code below compatible with both IPv6 and IPv4? Code import Foundation import SystemConfiguration public class Reachability { class func isConnectedToNetwork() -> Bool { var zeroAddress = sockaddr_in(sin_len: 0, sin_family: 0, sin_port: 0, sin_addr: in_addr(s_addr: 0), sin_zero: (0, 0

IPv6 Multicast example

风格不统一 提交于 2019-12-02 02:30:35
I've searched for examples of how to implement a simple ipv6 multicast example, however I have only found examples using ipv4. Can anybody provide a simple "helloworld" example of ipv6 multicasting? Here is a simple client server example. Incidentally running it on multiple machines on a network wil get all the machines chatting to each other, good for testing automatic discovery on the network. import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.MulticastSocket; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class

Bind Jetty to IPv6 address

自古美人都是妖i 提交于 2019-12-02 00:12:18
I am trying to bind Jetty to listen only to IPv6 address. I am using Jetty 7.4.2.v20110526. my jetty.xml: <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.nio.SelectChannelConnector"> <Set name="host">::1</Set> <Set name="port"><SystemProperty name="jetty.port" default="8070"/></Set> <Set name="maxIdleTime">30000</Set> <Set name="Acceptors">2</Set> <Set name="confidentialPort">8443</Set> </New> </Arg> </Call> the error I get: java.net.SocketException@3d3c4c09: Address family not supported by protocol family: bind; at sun.nio.ch.Net.bind(Native Method) java.net

PHP/curl: namelookup_time/dns slowing requests

删除回忆录丶 提交于 2019-12-01 22:41:55
问题 EDIT: Found part of the cause - see bottom. I'm doing a standard curl call from php. However, there seems to be a hangup during name resolution. On my OSX box, the namelookup_time is over 1 second consistently for this and other queries to the same subnet. A linux box on my subnet doing the same query has a 0.02 second response to the other subnet, so it's a problem with my box. This is a problem since our app makes many calls to this subnet to build a page, so the seconds add up. My curl

PHP/curl: namelookup_time/dns slowing requests

我只是一个虾纸丫 提交于 2019-12-01 22:39:20
EDIT: Found part of the cause - see bottom. I'm doing a standard curl call from php. However, there seems to be a hangup during name resolution. On my OSX box, the namelookup_time is over 1 second consistently for this and other queries to the same subnet. A linux box on my subnet doing the same query has a 0.02 second response to the other subnet, so it's a problem with my box. This is a problem since our app makes many calls to this subnet to build a page, so the seconds add up. My curl_getinfo response (url snipped out) array 'url' => string ' < SNIPPED > '... (length=1449) 'content_type' =

IPv6 address giveing syntax error in internet explorer-10 websocket

一世执手 提交于 2019-12-01 20:41:44
I am getting ipv6 address from server . Then i am creating url for websocket. my url looks like ws://[xxxx:xxxx:xxxx:xxxx::xxxx:xxxx]:(port in decimal) where x(0-f in hexadecimal) this url is working fine in chrome and firefox . but in ie 10 it give syntax error .can anyone tell:- -Ipv6 is supporting in ie -10 -if it is supporting what extra have to be done for supporting ipv6 This problem can be solved by using "Literal IPv6 addresses in UNC path names" . http://en.wikipedia.org/wiki/IPv6_address 来源: https://stackoverflow.com/questions/15157910/ipv6-address-giveing-syntax-error-in-internet

Checking if IPv6 is enabled on Windows 7 using C#

大兔子大兔子 提交于 2019-12-01 20:06:05
问题 I am trying to write a program using C# to act as a multipurpose tool for my company. One of the things we would like in this tool is to determine if IPv6 is enabled/binded to the local area connection network adapter on our Windows 7 machines. I'm not looking for it to have an address, just to know if it enabled or disabled on that adapter. I am unsure as to how to code this. From what I've been able to find online, it seems I should be using System.Net.Configuration and Ipv6Element to check

Checking if IPv6 is enabled on Windows 7 using C#

半腔热情 提交于 2019-12-01 18:49:20
I am trying to write a program using C# to act as a multipurpose tool for my company. One of the things we would like in this tool is to determine if IPv6 is enabled/binded to the local area connection network adapter on our Windows 7 machines. I'm not looking for it to have an address, just to know if it enabled or disabled on that adapter. I am unsure as to how to code this. From what I've been able to find online, it seems I should be using System.Net.Configuration and Ipv6Element to check if it is enabled, but I have no idea how to code it. I would like to be able to display if it is

Efficient way to store IPv4/IPv6 addresses

↘锁芯ラ 提交于 2019-12-01 17:00:06
问题 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 protocol families. The first approach was to have a union: struct ip_addr { uint8_t fam; // socket family type union { struct in_addr ipv4_sin_addr; struct in6_addr ipv6_sin_addr; }addr; }; The second approach was to define a typedef std::vector<unsigned

Efficient way to store IPv4/IPv6 addresses

北慕城南 提交于 2019-12-01 16:54:12
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 protocol families. The first approach was to have a union: struct ip_addr { uint8_t fam; // socket family type union { struct in_addr ipv4_sin_addr; struct in6_addr ipv6_sin_addr; }addr; }; The second approach was to define a typedef std::vector<unsigned char> IPAddressNumber and make the difference after the number of bytes from the vector. The third