github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/tools/syz-declextract/testdata/manual.txt (about)

     1  # Copyright 2024 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  # This file contains manual descriptions that are required to compile auto-generated descriptions.
     5  
     6  resource fd[int32]
     7  resource sock_nl_generic[fd]
     8  resource pid[int32]
     9  
    10  type ifindex int32
    11  
    12  create$pid() pid (automatic_helper)
    13  create$sock_nl_generic() sock_nl_generic (automatic_helper)
    14  sendmsg$netlink(fd sock_nl_generic, data ptr[in, msghdr_netlink[netlink_msg_t[int32, genlmsghdr_t[1], int32]]], flags flags[send_flags])
    15  
    16  use(a ptr[in, use])
    17  use {
    18  	f0	pid
    19  	f1	ifindex
    20  	f2	auto_todo
    21  	f3	nlattr[1, int32]
    22  	f4	nlnest[1, int32]
    23  	f5	nl_generic_attr
    24  	f6	flags[open_flags, int32]
    25  	f7	flags[mmap_prot, int32]
    26  	f8	flags[mmap_flags, int32]
    27  	
    28  }
    29  
    30  type msghdr_netlink[MSG] {
    31  	vec	ptr[in, MSG]
    32  }
    33  
    34  type netlink_msg_t[TYPE, PAYLOAD, ATTRS] {
    35  	type	TYPE
    36  	payload	PAYLOAD
    37  	attrs	array[ATTRS]
    38  }
    39  
    40  type genlmsghdr_t[CMD] {
    41  	cmd		const[CMD, int8]
    42  }
    43  
    44  type nlattr[ATTR, TYPE] {
    45  	attr		const[ATTR, int32]
    46  	data		TYPE
    47  }
    48  
    49  type nlnest[ATTR, TYPE] nlattr[ATTR, TYPE]
    50  
    51  type nl_generic_attr int32
    52  
    53  open_flags = 1, 2
    54  mmap_prot = 1, 2
    55  mmap_flags = 1, 2
    56  send_flags = 1, 2