addrconf.c (71d530cd1b6d97094481002a04c77fea1c8e1c22) | addrconf.c (102128e3a27821bdcbacb10f4f2bba253f587ba4) |
---|---|
1/* 2 * IPv6 Address [auto]configuration 3 * Linux INET6 implementation 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> 8 * --- 848 unchanged lines hidden (view full) --- 857 /* 858 * prefix (longest match) label 859 * ----------------------------- 860 * ::1/128 0 861 * ::/0 1 862 * 2002::/16 2 863 * ::/96 3 864 * ::ffff:0:0/96 4 | 1/* 2 * IPv6 Address [auto]configuration 3 * Linux INET6 implementation 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> 8 * --- 848 unchanged lines hidden (view full) --- 857 /* 858 * prefix (longest match) label 859 * ----------------------------- 860 * ::1/128 0 861 * ::/0 1 862 * 2002::/16 2 863 * ::/96 3 864 * ::ffff:0:0/96 4 |
865 * fc00::/7 5 866 * 2001::/32 6 |
|
865 */ 866 if (type & IPV6_ADDR_LOOPBACK) 867 return 0; 868 else if (type & IPV6_ADDR_COMPATv4) 869 return 3; 870 else if (type & IPV6_ADDR_MAPPED) 871 return 4; | 867 */ 868 if (type & IPV6_ADDR_LOOPBACK) 869 return 0; 870 else if (type & IPV6_ADDR_COMPATv4) 871 return 3; 872 else if (type & IPV6_ADDR_MAPPED) 873 return 4; |
874 else if (addr->s6_addr32[0] == htonl(0x20010000)) 875 return 6; |
|
872 else if (addr->s6_addr16[0] == htons(0x2002)) 873 return 2; | 876 else if (addr->s6_addr16[0] == htons(0x2002)) 877 return 2; |
878 else if ((addr->s6_addr[0] & 0xfe) == 0xfc) 879 return 5; |
|
874 return 1; 875} 876 877int ipv6_dev_get_saddr(struct net_device *daddr_dev, 878 struct in6_addr *daddr, struct in6_addr *saddr) 879{ 880 struct ipv6_saddr_score hiscore; 881 struct inet6_ifaddr *ifa_result = NULL; --- 3019 unchanged lines hidden --- | 880 return 1; 881} 882 883int ipv6_dev_get_saddr(struct net_device *daddr_dev, 884 struct in6_addr *daddr, struct in6_addr *saddr) 885{ 886 struct ipv6_saddr_score hiscore; 887 struct inet6_ifaddr *ifa_result = NULL; --- 3019 unchanged lines hidden --- |