summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1997-10-29 00:04:14 +0000
committerLuke Leighton <lkcl@samba.org>1997-10-29 00:04:14 +0000
commitfe0a702322bdf3c76a517e2fd7e92a05219c49dd (patch)
tree517889b5f9f942d48b323607b6d4c0f998942e04 /source3/include
parentecb952f913e0532e4570753e479f8b8de14b0988 (diff)
downloadsamba-fe0a702322bdf3c76a517e2fd7e92a05219c49dd.tar.gz
samba-fe0a702322bdf3c76a517e2fd7e92a05219c49dd.tar.bz2
samba-fe0a702322bdf3c76a517e2fd7e92a05219c49dd.zip
byteorder.h :
added mode for printing debug array data as chars not uint8/16/32s. only really useful for (uint8) strings or (uint16) unicode strings lsaparse.c smbparse.c smb.h : rpc bind and rpc bind ack structures and parsing and creation functions. ipc.c pipes.c pipenetlog.c pipentlsa.c pipesrvsvc.c : using rpc bind / bind ack parsing routines instead of incorrect use of api_LsarpcTNP1 function. ntclient.c : creation of do_rpc_bind() function. THAT'S IT, FOLKS! (This used to be commit 21c89e2f17c51939fd6b53dddbe3072419eb0db2)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/byteorder.h9
-rw-r--r--source3/include/proto.h8
-rw-r--r--source3/include/smb.h6
3 files changed, 11 insertions, 12 deletions
diff --git a/source3/include/byteorder.h b/source3/include/byteorder.h
index b0dc1b1941..7326ec2abe 100644
--- a/source3/include/byteorder.h
+++ b/source3/include/byteorder.h
@@ -202,24 +202,27 @@ it also defines lots of intermediate macros, just ignore those :-)
#define RSSVAL(buf,pos,val) SSVAL(buf,pos,SREV(val))
#define RSIVAL(buf,pos,val) SIVAL(buf,pos,IREV(val))
-#define DBG_RW_PCVAL(string,depth,base,read,inbuf,outbuf,len) \
+#define DBG_RW_PCVAL(charmode,string,depth,base,read,inbuf,outbuf,len) \
RW_PCVAL(read,inbuf,outbuf,len) \
DEBUG(5,("%s%04x %s: ", \
tab_depth(depth), PTR_DIFF(inbuf,base),string)); \
+ if (charmode) print_asc(5, (char*)(outbuf), (len)); else \
{ int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%02x ", CVAL(&((outbuf)[idx]), 0))); } } \
DEBUG(5,("\n"));
-#define DBG_RW_PSVAL(string,depth,base,read,inbuf,outbuf,len) \
+#define DBG_RW_PSVAL(charmode,string,depth,base,read,inbuf,outbuf,len) \
RW_PSVAL(read,inbuf,outbuf,len) \
DEBUG(5,("%s%04x %s: ", \
tab_depth(depth), PTR_DIFF(inbuf,base),string)); \
+ if (charmode) print_asc(5, (char*)(outbuf), 2*(len)); else \
{ int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%04x ", SVAL(&((outbuf)[idx]), 0))); } } \
DEBUG(5,("\n"));
-#define DBG_RW_PIVAL(string,depth,base,read,inbuf,outbuf,len) \
+#define DBG_RW_PIVAL(charmode,string,depth,base,read,inbuf,outbuf,len) \
RW_PIVAL(read,inbuf,outbuf,len) \
DEBUG(5,("%s%04x %s: ", \
tab_depth(depth), PTR_DIFF(inbuf,base),string)); \
+ if (charmode) print_asc(5, (char*)(outbuf), 4*(len)); else \
{ int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%08x ", IVAL(&((outbuf)[idx]), 0))); } } \
DEBUG(5,("\n"));
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 9ebe15e99a..fe35c3592e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -714,7 +714,6 @@ BOOL api_LsarpcSNPHS(int cnum,int uid, char *param,char *data,
int mdrcnt,int mprcnt,
char **rdata,char **rparam,
int *rdata_len,int *rparam_len);
-void LsarpcTNP1(char *data,char **rdata, int *rdata_len);
BOOL api_LsarpcTNP(int cnum,int uid, char *param,char *data,
int mdrcnt,int mprcnt,
char **rdata,char **rparam,
@@ -955,8 +954,7 @@ void make_rpc_addr_str(RPC_ADDR_STR *str, char *name);
char* smb_io_rpc_addr_str(BOOL io, RPC_ADDR_STR *str, char *q, char *base, int align, int depth);
void make_rpc_hdr_bba(RPC_HDR_BBA *bba, uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid);
char* smb_io_rpc_hdr_bba(BOOL io, RPC_HDR_BBA *rpc, char *q, char *base, int align, int depth);
-void make_rpc_hdr_rb(RPC_HDR_RB *rpc, enum RPC_PKT_TYPE pkt_type,
- uint32 call_id, int data_len,
+void make_rpc_hdr_rb(RPC_HDR_RB *rpc,
uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
uint32 num_elements, uint16 context_id, uint8 num_syntaxes,
RPC_IFACE *abstract, RPC_IFACE *transfer);
@@ -964,8 +962,7 @@ char* smb_io_rpc_hdr_rb(BOOL io, RPC_HDR_RB *rpc, char *q, char *base, int align
void make_rpc_results(RPC_RESULTS *res,
uint8 num_results, uint16 result, uint16 reason);
char* smb_io_rpc_results(BOOL io, RPC_RESULTS *res, char *q, char *base, int align, int depth);
-void make_rpc_hdr_ba(RPC_HDR_BA *rpc, enum RPC_PKT_TYPE pkt_type,
- uint32 call_id, int data_len,
+void make_rpc_hdr_ba(RPC_HDR_BA *rpc,
uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
char *pipe_addr,
uint8 num_results, uint16 result, uint16 reason,
@@ -1225,5 +1222,6 @@ void pstrcpy(char *dest, char *src);
char *align4(char *q, char *base);
char *align2(char *q, char *base);
char *align_offset(char *q, char *base, int align_offset_len);
+void print_asc(int level, unsigned char *buf,int len);
void dump_data(int level,char *buf1,int len);
char *tab_depth(int depth);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index f0ab45fb37..24cb279f43 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -606,10 +606,9 @@ typedef struct rpc_hdr_bba_info
} RPC_HDR_BBA;
-/* RPC_HDR_RB - ms req bind header */
-typedef struct rpc_hdr_rb_info
+/* RPC_BIND_REQ - ms req bind */
+typedef struct rpc_bind_req_info
{
- RPC_HDR hdr;
RPC_HDR_BBA bba;
uint32 num_elements; /* the number of elements (0x1) */
@@ -638,7 +637,6 @@ typedef struct rpc_results_info
/* RPC_HDR_BA */
typedef struct rpc_hdr_ba_info
{
- RPC_HDR hdr;
RPC_HDR_BBA bba;
RPC_ADDR_STR addr ; /* the secondary address string, as described earlier */