51 int param_len, i, pkt_len, andx_len, andx_param_len;
72 param_len = strlen(UserName) + 1 + strlen(PassWord) +
73 strlen(Con_Handle -> PDomain) + 1 +
74 strlen(Con_Handle -> OSName) + 1;
114 p = p + strlen(PassWord);
117 p = p + strlen(UserName);
122 strcpy(p, Con_Handle -> PDomain);
123 p = p + strlen(Con_Handle -> PDomain);
127 strcpy(p, Con_Handle -> OSName);
128 p = p + strlen(Con_Handle -> OSName);
135 param_len = strlen(UserName) + 1 + strlen(PassWord) +
136 strlen(Con_Handle -> PDomain) + 1 +
137 strlen(Con_Handle -> OSName) + 1;
143 andx_param_len = strlen(service) + 2 + 2 + strlen(service_type) + 2;
185 p = p + strlen(PassWord);
188 p = p + strlen(UserName);
193 strcpy(p, Con_Handle -> PDomain);
194 p = p + strlen(Con_Handle -> PDomain);
198 strcpy(p, Con_Handle -> OSName);
199 p = p + strlen(Con_Handle -> OSName);
214 strcpy(p + 1, service);
215 p = p + strlen(service) + 2;
220 strcpy(p + 1, service_type);
226 if (
RFCNB_Send(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0) {
229 fprintf(stderr,
"Error sending SessSetupAndTCon request\n");
240 if (
RFCNB_Recv(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0) {
243 fprintf(stderr,
"Error receiving response to SessSetupAndTCon\n");
257 fprintf(stderr,
"SMB_SessSetupAndTCon failed with errorclass = %i, Error Code = %i\n",
273 fprintf(stderr,
"SessSetupAndX response. Action = %i\n",
285 Con_Handle -> tid =
SVAL(AndXCom, 3);
286 Con_Handle -> max_xmit =
SVAL(AndXCom, 1);
int SMB_Logon_And_TCon(SMB_Handle_Type Con_Handle, char *UserName, char *PassWord, char *service, char *service_type)
#define SIVAL(buf, pos, val)
#define SSVAL(buf, pos, val)
struct RFCNB_Pkt * RFCNB_Alloc_Pkt(int n)
void RFCNB_Free_Pkt(struct RFCNB_Pkt *pkt)
int RFCNB_Send(struct RFCNB_Con *Con_Handle, struct RFCNB_Pkt *udata, int Length)
int RFCNB_Recv(void *Con_Handle, struct RFCNB_Pkt *Data, int Length)
#define SMBlibE_SendFailed
#define SMBlibE_RecvFailed
#define SMB_tcon_buf_offset
#define SMB_ssetpNTLM_mmc_offset
#define SMB_ssetpr_axo_offset
#define SMB_hdr_axc_offset
#define SMB_ssetpNTLM_res_offset
#define SMB_ssetpLM_bcc_offset
#define SMB_ssetpr_act_offset
#define SMB_hdr_rcls_offset
#define SMB_hdr_wct_offset
#define SMB_ssetpNTLM_cap_offset
#define SMB_ssetpNTLM_mbs_offset
#define SMB_ssetpNTLM_snk_offset
#define SMB_ssetpLM_pwl_offset
#define SMB_ssetpNTLM_cipl_offset
#define SMB_hdr_err_offset
#define SMB_hdr_axo_offset
#define SMB_ssetpNTLM_cspl_offset
#define SMB_hdr_mid_offset
#define SMB_ssetpLM_mbs_offset
#define SMB_hdr_idf_offset
#define SMB_ssetpLM_buf_offset
#define SMB_hdr_uid_offset
#define SMB_ssetpNTLM_len
#define SMB_ssetpNTLM_vcn_offset
#define SMB_hdr_pid_offset
#define SMB_ssetpLM_res_offset
#define SMB_ssetpNTLM_buf_offset
#define SMB_tcon_bcc_offset
#define SMB_ssetpLM_mmc_offset
#define SMB_hdr_tid_offset
#define SMB_ssetpNTLM_bcc_offset
#define SMB_hdr_com_offset
#define SMB_ssetpLM_snk_offset
#define SMB_ssetpLM_vcn_offset