Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 7 | #ifndef __UAPI_MCTP_H |
| 8 | #define __UAPI_MCTP_H |
| 9 | #include <linux/types.h> |
| 10 | #include <linux/socket.h> |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 11 | #include <linux/netdevice.h> |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 12 | typedef __u8 mctp_eid_t; |
| 13 | struct mctp_addr { |
| 14 | mctp_eid_t s_addr; |
| 15 | }; |
| 16 | struct sockaddr_mctp { |
| 17 | __kernel_sa_family_t smctp_family; |
| 18 | __u16 __smctp_pad0; |
| 19 | unsigned int smctp_network; |
| 20 | struct mctp_addr smctp_addr; |
| 21 | __u8 smctp_type; |
| 22 | __u8 smctp_tag; |
| 23 | __u8 __smctp_pad1; |
| 24 | }; |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 25 | struct sockaddr_mctp_ext { |
| 26 | struct sockaddr_mctp smctp_base; |
| 27 | int smctp_ifindex; |
| 28 | __u8 smctp_halen; |
| 29 | __u8 __smctp_pad0[3]; |
| 30 | __u8 smctp_haddr[MAX_ADDR_LEN]; |
| 31 | }; |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 32 | #define MCTP_NET_ANY 0x0 |
| 33 | #define MCTP_ADDR_NULL 0x00 |
| 34 | #define MCTP_ADDR_ANY 0xff |
| 35 | #define MCTP_TAG_MASK 0x07 |
| 36 | #define MCTP_TAG_OWNER 0x08 |
Christopher Ferris | 10a76e6 | 2022-06-08 13:31:52 -0700 | [diff] [blame] | 37 | #define MCTP_TAG_PREALLOC 0x10 |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 38 | #define MCTP_OPT_ADDR_EXT 1 |
Christopher Ferris | 10a76e6 | 2022-06-08 13:31:52 -0700 | [diff] [blame] | 39 | #define SIOCMCTPALLOCTAG (SIOCPROTOPRIVATE + 0) |
| 40 | #define SIOCMCTPDROPTAG (SIOCPROTOPRIVATE + 1) |
| 41 | struct mctp_ioc_tag_ctl { |
| 42 | mctp_eid_t peer_addr; |
| 43 | __u8 tag; |
| 44 | __u16 flags; |
| 45 | }; |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 46 | #endif |