2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 21:54:06 +08:00
linux-next/include/linux/smb.h
Theodore Ts'o ba52de123d [PATCH] inode-diet: Eliminate i_blksize from the inode structure
This eliminates the i_blksize field from struct inode.  Filesystems that want
to provide a per-inode st_blksize can do so by providing their own getattr
routine instead of using the generic_fillattr() function.

Note that some filesystems were providing pretty much random (and incorrect)
values for i_blksize.

[bunk@stusta.de: cleanup]
[akpm@osdl.org: generic_fillattr() fix]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 08:26:18 -07:00

116 lines
2.3 KiB
C++

/*
* smb.h
*
* Copyright (C) 1995, 1996 by Paal-Kr. Engstad and Volker Lendecke
* Copyright (C) 1997 by Volker Lendecke
*
*/
#ifndef _LINUX_SMB_H
#define _LINUX_SMB_H
#include <linux/types.h>
#include <linux/magic.h>
enum smb_protocol {
SMB_PROTOCOL_NONE,
SMB_PROTOCOL_CORE,
SMB_PROTOCOL_COREPLUS,
SMB_PROTOCOL_LANMAN1,
SMB_PROTOCOL_LANMAN2,
SMB_PROTOCOL_NT1
};
enum smb_case_hndl {
SMB_CASE_DEFAULT,
SMB_CASE_LOWER,
SMB_CASE_UPPER
};
struct smb_dskattr {
__u16 total;
__u16 allocblocks;
__u16 blocksize;
__u16 free;
};
struct smb_conn_opt {
/* The socket */
unsigned int fd;
enum smb_protocol protocol;
enum smb_case_hndl case_handling;
/* Connection-Options */
__u32 max_xmit;
__u16 server_uid;
__u16 tid;
/* The following are LANMAN 1.0 options */
__u16 secmode;
__u16 maxmux;
__u16 maxvcs;
__u16 rawmode;
__u32 sesskey;
/* The following are NT LM 0.12 options */
__u32 maxraw;
__u32 capabilities;
__s16 serverzone;
};
#ifdef __KERNEL__
#define SMB_NLS_MAXNAMELEN 20
struct smb_nls_codepage {
char local_name[SMB_NLS_MAXNAMELEN];
char remote_name[SMB_NLS_MAXNAMELEN];
};
#define SMB_MAXNAMELEN 255
#define SMB_MAXPATHLEN 1024
/*
* Contains all relevant data on a SMB networked file.
*/
struct smb_fattr {
__u16 attr;
unsigned long f_ino;
umode_t f_mode;
nlink_t f_nlink;
uid_t f_uid;
gid_t f_gid;
dev_t f_rdev;
loff_t f_size;
struct timespec f_atime;
struct timespec f_mtime;
struct timespec f_ctime;
unsigned long f_blocks;
int f_unix;
};
enum smb_conn_state {
CONN_VALID, /* everything's fine */
CONN_INVALID, /* Something went wrong, but did not
try to reconnect yet. */
CONN_RETRIED, /* Tried a reconnection, but was refused */
CONN_RETRYING /* Currently trying to reconnect */
};
#define SMB_HEADER_LEN 37 /* includes everything up to, but not
* including smb_bcc */
#define SMB_INITIAL_PACKET_SIZE 4000
#define SMB_MAX_PACKET_SIZE 32768
/* reserve this much space for trans2 parameters. Shouldn't have to be more
than 10 or so, but OS/2 seems happier like this. */
#define SMB_TRANS2_MAX_PARAM 64
#endif
#endif