From 6c6c89cde0808ad2c485064d7bbdbfc57a77d2d4 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 16 Apr 2008 23:23:24 +0200 Subject: IDL: build generated nbt code. Guenther (This used to be commit 554dcfdab03f9d06f319a3234d56cf44dc38c9da) --- source3/Makefile.in | 9 ++++++--- source3/include/nameserv.h | 2 ++ source3/include/smb.h | 1 + source3/include/smb_macros.h | 3 +++ source3/librpc/ndr/libndr.h | 11 +++++++++++ 5 files changed, 23 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/Makefile.in b/source3/Makefile.in index be3f991260..184ee4f012 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -292,7 +292,8 @@ LIBNDR_GEN_OBJ = librpc/gen_ndr/ndr_wkssvc.o \ librpc/gen_ndr/ndr_dssetup.o \ librpc/gen_ndr/ndr_notify.o \ librpc/gen_ndr/ndr_xattr.o \ - librpc/gen_ndr/ndr_ntsvcs.o + librpc/gen_ndr/ndr_ntsvcs.o \ + librpc/gen_ndr/ndr_nbt.o RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o @@ -403,7 +404,8 @@ LIBADS_SERVER_OBJ = libads/kerberos_verify.o libads/authdata.o \ SECRETS_OBJ = passdb/secrets.o passdb/machine_sid.o LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \ - libsmb/namequery.o libsmb/conncache.o libads/dns.o + libsmb/namequery.o libsmb/conncache.o libads/dns.o \ + libcli/nbt/nbtname.o NTERR_OBJ = libsmb/nterr.o DOSERR_OBJ = libsmb/doserr.o @@ -971,7 +973,8 @@ REPLACETORT_OBJ = lib/replace/test/testsuite.o \ NDRDUMP_OBJ = librpc/tools/ndrdump.o \ $(PARAM_OBJ) $(LIBNDR_GEN_OBJ) \ - $(LIBSAMBA_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) + $(LIBSAMBA_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \ + libcli/nbt/nbtname.o DEBUG2HTML_OBJ = utils/debug2html.o utils/debugparse.o diff --git a/source3/include/nameserv.h b/source3/include/nameserv.h index 46236970a6..4377e3330a 100644 --- a/source3/include/nameserv.h +++ b/source3/include/nameserv.h @@ -491,7 +491,9 @@ struct nmb_packet { #define DGRAM_UNIQUE 0x10 #define DGRAM_GROUP 0x11 #define DGRAM_BROADCAST 0x12 +/* defined in IDL #define DGRAM_ERROR 0x13 +*/ #define DGRAM_QUERY_REQUEST 0x14 #define DGRAM_POSITIVE_QUERY_RESPONSE 0x15 #define DGRAM_NEGATIVE_QUERT_RESPONSE 0x16 diff --git a/source3/include/smb.h b/source3/include/smb.h index d52d8493d0..598708bfe3 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -310,6 +310,7 @@ extern const DATA_BLOB data_blob_null; #include "librpc/gen_ndr/libnet_join.h" #include "librpc/gen_ndr/krb5pac.h" #include "librpc/gen_ndr/ntsvcs.h" +#include "librpc/gen_ndr/nbt.h" struct lsa_dom_info { bool valid; diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index c98c4244de..0e21431226 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -169,8 +169,11 @@ #define reply_botherror(req,status,eclass,ecode) reply_both_error(req,eclass,ecode,status,__LINE__,__FILE__) #define reply_unixerror(req,defclass,deferror) reply_unix_error(req,defclass,deferror,NT_STATUS_OK,__LINE__,__FILE__) +#if 0 +/* defined in IDL */ /* these are the datagram types */ #define DGRAM_DIRECT_UNIQUE 0x10 +#endif #define SMB_ROUNDUP(x,r) ( ((x)%(r)) ? ( (((x)+(r))/(r))*(r) ) : (x)) diff --git a/source3/librpc/ndr/libndr.h b/source3/librpc/ndr/libndr.h index a277a626c7..35a5b136a7 100644 --- a/source3/librpc/ndr/libndr.h +++ b/source3/librpc/ndr/libndr.h @@ -337,4 +337,15 @@ struct ndr_interface_list { const struct ndr_interface_table *table; }; +#define NDR_SCALAR_PROTO(name, type) \ +enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, type v); \ +enum ndr_err_code ndr_pull_ ## name(struct ndr_pull *ndr, int ndr_flags, type *v); \ +void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, type v); + +#define NDR_BUFFER_PROTO(name, type) \ +enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, const type *v); \ +enum ndr_err_code ndr_pull_ ## name(struct ndr_pull *ndr, int ndr_flags, type *v); \ +void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, const type *v); + + #endif /* __LIBNDR_H__ */ -- cgit