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