summaryrefslogtreecommitdiffstats
path: root/c/src/libnetworking/pppd
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-12-08 22:06:54 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-12-08 22:06:54 +0000
commit78d6a5000398cc4813a6644ab525ab32a056d066 (patch)
treed3ba47ff2e31fb63a1183c2e49d04bfac3cccac6 /c/src/libnetworking/pppd
parent2000-12-06 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-78d6a5000398cc4813a6644ab525ab32a056d066.tar.bz2
2000-12-08 Joel Sherrill <joel@OARcorp.com>
* libc/linkaddr.c: Initialized variable to remove warning. * modem/ppp.c, modem/ppp_tty.c: Made numerous variable declarations conditional on PPP_COMPRESS and PPP_FILTER. Commented out variables that were not used because the code using them was commented out. Removed totally unused variables. * modem/pppcompress.c: Added parentheses to avoid warnings. * pppd/pppmain.c: Removed numerous warnings.
Diffstat (limited to 'c/src/libnetworking/pppd')
-rw-r--r--c/src/libnetworking/pppd/pppmain.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/c/src/libnetworking/pppd/pppmain.c b/c/src/libnetworking/pppd/pppmain.c
index 9036dfcb54..0bf8d68e87 100644
--- a/c/src/libnetworking/pppd/pppmain.c
+++ b/c/src/libnetworking/pppd/pppmain.c
@@ -39,10 +39,12 @@
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/socket.h>
-#include <rtems/rtems/tasks.h>
#include <sys/types.h>
#include <netinet/in.h>
+#include <rtems.h>
+#include <rtems/rtems_bsdnet.h>
+
/* #include <stbconfig.h> */
#include "pppd.h"
#include "magic.h"
@@ -72,6 +74,9 @@ extern char *strerror();
void SetStatusInfo(int state, char * text, int res);
+/* prototypes for routines in this file */
+int connect_script(int fd);
+
/* interface vars */
char ifname[32]; /* Interface name */
int interfunit; /* Interface unit number */
@@ -107,15 +112,17 @@ char *no_ppp_msg = "lack of PPP\n";
/* Prototypes for procedures local to this file. */
static void cleanup(void);
-static void create_pidfile __P((void));
static void close_tty __P((void));
static void get_input __P((void));
static void calltimeout __P((void));
static struct timeval *timeleft __P((struct timeval *));
static void holdoff_end __P((void *));
-static int device_script __P((char *[], int, int));
static void reap_kids __P((void));
+/* XXX currently unused */
+#if 0
+static int device_script __P((char *[], int, int));
static void pr_log __P((void *, char *,...));
+#endif
extern char *ttyname __P((int));
extern char *getlogin __P((void));
@@ -164,10 +171,14 @@ int argc;
char *argv[];
{
int i;
+#if 0
struct timeval timo;
+#endif
struct protent *protp;
struct stat statbuf;
+#if 0
char t[100];
+#endif
phase = PHASE_INITIALIZE;
@@ -757,15 +768,9 @@ int sig;
kill_link = 1;
}
-static int input_fd, output_fd;
-#include <rtems/rtems/tasks.h>
-
-
-
int modem_fd; /* FIXME: should not be global... */
int connect_script(int fd)
{
- int status;
#if 0 /* FIXME: This is WinNT special */
char program[256] = "TIMEOUT@10@@CLIENT@CLIENTSERVER";
#else
@@ -775,12 +780,14 @@ int connect_script(int fd)
/* XXX PPPConfiguration */
GlobalSystemStatus * volatile stat;
#endif
+#if 0
/* Connect scripts are almost the same as in Linux Chat ... */
static char *scripts[] =
{
"TIMEOUT@5@@\rAT@OK-+++\\c-OK@ATH0@TIMEOUT@90@OK@ATDT%s@CONNECT@",
"TIMEOUT@5@@\rAT@OK-+++\\c-OK@ATH0@TIMEOUT@90@OK@ATDT%s@CONNECT@@ppp@@Username:@%s@Password:@%s@"
};
+#endif
modem_fd = fd;
#if 0
/* XXX PPPConfiguration */
@@ -898,6 +905,8 @@ void *arg;
+/* XXX currently unused */
+#if 0
static void
pr_log __V((void *arg, char *fmt,...))
{
@@ -925,6 +934,7 @@ pr_log __V((void *arg, char *fmt,...))
strcpy(linep, buf);
linep += n;
}
+#endif
/*
* print_string - print a readable representation of a string using