source: src/router/proftpd/include/data.h @ 12685

Last change on this file since 12685 was 12685, checked in by BrainSlayer, 4 years ago

new version

File size: 2.3 KB
Line 
1/*
2 * ProFTPD - FTP server daemon
3 * Copyright (c) 1997, 1998 Public Flood Software
4 * Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver@tos.net>
5 * Copyright (c) 2001-2008 The ProFTPD Project team
6 *
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 2 of the License, or
10 * (at your option) any later version.
11 *
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.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
20 *
21 * As a special exemption, Public Flood Software/MacGyver aka Habeeb J. Dihu
22 * and other respective copyright holders give permission to link this program
23 * with OpenSSL, and distribute the resulting executable, without including
24 * the source code for OpenSSL in the source distribution.
25 */
26
27/* Data connection management prototypes
28 * $Id: data.h,v 1.21 2008/10/28 17:19:03 castaglia Exp $
29 */
30
31#ifndef PR_DATACONN_H
32#define PR_DATACONN_H
33
34void pr_data_init(char *, int);
35void pr_data_cleanup(void);
36int pr_data_open(char *, char *, int, off_t);
37void pr_data_close(int);
38void pr_data_abort(int, int);
39int pr_data_xfer(char *, int);
40void pr_data_reset(void);
41void pr_data_set_linger(long);
42
43/* Clear the session.xfer.p pool, if present, and reset any associated
44 * state.
45 */
46void pr_data_clear_xfer_pool(void);
47
48int pr_data_get_timeout(int);
49void pr_data_set_timeout(int, int);
50#define PR_DATA_TIMEOUT_IDLE                    0x001
51#define PR_DATA_TIMEOUT_NO_TRANSFER             0x002
52#define PR_DATA_TIMEOUT_STALLED                 0x004
53
54#ifdef HAVE_SENDFILE
55typedef
56
57#if defined(HAVE_AIX_SENDFILE) || defined(HAVE_HPUX_SENDFILE) || \
58    defined(HAVE_LINUX_SENDFILE) || defined(HAVE_SOLARIS_SENDFILE)
59ssize_t
60#elif defined(HAVE_BSD_SENDFILE) || defined(HAVE_MACOSX_SENDFILE)
61off_t
62#else
63#error "You have an unknown sendfile implementation."
64#endif
65
66pr_sendfile_t;
67
68pr_sendfile_t pr_data_sendfile(int retr_fd, off_t *offset, off_t count);
69#endif /* HAVE_SENDFILE */
70
71#endif /* PR_DATACONN_H */
Note: See TracBrowser for help on using the repository browser.