Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ncplib_kernel.h File Reference
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/fcntl.h>
#include <linux/pagemap.h>
#include <asm/uaccess.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>
#include <asm/string.h>
#include <linux/ctype.h>

Go to the source code of this file.

Data Structures

struct  ncp_cache_head
 
union  ncp_dir_cache
 
struct  ncp_cache_control
 

Macros

#define NCP_MIN_SYMLINK_SIZE   8
 
#define NCP_MAX_SYMLINK_SIZE   512
 
#define NCP_BLOCK_SHIFT   9
 
#define NCP_BLOCK_SIZE   (1 << (NCP_BLOCK_SHIFT))
 
#define NCP_IO_TABLE(sb)   NULL
 
#define ncp_tolower(t, c)   tolower(c)
 
#define ncp_toupper(t, c)   toupper(c)
 
#define ncp_io2vol(S, m, i, n, k, U)   ncp__io2vol(m,i,n,k,U)
 
#define ncp_vol2io(S, m, i, n, k, U)   ncp__vol2io(m,i,n,k,U)
 
#define NCP_GET_AGE(dentry)   (jiffies - (dentry)->d_time)
 
#define NCP_MAX_AGE(server)   atomic_read(&(server)->dentry_ttl)
 
#define NCP_TEST_AGE(server, dentry)   (NCP_GET_AGE(dentry) < NCP_MAX_AGE(server))
 
#define NCP_DIRCACHE_SIZE   ((int)(PAGE_CACHE_SIZE/sizeof(struct dentry *)))
 
#define NCP_FIRSTCACHE_SIZE
 
#define NCP_DIRCACHE_START   (NCP_DIRCACHE_SIZE - NCP_FIRSTCACHE_SIZE)
 

Functions

int ncp_negotiate_buffersize (struct ncp_server *, int, int *)
 
int ncp_negotiate_size_and_options (struct ncp_server *server, int size, int options, int *ret_size, int *ret_options)
 
int ncp_get_volume_info_with_number (struct ncp_server *server, int n, struct ncp_volume_info *target)
 
int ncp_get_directory_info (struct ncp_server *server, __u8 dirhandle, struct ncp_volume_info *target)
 
int ncp_close_file (struct ncp_server *, const char *)
 
int ncp_read_bounce (struct ncp_server *, const char *, __u32, __u16, char __user *, int *, void *bounce, __u32 bouncelen)
 
int ncp_read_kernel (struct ncp_server *, const char *, __u32, __u16, char *, int *)
 
int ncp_write_kernel (struct ncp_server *, const char *, __u32, __u16, const char *, int *)
 
void ncp_extract_file_info (const void *src, struct nw_info_struct *target)
 
int ncp_obtain_info (struct ncp_server *server, struct inode *, const char *, struct nw_info_struct *target)
 
int ncp_obtain_nfs_info (struct ncp_server *server, struct nw_info_struct *target)
 
int ncp_update_known_namespace (struct ncp_server *server, __u8 volume, int *ret_ns)
 
int ncp_get_volume_root (struct ncp_server *server, const char *volname, __u32 *volume, __le32 *dirent, __le32 *dosdirent)
 
int ncp_lookup_volume (struct ncp_server *, const char *, struct nw_info_struct *)
 
int ncp_modify_file_or_subdir_dos_info (struct ncp_server *, struct inode *, __le32, const struct nw_modify_dos_info *info)
 
int ncp_modify_file_or_subdir_dos_info_path (struct ncp_server *, struct inode *, const char *path, __le32, const struct nw_modify_dos_info *info)
 
int ncp_modify_nfs_info (struct ncp_server *, __u8 volnum, __le32 dirent, __u32 mode, __u32 rdev)
 
int ncp_del_file_or_subdir2 (struct ncp_server *, struct dentry *)
 
int ncp_del_file_or_subdir (struct ncp_server *, struct inode *, const char *)
 
int ncp_open_create_file_or_subdir (struct ncp_server *, struct inode *, const char *, int, __le32, __le16, struct ncp_entry_info *)
 
int ncp_initialize_search (struct ncp_server *, struct inode *, struct nw_search_sequence *target)
 
int ncp_search_for_fileset (struct ncp_server *server, struct nw_search_sequence *seq, int *more, int *cnt, char *buffer, size_t bufsize, char **rbuf, size_t *rsize)
 
