~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/smb/client/rfc1002pdu.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: LGPL-2.1 */
  2 /*
  3  *
  4  *   Protocol Data Unit definitions for RFC 1001/1002 support
  5  *
  6  *   Copyright (c) International Business Machines  Corp., 2004
  7  *   Author(s): Steve French (sfrench@us.ibm.com)
  8  *
  9  */
 10 
 11 /* NB: unlike smb/cifs packets, the RFC1002 structures are big endian */
 12 
 13         /* RFC 1002 session packet types */
 14 #define RFC1002_SESSION_MESSAGE 0x00
 15 #define RFC1002_SESSION_REQUEST  0x81
 16 #define RFC1002_POSITIVE_SESSION_RESPONSE 0x82
 17 #define RFC1002_NEGATIVE_SESSION_RESPONSE 0x83
 18 #define RFC1002_RETARGET_SESSION_RESPONSE 0x84
 19 #define RFC1002_SESSION_KEEP_ALIVE 0x85
 20 
 21         /* RFC 1002 flags (only one defined */
 22 #define RFC1002_LENGTH_EXTEND 0x80 /* high order bit of length (ie +64K) */
 23 
 24 struct rfc1002_session_packet {
 25         __u8    type;
 26         __u8    flags;
 27         __u16   length;
 28         union {
 29                 struct {
 30                         __u8 called_len;
 31                         __u8 called_name[32];
 32                         __u8 scope1; /* null */
 33                         __u8 calling_len;
 34                         __u8 calling_name[32];
 35                         __u8 scope2; /* null */
 36                 } __attribute__((packed)) session_req;
 37                 struct {
 38                         __u32 retarget_ip_addr;
 39                         __u16 port;
 40                 } __attribute__((packed)) retarget_resp;
 41                 __u8 neg_ses_resp_error_code;
 42                 /* POSITIVE_SESSION_RESPONSE packet does not include trailer.
 43                 SESSION_KEEP_ALIVE packet also does not include a trailer.
 44                 Trailer for the SESSION_MESSAGE packet is SMB/CIFS header */
 45         } __attribute__((packed)) trailer;
 46 } __attribute__((packed));
 47 
 48 /* Negative Session Response error codes */
 49 #define RFC1002_NOT_LISTENING_CALLED  0x80 /* not listening on called name */
 50 #define RFC1002_NOT_LISTENING_CALLING 0x81 /* not listening on calling name */
 51 #define RFC1002_NOT_PRESENT           0x82 /* called name not present */
 52 #define RFC1002_INSUFFICIENT_RESOURCE 0x83
 53 #define RFC1002_UNSPECIFIED_ERROR     0x8F
 54 
 55 /* RFC 1002 Datagram service packets are not defined here as they
 56 are not needed for the network filesystem client unless we plan on
 57 implementing broadcast resolution of the server ip address (from
 58 server netbios name). Currently server names are resolved only via DNS
 59 (tcp name) or ip address or an /etc/hosts equivalent mapping to ip address.*/
 60 
 61 #define DEFAULT_CIFS_CALLED_NAME  "*SMBSERVER      "
 62 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php