diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-30 10:24:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:23 -0500 |
commit | c7ded5ab0accc54a28df4d43cb923e6c808ff347 (patch) | |
tree | eabb1e05c05f8ce01b0ffbf1fda038a80fc237a0 /source4/param | |
parent | a0ab1f7afda62964d480af9dc26e60a38d1350e0 (diff) | |
download | samba-c7ded5ab0accc54a28df4d43cb923e6c808ff347.tar.gz samba-c7ded5ab0accc54a28df4d43cb923e6c808ff347.tar.bz2 samba-c7ded5ab0accc54a28df4d43cb923e6c808ff347.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.
(This used to be commit 2fedca6adfd4df9e85cc86896dfa79630777a917)
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/loadparm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 8380fccaf7..d5a8928c3d 100644 --- a/source4/param/loadparm.c +++ b/source4/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) |