Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 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 1 2 3 4 5 6


ncp_fs.h
001: /*
002:  *  ncp_fs.h
003:  *
004:  *  Copyright (C) 1995, 1996 by Volker Lendecke
005:  *
006:  */
007: 
008: #ifndef _LINUX_NCP_FS_H
009: #define _LINUX_NCP_FS_H
010: 
011: #include <linux/fs.h>
012: #include <linux/in.h>
013: #include <linux/types.h>
014: #include <linux/magic.h>
015: 
016: #include <linux/ipx.h>
017: #include <linux/ncp_no.h>
018: 
019: /*
020:  * ioctl commands
021:  */
022: 
023: struct ncp_ioctl_request {
024:         unsigned int function;
025:         unsigned int size;
026:         char *data;
027: };
028: 
029: struct ncp_fs_info {
030:         int version;
031:         struct sockaddr_ipx addr;
032:         __kernel_uid_t mounted_uid;
033:         int connection;         /* Connection number the server assigned us */
034:         int buffer_size;        /* The negotiated buffer size, to be
035:                                    used for read/write requests! */
036: 
037:         int volume_number;
038:         __le32 directory_id;
039: };
040: 
041: struct ncp_fs_info_v2 {
042:         int version;
043:         unsigned long mounted_uid;
044:         unsigned int connection;
045:         unsigned int buffer_size;
046: 
047:         unsigned int volume_number;
048:         __le32 directory_id;
049: 
050:         __u32 dummy1;
051:         __u32 dummy2;
052:         __u32 dummy3;
053: };
054: 
055: struct ncp_sign_init
056: {
057:         char sign_root[8];
058:         char sign_last[16];
059: };
060: 
061: struct ncp_lock_ioctl
062: {
063: #define NCP_LOCK_LOG    0
064: #define NCP_LOCK_SH     1
065: #define NCP_LOCK_EX     2
066: #define NCP_LOCK_CLEAR  256
067:         int             cmd;
068:         int             origin;
069:         unsigned int    offset;
070:         unsigned int    length;
071: #define NCP_LOCK_DEFAULT_TIMEOUT        18
072: #define NCP_LOCK_MAX_TIMEOUT            180
073:         int             timeout;
074: };
075: 
076: struct ncp_setroot_ioctl
077: {
078:         int             volNumber;
079:         int             namespace;
080:         __le32          dirEntNum;
081: };
082: 
083: struct ncp_objectname_ioctl
084: {
085: #define NCP_AUTH_NONE   0x00
086: #define NCP_AUTH_BIND   0x31
087: #define NCP_AUTH_NDS    0x32
088:         int             auth_type;
089:         size_t          object_name_len;
090:         void *  object_name;    /* a userspace data, in most cases user name */
091: };
092: 
093: struct ncp_privatedata_ioctl
094: {
095:         size_t          len;
096:         void *  data;           /* ~1000 for NDS */
097: };
098: 
099: /* NLS charsets by ioctl */
100: #define NCP_IOCSNAME_LEN 20
101: struct ncp_nls_ioctl
102: {
103:         unsigned char codepage[NCP_IOCSNAME_LEN+1];
104:         unsigned char iocharset[NCP_IOCSNAME_LEN+1];
105: };
106: 
107: #define NCP_IOC_NCPREQUEST              _IOR('n', 1, struct ncp_ioctl_request)
108: #define NCP_IOC_GETMOUNTUID             _IOW('n', 2, __kernel_old_uid_t)
109: #define NCP_IOC_GETMOUNTUID2            _IOW('n', 2, unsigned long)
110: 
111: #define NCP_IOC_CONN_LOGGED_IN          _IO('n', 3)
112: 
113: #define NCP_GET_FS_INFO_VERSION    (1)
114: #define NCP_IOC_GET_FS_INFO             _IOWR('n', 4, struct ncp_fs_info)
115: #define NCP_GET_FS_INFO_VERSION_V2 (2)
116: #define NCP_IOC_GET_FS_INFO_V2          _IOWR('n', 4, struct ncp_fs_info_v2)
117: 
118: #define NCP_IOC_SIGN_INIT               _IOR('n', 5, struct ncp_sign_init)
119: #define NCP_IOC_SIGN_WANTED             _IOR('n', 6, int)
120: #define NCP_IOC_SET_SIGN_WANTED         _IOW('n', 6, int)
121: 
122: #define NCP_IOC_LOCKUNLOCK              _IOR('n', 7, struct ncp_lock_ioctl)
123: 
124: #define NCP_IOC_GETROOT                 _IOW('n', 8, struct ncp_setroot_ioctl)
125: #define NCP_IOC_SETROOT                 _IOR('n', 8, struct ncp_setroot_ioctl)
126: 
127: #define NCP_IOC_GETOBJECTNAME           _IOWR('n', 9, struct ncp_objectname_ioctl)
128: #define NCP_IOC_SETOBJECTNAME           _IOR('n', 9, struct ncp_objectname_ioctl)
129: #define NCP_IOC_GETPRIVATEDATA          _IOWR('n', 10, struct ncp_privatedata_ioctl)
130: #define NCP_IOC_SETPRIVATEDATA          _IOR('n', 10, struct ncp_privatedata_ioctl)
131: 
132: #define NCP_IOC_GETCHARSETS             _IOWR('n', 11, struct ncp_nls_ioctl)
133: #define NCP_IOC_SETCHARSETS             _IOR('n', 11, struct ncp_nls_ioctl)
134: 
135: #define NCP_IOC_GETDENTRYTTL            _IOW('n', 12, __u32)
136: #define NCP_IOC_SETDENTRYTTL            _IOR('n', 12, __u32)
137: 
138: /*
139:  * The packet size to allocate. One page should be enough.
140:  */
141: #define NCP_PACKET_SIZE 4070
142: 
143: #define NCP_MAXPATHLEN 255
144: #define NCP_MAXNAMELEN 14
145: 
146: #endif                          /* _LINUX_NCP_FS_H */
147: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/