Home |
Function SMB3CInit |
Function SMB3CInitThis function initializes the SMB3 client. int SMB3CInit(const char * HostName, const char * WorkGroup, int Interface, const char * DNSServer, const char * WinsIP, const char * User, const char * Password, unsigned int Flags); ParametersHostNameThe NetBIOS name of the client. WorkGroupThe workgroup name of the client. If the client is not a member of a workgroup, use parameter "WORKGROUP" or NULL. InterfaceThe RTIP-32 interface number on which the NetBIOS daemon should publish the HostName. DNSServerThe DNSServer the SMB3 client should use to resolve network names. This parameter can be a DNS name string, an IP address string, and IP address in network byte order, or NULL. WinsIPThe WINS server the SMB3 client should use to resolve NetBIOS names. This parameter can be a DNS name string, an IP address string, and IP address in network byte order, or NULL. UserThe user name the SMB3 client should use to log into SMB server shares. The name may be up to 250 characters long. PasswordThe user's password the SMB3 client should use to log into SMB3 server shares. The password may be up to 100 characters long. Flags0 or SMB3C_NO_NON_SEC_AUTH. If SMB3C_NO_NON_SEC_AUTH is specified, the SMB3 client will only perform secure (encrypted) authentications. If this flag is not set, non-encrypted (plain text) authentication will be performed if the server does not support secure authentication. return valueTRUE on succcess of FALSE on failure. All string parameters passed to this function must be permanently allocated (string constants, global variables, heap allocated, but not local/stack allocated) as only the pointers to the strings are copied. All strings may be accessed after the function returns. This function requires a LOOP_BACK interface. If none is installed, it will add one, which requires CFG_NIFACES to be large enough. It also opens numerous sockets which may require CFG_NUDPPORTS and CFG_NTCPPORTS to be increased. For optimal performance, CFG_TCP_SEND_WAIT_ACK should be set to 0 as the client uses many sockets in blocking mode. This function creates two internal threads with names "SMB3 NetBIOS" and "SMB3 Helper" with priorities and stack sizes defined through config parameters PRIOTASK_NORMAL and SIZESTACK_BIG. Once SMB3CInit has been called, the application can access files on SMB servers if the SMB3FileSystem file system is installed (see SMB3 Client for details).
|