github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/darwin/vnet.txt (about)

     1  # Copyright 2021 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  ################################################################################
     5  ##################################### IPv4 #####################################
     6  ################################################################################
     7  
     8  # https://tools.ietf.org/html/rfc791#section-3.1
     9  # https://en.wikipedia.org/wiki/IPv4#Header
    10  # This corresponds to LOCAL_IPV4 ("172.20.%d.170" % pid) in executor/common_bsd.h
    11  
    12  ipv4_addr_local {
    13  	a0	const[0xac, int8]
    14  	a1	const[0x14, int8]
    15  	a2	proc[0, 1, int8]
    16  	a3	const[0xaa, int8]
    17  } [packed]
    18  
    19  # This corresponds to LOCAL_IPV4 ("172.20.%d.187" % pid) in executor/common_bsd.h
    20  ipv4_addr_remote {
    21  	a0	const[0xac, int8]
    22  	a1	const[0x14, int8]
    23  	a2	proc[0, 1, int8]
    24  	a3	const[0xbb, int8]
    25  } [packed]
    26  
    27  ipv4_addr [
    28  # 0.0.0.0
    29  	empty		const[0x0, int32be]
    30  # 172.20.%d.170
    31  	local		ipv4_addr_local
    32  # 172.20.%d.187
    33  	remote		ipv4_addr_remote
    34  # 127.0.0.1
    35  	loopback	const[0x7f000001, int32be]
    36  # 224.0.0.1
    37  	multicast1	const[0xe0000001, int32be]
    38  # 224.0.0.2
    39  	multicast2	const[0xe0000002, int32be]
    40  # 255.255.255.255
    41  	broadcast	const[0xffffffff, int32be]
    42  # random
    43  	rand_addr	int32be
    44  ]
    45  
    46  ################################################################################
    47  ##################################### IPv6 #####################################
    48  ################################################################################
    49  
    50  ipv6_addr_empty {
    51  	a0	array[const[0x0, int8], 16]
    52  }
    53  
    54  # This corresponds to LOCAL_IPV6 ("fe80::%02hxaa" % pid) in executor/common_bsd.h
    55  ipv6_addr_local {
    56  	a0	const[0xfe, int8]
    57  	a1	const[0x80, int8]
    58  	a2	array[const[0x0, int8], 12]
    59  	a3	proc[0, 1, int8]
    60  	a4	const[0xaa, int8]
    61  } [packed]
    62  
    63  # This corresponds to REMOTE_IPV6 ("fe80::%02hxbb" % pid) in executor/common_bsd.h
    64  ipv6_addr_remote {
    65  	a0	const[0xfe, int8]
    66  	a1	const[0x80, int8]
    67  	a2	array[const[0x0, int8], 12]
    68  	a3	proc[0, 1, int8]
    69  	a4	const[0xbb, int8]
    70  } [packed]
    71  
    72  ipv6_addr_loopback {
    73  	a0	const[0, int64be]
    74  	a1	const[1, int64be]
    75  } [packed]
    76  
    77  ipv6_addr_ipv4 {
    78  	a0	array[const[0x0, int8], 10]
    79  	a1	array[const[0xff, int8], 2]
    80  	a3	ipv4_addr
    81  } [packed]
    82  
    83  ipv6_addr_multicast1 {
    84  	a0	const[0xff, int8]
    85  	a1	const[0x1, int8]
    86  	a2	array[const[0x0, int8], 13]
    87  	a3	const[0x1, int8]
    88  } [packed]
    89  
    90  ipv6_addr_multicast2 {
    91  	a0	const[0xff, int8]
    92  	a1	const[0x2, int8]
    93  	a2	array[const[0x0, int8], 13]
    94  	a3	const[0x1, int8]
    95  } [packed]
    96  
    97  ipv6_addr [
    98  	rand_addr	array[int8, 16]
    99  	empty		ipv6_addr_empty
   100  	local		ipv6_addr_local
   101  	remote		ipv6_addr_remote
   102  	loopback	ipv6_addr_loopback
   103  	ipv4		ipv6_addr_ipv4
   104  	mcast1		ipv6_addr_multicast1
   105  	mcast2		ipv6_addr_multicast2
   106  ] [size[16]]