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 _LINUX_DN_H
20 #define _LINUX_DN_H
21 #include <linux/ioctl.h>
22 #include <linux/types.h>
23 #include <linux/if_ether.h>
24 #define DNPROTO_NSP 2
25 #define DNPROTO_ROU 3
26 #define DNPROTO_NML 4
27 #define DNPROTO_EVL 5
28 #define DNPROTO_EVR 6
29 #define DNPROTO_NSPT 7
30 #define DN_ADDL 2
31 #define DN_MAXADDL 2
32 #define DN_MAXOPTL 16
33 #define DN_MAXOBJL 16
34 #define DN_MAXACCL 40
35 #define DN_MAXALIASL 128
36 #define DN_MAXNODEL 256
37 #define DNBUFSIZE 65023
38 #define SO_CONDATA 1
39 #define SO_CONACCESS 2
40 #define SO_PROXYUSR 3
41 #define SO_LINKINFO 7
42 #define DSO_CONDATA 1
43 #define DSO_DISDATA 10
44 #define DSO_CONACCESS 2
45 #define DSO_ACCEPTMODE 4
46 #define DSO_CONACCEPT 5
47 #define DSO_CONREJECT 6
48 #define DSO_LINKINFO 7
49 #define DSO_STREAM 8
50 #define DSO_SEQPACKET 9
51 #define DSO_MAXWINDOW 11
52 #define DSO_NODELAY 12
53 #define DSO_CORK 13
54 #define DSO_SERVICES 14
55 #define DSO_INFO 15
56 #define DSO_MAX 15
57 #define LL_INACTIVE 0
58 #define LL_CONNECTING 1
59 #define LL_RUNNING 2
60 #define LL_DISCONNECTING 3
61 #define ACC_IMMED 0
62 #define ACC_DEFER 1
63 #define SDF_WILD 1
64 #define SDF_PROXY 2
65 #define SDF_UICPROXY 4
66 struct dn_naddr {
67   __le16 a_len;
68   __u8 a_addr[DN_MAXADDL];
69 };
70 struct sockaddr_dn {
71   __u16 sdn_family;
72   __u8 sdn_flags;
73   __u8 sdn_objnum;
74   __le16 sdn_objnamel;
75   __u8 sdn_objname[DN_MAXOBJL];
76   struct dn_naddr sdn_add;
77 };
78 #define sdn_nodeaddrl sdn_add.a_len
79 #define sdn_nodeaddr sdn_add.a_addr
80 struct optdata_dn {
81   __le16 opt_status;
82 #define opt_sts opt_status
83   __le16 opt_optl;
84   __u8 opt_data[16];
85 };
86 struct accessdata_dn {
87   __u8 acc_accl;
88   __u8 acc_acc[DN_MAXACCL];
89   __u8 acc_passl;
90   __u8 acc_pass[DN_MAXACCL];
91   __u8 acc_userl;
92   __u8 acc_user[DN_MAXACCL];
93 };
94 struct linkinfo_dn {
95   __u16 idn_segsize;
96   __u8 idn_linkstate;
97 };
98 union etheraddress {
99   __u8 dne_addr[ETH_ALEN];
100   struct {
101     __u8 dne_hiord[4];
102     __u8 dne_nodeaddr[2];
103   } dne_remote;
104 };
105 struct dn_addr {
106   __le16 dna_family;
107   union etheraddress dna_netaddr;
108 };
109 #define DECNET_IOCTL_BASE 0x89
110 #define SIOCSNETADDR _IOW(DECNET_IOCTL_BASE, 0xe0, struct dn_naddr)
111 #define SIOCGNETADDR _IOR(DECNET_IOCTL_BASE, 0xe1, struct dn_naddr)
112 #define OSIOCSNETADDR _IOW(DECNET_IOCTL_BASE, 0xe0, int)
113 #define OSIOCGNETADDR _IOR(DECNET_IOCTL_BASE, 0xe1, int)
114 #endif
115