int ncp_ren_or_mov_file_or_subdir (struct ncp_server *server, struct inode *, const char *, struct inode *, const char *)
 
int ncp_LogPhysicalRecord (struct ncp_server *server, const char *file_id, __u8 locktype, __u32 offset, __u32 length, __u16 timeout)
 
int ncp_mount_subdir (struct ncp_server *, __u8, __u8, __le32, __u32 *volume, __le32 *dirent, __le32 *dosdirent)
 
int ncp_dirhandle_alloc (struct ncp_server *, __u8 vol, __le32 dirent, __u8 *dirhandle)
 
int ncp_dirhandle_free (struct ncp_server *, __u8 dirhandle)
 
int ncp_create_new (struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev, __le32 attributes)
 
int ncp__io2vol (unsigned char *, unsigned int *, const unsigned char *, unsigned int, int)
 
int ncp__vol2io (unsigned char *, unsigned int *, const unsigned char *, unsigned int, int)
 

Macro Definition Documentation

#define NCP_BLOCK_SHIFT   9

Definition at line 38 of file ncplib_kernel.h.

#define NCP_BLOCK_SIZE   (1 << (NCP_BLOCK_SHIFT))

Definition at line 39 of file ncplib_kernel.h.

#define NCP_DIRCACHE_SIZE   ((int)(PAGE_CACHE_SIZE/sizeof(struct dentry *)))

Definition at line 234 of file ncplib_kernel.h.

#define NCP_DIRCACHE_START   (NCP_DIRCACHE_SIZE - NCP_FIRSTCACHE_SIZE)

Definition at line 244 of file ncplib_kernel.h.

#define NCP_FIRSTCACHE_SIZE
Value:
sizeof(struct dentry *) - sizeof(struct ncp_cache_head)) / \
sizeof(struct dentry *)))

Definition at line 240 of file ncplib_kernel.h.

#define NCP_GET_AGE (   dentry)    (jiffies - (dentry)->d_time)

Definition at line 171 of file ncplib_kernel.h.

#define ncp_io2vol (   S,
  m,
  i,
  n,
  k,
  U 
)    ncp__io2vol(m,i,n,k,U)

Definition at line 154 of file ncplib_kernel.h.

#define NCP_IO_TABLE (   sb)    NULL

Definition at line 151 of file ncplib_kernel.h.

#define NCP_MAX_AGE (   server)    atomic_read(&(server)->dentry_ttl)

Definition at line 172 of file ncplib_kernel.h.

#define NCP_MAX_SYMLINK_SIZE   512

Definition at line 36 of file ncplib_kernel.h.

#define NCP_MIN_SYMLINK_SIZE   8

Definition at line 35 of file ncplib_kernel.h.

#define NCP_TEST_AGE (   server,
  dentry 
)    (NCP_GET_AGE(dentry) < NCP_MAX_AGE(server))

Definition at line 173 of file ncplib_kernel.h.

#define ncp_tolower (   t,
  c 
)    tolower(c)

Definition at line 152 of file ncplib_kernel.h.

#define ncp_toupper (   t,
  c 
)    toupper(c)

Definition at line 153 of file ncplib_kernel.h.

#define ncp_vol2io (   S,
  m,
  i,
  n,
  k,
  U 
)    ncp__vol2io(m,i,n,k,U)

Definition at line 155 of file ncplib_kernel.h.

Function Documentation

int ncp__io2vol ( unsigned char ,
unsigned int ,
const unsigned char ,
unsigned  int,
int   
)

Definition at line 1274 of file ncplib_kernel.c.

int ncp__vol2io ( unsigned char ,
unsigned int ,
const unsigned char ,
unsigned  int,
int   
)

Definition at line 1299 of file ncplib_kernel.c.

int ncp_close_file ( struct ncp_server ,
const char  
)

Definition at line 273 of file ncplib_kernel.c.

int ncp_create_new ( struct inode dir,
struct dentry dentry,
umode_t  mode,
dev_t  rdev,
__le32  attributes 
)

Definition at line 922 of file dir.c.

int ncp_del_file_or_subdir ( struct ncp_server ,
struct inode ,
const char  
)

Definition at line 745 of file ncplib_kernel.c.

int ncp_del_file_or_subdir2 ( struct ncp_server ,
struct dentry  
)

Definition at line 729 of file ncplib_kernel.c.

int ncp_dirhandle_alloc ( struct ncp_server ,
__u8  vol,
__le32  dirent,
__u8 dirhandle 
)

