]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/cifs/cifsglob.h
CIFS: make IPC a regular tcon
[mirror_ubuntu-artful-kernel.git] / fs / cifs / cifsglob.h
index ab69d895d1e9fa987fbe0e8bc84b9f064c17ce21..a5548fdf671558d7db8cd30701f05ff0936261ec 100644 (file)
@@ -64,8 +64,8 @@
 #define RFC1001_NAME_LEN 15
 #define RFC1001_NAME_LEN_WITH_NULL (RFC1001_NAME_LEN + 1)
 
-/* currently length of NIP6_FMT */
-#define SERVER_NAME_LENGTH 40
+/* maximum length of ip addr as a string (including ipv6 and sctp) */
+#define SERVER_NAME_LENGTH 80
 #define SERVER_NAME_LEN_WITH_NULL     (SERVER_NAME_LENGTH + 1)
 
 /* echo interval in seconds */
@@ -822,12 +822,12 @@ static inline void cifs_set_net_ns(struct TCP_Server_Info *srv, struct net *net)
 struct cifs_ses {
        struct list_head smb_ses_list;
        struct list_head tcon_list;
+       struct cifs_tcon *tcon_ipc;
        struct mutex session_mutex;
        struct TCP_Server_Info *server; /* pointer to server info */
        int ses_count;          /* reference counter */
        enum statusEnum status;
        unsigned overrideSecFlg;  /* if non-zero override global sec flags */
-       __u32 ipc_tid;          /* special tid for connection to IPC share */
        char *serverOS;         /* name of operating system underlying server */
        char *serverNOS;        /* name of network operating system of server */
        char *serverDomain;     /* security realm of server */
@@ -835,8 +835,7 @@ struct cifs_ses {
        kuid_t linux_uid;       /* overriding owner of files on the mount */
        kuid_t cred_uid;        /* owner of credentials */
        unsigned int capabilities;
-       char serverName[SERVER_NAME_LEN_WITH_NULL * 2]; /* BB make bigger for
-                               TCP names - will ipv6 and sctp addresses fit? */
+       char serverName[SERVER_NAME_LEN_WITH_NULL];
        char *user_name;        /* must not be null except during init of sess
                                   and after mount option parsing we fill it */
        char *domainName;
@@ -931,7 +930,9 @@ struct cifs_tcon {
        FILE_SYSTEM_DEVICE_INFO fsDevInfo;
        FILE_SYSTEM_ATTRIBUTE_INFO fsAttrInfo; /* ok if fs name truncated */
        FILE_SYSTEM_UNIX_INFO fsUnixInfo;
-       bool ipc:1;             /* set if connection to IPC$ eg for RPC/PIPES */
+       bool ipc:1;   /* set if connection to IPC$ share (always also pipe) */
+       bool pipe:1;  /* set if connection to pipe share */
+       bool print:1; /* set if connection to printer share */
        bool retry:1;
        bool nocase:1;
        bool seal:1;      /* transport encryption for this mounted share */
@@ -944,7 +945,6 @@ struct cifs_tcon {
        bool need_reopen_files:1; /* need to reopen tcon file handles */
        bool use_resilient:1; /* use resilient instead of durable handles */
        bool use_persistent:1; /* use persistent instead of durable handles */
-       bool print:1;           /* set if connection to printer share */
        __le32 capabilities;
        __u32 share_flags;
        __u32 maximal_access;