blob: 621f60fdd8645d08f8dbabd81af646350155b9f7 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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
Christopher Ferris38062f92014-07-09 15:33:25 -070021#include <linux/ioctl.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070022#include <linux/types.h>
Christopher Ferris38062f92014-07-09 15:33:25 -070023#include <linux/if_ether.h>
24#define DNPROTO_NSP 2
Ben Cheng655a7c02013-10-16 16:09:24 -070025#define DNPROTO_ROU 3
26#define DNPROTO_NML 4
27#define DNPROTO_EVL 5
28#define DNPROTO_EVR 6
Ben Cheng655a7c02013-10-16 16:09:24 -070029#define DNPROTO_NSPT 7
30#define DN_ADDL 2
31#define DN_MAXADDL 2
32#define DN_MAXOPTL 16
Ben Cheng655a7c02013-10-16 16:09:24 -070033#define DN_MAXOBJL 16
34#define DN_MAXACCL 40
35#define DN_MAXALIASL 128
36#define DN_MAXNODEL 256
Ben Cheng655a7c02013-10-16 16:09:24 -070037#define DNBUFSIZE 65023
38#define SO_CONDATA 1
39#define SO_CONACCESS 2
40#define SO_PROXYUSR 3
Ben Cheng655a7c02013-10-16 16:09:24 -070041#define SO_LINKINFO 7
42#define DSO_CONDATA 1
43#define DSO_DISDATA 10
44#define DSO_CONACCESS 2
Ben Cheng655a7c02013-10-16 16:09:24 -070045#define DSO_ACCEPTMODE 4
46#define DSO_CONACCEPT 5
47#define DSO_CONREJECT 6
48#define DSO_LINKINFO 7
Ben Cheng655a7c02013-10-16 16:09:24 -070049#define DSO_STREAM 8
50#define DSO_SEQPACKET 9
51#define DSO_MAXWINDOW 11
52#define DSO_NODELAY 12
Ben Cheng655a7c02013-10-16 16:09:24 -070053#define DSO_CORK 13
54#define DSO_SERVICES 14
55#define DSO_INFO 15
56#define DSO_MAX 15
Ben Cheng655a7c02013-10-16 16:09:24 -070057#define LL_INACTIVE 0
58#define LL_CONNECTING 1
59#define LL_RUNNING 2
60#define LL_DISCONNECTING 3
Ben Cheng655a7c02013-10-16 16:09:24 -070061#define ACC_IMMED 0
62#define ACC_DEFER 1
63#define SDF_WILD 1
64#define SDF_PROXY 2
Ben Cheng655a7c02013-10-16 16:09:24 -070065#define SDF_UICPROXY 4
66struct dn_naddr {
Tao Baod7db5942015-01-28 10:07:51 -080067 __le16 a_len;
68 __u8 a_addr[DN_MAXADDL];
Ben Cheng655a7c02013-10-16 16:09:24 -070069};
70struct sockaddr_dn {
Tao Baod7db5942015-01-28 10:07:51 -080071 __u16 sdn_family;
72 __u8 sdn_flags;
73 __u8 sdn_objnum;
74 __le16 sdn_objnamel;
Tao Baod7db5942015-01-28 10:07:51 -080075 __u8 sdn_objname[DN_MAXOBJL];
76 struct dn_naddr sdn_add;
Ben Cheng655a7c02013-10-16 16:09:24 -070077};
78#define sdn_nodeaddrl sdn_add.a_len
79#define sdn_nodeaddr sdn_add.a_addr
80struct optdata_dn {
Tao Baod7db5942015-01-28 10:07:51 -080081 __le16 opt_status;
Ben Cheng655a7c02013-10-16 16:09:24 -070082#define opt_sts opt_status
Tao Baod7db5942015-01-28 10:07:51 -080083 __le16 opt_optl;
84 __u8 opt_data[16];
Ben Cheng655a7c02013-10-16 16:09:24 -070085};
86struct accessdata_dn {
Tao Baod7db5942015-01-28 10:07:51 -080087 __u8 acc_accl;
88 __u8 acc_acc[DN_MAXACCL];
89 __u8 acc_passl;
90 __u8 acc_pass[DN_MAXACCL];
Tao Baod7db5942015-01-28 10:07:51 -080091 __u8 acc_userl;
92 __u8 acc_user[DN_MAXACCL];
Ben Cheng655a7c02013-10-16 16:09:24 -070093};
94struct linkinfo_dn {
Tao Baod7db5942015-01-28 10:07:51 -080095 __u16 idn_segsize;
96 __u8 idn_linkstate;
Ben Cheng655a7c02013-10-16 16:09:24 -070097};
98union etheraddress {
Tao Baod7db5942015-01-28 10:07:51 -080099 __u8 dne_addr[ETH_ALEN];
100 struct {
101 __u8 dne_hiord[4];
102 __u8 dne_nodeaddr[2];
Tao Baod7db5942015-01-28 10:07:51 -0800103 } dne_remote;
Ben Cheng655a7c02013-10-16 16:09:24 -0700104};
Ben Cheng655a7c02013-10-16 16:09:24 -0700105struct dn_addr {
Tao Baod7db5942015-01-28 10:07:51 -0800106 __le16 dna_family;
Tao Baod7db5942015-01-28 10:07:51 -0800107 union etheraddress dna_netaddr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700108};
Ben Cheng655a7c02013-10-16 16:09:24 -0700109#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)
Ben Cheng655a7c02013-10-16 16:09:24 -0700113#define OSIOCGNETADDR _IOR(DECNET_IOCTL_BASE, 0xe1, int)
114#endif