forward.c
资源名称:export.zip [点击查看]
上传用户:hepax88
上传日期:2007-01-03
资源大小:1101k
文件大小:23k
源码类别:
TCP/IP协议栈
开发平台:
Visual C++
- /* Some of the code in this file was originally based on the following file:
- * gateway.c : Paul Healy, EI9GL, 900818
- *
- * Rewrote forwarding mechanism to use "X-Forwarded-To" paradigm instead of
- * "X-BBS-To", added timer support, etc. Anders Klemets, SM0RGV, 901009.
- */
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
- #include <time.h>
- #include "global.h"
- #include "config.h"
- #include "bm.h"
- #include "mailbox.h"
- #include "smtp.h"
- #include "cmdparse.h"
- #include "proc.h"
- #include "socket.h"
- #include "timer.h"
- #include "usock.h"
- #include "netuser.h"
- #include "ax25.h"
- #include "netrom.h"
- #include "nr4.h"
- #include "files.h"
- #define ISPROMPT(s) (strlen(s) > 1 && s[strlen(s)-2] == '>')
- static struct timer fwdtimer;
- static char *findident(char *str, int n, char *result);
- static void sendmsg(struct mbx *m,int msgn);
- static char *mbxtime(char *line);
- static int fwdinit(struct mbx *m);
- static char *fwdanybbs(struct mbx *m);
- static int timeok(char *line);
- static void fwdtick(void *v);
- static int isconnbbs(struct mbx *m);
- static void startfwd(int a,void *v1,void *v2);
- static int openconn(int argc,char *argv[],void *p);
- static int sendmsgtobbs(struct mbx *m,int msgn,char *dest,int bulletin);
- static int makecl(struct mbx *m,int msgn,char *dest,char *line,char *subj,int bulletin);
- static char *grabtext(char *from,char *to,int marker);
- /***************************************************************************
- findident copies the 'n'th alphanumeric sequence from 'str' to result.
- It returns a ptr to result. It returns "