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
,
26 NTSTATUS
allow_new_trans(struct trans_state
*list
, uint64_t mid
);
27 void smb_request_done(struct smb_request
*req
);
28 const char *smb_fn_name(int type
);
29 void add_to_common_flags2(uint32_t v
);
30 void remove_from_common_flags2(uint32_t v
);
31 bool smb1_is_chain(const uint8_t *buf
);
32 bool smb1_walk_chain(const uint8_t *buf
,
33 bool (*fn
)(uint8_t cmd
,
34 uint8_t wct
, const uint16_t *vwv
,
35 uint16_t num_bytes
, const uint8_t *bytes
,
38 unsigned smb1_chain_length(const uint8_t *buf
);
39 bool smb1_parse_chain(TALLOC_CTX
*mem_ctx
, const uint8_t *buf
,
40 struct smbXsrv_connection
*xconn
,
41 bool encrypted
, uint32_t seqnum
,
42 struct smb_request
***reqs
, unsigned *num_reqs
);
43 bool req_is_in_chain(const struct smb_request
*req
);
44 bool fork_echo_handler(struct smbXsrv_connection
*xconn
);
45 NTSTATUS
smb1_receive_talloc(TALLOC_CTX
*mem_ctx
,
46 struct smbXsrv_connection
*xconn
,
48 char **buffer
, unsigned int timeout
,
49 size_t *p_unread
, bool *p_encrypted
,
52 bool trusted_channel
);
53 bool push_deferred_open_message_smb1(struct smb_request
*req
,
54 struct timeval timeout
,
56 struct deferred_open_record
*open_rec
);
57 void process_smb1(struct smbXsrv_connection
*xconn
,
63 void smbd_echo_init(struct smbXsrv_connection
*xconn
);
64 void construct_reply(struct smbXsrv_connection
*xconn
,
70 void smbd_smb1_server_connection_read_handler(struct smbXsrv_connection
*xconn
,
72 bool keepalive_fn(const struct timeval
*now
, void *private_data
);