o Move alias function pointers into loadalias.c
o Move Var*Version into command.c o Remove struct pppVars (and there was much rejoicing) ! o Forward-decl some structs in .h files to avoid include ordering requirements and remove a few more redundant #includes.
This commit is contained in:
parent
d24f017be8
commit
2764b86afd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/branches/MP/; revision=35089
@ -2,10 +2,10 @@
|
||||
* The code in this file was written by Eivind Eklund <perhaps@yes.no>,
|
||||
* who places it in the public domain without restriction.
|
||||
*
|
||||
* $Id: alias_cmd.c,v 1.12.2.3 1998/04/03 19:25:20 brian Exp $
|
||||
* $Id: alias_cmd.c,v 1.12.2.4 1998/04/06 09:12:21 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
@ -19,7 +19,6 @@
|
||||
#include "command.h"
|
||||
#include "log.h"
|
||||
#include "loadalias.h"
|
||||
#include "vars.h"
|
||||
#include "alias_cmd.h"
|
||||
#include "descriptor.h"
|
||||
#include "prompt.h"
|
||||
@ -76,7 +75,7 @@ AliasRedirectPort(struct cmdargs const *arg)
|
||||
}
|
||||
null_addr.s_addr = INADDR_ANY;
|
||||
|
||||
link = VarPacketAliasRedirectPort(local_addr, local_port,
|
||||
link = (*PacketAlias.RedirectPort)(local_addr, local_port,
|
||||
null_addr, 0,
|
||||
null_addr, alias_port,
|
||||
proto_constant);
|
||||
@ -115,7 +114,7 @@ AliasRedirectAddr(struct cmdargs const *arg)
|
||||
arg->cmd->syntax);
|
||||
return 1;
|
||||
}
|
||||
link = VarPacketAliasRedirectAddr(local_addr, alias_addr);
|
||||
link = (*PacketAlias.RedirectAddr)(local_addr, alias_addr);
|
||||
if (link == NULL) {
|
||||
prompt_Printf(arg->prompt, "address redirect: packet aliasing"
|
||||
" engine error\n");
|
||||
|
@ -2,8 +2,10 @@
|
||||
* The code in this file was written by Eivind Eklund <perhaps@yes.no>,
|
||||
* who places it in the public domain without restriction.
|
||||
*
|
||||
* $Id: alias_cmd.h,v 1.6 1997/12/21 14:28:24 brian Exp $
|
||||
* $Id: alias_cmd.h,v 1.7 1997/12/24 10:28:38 brian Exp $
|
||||
*/
|
||||
|
||||
struct cmdargs;
|
||||
|
||||
extern int AliasRedirectPort(struct cmdargs const *);
|
||||
extern int AliasRedirectAddr(struct cmdargs const *);
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: arp.c,v 1.27.2.10 1998/04/03 19:21:04 brian Exp $
|
||||
* $Id: arp.c,v 1.27.2.11 1998/04/06 09:12:22 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* TODO:
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#include <net/route.h>
|
||||
@ -43,7 +43,6 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "id.h"
|
||||
|
@ -17,9 +17,11 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: arp.h,v 1.7.2.3 1998/02/08 11:04:38 brian Exp $
|
||||
* $Id: arp.h,v 1.7.2.4 1998/02/21 01:44:56 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
struct bundle;
|
||||
|
||||
extern int cifproxyarp(struct bundle *, struct in_addr, int);
|
||||
extern int sifproxyarp(struct bundle *, struct in_addr, int);
|
||||
|
@ -17,14 +17,14 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: async.c,v 1.15.2.9 1998/04/03 19:21:05 brian Exp $
|
||||
* $Id: async.c,v 1.15.2.10 1998/04/06 09:12:22 brian Exp $
|
||||
*
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "defs.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: async.h,v 1.2.4.5 1998/02/08 11:04:42 brian Exp $
|
||||
* $Id: async.h,v 1.2.4.6 1998/02/18 19:35:09 brian Exp $
|
||||
*/
|
||||
|
||||
#define HDLCSIZE (MAX_MRU*2+6)
|
||||
@ -41,6 +41,11 @@ struct async {
|
||||
} cfg;
|
||||
};
|
||||
|
||||
struct lcp;
|
||||
struct mbuf;
|
||||
struct physical;
|
||||
struct bundle;
|
||||
|
||||
extern void async_Init(struct async *);
|
||||
extern void async_SetLinkParams(struct async *, struct lcp *);
|
||||
extern void async_Output(int, struct mbuf *, int, struct physical *);
|
||||
|
@ -17,12 +17,12 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: auth.c,v 1.27.2.18 1998/04/03 19:25:21 brian Exp $
|
||||
* $Id: auth.c,v 1.27.2.19 1998/04/06 09:12:22 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Implement check against with registered IP addresses.
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
@ -32,7 +32,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "defs.h"
|
||||
#include "timer.h"
|
||||
@ -41,7 +40,6 @@
|
||||
#include "throughput.h"
|
||||
#include "slcompress.h"
|
||||
#include "ipcp.h"
|
||||
#include "loadalias.h"
|
||||
#include "vars.h"
|
||||
#include "auth.h"
|
||||
#include "systems.h"
|
||||
|
@ -15,12 +15,13 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: auth.h,v 1.10.2.5 1998/04/03 19:23:52 brian Exp $
|
||||
* $Id: auth.h,v 1.10.2.6 1998/04/03 19:25:21 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
|
||||
struct physical;
|
||||
struct bundle;
|
||||
|
||||
struct authinfo {
|
||||
void (*ChallengeFunc)(struct authinfo *, int, struct physical *);
|
||||
|
@ -23,10 +23,10 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bundle.c,v 1.1.2.39 1998/04/05 22:48:00 brian Exp $
|
||||
* $Id: bundle.c,v 1.1.2.40 1998/04/06 09:12:23 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <net/if.h>
|
||||
|
@ -17,12 +17,12 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ccp.c,v 1.30.2.31 1998/04/03 19:25:24 brian Exp $
|
||||
* $Id: ccp.c,v 1.30.2.32 1998/04/06 09:12:23 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Support other compression protocols
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
@ -40,7 +40,6 @@
|
||||
#include "lcpproto.h"
|
||||
#include "lcp.h"
|
||||
#include "ccp.h"
|
||||
#include "loadalias.h"
|
||||
#include "vars.h"
|
||||
#include "pred.h"
|
||||
#include "deflate.h"
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ccp.h,v 1.14.2.14 1998/04/03 19:21:09 brian Exp $
|
||||
* $Id: ccp.h,v 1.14.2.15 1998/04/03 19:23:54 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -35,6 +35,8 @@
|
||||
#define TY_PPPD_DEFLATE 24 /* Deflate (gzip) - (mis) numbered by pppd */
|
||||
#define TY_DEFLATE 26 /* Deflate (gzip) - rfc 1979 */
|
||||
|
||||
struct mbuf;
|
||||
|
||||
struct ccp_config {
|
||||
struct {
|
||||
struct {
|
||||
|
@ -17,11 +17,11 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: chap.c,v 1.28.2.21 1998/04/03 19:26:18 brian Exp $
|
||||
* $Id: chap.c,v 1.28.2.22 1998/04/06 09:12:24 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
@ -35,7 +35,6 @@
|
||||
#else
|
||||
#endif
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "defs.h"
|
||||
|
@ -15,12 +15,14 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: chap.h,v 1.9.2.3 1998/03/01 01:07:41 brian Exp $
|
||||
* $Id: chap.h,v 1.9.2.4 1998/04/03 19:26:18 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
|
||||
struct mbuf;
|
||||
struct physical;
|
||||
struct bundle;
|
||||
|
||||
#define CHAP_CHALLENGE 1
|
||||
#define CHAP_RESPONSE 2
|
||||
|
@ -23,16 +23,17 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: chat.c,v 1.44.2.19 1998/04/03 19:24:43 brian Exp $
|
||||
* $Id: chat.c,v 1.44.2.20 1998/04/06 09:12:24 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -40,7 +41,6 @@
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "defs.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: chat.h,v 1.9.2.5 1998/03/09 19:25:34 brian Exp $
|
||||
* $Id: chat.h,v 1.9.2.6 1998/03/13 21:08:00 brian Exp $
|
||||
*/
|
||||
|
||||
#define CHAT_EXPECT 0
|
||||
@ -33,6 +33,8 @@
|
||||
|
||||
#define MAXABORTS 50
|
||||
|
||||
struct physical;
|
||||
|
||||
struct chat {
|
||||
struct descriptor desc;
|
||||
struct physical *physical;
|
||||
|
@ -17,10 +17,10 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: command.c,v 1.131.2.53 1998/04/05 22:48:08 brian Exp $
|
||||
* $Id: command.c,v 1.131.2.54 1998/04/06 09:12:25 brian Exp $
|
||||
*
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
@ -35,6 +35,7 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <paths.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -486,6 +487,9 @@ ShowAuthKey(struct cmdargs const *arg)
|
||||
static int
|
||||
ShowVersion(struct cmdargs const *arg)
|
||||
{
|
||||
static char VarVersion[] = "PPP Version 2.0-beta";
|
||||
static char VarLocalVersion[] = "$Date: 1998/04/06 09:12:38 $";
|
||||
|
||||
prompt_Printf(arg->prompt, "%s - %s \n", VarVersion, VarLocalVersion);
|
||||
return 0;
|
||||
}
|
||||
@ -1580,7 +1584,7 @@ AliasEnable(struct cmdargs const *arg)
|
||||
if (arg->argc == 1)
|
||||
if (strcasecmp(arg->argv[0], "yes") == 0) {
|
||||
if (!(mode & MODE_ALIAS)) {
|
||||
if (loadAliasHandlers(&VarAliasHandlers) == 0) {
|
||||
if (loadAliasHandlers() == 0) {
|
||||
mode |= MODE_ALIAS;
|
||||
return 0;
|
||||
}
|
||||
@ -1606,13 +1610,13 @@ AliasOption(struct cmdargs const *arg)
|
||||
if (arg->argc == 1)
|
||||
if (strcasecmp(arg->argv[0], "yes") == 0) {
|
||||
if (mode & MODE_ALIAS) {
|
||||
VarPacketAliasSetMode(param, param);
|
||||
(*PacketAlias.SetMode)(param, param);
|
||||
return 0;
|
||||
}
|
||||
LogPrintf(LogWARN, "alias not enabled\n");
|
||||
} else if (strcmp(arg->argv[0], "no") == 0) {
|
||||
if (mode & MODE_ALIAS) {
|
||||
VarPacketAliasSetMode(0, param);
|
||||
(*PacketAlias.SetMode)(0, param);
|
||||
return 0;
|
||||
}
|
||||
LogPrintf(LogWARN, "alias not enabled\n");
|
||||
|
@ -15,12 +15,15 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: command.h,v 1.12.2.7 1998/04/03 19:23:55 brian Exp $
|
||||
* $Id: command.h,v 1.12.2.8 1998/04/03 19:25:26 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
|
||||
struct cmdtab;
|
||||
struct bundle;
|
||||
struct datalink;
|
||||
struct prompt;
|
||||
|
||||
struct cmdargs {
|
||||
struct cmdtab const *cmdtab; /* The entire command table */
|
||||
@ -63,9 +66,6 @@ struct cmdtab {
|
||||
#define VAR_CCPRETRY 18
|
||||
#define VAR_IPCPRETRY 19
|
||||
|
||||
extern struct in_addr ifnetmask;
|
||||
extern int aft_cmd;
|
||||
|
||||
extern int IsInteractive(struct prompt *);
|
||||
extern void InterpretCommand(char *, int, int *, char ***);
|
||||
extern void RunCommand(struct bundle *, int, char const *const *,
|
||||
|
@ -23,10 +23,10 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: datalink.c,v 1.1.2.33 1998/04/05 22:48:12 brian Exp $
|
||||
* $Id: datalink.c,v 1.1.2.34 1998/04/06 09:12:26 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
@ -36,7 +36,6 @@
|
||||
#include <string.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "defs.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: datalink.h,v 1.1.2.14 1998/04/03 19:25:28 brian Exp $
|
||||
* $Id: datalink.h,v 1.1.2.15 1998/04/05 22:48:14 brian Exp $
|
||||
*/
|
||||
|
||||
#define DATALINK_CLOSED (0)
|
||||
@ -36,6 +36,10 @@
|
||||
#define DATALINK_AUTH (7)
|
||||
#define DATALINK_OPEN (8)
|
||||
|
||||
struct prompt;
|
||||
struct physical;
|
||||
struct bundle;
|
||||
|
||||
struct datalink {
|
||||
struct descriptor desc; /* We play either a physical or a chat */
|
||||
int state; /* Our DATALINK_* state */
|
||||
@ -94,8 +98,6 @@ struct datalink {
|
||||
#define descriptor2datalink(d) \
|
||||
((d)->type == DATALINK_DESCRIPTOR ? (struct datalink *)(d) : NULL)
|
||||
|
||||
struct prompt;
|
||||
|
||||
extern struct datalink *datalink_Create(const char *name, struct bundle *,
|
||||
const struct fsm_parent *);
|
||||
extern struct datalink *datalink_Clone(struct datalink *, const char *);
|
||||
|
@ -23,20 +23,17 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: deflate.c,v 1.6.4.8 1998/03/17 22:29:08 brian Exp $
|
||||
* $Id: deflate.c,v 1.6.4.9 1998/04/06 09:12:26 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "loadalias.h"
|
||||
#include "vars.h"
|
||||
#include "timer.h"
|
||||
#include "lqr.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: descriptor.h,v 1.1.2.7 1998/02/23 00:38:28 brian Exp $
|
||||
* $Id: descriptor.h,v 1.1.2.8 1998/03/20 19:47:56 brian Exp $
|
||||
*/
|
||||
|
||||
#define PHYSICAL_DESCRIPTOR (1)
|
||||
@ -33,6 +33,8 @@
|
||||
#define DATALINK_DESCRIPTOR (5)
|
||||
#define BUNDLE_DESCRIPTOR (6)
|
||||
|
||||
struct bundle;
|
||||
|
||||
struct descriptor {
|
||||
int type;
|
||||
struct descriptor *next;
|
||||
|
@ -17,12 +17,12 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: filter.c,v 1.22.2.12 1998/04/03 19:25:30 brian Exp $
|
||||
* $Id: filter.c,v 1.22.2.13 1998/04/06 09:12:27 brian Exp $
|
||||
*
|
||||
* TODO: Shoud send ICMP error message when we discard packets.
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: filter.h,v 1.11.2.2 1998/03/16 22:52:07 brian Exp $
|
||||
* $Id: filter.h,v 1.11.2.3 1998/04/03 19:25:01 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -78,6 +78,9 @@ struct filter {
|
||||
#define FL_DIAL 2
|
||||
#define FL_KEEP 3
|
||||
|
||||
struct ipcp;
|
||||
struct cmdargs;
|
||||
|
||||
extern int ParseAddr(struct ipcp *, int, char const *const *, struct in_addr *,
|
||||
struct in_addr *, int *);
|
||||
extern int ShowFilter(struct cmdargs const *);
|
||||
|
@ -17,19 +17,17 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: fsm.c,v 1.27.2.25 1998/04/03 19:21:20 brian Exp $
|
||||
* $Id: fsm.c,v 1.27.2.26 1998/04/06 09:12:27 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Refer loglevel for log output
|
||||
* o Better option log display
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "defs.h"
|
||||
@ -40,7 +38,6 @@
|
||||
#include "lcpproto.h"
|
||||
#include "lcp.h"
|
||||
#include "ccp.h"
|
||||
#include "loadalias.h"
|
||||
#include "vars.h"
|
||||
#include "throughput.h"
|
||||
#include "async.h"
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: fsm.h,v 1.16.2.12 1998/03/24 18:46:59 brian Exp $
|
||||
* $Id: fsm.h,v 1.16.2.13 1998/04/03 19:21:21 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -76,6 +76,9 @@ struct fsm_parent {
|
||||
void *object;
|
||||
};
|
||||
|
||||
struct link;
|
||||
struct bundle;
|
||||
|
||||
struct fsm {
|
||||
const char *name; /* Name of protocol */
|
||||
u_short proto; /* Protocol number */
|
||||
|
@ -17,11 +17,11 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: hdlc.c,v 1.28.2.23 1998/04/03 19:25:32 brian Exp $
|
||||
* $Id: hdlc.c,v 1.28.2.24 1998/04/06 09:12:28 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: hdlc.h,v 1.14.2.8 1998/04/03 19:21:23 brian Exp $
|
||||
* $Id: hdlc.h,v 1.14.2.9 1998/04/05 22:48:19 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -58,6 +58,10 @@
|
||||
|
||||
struct physical;
|
||||
struct link;
|
||||
struct lcp;
|
||||
struct bundle;
|
||||
struct mbuf;
|
||||
struct cmdargs;
|
||||
|
||||
struct hdlc {
|
||||
struct pppTimer ReportTimer;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: id.c,v 1.6.4.2 1998/02/19 02:08:44 brian Exp $
|
||||
* $Id: id.c,v 1.6.4.3 1998/04/06 09:12:28 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -41,7 +41,6 @@
|
||||
#endif
|
||||
#include <utmp.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "log.h"
|
||||
#include "main.h"
|
||||
#include "id.h"
|
||||
|
@ -17,13 +17,13 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ip.c,v 1.38.2.18 1998/04/03 19:25:02 brian Exp $
|
||||
* $Id: ip.c,v 1.38.2.19 1998/04/06 09:12:29 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Return ICMP message for filterd packet
|
||||
* and optionaly record it into log.
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
@ -41,7 +41,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "defs.h"
|
||||
@ -50,7 +49,6 @@
|
||||
#include "lqr.h"
|
||||
#include "hdlc.h"
|
||||
#include "loadalias.h"
|
||||
#include "vars.h"
|
||||
#include "throughput.h"
|
||||
#include "iplist.h"
|
||||
#include "slcompress.h"
|
||||
@ -374,7 +372,7 @@ IpInput(struct bundle *bundle, struct mbuf * bp)
|
||||
int iresult;
|
||||
char *fptr;
|
||||
|
||||
iresult = VarPacketAliasIn(tun.data, sizeof tun.data);
|
||||
iresult = (*PacketAlias.In)(tun.data, sizeof tun.data);
|
||||
nb = ntohs(((struct ip *) tun.data)->ip_len);
|
||||
|
||||
if (nb > MAX_MRU) {
|
||||
@ -405,8 +403,8 @@ IpInput(struct bundle *bundle, struct mbuf * bp)
|
||||
LogPrintf(LogERROR, "IpInput: wrote %d, got %d\n", nb, nw);
|
||||
|
||||
if (iresult == PKT_ALIAS_FOUND_HEADER_FRAGMENT) {
|
||||
while ((fptr = VarPacketAliasGetFragment(tun.data)) != NULL) {
|
||||
VarPacketAliasFragmentIn(tun.data, fptr);
|
||||
while ((fptr = (*PacketAlias.GetFragment)(tun.data)) != NULL) {
|
||||
(*PacketAlias.FragmentIn)(tun.data, fptr);
|
||||
nb = ntohs(((struct ip *) fptr)->ip_len);
|
||||
frag = (struct tun_data *)
|
||||
((char *)fptr - sizeof tun + sizeof tun.data);
|
||||
@ -430,7 +428,7 @@ IpInput(struct bundle *bundle, struct mbuf * bp)
|
||||
else {
|
||||
tun_fill_header(*frag, AF_INET);
|
||||
memcpy(frag->data, tun.data, nb - sizeof tun + sizeof tun.data);
|
||||
VarPacketAliasSaveFragment(frag->data);
|
||||
(*PacketAlias.SaveFragment)(frag->data);
|
||||
}
|
||||
}
|
||||
} else
|
||||
|
@ -17,11 +17,14 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ip.h,v 1.8.2.6 1998/03/16 22:52:18 brian Exp $
|
||||
* $Id: ip.h,v 1.8.2.7 1998/04/03 19:21:26 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
struct mbuf;
|
||||
struct filter;
|
||||
struct link;
|
||||
struct bundle;
|
||||
|
||||
extern int IpFlushPacket(struct link *, struct bundle *);
|
||||
extern int PacketCheck(struct bundle *, char *, int, struct filter *);
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ipcp.c,v 1.50.2.31 1998/04/03 19:25:33 brian Exp $
|
||||
* $Id: ipcp.c,v 1.50.2.32 1998/04/06 09:12:29 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o More RFC1772 backwoard compatibility
|
||||
@ -560,7 +560,7 @@ IpcpLayerUp(struct fsm *fp)
|
||||
|
||||
#ifndef NOALIAS
|
||||
if (mode & MODE_ALIAS)
|
||||
VarPacketAliasSetAddress(ipcp->my_ip);
|
||||
(*PacketAlias.SetAddress)(ipcp->my_ip);
|
||||
#endif
|
||||
|
||||
LogPrintf(LogIsKept(LogLINK) ? LogLINK : LogIPCP, "IpcpLayerUp: %s\n",
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ipcp.h,v 1.18.2.18 1998/04/03 19:24:00 brian Exp $
|
||||
* $Id: ipcp.h,v 1.18.2.19 1998/04/05 19:02:42 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -86,6 +86,10 @@ struct ipcp {
|
||||
|
||||
#define fsm2ipcp(fp) (fp->proto == PROTO_IPCP ? (struct ipcp *)fp : NULL)
|
||||
|
||||
struct bundle;
|
||||
struct link;
|
||||
struct cmdargs;
|
||||
|
||||
extern void ipcp_Init(struct ipcp *, struct bundle *, struct link *l,
|
||||
const struct fsm_parent *);
|
||||
extern void ipcp_Setup(struct ipcp *);
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: iplist.c,v 1.4 1997/12/24 09:29:03 brian Exp $
|
||||
* $Id: iplist.c,v 1.4.4.1 1998/04/06 09:12:30 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -33,7 +33,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "log.h"
|
||||
#include "defs.h"
|
||||
#include "iplist.h"
|
||||
|
@ -17,13 +17,11 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: lcp.c,v 1.55.2.39 1998/04/05 19:02:46 brian Exp $
|
||||
* $Id: lcp.c,v 1.55.2.40 1998/04/06 09:12:30 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Limit data field length by MRU
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
@ -44,7 +42,6 @@
|
||||
#include "lqr.h"
|
||||
#include "hdlc.h"
|
||||
#include "ccp.h"
|
||||
#include "loadalias.h"
|
||||
#include "vars.h"
|
||||
#include "async.h"
|
||||
#include "link.h"
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: lcp.h,v 1.16.2.17 1998/04/03 19:24:03 brian Exp $
|
||||
* $Id: lcp.h,v 1.16.2.18 1998/04/05 19:02:49 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -86,7 +86,11 @@ struct lcp_opt {
|
||||
(o) = (struct lcp_opt *)((char *)(o) + (length)); \
|
||||
} while (0)
|
||||
|
||||
struct mbuf;
|
||||
struct link;
|
||||
struct physical;
|
||||
struct bundle;
|
||||
struct cmdargs;
|
||||
|
||||
#define fsm2lcp(fp) (fp->proto == PROTO_LCP ? (struct lcp *)fp : NULL)
|
||||
|
||||
|
@ -23,16 +23,15 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: link.c,v 1.1.2.16 1998/04/03 19:25:36 brian Exp $
|
||||
* $Id: link.c,v 1.1.2.17 1998/04/06 09:12:31 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "timer.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: loadalias.c,v 1.14 1998/01/19 22:59:57 brian Exp $
|
||||
* $Id: loadalias.c,v 1.14.2.1 1998/04/06 09:12:31 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -36,16 +36,14 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "log.h"
|
||||
#include "id.h"
|
||||
#include "loadalias.h"
|
||||
#include "vars.h"
|
||||
|
||||
#define _PATH_ALIAS_PREFIX "/usr/lib/libalias.so.2."
|
||||
|
||||
#define off(item) ((int)&(((struct aliasHandlers *)0)->item))
|
||||
#define entry(a) { off(a), "_" #a }
|
||||
#define entry(a) { off(a), "_PacketAlias" #a }
|
||||
|
||||
#ifndef RTLD_NOW
|
||||
#define RTLD_NOW 1 /* really RTLD_LAZY */
|
||||
@ -55,28 +53,31 @@ static struct {
|
||||
int offset;
|
||||
const char *name;
|
||||
} map[] = {
|
||||
entry(PacketAliasGetFragment),
|
||||
entry(PacketAliasInit),
|
||||
entry(PacketAliasIn),
|
||||
entry(PacketAliasOut),
|
||||
entry(PacketAliasRedirectAddr),
|
||||
entry(PacketAliasRedirectPort),
|
||||
entry(PacketAliasSaveFragment),
|
||||
entry(PacketAliasSetAddress),
|
||||
entry(PacketAliasSetMode),
|
||||
entry(PacketAliasFragmentIn),
|
||||
entry(GetFragment),
|
||||
entry(Init),
|
||||
entry(In),
|
||||
entry(Out),
|
||||
entry(RedirectAddr),
|
||||
entry(RedirectPort),
|
||||
entry(SaveFragment),
|
||||
entry(SetAddress),
|
||||
entry(SetMode),
|
||||
entry(FragmentIn),
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static void *dl;
|
||||
struct aliasHandlers PacketAlias;
|
||||
|
||||
int
|
||||
loadAliasHandlers(struct aliasHandlers * h)
|
||||
loadAliasHandlers()
|
||||
{
|
||||
const char *path;
|
||||
const char *env;
|
||||
int i;
|
||||
|
||||
if (PacketAlias.dl)
|
||||
return 0;
|
||||
|
||||
path = _PATH_ALIAS_PREFIX;
|
||||
env = getenv("_PATH_ALIAS_PREFIX");
|
||||
if (env)
|
||||
@ -86,8 +87,8 @@ loadAliasHandlers(struct aliasHandlers * h)
|
||||
LogPrintf(LogALERT, "Ignoring environment _PATH_ALIAS_PREFIX"
|
||||
" value (%s)\n", env);
|
||||
|
||||
dl = dlopen(path, RTLD_NOW);
|
||||
if (dl == (void *) 0) {
|
||||
PacketAlias.dl = dlopen(path, RTLD_NOW);
|
||||
if (PacketAlias.dl == (void *) 0) {
|
||||
/* Look for _PATH_ALIAS_PREFIX with any number appended */
|
||||
int plen;
|
||||
|
||||
@ -129,28 +130,28 @@ loadAliasHandlers(struct aliasHandlers * h)
|
||||
|
||||
if (maxver > -1) {
|
||||
sprintf(p + plen, "%ld", maxver);
|
||||
dl = dlopen(p, RTLD_NOW);
|
||||
PacketAlias.dl = dlopen(p, RTLD_NOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dl == (void *) 0) {
|
||||
if (PacketAlias.dl == (void *) 0) {
|
||||
LogPrintf(LogWARN, "_PATH_ALIAS_PREFIX (%s*): Invalid lib: %s\n",
|
||||
path, dlerror());
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
for (i = 0; map[i].name; i++) {
|
||||
*(void **) ((char *) h + map[i].offset) = dlsym(dl, map[i].name);
|
||||
if (*(void **) ((char *) h + map[i].offset) == (void *) 0) {
|
||||
*(void **)((char *)&PacketAlias + map[i].offset) =
|
||||
dlsym(PacketAlias.dl, map[i].name);
|
||||
if (*(void **)((char *)&PacketAlias + map[i].offset) == (void *)0) {
|
||||
LogPrintf(LogWARN, "_PATH_ALIAS (%s*): %s: %s\n", path,
|
||||
map[i].name, dlerror());
|
||||
(void) dlclose(dl);
|
||||
dl = (void *) 0;
|
||||
unloadAliasHandlers();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
VarPacketAliasInit();
|
||||
(*PacketAlias.Init)();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -158,8 +159,8 @@ loadAliasHandlers(struct aliasHandlers * h)
|
||||
void
|
||||
unloadAliasHandlers()
|
||||
{
|
||||
if (dl) {
|
||||
dlclose(dl);
|
||||
dl = (void *) 0;
|
||||
if (PacketAlias.dl) {
|
||||
dlclose(PacketAlias.dl);
|
||||
memset(&PacketAlias, '\0', sizeof PacketAlias);
|
||||
}
|
||||
}
|
||||
|
@ -23,23 +23,26 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: loadalias.h,v 1.4 1997/12/21 12:11:06 brian Exp $
|
||||
*/
|
||||
|
||||
struct aliasHandlers {
|
||||
char *(*PacketAliasGetFragment)(char *);
|
||||
void (*PacketAliasInit)(void);
|
||||
int (*PacketAliasIn)(char *, int);
|
||||
int (*PacketAliasOut)(char *, int);
|
||||
struct alias_link *(*PacketAliasRedirectAddr)(struct in_addr, struct in_addr);
|
||||
struct alias_link *(*PacketAliasRedirectPort)
|
||||
(struct in_addr, u_short, struct in_addr, u_short,
|
||||
struct in_addr, u_short, u_char);
|
||||
int (*PacketAliasSaveFragment)(char *);
|
||||
void (*PacketAliasSetAddress)(struct in_addr);
|
||||
unsigned (*PacketAliasSetMode)(unsigned, unsigned);
|
||||
void (*PacketAliasFragmentIn)(char *, char *);
|
||||
void *dl;
|
||||
|
||||
char *(*GetFragment)(char *);
|
||||
void (*Init)(void);
|
||||
int (*In)(char *, int);
|
||||
int (*Out)(char *, int);
|
||||
struct alias_link *(*RedirectAddr)(struct in_addr, struct in_addr);
|
||||
struct alias_link *(*RedirectPort)(struct in_addr, u_short, struct in_addr,
|
||||
u_short, struct in_addr, u_short, u_char);
|
||||
int (*SaveFragment)(char *);
|
||||
void (*SetAddress)(struct in_addr);
|
||||
unsigned (*SetMode)(unsigned, unsigned);
|
||||
void (*FragmentIn)(char *, char *);
|
||||
};
|
||||
|
||||
extern int loadAliasHandlers(struct aliasHandlers *);
|
||||
extern struct aliasHandlers PacketAlias;
|
||||
|
||||
extern int loadAliasHandlers(void);
|
||||
extern void unloadAliasHandlers(void);
|
||||
|
@ -23,10 +23,10 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: log.c,v 1.25.2.4 1998/04/05 18:25:32 brian Exp $
|
||||
* $Id: log.c,v 1.25.2.5 1998/04/06 09:12:31 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: log.h,v 1.18.2.1 1998/02/10 03:23:27 brian Exp $
|
||||
* $Id: log.h,v 1.18.2.2 1998/04/03 19:25:41 brian Exp $
|
||||
*/
|
||||
|
||||
#define LogMIN (1)
|
||||
@ -50,6 +50,8 @@
|
||||
#define LogMAX (19)
|
||||
|
||||
struct mbuf;
|
||||
struct cmdargs;
|
||||
struct prompt;
|
||||
|
||||
/* The first int arg for all of the following is one of the above values */
|
||||
extern const char *LogName(int);
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: lqr.c,v 1.22.2.19 1998/04/03 19:26:35 brian Exp $
|
||||
* $Id: lqr.c,v 1.22.2.20 1998/04/06 09:12:31 brian Exp $
|
||||
*
|
||||
* o LQR based on RFC1333
|
||||
*
|
||||
@ -26,7 +26,7 @@
|
||||
* o Allow user to configure LQM method and interval.
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
@ -34,7 +34,6 @@
|
||||
#include <string.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "defs.h"
|
||||
@ -56,7 +55,6 @@
|
||||
#include "filter.h"
|
||||
#include "mp.h"
|
||||
#include "bundle.h"
|
||||
#include "loadalias.h"
|
||||
#include "vars.h"
|
||||
|
||||
struct echolqr {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: lqr.h,v 1.12.2.1 1998/01/29 00:49:26 brian Exp $
|
||||
* $Id: lqr.h,v 1.12.2.2 1998/03/13 00:44:12 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -44,6 +44,7 @@ struct lqrdata {
|
||||
#define LQM_LQR 1
|
||||
#define LQM_ECHO 2
|
||||
|
||||
struct mbuf;
|
||||
struct physical;
|
||||
struct lcp;
|
||||
struct fsm;
|
||||
|
@ -17,12 +17,11 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: main.c,v 1.121.2.44 1998/04/05 18:25:33 brian Exp $
|
||||
* $Id: main.c,v 1.121.2.45 1998/04/06 09:12:32 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Add commands for traffic summary, version display, etc.
|
||||
* o Add signal handler for misc controls.
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
@ -226,7 +225,7 @@ ProcessArgs(int argc, char **argv)
|
||||
mode &= ~MODE_INTER;
|
||||
#ifndef NOALIAS
|
||||
} else if (strcmp(cp, "alias") == 0) {
|
||||
if (loadAliasHandlers(&VarAliasHandlers) == 0)
|
||||
if (loadAliasHandlers() == 0)
|
||||
mode |= MODE_ALIAS;
|
||||
else
|
||||
LogPrintf(LogWARN, "Cannot load alias library\n");
|
||||
@ -565,7 +564,7 @@ DoLoop(struct bundle *bundle, struct prompt *prompt)
|
||||
|
||||
#ifndef NOALIAS
|
||||
if (mode & MODE_ALIAS) {
|
||||
VarPacketAliasIn(tun.data, sizeof tun.data);
|
||||
(*PacketAlias.In)(tun.data, sizeof tun.data);
|
||||
n = ntohs(((struct ip *)tun.data)->ip_len);
|
||||
}
|
||||
#endif
|
||||
@ -605,7 +604,7 @@ DoLoop(struct bundle *bundle, struct prompt *prompt)
|
||||
if (pri >= 0) {
|
||||
#ifndef NOALIAS
|
||||
if (mode & MODE_ALIAS) {
|
||||
VarPacketAliasOut(tun.data, sizeof tun.data);
|
||||
(*PacketAlias.Out)(tun.data, sizeof tun.data);
|
||||
n = ntohs(((struct ip *)tun.data)->ip_len);
|
||||
}
|
||||
#endif
|
||||
|
@ -17,12 +17,9 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: main.h,v 1.9.2.7 1998/02/17 19:28:31 brian Exp $
|
||||
* $Id: main.h,v 1.9.2.8 1998/03/16 22:53:13 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
extern void Cleanup(int);
|
||||
extern void AbortProgram(int);
|
||||
extern void TtyTermMode(void);
|
||||
extern void TtyOldMode(void);
|
||||
extern void TtyCommandMode(struct bundle *, int);
|
||||
|
@ -17,10 +17,10 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: mbuf.c,v 1.13.2.7 1998/04/03 19:25:43 brian Exp $
|
||||
* $Id: mbuf.c,v 1.13.2.8 1998/04/06 09:12:33 brian Exp $
|
||||
*
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: mbuf.h,v 1.11.2.1 1998/01/30 19:45:55 brian Exp $
|
||||
* $Id: mbuf.h,v 1.11.2.2 1998/04/03 19:21:39 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -51,6 +51,8 @@ struct mqueue {
|
||||
#define MB_MP 11
|
||||
#define MB_MAX MB_MP
|
||||
|
||||
struct cmdargs;
|
||||
|
||||
extern int plength(struct mbuf *);
|
||||
extern struct mbuf *mballoc(int, int);
|
||||
extern struct mbuf *mbfree(struct mbuf *);
|
||||
|
@ -15,14 +15,16 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: modem.h,v 1.16.2.12 1998/03/13 00:44:49 brian Exp $
|
||||
* $Id: modem.h,v 1.16.2.13 1998/04/03 19:21:42 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
|
||||
struct datalink;
|
||||
struct physical;
|
||||
struct bundle;
|
||||
struct ccp;
|
||||
struct cmdargs;
|
||||
|
||||
extern int modem_Raw(struct physical *, struct bundle *);
|
||||
extern struct physical *modem_Create(struct datalink *);
|
||||
|
@ -23,9 +23,14 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: mp.h,v 1.1.2.1 1998/04/03 19:21:46 brian Exp $
|
||||
*/
|
||||
|
||||
struct mbuf;
|
||||
struct physical;
|
||||
struct bundle;
|
||||
struct cmdargs;
|
||||
|
||||
struct mp {
|
||||
struct link link;
|
||||
|
||||
|
@ -18,11 +18,11 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: pap.c,v 1.20.2.22 1998/04/03 19:26:25 brian Exp $
|
||||
* $Id: pap.c,v 1.20.2.23 1998/04/06 09:12:34 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
@ -32,7 +32,6 @@
|
||||
#else
|
||||
#endif
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "defs.h"
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: pap.h,v 1.5.2.2 1998/02/02 19:32:13 brian Exp $
|
||||
* $Id: pap.h,v 1.5.2.3 1998/03/01 01:07:49 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -24,5 +24,10 @@
|
||||
#define PAP_ACK 2
|
||||
#define PAP_NAK 3
|
||||
|
||||
struct mbuf;
|
||||
struct physical;
|
||||
struct authinfo;
|
||||
struct bundle;
|
||||
|
||||
extern void PapInput(struct bundle *, struct mbuf *, struct physical *);
|
||||
extern void SendPapChallenge(struct authinfo *, int, struct physical *);
|
||||
|
@ -16,12 +16,11 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: physical.c,v 1.1.2.20 1998/04/03 19:21:49 brian Exp $
|
||||
* $Id: physical.c,v 1.1.2.21 1998/04/06 09:12:34 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <sys/tty.h>
|
||||
|
||||
@ -34,11 +33,8 @@
|
||||
|
||||
|
||||
/* XXX Name space pollution from vars.h */
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include "defs.h"
|
||||
#include "command.h"
|
||||
#include "loadalias.h"
|
||||
|
||||
/* XXX Name space pollution from hdlc.h */
|
||||
#include "mbuf.h"
|
||||
|
@ -16,10 +16,12 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: physical.h,v 1.1.2.17 1998/03/20 19:48:18 brian Exp $
|
||||
* $Id: physical.h,v 1.1.2.18 1998/04/03 19:21:50 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
struct bundle;
|
||||
|
||||
struct physical {
|
||||
struct link link;
|
||||
struct descriptor desc;
|
||||
@ -50,8 +52,8 @@ struct physical {
|
||||
unsigned is_dedicated : 1; /* Dedicated mode? XXX-ML - not yet used */
|
||||
unsigned is_direct : 1; /* Direct mode? XXX-ML - not yet used */
|
||||
unsigned rts_cts : 1; /* Is rts/cts enabled? */
|
||||
unsigned int parity; /* What parity is enabled? (TTY flags) */
|
||||
unsigned int speed; /* Modem speed */
|
||||
unsigned parity; /* What parity is enabled? (TTY flags) */
|
||||
unsigned speed; /* Modem speed */
|
||||
char devlist[LINE_LEN]; /* Comma-separated list of devices */
|
||||
} cfg;
|
||||
|
||||
@ -72,32 +74,32 @@ struct physical {
|
||||
int Physical_GetFD(struct physical *);
|
||||
int Physical_IsATTY(struct physical *);
|
||||
int Physical_IsSync(struct physical *);
|
||||
int Physical_IsDedicated(struct physical *phys);
|
||||
int Physical_IsDirect(struct physical *phys);
|
||||
int Physical_IsDedicated(struct physical *);
|
||||
int Physical_IsDirect(struct physical *);
|
||||
const char *Physical_GetDevice(struct physical *);
|
||||
|
||||
|
||||
void Physical_SetDeviceList(struct physical *, const char *);
|
||||
int /* Was this speed OK? */
|
||||
Physical_SetSpeed(struct physical *phys, int speed);
|
||||
Physical_SetSpeed(struct physical *, int);
|
||||
|
||||
/* XXX-ML I'm not certain this is the right way to handle this, but we
|
||||
can solve that later. */
|
||||
void Physical_SetSync(struct physical *phys);
|
||||
void Physical_SetSync(struct physical *);
|
||||
|
||||
int /* Can this be set? (Might not be a relevant attribute for this
|
||||
device, for instance) */
|
||||
Physical_SetRtsCts(struct physical *phys, int enable);
|
||||
Physical_SetRtsCts(struct physical *, int);
|
||||
|
||||
void Physical_SetDedicated(struct physical *phys, int enable);
|
||||
void Physical_SetDirect(struct physical *phys, int enable);
|
||||
void Physical_SetDedicated(struct physical *, int);
|
||||
void Physical_SetDirect(struct physical *, int);
|
||||
|
||||
void Physical_FD_SET(struct physical *, fd_set *);
|
||||
int Physical_FD_ISSET(struct physical *, fd_set *);
|
||||
|
||||
void Physical_DupAndClose(struct physical *);
|
||||
ssize_t Physical_Read(struct physical *phys, void *buf, size_t nbytes);
|
||||
ssize_t Physical_Write(struct physical *phys, const void *buf, size_t nbytes);
|
||||
ssize_t Physical_Read(struct physical *, void *, size_t);
|
||||
ssize_t Physical_Write(struct physical *, const void *, size_t);
|
||||
int Physical_UpdateSet(struct descriptor *, fd_set *, fd_set *, fd_set *,
|
||||
int *, int);
|
||||
int Physical_IsSet(struct descriptor *, const fd_set *);
|
||||
|
@ -26,19 +26,16 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: pred.c,v 1.20.2.6 1998/03/17 22:29:12 brian Exp $
|
||||
* $Id: pred.c,v 1.20.2.7 1998/04/06 09:12:35 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "loadalias.h"
|
||||
#include "vars.h"
|
||||
#include "timer.h"
|
||||
#include "fsm.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: prompt.h,v 1.1.2.4 1998/04/03 19:25:51 brian Exp $
|
||||
* $Id: prompt.h,v 1.1.2.5 1998/04/05 18:25:34 brian Exp $
|
||||
*/
|
||||
|
||||
#define LOCAL_AUTH 0x01
|
||||
@ -33,7 +33,9 @@
|
||||
#define LOCAL_CX_OPT 0x08 /* OR'd value - optional context */
|
||||
|
||||
struct server;
|
||||
struct datalink;
|
||||
struct bundle;
|
||||
struct cmdargs;
|
||||
|
||||
struct prompt {
|
||||
struct descriptor desc;
|
||||
|
@ -17,11 +17,11 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: route.c,v 1.42.2.15 1998/04/03 19:25:52 brian Exp $
|
||||
* $Id: route.c,v 1.42.2.16 1998/04/06 09:12:35 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if_types.h>
|
||||
#include <net/route.h>
|
||||
|
@ -17,10 +17,13 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: route.h,v 1.10.2.2 1998/02/02 19:33:02 brian Exp $
|
||||
* $Id: route.h,v 1.10.2.3 1998/02/07 20:50:08 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
struct bundle;
|
||||
struct cmdargs;
|
||||
|
||||
extern int GetIfIndex(char *);
|
||||
extern int ShowRoute(struct cmdargs const *);
|
||||
extern void DeleteIfRoutes(struct bundle *, int);
|
||||
|
@ -23,10 +23,10 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: server.c,v 1.16.2.11 1998/04/03 19:25:54 brian Exp $
|
||||
* $Id: server.c,v 1.16.2.12 1998/04/06 09:12:36 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
@ -23,9 +23,11 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: server.h,v 1.4.2.1 1998/02/09 19:24:02 brian Exp $
|
||||
* $Id: server.h,v 1.4.2.2 1998/04/03 19:25:55 brian Exp $
|
||||
*/
|
||||
|
||||
struct bundle;
|
||||
|
||||
struct server {
|
||||
struct descriptor desc;
|
||||
int fd;
|
||||
|
@ -23,14 +23,13 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: sig.c,v 1.11.2.1 1998/03/08 23:44:48 brian Exp $
|
||||
* $Id: sig.c,v 1.11.2.2 1998/04/06 09:12:36 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "log.h"
|
||||
#include "sig.h"
|
||||
|
||||
|
@ -17,13 +17,13 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: slcompress.c,v 1.15.2.5 1998/04/03 19:25:56 brian Exp $
|
||||
* $Id: slcompress.c,v 1.15.2.6 1998/04/06 09:12:36 brian Exp $
|
||||
*
|
||||
* Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
|
||||
* - Initial distribution.
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
@ -1,8 +1,6 @@
|
||||
/*
|
||||
* Definitions for tcp compression routines.
|
||||
*
|
||||
* $Header: /home/ncvs/src/usr.sbin/ppp/slcompress.h,v 1.10.2.2 1998/02/21 01:45:25 brian Exp $
|
||||
*
|
||||
* Copyright (c) 1989 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
@ -18,7 +16,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: slcompress.h,v 1.10.2.2 1998/02/21 01:45:25 brian Exp $
|
||||
* $Id: slcompress.h,v 1.10.2.3 1998/03/16 22:54:26 brian Exp $
|
||||
*
|
||||
* Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
|
||||
* - Initial distribution.
|
||||
@ -27,7 +25,7 @@
|
||||
#define MIN_VJ_STATES 3
|
||||
#define MAX_VJ_STATES 255
|
||||
#define DEF_VJ_STATES 16 /* must be > 2 and < 256 */
|
||||
#define MAX_HDR 128 /* XXX 4bsd-ism: should really be 128 */
|
||||
#define MAX_HDR 128
|
||||
|
||||
/*
|
||||
* Compressed packet format:
|
||||
@ -140,6 +138,9 @@ struct slstat {
|
||||
/* flag values */
|
||||
#define SLF_TOSS 1 /* tossing rcvd frames because of input err */
|
||||
|
||||
struct mbuf;
|
||||
struct cmdargs;
|
||||
|
||||
extern void sl_compress_init(struct slcompress *, int);
|
||||
extern u_char sl_compress_tcp(struct mbuf *, struct ip *, struct slcompress *,
|
||||
struct slstat *, int);
|
||||
|
@ -17,11 +17,13 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: systems.h,v 1.10.2.1 1998/02/02 19:32:15 brian Exp $
|
||||
* $Id: systems.h,v 1.10.2.2 1998/04/03 19:25:59 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
struct prompt;
|
||||
struct bundle;
|
||||
struct cmdargs;
|
||||
|
||||
extern int SelectSystem(struct bundle *bundle, const char *, const char *,
|
||||
struct prompt *);
|
||||
|
@ -23,21 +23,18 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: throughput.c,v 1.4.4.3 1998/04/03 19:25:59 brian Exp $
|
||||
* $Id: throughput.c,v 1.4.4.4 1998/04/06 09:12:37 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <termios.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "log.h"
|
||||
#include "timer.h"
|
||||
#include "throughput.h"
|
||||
#include "loadalias.h"
|
||||
#include "vars.h"
|
||||
#include "descriptor.h"
|
||||
#include "prompt.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: timer.c,v 1.27.2.2 1998/04/03 19:26:01 brian Exp $
|
||||
* $Id: timer.c,v 1.27.2.3 1998/04/06 09:12:37 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -29,7 +29,6 @@
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "log.h"
|
||||
#include "sig.h"
|
||||
#include "timer.h"
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: timer.h,v 1.5.4.1 1998/04/03 19:21:54 brian Exp $
|
||||
* $Id: timer.h,v 1.5.4.2 1998/04/03 19:26:01 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -44,8 +44,5 @@ extern void StartTimer(struct pppTimer *);
|
||||
extern void StopTimer(struct pppTimer *);
|
||||
extern void TermTimerService(void);
|
||||
extern void ShowTimers(int LogLevel, struct prompt *);
|
||||
|
||||
#ifdef SIGALRM
|
||||
extern void nointr_sleep(u_int);
|
||||
extern void nointr_usleep(u_int);
|
||||
#endif
|
||||
|
@ -23,10 +23,10 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: tun.c,v 1.6.4.11 1998/04/03 19:24:05 brian Exp $
|
||||
* $Id: tun.c,v 1.6.4.12 1998/04/06 09:12:38 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <net/if_tun.h>
|
||||
#include <netinet/in_systm.h>
|
||||
@ -36,7 +36,6 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/errno.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "timer.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: tun.h,v 1.3 1997/12/21 12:11:10 brian Exp $
|
||||
* $Id: tun.h,v 1.3.4.1 1998/02/02 19:32:16 brian Exp $
|
||||
*/
|
||||
|
||||
struct tun_data {
|
||||
@ -41,4 +41,6 @@ struct tun_data {
|
||||
#define tun_check_header(f,proto) (1)
|
||||
#endif
|
||||
|
||||
struct bundle;
|
||||
|
||||
extern void tun_configure(struct bundle *, int, int);
|
||||
|
@ -17,11 +17,10 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: vars.c,v 1.45.2.24 1998/04/03 19:26:28 brian Exp $
|
||||
* $Id: vars.c,v 1.45.2.25 1998/04/06 09:12:38 brian Exp $
|
||||
*
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -29,14 +28,10 @@
|
||||
#include "command.h"
|
||||
#include "log.h"
|
||||
#include "termios.h"
|
||||
#include "loadalias.h"
|
||||
#include "vars.h"
|
||||
#include "descriptor.h"
|
||||
#include "prompt.h"
|
||||
|
||||
char VarVersion[] = "PPP Version 2.0-beta";
|
||||
char VarLocalVersion[] = "$Date: 1998/04/03 19:26:28 $";
|
||||
|
||||
/*
|
||||
* Order of conf option is important. See vars.h.
|
||||
*/
|
||||
@ -60,8 +55,6 @@ struct confdesc pppConfs[NCONFS] = {
|
||||
{"utmp", CONF_ENABLE, CONF_NONE}
|
||||
};
|
||||
|
||||
struct pppvars pppVars;
|
||||
|
||||
int
|
||||
DisplayCommand(struct cmdargs const *arg)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: vars.h,v 1.42.2.20 1998/04/03 19:26:02 brian Exp $
|
||||
* $Id: vars.h,v 1.42.2.21 1998/04/03 19:26:29 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -56,27 +56,7 @@ struct confdesc {
|
||||
|
||||
extern struct confdesc pppConfs[NCONFS];
|
||||
|
||||
struct pppvars {
|
||||
/* The rest are just default initialized in vars.c */
|
||||
struct aliasHandlers handler; /* Alias function pointers */
|
||||
};
|
||||
|
||||
#define VarAliasHandlers pppVars.handler
|
||||
#define VarPacketAliasGetFragment (*pppVars.handler.PacketAliasGetFragment)
|
||||
#define VarPacketAliasGetFragment (*pppVars.handler.PacketAliasGetFragment)
|
||||
#define VarPacketAliasInit (*pppVars.handler.PacketAliasInit)
|
||||
#define VarPacketAliasIn (*pppVars.handler.PacketAliasIn)
|
||||
#define VarPacketAliasOut (*pppVars.handler.PacketAliasOut)
|
||||
#define VarPacketAliasRedirectAddr (*pppVars.handler.PacketAliasRedirectAddr)
|
||||
#define VarPacketAliasRedirectPort (*pppVars.handler.PacketAliasRedirectPort)
|
||||
#define VarPacketAliasSaveFragment (*pppVars.handler.PacketAliasSaveFragment)
|
||||
#define VarPacketAliasSetAddress (*pppVars.handler.PacketAliasSetAddress)
|
||||
#define VarPacketAliasSetMode (*pppVars.handler.PacketAliasSetMode)
|
||||
#define VarPacketAliasFragmentIn (*pppVars.handler.PacketAliasFragmentIn)
|
||||
|
||||
extern struct pppvars pppVars;
|
||||
extern char VarVersion[];
|
||||
extern char VarLocalVersion[];
|
||||
struct cmdargs;
|
||||
|
||||
extern int EnableCommand(struct cmdargs const *);
|
||||
extern int DisableCommand(struct cmdargs const *);
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: vjcomp.c,v 1.16.2.11 1998/04/03 19:21:56 brian Exp $
|
||||
* $Id: vjcomp.c,v 1.16.2.12 1998/04/06 09:12:38 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -28,7 +28,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "command.h"
|
||||
#include "mbuf.h"
|
||||
#include "log.h"
|
||||
#include "timer.h"
|
||||
|
@ -23,9 +23,14 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: vjcomp.h,v 1.5.4.3 1998/02/23 00:38:44 brian Exp $
|
||||
* $Id: vjcomp.h,v 1.5.4.4 1998/03/16 22:54:35 brian Exp $
|
||||
*/
|
||||
|
||||
struct mbuf;
|
||||
struct link;
|
||||
struct ipcp;
|
||||
struct bundle;
|
||||
|
||||
extern void SendPppFrame(struct link *, struct mbuf *, struct bundle *);
|
||||
extern struct mbuf *VjCompInput(struct ipcp *, struct mbuf *, int);
|
||||
extern const char *vj2asc(u_int32_t);
|
||||
|
Loading…
Reference in New Issue
Block a user