summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h34
1 files changed, 28 insertions, 6 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 1cceb88983..091ed2ac66 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -53,11 +53,10 @@ typedef int BOOL;
/* string manipulation flags - see clistr.c and srvstr.c */
#define STR_TERMINATE 1
-#define STR_CONVERT 2
-#define STR_UPPER 4
-#define STR_ASCII 8
-#define STR_UNICODE 16
-#define STR_NOALIGN 32
+#define STR_UPPER 2
+#define STR_ASCII 4
+#define STR_UNICODE 8
+#define STR_NOALIGN 16
/* how long to wait for secondary SMB packets (milli-seconds) */
#define SMB_SECONDARY_WAIT (60*1000)
@@ -289,6 +288,16 @@ typedef uint16 smb_ucs2_t;
typedef smb_ucs2_t wpstring[PSTRING_LEN];
typedef smb_ucs2_t wfstring[FSTRING_LEN];
+
+#ifdef WORDS_BIGENDIAN
+#define UCS2_SHIFT 8
+#else
+#define UCS2_SHIFT 0
+#endif
+
+/* turn a 7 bit character into a ucs2 character */
+#define UCS2_CHAR(c) ((c) << UCS2_SHIFT)
+
/* pipe string names */
#define PIPE_LANMAN "\\PIPE\\LANMAN"
#define PIPE_SRVSVC "\\PIPE\\srvsvc"
@@ -790,7 +799,6 @@ struct bitmap {
#define FLAG_GLOBAL 0x08 /* local options that should be globally settable in SWAT */
#define FLAG_DEPRECATED 0x10 /* options that should no longer be used */
#define FLAG_HIDE 0x20 /* options that should be hidden in SWAT */
-#define FLAG_DOS_STRING 0x40 /* convert from UNIX to DOS codepage when reading this string. */
#ifndef LOCKING_VERSION
#define LOCKING_VERSION 4
@@ -1676,4 +1684,18 @@ typedef struct {
TALLOC_CTX *mem_ctx;
} CLI_POLICY_HND;
+
+/* generic iconv conversion structure */
+typedef struct {
+ size_t (*direct)(char **inbuf, size_t *inbytesleft,
+ char **outbuf, size_t *outbytesleft);
+ size_t (*pull)(char **inbuf, size_t *inbytesleft,
+ char **outbuf, size_t *outbytesleft);
+ size_t (*push)(char **inbuf, size_t *inbytesleft,
+ char **outbuf, size_t *outbytesleft);
+#ifdef HAVE_NATIVE_ICONV
+ iconv_t cd;
+#endif
+} *smb_iconv_t;
+
#endif /* _SMB_H */