100+ results for 'ipv6 repo:MagLev/maglev'

Not the results you expected?

in_socketMisc.c (https://github.com/xrl/opensplice.git) C · 454 lines

8 #include "in_commonTypes.h"

9

10 /* 44 octets for IPv6 addresses */

11 #define IN_INTF_MAX_NAME_LEN (INET6_ADDRSTRLEN)

12 typedef char in_interfaceName[IN_INTF_MAX_NAME_LEN];

23 /* Helper functions */

24

25 /* \brief converts to IPv6 address format

26 *

27 * Returns 16 octet vector. Using IPv4-mapping to reprensent

28 * IPv4 addresses with IPv6 (RFC3493)*/

29

30 in_addressType

ioctl.c (https://gitlab.com/Orvillo/Tomato) C · 539 lines

69 }

70

71 #ifdef HAVE_IPV6

72 int

73 if_ioctl_ipv6 (u_long request, caddr_t buffer)

98 return 0;

99 }

100 #endif /* HAVE_IPV6 */

101

102 /*

395 }

396

397 #ifdef HAVE_IPV6

398

399 #ifdef LINUX_IPV6

test_sockmap_kern.h (https://gitlab.com/freesoftware/linux) C Header · 458 lines

7 #include <linux/if_packet.h>

8 #include <linux/ip.h>

9 #include <linux/ipv6.h>

10 #include <linux/in.h>

11 #include <linux/udp.h>

HashMapE.cpp (https://github.com/eglatz/HAPviewer.git) C++ · 404 lines

20 * *************************************************************/

21

