summaryrefslogtreecommitdiff
path: root/source3/include/nameserv.h
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1996-07-07 12:36:18 +0000
committerSamba Release Account <samba-bugs@samba.org>1996-07-07 12:36:18 +0000
commitb338bce94f47780c74b2db3608a767c5b957b61a (patch)
treead4a664ed44df79f85c0955befa0335d09f7e129 /source3/include/nameserv.h
parent4d314a96e76670f65bcd885d7bddfd7a137a4116 (diff)
downloadsamba-b338bce94f47780c74b2db3608a767c5b957b61a.tar.gz
samba-b338bce94f47780c74b2db3608a767c5b957b61a.tar.bz2
samba-b338bce94f47780c74b2db3608a767c5b957b61a.zip
tidied up: code shuffling and documentation.
created namedb*.c nameservresp.c nameservreply.c and namepacket.c added modules to Makefile, downloading dan's current version first :-) shuffled docs to match source created more docs fixed bug in announce_backup() discovered when going nameannounce.doc: backup list requests to the master browser should be used when samba is not a master browser; backup list requests to the primary domain controller should be used when samba is not a primary domain controller. fixed bug in sync_server: it would never send MasterAnnounce packets. removed the code that ignored special browser names: these should only be ignored (except 0x1b names) when broadcasted name queries are sent, not when directed registration or directed queries are sent samba as a WINS server. (note: exactly what's going on is still uncertain). renamed NAME_QUERY_MST_SRV_CHK to NAME_QUERY_PDC_SRV_CHK (more accurate). renamed NAME_STATUS_MST_SRV_CHK to NAME_STATUS_PDC_SRV_CHK (more accurate). added secured WINS name registration: a new 'state' NAME_REGISTER_CHALLENGE; functions send_name_response(), response_name_query_register(); added sending of WAIT ACKNOWLEDGEMENT packet; added a reply_to_ip field to the response record structure so that after the name query challenge, you know who to inform of the outcome of that challenge. note: these are all currently untested modifications (yikes!) lkcl (This used to be commit b50ff657ddc29b81b4aa02a597e5affab197e4f2)
Diffstat (limited to 'source3/include/nameserv.h')
-rw-r--r--source3/include/nameserv.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/source3/include/nameserv.h b/source3/include/nameserv.h
index 64a71b89ba..de5e492644 100644
--- a/source3/include/nameserv.h
+++ b/source3/include/nameserv.h
@@ -20,6 +20,8 @@
*/
+#define GET_TTL(ttl) ((ttl)?MIN(ttl,lp_max_ttl()):lp_max_ttl())
+
/* NTAS uses 2, NT uses 1, WfWg uses 0 */
#define MAINTAIN_LIST 2
#define ELECTION_VERSION 1
@@ -33,9 +35,13 @@
#define NMB_REG 0x05 /* see rfc1002.txt 4.2.2,3,5,6,7,8 */
#define NMB_REG_REFRESH 0x09 /* see rfc1002.txt 4.2.4 */
#define NMB_REL 0x06 /* see rfc1002.txt 4.2.9,10,11 */
-#define NMB_WAIT_ACK 0x07 /* see rfc1002.txt 4.2.17 */
+#define NMB_WAIT_ACK 0x07 /* see rfc1002.txt 4.2.16 */
/* XXXX what about all the other types?? 0x1, 0x2, 0x3, 0x4, 0x8? */
+#define FIND_SELF 0x01
+#define FIND_WINS 0x02
+#define FIND_LOCAL 0x04
+
/* NetBIOS flags */
#define NB_GROUP 0x80
#define NB_PERM 0x02
@@ -83,13 +89,14 @@ enum master_state { MST_NONE, MST_WON, MST_MSB, MST_BROWSER, MST_DOMAIN };
enum state_type
{
- NAME_STATUS_MASTER_CHECK,
- NAME_STATUS_CHECK,
+ NAME_STATUS_PDC_SRV_CHK,
+ NAME_STATUS_SRV_CHK,
+ NAME_REGISTER_CHALLENGE,
NAME_REGISTER,
NAME_RELEASE,
NAME_QUERY_CONFIRM,
NAME_QUERY_SYNC,
- NAME_QUERY_MST_SRV_CHK,
+ NAME_QUERY_PDC_SRV_CHK,
NAME_QUERY_SRV_CHK,
NAME_QUERY_FIND_MST,
NAME_QUERY_MST_CHK
@@ -189,7 +196,8 @@ struct response_record
BOOL bcast;
BOOL recurse;
- struct in_addr to_ip;
+ struct in_addr send_ip;
+ struct in_addr reply_to_ip;
int num_msgs;