netcam_ftp.h

来自「video motion detection of linux base」· C头文件 代码 · 共 45 行

H
45
字号
/** *      Much of the FTP routines was inspired by the nanoftp.c module from *      libxml2 (Copyright Daniel Veillard, 2003).  The routines have been *      modified to fit the needs of the Motion project. * *      Copyright 2005, William M. Brack *      This software is distributed under the GNU Public license Version 2. *      See also the file 'COPYING'. *       */#ifndef _INCLUDE_NETCAM_FTP_H#define _INCLUDE_NETCAM_FTP_H#define FTP_BUF_SIZE    1024typedef struct ftp_context {	char      *path;               /* the path within the URL */	char      *user;               /* user string */	char      *passwd;             /* passwd string */	struct    sockaddr_in ftp_address; /* the socket addr structure */	int       passive;             /* flag show passive/active mode used */	int       control_file_desc;   /* file descriptor for the control socket */	int       data_file_desc;      /* file descriptor for the data socket */	int       state;               /* WRITE / READ / CLOSED */	int       returnValue;         /* the protocol return value */	/* buffer for data received from the control connection */	char      control_buffer[FTP_BUF_SIZE + 1];	int       control_buffer_index;	int       control_buffer_used;	int       control_buffer_answer;} ftp_context, *ftp_context_pointer;/* The public interface */ftp_context_pointer ftp_new_context(void);void ftp_free_context(ftp_context_pointer);ftp_context_pointer ftpOpen(const char *);int ftp_connect(netcam_context_ptr);int ftp_send_type(ftp_context_pointer, const char);int ftp_get_socket(ftp_context_pointer);int ftp_read(ftp_context_pointer, void *, int);int ftp_close(ftp_context_pointer);#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?