From abb9a2de72073a8a6f332b60d74af9eb6c3d6f25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 20 Dec 2000 03:22:51 +0000 Subject: implemented a much nicer name_status() interface. It now returns a list of structures rather than the dodgy parsing code we had before this also gets smbw working correctly with no initial workgroup (using name_status_find on __MSBROWSE__ returns) (This used to be commit f2be88a8738a39ca5c98936edb7537cd701348a1) --- source3/include/proto.h | 5 +++-- source3/include/smb.h | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index 168600a59f..c92aeae6f1 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -840,8 +840,9 @@ BOOL deal_with_creds(uchar sess_key[8], /*The following definitions come from libsmb/namequery.c */ -BOOL name_status(int fd,char *name,int name_type,BOOL recurse, - struct in_addr to_ip,char *master,char *rname); +struct node_status *name_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(int type, struct in_addr to_ip, char *name); struct in_addr *name_query(int fd,const char *name,int name_type, BOOL bcast,BOOL recurse, struct in_addr to_ip, int *count); diff --git a/source3/include/smb.h b/source3/include/smb.h index f97e7cd9f5..430b51b8b5 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1553,6 +1553,16 @@ struct nmb_name { unsigned int name_type; }; + +/* A netbios node status array element. */ +struct node_status { + char name[16]; + unsigned char type; + unsigned char flags; +}; + + + #define AGENT_CMD_CON 0 #define AGENT_CMD_CON_ANON 2 #define AGENT_CMD_CON_REUSE 1 -- cgit