summaryrefslogtreecommitdiff
path: root/source3/aparser/parser.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-05-14 14:05:10 +0000
committerAndrew Tridgell <tridge@samba.org>2000-05-14 14:05:10 +0000
commitb7022e94d2ab62d522b0a7c2886cce3afaff6872 (patch)
tree6663fe08efd72d9a95d9cf4cf70baa07ded15aca /source3/aparser/parser.h
parentb7f9a2794273266a0c64a6c02f88d65d37554ea9 (diff)
downloadsamba-b7022e94d2ab62d522b0a7c2886cce3afaff6872.tar.gz
samba-b7022e94d2ab62d522b0a7c2886cce3afaff6872.tar.bz2
samba-b7022e94d2ab62d522b0a7c2886cce3afaff6872.zip
vastly improved awk based code generator
now handles recursive function definitions, unions etc it is sufficient for some basic types like UNISTR2 and BUFFER5 to be defined in the *.struct file and used successfully this generator uses templates (in *.tpl files) for all code generation, allowing easy replacement of the backend functions (This used to be commit 14ded82dc92ae6eff7639351f391a33b9cc31c0d)
Diffstat (limited to 'source3/aparser/parser.h')
-rw-r--r--source3/aparser/parser.h36
1 files changed, 2 insertions, 34 deletions
diff --git a/source3/aparser/parser.h b/source3/aparser/parser.h
index 196aa6b855..ec3fc7edc2 100644
--- a/source3/aparser/parser.h
+++ b/source3/aparser/parser.h
@@ -32,39 +32,10 @@ typedef char pstring[1024];
/* zero a structure given a pointer to the structure */
#define ZERO_STRUCTP(x) { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); }
-typedef struct {
- uint32 low;
- uint32 high;
-} UINT64_S;
-
-typedef struct
-{
- uint32 low;
- uint32 high;
-} NTTIME;
-
#define MAX_UNISTRLEN 256
#define MAX_STRINGLEN 256
#define MAX_BUFFERLEN 512
-/* UNISTR2 - unicode string size (in uint16 unicode chars) and buffer */
-typedef struct unistr2_info
-{
- uint32 uni_max_len;
- uint32 undoc;
- uint32 uni_str_len;
- /* unicode characters. ***MUST*** be little-endian. **NOT** necessarily null-terminated */
- uint16 buffer[MAX_UNISTRLEN];
-
-} UNISTR2;
-
-/* BUFFER5 */
-typedef struct buffer5_info
-{
- uint32 buf_len;
- uint16 *buffer; /* data */
-} BUFFER5;
-
typedef struct _prs_struct
{
BOOL io; /* parsing in or out of data stream */
@@ -86,13 +57,10 @@ BOOL prs_uint32(char *name, prs_struct *ps, int depth, uint32 *data32);
BOOL prs_init(prs_struct *ps, uint32 size, uint8 align, BOOL io);
void prs_debug(prs_struct *ps, int depth, char *desc, char *fn_name);
BOOL prs_align(prs_struct *ps);
-BOOL smb_io_time(char *desc, NTTIME *nttime, prs_struct *ps, int depth);
-BOOL smb_io_unistr2(char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth);
-BOOL prs_unistr2(BOOL charmode, char *name, prs_struct *ps, int depth, UNISTR2 *str);
void print_asc(int level, unsigned char *buf,int len);
BOOL prs_read(prs_struct *ps, int fd, size_t len, int timeout);
void dump_data(int level,char *buf1,int len);
-BOOL prs_uint64(char *name, prs_struct *ps, int depth, UINT64_S *data64);
-BOOL smb_io_buffer5(char *desc, BUFFER5 *buf5, prs_struct *ps, int depth);
BOOL prs_uint16s(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
+BOOL prs_uint32s(BOOL charmode, char *name, prs_struct *ps, int depth, uint32 *data32s, int len);
+BOOL prs_pointer(char *desc, prs_struct *ps, int depth, void **p);