22 HashKeyIPv6Pair::HashKeyIPv6Pair(const IPv6_addr & ip1, const IPv6_addr & ip2) {

23 std::copy(ip1.begin(), ip1.end(), key.begin());

24 std::copy(ip2.begin(), ip2.end(), key.begin() + sizeof(ip1));

223 * *************************************************************/

224

225 HashKeyIPv6_5T::HashKeyIPv6_5T(const IPv6_addr & srcIP, const IPv6_addr & dstIP, const uint16_t & srcPort, const uint16_t & dstPort, const uint8_t & protocol) {

226 std::copy(srcIP.begin(), srcIP.end(), key.begin());

227 std::copy(dstIP.begin(), dstIP.end(), key.begin() + 16);

268 * *************************************************************/

269

270 HashKeyIPv6_7T::HashKeyIPv6_7T(const IPv6_addr & srcIP, const IPv6_addr & dstIP, const uint16_t & srcPort, const uint16_t & dstPort, const uint8_t & protocol,

271 const uint8_t & tos, const uint8_t & dir) {

272 std::copy(srcIP.begin(), srcIP.end(), key.begin());

EnumSecurity.go (https://github.com/42wim/matterbridge.git) Go · 177 lines

71 // SecurityNetworkProtocolVIpv6RoutingHeader undocumented

72 SecurityNetworkProtocolVIpv6RoutingHeader SecurityNetworkProtocol = "ipv6RoutingHeader"

73 // SecurityNetworkProtocolVIpv6FragmentHeader undocumented

74 SecurityNetworkProtocolVIpv6FragmentHeader SecurityNetworkProtocol = "ipv6FragmentHeader"

75 // SecurityNetworkProtocolVIPSecEncapsulatingSecurityPayload undocumented

76 SecurityNetworkProtocolVIPSecEncapsulatingSecurityPayload SecurityNetworkProtocol = "ipSecEncapsulatingSecurityPayload"

133 SecurityNetworkProtocolPIpv6NoNextHeader = &_SecurityNetworkProtocolPIpv6NoNextHeader

134 // SecurityNetworkProtocolPIpv6DestinationOptions is a pointer to SecurityNetworkProtocolVIpv6DestinationOptions

135 SecurityNetworkProtocolPIpv6DestinationOptions = &_SecurityNetworkProtocolPIpv6DestinationOptions

162 _SecurityNetworkProtocolPIpv6 = SecurityNetworkProtocolVIpv6

163 _SecurityNetworkProtocolPIpv6RoutingHeader = SecurityNetworkProtocolVIpv6RoutingHeader

164 _SecurityNetworkProtocolPIpv6FragmentHeader = SecurityNetworkProtocolVIpv6FragmentHeader

168 _SecurityNetworkProtocolPIpv6NoNextHeader = SecurityNetworkProtocolVIpv6NoNextHeader

169 _SecurityNetworkProtocolPIpv6DestinationOptions = SecurityNetworkProtocolVIpv6DestinationOptions

170 _SecurityNetworkProtocolPNd = SecurityNetworkProtocolVNd

171 _SecurityNetworkProtocolPRaw = SecurityNetworkProtocolVRaw

ScriptMethods.java (http://proxy-vole.googlecode.com/svn/trunk/) Java · 257 lines

48 /*************************************************************************

49 * Tries to resolve the host name. Returns true if succeeds to resolve

50 * the host to an IPv4 or IPv6 address.

51 *

52 * @param host

80

81 /*************************************************************************

82 * Extension of the isInNet method to support IPv6.

83 * @param ipAddress an IP4 or IP6 address

84 * @param ipPrefix A string containing colon delimited IP prefix

240 /*************************************************************************

241 * Sorts a list of IP4 and IP6 addresses. Separated by semicolon.

242 * Dual addresses first, then IPv6 and last IPv4.

243 * @param ipAddressList the address list.

244 * @return the sorted list, empty string if sort is not possible

proto-alg.o.d (https://github.com/hackedteam/fuzzer-android.git) D · 195 lines

43 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/swab.h \

44 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/asm/swab.h \

45 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/ipv6.h \

46 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/stdlib.h \

47 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/string.h \

149 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/asm/swab.h:

150

151 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/ipv6.h:

152

153 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/stdlib.h:

resource_aws_route_test.go (https://github.com/kris-nova/terraformctl.git) Go · 509 lines

329 `)

330

331 var testAccAWSRouteConfigIpv6InternetGateway = fmt.Sprintf(`

332 resource "aws_vpc" "foo" {

333 cidr_block = "10.1.0.0/16"

349 resource "aws_route" "igw" {

350 route_table_id = "${aws_route_table.external.id}"

351 destination_ipv6_cidr_block = "::/0"

352 gateway_id = "${aws_internet_gateway.foo.id}"

353 }

378 resource "aws_route" "pc" {

379 route_table_id = "${aws_route_table.peering.id}"

380 destination_ipv6_cidr_block = "${aws_vpc.bar.ipv6_cidr_block}"

381 vpc_peering_connection_id = "${aws_vpc_peering_connection.foo.id}"

382 }

proto-tipc.o.d (https://github.com/hackedteam/fuzzer-android.git) D · 207 lines

43 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/swab.h \

44 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/asm/swab.h \

45 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/ipv6.h \

46 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/tipc.h \

47 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/stdlib.h \

151 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/asm/swab.h:

152

153 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/ipv6.h:

154

155 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/tipc.h:

proto-irda.o.d (https://github.com/hackedteam/fuzzer-android.git) D · 207 lines

50 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/swab.h \

51 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/asm/swab.h \

52 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/ipv6.h \

53 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/irda.h \

54 include/net.h \

165 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/asm/swab.h:

166

167 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/ipv6.h:

168

169 /home/diego/Scaricati/android-ndk-r10d/platforms/android-21/arch-arm/usr/include/linux/irda.h:

ConvalidaRobot.java (https://github.com/WellingtonCosta/convalida.git) Java · 418 lines

119 }

120

121 public TypeText ipv6() {

122 onView(withId(R.id.ipv6_field))

123 .perform(scrollTo(), clearText());

124

125 return new TypeText(this, R.id.ipv6_field);

126 }

127

297 public void ipv6IsValid() {

298 isValid(R.id.ipv6_field, R.string.invalid_ipv6);

299 }

300

301 public void ipv6IsInvalid() {

302 isInvalid(R.id.ipv6_field, R.string.invalid_ipv6);

303 }

304

xt_dccp.c (https://github.com/ab3416/linux-2.6.git) C · 188 lines

20

21 #include <linux/netfilter_ipv4/ip_tables.h>

22 #include <linux/netfilter_ipv6/ip6_tables.h>

23

24 MODULE_LICENSE("GPL");

150 {

151 .name = "dccp",

152 .family = NFPROTO_IPV6,

153 .checkentry = dccp_mt_check,

154 .match = dccp_mt,

xfrm6_state.c (https://github.com/dmitriy103/bravo_kernel-2.6.35.git) C · 188 lines

95 else

96 return 3;

97 #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)

98 case XFRM_MODE_ROUTEOPTIMIZATION:

99 case XFRM_MODE_IN_TRIGGER:

128 case XFRM_MODE_TRANSPORT:

129 return 1;

130 #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)

131 case XFRM_MODE_ROUTEOPTIMIZATION:

132 case XFRM_MODE_IN_TRIGGER:

149 int xfrm6_extract_header(struct sk_buff *skb)

150 {

151 struct ipv6hdr *iph = ipv6_hdr(skb);

152

153 XFRM_MODE_SKB_CB(skb)->ihl = sizeof(*iph);

linux-3.6.config (https://bitbucket.org/fhunleth/dm36x-buildroot.git) Unknown · 68 lines

21 # CONFIG_INET_LRO is not set

22 # CONFIG_INET_DIAG is not set

23 # CONFIG_IPV6 is not set

24 # CONFIG_WIRELESS is not set

25 # CONFIG_PREVENT_FIRMWARE_BUILD is not set

NetworkTopologyDiscoveryServiceImpl.java (https://bitbucket.org/psymes/34cs-st2071.git) Java · 432 lines

143 private CopyOnWriteArraySet<NetworkTopologyListener> listeners = new CopyOnWriteArraySet<NetworkTopologyListener>();

144

145 private boolean useIPv6;

146

147 private boolean useSiteLocal;

156 public NetworkTopologyDiscoveryServiceImpl(boolean useIPv6, boolean useSiteLocal, boolean useVirtual, boolean useLoopback)

157 {

158 this.useIPv6 = useIPv6;

159 this.useSiteLocal = useSiteLocal;

160 this.useVirtual = useVirtual;

240

241

242 public boolean isMonitoringIPv6()

243 {

244 return useIPv6;

resolver_query_base.hpp (https://bitbucket.org/mobilecloudlab/mobilehostdist.git) C++ Header · 157 lines

43 static const flags passive = implementation_defined;

44

45 /// Host name should be treated as a numeric string defining an IPv4 or IPv6

46 /// address and no name resolution should be attempted.

47 static const flags numeric_host = implementation_defined;

53 /// If the query protocol family is specified as IPv6, return IPv4-mapped

54 /// IPv6 addresses on finding no IPv6 addresses.

55 static const flags v4_mapped = implementation_defined;

56

57 /// If used with v4_mapped, return all matching IPv6 and IPv4 addresses.

58 static const flags all_matching = implementation_defined;

59

60 /// Only return IPv4 addresses if a non-loopback IPv4 address is configured

61 /// for the system. Only return IPv6 addresses if a non-loopback IPv6 address

62 /// is configured for the system.

63 static const flags address_configured = implementation_defined;

ip6table_filter.c (https://github.com/psyke83/kernel_samsung_europa.git) C · 177 lines

12 #include <linux/module.h>

13 #include <linux/moduleparam.h>

14 #include <linux/netfilter_ipv6/ip6_tables.h>

15

16 MODULE_LICENSE("GPL");

56 .valid_hooks = FILTER_VALID_HOOKS,

57 .me = THIS_MODULE,

58 .af = NFPROTO_IPV6,

59 };

60

68 {

69 return ip6t_do_table(skb, hook, in, out,

70 dev_net(in)->ipv6.ip6table_filter);

71 }

72

xt_ecn.c (https://github.com/hreinecke/linux-devel.git) C · 179 lines

1 /*

2 * Xtables module for matching the value of the IPv4/IPv6 and TCP ECN bits

3 *

4 * (C) 2002 by Harald Welte <laforge@gnumonks.org>

20 #include <linux/netfilter/xt_ecn.h>

21 #include <linux/netfilter_ipv4/ip_tables.h>

22 #include <linux/netfilter_ipv6/ip6_tables.h>

23

24 MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");

105 }

106

107 static inline bool match_ipv6(const struct sk_buff *skb,

108 const struct xt_ecn_info *einfo)

109 {

110 return (((ipv6_hdr(skb)->flow_lbl[0] >> 4) & XT_ECN_IP_MASK) ==

111 einfo->ip_ect) ^

112 !!(einfo->invert & XT_ECN_OP_MATCH_IP);

utilities.c (https://github.com/freebsd/freebsd.git) C · 205 lines

15 void FinishDebugTest(const char * expected,const char * actual);

16 void test_IPv4Address(void);

17 void test_IPv6Address(void);

18 void test_SetLiVnMode1(void);

19 void test_SetLiVnMode2(void);

96

97 void

98 test_IPv6Address(void) {

99 const struct in6_addr address = { { {

100 0x20, 0x01, 0x0d, 0xb8,

ml2_ovs_devstack.rst (https://github.com/openstack/neutron.git) ReStructuredText · 135 lines

65

66 This is your host IP address: 172.16.189.6

67 This is your host IPv6 address: ::1

68 Horizon is now available at http://172.16.189.6/dashboard

69 Keystone is serving at http://172.16.189.6/identity/

120

121 This is your host IP address: 172.16.189.30

122 This is your host IPv6 address: ::1

123 2017-03-09 18:39:27.058 | stack.sh completed in 1149 seconds.

124

ice_tc_lib.h (https://gitlab.com/jimdigriz/linux) C Header · 165 lines

10 #define ICE_TC_FLWR_FIELD_DEST_IPV4 BIT(3)

11 #define ICE_TC_FLWR_FIELD_SRC_IPV4 BIT(4)

12 #define ICE_TC_FLWR_FIELD_DEST_IPV6 BIT(5)

13 #define ICE_TC_FLWR_FIELD_SRC_IPV6 BIT(6)

17 #define ICE_TC_FLWR_FIELD_ENC_DEST_IPV4 BIT(10)

18 #define ICE_TC_FLWR_FIELD_ENC_SRC_IPV4 BIT(11)

19 #define ICE_TC_FLWR_FIELD_ENC_DEST_IPV6 BIT(12)

20 #define ICE_TC_FLWR_FIELD_ENC_SRC_IPV6 BIT(13)

61 } v6;

62 } ip;

63 #define dst_ipv6 ip.v6.dst_ip6.s6_addr32

64 #define dst_ipv6_addr ip.v6.dst_ip6.s6_addr

65 #define src_ipv6 ip.v6.src_ip6.s6_addr32

66 #define src_ipv6_addr ip.v6.src_ip6.s6_addr

prefix.h (https://gitlab.com/envieidoc/advancedtomato2) C Header · 161 lines

56 #ifdef HAVE_IPV6

57 struct prefix_ipv6

58 {

59 u_char family;

107 #define IPV6_MAX_PREFIXLEN 128

108 #define IPV6_ADDR_CMP(D,S) memcmp ((D), (S), IPV6_MAX_BYTELEN)

109 #define IPV6_ADDR_SAME(D,S) (memcmp ((D), (S), IPV6_MAX_BYTELEN) == 0)

110 #define IPV6_ADDR_COPY(D,S) memcpy ((D), (S), IPV6_MAX_BYTELEN)

111

112 /* Count prefix size from mask length */

141 #ifdef HAVE_IPV6

142 struct prefix_ipv6 *prefix_ipv6_new ();

143 void prefix_ipv6_free ();

145 int str2prefix_ipv6 (char *str, struct prefix_ipv6 *p);

146 void apply_mask_ipv6 (struct prefix_ipv6 *p);

147 void str2in6_addr (char *str, struct in6_addr *addr);

148 void masklen2ip6 (int masklen, struct in6_addr *netmask);

section_03.yml (https://gitlab.com/PotatoSkin15/ansible) YAML · 168 lines

1 ---

2

3 - name: 3.1.1 Ensure IPv6 is disabled (Not Scored)

4 lineinfile:

5 path: /etc/default/grub

6 regexp: '^GRUB_CMDLINE_LINUX="(.*)"'

7 line: 'GRUB_CMDLINE_LINUX="\1 ipv6.disable=1"'

8 backup: yes

9 backrefs: yes

10 when:

11 - use_ipv6 == "no"

12 - ansible_virtualization_type != "docker"

13 - ansible_virtualization_type != "kvm"

Data.idr (https://github.com/idris-lang/Idris-dev.git) Idris · 172 lines

63 AF_INET : SocketFamily

64

65 ||| IP / UDP etc. IPv6

66 AF_INET6 : SocketFamily

67

118

119 ||| Not implemented (yet)

120 IPv6Addr : SocketAddress

121

122 Hostname : String -> SocketAddress

127 Show SocketAddress where

128 show (IPv4Addr i1 i2 i3 i4) = concat $ Prelude.List.intersperse "." (map show [i1, i2, i3, i4])

129 show IPv6Addr = "NOT IMPLEMENTED YET"

130 show (Hostname host) = host

131 show InvalidAddress = "Invalid"

fs.h (https://github.com/srikard/linux.git) C Header · 294 lines

71 enum mlx5e_traffic_types {

72 MLX5E_TT_IPV4_TCP,

73 MLX5E_TT_IPV6_TCP,

74 MLX5E_TT_IPV4_UDP,

75 MLX5E_TT_IPV6_UDP,

76 MLX5E_TT_IPV4_IPSEC_AH,

77 MLX5E_TT_IPV6_IPSEC_AH,

78 MLX5E_TT_IPV4_IPSEC_ESP,

79 MLX5E_TT_IPV6_IPSEC_ESP,

80 MLX5E_TT_IPV4,

81 MLX5E_TT_IPV6,

82 MLX5E_TT_ANY,

83 MLX5E_NUM_TT,

108 MLX5E_TT_IPV4_IPV6,

109 MLX5E_TT_IPV6_IPV6,

110 MLX5E_NUM_TUNNEL_TT,

111 };

lump_struct.h (https://gitlab.com/oded/kamailio) C Header · 122 lines

61 /* Where:

62 REALM= ip_addr:port:proto

63 af = address family (ipv4 or ipv6)

64 proto = protocol (tcp, udp, tls)

65 */

configure.in (https://github.com/deathmaker1/kame.git) Autoconf · 158 lines

102 AC_CHECK_FUNCS(mktime select socket arc4random)

103

104 AC_MSG_CHECKING(for IPv6 resolver type)

105 AC_TRY_COMPILE(dnl

106 [#include <sys/types.h>

d6_packet.c (https://gitlab.com/openbar/busybox) C · 172 lines

27 #endif

28

29 int FAST_FUNC d6_recv_kernel_packet(struct in6_addr *peer_ipv6

30 UNUSED_PARAM

31 , struct d6_packet *packet, int fd)

50 }

51

52 /* Construct a ipv6+udp header for a packet, send packet */

53 int FAST_FUNC d6_send_raw_packet(

54 struct d6_packet *d6_pkt, unsigned d6_pkt_size,

55 struct in6_addr *src_ipv6, int source_port,

56 struct in6_addr *dst_ipv6, int dest_port, const uint8_t *dest_arp,

63 const char *msg;

64

65 fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IPV6));

66 if (fd < 0) {

67 msg = "socket(%s)";

addrinfo.h (https://gitlab.com/storedmirrors/minix) C Header · 117 lines

60 #define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)

61

62 #define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */

63 #define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */

64 #define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */

65 #define AI_V4MAPPED 0x00000800 /* accept IPv4-mapped IPv6 address */

66 /* special recommended flags for getipnodebyname */

67 #define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG)

71 int ai_family; /* PF_xxx */

72 int ai_socktype; /* SOCK_xxx */

73 int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */

74 size_t ai_addrlen; /* length of ai_addr */

75 char *ai_canonname; /* canonical name for hostname */

test-udp-ipv6.c (https://github.com/mmalecki/libuv.git) C · 173 lines

69

70

71 static void ipv6_recv_fail(uv_udp_t* handle,

72 ssize_t nread,

73 const uv_buf_t* buf,

78

79

80 static void ipv6_recv_ok(uv_udp_t* handle,

81 ssize_t nread,

82 const uv_buf_t* buf,

154 RETURN_SKIP("dual stack not enabled by default in this OS.");

155 #else

156 do_test(ipv6_recv_ok, 0);

157

158 ASSERT(recv_cb_called == 1);

166 TEST_IMPL(udp_ipv6_only) {

167 do_test(ipv6_recv_fail, UV_UDP_IPV6ONLY);

168

169 ASSERT(recv_cb_called == 0);

inetpeer.h (https://gitlab.com/webhaikal/SenseiRN3) C Header · 186 lines

13 #include <linux/spinlock.h>

14 #include <linux/rtnetlink.h>

15 #include <net/ipv6.h>

16 #include <linux/atomic.h>

17

nstats-0.4-glibc24.patch (https://gitlab.com/kogaion/portage) Patch · 102 lines

2 +++ b/src/packet.c

3 @@ -148,9 +148,9 @@

4 stats.ip.ipv6.icmp.dst_unreach.s_admin += hdr->len;

5 break;

6

7 - case ICMP6_DST_UNREACH_NOTNEIGHBOR:

8 - stats.ip.ipv6.icmp.dst_unreach.notneighbor++;

9 - stats.ip.ipv6.icmp.dst_unreach.s_notneighbor += hdr->len;

10 + case ICMP6_DST_UNREACH_BEYONDSCOPE:

11 + stats.ip.ipv6.icmp.dst_unreach.beyondscope++;

12 + stats.ip.ipv6.icmp.dst_unreach.s_beyondscope += hdr->len;

15 case ICMP6_DST_UNREACH_ADDR:

16 @@ -219,21 +219,6 @@

17 stats.ip.ipv6.icmp.s_echo_reply += hdr->len;

18 break;

19

netfilter.c (https://github.com/nobled/linux-2.6.git) C · 179 lines

14 {

15 struct net *net = dev_net(skb_dst(skb)->dev);

16 struct ipv6hdr *iph = ipv6_hdr(skb);

17 struct dst_entry *dst;

18 struct flowi6 fl6 = {

82

83 if (entry->hook == NF_INET_LOCAL_OUT) {

84 struct ipv6hdr *iph = ipv6_hdr(skb);

85 if (!ipv6_addr_equal(&iph->daddr, &rt_info->daddr) ||

100 unsigned int dataoff, u_int8_t protocol)

101 {

102 struct ipv6hdr *ip6h = ipv6_hdr(skb);

103 __sum16 csum = 0;

104

134 u_int8_t protocol)

135 {

136 struct ipv6hdr *ip6h = ipv6_hdr(skb);

137 __wsum hsum;

138 __sum16 csum = 0;

contiki-conf.h (https://github.com/errordeveloper/contiki-work.git) C Header · 150 lines

58 #if WITH_UIP6

59

60 /* Network setup for IPv6 */

61 #define NETSTACK_CONF_NETWORK uip_driver

62 #define NETSTACK_CONF_MAC nullmac_driver

63 #define NETSTACK_CONF_RDC nullrdc_driver

64 #define NETSTACK_CONF_RADIO cooja_radio_driver

65 #define UIP_CONF_IPV6 1

66 #define UIP_CONF_IP_FORWARD 0

67

135 #define UIP_CONF_TCP 1

136

137 #if UIP_CONF_IPV6

138 #define RIMEADDR_CONF_SIZE 8

139 #define UIP_CONF_IPV6_QUEUE_PKT 1

qplatformdefs.h (https://github.com/Fale/qtmoko.git) C Header · 146 lines

75 #include <sys/wait.h>

76 #include <netinet/in.h>

77 #ifndef QT_NO_IPV6IFNAME

78 #include <net/if.h>

79 #endif

test_ipaddr.cc (https://gitlab.com/unofficial-mirrors/ceph) C++ · 590 lines

20 }

21

22 static void ipv6(struct sockaddr_in6 *addr, const char *s) {

23 int err;

24

50

51 ipv4(&a_one, "10.11.12.13");

52 ipv6(&a_two, "2001:1234:5678:90ab::cdef");

53 ipv4(&net, "10.11.234.56");

54

76

77 ipv4(&a_one, "10.11.12.13");

78 ipv6(&a_two, "2001:1234:5678:90ab::cdef");

79 ipv4(&net, "10.11.12.42");

80

StringParsingHelpers.Connections.cs (https://github.com/davidfowl/corefx.git) C# · 283 lines

220 return ParseIPv4HexString(remoteAddressString);

221 }

222 else if (remoteAddressString.Length == 32) // IPv6 Address

223 {

224 return ParseIPv6HexString(remoteAddressString);

245 }

246

247 // Parses a 128-bit IPv6 Address stored as a 32-character hex number.

248 // Strings passed to this must be 32 characters in length.

249 private static IPAddress ParseIPv6HexString(string hexAddress)

test-inspector-port-cluster.js (https://github.com/isaacs/node.git) JavaScript · 353 lines

73 });

74

75 if (common.hasIPv6) {

76 port = debuggerPort + offset++ * 5;

77

RadiusTokenAuthenticationEventExecutionPlanConfiguration.java (https://github.com/frett/cas.git) Java · 126 lines

82 val protocol = RadiusProtocol.valueOf(server.getProtocol());

83 val impl = new NonBlockingRadiusServer(protocol, factory, server.getRetries(),

84 server.getNasIpAddress(), server.getNasIpv6Address(),

85 server.getNasPort(), server.getNasPortId(),

86 server.getNasIdentifier(), server.getNasRealPort(), server.getNasPortType());

l2tp.h (https://github.com/srikard/linux.git) C Header · 204 lines

39

40 /**

41 * struct sockaddr_l2tpip6 - the sockaddr structure for L2TP-over-IPv6 sockets

42 * @l2tp_family: address family number AF_L2TPIP.

43 * @l2tp_addr: protocol specific address information

48 __kernel_sa_family_t l2tp_family; /* AF_INET6 */

49 __be16 l2tp_unused; /* INET port number (unused) */

50 __be32 l2tp_flowinfo; /* IPv6 flow information */

51 struct in6_addr l2tp_addr; /* IPv6 address */

checksum.h (https://bitbucket.org/bdas/linux.git) C Header · 244 lines

178 }

179

180 #define _HAVE_ARCH_IPV6_CSUM

181 static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr,

185 {

186 __asm__ __volatile__(

187 ".set\tvolatile\t\t\t# csum_ipv6_magic\n\t"

188 "add\t%0, %0, %5\t\t\t# proto (long in network byte order)\n\t"

189 "cmp.c\t%5, %0\n\t"

ipv6.h (https://github.com/LucidOne/Rovio.git) C Header · 156 lines

58 uint16_t ipv6_length; /* Datagram length (not including the length

59 of this header). */

60 uint8_t ipv6_nexthdr; /* Next header type. */

61 uint8_t ipv6_hoplimit; /* Hop limit. */

83 #error "Don't know what endian to use."

84 #endif

85 uint16_t ipv6_len;

86 uint8_t ipv6_nextheader;

95 */

96

97 #define IPV6_VERSION(h) ((h)->ipv6_versfl >> 28)

98 #define IPV6_PRIORITY(h) (((h)->ipv6_versfl & 0x0f000000) >> 24)

99 #define IPV6_FLOWID(h) ((h)->ipv6_versfl & 0x00ffffff)

100

101 #define MAXHOPLIMIT 64

traceroute.sh (https://github.com/tekkamanninja/linux.git) Shell · 322 lines

84

85 ip netns exec ${ns} sysctl -qw net.ipv4.ip_forward=1

86 ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1

87 ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.forwarding=1

88 ip netns exec ${ns} sysctl -qw net.ipv6.conf.default.forwarding=1

89 ip netns exec ${ns} sysctl -qw net.ipv6.conf.default.accept_dad=0

157 #

158 # For example:

159 # the IPv6 address of R1's interface on N2 is 2000:102::1/64

160

161 cleanup_traceroute6()

211 {

212 if [ ! -x "$(command -v traceroute6)" ]; then

213 echo "SKIP: Could not run IPV6 test without traceroute6"

214 return

215 fi

network_fix_ipv6_test.rb (https://gitlab.com/thomasphillips3/vagrant) Ruby · 165 lines

2 require 'socket'

3

4 describe VagrantPlugins::ProviderVirtualBox::Action::NetworkFixIPv6 do

5 include_context "unit"

6 include_context "virtualbox"

36 end

37

38 context "with IPv6 interfaces" do

39 let(:socket) { double("socket") }

40

51 it "only checks the interfaces associated with the VM" do

52 all_networks = [{name: "vboxnet0",

53 ipv6: "dead:beef::",

54 ipv6_prefix: 64,

56 },

57 {name: "vboxnet1",

58 ipv6: "badd:badd::",

59 ipv6_prefix: 64,

uda_d.h (https://github.com/kvaneesh/linux.git) C Header · 128 lines

12 /* Inner IP header type */

13 #define IRDMA_E_UDA_SQ_IIPT_UNKNOWN 0

14 #define IRDMA_E_UDA_SQ_IIPT_IPV6 1

15 #define IRDMA_E_UDA_SQ_IIPT_IPV4_NO_CSUM 2

16 #define IRDMA_E_UDA_SQ_IIPT_IPV4_CSUM 3

iovec.c (https://bitbucket.org/EaglesBlood_Development/eb_grouper.git) C · 264 lines

14 * Andi Kleen : fixed error handling for 2.1

15 * Alexey Kuznetsov: 2.1 optimisations

16 * Andi Kleen : Fix csum*fromiovecend for IPv6.

17 */

18

socket.h (https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk) C Header · 227 lines

201 #define SOL_TCP 6

202 #define SOL_UDP 17

203 #define SOL_IPV6 41

204 #define SOL_ICMPV6 58

205 #define SOL_SCTP 132

skbuff.h (https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk) C Header · 166 lines

118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

119 struct iphdr *ipiph;

120 struct ipv6hdr *ipv6h;

121 unsigned char *raw;

122 } h;

124 union {

125 struct iphdr *iph;

126 struct ipv6hdr *ipv6h;

127 struct arphdr *arph;

128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

SOCK_Acceptor.cpp (https://github.com/amable/TrinityCore.git) C++ · 406 lines

140 && timeout == 0);

141

142 // Reset the size of the addr, so the proper UNIX/IPv4/IPv6 family

143 // is known.

144 if (new_stream.get_handle () != ACE_INVALID_HANDLE

226 int error = 0;

227

228 #if defined (ACE_HAS_IPV6)

229 if (protocol_family == PF_INET6)

230 {

361 else if (protocol_family == PF_UNSPEC)

362 {

363 #if defined (ACE_HAS_IPV6)

364 protocol_family = ACE::ipv6_enabled () ? PF_INET6 : PF_INET;

365 #else

366 protocol_family = PF_INET;

367 #endif /* ACE_HAS_IPV6 */

368 }

369

ip6t_rt.c (https://bitbucket.org/Don2x/mod-kernel-m7-sources.git) C · 223 lines

9 #include <linux/module.h>

10 #include <linux/skbuff.h>

11 #include <linux/ipv6.h>

12 #include <linux/types.h>

13 #include <net/checksum.h>

14 #include <net/ipv6.h>

15

16 #include <asm/byteorder.h>

17

18 #include <linux/netfilter/x_tables.h>

19 #include <linux/netfilter_ipv6/ip6_tables.h>

20 #include <linux/netfilter_ipv6/ip6t_rt.h>

21

22 MODULE_LICENSE("GPL");

23 MODULE_DESCRIPTION("Xtables: IPv6 Routing Header match");

24 MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");

25

polipo.lua (https://gitlab.com/jiangming1399/luci) Lua · 177 lines

18 o = s:taboption("general", Value, "proxyAddress", translate("Listen address"),

19 translate("The interface on which Polipo will listen. To listen on all " ..

20 "interfaces use 0.0.0.0 or :: (IPv6)."))

21

22 o.placeholder = "0.0.0.0"

34 o = s:taboption("general", DynamicList, "allowedClients",

35 translate("Allowed clients"),

36 translate("When listen address is set to 0.0.0.0 or :: (IPv6), you must " ..

37 "list clients that are allowed to connect. The format is IP address " ..

38 "or network address (192.168.1.123, 192.168.1.0/24, " ..

39 "2001:660:116::/48 (IPv6))"))

40

41 o.datatype = "ipaddr"

57 l:value("true", translate("Query only IPv6"))

58 l:value("happily", translate("Query IPv4 and IPv6, prefer IPv6"))

59 l:value("reluctantly", translate("Query IPv4 and IPv6, prefer IPv4"))

ipc.proto (https://gitlab.com/dawei101/ocserv) Protocol Buffers · 306 lines

39 optional string ipv4_net = 17;

40 optional string ipv4_netmask = 18;

41 optional string ipv6_net = 19;

42 optional uint32 ipv6_prefix = 20;

47 optional uint32 net_priority = 25;

48 optional string explicit_ipv4 = 26;

49 optional string explicit_ipv6 = 27;

50 repeated string no_routes = 28;

51 optional uint32 ipv6_subnet_prefix = 29;

74 /* the ips of the tun device */

75 optional string ipv4 = 7;

76 optional string ipv6 = 8;

77 optional string ipv4_local = 9;

78 optional string ipv6_local = 10;

132 optional string remote_ip = 5;

133 optional string ipv4 = 6;

134 optional string ipv6 = 7;

135 optional uint32 discon_reason = 8;

136 optional uint32 secmod_client_entries = 9; /* from sec-mod to main only */

address_v6.hpp (https://gitlab.com/mcvj2016/mcvj2016) C++ Header · 248 lines

82 /// The scope ID of the address.

83 /**

84 * Returns the scope ID associated with the IPv6 address.

85 */

86 unsigned long scope_id() const

91 /// The scope ID of the address.

92 /**

93 * Modifies the scope ID associated with the IPv6 address.

94 */

95 void scope_id(unsigned long id)

201 BOOST_ASIO_DECL static address_v6 loopback();

202

203 /// Create an IPv4-mapped IPv6 address.

204 BOOST_ASIO_DECL static address_v6 v4_mapped(const address_v4& addr);

205

INET_Addr.inl (https://github.com/InkVisible/wow.git) C++ Header · 255 lines

21 this->inet_addr_.in4_.sin_family = AF_INET;

22 }

23 #if defined (ACE_HAS_IPV6)

24 else if (this->get_type() == AF_INET6)

25 {

29 this->inet_addr_.in6_.sin6_family = AF_INET6;

30 }

31 #endif /* ACE_HAS_IPV6 */

32 }

33

35 ACE_INET_Addr::determine_type (void) const

36 {

37 #if defined (ACE_HAS_IPV6)

38 # if defined (ACE_USES_IPV4_IPV6_MIGRATION)

39 return ACE::ipv6_enabled () ? AF_INET6 : AF_INET;

40 # else

41 return AF_INET6;

url.py (https://github.com/pombredanne/pip.git) Python · 212 lines

168 auth, url = url.rsplit('@', 1)

169

170 # IPv6

171 if url and url[0] == '[':

172 host, url = url.split(']', 1)

ice_protocol_type.h (https://gitlab.com/dieselnutjob/linux-next) C Header · 243 lines

4 #ifndef _ICE_PROTOCOL_TYPE_H_

5 #define _ICE_PROTOCOL_TYPE_H_

6 #define ICE_IPV6_ADDR_LENGTH 16

7

8 /* Each recipe can match up to 5 different fields. Fields to match can be meta-

33 ICE_IPV4_OFOS,

34 ICE_IPV4_IL,

35 ICE_IPV6_OFOS,

36 ICE_IPV6_IL,

70 ICE_PROT_IPV4_OF_OR_S = 32,

71 ICE_PROT_IPV4_IL = 33,

72 ICE_PROT_IPV6_OF_OR_S = 40,

73 ICE_PROT_IPV6_IL = 41,

192 struct ice_vlan_hdr vlan_hdr;

193 struct ice_ipv4_hdr ipv4_hdr;

194 struct ice_ipv6_hdr ipv6_hdr;

195 struct ice_l4_hdr l4_hdr;

196 struct ice_sctp_hdr sctp_hdr;

net-listener.h (https://gitlab.com/lygstate/qemu) C Header · 186 lines

39 * The QIONetListener object encapsulates the management of a

40 * listening socket. It is able to listen on multiple sockets

41 * concurrently, to deal with the scenario where IPv4 / IPv6

42 * needs separate sockets, or there is a need to listen on a

43 * subset of interface IP addresses, instead of the wildcard

droplet_actions.go (https://gitlab.com/github-cloud-corporation/machine) Go · 238 lines

28 RebuildByImageSlug(int, string) (*Action, *Response, error)

29 ChangeKernel(int, int) (*Action, *Response, error)

30 EnableIPv6(int) (*Action, *Response, error)

31 EnablePrivateNetworking(int) (*Action, *Response, error)

32 Upgrade(int) (*Action, *Response, error)

150 }

151

152 // EnableIPv6 enables IPv6 for a droplet.

153 func (s *DropletActionsServiceOp) EnableIPv6(id int) (*Action, *Response, error) {

154 request := &ActionRequest{"type": "enable_ipv6"}

155 return s.doAction(id, request)

156 }

IpInfoDbTest.php (https://github.com/geocoder-php/Geocoder.git) PHP · 181 lines

79 }

80

81 public function testGeocodeWithLocalhostIPv6()

82 {

83 $this->expectException(\Geocoder\Exception\UnsupportedOperation::class);

84 $this->expectExceptionMessage('The IpInfoDb provider does not support IPv6 addresses, only IPv4 addresses.');

85

86 $provider = new IpInfoDb($this->getMockedHttpClient(), 'api_key');

130 }

131

132 public function testGeocodeWithRealIPv6()

133 {

134 $this->expectException(\Geocoder\Exception\UnsupportedOperation::class);

ifconfig.sh (https://gitlab.com/storedmirrors/minix) Shell · 234 lines

22 #

23 # IPv4: 10.53.0.{1..8} RFC 1918

24 # IPv6: fd92:7065:b8e:ffff::{1..8} ULA

25 #

26

t_mpls_fw6.sh (https://bitbucket.org/freebsd/freebsd-base.git) Shell · 220 lines

37 # ping6 from R1 to R4 right hand side interface

38 #

39 # redo the test using IPv6 explicit null label

40

41 RUMP_SERVER1=unix://./r1

iprawsock_test.go (https://gitlab.com/4144/gcc) Go · 193 lines

15 // following:

16 // golang.org/x/net/ipv4

17 // golang.org/x/net/ipv6

18 // golang.org/x/net/icmp

19

32 {"ip", "::1", &IPAddr{IP: ParseIP("::1")}, nil},

33 {"ip6", "::1", &IPAddr{IP: ParseIP("::1")}, nil},

34 {"ip6:ipv6-icmp", "::1", &IPAddr{IP: ParseIP("::1")}, nil},

35 {"ip6:IPv6-ICMP", "::1", &IPAddr{IP: ParseIP("::1")}, nil},

51 {"ip6", "127.0.0.1", nil, &AddrError{Err: errNoSuitableAddress.Error(), Addr: "127.0.0.1"}},

52 {"ip6", "::ffff:127.0.0.1", nil, &AddrError{Err: errNoSuitableAddress.Error(), Addr: "::ffff:127.0.0.1"}},

53 {"ip6:ipv6-icmp", "127.0.0.1", nil, &AddrError{Err: errNoSuitableAddress.Error(), Addr: "127.0.0.1"}},

54 {"ip6:ipv6-icmp", "::ffff:127.0.0.1", nil, &AddrError{Err: errNoSuitableAddress.Error(), Addr: "::ffff:127.0.0.1"}},

net_stats.h (https://gitlab.com/david.furminieux/zephyr-os) C Header · 264 lines

134 };

135

136 struct net_stats_ipv6_nd {

137 net_stats_t drop;

138 net_stats_t recv;

195 struct net_stats_ip_errors ip_errors;

196

197 #if defined(CONFIG_NET_IPV6)

198 struct net_stats_ip ipv6;

199 #define NET_STATS_IPV6(s) NET_STATS(s)

200 #else

201 #define NET_STATS_IPV6(s)

227 #if defined(CONFIG_NET_IPV6_ND)

228 struct net_stats_ipv6_nd ipv6_nd;

229 #define NET_STATS_IPV6_ND(s) NET_STATS(s)

listen_addr.go (https://gitlab.com/vectorci/docker-1) Go · 183 lines

129 interfaceAddr4 = ipAddr.IP

130 } else {

131 // IPv6

132 if interfaceAddr6 != nil {

133 return nil, fmt.Errorf("interface %s has more than one IPv6 address (%s and %s)", specifiedInterface, interfaceAddr6, ipAddr.IP)

139

140 if interfaceAddr4 == nil && interfaceAddr6 == nil {

141 return nil, fmt.Errorf("interface %s has no usable IPv4 or IPv6 address", specifiedInterface)

142 }

143

144 // In the case that there's exactly one IPv4 address

145 // and exactly one IPv6 address, favor IPv4 over IPv6.

146 if interfaceAddr4 != nil {

147 return interfaceAddr4, nil

conversion.py (https://gitlab.com/billyprice1/tribler) Python · 256 lines

7 ADDRESS_TYPE_IPV4 = 0x01

8 ADDRESS_TYPE_DOMAIN_NAME = 0x03

9 ADDRESS_TYPE_IPV6 = 0x04

10

11 REQ_CMD_CONNECT = 0x01

57 @param rsv: the reserved bits in the SOCKS protocol

58 @param frag:

59 @param address_type: whether we deal with an IPv4 or IPv6 address

60 @param str destination_address: the destination host

61 @param int destination_port: the destination port

124 if address_type == ADDRESS_TYPE_IPV4:

125 data = socket.inet_aton(address)

126 elif address_type == ADDRESS_TYPE_IPV6:

127 raise IPV6AddrError()

130 else:

131 raise ValueError(

132 "address_type must be either IPv4, IPv6 or a domain name")

133

134 return data

ppb_net_address.h (https://gitlab.com/f3822/qtwebengine-chromium) C Header · 203 lines

117 * @param[in] instance A <code>PP_Instance</code> identifying one instance of

118 * a module.

119 * @param[in] ipv6_addr An IPv6 address.

120 *

121 * @return A <code>PP_Resource</code> representing the same address as

124 PP_Resource (*CreateFromIPv6Address)(

125 PP_Instance instance,

126 const struct PP_NetAddress_IPv6* ipv6_addr);

127 /**

128 * Determines if a given resource is a network address.

185 * @param[in] addr A <code>PP_Resource</code> corresponding to a network

186 * address.

187 * @param[out] ipv6_addr A <code>PP_NetAddress_IPv6</code> structure to store

188 * the result.

189 *

193 PP_Bool (*DescribeAsIPv6Address)(PP_Resource addr,

194 struct PP_NetAddress_IPv6* ipv6_addr);

195 };

196

Config.in (https://github.com/ZigFisher/FlyRouter.git) Autoconf · 215 lines

1 menu "pmacct............................ IPv4/IPv6 accounting and aggregation tools"

2

3 config BR2_COMPILE_PMACCT

43 help

44

45 An IPv4/IPv6 Netflow accounting and aggregation daemon

46

47 http://www.ba.cnr.it/~paolo/pmacct/

92 depends BR2_PACKAGE_NFACCTD_CUSTOM

93

94 config BR2_COMPILE_NFACCTD_ENABLE_IPV6

95 prompt "IPv6 support"

128 help

129

130 An IPv4/IPv6 libpcap-based accounting and aggregation daemon

131

132 http://www.ba.cnr.it/~paolo/pmacct/

Makefile (https://github.com/ZigFisher/FlyRouter.git) Makefile · 144 lines

18 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install

19

20 ifeq ($(BUSYBOX_CONFIG_FEATURE_IPV6),)

21 EXTRA_PARAM=DO_IPV6=0

22 else

23 EXTRA_PARAM=DO_IPV6=1

24 endif

25

50 $(eval $(call PKG_template,IPTABLES_EXTRA,iptables-extra,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))

51 $(eval $(call PKG_template,IPTABLES_UTILS,iptables-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))

52 ifneq ($(BUSYBOX_CONFIG_FEATURE_IPV6),)

53 $(eval $(call PKG_template,IP6TABLES,ip6tables,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))

54 endif

event-compat.c (https://github.com/hyper/stashd.git) C · 232 lines

61 char buf[128];

62 const char *cp, *addr_part, *port_part;

63 int is_ipv6;

64 /* recognized formats are:

65 * [ipv6]:port

66 * ipv6

67 * [ipv6]

81 if (cp[1] == ':') port_part = cp+2;

82 else port_part = NULL;

83 is_ipv6 = 1;

84 } else if (cp && strchr(cp+1, ':')) {

85 is_ipv6 = 1;

87 port_part = NULL;

88 } else if (cp) {

89 is_ipv6 = 0;

90 if (cp - ip_as_string > (int)sizeof(buf)-1) { return -1; }

91 memcpy(buf, ip_as_string, cp-ip_as_string);

PacketCaptureCapable.java (https://github.com/jpcap/jpcap.git) Java · 186 lines

29 * For IPv4, 96 bytes guarantees that at least the headers of most

30 * packet types and protocols will get captured.

31 * For IPv6, 68 is a better value?

32 */

33 int DEFAULT_SNAPLEN = 96;

bier_types.c (https://gitlab.com/x1046882802/flexiroutervpp) C · 233 lines

154 case BIER_HDR_PROTO_IPV4:

155 return (DPO_PROTO_IP4);

156 case BIER_HDR_PROTO_IPV6:

157 return (DPO_PROTO_IP4);

158 }

ip6t_frag.c (https://github.com/mstsirkin/linux.git) C · 136 lines

10 #include <linux/module.h>

11 #include <linux/skbuff.h>

12 #include <linux/ipv6.h>

13 #include <linux/types.h>

14 #include <net/checksum.h>

15 #include <net/ipv6.h>

16

17 #include <linux/netfilter/x_tables.h>

18 #include <linux/netfilter_ipv6/ip6_tables.h>

19 #include <linux/netfilter_ipv6/ip6t_frag.h>

20

21 MODULE_LICENSE("GPL");

22 MODULE_DESCRIPTION("Xtables: IPv6 fragment match");

23 MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");

24

ip6table_mangle.c (https://github.com/srikard/linux.git) C · 146 lines

1 // SPDX-License-Identifier: GPL-2.0-only

2 /*

3 * IPv6 packet mangling table, a port of the IPv4 mangle table to IPv6

4 *

5 * Copyright (C) 2000-2001 by Harald Welte <laforge@gnumonks.org>

44 memcpy(&saddr, &ipv6_hdr(skb)->saddr, sizeof(saddr));

45 memcpy(&daddr, &ipv6_hdr(skb)->daddr, sizeof(daddr));

46 mark = skb->mark;

47 hop_limit = ipv6_hdr(skb)->hop_limit;

55 (!ipv6_addr_equal(&ipv6_hdr(skb)->saddr, &saddr) ||

56 !ipv6_addr_equal(&ipv6_hdr(skb)->daddr, &daddr) ||

57 skb->mark != mark ||

58 ipv6_hdr(skb)->hop_limit != hop_limit ||

59 flowlabel != *((u_int32_t *)ipv6_hdr(skb)))) {

60 err = ip6_route_me_harder(state->net, state->sk, skb);

61 if (err < 0)

serverhelp.pm (https://github.com/cparedes/omnibus.git) Perl · 237 lines

72 my $idnum;

73

74 if($server =~ /^((ftp|http|imap|pop3|smtp)s?)(\d*)(-ipv6|)$/) {

75 $proto = $1;

76 $idnum = ($3 && ($3 > 1)) ? $3 : 1;

77 $ipvnum = ($4 && ($4 =~ /6$/)) ? 6 : 4;

78 }

79 elsif($server =~ /^(tftp|sftp|socks|ssh|rtsp)(\d*)(-ipv6|)$/) {

80 $proto = $1;

81 $idnum = ($2 && ($2 > 1)) ? $2 : 1;

101 $ipver = (not $ipver) ? 'ipv4' : lc($ipver);

102 die "unsupported IP version: $ipver" unless($ipver &&

103 ($ipver =~ /^(4|6|ipv4|ipv6|-ipv4|-ipv6)$/));

104 $ipver = ($ipver =~ /6$/) ? '-IPv6' : '';

utils.js (https://gitlab.com/nodegraph/ngsexternal) JavaScript · 183 lines

24

25 // $1 $2

26 internals.hostHeaderRegex = /^(?:(?:\r\n)?\s)*((?:[^:]+)|(?:\[[^\]]+\]))(?::(\d+))?(?:(?:\r\n)?\s)*$/; // (IPv4, hostname)|(IPv6)

27

28

Makefile (https://gitlab.com/jiangming1399/routing) Makefile · 128 lines

37 SUBMENU:=Routing and Redirection

38 DEPENDS:=+libpthread

39 CONFLICTS:=bird1-ipv4 bird1-ipv6 bird4 bird6

40 endef

41

47 SUBMENU:=Routing and Redirection

48 DEPENDS:=+bird2 +libreadline +libncurses

49 CONFLICTS:=bird1c-ipv4 bird1c-ipv6 birdc4 birdc6

50 endef

51

57 SUBMENU:=Routing and Redirection

58 DEPENDS:=+bird2

59 CONFLICTS:=bird1cl-ipv4 bird1cl-ipv6 birdcl4 birdcl6

60 endef

61

gprs-context.h (https://github.com/Paulxia/ofono.git) C Header · 120 lines

37 enum ofono_gprs_proto {

38 OFONO_GPRS_PROTO_IP = 0,

39 OFONO_GPRS_PROTO_IPV6,

40 OFONO_GPRS_PROTO_IPV4V6,

41 };

106 const char **dns);

107

108 void ofono_gprs_context_set_ipv6_address(struct ofono_gprs_context *gc,

109 const char *address);

110 void ofono_gprs_context_set_ipv6_prefix_length(struct ofono_gprs_context *gc,

111 unsigned char length);

112 void ofono_gprs_context_set_ipv6_gateway(struct ofono_gprs_context *gc,

113 const char *gateway);

114 void ofono_gprs_context_set_ipv6_dns_servers(struct ofono_gprs_context *gc,

endianness.h (https://gitlab.com/vg/netsukuku-c) C Header · 109 lines

36 #define INT_TYPE_16BIT (1<<1) /* The int var is of 16 bits */

37 #define INT_TYPE_WORDS (1<<2) /* The int var is composed by an array of ints,

38 like the ipv6 ip (struct in6_addr) */

39 #define INT_TYPE_NETWORK (1<<3) /* The int var is stored in network order */

40

constants.c (https://github.com/GunioRobot/ruby.git) C · 146 lines

75 case IPPROTO_IP:

76 return constant_arg(optname, rsock_ip_optname_to_int, "unknown IP level option name");

77 #ifdef IPPROTO_IPV6

78 case IPPROTO_IPV6:

79 return constant_arg(optname, rsock_ipv6_optname_to_int, "unknown IPv6 level option name");

80 #endif

81 case IPPROTO_TCP:

109 case IPPROTO_IPV6:

110 return constant_arg(type, rsock_ipv6_optname_to_int, "unknown IPv6 control message");

111 #endif

112 case IPPROTO_TCP:

in.h (https://gitlab.com/thomasphillips3/How-to-Make-a-Computer-Operating-System) C Header · 102 lines

20 IPPROTO_IP = 0, /* Dummy protocol for TCP. */

21 #define IPPROTO_IP IPPROTO_IP

22 IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options. */

23 #define IPPROTO_HOPOPTS IPPROTO_HOPOPTS

24 IPPROTO_ICMP = 1, /* Internet Control Message Protocol. */

42 IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol. */

43 #define IPPROTO_DCCP IPPROTO_DCCP

44 IPPROTO_IPV6 = 41, /* IPv6 header. */

45 #define IPPROTO_IPV6 IPPROTO_IPV6

46 IPPROTO_ROUTING = 43, /* IPv6 routing header. */

47 #define IPPROTO_ROUTING IPPROTO_ROUTING

48 IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header. */

58 IPPROTO_ICMPV6 = 58, /* ICMPv6. */

59 #define IPPROTO_ICMPV6 IPPROTO_ICMPV6

60 IPPROTO_NONE = 59, /* IPv6 no next header. */

61 #define IPPROTO_NONE IPPROTO_NONE

62 IPPROTO_DSTOPTS = 60, /* IPv6 destination options. */

Multihomed_INET_Addr.cpp (https://github.com/origins/SkyFireEMU_420.git) C++ · 287 lines

256 }

257

258 #if defined (ACE_HAS_IPV6)

259 void

260 ACE_Multihomed_INET_Addr::get_addresses(sockaddr_in6 *addrs,

279 }

280 }

281 #endif /* ACE_HAS_IPV6 */

282

283 ACE_Multihomed_INET_Addr::~ACE_Multihomed_INET_Addr (void)

base.rb (https://github.com/jeffbozek/whois.git) Ruby · 191 lines

52 # @param [Symbol] type

53 # The type of WHOIS adapter to define.

54 # Known values are :tld, :ipv4, :ipv6.

55 # @param [String] allocation

56 # The allocation, range or hostname, this server is responsible for.

bpf_iter.h (https://gitlab.com/jimdigriz/linux) C Header · 153 lines

4 #define bpf_iter_meta bpf_iter_meta___not_used

5 #define bpf_iter__bpf_map bpf_iter__bpf_map___not_used

6 #define bpf_iter__ipv6_route bpf_iter__ipv6_route___not_used

7 #define bpf_iter__netlink bpf_iter__netlink___not_used

8 #define bpf_iter__task bpf_iter__task___not_used

26 #undef bpf_iter_meta

27 #undef bpf_iter__bpf_map

28 #undef bpf_iter__ipv6_route

29 #undef bpf_iter__netlink

30 #undef bpf_iter__task

52 } __attribute__((preserve_access_index));

53

54 struct bpf_iter__ipv6_route {

55 struct bpf_iter_meta *meta;

56 struct fib6_info *rt;

address.js (https://github.com/jdonnerstag/Haraka.git) JavaScript · 133 lines

25 exports.atom_expr = /[a-zA-Z0-9!#%&*+=?^_`{|}~\$\x27\x2D\/]+/;

26 exports.address_literal_expr =

27 /(?:\[(?:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|IPv6:[0-9A-Fa-f:.]+)\])/;

28 exports.subdomain_expr = /(?:[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?)/;

29 exports.domain_expr;

interface.go (https://github.com/haiku/buildtools.git) Go · 256 lines

170 }

171

172 // An ipv6ZoneCache represents a cache holding partial network

173 // interface information. It is used for reducing the cost of IPv6

176 // Multiple names sharing the index are managed by first-come

177 // first-served basis for consistency.

178 type ipv6ZoneCache struct {

179 sync.RWMutex // guard the following

180 lastFetched time.Time // last time routing information was fetched

183 }

184

185 var zoneCache = ipv6ZoneCache{

186 toIndex: make(map[string]int),

187 toName: make(map[int]string),

191 // updated more than 1 minute ago, or if force is set. It reports whether the

192 // cache was updated.

193 func (zc *ipv6ZoneCache) update(ift []Interface, force bool) (updated bool) {

194 zc.Lock()

195 defer zc.Unlock()

sockopt.c (https://github.com/wagle/addnas_ocaml-cross-compiler.git) C · 300 lines

84 #define SO_ERROR (-1)

85 #endif

86 #ifndef IPPROTO_IPV6

87 #define IPPROTO_IPV6 (-1)

88 #endif

89 #ifndef IPV6_V6ONLY

90 #define IPV6_V6ONLY (-1)

115 { SOL_SOCKET, SO_ACCEPTCONN },

116 { IPPROTO_TCP, TCP_NODELAY },

117 { IPPROTO_IPV6, IPV6_V6ONLY}

118 };

119

dns.py (https://github.com/AnonLEF/vomun.git) Python · 147 lines

32 X25 = 19,

33 ISDN = 20,

34 IPv6 = 28,

35 UNSPECIFIED = 103,

36 ALL = 255,

adt.h (https://github.com/buffygb/illumos-gate.git) C Header · 130 lines

50 */

51 #define ADT_IPv4 1

52 #define ADT_IPv6 2

53

54 /*

basic_resolver_query.hpp (https://github.com/ThanatosAndNyx/evemu_incursion.git) C++ Header · 244 lines

83 *

84 * @param protocol A protocol object, normally representing either the IPv4 or

85 * IPv6 version of an internet protocol.

86 *

87 * @param service A string identifying the requested service. This may be a

168 *

169 * @param protocol A protocol object, normally representing either the IPv4 or

170 * IPv6 version of an internet protocol.

171 *

172 * @param host A string identifying a location. May be a descriptive name or

sfPolicyUserData.h (https://github.com/andynunes/SSLCertSnorter.git) C Header · 143 lines

23

24 #include "sf_ip.h"

25 #include "ipv6_port.h"

26 #include "sfPolicy.h"

27 #include "sf_dynamic_preprocessor.h"

config.in (https://gitlab.com/envieidoc/advancedtomato2) Autoconf · 235 lines

67

68 # !!TB

69 config TCONFIG_IPV6

70 bool "IPv6 Support"

itemid-isvalid.html (https://github.com/rillian/firefox.git) HTML · 91 lines

57 <div itemid="/:23" itemtype="http://foo" itemscope></div><!-- path-slash-colon-number-relative -->

58 <div itemid="foo://///////bar.com/" itemtype="http://foo" itemscope></div><!-- scheme-private-path-leading-slashes-chars -->

59 <div itemid="http://[2001::1]:80" itemtype="http://foo" itemscope></div><!-- host-ipv6-port -->

60 <div itemid="data:text/plain,foo" itemtype="http://foo" itemscope></div><!-- scheme-data-no-slash -->

61 <div itemid="http://example.com/foo/%2e" itemtype="http://foo" itemscope></div><!-- path-percent-encoded-dot -->

79 <div itemid="http://@www.example.com" itemtype="http://foo" itemscope></div><!-- userinfo-empty -->

80 <div itemid="http://example.com/‮/foo/‭/bar" itemtype="http://foo" itemscope></div><!-- path-u202E-u202D -->

81 <div itemid="http://[2001::1]" itemtype="http://foo" itemscope></div><!-- host-ipv6 -->

82 <div itemid="💩http://foo" itemtype="http://foo" itemscope></div><!-- path-starts-with-pile-of-poo -->

83 <div itemid="http://foo/abcd?efgh?ijkl" itemtype="http://foo" itemscope></div><!-- query-contains-question-mark -->

wnm.h (https://gitlab.com/Red54/mtk-sources) C Header · 231 lines

116 UCHAR TargetIPType;

117 UCHAR TargetIPAddr[16];

118 } PROXY_ARP_IPV6_ENTRY, *PPROXY_ARP_IPV6_ENTRY;

119

120 typedef struct _PROXY_ARP_IPV6_UNIT {

122 UCHAR TargetIPType;

123 UCHAR TargetIPAddr[16];

124 } PROXY_ARP_IPV6_UNIT, *PPROXY_ARP_IPV6_UNIT;

125

126 typedef struct _WNM_CTRL {

140 enum IPTYPE {

141 IPV4,

142 IPV6

143 };

144

sh7763rdp_defconfig (http://omnia2droid.googlecode.com/svn/trunk/) Unknown · 1237 lines

367 CONFIG_DEFAULT_TCP_CONG="cubic"

368 # CONFIG_TCP_MD5SIG is not set

369 # CONFIG_IPV6 is not set

370 # CONFIG_NETWORK_SECMARK is not set

371 # CONFIG_NETFILTER is not set

cnic_defs.h (http://omnia2droid.googlecode.com/svn/trunk/) C++ Header · 581 lines ✨ Summary

This C++ header file defines a set of structures and constants for a network protocol, specifically for handling Keyed-Word Queued Encapsulations (KWQE). It provides definitions for various KWQE requests, including updating PG connections, uploading contexts, and others. The structures contain fields that represent the protocol’s parameters, such as flags, operation codes, and data addresses.

261 /*

262 * The second ( optional )request to be passed in order to establish

263 * connection in option2 - for IPv6 only

264 */

265 struct l4_kwq_connect_req2 {

af_key.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 3845 lines ✨ Summary

This C code implements a part of the Linux kernel’s IPsec protocol, specifically for the PF_KEY socket family. It sets up and registers various components, including protocols, sockets, and networking subsystems, to enable secure communication over the internet. The code is used in conjunction with other IPsec modules to provide end-to-end encryption and authentication services.

415 struct sockaddr *addr = (struct sockaddr *)(sp + 1);

416 struct sockaddr_in *sin;

417 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)

418 struct sockaddr_in6 *sin6;

419 #endif

427 return -EINVAL;

428 break;

429 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)

430 case AF_INET6:

431 len = DIV_ROUND_UP(sizeof(*sp) + sizeof(*sin6), sizeof(uint64_t));

509 return 0;

510 if (s_addr->sa_family != AF_INET

511 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)

512 && s_addr->sa_family != AF_INET6

513 #endif

dev_mcast.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 230 lines ✨ Summary

This C code implements a device-level multicast list maintenance system for Linux. It allows adding, deleting, and synchronizing multicast addresses between devices, ensuring that only used addresses are retained. The system is protected by netif_tx_lock_bh to prevent concurrent modifications. It also provides a proc file interface to view the multicast lists of devices.

59 * entries. It also helps IP as it tracks overlapping maps.

60 *

61 * Device mc lists are changed by bh at least if IPv6 is enabled,

62 * so that it must be bh protected.

63 *

inet6.c (http://opensource.apple.com/release/developer-tools-43/) C · 1148 lines

372 mib[0] = CTL_NET;

373 mib[1] = PF_INET6;

374 mib[2] = IPPROTO_IPV6;

375 mib[3] = IPV6CTL_STATS;

518

519 <span class="enscript-comment">/*

520 * Dump IPv6 per-interface statistics based on RFC 2465.

521 */</span>

522 <span class="enscript-type">void</span>

main.c (http://opensource.apple.com/release/developer-tools-43/) C · 437 lines

142 #<span class="enscript-reference">ifdef</span> <span class="enscript-variable-name">INET6</span>

143 printf(<span class="enscript-string">&quot; -4: IPv4 mode.\n&quot;</span>);

144 printf(<span class="enscript-string">&quot; -6: IPv6 mode.\n&quot;</span>);

145 #<span class="enscript-reference">endif</span>

146 #<span class="enscript-reference">ifdef</span> <span class="enscript-variable-name">ENABLE_ADMINPORT</span>

bind_addr.c (https://bitbucket.org/fhunleth/dm36x-kernel.git) C · 553 lines

46 #include <linux/in.h>

47 #include <net/sock.h>

48 #include <net/ipv6.h>

49 #include <net/if_inet6.h>

50 #include <net/sctp/sctp.h>

282

283 /*

284 * Create an address list out of the raw address list format (IPv4 and IPv6

285 * address parameters).

286 */

361 struct sctp_sock *sp;

362

363 /* Pick the IPv6 socket as the basis of comparison

364 * since it's usually a superset of the IPv4.

365 * If there is no IPv6 socket, then default to bind_addr.