smblib-util.c File Reference
#include "squid.h"
#include "rfcnb/rfcnb.h"
#include "smblib/smblib-priv.h"
#include "smblib/smblib.h"
Include dependency graph for smblib-util.c:

Go to the source code of this file.


int SMB_Get_Protocol (SMB_Handle_Type Con_Handle)
int SMB_Figure_Protocol (const char *dialects[], int prot_index)
int SMB_TreeDisconnect (SMB_Tree_Handle Tree_Handle, BOOL discard)
int SMB_Negotiate (SMB_Handle_Type Con_Handle, const char *Prots[])
void SMB_Get_My_Name (char *name, int len)
SMB_Tree_Handle SMB_TreeConnect (SMB_Handle_Type Con_Handle, SMB_Tree_Handle Tree_Handle, const char *path, const char *password, const char *device)
int SMB_Get_Last_Error ()
int SMB_Get_Last_SMB_Err ()
void SMB_Get_Error_Msg (int msg, char *msgbuf, int len)


int SMB_Types []
static const char * SMBlib_Error_Messages []

Function Documentation

◆ SMB_Figure_Protocol()

int SMB_Figure_Protocol ( const char *  dialects[],
int  prot_index 

Definition at line 202 of file smblib-util.c.

References NULL, SMB_P_Unknown, SMB_Prots, and SMB_Types.

Referenced by SMB_Negotiate().

◆ SMB_Get_Error_Msg()

void SMB_Get_Error_Msg ( int  msg,
char *  msgbuf,
int  len 

Definition at line 798 of file smblib-util.c.

References RFCNB_Pkt::len, RFCNB_Get_Error(), SMBlib_Error_Messages, and SMBlibE_NoSuchMsg.

Referenced by init_challenge(), and main().

◆ SMB_Get_Last_Error()

int SMB_Get_Last_Error ( void  )

Definition at line 755 of file smblib-util.c.

References SMBlib_errno.

Referenced by init_challenge(), main(), and manage_request().

◆ SMB_Get_Last_SMB_Err()

int SMB_Get_Last_SMB_Err ( void  )

Definition at line 766 of file smblib-util.c.

References SMBlib_SMB_Error.

Referenced by main(), and manage_request().

◆ SMB_Get_My_Name()

void SMB_Get_My_Name ( char *  name,
int  len 

Definition at line 452 of file smblib-util.c.

References RFCNB_Pkt::len, and NULL.

Referenced by SMB_Connect(), and SMB_Connect_Server().

◆ SMB_Get_Protocol()

int SMB_Get_Protocol ( SMB_Handle_Type  Con_Handle)

Definition at line 187 of file smblib-util.c.

References NULL.

◆ SMB_Negotiate()

◆ SMB_TreeConnect()

◆ SMB_TreeDisconnect()

Variable Documentation

◆ SMB_Types

int SMB_Types[]
Initial value:
#define SMB_P_Core
#define SMB_P_CorePlus
#define SMB_P_LanMan2_1
#define SMB_P_LanMan1
#define SMB_P_DOSLanMan2
#define SMB_P_LanMan2
#define SMB_P_NT1
#define SMB_P_DOSLanMan1

Definition at line 42 of file smblib-util.c.

Referenced by SMB_Figure_Protocol(), and SMB_Logon_And_TCon().

◆ SMBlib_Error_Messages

const char* SMBlib_Error_Messages[]
Initial value:
= {
"Request completed successfully.",
"Server returned a non-zero SMB Error Class and Code.",
"A lower layer protocol error occurred.",
"Function not yet implemented.",
"The protocol negotiated does not support the request.",
"No space available for operation.",
"One or more bad parameters passed.",
"None of the protocols we offered were accepted.",
"The attempt to send an SMB request failed. See protocol error info.",
"The attempt to get an SMB response failed. See protocol error info.",
"The logon request failed, but you were logged in as guest.",
"The attempt to call the remote server failed. See protocol error info.",
"The protocol dialect specified in a NegProt and accepted by the server is unknown.",
"No such error code.",
#define NULL
Definition: types.h:145

Definition at line 778 of file smblib-util.c.

Referenced by SMB_Get_Error_Msg().






Web Site Translations