#ifndef _NETSMB_SMBFS_API_H
#define _NETSMB_SMBFS_API_H
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef EBADRPC
#define EBADRPC 113
#endif
#ifndef EAUTH
#define EAUTH 114
#endif
typedef enum {
USE_DISKDEV = 0,
USE_SPOOLDEV,
USE_CHARDEV,
USE_IPC,
USE_WILDCARD
} smb_use_shtype_t;
typedef enum {
SMBL_NONE = 0,
SMBL_SERVER,
SMBL_VC = 1,
SMBL_SHARE,
SMBL_PATH
} smb_parse_level_t;
#define SMB_AT_ANON 1
#define SMB_AT_LM1 2
#define SMB_AT_NTLM1 4
#define SMB_AT_NTLM2 8
#define SMB_AT_KRB5 0x10
struct smb_ctx;
typedef struct smb_ctx smb_ctx_t;
extern int smb_debug, smb_verbose;
int smb_lib_init(void);
void smb_error(const char *, int, ...);
int smb_ctx_alloc(struct smb_ctx **);
void smb_ctx_free(struct smb_ctx *);
int smb_ctx_kill(struct smb_ctx *);
int smb_ctx_scan_argv(struct smb_ctx *, int, char **, int, int, int);
int smb_ctx_parseunc(struct smb_ctx *, const char *, int, int, int,
const char **);
int smb_ctx_readrc(struct smb_ctx *);
int smb_ctx_opt(struct smb_ctx *, int, const char *);
int smb_get_authentication(struct smb_ctx *);
int smb_ctx_flags2(struct smb_ctx *);
int smb_ctx_resolve(struct smb_ctx *);
int smb_ctx_get_ssn(struct smb_ctx *);
int smb_ctx_get_tree(struct smb_ctx *);
int smb_ctx_setauthflags(struct smb_ctx *, int);
int smb_ctx_setcharset(struct smb_ctx *, const char *);
int smb_ctx_setfullserver(struct smb_ctx *, const char *);
int smb_ctx_setsigning(struct smb_ctx *, int ena, int req);
int smb_ctx_setminver(struct smb_ctx *, int ver);
int smb_ctx_setmaxver(struct smb_ctx *, int ver);
int smb_ctx_setnbflags(struct smb_ctx *, int ena, int bcast);
int smb_ctx_setscope(struct smb_ctx *, const char *);
int smb_ctx_setwins(struct smb_ctx *, const char *, const char *);
int smb_ctx_setsrvaddr(struct smb_ctx *, const char *);
int smb_ctx_setserver(struct smb_ctx *, const char *);
int smb_ctx_setshare(struct smb_ctx *, const char *, int);
int smb_ctx_setdomain(struct smb_ctx *, const char *, int);
int smb_ctx_setuser(struct smb_ctx *, const char *, int);
int smb_ctx_setpassword(struct smb_ctx *, const char *, int);
int smb_ctx_setpwhash(struct smb_ctx *, const uchar_t *, const uchar_t *);
typedef void (*smb_ctx_close_hook_t)(struct smb_ctx *);
void smb_ctx_set_close_hook(smb_ctx_close_hook_t);
int smb_fh_close(int);
int smb_fh_open(struct smb_ctx *ctx, const char *, int);
int smb_fh_read(int, off64_t, size_t, char *);
int smb_fh_write(int, off64_t, size_t, const char *);
int smb_fh_xactnp(int, int, const char *,
int *, char *, int *);
int smb_fh_getssnkey(int, uchar_t *, size_t);
int smb_open_printer(struct smb_ctx *, const char *, int, int);
void smbfs_set_default_domain(const char *);
void smbfs_set_default_user(const char *);
char *smb_strerror(int);
#ifdef __cplusplus
}
#endif
#endif