Definition at line 325 of file ncplib_kernel.c.

int ncp_dirhandle_free ( struct ncp_server ,
__u8  dirhandle 
)

Definition at line 342 of file ncplib_kernel.c.

void ncp_extract_file_info ( const void src,
struct nw_info_struct target 
)

Definition at line 352 of file ncplib_kernel.c.

int ncp_get_directory_info ( struct ncp_server server,
__u8  dirhandle,
struct ncp_volume_info target 
)

Definition at line 238 of file ncplib_kernel.c.

int ncp_get_volume_info_with_number ( struct ncp_server server,
int  n,
struct ncp_volume_info target 
)

Definition at line 204 of file ncplib_kernel.c.

int ncp_get_volume_root ( struct ncp_server server,
const char volname,
__u32 volume,
__le32 dirent,
__le32 dosdirent 
)

Definition at line 594 of file ncplib_kernel.c.

int ncp_initialize_search ( struct ncp_server ,
struct inode ,
struct nw_search_sequence target 
)

Definition at line 831 of file ncplib_kernel.c.

int ncp_LogPhysicalRecord ( struct ncp_server server,
const char file_id,
__u8  locktype,
__u32  offset,
__u32  length,
__u16  timeout 
)
int ncp_lookup_volume ( struct ncp_server ,
const char ,
struct nw_info_struct  
)

Definition at line 625 of file ncplib_kernel.c.

int ncp_modify_file_or_subdir_dos_info ( struct ncp_server ,
struct inode ,
__le32  ,
const struct nw_modify_dos_info info 
)

Definition at line 672 of file ncplib_kernel.c.

int ncp_modify_file_or_subdir_dos_info_path ( struct ncp_server ,
struct inode ,
const char path,
__le32  ,
const struct nw_modify_dos_info info 
)

Definition at line 647 of file ncplib_kernel.c.

int ncp_modify_nfs_info ( struct ncp_server ,
__u8  volnum,
__le32  dirent,
__u32  mode,
__u32  rdev 
)
int ncp_mount_subdir ( struct ncp_server ,
__u8  ,
__u8  ,
__le32  ,
__u32 volume,
__le32 dirent,
__le32 dosdirent 
)

Definition at line 574 of file ncplib_kernel.c.

int ncp_negotiate_buffersize ( struct ncp_server ,
int  ,
int  
)

Definition at line 153 of file ncplib_kernel.c.

int ncp_negotiate_size_and_options ( struct ncp_server server,
int  size,
int  options,
int ret_size,
int ret_options 
)

Definition at line 176 of file ncplib_kernel.c.

int ncp_obtain_info ( struct ncp_server server,
struct inode ,
const char ,
struct nw_info_struct target 
)

Definition at line 420 of file ncplib_kernel.c.

int ncp_obtain_nfs_info ( struct ncp_server server,
struct nw_info_struct target 
)

Definition at line 375 of file ncplib_kernel.c.

int ncp_open_create_file_or_subdir ( struct ncp_server ,
struct inode ,
const char ,
int  ,
__le32  ,
__le16  ,
struct ncp_entry_info  
)

Definition at line 778 of file ncplib_kernel.c.

int ncp_read_bounce ( struct ncp_server ,
const char ,
__u32  ,
__u16  ,
char __user ,
int ,
void bounce,
__u32  bouncelen 
)

Definition at line 1005 of file ncplib_kernel.c.

int ncp_read_kernel ( struct ncp_server ,
const char ,
__u32  ,
__u16  ,
char ,
int  
)

Definition at line 969 of file ncplib_kernel.c.

int ncp_ren_or_mov_file_or_subdir ( struct ncp_server server,
struct inode ,
const char ,
struct inode ,
const char  
)

Definition at line 942 of file ncplib_kernel.c.

int ncp_search_for_fileset ( struct ncp_server server,
struct nw_search_sequence seq,
int more,
int cnt,
char buffer,
size_t  bufsize,
char **  rbuf,
size_t rsize 
)

Definition at line 854 of file ncplib_kernel.c.

int ncp_update_known_namespace ( struct ncp_server server,
__u8  volume,
int ret_ns 
)

Definition at line 527 of file ncplib_kernel.c.

int ncp_write_kernel ( struct ncp_server ,
const char ,
__u32  ,
__u16  ,
const char ,
int  
)

Definition at line 1038 of file ncplib_kernel.c.