pop.h
资源名称:export.zip [点击查看]
上传用户:hepax88
上传日期:2007-01-03
资源大小:1101k
文件大小:2k
源码类别:
TCP/IP协议栈
开发平台:
Visual C++
- /*
- filename -- POP.H
- author -- Mike Stockett, WA7DYX
- additional hacking by Allen Gwinn, N5CKP
- */
- #ifndef TRUE
- #define TRUE 1
- #define FALSE 0
- #endif
- #define BUF_LEN 128
- #include <fcntl.h>
- /* ---------------- common server data structures ---------------- */
- /* POP server control block */
- struct pop_scb {
- FILE *network; /* Network stream for this connection */
- char state; /* server state */
- #define LSTN 0
- #define AUTH 1
- #define MBOX 2
- #define ITEM 3
- #define NEXT 4
- #define DONE 5
- char buf[BUF_LEN], /* input line buffer */
- count, /* line buffer length */
- username[64]; /* user/folder name */
- FILE *wf; /* work folder file pointer */
- int folder_len, /* number of msgs in current folder */
- msg_num; /* current msg number */
- long msg_len; /* length of current msg */
- int msg_status_size; /* size of the message status array */
- long curpos, /* current msg's position in file */
- folder_file_size, /* length of the current folder file, in bytes */
- nextpos; /* next msg's position in file */
- unsigned int folder_modified, /* mail folder contents modified flag */
- *msg_status; /* message status array pointer */
- };
- /* Response messages */
- static char count_rsp[] = "#%d messages in this foldern",
- error_rsp[] = "- ERROR: %sn",
- greeting_msg[] = "+ POP2 %sn",
- /* length_rsp[] = "=%ld bytes in this messagen", */
- length_rsp[] = "=%ld characters in Message #%dn",
- msg_line[] = "%sn",
- no_mail_rsp[] = "+ No mail, sorryn",
- no_more_rsp[] = "=%d No more messages in this foldern",
- signoff_msg[] = "+ Bye, thanks for callingn";
- /* ------------------------ end of header file ---------------------------- */