linux/fs/ncpfs/ncp_fs.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2#include <linux/ncp_fs.h>
   3#include "ncp_fs_i.h"
   4#include "ncp_fs_sb.h"
   5
   6#undef NCPFS_PARANOIA
   7#ifdef NCPFS_PARANOIA
   8#define ncp_vdbg(fmt, ...)                                      \
   9        pr_debug(fmt, ##__VA_ARGS__)
  10#else
  11#define ncp_vdbg(fmt, ...)                                      \
  12do {                                                            \
  13        if (0)                                                  \
  14                pr_debug(fmt, ##__VA_ARGS__);                   \
  15} while (0)
  16#endif
  17
  18#ifndef DEBUG_NCP
  19#define DEBUG_NCP 0
  20#endif
  21
  22#if DEBUG_NCP > 0 && !defined(DEBUG)
  23#define DEBUG
  24#endif
  25
  26#define ncp_dbg(level, fmt, ...)                                \
  27do {                                                            \
  28        if (level <= DEBUG_NCP)                                 \
  29                pr_debug(fmt, ##__VA_ARGS__);                   \
  30} while (0)
  31
  32#define NCP_MAX_RPC_TIMEOUT (6*HZ)
  33
  34
  35struct ncp_entry_info {
  36        struct nw_info_struct   i;
  37        ino_t                   ino;
  38        int                     opened;
  39        int                     access;
  40        unsigned int            volume;
  41        __u8                    file_handle[6];
  42};
  43
  44static inline struct ncp_server *NCP_SBP(const struct super_block *sb)
  45{
  46        return sb->s_fs_info;
  47}
  48
  49#define NCP_SERVER(inode)       NCP_SBP((inode)->i_sb)
  50static inline struct ncp_inode_info *NCP_FINFO(const struct inode *inode)
  51{
  52        return container_of(inode, struct ncp_inode_info, vfs_inode);
  53}
  54
  55/* linux/fs/ncpfs/inode.c */
  56int ncp_notify_change(struct dentry *, struct iattr *);
  57struct inode *ncp_iget(struct super_block *, struct ncp_entry_info *);
  58void ncp_update_inode(struct inode *, struct ncp_entry_info *);
  59void ncp_update_inode2(struct inode *, struct ncp_entry_info *);
  60
  61/* linux/fs/ncpfs/dir.c */
  62extern const struct inode_operations ncp_dir_inode_operations;
  63extern const struct file_operations ncp_dir_operations;
  64extern const struct dentry_operations ncp_dentry_operations;
  65int ncp_conn_logged_in(struct super_block *);
  66int ncp_date_dos2unix(__le16 time, __le16 date);
  67void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date);
  68
  69/* linux/fs/ncpfs/ioctl.c */
  70long ncp_ioctl(struct file *, unsigned int, unsigned long);
  71long ncp_compat_ioctl(struct file *, unsigned int, unsigned long);
  72
  73/* linux/fs/ncpfs/sock.c */
  74int ncp_request2(struct ncp_server *server, int function,
  75        void* reply, int max_reply_size);
  76static inline int ncp_request(struct ncp_server *server, int function) {
  77        return ncp_request2(server, function, server->packet, server->packet_size);
  78}
  79int ncp_connect(struct ncp_server *server);
  80int ncp_disconnect(struct ncp_server *server);
  81void ncp_lock_server(struct ncp_server *server);
  82void ncp_unlock_server(struct ncp_server *server);
  83
  84/* linux/fs/ncpfs/symlink.c */
  85#if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS)
  86extern const struct address_space_operations ncp_symlink_aops;
  87int ncp_symlink(struct inode*, struct dentry*, const char*);
  88#endif
  89
  90/* linux/fs/ncpfs/file.c */
  91extern const struct inode_operations ncp_file_inode_operations;
  92extern const struct file_operations ncp_file_operations;
  93int ncp_make_open(struct inode *, int);
  94
  95/* linux/fs/ncpfs/mmap.c */
  96int ncp_mmap(struct file *, struct vm_area_struct *);
  97
  98/* linux/fs/ncpfs/ncplib_kernel.c */
  99int ncp_make_closed(struct inode *);
 100
 101#include "ncplib_kernel.h"
 102