summaryrefslogtreecommitdiff
path: root/source3/include/nameserv.h
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1996-07-02 15:31:33 +0000
committerSamba Release Account <samba-bugs@samba.org>1996-07-02 15:31:33 +0000
commit7ca58ce114b4eafb2bb05d9e9699fe9effd8d9ec (patch)
tree867dd58fa56063c6afc6e4a8035dd1df27f71d54 /source3/include/nameserv.h
parentee1db519411a969413e60a875812f9909f71d525 (diff)
downloadsamba-7ca58ce114b4eafb2bb05d9e9699fe9effd8d9ec.tar.gz
samba-7ca58ce114b4eafb2bb05d9e9699fe9effd8d9ec.tar.bz2
samba-7ca58ce114b4eafb2bb05d9e9699fe9effd8d9ec.zip
as a result of the writing of namework.doc, namework.c has been tidied up,
some bugs fixed / documented and some discrepancies noted down (in namework.c as well as namework.doc) namebrowse.c and namelogon.c contain functions that were inappropriately placed in namework.c. namebrowse.c contains browse sync queue management functions that were inappropriately placed in namedb.c the 'cmd_type' member of response_record has been renamed to 'state' because that more accurately reflects it purpose (not entirely. sigh). fixed a bug in nameserv.c that meant the previous version wouldn't compile. there's probably a bit more... lkcl (This used to be commit a66417ebe871a1c1366c395ea4c7099852975e65)
Diffstat (limited to 'source3/include/nameserv.h')
-rw-r--r--source3/include/nameserv.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/source3/include/nameserv.h b/source3/include/nameserv.h
index 03bb521558..9e4145213b 100644
--- a/source3/include/nameserv.h
+++ b/source3/include/nameserv.h
@@ -24,7 +24,7 @@
#define MAINTAIN_LIST 2
#define ELECTION_VERSION 1
-#define MAX_DGRAM_SIZE (80*18+64)
+#define MAX_DGRAM_SIZE (576) /* tcp/ip datagram limit is 576 bytes */
#define MIN_DGRAM_SIZE 12
#define NMB_QUERY 0x20
@@ -36,6 +36,7 @@
#define NMB_WAIT_ACK 0x07 /* see rfc1002.txt 4.2.17 */
/* XXXX what about all the other types?? 0x1, 0x2, 0x3, 0x4, 0x8? */
+/* NetBIOS flags */
#define NB_GROUP 0x80
#define NB_PERM 0x02
#define NB_ACTIVE 0x04
@@ -51,6 +52,7 @@
#define NAME_POLL_REFRESH_TIME (5*60)
#define NAME_POLL_INTERVAL 15
+/* NetBIOS flag identifier */
#define NAME_PERMANENT(p) ((p) & NB_PERM)
#define NAME_ACTIVE(p) ((p) & NB_ACTIVE)
#define NAME_CONFLICT(p) ((p) & NB_CONFL)
@@ -62,12 +64,22 @@
#define NAME_MFLAG(p) (((p) & NB_FLGMSK) == NB_MFLAG)
#define NAME__FLAG(p) (((p) & NB_FLGMSK) == NB__FLAG)
+/* server type identifiers */
+#define AM_MASTER(work) (work->ServerType & SV_TYPE_MASTER_BROWSER)
+#define AM_BACKUP(work) (work->ServerType & SV_TYPE_BACKUP_BROWSER)
+#define AM_DOMCTL(work) (work->ServerType & SV_TYPE_DOMAIN_CTRL)
+
+/* microsoft browser NetBIOS name */
#define MSBROWSE "\001\002__MSBROWSE__\002"
+/* mail slots */
+#define BROWSE_MAILSLOT "\\MAILSLOT\\BROWSE"
+#define NET_LOGON_MAILSLOT "\\MAILSLOT\\NET\\NETLOGON"
+
enum name_source {STATUS_QUERY, LMHOSTS, REGISTER, SELF, DNS, DNSFAIL};
enum node_type {B_NODE=0, P_NODE=1, M_NODE=2, NBDD_NODE=3};
enum packet_type {NMB_PACKET, DGRAM_PACKET};
-enum cmd_type
+enum state_type
{
NAME_STATUS_MASTER_CHECK,
NAME_STATUS_CHECK,
@@ -161,7 +173,7 @@ struct response_record
struct response_record *prev;
uint16 response_id;
- enum cmd_type cmd_type;
+ enum state_type state;
int fd;
int quest_type;
@@ -301,11 +313,6 @@ struct packet_struct
};
-#define AM_MASTER(work) (work->ServerType & SV_TYPE_MASTER_BROWSER)
-#define AM_BACKUP(work) (work->ServerType & SV_TYPE_BACKUP_BROWSER)
-#define AM_DOMCTL(work) (work->ServerType & SV_TYPE_DOMAIN_CTRL)
-
-
/* ids for netbios packet types */
#define ANN_HostAnnouncement 1
#define ANN_AnnouncementRequest 2