blob: 8920339a35bf37f84e4b1678a139cfc7cda89ddf [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 Ferris2abfa9e2021-11-01 16:26:06 -07007#ifndef __UAPI_MCTP_H
8#define __UAPI_MCTP_H
9#include <linux/types.h>
10#include <linux/socket.h>
Christopher Ferrisa4792612022-01-10 13:51:15 -080011#include <linux/netdevice.h>
Christopher Ferris2abfa9e2021-11-01 16:26:06 -070012typedef __u8 mctp_eid_t;
13struct mctp_addr {
14 mctp_eid_t s_addr;
15};
16struct 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 Ferrisa4792612022-01-10 13:51:15 -080025struct 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 Ferris2abfa9e2021-11-01 16:26:06 -070032#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 Ferris10a76e62022-06-08 13:31:52 -070037#define MCTP_TAG_PREALLOC 0x10
Christopher Ferrisa4792612022-01-10 13:51:15 -080038#define MCTP_OPT_ADDR_EXT 1
Christopher Ferris10a76e62022-06-08 13:31:52 -070039#define SIOCMCTPALLOCTAG (SIOCPROTOPRIVATE + 0)
40#define SIOCMCTPDROPTAG (SIOCPROTOPRIVATE + 1)
41struct mctp_ioc_tag_ctl {
42 mctp_eid_t peer_addr;
43 __u8 tag;
44 __u16 flags;
45};
Christopher Ferris2abfa9e2021-11-01 16:26:06 -070046#endif