惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
MongoDB | Blog
MongoDB | Blog
Engineering at Meta
Engineering at Meta
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
T
The Exploit Database - CXSecurity.com
P
Privacy & Cybersecurity Law Blog
Know Your Adversary
Know Your Adversary
月光博客
月光博客
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
NISL@THU
NISL@THU
爱范儿
爱范儿
S
Securelist
博客园 - 叶小钗
C
CERT Recently Published Vulnerability Notes
Recorded Future
Recorded Future
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
aimingoo的专栏
aimingoo的专栏
D
DataBreaches.Net
G
GRAHAM CLULEY
P
Proofpoint News Feed
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tor Project blog
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
Hugging Face - Blog
Hugging Face - Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Recent Announcements
Recent Announcements
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
Jina AI
Jina AI
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
博客园 - 【当耐特】
H
Help Net Security
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss

博客园 - wolflion

《UNIX-Shell编程24学时教程》读书笔记Chap3,4 文件,目录操作 《UNIX-Shell编程24学时教程》读书笔记Chap1,2 Shell基础,脚本基础 《UNIX-Shell编程24学时教程》读书笔记chap7 变量 《软件调试的艺术》读书笔记 ubuntu环境准备 icmp的程序(ping的实现) cp命令 who命令 苦逼IT才能看懂的笑话 debug和release版区别 i5处理器的台式机[百度知道] 关于轮胎尺寸问题 常见内核数据结构.doc windows 系统编程 Chap7 线程和调度 EVRYTHNG.H Windows系统编程chap6 Windows系统编程 chap5 booklist 转 windows code
ftp的实现
wolflion · 2013-09-29 · via 博客园 - wolflion

ftp.h

#define BUFSIZE 512
#define CMDSIZE 64
#define ARGSIZE 64
#define PASSIVE_ON 0x1

struct ftpcmd{
char *alias;
char *name;
char *args;
int (*handler) (int fd, char *cmd, char *args);
};

typedef struct ftpcmd FTPCMD;

static void bail(const char*);
int send_ftpcmd(int, const char*, const char*);
char *get_localip(int, struct sockaddr_in *);
int active_listen();
int get_active_port();
int list_files(int);
int input_cmd(char *, int);
int check_ftpcmd(char *, char *);
int having_args(char *);
char *trim_right(char *);
int make_port_args(int, struct sockaddr_in *);
int download_file(char *, int);
int upload_file(FILE *, int);
void report(struct timeval *, struct timeval *, int);
int get_ftpcmd_status(int, char *);
int make_conn_active(int);
int make_conn_passive(int);
int passive_notify(int);
int active_notify(int);
void replace_delim(char *, char, char);
int parse_port(char *, int);
void init();
char *get_usrname();
void terminal_echo_off(int);
void terminal_echo_on(int);
void ignore_sigtstp();
void unignore_sigtstp();
int do_common_cmd(int, char*, char*);
int do_user(int, char*, char*);
int do_pasv(int, char*, char*);
int do_list_pasv(int, char*, char *);
int do_list_active(int, char *, char *);
int do_get_pasv(int, char *, char *);
int do_get_active(int, char *, char *);
int do_put_pasv(int, char*, char *);
int do_put_active(int, char*, char *);
int do_lchdir(int, char*, char *);
void abort_transfer(int);
void login(struct hostent *, int);
int print_final_msg(int, char *);