r15191: Avoid uint_t as it's not standard.
[ab/samba.git/.git] / source4 / libcli / raw / request.h
1 #ifndef _REQUEST_H
2 #define _REQUEST_H
3 /*
4    Unix SMB/CIFS implementation.
5    SMB parameters and setup
6    Copyright (C) Andrew Tridgell 2003
7    Copyright (C) James Myers 2003 <myersjj@samba.org>
8
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 2 of the License, or
12    (at your option) any later version.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software
21    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23
24 #include "libcli/raw/signing.h"
25
26 /*
27   Shared state structure between client and server, representing the basic packet.
28 */
29
30 struct request_buffer {
31         /* the raw SMB buffer, including the 4 byte length header */
32         uint8_t *buffer;
33         
34         /* the size of the raw buffer, including 4 byte header */
35         size_t size;
36         
37         /* how much has been allocated - on reply the buffer is over-allocated to 
38            prevent too many realloc() calls 
39         */
40         size_t allocated;
41         
42         /* the start of the SMB header - this is always buffer+4 */
43         uint8_t *hdr;
44         
45         /* the command words and command word count. vwv points
46            into the raw buffer */
47         uint8_t *vwv;
48         size_t wct;
49         
50         /* the data buffer and size. data points into the raw buffer */
51         uint8_t *data;
52         size_t data_size;
53         
54         /* ptr is used as a moving pointer into the data area
55          * of the packet. The reason its here and not a local
56          * variable in each function is that when a realloc of
57          * a send packet is done we need to move this
58          * pointer */
59         uint8_t *ptr;
60 };
61
62 #endif