summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-06-14 08:07:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:39 -0500
commit2fcf85920deb2bb3e564c7be611b2cec838afbf1 (patch)
treecc9f27959275b477069be774049d9b5323f8038f /source4
parent791ee4a58110fc25d5f66e0e21372c766e400bd0 (diff)
downloadsamba-2fcf85920deb2bb3e564c7be611b2cec838afbf1.tar.gz
samba-2fcf85920deb2bb3e564c7be611b2cec838afbf1.tar.bz2
samba-2fcf85920deb2bb3e564c7be611b2cec838afbf1.zip
r1135: - allow integer function numbers in ndrdump
- dump unused data in ndrdump (This used to be commit 65c5590bd0cd23c65a94786846740180c7f175ba)
Diffstat (limited to 'source4')
-rw-r--r--source4/utils/ndrdump.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/utils/ndrdump.c b/source4/utils/ndrdump.c
index 3bced67422..1b480c6c4d 100644
--- a/source4/utils/ndrdump.c
+++ b/source4/utils/ndrdump.c
@@ -40,6 +40,10 @@ static const struct dcerpc_interface_call *find_function(
const char *function)
{
int i;
+ if (isdigit(function[0])) {
+ i = strtol(function, NULL, 0);
+ return &p->calls[i];
+ }
for (i=0;i<p->num_calls;i++) {
if (strcmp(p->calls[i].name, function) == 0) {
break;
@@ -161,6 +165,7 @@ static void show_functions(const struct dcerpc_interface_table *p)
if (ndr->offset != ndr->data_size) {
printf("WARNING! %d unread bytes\n", ndr->data_size - ndr->offset);
+ dump_data(0, ndr->data+ndr->offset, ndr->data_size - ndr->offset);
}
pr.mem_ctx = mem_ctx;