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

     1  # Copyright 2018 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  # TCP Extensions for Multipath Operation with Multiple Addresses
     5  # https://tools.ietf.org/html/rfc6824
     6  # This is not upstream yes, constants for this descriptions were generated on the following tree:
     7  # https://github.com/multipath-tcp/mptcp_net-next.git
     8  # Once this is upstream we need to move this to vnet.txt
     9  
    10  # Was generated on https://github.com/multipath-tcp/mptcp_net-next
    11  meta noextract
    12  
    13  include <net/tcp.h>
    14  include <net/mptcp.h>
    15  include <net/mptcp_v4.h>
    16  include <net/mptcp_v6.h>
    17  include <uapi/linux/tcp.h>
    18  
    19  tcp_mptcp_option [
    20  	generic		mptcp_generic_option
    21  	syn		mptcp_syn_option
    22  	synack		mptcp_synack_option
    23  	ack		mptcp_ack_option
    24  	capable		mptcp_capable_option
    25  	add_addr	mptcp_add_addr_option
    26  	mp_join		mptcp_mp_join_option
    27  	mp_fclose	mptcp_mp_fclose_option
    28  	remove_addr	mptcp_remove_addr_option
    29  ] [varlen]
    30  
    31  mptcp_sub_types = OPTION_TYPE_SYN, OPTION_TYPE_SYNACK, OPTION_TYPE_ACK, OPTION_MP_CAPABLE, OPTION_ADD_ADDR, OPTION_MP_JOIN, OPTION_MP_FCLOSE
    32  
    33  # TODO: OPTION_REMOVE_ADDR was listed in mptcp_sub_types, but it does not fit into int8 below...
    34  _ = OPTION_REMOVE_ADDR
    35  
    36  mptcp_generic_option {
    37  	type	flags[mptcp_sub_types, int8]
    38  	length	len[parent, int8]
    39  	data	array[int8, 0:16]
    40  } [packed]
    41  
    42  mptcp_capable_option {
    43  	type		const[TCPOPT_MPTCP, int8]
    44  	length		len[parent, int8]
    45  	version		int8:4
    46  	subtype		const[OPTION_MP_CAPABLE, int8:4]
    47  	flags		int8
    48  	sender		int64be
    49  	receiver	array[int64be, 0:1]
    50  } [packed]
    51  
    52  mptcp_add_addr_option {
    53  	type	const[TCPOPT_MPTCP, int8]
    54  	length	len[parent, int8]
    55  # TODO: this was OPTION_ADD_ADDR, but it does not fit into 4 bits.
    56  	subtype	const[0, int8:4]
    57  	version	len[parent, int8:4]
    58  	addr_id	int8
    59  	address	ipv4_addr
    60  	port	int16be
    61  	mac	array[int8, 0:8]
    62  } [packed]
    63  
    64  _ = OPTION_ADD_ADDR
    65  
    66  mptcp_mp_join_option {
    67  	type	const[TCPOPT_MPTCP, int8]
    68  	length	len[parent, int8]
    69  	flags	int8:4
    70  # TODO: this was OPTION_MP_JOIN, but it does not fit into 4 bits.
    71  	subtype	const[0, int8:4]
    72  } [packed]
    73  
    74  _ = OPTION_MP_JOIN
    75  
    76  mptcp_syn_option {
    77  	type	const[TCPOPT_MPTCP, int8]
    78  	length	len[parent, int8]
    79  	flags	int8:4
    80  	subtype	const[OPTION_TYPE_SYN, int8:4]
    81  	addr_id	int8
    82  	token	int32
    83  	nonce	int32
    84  } [packed]
    85  
    86  mptcp_synack_option {
    87  	type	const[TCPOPT_MPTCP, int8]
    88  	length	len[parent, int8]
    89  	flags	int8:4
    90  	subtype	const[OPTION_TYPE_SYNACK, int8:4]
    91  	addr_id	int8
    92  	mac	int64
    93  	nonce	int32
    94  } [packed]
    95  
    96  mptcp_ack_option {
    97  	type		const[TCPOPT_MPTCP, int8]
    98  	length		len[parent, int8]
    99  	reserved	int16:12
   100  	subtype		const[OPTION_TYPE_ACK, int16:4]
   101  	mac		array[int8, 0:20]
   102  } [packed]
   103  
   104  mptcp_mp_fclose_option {
   105  	type		const[TCPOPT_MPTCP, int8]
   106  	length		len[parent, int8]
   107  	reserved	int16:12
   108  # TODO: this was OPTION_MP_FCLOSE, but it does not fit into 4 bits.
   109  	subtype		const[0, int16:4]
   110  	key		int64
   111  } [packed]
   112  
   113  _ = OPTION_MP_FCLOSE
   114  
   115  mptcp_remove_addr_option {
   116  	type		const[TCPOPT_MPTCP, int8]
   117  	length		len[parent, int8]
   118  	reserved	int8:4
   119  # TODO: this was OPTION_REMOVE_ADDR, but it does not fit into 4 bits.
   120  	subtype		const[0, int8:4]
   121  	addrs_id	array[int8]
   122  } [packed]
   123  
   124  _ = OPTION_REMOVE_ADDR