r1135: - allow integer function numbers in ndrdump
authorAndrew Tridgell <tridge@samba.org>
Mon, 14 Jun 2004 08:07:26 +0000 (08:07 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:56:39 +0000 (12:56 -0500)
 - dump unused data in ndrdump

source/utils/ndrdump.c

index 3bced67422b081f93730a2cdd221686e4e6f4e74..1b480c6c4da3155c0452d22e2c85a6b466158f91 100644 (file)
@@ -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;