--- /dev/null
+<samba:parameter name="server smb transports"
+ context="G"
+ type="list"
+ handler="handle_server_smb_transports"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>Specifies which transports and ports the server should listen on for SMB traffic.</para>
+
+ <para>The order matters only for mDNS registrations, the first
+ 'tcp' or 'nbt' port is used for that.</para>
+
+ <para>The transport 'tcp' uses raw tcp with a 4 byte length header per SMB PDU.
+ The default port for 'tcp' is 445. Other ports can be specified by adding it
+ after ':', e.g. 'tcp:1445'.
+ </para>
+
+ <para>The transport 'nbt' uses netbios framing on top of tcp per SMB PDU.
+ The default port for 'nbt' is 139. Other ports can be specified by adding it
+ after ':', e.g. 'nbt:1139'.
+ </para>
+
+ <para>Numerical ports are handled as 'tcp' except port '139' is handled as 'nbt'.
+ </para>
+
+ <para>Note that's currently a limit of 10 unique transports, all others will
+ be ignored.</para>
+</description>
+
+<value type="example">445</value>
+<value type="example">tcp, tcp:1445</value>
+<value type="example">8000, nbt:1139</value>
+
+<value type="default">tcp, nbt</value>
+</samba:parameter>
"client smb transports");
}
+bool handle_server_smb_transports(struct loadparm_context *lp_ctx,
+ struct loadparm_service *service,
+ const char *pszParmValue,
+ char **ptr)
+{
+ return handle_smb_transports(lp_ctx, service, pszParmValue, ptr,
+ "server smb transports");
+}
+
bool handle_rpc_server_dynamic_port_range(struct loadparm_context *lp_ctx,
struct loadparm_service *service,
const char *pszParmValue,
lpcfg_do_global_parameter(lp_ctx, "use mmap", "True");
+ lpcfg_do_global_parameter(lp_ctx, "server smb transports", "tcp, nbt");
lpcfg_do_global_parameter(lp_ctx, "client smb transports", "tcp, nbt");
lpcfg_do_global_parameter(lp_ctx, "smb ports", "445 139");
lpcfg_do_global_parameter_var(lp_ctx, "nbt port", "%d", NBT_NAME_SERVICE_PORT);
Globals.defer_sharing_violations = true;
Globals.smb_ports = str_list_make_v3_const(NULL, SMB_PORTS, NULL);
+ Globals.server_smb_transports = str_list_make_v3_const(NULL, "tcp, nbt", NULL);
Globals.client_smb_transports = str_list_make_v3_const(NULL, "tcp, nbt", NULL);
Globals.enable_privileges = true;