diff options
Diffstat (limited to 'source3/rpc_parse/parse_prs.c')
-rw-r--r-- | source3/rpc_parse/parse_prs.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index d4a9ec3eda..63f9527dec 100644 --- a/source3/rpc_parse/parse_prs.c +++ b/source3/rpc_parse/parse_prs.c @@ -76,7 +76,7 @@ void prs_dump_region(char *name, int v, prs_struct *ps, XXXX side-effect of this function is to increase the debug depth XXXX ********************************************************************/ -void prs_debug(prs_struct *ps, int depth, const char *desc, char *fn_name) +void prs_debug(prs_struct *ps, int depth, const char *desc, const char *fn_name) { DEBUG(5+depth, ("%s%06x %s %s\n", tab_depth(depth), ps->data_offset, fn_name, desc)); } @@ -539,7 +539,7 @@ void prs_force_dynamic(prs_struct *ps) Stream a uint8. ********************************************************************/ -BOOL prs_uint8(char *name, prs_struct *ps, int depth, uint8 *data8) +BOOL prs_uint8(const char *name, prs_struct *ps, int depth, uint8 *data8) { char *q = prs_mem_get(ps, 1); if (q == NULL) @@ -561,7 +561,7 @@ BOOL prs_uint8(char *name, prs_struct *ps, int depth, uint8 *data8) Stream a uint16. ********************************************************************/ -BOOL prs_uint16(char *name, prs_struct *ps, int depth, uint16 *data16) +BOOL prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16) { char *q = prs_mem_get(ps, sizeof(uint16)); if (q == NULL) @@ -590,7 +590,7 @@ BOOL prs_uint16(char *name, prs_struct *ps, int depth, uint16 *data16) Stream a uint32. ********************************************************************/ -BOOL prs_uint32(char *name, prs_struct *ps, int depth, uint32 *data32) +BOOL prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32) { char *q = prs_mem_get(ps, sizeof(uint32)); if (q == NULL) @@ -619,7 +619,7 @@ BOOL prs_uint32(char *name, prs_struct *ps, int depth, uint32 *data32) Stream a NTSTATUS ********************************************************************/ -BOOL prs_ntstatus(char *name, prs_struct *ps, int depth, NTSTATUS *status) +BOOL prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS *status) { char *q = prs_mem_get(ps, sizeof(uint32)); if (q == NULL) @@ -649,7 +649,7 @@ BOOL prs_ntstatus(char *name, prs_struct *ps, int depth, NTSTATUS *status) Stream a WERROR ********************************************************************/ -BOOL prs_werror(char *name, prs_struct *ps, int depth, WERROR *status) +BOOL prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status) { char *q = prs_mem_get(ps, sizeof(uint32)); if (q == NULL) @@ -680,7 +680,7 @@ BOOL prs_werror(char *name, prs_struct *ps, int depth, WERROR *status) Stream an array of uint8s. Length is number of uint8s. ********************************************************************/ -BOOL prs_uint8s(BOOL charmode, char *name, prs_struct *ps, int depth, uint8 *data8s, int len) +BOOL prs_uint8s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint8 *data8s, int len) { int i; char *q = prs_mem_get(ps, len); @@ -713,7 +713,7 @@ BOOL prs_uint8s(BOOL charmode, char *name, prs_struct *ps, int depth, uint8 *dat Stream an array of uint16s. Length is number of uint16s. ********************************************************************/ -BOOL prs_uint16s(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *data16s, int len) +BOOL prs_uint16s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len) { int i; char *q = prs_mem_get(ps, len * sizeof(uint16)); @@ -757,7 +757,7 @@ BOOL prs_uint16s(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *d output must be little-endian, if marshalling, input must be little-endian. ********************************************************************/ -static void dbg_rw_punival(BOOL charmode, char *name, int depth, prs_struct *ps, +static void dbg_rw_punival(BOOL charmode, const char *name, int depth, prs_struct *ps, char *in_buf, char *out_buf, int len) { int i; @@ -794,7 +794,7 @@ static void dbg_rw_punival(BOOL charmode, char *name, int depth, prs_struct *ps, Stream a unistr. Always little endian. ********************************************************************/ -BOOL prs_uint16uni(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *data16s, int len) +BOOL prs_uint16uni(BOOL charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len) { char *q = prs_mem_get(ps, len * sizeof(uint16)); if (q == NULL) @@ -810,7 +810,7 @@ BOOL prs_uint16uni(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 Stream an array of uint32s. Length is number of uint32s. ********************************************************************/ -BOOL prs_uint32s(BOOL charmode, char *name, prs_struct *ps, int depth, uint32 *data32s, int len) +BOOL prs_uint32s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len) { int i; char *q = prs_mem_get(ps, len * sizeof(uint32)); @@ -854,7 +854,7 @@ BOOL prs_uint32s(BOOL charmode, char *name, prs_struct *ps, int depth, uint32 *d in uint16 chars. The unicode string is already in little-endian format. ********************************************************************/ -BOOL prs_buffer5(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER5 *str) +BOOL prs_buffer5(BOOL charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str) { char *p; char *q = prs_mem_get(ps, str->buf_len * sizeof(uint16)); @@ -885,7 +885,7 @@ BOOL prs_buffer5(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER5 * in byte chars. String is in little-endian format. ********************************************************************/ -BOOL prs_buffer2(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER2 *str) +BOOL prs_buffer2(BOOL charmode, const char *name, prs_struct *ps, int depth, BUFFER2 *str) { char *p; char *q = prs_mem_get(ps, str->buf_len); @@ -913,7 +913,7 @@ BOOL prs_buffer2(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER2 * in uint8 chars. ********************************************************************/ -BOOL prs_string2(BOOL charmode, char *name, prs_struct *ps, int depth, STRING2 *str) +BOOL prs_string2(BOOL charmode, const char *name, prs_struct *ps, int depth, STRING2 *str) { int i; char *q = prs_mem_get(ps, str->str_max_len); @@ -953,7 +953,7 @@ BOOL prs_string2(BOOL charmode, char *name, prs_struct *ps, int depth, STRING2 * in uint16 chars. The unicode string is already in little-endian format. ********************************************************************/ -BOOL prs_unistr2(BOOL charmode, char *name, prs_struct *ps, int depth, UNISTR2 *str) +BOOL prs_unistr2(BOOL charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str) { char *p; char *q = prs_mem_get(ps, str->uni_str_len * sizeof(uint16)); @@ -984,7 +984,7 @@ BOOL prs_unistr2(BOOL charmode, char *name, prs_struct *ps, int depth, UNISTR2 * in uint16 chars. The unicode string is already in little-endian format. ********************************************************************/ -BOOL prs_unistr3(BOOL charmode, char *name, UNISTR3 *str, prs_struct *ps, int depth) +BOOL prs_unistr3(BOOL charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth) { char *p; char *q = prs_mem_get(ps, str->uni_str_len * sizeof(uint16)); @@ -1010,7 +1010,7 @@ BOOL prs_unistr3(BOOL charmode, char *name, UNISTR3 *str, prs_struct *ps, int de in little-endian format then do it as a stream of bytes. ********************************************************************/ -BOOL prs_unistr(char *name, prs_struct *ps, int depth, UNISTR *str) +BOOL prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str) { int len = 0; unsigned char *p = (unsigned char *)str->buffer; @@ -1136,7 +1136,7 @@ BOOL prs_unistr(char *name, prs_struct *ps, int depth, UNISTR *str) not include the null-termination character. ********************************************************************/ -BOOL prs_string(char *name, prs_struct *ps, int depth, char *str, int len, int max_buf_size) +BOOL prs_string(const char *name, prs_struct *ps, int depth, char *str, int len, int max_buf_size) { char *q; int i; @@ -1173,7 +1173,7 @@ BOOL prs_string(char *name, prs_struct *ps, int depth, char *str, int len, int m uint16 should be stored, or gets the size if reading. ********************************************************************/ -BOOL prs_uint16_pre(char *name, prs_struct *ps, int depth, uint16 *data16, uint32 *offset) +BOOL prs_uint16_pre(const char *name, prs_struct *ps, int depth, uint16 *data16, uint32 *offset) { *offset = ps->data_offset; if (UNMARSHALLING(ps)) { @@ -1193,7 +1193,7 @@ BOOL prs_uint16_pre(char *name, prs_struct *ps, int depth, uint16 *data16, uint3 does nothing on reading, as that is already handled by ...._pre() ********************************************************************/ -BOOL prs_uint16_post(char *name, prs_struct *ps, int depth, uint16 *data16, +BOOL prs_uint16_post(const char *name, prs_struct *ps, int depth, uint16 *data16, uint32 ptr_uint16, uint32 start_offset) { if (MARSHALLING(ps)) { @@ -1220,7 +1220,7 @@ BOOL prs_uint16_post(char *name, prs_struct *ps, int depth, uint16 *data16, uint32 should be stored, or gets the size if reading. ********************************************************************/ -BOOL prs_uint32_pre(char *name, prs_struct *ps, int depth, uint32 *data32, uint32 *offset) +BOOL prs_uint32_pre(const char *name, prs_struct *ps, int depth, uint32 *data32, uint32 *offset) { *offset = ps->data_offset; if (UNMARSHALLING(ps) && (data32 != NULL)) { @@ -1237,7 +1237,7 @@ BOOL prs_uint32_pre(char *name, prs_struct *ps, int depth, uint32 *data32, uint3 does nothing on reading, as that is already handled by ...._pre() ********************************************************************/ -BOOL prs_uint32_post(char *name, prs_struct *ps, int depth, uint32 *data32, +BOOL prs_uint32_post(const char *name, prs_struct *ps, int depth, uint32 *data32, uint32 ptr_uint32, uint32 data_size) { if (MARSHALLING(ps)) { |