aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ppp/alias_cmd.c9
-rw-r--r--usr.sbin/ppp/alias_cmd.h4
-rw-r--r--usr.sbin/ppp/arp.c5
-rw-r--r--usr.sbin/ppp/arp.h4
-rw-r--r--usr.sbin/ppp/async.c6
-rw-r--r--usr.sbin/ppp/async.h7
-rw-r--r--usr.sbin/ppp/auth.c6
-rw-r--r--usr.sbin/ppp/auth.h3
-rw-r--r--usr.sbin/ppp/bundle.c4
-rw-r--r--usr.sbin/ppp/ccp.c5
-rw-r--r--usr.sbin/ppp/ccp.h4
-rw-r--r--usr.sbin/ppp/chap.c5
-rw-r--r--usr.sbin/ppp/chap.h4
-rw-r--r--usr.sbin/ppp/chat.c6
-rw-r--r--usr.sbin/ppp/chat.h4
-rw-r--r--usr.sbin/ppp/command.c14
-rw-r--r--usr.sbin/ppp/command.h8
-rw-r--r--usr.sbin/ppp/datalink.c5
-rw-r--r--usr.sbin/ppp/datalink.h8
-rw-r--r--usr.sbin/ppp/deflate.c7
-rw-r--r--usr.sbin/ppp/descriptor.h4
-rw-r--r--usr.sbin/ppp/filter.c4
-rw-r--r--usr.sbin/ppp/filter.h5
-rw-r--r--usr.sbin/ppp/fsm.c7
-rw-r--r--usr.sbin/ppp/fsm.h5
-rw-r--r--usr.sbin/ppp/hdlc.c4
-rw-r--r--usr.sbin/ppp/hdlc.h6
-rw-r--r--usr.sbin/ppp/id.c3
-rw-r--r--usr.sbin/ppp/ip.c14
-rw-r--r--usr.sbin/ppp/ip.h5
-rw-r--r--usr.sbin/ppp/ipcp.c4
-rw-r--r--usr.sbin/ppp/ipcp.h6
-rw-r--r--usr.sbin/ppp/iplist.c3
-rw-r--r--usr.sbin/ppp/lcp.c5
-rw-r--r--usr.sbin/ppp/lcp.h6
-rw-r--r--usr.sbin/ppp/link.c5
-rw-r--r--usr.sbin/ppp/loadalias.c57
-rw-r--r--usr.sbin/ppp/loadalias.h31
-rw-r--r--usr.sbin/ppp/log.c4
-rw-r--r--usr.sbin/ppp/log.h4
-rw-r--r--usr.sbin/ppp/lqr.c6
-rw-r--r--usr.sbin/ppp/lqr.h3
-rw-r--r--usr.sbin/ppp/main.c11
-rw-r--r--usr.sbin/ppp/main.h5
-rw-r--r--usr.sbin/ppp/mbuf.c4
-rw-r--r--usr.sbin/ppp/mbuf.h4
-rw-r--r--usr.sbin/ppp/modem.h4
-rw-r--r--usr.sbin/ppp/mp.h7
-rw-r--r--usr.sbin/ppp/pap.c5
-rw-r--r--usr.sbin/ppp/pap.h7
-rw-r--r--usr.sbin/ppp/physical.c8
-rw-r--r--usr.sbin/ppp/physical.h26
-rw-r--r--usr.sbin/ppp/pred.c7
-rw-r--r--usr.sbin/ppp/prompt.h4
-rw-r--r--usr.sbin/ppp/route.c4
-rw-r--r--usr.sbin/ppp/route.h5
-rw-r--r--usr.sbin/ppp/server.c4
-rw-r--r--usr.sbin/ppp/server.h4
-rw-r--r--usr.sbin/ppp/sig.c3
-rw-r--r--usr.sbin/ppp/slcompress.c4
-rw-r--r--usr.sbin/ppp/slcompress.h9
-rw-r--r--usr.sbin/ppp/systems.h4
-rw-r--r--usr.sbin/ppp/throughput.c7
-rw-r--r--usr.sbin/ppp/timer.c3
-rw-r--r--usr.sbin/ppp/timer.h5
-rw-r--r--usr.sbin/ppp/tun.c5
-rw-r--r--usr.sbin/ppp/tun.h4
-rw-r--r--usr.sbin/ppp/vars.c11
-rw-r--r--usr.sbin/ppp/vars.h24
-rw-r--r--usr.sbin/ppp/vjcomp.c3
-rw-r--r--usr.sbin/ppp/vjcomp.h7
71 files changed, 260 insertions, 247 deletions
diff --git a/usr.sbin/ppp/alias_cmd.c b/usr.sbin/ppp/alias_cmd.c
index 907797199bb8..75123f44c755 100644
--- a/usr.sbin/ppp/alias_cmd.c
+++ b/usr.sbin/ppp/alias_cmd.c
@@ -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");
diff --git a/usr.sbin/ppp/alias_cmd.h b/usr.sbin/ppp/alias_cmd.h
index 31eaf12cbdc5..5a855636f58c 100644
--- a/usr.sbin/ppp/alias_cmd.h
+++ b/usr.sbin/ppp/alias_cmd.h
@@ -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 *);
diff --git a/usr.sbin/ppp/arp.c b/usr.sbin/ppp/arp.c
index a6479d586a31..cc992aecfc34 100644
--- a/usr.sbin/ppp/arp.c
+++ b/usr.sbin/ppp/arp.c
@@ -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"
diff --git a/usr.sbin/ppp/arp.h b/usr.sbin/ppp/arp.h
index 2e4e58daecc5..0ccf7e08bf02 100644
--- a/usr.sbin/ppp/arp.h
+++ b/usr.sbin/ppp/arp.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);
diff --git a/usr.sbin/ppp/async.c b/usr.sbin/ppp/async.c
index d7c066dd30bf..b2b78b3adee4 100644
--- a/usr.sbin/ppp/async.c
+++ b/usr.sbin/ppp/async.c
@@ -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"
diff --git a/usr.sbin/ppp/async.h b/usr.sbin/ppp/async.h
index 42c592f9fd10..333168543c8c 100644
--- a/usr.sbin/ppp/async.h
+++ b/usr.sbin/ppp/async.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 *);
diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c
index da2c0dd84ff3..88bf255b1ac2 100644
--- a/usr.sbin/ppp/auth.c
+++ b/usr.sbin/ppp/auth.c
@@ -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"
diff --git a/usr.sbin/ppp/auth.h b/usr.sbin/ppp/auth.h
index 956bf933170e..39b50ee2368a 100644
--- a/usr.sbin/ppp/auth.h
+++ b/usr.sbin/ppp/auth.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 *);
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c
index 51c4418a3220..d12382d65056 100644
--- a/usr.sbin/ppp/bundle.c
+++ b/usr.sbin/ppp/bundle.c
@@ -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>
diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c
index 94614e90d0e4..3c11973503fd 100644
--- a/usr.sbin/ppp/ccp.c
+++ b/usr.sbin/ppp/ccp.c
@@ -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"
diff --git a/usr.sbin/ppp/ccp.h b/usr.sbin/ppp/ccp.h
index 67543ae274ca..2e05ec7e05b6 100644
--- a/usr.sbin/ppp/ccp.h
+++ b/usr.sbin/ppp/ccp.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 {
diff --git a/usr.sbin/ppp/chap.c b/usr.sbin/ppp/chap.c
index 27cd86e0cca4..7a917a09ced7 100644
--- a/usr.sbin/ppp/chap.c
+++ b/usr.sbin/ppp/chap.c
@@ -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"
diff --git a/usr.sbin/ppp/chap.h b/usr.sbin/ppp/chap.h
index 6a109e43c239..159e87c208b4 100644
--- a/usr.sbin/ppp/chap.h
+++ b/usr.sbin/ppp/chap.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
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index 00587d82a7e3..0fb505520377 100644
--- a/usr.sbin/ppp/chat.c
+++ b/usr.sbin/ppp/chat.c
@@ -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"
diff --git a/usr.sbin/ppp/chat.h b/usr.sbin/ppp/chat.h
index d773a2f9f0ee..03d39ee6131e 100644
--- a/usr.sbin/ppp/chat.h
+++ b/usr.sbin/ppp/chat.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;
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index c5533de59d15..5d2c52252723 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -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");
diff --git a/usr.sbin/ppp/command.h b/usr.sbin/ppp/command.h
index 961b3f76073a..f4f4e75e7251 100644
--- a/usr.sbin/ppp/command.h
+++ b/usr.sbin/ppp/command.h
@@ -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 *,
diff --git a/usr.sbin/ppp/datalink.c b/usr.sbin/ppp/datalink.c
index 75961b00ba3e..71da6058e9ae 100644
--- a/usr.sbin/ppp/datalink.c
+++ b/usr.sbin/ppp/datalink.c
@@ -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"
diff --git a/usr.sbin/ppp/datalink.h b/usr.sbin/ppp/datalink.h
index bb4028309ed9..215055dcba31 100644
--- a/usr.sbin/ppp/datalink.h
+++ b/usr.sbin/ppp/datalink.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 *);
diff --git a/usr.sbin/ppp/deflate.c b/usr.sbin/ppp/deflate.c
index 428b9547ebce..f3e1921ff361 100644
--- a/usr.sbin/ppp/deflate.c
+++ b/usr.sbin/ppp/deflate.c
@@ -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"
diff --git a/usr.sbin/ppp/descriptor.h b/usr.sbin/ppp/descriptor.h
index 77263c1185c0..0bbddf2b5e2e 100644
--- a/usr.sbin/ppp/descriptor.h
+++ b/usr.sbin/ppp/descriptor.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;
diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c
index 542b70cc4657..50a7b488f07e 100644
--- a/usr.sbin/ppp/filter.c
+++ b/usr.sbin/ppp/filter.c
@@ -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>
diff --git a/usr.sbin/ppp/filter.h b/usr.sbin/ppp/filter.h
index 03d3b4afc520..c5cfc043aa52 100644
--- a/usr.sbin/ppp/filter.h
+++ b/usr.sbin/ppp/filter.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 *);
diff --git a/usr.sbin/ppp/fsm.c b/usr.sbin/ppp/fsm.c
index d5bd14bd486d..ff1da1140a2a 100644
--- a/usr.sbin/ppp/fsm.c
+++ b/usr.sbin/ppp/fsm.c
@@ -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"
diff --git a/usr.sbin/ppp/fsm.h b/usr.sbin/ppp/fsm.h
index 00d5c17bb39f..d32f31848a66 100644
--- a/usr.sbin/ppp/fsm.h
+++ b/usr.sbin/ppp/fsm.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 */
diff --git a/usr.sbin/ppp/hdlc.c b/usr.sbin/ppp/hdlc.c
index 08c41d373e96..ca103b274a22 100644
--- a/usr.sbin/ppp/hdlc.c
+++ b/usr.sbin/ppp/hdlc.c
@@ -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>
diff --git a/usr.sbin/ppp/hdlc.h b/usr.sbin/ppp/hdlc.h
index 52bd528e9540..1895966197b2 100644
--- a/usr.sbin/ppp/hdlc.h
+++ b/usr.sbin/ppp/hdlc.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;
diff --git a/usr.sbin/ppp/id.c b/usr.sbin/ppp/id.c
index 3de2ddefb89c..5c24577e20f8 100644
--- a/usr.sbin/ppp/id.c
+++ b/usr.sbin/ppp/id.c
@@ -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"
diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c
index 74c0defe73ca..a2c9881534b2 100644
--- a/usr.sbin/ppp/ip.c
+++ b/usr.sbin/ppp/ip.c
@@ -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
diff --git a/usr.sbin/ppp/ip.h b/usr.sbin/ppp/ip.h
index 353aa533357e..1cb64274903b 100644
--- a/usr.sbin/ppp/ip.h
+++ b/usr.sbin/ppp/ip.h
@@ -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 *);
diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c
index ca02ee731688..bcba310ad30d 100644
--- a/usr.sbin/ppp/ipcp.c
+++ b/usr.sbin/ppp/ipcp.c
@@ -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",
diff --git a/usr.sbin/ppp/ipcp.h b/usr.sbin/ppp/ipcp.h
index 214e6f5d4d48..4d343afc9840 100644
--- a/usr.sbin/ppp/ipcp.h
+++ b/usr.sbin/ppp/ipcp.h
@@ -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 *);
diff --git a/usr.sbin/ppp/iplist.c b/usr.sbin/ppp/iplist.c
index add57a3492da..b25c6232b14f 100644
--- a/usr.sbin/ppp/iplist.c
+++ b/usr.sbin/ppp/iplist.c
@@ -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"
diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c
index 0d40ddaf1550..3001335e8251 100644
--- a/usr.sbin/ppp/lcp.c
+++ b/usr.sbin/ppp/lcp.c
@@ -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"
diff --git a/usr.sbin/ppp/lcp.h b/usr.sbin/ppp/lcp.h
index 04e5595549f4..85b8f74e3707 100644
--- a/usr.sbin/ppp/lcp.h
+++ b/usr.sbin/ppp/lcp.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)
diff --git a/usr.sbin/ppp/link.c b/usr.sbin/ppp/link.c
index ecd964c2e62c..a71e696e937c 100644
--- a/usr.sbin/ppp/link.c
+++ b/usr.sbin/ppp/link.c
@@ -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"
diff --git a/usr.sbin/ppp/loadalias.c b/usr.sbin/ppp/loadalias.c
index 11a3e57560d8..4bbe98b6a310 100644
--- a/usr.sbin/ppp/loadalias.c
+++ b/usr.sbin/ppp/loadalias.c
@@ -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);
}
}
diff --git a/usr.sbin/ppp/loadalias.h b/usr.sbin/ppp/loadalias.h
index 0fec74ea97aa..ecdf507e98b0 100644
--- a/usr.sbin/ppp/loadalias.h
+++ b/usr.sbin/ppp/loadalias.h
@@ -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);
diff --git a/usr.sbin/ppp/log.c b/usr.sbin/ppp/log.c
index 9b42df1bba67..a4319613ad9f 100644
--- a/usr.sbin/ppp/log.c
+++ b/usr.sbin/ppp/log.c
@@ -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>
diff --git a/usr.sbin/ppp/log.h b/usr.sbin/ppp/log.h
index c14b4fe9fb57..be4ac419de07 100644
--- a/usr.sbin/ppp/log.h
+++ b/usr.sbin/ppp/log.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);
diff --git a/usr.sbin/ppp/lqr.c b/usr.sbin/ppp/lqr.c
index dc396ebe7b81..00e2e86243b4 100644
--- a/usr.sbin/ppp/lqr.c
+++ b/usr.sbin/ppp/lqr.c
@@ -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 {
diff --git a/usr.sbin/ppp/lqr.h b/usr.sbin/ppp/lqr.h
index 345ce1f74ef6..144d2ac21482 100644
--- a/usr.sbin/ppp/lqr.h
+++ b/usr.sbin/ppp/lqr.h
@@ -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;
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c
index 2d08733e94a8..1b40c887d487 100644
--- a/usr.sbin/ppp/main.c
+++ b/usr.sbin/ppp/main.c
@@ -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
diff --git a/usr.sbin/ppp/main.h b/usr.sbin/ppp/main.h
index f998a6662d99..f4c4b2905390 100644
--- a/usr.sbin/ppp/main.h
+++ b/usr.sbin/ppp/main.h
@@ -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);
diff --git a/usr.sbin/ppp/mbuf.c b/usr.sbin/ppp/mbuf.c
index d96292cb7bae..46cd2359bfc0 100644
--- a/usr.sbin/ppp/mbuf.c
+++ b/usr.sbin/ppp/mbuf.c
@@ -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>
diff --git a/usr.sbin/ppp/mbuf.h b/usr.sbin/ppp/mbuf.h
index 3c99454c1686..ae7dc64ae1f3 100644
--- a/usr.sbin/ppp/mbuf.h
+++ b/usr.sbin/ppp/mbuf.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 *);
diff --git a/usr.sbin/ppp/modem.h b/usr.sbin/ppp/modem.h
index b4334356c160..6ebe61ce08eb 100644
--- a/usr.sbin/ppp/modem.h
+++ b/usr.sbin/ppp/modem.h
@@ -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 *);
diff --git a/usr.sbin/ppp/mp.h b/usr.sbin/ppp/mp.h
index c69fb9fee131..2ccf725df005 100644
--- a/usr.sbin/ppp/mp.h
+++ b/usr.sbin/ppp/mp.h
@@ -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;
diff --git a/usr.sbin/ppp/pap.c b/usr.sbin/ppp/pap.c
index 99914f3cf573..2b39cc75a2cc 100644
--- a/usr.sbin/ppp/pap.c
+++ b/usr.sbin/ppp/pap.c
@@ -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"
diff --git a/usr.sbin/ppp/pap.h b/usr.sbin/ppp/pap.h
index f5dcbddaa0de..f3976eebcbe6 100644
--- a/usr.sbin/ppp/pap.h
+++ b/usr.sbin/ppp/pap.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 *);
diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c
index ff65f09ba00a..135956322e7b 100644
--- a/usr.sbin/ppp/physical.c
+++ b/usr.sbin/ppp/physical.c
@@ -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"
diff --git a/usr.sbin/ppp/physical.h b/usr.sbin/ppp/physical.h
index 5a2fd0c7adc6..21ec9895706e 100644
--- a/usr.sbin/ppp/physical.h
+++ b/usr.sbin/ppp/physical.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 *);
diff --git a/usr.sbin/ppp/pred.c b/usr.sbin/ppp/pred.c
index b11d067ad611..493a62c9f848 100644
--- a/usr.sbin/ppp/pred.c
+++ b/usr.sbin/ppp/pred.c
@@ -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"
diff --git a/usr.sbin/ppp/prompt.h b/usr.sbin/ppp/prompt.h
index 9a43e22ce737..b10876a171d7 100644
--- a/usr.sbin/ppp/prompt.h
+++ b/usr.sbin/ppp/prompt.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;
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c
index 8c2055181cb1..4757a6943d07 100644
--- a/usr.sbin/ppp/route.c
+++ b/usr.sbin/ppp/route.c
@@ -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>
diff --git a/usr.sbin/ppp/route.h b/usr.sbin/ppp/route.h
index b48810576802..83b5c11e7a6b 100644
--- a/usr.sbin/ppp/route.h
+++ b/usr.sbin/ppp/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);
diff --git a/usr.sbin/ppp/server.c b/usr.sbin/ppp/server.c
index 1bd01e015eae..293361f48dee 100644
--- a/usr.sbin/ppp/server.c
+++ b/usr.sbin/ppp/server.c
@@ -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>
diff --git a/usr.sbin/ppp/server.h b/usr.sbin/ppp/server.h
index 901fc90af324..295e22ca278b 100644
--- a/usr.sbin/ppp/server.h
+++ b/usr.sbin/ppp/server.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;
diff --git a/usr.sbin/ppp/sig.c b/usr.sbin/ppp/sig.c
index 646d6ad52bfb..3f3ff962c34f 100644
--- a/usr.sbin/ppp/sig.c
+++ b/usr.sbin/ppp/sig.c
@@ -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"
diff --git a/usr.sbin/ppp/slcompress.c b/usr.sbin/ppp/slcompress.c
index aad9b5e654d1..2c4bd7a94a24 100644
--- a/usr.sbin/ppp/slcompress.c
+++ b/usr.sbin/ppp/slcompress.c
@@ -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>
diff --git a/usr.sbin/ppp/slcompress.h b/usr.sbin/ppp/slcompress.h
index d4310960ad65..d5f9171a15b6 100644
--- a/usr.sbin/ppp/slcompress.h
+++ b/usr.sbin/ppp/slcompress.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);
diff --git a/usr.sbin/ppp/systems.h b/usr.sbin/ppp/systems.h
index 7fcceff0e6d6..15f756db0114 100644
--- a/usr.sbin/ppp/systems.h
+++ b/usr.sbin/ppp/systems.h
@@ -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 *);
diff --git a/usr.sbin/ppp/throughput.c b/usr.sbin/ppp/throughput.c
index f1bdb6670881..5fdc7ef01cb5 100644
--- a/usr.sbin/ppp/throughput.c
+++ b/usr.sbin/ppp/throughput.c
@@ -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"
diff --git a/usr.sbin/ppp/timer.c b/usr.sbin/ppp/timer.c
index a50ce7958a0f..bff138c5c25f 100644
--- a/usr.sbin/ppp/timer.c
+++ b/usr.sbin/ppp/timer.c
@@ -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"
diff --git a/usr.sbin/ppp/timer.h b/usr.sbin/ppp/timer.h
index 5c6315f9773b..f6d179eacabb 100644
--- a/usr.sbin/ppp/timer.h
+++ b/usr.sbin/ppp/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
diff --git a/usr.sbin/ppp/tun.c b/usr.sbin/ppp/tun.c
index 173ff4fb017a..90e65a2e0953 100644
--- a/usr.sbin/ppp/tun.c
+++ b/usr.sbin/ppp/tun.c
@@ -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"
diff --git a/usr.sbin/ppp/tun.h b/usr.sbin/ppp/tun.h
index e3d70c084aa4..6cf526211b93 100644
--- a/usr.sbin/ppp/tun.h
+++ b/usr.sbin/ppp/tun.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);
diff --git a/usr.sbin/ppp/vars.c b/usr.sbin/ppp/vars.c
index d635bc5753a6..721bdc53f8b4 100644
--- a/usr.sbin/ppp/vars.c
+++ b/usr.sbin/ppp/vars.c
@@ -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)
{
diff --git a/usr.sbin/ppp/vars.h b/usr.sbin/ppp/vars.h
index 4c553daf037f..843b7798a988 100644
--- a/usr.sbin/ppp/vars.h
+++ b/usr.sbin/ppp/vars.h
@@ -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 *);
diff --git a/usr.sbin/ppp/vjcomp.c b/usr.sbin/ppp/vjcomp.c
index 3cd3b44e3c09..83d555eda910 100644
--- a/usr.sbin/ppp/vjcomp.c
+++ b/usr.sbin/ppp/vjcomp.c
@@ -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"
diff --git a/usr.sbin/ppp/vjcomp.h b/usr.sbin/ppp/vjcomp.h
index 360971b91431..608250ff8063 100644
--- a/usr.sbin/ppp/vjcomp.h
+++ b/usr.sbin/ppp/vjcomp.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);