OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [linux/] [ncp.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/*
2
 *  ncp.h
3
 *
4
 *  Copyright (C) 1995 by Volker Lendecke
5
 *
6
 */
7
 
8
#ifndef _LINUX_NCP_H
9
#define _LINUX_NCP_H
10
 
11
#include <linux/types.h>
12
#include <linux/ipx.h>
13
 
14
#define NCP_PTYPE                (0x11)
15
#define NCP_PORT                 (0x0451)
16
 
17
#define NCP_ALLOC_SLOT_REQUEST   (0x1111)
18
#define NCP_REQUEST              (0x2222)
19
#define NCP_DEALLOC_SLOT_REQUEST (0x5555)
20
 
21
struct ncp_request_header {
22
        __u16   type      __attribute__ ((packed));
23
        __u8    sequence  __attribute__ ((packed));
24
        __u8    conn_low  __attribute__ ((packed));
25
        __u8    task      __attribute__ ((packed));
26
        __u8    conn_high __attribute__ ((packed));
27
        __u8    function  __attribute__ ((packed));
28
        __u8    data[0]   __attribute__ ((packed));
29
};
30
 
31
#define NCP_REPLY                (0x3333)
32
#define NCP_POSITIVE_ACK         (0x9999)
33
 
34
struct ncp_reply_header {
35
        __u16   type             __attribute__ ((packed));
36
        __u8    sequence         __attribute__ ((packed));
37
        __u8    conn_low         __attribute__ ((packed));
38
        __u8    task             __attribute__ ((packed));
39
        __u8    conn_high        __attribute__ ((packed));
40
        __u8    completion_code  __attribute__ ((packed));
41
        __u8    connection_state __attribute__ ((packed));
42
        __u8    data[0]          __attribute__ ((packed));
43
};
44
 
45
 
46
#define NCP_BINDERY_USER (0x0001)
47
#define NCP_BINDERY_UGROUP (0x0002)
48
#define NCP_BINDERY_PQUEUE (0x0003)
49
#define NCP_BINDERY_FSERVER (0x0004)
50
#define NCP_BINDERY_NAME_LEN (48)
51
struct ncp_bindery_object {
52
        __u32   object_id;
53
        __u16   object_type;
54
        __u8    object_name[NCP_BINDERY_NAME_LEN];
55
        __u8    object_flags;
56
        __u8    object_security;
57
        __u8    object_has_prop;
58
};
59
 
60
struct nw_property {
61
        __u8    value[128];
62
        __u8    more_flag;
63
        __u8    property_flag;
64
};
65
 
66
struct prop_net_address {
67
        __u32 network                __attribute__ ((packed));
68
        __u8  node[IPX_NODE_LEN]     __attribute__ ((packed));
69
        __u16 port                   __attribute__ ((packed));
70
};
71
 
72
#define NCP_VOLNAME_LEN (16)
73
#define NCP_NUMBER_OF_VOLUMES (64)
74
struct ncp_volume_info {
75
        __u32   total_blocks;
76
        __u32   free_blocks;
77
        __u32   purgeable_blocks;
78
        __u32   not_yet_purgeable_blocks;
79
        __u32   total_dir_entries;
80
        __u32   available_dir_entries;
81
        __u8    sectors_per_block;
82
        char    volume_name[NCP_VOLNAME_LEN+1];
83
};
84
 
85
struct ncp_filesearch_info {
86
        __u8    volume_number;
87
        __u16   directory_id;
88
        __u16   sequence_no;
89
        __u8    access_rights;
90
};
91
 
92
#define NCP_MAX_FILENAME 14
93
 
94
/* these define the attribute byte as seen by NCP */
95
#define aRONLY     (1L<<0)
96
#define aHIDDEN    (1L<<1)
97
#define aSYSTEM    (1L<<2)
98
#define aEXECUTE   (1L<<3)
99
#define aDIR       (1L<<4)
100
#define aARCH      (1L<<5)
101
 
102
#define AR_READ      (0x01)
103
#define AR_WRITE     (0x02)
104
#define AR_EXCLUSIVE (0x20)
105
 
106
#define NCP_FILE_ID_LEN 6
107
struct ncp_file_info {
108
        __u8    file_id[NCP_FILE_ID_LEN];
109
        char    file_name[NCP_MAX_FILENAME+1];
110
        __u8    file_attributes;
111
        __u8    file_mode;
112
        __u32   file_length;
113
        __u16   creation_date;
114
        __u16   access_date;
115
        __u16   update_date;
116
        __u16   update_time;
117
};
118
 
119
/* Defines for Name Spaces */
120
#define NW_NS_DOS     0
121
#define NW_NS_MAC     1
122
#define NW_NS_NFS     2
123
#define NW_NS_FTAM    3
124
#define NW_NS_OS2     4
125
 
126
/*  Defines for ReturnInformationMask */
127
#define RIM_NAME              (0x0001L)
128
#define RIM_SPACE_ALLOCATED   (0x0002L)
129
#define RIM_ATTRIBUTES        (0x0004L)
130
#define RIM_DATA_SIZE         (0x0008L)
131
#define RIM_TOTAL_SIZE        (0x0010L)
132
#define RIM_EXT_ATTR_INFO     (0x0020L)
133
#define RIM_ARCHIVE           (0x0040L)
134
#define RIM_MODIFY            (0x0080L)
135
#define RIM_CREATION          (0x0100L)
136
#define RIM_OWNING_NAMESPACE  (0x0200L)
137
#define RIM_DIRECTORY         (0x0400L)
138
#define RIM_RIGHTS            (0x0800L)
139
#define RIM_ALL               (0x0FFFL)
140
#define RIM_COMPRESSED_INFO   (0x80000000L)
141
 
142
/* open/create modes */
143
#define OC_MODE_OPEN      0x01
144
#define OC_MODE_TRUNCATE  0x02
145
#define OC_MODE_REPLACE   0x02
146
#define OC_MODE_CREATE    0x08
147
 
148
/* open/create results */
149
#define OC_ACTION_NONE     0x00
150
#define OC_ACTION_OPEN     0x01
151
#define OC_ACTION_CREATE   0x02
152
#define OC_ACTION_TRUNCATE 0x04
153
#define OC_ACTION_REPLACE  0x04
154
 
155
/* access rights attributes */
156
#ifndef AR_READ_ONLY
157
#define AR_READ_ONLY       0x0001
158
#define AR_WRITE_ONLY      0x0002
159
#define AR_DENY_READ       0x0004
160
#define AR_DENY_WRITE      0x0008
161
#define AR_COMPATIBILITY   0x0010
162
#define AR_WRITE_THROUGH   0x0040
163
#define AR_OPEN_COMPRESSED 0x0100
164
#endif
165
 
166
struct nw_info_struct
167
{
168
        __u32 spaceAlloc                  __attribute__ ((packed));
169
        __u32 attributes                  __attribute__ ((packed));
170
        __u16 flags                       __attribute__ ((packed));
171
        __u32 dataStreamSize              __attribute__ ((packed));
172
        __u32 totalStreamSize             __attribute__ ((packed));
173
        __u16 numberOfStreams             __attribute__ ((packed));
174
        __u16 creationTime                __attribute__ ((packed));
175
        __u16 creationDate                __attribute__ ((packed));
176
        __u32 creatorID                   __attribute__ ((packed));
177
        __u16 modifyTime                  __attribute__ ((packed));
178
        __u16 modifyDate                  __attribute__ ((packed));
179
        __u32 modifierID                  __attribute__ ((packed));
180
        __u16 lastAccessDate              __attribute__ ((packed));
181
        __u16 archiveTime                 __attribute__ ((packed));
182
        __u16 archiveDate                 __attribute__ ((packed));
183
        __u32 archiverID                  __attribute__ ((packed));
184
        __u16 inheritedRightsMask         __attribute__ ((packed));
185
        __u32 dirEntNum                   __attribute__ ((packed));
186
        __u32 DosDirNum                   __attribute__ ((packed));
187
        __u32 volNumber                   __attribute__ ((packed));
188
        __u32 EADataSize                  __attribute__ ((packed));
189
        __u32 EAKeyCount                  __attribute__ ((packed));
190
        __u32 EAKeySize                   __attribute__ ((packed));
191
        __u32 NSCreator                   __attribute__ ((packed));
192
        __u8  nameLen                     __attribute__ ((packed));
193
        __u8  entryName[256]              __attribute__ ((packed));
194
};
195
 
196
/* modify mask - use with MODIFY_DOS_INFO structure */
197
#define DM_ATTRIBUTES             (0x0002L)
198
#define DM_CREATE_DATE            (0x0004L)
199
#define DM_CREATE_TIME            (0x0008L)
200
#define DM_CREATOR_ID             (0x0010L)
201
#define DM_ARCHIVE_DATE           (0x0020L)
202
#define DM_ARCHIVE_TIME           (0x0040L)
203
#define DM_ARCHIVER_ID            (0x0080L)
204
#define DM_MODIFY_DATE            (0x0100L)
205
#define DM_MODIFY_TIME            (0x0200L)
206
#define DM_MODIFIER_ID            (0x0400L)
207
#define DM_LAST_ACCESS_DATE       (0x0800L)
208
#define DM_INHERITED_RIGHTS_MASK  (0x1000L)
209
#define DM_MAXIMUM_SPACE          (0x2000L)
210
 
211
struct nw_modify_dos_info
212
{
213
        __u32 attributes                  __attribute__ ((packed));
214
        __u16 creationDate                __attribute__ ((packed));
215
        __u16 creationTime                __attribute__ ((packed));
216
        __u32 creatorID                   __attribute__ ((packed));
217
        __u16 modifyDate                  __attribute__ ((packed));
218
        __u16 modifyTime                  __attribute__ ((packed));
219
        __u32 modifierID                  __attribute__ ((packed));
220
        __u16 archiveDate                 __attribute__ ((packed));
221
        __u16 archiveTime                 __attribute__ ((packed));
222
        __u32 archiverID                  __attribute__ ((packed));
223
        __u16 lastAccessDate              __attribute__ ((packed));
224
        __u16 inheritanceGrantMask        __attribute__ ((packed));
225
        __u16 inheritanceRevokeMask       __attribute__ ((packed));
226
        __u32 maximumSpace                __attribute__ ((packed));
227
};
228
 
229
struct nw_file_info {
230
        struct nw_info_struct i;
231
        int   opened;
232
        int   access;
233
        __u32 server_file_handle          __attribute__ ((packed));
234
        __u8  open_create_action          __attribute__ ((packed));
235
        __u8  file_handle[6]              __attribute__ ((packed));
236
};
237
 
238
struct nw_search_sequence {
239
        __u8  volNumber                   __attribute__ ((packed));
240
        __u32 dirBase                     __attribute__ ((packed));
241
        __u32 sequence                    __attribute__ ((packed));
242
};
243
 
244
struct nw_queue_job_entry {
245
        __u16 InUse                       __attribute__ ((packed));
246
        __u32 prev                        __attribute__ ((packed));
247
        __u32 next                        __attribute__ ((packed));
248
        __u32 ClientStation               __attribute__ ((packed));
249
        __u32 ClientTask                  __attribute__ ((packed));
250
        __u32 ClientObjectID              __attribute__ ((packed));
251
        __u32 TargetServerID              __attribute__ ((packed));
252
        __u8  TargetExecTime[6]           __attribute__ ((packed));
253
        __u8  JobEntryTime[6]             __attribute__ ((packed));
254
        __u32 JobNumber                   __attribute__ ((packed));
255
        __u16 JobType                     __attribute__ ((packed));
256
        __u16 JobPosition                 __attribute__ ((packed));
257
        __u16 JobControlFlags             __attribute__ ((packed));
258
        __u8  FileNameLen                 __attribute__ ((packed));
259
        char  JobFileName[13]             __attribute__ ((packed));
260
        __u32 JobFileHandle               __attribute__ ((packed));
261
        __u32 ServerStation               __attribute__ ((packed));
262
        __u32 ServerTaskNumber            __attribute__ ((packed));
263
        __u32 ServerObjectID              __attribute__ ((packed));
264
        char  JobTextDescription[50]      __attribute__ ((packed));
265
        char  ClientRecordArea[152]       __attribute__ ((packed));
266
};
267
 
268
struct queue_job {
269
        struct nw_queue_job_entry j;
270
        __u8 file_handle[6];
271
};
272
 
273
#define QJE_OPER_HOLD   0x80
274
#define QJE_USER_HOLD   0x40
275
#define QJE_ENTRYOPEN   0x20
276
#define QJE_SERV_RESTART    0x10
277
#define QJE_SERV_AUTO       0x08
278
 
279
/* ClientRecordArea for print jobs */
280
 
281
#define   KEEP_ON        0x0400
282
#define   NO_FORM_FEED   0x0800
283
#define   NOTIFICATION   0x1000
284
#define   DELETE_FILE    0x2000
285
#define   EXPAND_TABS    0x4000
286
#define   PRINT_BANNER   0x8000
287
 
288
struct print_job_record {
289
    __u8  Version                         __attribute__ ((packed));
290
    __u8  TabSize                         __attribute__ ((packed));
291
    __u16 Copies                          __attribute__ ((packed));
292
    __u16 CtrlFlags                       __attribute__ ((packed));
293
    __u16 Lines                           __attribute__ ((packed));
294
    __u16 Rows                            __attribute__ ((packed));
295
    char  FormName[16]                    __attribute__ ((packed));
296
    __u8  Reserved[6]                     __attribute__ ((packed));
297
    char  BannerName[13]                  __attribute__ ((packed));
298
    char  FnameBanner[13]                 __attribute__ ((packed));
299
    char  FnameHeader[14]                 __attribute__ ((packed));
300
    char  Path[80]                        __attribute__ ((packed));
301
};
302
 
303
 
304
#endif /* _LINUX_NCP_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.