2 Unix SMB/CIFS implementation.
3 process incoming packets - main loop
4 Copyright (C) Andrew Tridgell 1992-1998
5 Copyright (C) Volker Lendecke 2005-2007
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 bool smb1_srv_send(struct smbXsrv_connection
*xconn
, char *buffer
,
22 bool do_signing
, uint32_t seqnum
,
24 struct smb_perfcount_data
*pcd
);
25 NTSTATUS
allow_new_trans(struct trans_state
*list
, uint64_t mid
);
26 void smb_request_done(struct smb_request
*req
);
27 const char *smb_fn_name(int type
);
28 void add_to_common_flags2(uint32_t v
);
29 void remove_from_common_flags2(uint32_t v
);
30 bool smb1_is_chain(const uint8_t *buf
);
31 bool smb1_walk_chain(const uint8_t *buf
,
32 bool (*fn
)(uint8_t cmd
,
33 uint8_t wct
, const uint16_t *vwv
,
34 uint16_t num_bytes
, const uint8_t *bytes
,
37 unsigned smb1_chain_length(const uint8_t *buf
);
38 bool smb1_parse_chain(TALLOC_CTX
*mem_ctx
, const uint8_t *buf
,
39 struct smbXsrv_connection
*xconn
,
40 bool encrypted
, uint32_t seqnum
,
41 struct smb_request
***reqs
, unsigned *num_reqs
);
42 bool req_is_in_chain(const struct smb_request
*req
);
43 bool fork_echo_handler(struct smbXsrv_connection
*xconn
);
44 NTSTATUS
smb1_receive_talloc(TALLOC_CTX
*mem_ctx
,
45 struct smbXsrv_connection
*xconn
,
47 char **buffer
, unsigned int timeout
,
48 size_t *p_unread
, bool *p_encrypted
,
51 bool trusted_channel
);
52 bool push_deferred_open_message_smb1(struct smb_request
*req
,
53 struct timeval timeout
,
55 struct deferred_open_record
*open_rec
);
56 void process_smb1(struct smbXsrv_connection
*xconn
,
57 uint8_t *inbuf
, size_t nread
, size_t unread_bytes
,
58 uint32_t seqnum
, bool encrypted
,
59 struct smb_perfcount_data
*deferred_pcd
);
60 void smbd_echo_init(struct smbXsrv_connection
*xconn
);
61 void construct_reply(struct smbXsrv_connection
*xconn
,
62 char *inbuf
, int size
, size_t unread_bytes
,
63 uint32_t seqnum
, bool encrypted
,
64 struct smb_perfcount_data
*deferred_pcd
);
65 void smbd_smb1_server_connection_read_handler(struct smbXsrv_connection
*xconn
,
67 bool keepalive_fn(const struct timeval
*now
, void *private_data
);