33#ifndef _SMBLIB_PRIV_H_
34#define _SMBLIB_PRIV_H_
47#define max(a,b) (a < b ? b : a)
50#define SMB_DEF_IDF 0x424D53FF
75#define SMBnegprot 0x72
76#define SMBdskattr 0x80
78#define SMBsplopen 0xC0
80#define SMBsplclose 0xC2
81#define SMBsplretq 0xC3
84#define SMBfwdname 0xD2
85#define SMBcancelf 0xD3
87#define SMBsendstrt 0xD5
88#define SMBsendend 0xD6
89#define SMBsendtxt 0xD7
93#define SMBlockread 0x13
94#define SMBwriteunlock 0x14
95#define SMBreadbraw 0x1a
96#define SMBwritebraw 0x1d
98#define SMBwriteclose 0x2c
102#define SMBreadBraw 0x1A
103#define SMBreadBmpx 0x1B
104#define SMBreadBs 0x1C
105#define SMBwriteBraw 0x1D
106#define SMBwriteBmpx 0x1E
107#define SMBwriteBs 0x1F
108#define SMBwriteC 0x20
109#define SMBsetattrE 0x22
110#define SMBgetattrE 0x23
111#define SMBlockingX 0x24
113#define SMBtranss 0x26
115#define SMBioctls 0x28
121#define SMBwriteX 0x2F
122#define SMBsesssetupX 0x73
124#define SMBffirst 0x82
125#define SMBfunique 0x83
126#define SMBfclose 0x84
127#define SMBinvalid 0xFE
131#define SMBdatablockID 0x01
132#define SMBdialectID 0x02
133#define SMBpathnameID 0x03
134#define SMBasciiID 0x04
135#define SMBvariableblockID 0x05
141#define SMB_FLG2_NON_DOS 0x01
142#define SMB_FLG2_EXT_ATR 0x02
143#define SMB_FLG2_LNG_NAM 0x04
163#define SMB_Hdr(p) (char *)(p -> data)
177#define SMB_hdr_idf_offset 0
178#define SMB_hdr_com_offset 4
179#define SMB_hdr_rcls_offset 5
180#define SMB_hdr_reh_offset 6
181#define SMB_hdr_err_offset 7
182#define SMB_hdr_reb_offset 9
183#define SMB_hdr_flg_offset 9
184#define SMB_hdr_res_offset 10
185#define SMB_hdr_res0_offset 10
186#define SMB_hdr_flg2_offset 10
187#define SMB_hdr_res1_offset 12
188#define SMB_hdr_res2_offset 14
189#define SMB_hdr_res3_offset 16
190#define SMB_hdr_res4_offset 18
191#define SMB_hdr_res5_offset 20
192#define SMB_hdr_res6_offset 22
193#define SMB_hdr_tid_offset 24
194#define SMB_hdr_pid_offset 26
195#define SMB_hdr_uid_offset 28
196#define SMB_hdr_mid_offset 30
197#define SMB_hdr_wct_offset 32
199#define SMB_hdr_len 33
201#define SMB_hdr_axc_offset 33
202#define SMB_hdr_axr_offset 34
203#define SMB_hdr_axo_offset 35
207#define SMB_negp_bcc_offset 33
208#define SMB_negp_buf_offset 35
209#define SMB_negp_len 35
215#define SMB_negrCP_idx_offset 33
216#define SMB_negrCP_bcc_offset 35
217#define SMB_negrLM_idx_offset 33
218#define SMB_negrLM_sec_offset 35
219#define SMB_sec_user_mask 0x01
220#define SMB_sec_encrypt_mask 0x02
221#define SMB_negrLM_mbs_offset 37
222#define SMB_negrLM_mmc_offset 39
223#define SMB_negrLM_mnv_offset 41
224#define SMB_negrLM_rm_offset 43
225#define SMB_read_raw_mask 0x01
226#define SMB_write_raw_mask 0x02
227#define SMB_negrLM_sk_offset 45
228#define SMB_negrLM_st_offset 49
229#define SMB_negrLM_sd_offset 51
230#define SMB_negrLM_stz_offset 53
231#define SMB_negrLM_ekl_offset 55
232#define SMB_negrLM_res_offset 57
233#define SMB_negrLM_bcc_offset 59
234#define SMB_negrLM_len 61
235#define SMB_negrLM_buf_offset 61
237#define SMB_negrNTLM_idx_offset 33
238#define SMB_negrNTLM_sec_offset 35
239#define SMB_negrNTLM_mmc_offset 36
240#define SMB_negrNTLM_mnv_offset 38
241#define SMB_negrNTLM_mbs_offset 40
242#define SMB_negrNTLM_mrs_offset 44
243#define SMB_negrNTLM_sk_offset 48
244#define SMB_negrNTLM_cap_offset 52
245#define SMB_negrNTLM_stl_offset 56
246#define SMB_negrNTLM_sth_offset 60
247#define SMB_negrNTLM_stz_offset 64
248#define SMB_negrNTLM_ekl_offset 66
249#define SMB_negrNTLM_bcc_offset 67
250#define SMB_negrNTLM_len 69
251#define SMB_negrNTLM_buf_offset 69
255#define SMB_tcon_bcc_offset 33
256#define SMB_tcon_buf_offset 35
257#define SMB_tcon_len 35
259#define SMB_tconr_mbs_offset 33
260#define SMB_tconr_tid_offset 35
261#define SMB_tconr_bcc_offset 37
262#define SMB_tconr_len 39
264#define SMB_tconx_axc_offset 33
265#define SMB_tconx_axr_offset 34
266#define SMB_tconx_axo_offset 35
267#define SMB_tconx_flg_offset 37
268#define SMB_tconx_pwl_offset 39
269#define SMB_tconx_bcc_offset 41
270#define SMB_tconx_buf_offset 43
271#define SMB_tconx_len 43
273#define SMB_tconxr_axc_offset 33
274#define SMB_tconxr_axr_offset 34
275#define SMB_tconxr_axo_offset 35
279#define SMB_tdis_bcc_offset 33
280#define SMB_tdis_len 35
282#define SMB_tdisr_bcc_offset 33
283#define SMB_tdisr_len 35
287#define SMB_open_mod_offset 33
288#define SMB_open_atr_offset 35
289#define SMB_open_bcc_offset 37
290#define SMB_open_buf_offset 39
291#define SMB_open_len 39
293#define SMB_openx_axc_offset 33
294#define SMB_openx_axr_offset 34
295#define SMB_openx_axo_offset 35
296#define SMB_openx_flg_offset 37
299#define SMB_openx_mod_offset 39
300#define SMB_openx_atr_offset 41
301#define SMB_openx_fat_offset 43
302#define SMB_openx_tim_offset 45
303#define SMB_openx_ofn_offset 49
304#define SMB_openx_als_offset 51
305#define SMB_openx_res_offset 55
306#define SMB_openx_bcc_offset 63
307#define SMB_openx_buf_offset 65
308#define SMB_openx_len 65
310#define SMB_openr_fid_offset 33
311#define SMB_openr_atr_offset 35
312#define SMB_openr_tim_offset 37
313#define SMB_openr_fsz_offset 41
314#define SMB_openr_acc_offset 45
315#define SMB_openr_bcc_offset 47
316#define SMB_openr_len 49
318#define SMB_openxr_axc_offset 33
319#define SMB_openxr_axr_offset 34
320#define SMB_openxr_axo_offset 35
321#define SMB_openxr_fid_offset 37
322#define SMB_openxr_fat_offset 39
323#define SMB_openxr_tim_offset 41
324#define SMB_openxr_fsz_offset 45
325#define SMB_openxr_acc_offset 49
327#define SMB_clos_fid_offset 33
328#define SMB_clos_tim_offset 35
329#define SMB_clos_bcc_offset 39
330#define SMB_clos_len 41
334#define SMB_write_fid_offset 33
335#define SMB_write_cnt_offset 35
336#define SMB_write_ofs_offset 37
337#define SMB_write_clf_offset 41
338#define SMB_write_bcc_offset 43
339#define SMB_write_buf_offset 45
340#define SMB_write_len 45
342#define SMB_writr_cnt_offset 33
343#define SMB_writr_bcc_offset 35
344#define SMB_writr_len 37
348#define SMB_read_fid_offset 33
349#define SMB_read_cnt_offset 35
350#define SMB_read_ofs_offset 37
351#define SMB_read_clf_offset 41
352#define SMB_read_bcc_offset 43
353#define SMB_read_len 45
355#define SMB_readr_cnt_offset 33
356#define SMB_readr_res_offset 35
357#define SMB_readr_bcc_offset 43
358#define SMB_readr_bff_offset 45
359#define SMB_readr_len_offset 46
360#define SMB_readr_len 45
364#define SMB_creat_atr_offset 33
365#define SMB_creat_tim_offset 35
366#define SMB_creat_dat_offset 37
367#define SMB_creat_bcc_offset 39
368#define SMB_creat_buf_offset 41
369#define SMB_creat_len 41
371#define SMB_creatr_fid_offset 33
375#define SMB_delet_sat_offset 33
376#define SMB_delet_bcc_offset 35
377#define SMB_delet_buf_offset 37
378#define SMB_delet_len 37
382#define SMB_ssetpLM_mbs_offset 37
383#define SMB_ssetpLM_mmc_offset 39
384#define SMB_ssetpLM_vcn_offset 41
385#define SMB_ssetpLM_snk_offset 43
386#define SMB_ssetpLM_pwl_offset 47
387#define SMB_ssetpLM_res_offset 49
388#define SMB_ssetpLM_bcc_offset 53
389#define SMB_ssetpLM_len 55
390#define SMB_ssetpLM_buf_offset 55
392#define SMB_ssetpNTLM_mbs_offset 37
394#define SMB_ssetpNTLM_mmc_offset 39
395#define SMB_ssetpNTLM_vcn_offset 41
396#define SMB_ssetpNTLM_snk_offset 43
397#define SMB_ssetpNTLM_cipl_offset 47
398#define SMB_ssetpNTLM_cspl_offset 49
399#define SMB_ssetpNTLM_res_offset 51
400#define SMB_ssetpNTLM_cap_offset 55
401#define SMB_ssetpNTLM_bcc_offset 59
402#define SMB_ssetpNTLM_len 61
403#define SMB_ssetpNTLM_buf_offset 61
405#define SMB_ssetpr_axo_offset 35
406#define SMB_ssetpr_act_offset 37
407#define SMB_ssetpr_bcc_offset 39
408#define SMB_ssetpr_buf_offset 41
412#define SMB_creatdir_bcc_offset 33
413#define SMB_creatdir_buf_offset 35
414#define SMB_creatdir_len 35
418#define SMB_deletdir_bcc_offset 33
419#define SMB_deletdir_buf_offset 35
420#define SMB_deletdir_len 35
424#define SMB_checkdir_bcc_offset 33
425#define SMB_checkdir_buf_offset 35
426#define SMB_checkdir_len 35
430#define SMB_search_mdc_offset 33
431#define SMB_search_atr_offset 35
432#define SMB_search_bcc_offset 37
433#define SMB_search_buf_offset 39
434#define SMB_search_len 39
436#define SMB_searchr_dec_offset 33
437#define SMB_searchr_bcc_offset 35
438#define SMB_searchr_buf_offset 37
439#define SMB_searchr_len 37
441#define SMB_searchr_dirent_len 43
445#define SMB_trans_tpc_offset 33
446#define SMB_trans_tdc_offset 35
447#define SMB_trans_mpc_offset 37
448#define SMB_trans_mdc_offset 39
449#define SMB_trans_msc_offset 41
450#define SMB_trans_rs1_offset 42
451#define SMB_trans_flg_offset 43
452#define SMB_trans_tmo_offset 45
453#define SMB_trans_rs2_offset 49
454#define SMB_trans_pbc_offset 51
455#define SMB_trans_pbo_offset 53
456#define SMB_trans_dbc_offset 55
457#define SMB_trans_dbo_offset 57
458#define SMB_trans_suc_offset 59
459#define SMB_trans_rs3_offset 60
460#define SMB_trans_len 61
462#define SMB_transr_tpc_offset 33
463#define SMB_transr_tdc_offset 35
464#define SMB_transr_rs1_offset 37
465#define SMB_transr_pbc_offset 39
466#define SMB_transr_pbo_offset 41
467#define SMB_transr_pdi_offset 43
468#define SMB_transr_dbc_offset 45
469#define SMB_transr_dbo_offset 47
470#define SMB_transr_ddi_offset 49
471#define SMB_transr_suc_offset 51
472#define SMB_transr_rs2_offset 52
473#define SMB_transr_len 53
477#define SMB_cap_raw_mode 0x0001
478#define SMB_cap_mpx_mode 0x0002
479#define SMB_cap_unicode 0x0004
480#define SMB_cap_large_files 0x0008
481#define SMB_cap_nt_smbs 0x0010
482#define SMB_rpc_remote_apis 0x0020
483#define SMB_cap_nt_status 0x0040
484#define SMB_cap_level_II_oplocks 0x0080
485#define SMB_cap_lock_and_read 0x0100
486#define SMB_cap_nt_find 0x0200
490#define SMB_LMapi_SetUserInfo 0x0072
491#define SMB_LMapi_UserPasswordSet 0x0073
521#define SMBLIB_DEFAULT_DOMAIN "SMBlib_dom"
522#define SMBLIB_DEFAULT_OSNAME "UNIX of some type"
523#define SMBLIB_DEFAULT_LMTYPE "SMBlib LM2.1 minus a bit"
524#define SMBLIB_MAX_XMIT 65535
526#define SMB_Sec_Mode_Share 0
527#define SMB_Sec_Mode_User 1
struct SMB_Status SMB_Status
void SMB_Get_My_Name(char *name, int len)
SMB_State_Types SMBlib_State
union SMB_Status::@21 status
struct SMB_Status::@21::@22 DosError