summaryrefslogtreecommitdiffstats
path: root/source/param
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-30 10:24:36 +0000
committerAndrew Tridgell <tridge@samba.org>2005-01-30 10:24:36 +0000
commita7d9fff4febcea62f333d4c145ba84b1a9e13d37 (patch)
treefcbcb6ae6c66092a9aa8978c06981a467d436dca /source/param
parent90a3d7e9336b6012c8317c3a36382cdd2a1b091c (diff)
downloadsamba-a7d9fff4febcea62f333d4c145ba84b1a9e13d37.tar.gz
samba-a7d9fff4febcea62f333d4c145ba84b1a9e13d37.tar.xz
samba-a7d9fff4febcea62f333d4c145ba84b1a9e13d37.zip
r5108: the beginnings of a nbtd server for Samba4. Currently just displays
the packets it receives, but it at least shows how the server structure will work. To implement it I extended the libcli/nbt/ library to allow for an incoming packet handler to be registered. That allows the nbt client library to be used for low level processing of the nbtd server packets. Other changes: - made the socket library always set SO_REUSEADDR when binding to an interface, to ensure that restarts of a server don't have to wait for a couple of minutes. - made the nbt port configurable. Defaults to 137, but other ports will be useful for testing.
Diffstat (limited to 'source/param')
-rw-r--r--source/param/loadparm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index 8380fccaf73..d5a8928c3d7 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -61,6 +61,7 @@
#include "system/printing.h"
#include "librpc/gen_ndr/ndr_svcctl.h"
#include "librpc/gen_ndr/ndr_samr.h"
+#include "librpc/gen_ndr/ndr_nbt.h"
#include "dlinklist.h"
BOOL in_client = False; /* Not in the client by default */
@@ -233,6 +234,7 @@ typedef struct
int winbind_cache_time;
int iLockSpinCount;
int iLockSpinTime;
+ int nbt_port;
char *socket_options;
BOOL bDNSproxy;
BOOL bWINSsupport;
@@ -612,6 +614,7 @@ static struct parm_struct parm_table[] = {
{"Protocol Options", P_SEP, P_SEPARATOR},
{"smb ports", P_LIST, P_GLOBAL, &Globals.smb_ports, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
+ {"nbt port", P_INTEGER, P_GLOBAL, &Globals.nbt_port, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{"large readwrite", P_BOOL, P_GLOBAL, &Globals.bLargeReadwrite, NULL, NULL, FLAG_DEVELOPER},
{"max protocol", P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, FLAG_DEVELOPER},
{"min protocol", P_ENUM, P_GLOBAL, &Globals.minprotocol, NULL, enum_protocol, FLAG_DEVELOPER},
@@ -1044,6 +1047,7 @@ static void init_globals(void)
do_parameter("use spnego", "True");
do_parameter("smb ports", SMB_PORTS);
+ do_parameter("nbt port", "137");
do_parameter("nt status support", "True");
}
@@ -1141,6 +1145,7 @@ static const char *lp_string(const char *s)
int fn_name(int i) {return(LP_SNUM_OK(i)? ServicePtrs[(i)]->val : sDefault.val);}
FN_GLOBAL_LIST(lp_smb_ports, &Globals.smb_ports)
+FN_GLOBAL_INTEGER(lp_nbt_port, &Globals.nbt_port)
FN_GLOBAL_STRING(lp_dos_charset, &Globals.dos_charset)
FN_GLOBAL_STRING(lp_unix_charset, &Globals.unix_charset)
FN_GLOBAL_STRING(lp_display_charset, &Globals.display_charset)