0001
0002 #ifndef _LINUX_DN_H
0003 #define _LINUX_DN_H
0004
0005 #include <linux/ioctl.h>
0006 #include <linux/types.h>
0007 #include <linux/if_ether.h>
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #define DNPROTO_NSP 2
0020 #define DNPROTO_ROU 3
0021 #define DNPROTO_NML 4
0022 #define DNPROTO_EVL 5
0023 #define DNPROTO_EVR 6
0024 #define DNPROTO_NSPT 7
0025
0026
0027 #define DN_ADDL 2
0028 #define DN_MAXADDL 2
0029 #define DN_MAXOPTL 16
0030 #define DN_MAXOBJL 16
0031 #define DN_MAXACCL 40
0032 #define DN_MAXALIASL 128
0033 #define DN_MAXNODEL 256
0034 #define DNBUFSIZE 65023
0035
0036
0037
0038
0039 #define SO_CONDATA 1
0040 #define SO_CONACCESS 2
0041 #define SO_PROXYUSR 3
0042 #define SO_LINKINFO 7
0043
0044 #define DSO_CONDATA 1
0045 #define DSO_DISDATA 10
0046 #define DSO_CONACCESS 2
0047 #define DSO_ACCEPTMODE 4
0048 #define DSO_CONACCEPT 5
0049 #define DSO_CONREJECT 6
0050 #define DSO_LINKINFO 7
0051 #define DSO_STREAM 8
0052 #define DSO_SEQPACKET 9
0053 #define DSO_MAXWINDOW 11
0054 #define DSO_NODELAY 12
0055 #define DSO_CORK 13
0056 #define DSO_SERVICES 14
0057 #define DSO_INFO 15
0058 #define DSO_MAX 15
0059
0060
0061
0062 #define LL_INACTIVE 0
0063 #define LL_CONNECTING 1
0064 #define LL_RUNNING 2
0065 #define LL_DISCONNECTING 3
0066
0067 #define ACC_IMMED 0
0068 #define ACC_DEFER 1
0069
0070 #define SDF_WILD 1
0071 #define SDF_PROXY 2
0072 #define SDF_UICPROXY 4
0073
0074
0075
0076
0077 struct dn_naddr {
0078 __le16 a_len;
0079 __u8 a_addr[DN_MAXADDL];
0080 };
0081
0082 struct sockaddr_dn {
0083 __u16 sdn_family;
0084 __u8 sdn_flags;
0085 __u8 sdn_objnum;
0086 __le16 sdn_objnamel;
0087 __u8 sdn_objname[DN_MAXOBJL];
0088 struct dn_naddr sdn_add;
0089 };
0090 #define sdn_nodeaddrl sdn_add.a_len
0091 #define sdn_nodeaddr sdn_add.a_addr
0092
0093
0094
0095
0096
0097
0098 struct optdata_dn {
0099 __le16 opt_status;
0100 #define opt_sts opt_status
0101 __le16 opt_optl;
0102 __u8 opt_data[16];
0103 };
0104
0105 struct accessdata_dn {
0106 __u8 acc_accl;
0107 __u8 acc_acc[DN_MAXACCL];
0108 __u8 acc_passl;
0109 __u8 acc_pass[DN_MAXACCL];
0110 __u8 acc_userl;
0111 __u8 acc_user[DN_MAXACCL];
0112 };
0113
0114
0115
0116
0117 struct linkinfo_dn {
0118 __u16 idn_segsize;
0119 __u8 idn_linkstate;
0120 };
0121
0122
0123
0124
0125 union etheraddress {
0126 __u8 dne_addr[ETH_ALEN];
0127 struct {
0128 __u8 dne_hiord[4];
0129 __u8 dne_nodeaddr[2];
0130 } dne_remote;
0131 };
0132
0133
0134
0135
0136
0137 struct dn_addr {
0138 __le16 dna_family;
0139 union etheraddress dna_netaddr;
0140 };
0141
0142 #define DECNET_IOCTL_BASE 0x89
0143
0144 #define SIOCSNETADDR _IOW(DECNET_IOCTL_BASE, 0xe0, struct dn_naddr)
0145 #define SIOCGNETADDR _IOR(DECNET_IOCTL_BASE, 0xe1, struct dn_naddr)
0146 #define OSIOCSNETADDR _IOW(DECNET_IOCTL_BASE, 0xe0, int)
0147 #define OSIOCGNETADDR _IOR(DECNET_IOCTL_BASE, 0xe1, int)
0148
0149 #endif