1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _UAPILINUX_PHONET_H
20 #define _UAPILINUX_PHONET_H
21 #include <linux/types.h>
22 #include <linux/socket.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #define PN_PROTO_TRANSPORT 0
25 #define PN_PROTO_PHONET 1
26 #define PN_PROTO_PIPE 2
27 #define PHONET_NPROTO 3
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define PNPIPE_ENCAP 1
30 #define PNPIPE_IFINDEX 2
31 #define PNPIPE_HANDLE 3
32 #define PNPIPE_INITSTATE 4
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define PNADDR_ANY 0
35 #define PNADDR_BROADCAST 0xFC
36 #define PNPORT_RESOURCE_ROUTING 0
37 #define PNPIPE_ENCAP_NONE 0
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 #define PNPIPE_ENCAP_IP 1
40 #define SIOCPNGETOBJECT (SIOCPROTOPRIVATE + 0)
41 #define SIOCPNENABLEPIPE (SIOCPROTOPRIVATE + 13)
42 #define SIOCPNADDRESOURCE (SIOCPROTOPRIVATE + 14)
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #define SIOCPNDELRESOURCE (SIOCPROTOPRIVATE + 15)
45 struct phonethdr {
46   __u8 pn_rdev;
47   __u8 pn_sdev;
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49   __u8 pn_res;
50   __be16 pn_length;
51   __u8 pn_robj;
52   __u8 pn_sobj;
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 } __attribute__((packed));
55 struct phonetmsg {
56   __u8 pn_trans_id;
57   __u8 pn_msg_id;
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59   union {
60     struct {
61       __u8 pn_submsg_id;
62       __u8 pn_data[5];
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64     } base;
65     struct {
66       __u16 pn_e_res_id;
67       __u8 pn_e_submsg_id;
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69       __u8 pn_e_data[3];
70     } ext;
71   } pn_msg_u;
72 };
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 #define PN_COMMON_MESSAGE 0xF0
75 #define PN_COMMGR 0x10
76 #define PN_PREFIX 0xE0
77 #define pn_submsg_id pn_msg_u.base.pn_submsg_id
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 #define pn_e_submsg_id pn_msg_u.ext.pn_e_submsg_id
80 #define pn_e_res_id pn_msg_u.ext.pn_e_res_id
81 #define pn_data pn_msg_u.base.pn_data
82 #define pn_e_data pn_msg_u.ext.pn_e_data
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 #define PN_COMM_SERVICE_NOT_IDENTIFIED_RESP 0x01
85 #define PN_COMM_ISA_ENTITY_NOT_REACHABLE_RESP 0x14
86 #define pn_orig_msg_id pn_data[0]
87 #define pn_status pn_data[1]
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 #define pn_e_orig_msg_id pn_e_data[0]
90 #define pn_e_status pn_e_data[1]
91 struct sockaddr_pn {
92   __kernel_sa_family_t spn_family;
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94   __u8 spn_obj;
95   __u8 spn_dev;
96   __u8 spn_resource;
97   __u8 spn_zero[sizeof(struct sockaddr) - sizeof(__kernel_sa_family_t) - 3];
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 } __attribute__((packed));
100 #define PN_DEV_PC 0x10
101 #endif
102