/usr/include/ncp/kernel/ncp.h is in libncp-dev 2.2.6-8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | /*
ncp.h
Copyright (C) 1995 by Volker Lendecke
Copyright (C) 1996 J.F. Chadima
Copyright (C) 1997, 1998, 1999 Petr Vandrovec
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Revision history:
0.00 1995 Volker Lendecke
Initial revision.
0.01 1996 J.F. Chadima
Modified for sparc.
0.02 1998 Petr Vandrovec <vandrove@vc.cvut.cz>
New flags...
1.00 1999, November 20 Petr Vandrovec <vandrove@vc.cvut.cz>
Added license.
1.01 2001, November 4 Petr Vandrovec <vandrove@vc.cvut.cz>
Added NW_NS_LONG definition.
Added couple of SWIG fixes.
*/
#ifndef _LINUX_NCP_H
#define _LINUX_NCP_H
#include <ncp/kernel/types.h>
#define NCP_PTYPE (0x11)
#define NCP_PORT (0x0451)
#define NCP_ALLOC_SLOT_REQUEST (0x1111)
#define NCP_REQUEST (0x2222)
#define NCP_DEALLOC_SLOT_REQUEST (0x5555)
struct ncp_request_header {
u_int16_t type;
u_int8_t sequence;
u_int8_t conn_low;
u_int8_t task;
u_int8_t conn_high;
u_int8_t function;
u_int8_t data[0];
} __attribute__((packed));
#define NCP_REPLY (0x3333)
#define NCP_POSITIVE_ACK (0x9999)
struct ncp_reply_header {
u_int16_t type;
u_int8_t sequence;
u_int8_t conn_low;
u_int8_t task;
u_int8_t conn_high;
u_int8_t completion_code;
u_int8_t connection_state;
u_int8_t data[0];
} __attribute__((packed));
#define NCP_VOLNAME_LEN (16)
#define NCP_NUMBER_OF_VOLUMES (64)
#ifdef SWIG
struct ncp_volume_info {
u_int32_t total_blocks;
u_int32_t free_blocks;
u_int32_t purgeable_blocks;
u_int32_t not_yet_purgeable_blocks;
u_int32_t total_dir_entries;
u_int32_t available_dir_entries;
u_int8_t sectors_per_block;
fixedCharArray volume_name[NCP_VOLNAME_LEN + 1];
};
#else
struct ncp_volume_info {
u_int32_t total_blocks;
u_int32_t free_blocks;
u_int32_t purgeable_blocks;
u_int32_t not_yet_purgeable_blocks;
u_int32_t total_dir_entries;
u_int32_t available_dir_entries;
u_int8_t sectors_per_block;
char volume_name[NCP_VOLNAME_LEN + 1];
};
#endif
#define NCP_FILE_ID_LEN 6
/* Defines for Name Spaces */
#define NW_NS_DOS 0
#define NW_NS_MAC 1
#define NW_NS_NFS 2
#define NW_NS_FTAM 3
#define NW_NS_OS2 4
#define NW_NS_LONG NW_NS_OS2
#define RIM_NAME 0x00000001
#define RIM_SPACE_ALLOCATED 0x00000002
#define RIM_ATTRIBUTES 0x00000004
#define RIM_DATA_SIZE 0x00000008
#define RIM_TOTAL_SIZE 0x00000010
#define RIM_EXT_ATTR_INFO 0x00000020
#define RIM_ARCHIVE 0x00000040
#define RIM_MODIFY 0x00000080
#define RIM_CREATION 0x00000100
#define RIM_OWNING_NAMESPACE 0x00000200
#define RIM_DIRECTORY 0x00000400
#define RIM_RIGHTS 0x00000800
#define RIM_ALL 0x00000FFF
#define RIM_REFERENCE_ID 0x00001000
#define RIM_NS_ATTRIBUTES 0x00002000
#define RIM_DATASTREAM_SIZES 0x00004000
#define RIM_DATASTREAM_LOGICALS 0x00008000
#define RIM_UPDATE_TIME 0x00010000
#define RIM_DOS_NAME 0x00020000
#define RIM_FLUSH_TIME 0x00040000
#define RIM_PARENT_BASE_ID 0x00080000
#define RIM_MAC_FINDER_INFO 0x00100000
#define RIM_SIBLING_COUNT 0x00200000
#define RIM_EFFECTIVE_RIGHTS 0x00400000
#define RIM_MAC_TIMES 0x00800000
#define RIM_LAST_ACCESS_TIME 0x01000000
#ifdef MAKE_NCPLIB
#define RIM_UNKNOWN25 0x02000000 /* fixme! */
#endif
#define RIM_SIZE64 0x04000000
#define RIM_NSS_LARGE_SIZES 0x40000000
#define RIM_COMPRESSED_INFO 0x80000000U
/* open/create modes */
#define OC_MODE_OPEN 0x01
#define OC_MODE_TRUNCATE 0x02
#define OC_MODE_REPLACE 0x02
#define OC_MODE_CREATE 0x08
#define OC_MODE_OPEN_64BIT_ACCESS 0x20
#define OC_MODE_READONLY_OK 0x40
#define OC_MODE_CALLBACK 0x80
/* open/create results */
#define OC_ACTION_NONE 0x00
#define OC_ACTION_OPEN 0x01
#define OC_ACTION_CREATE 0x02
#define OC_ACTION_TRUNCATE 0x04
#define OC_ACTION_REPLACE 0x04
#define OC_ACTION_COMPRESSED 0x08
#define OC_ACTION_READONLY 0x80
/* access rights attributes */
#ifndef AR_READ_ONLY
#define AR_READ_ONLY 0x0001
#define AR_WRITE_ONLY 0x0002
#define AR_DENY_READ 0x0004
#define AR_DENY_WRITE 0x0008
#define AR_COMPATIBILITY 0x0010
#define AR_WRITE_THROUGH 0x0040
#define AR_OPEN_COMPRESSED 0x0100
#endif
#ifdef SWIG
struct nw_info_struct {
u_int32_t spaceAlloc;
u_int32_t attributes;
u_int16_t flags;
u_int32_t dataStreamSize;
u_int32_t totalStreamSize;
u_int16_t numberOfStreams;
u_int16_t creationTime;
u_int16_t creationDate;
u_int32_t creatorID;
u_int16_t modifyTime;
u_int16_t modifyDate;
u_int32_t modifierID;
u_int16_t lastAccessDate;
u_int16_t archiveTime;
u_int16_t archiveDate;
u_int32_t archiverID;
u_int16_t inheritedRightsMask;
u_int32_t dirEntNum;
u_int32_t DosDirNum;
u_int32_t volNumber;
u_int32_t EADataSize;
u_int32_t EAKeyCount;
u_int32_t EAKeySize;
u_int32_t NSCreator;
%pragma(swig) readonly
u_int8_t nameLen;
%pragma(swig) readwrite
byteLenPrefixCharArray entryName[255];
} __attribute__((packed));
#else
struct nw_info_struct {
u_int32_t spaceAlloc;
u_int32_t attributes;
u_int16_t flags;
u_int32_t dataStreamSize;
u_int32_t totalStreamSize;
u_int16_t numberOfStreams;
u_int16_t creationTime;
u_int16_t creationDate;
u_int32_t creatorID;
u_int16_t modifyTime;
u_int16_t modifyDate;
u_int32_t modifierID;
u_int16_t lastAccessDate;
u_int16_t archiveTime;
u_int16_t archiveDate;
u_int32_t archiverID;
u_int16_t inheritedRightsMask;
u_int32_t dirEntNum;
u_int32_t DosDirNum;
u_int32_t volNumber;
u_int32_t EADataSize;
u_int32_t EAKeyCount;
u_int32_t EAKeySize;
u_int32_t NSCreator;
u_int8_t nameLen;
u_int8_t entryName[256];
} __attribute__((packed));
#endif
/* modify mask - use with MODIFY_DOS_INFO structure */
#define DM_ATTRIBUTES (0x00000002L)
#define DM_CREATE_DATE (0x00000004L)
#define DM_CREATE_TIME (0x00000008L)
#define DM_CREATOR_ID (0x00000010L)
#define DM_ARCHIVE_DATE (0x00000020L)
#define DM_ARCHIVE_TIME (0x00000040L)
#define DM_ARCHIVER_ID (0x00000080L)
#define DM_MODIFY_DATE (0x00000100L)
#define DM_MODIFY_TIME (0x00000200L)
#define DM_MODIFIER_ID (0x00000400L)
#define DM_LAST_ACCESS_DATE (0x00000800L)
#define DM_INHERITED_RIGHTS_MASK (0x00001000L)
#define DM_MAXIMUM_SPACE (0x00002000L)
struct nw_modify_dos_info {
u_int32_t attributes;
u_int16_t creationDate;
u_int16_t creationTime;
u_int32_t creatorID;
u_int16_t modifyDate;
u_int16_t modifyTime;
u_int32_t modifierID;
u_int16_t archiveDate;
u_int16_t archiveTime;
u_int32_t archiverID;
u_int16_t lastAccessDate;
u_int16_t inheritanceGrantMask;
u_int16_t inheritanceRevokeMask;
u_int32_t maximumSpace;
} __attribute__((packed));
#ifdef SWIG
struct nw_file_info {
struct nw_info_struct i;
int opened;
int access;
u_int32_t server_file_handle;
u_int8_t open_create_action;
fixedArray file_handle[6];
} __attribute__((packed));
#else
struct nw_file_info {
struct nw_info_struct i;
int opened;
int access;
u_int32_t server_file_handle;
u_int8_t open_create_action;
u_int8_t file_handle[6];
} __attribute__((packed));
#endif
struct nw_search_sequence {
u_int8_t volNumber;
u_int32_t dirBase;
u_int32_t sequence;
} __attribute__((packed));
#endif /* _LINUX_NCP_H */
|