#include "ofc/types.h"#include "ofc/config.h"#include "ofc/core.h"#include "ofc/path.h"#include "ofc/file.h"#include "ofc/net.h"#include "of_smb/smb.h"#include "of_smb/persist.h"
Go to the source code of this file.
| #define SERVER_EVENT_ERROR 1 |
Error Level for Server Event
| #define SERVER_EVENT_INFO 0 |
INFO Level for Server Event
| #define SERVER_EVENT_SECURITY 2 |
Critical Security Event for Server
| OF_SMB_LIB OFC_VOID of_smb_add_remote | ( | OF_SMB_REMOTE * | remote | ) |
Add a remote
This is to add a persistent remote. This is typically not used in normal client usage
| remote | remote to add |
Destroy the Open Files SMB framework
This will release all memory. The state of the application should be as if SMB hass not been initialized. If the INIT_ON_LOAD build parameter is defined, this function will be called implicitly on application unload.
Disable an SMB Dialect
| dialect | The dialect to disable. One of: 0x0202 0x0210 0x0300 0x0302 0x0311 |
Enable an SMB Dialect
| dialect | The dialect to enable. One of: 0x0202 0x0210 0x0300 0x0302 0x0311 |
| OF_SMB_LIB OFC_VOID of_smb_free_remotes | ( | OF_SMB_REMOTES * | remotes | ) |
Free remotes returned from of_smb_get_remotes
| remotes | Array to free |
Get DNS Bootstrap DCs
| count | Pointer to number of DCs returned |
| dc | Pointer to DC array |
Get the Maximum SMB Version supported by this SMB Stack
| OF_SMB_LIB OF_SMB_REMOTES* of_smb_get_remotes | ( | OFC_VOID | ) |
Get all remotes configured
These are for persistent remotes. These are not used in a typical client usage. Rather they are if you wish to have known servers and reference them as a remote alias
Initialize the SMB Stack
This routine should be called before any other ConnectedSMB function but after the call to ofc_framework_init. It initializes the SMB portion of the stack. Thiss function is called implicitly if INIT_ON_LOAD is defined.
Return Active Domain of default cache
Return Active User of default cache
Destroy (i.e. Logout) of Active Directory
This can be called from within OpenFiles, or you can interface with your domain external to Open Files
Initialize an Active Directory Ticket
A ticket can be obtained external to Open Files or can be obtained from within the stack.
| principal | Principal for the ticket |
| password | Password for ticket |
| OF_SMB_LIB OFC_VOID of_smb_remove_remote | ( | OFC_LPCTSTR | name | ) |
Remove a remote from persistence
| name | Name of remote to remove |
| OFC_VOID of_smb_resolve_name | ( | OFC_LPCSTR | name, |
| OFC_UINT16 * | num_addrs, | ||
| OFC_IPADDR * | ip | ||
| ) |
Resolve a DNS Name
This will first try to resolve the name as provided. If that fails, it will append the domain name to the name and try again.
| name | name to resolve |
| num_addrs | Size of array to hold IP addresses |
| ip | pointer to Preallocated buffer of ip addresses |
Set DFS Bootstrap DCs
By default, OpenFiles will attempt to query for the bootstrap DCs. Use this if DNS query is not possible.
| count | Number of DCs |
| dc | Array of DCs |
Set the Maximum SMB Version supported by this SMB Stack
| maxVersion | The max version. One of: 0x0202 0x0210 0x0300 0x0302 0x0311 |
Shutdown the SMB Stack
This function will gracefully bring down the SMB components. This will terminate all existing SMB sessions and dismount all mounted shares. If INIT_ON_LOAD is defined, this function will be implicitly called.
| OF_SMB_LIB OFC_VOID of_smb_startup | ( | OFC_HANDLE | hScheduler | ) |
Start up the SMB Stack
This routine should be called after the stack has been initialized and after all configuration has been performed. It will start the SMB Components.
If INIT_ON_LOAD is defined, this function will be called implicitly on library load.