ncp_fs.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #include <linux/ncp_fs.h>
  2. #include "ncp_fs_i.h"
  3. #include "ncp_fs_sb.h"
  4. /* define because it is easy to change PRINTK to {*}PRINTK */
  5. #define PRINTK(format, args...) printk(KERN_DEBUG format , ## args)
  6. #undef NCPFS_PARANOIA
  7. #ifdef NCPFS_PARANOIA
  8. #define PPRINTK(format, args...) PRINTK(format , ## args)
  9. #else
  10. #define PPRINTK(format, args...)
  11. #endif
  12. #ifndef DEBUG_NCP
  13. #define DEBUG_NCP 0
  14. #endif
  15. #if DEBUG_NCP > 0
  16. #define DPRINTK(format, args...) PRINTK(format , ## args)
  17. #else
  18. #define DPRINTK(format, args...)
  19. #endif
  20. #if DEBUG_NCP > 1
  21. #define DDPRINTK(format, args...) PRINTK(format , ## args)
  22. #else
  23. #define DDPRINTK(format, args...)
  24. #endif
  25. #define NCP_MAX_RPC_TIMEOUT (6*HZ)
  26. struct ncp_entry_info {
  27. struct nw_info_struct i;
  28. ino_t ino;
  29. int opened;
  30. int access;
  31. unsigned int volume;
  32. __u8 file_handle[6];
  33. };
  34. static inline struct ncp_server *NCP_SBP(const struct super_block *sb)
  35. {
  36. return sb->s_fs_info;
  37. }
  38. #define NCP_SERVER(inode) NCP_SBP((inode)->i_sb)
  39. static inline struct ncp_inode_info *NCP_FINFO(const struct inode *inode)
  40. {
  41. return container_of(inode, struct ncp_inode_info, vfs_inode);
  42. }
  43. /* linux/fs/ncpfs/inode.c */
  44. int ncp_notify_change(struct dentry *, struct iattr *);
  45. struct inode *ncp_iget(struct super_block *, struct ncp_entry_info *);
  46. void ncp_update_inode(struct inode *, struct ncp_entry_info *);
  47. void ncp_update_inode2(struct inode *, struct ncp_entry_info *);
  48. /* linux/fs/ncpfs/dir.c */
  49. extern const struct inode_operations ncp_dir_inode_operations;
  50. extern const struct file_operations ncp_dir_operations;
  51. extern const struct dentry_operations ncp_dentry_operations;
  52. int ncp_conn_logged_in(struct super_block *);
  53. int ncp_date_dos2unix(__le16 time, __le16 date);
  54. void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date);
  55. /* linux/fs/ncpfs/ioctl.c */
  56. long ncp_ioctl(struct file *, unsigned int, unsigned long);
  57. long ncp_compat_ioctl(struct file *, unsigned int, unsigned long);
  58. /* linux/fs/ncpfs/sock.c */
  59. int ncp_request2(struct ncp_server *server, int function,
  60. void* reply, int max_reply_size);
  61. static inline int ncp_request(struct ncp_server *server, int function) {
  62. return ncp_request2(server, function, server->packet, server->packet_size);
  63. }
  64. int ncp_connect(struct ncp_server *server);
  65. int ncp_disconnect(struct ncp_server *server);
  66. void ncp_lock_server(struct ncp_server *server);
  67. void ncp_unlock_server(struct ncp_server *server);
  68. /* linux/fs/ncpfs/symlink.c */
  69. #if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS)
  70. extern const struct address_space_operations ncp_symlink_aops;
  71. int ncp_symlink(struct inode*, struct dentry*, const char*);
  72. #endif
  73. /* linux/fs/ncpfs/file.c */
  74. extern const struct inode_operations ncp_file_inode_operations;
  75. extern const struct file_operations ncp_file_operations;
  76. int ncp_make_open(struct inode *, int);
  77. /* linux/fs/ncpfs/mmap.c */
  78. int ncp_mmap(struct file *, struct vm_area_struct *);
  79. /* linux/fs/ncpfs/ncplib_kernel.c */
  80. int ncp_make_closed(struct inode *);
  81. #include "ncplib_kernel.h"