Home |
Configuration Function rtsmb_cli_ez_set_user_ex Function rtsmb_set_codepage_OEM Function rtsmb_set_codepage_ANSI Function rtsmb_set_codepage_UTF8 |
ConfigurationThe SMB client's function rtsmb_cli_init_ex reads a few configuration constants from global structure CFG_SMBC: typedef struct { char * Name; BYTE IP[4]; } SMBServerName; typedef struct { int MaxSessions, MaxSearchesPerSession, MaxFilesPerSearch, MaxFilesPerSession, MaxSharesPerSession, MaxSharesPerSearch, MaxServerSearches, MaxServersPerSearch, BufferSize, BufferPerConnection, MaxJobsPerSession; char * LocalServerName; SMBServerName * ServerNames; } cfg_smbc; cfg_smbc CFG_SMBC; Applications can assign values to the members of CFG_SMBC before calling rtsmb_cli_init_ex to configure the SMB client. The function of each value and all default values are given below: MaxSessionsDefault: 3. Maximum number of servers the client can connect to at simultaneously. MaxSearchesPerSessionDefault: 16. Maximum number of simultaneous open file searches. If recursive searches are not needed, this value can be set to 1. MaxFilesPerSearchDefault: 10. The number of files that can be returned in one search. MaxFilesPerSessionDefault: 8. The maximum number of open files on a connection to a specific server. MaxSharesPerSessionDefault: 4. The maximum number of shares the client can be connected to simultaneously. This includes the IPC$ share which a client is always connected to. MaxSharesPerSearchDefault: 10. The maximum number of shares that can be returned in one share enumeration. MaxServerSearchesDefault: 3. The maximum number of server enumerations that can exist simultaneously. MaxServersPerSearchDefault: 64. The maximum number of servers one search can return simultaneously. This value controls how many servers will be found from each workgroup on the network. Each server only takes up 16 bytes of information. BufferSizeDefault: 2936. Size of the SMB Client's internal buffers. Lower values save RAM at the expense of reduced performance because more packets may need to be exchanged. This value must not be less than 1028. For best performance, the chosen value should make best usage of the 1514 byte size Ethernet frames. For example, this is the case for 1476, 2936, 4396, or 8776. BufferPerConnectionDefault: 2. Number of buffers the client will maintain per connection. This value should always be 2. MaxJobsPerSessionDefault: 3. Maximum number of outstanding jobs per session. This value should always be 3. LocalServerNameDefault: NULL. If LocalServerName points to a string, this name will be used by the SMB client to identify itself towards SMB servers. ServerNamesDefault: NULL. ServerNames can point to an array of SMBServerName structures. The last entry must be {NULL}. The SMB Client will scan this list every time it parses a remote file name. It will search both for names and for IP addresses. If an entry is found, that name/ip pair is used to connect to the server. You can thus use the remote IP address or name to connect to the server. If no match is found, the client will try NetBIOS (works only locally) and then DNS.
|