summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2011-04-30 18:49:39 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2011-04-30 18:49:39 +0000
commit7244cb7d82033edf59cdede5228789c4e4e9f7a6 (patch)
tree9e8ef16c799a6a2b5b0e7b3bf599312f5630a33b /usr.sbin
parent74b2bd957ca9cf3c93a789112e9a6acd16dad7d5 (diff)
Remove some unused code, from Michael W Bombardieri. ok yasuoka
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pppd/demand.c46
-rw-r--r--usr.sbin/pppd/main.c26
-rw-r--r--usr.sbin/pppd/pppd.h5
3 files changed, 3 insertions, 74 deletions
diff --git a/usr.sbin/pppd/demand.c b/usr.sbin/pppd/demand.c
index 7f951fbae49..fda74ca5faa 100644
--- a/usr.sbin/pppd/demand.c
+++ b/usr.sbin/pppd/demand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: demand.c,v 1.9 2009/10/27 23:59:53 deraadt Exp $ */
+/* $OpenBSD: demand.c,v 1.10 2011/04/30 18:49:38 nicm Exp $ */
/*
* demand.c - Support routines for demand-dialling.
@@ -116,50 +116,6 @@ demand_conf()
die(1);
}
-
-/*
- * demand_block - set each network protocol to block further packets.
- */
-void
-demand_block()
-{
- int i;
- struct protent *protp;
-
- for (i = 0; (protp = protocols[i]) != NULL; ++i)
- if (protp->enabled_flag && protp->demand_conf != NULL)
- sifnpmode(0, protp->protocol & ~0x8000, NPMODE_QUEUE);
- get_loop_output();
-}
-
-/*
- * demand_discard - set each network protocol to discard packets
- * with an error.
- */
-void
-demand_discard()
-{
- struct packet *pkt, *nextpkt;
- int i;
- struct protent *protp;
-
- for (i = 0; (protp = protocols[i]) != NULL; ++i)
- if (protp->enabled_flag && protp->demand_conf != NULL)
- sifnpmode(0, protp->protocol & ~0x8000, NPMODE_ERROR);
- get_loop_output();
-
- /* discard all saved packets */
- for (pkt = pend_q; pkt != NULL; pkt = nextpkt) {
- nextpkt = pkt->next;
- free(pkt);
- }
- pend_q = NULL;
- framelen = 0;
- flush_flag = 0;
- escape_flag = 0;
- fcs = PPP_INITFCS;
-}
-
/*
* demand_drop - set each network protocol to discard packets
* without an error.
diff --git a/usr.sbin/pppd/main.c b/usr.sbin/pppd/main.c
index 55290d782db..6dd56bede14 100644
--- a/usr.sbin/pppd/main.c
+++ b/usr.sbin/pppd/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.48 2009/10/27 23:59:53 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.49 2011/04/30 18:49:38 nicm Exp $ */
/*
* main.c - Point-to-Point Protocol main module
@@ -1669,27 +1669,3 @@ script_setenv(var, value)
script_env[i] = newstring;
script_env[i+1] = 0;
}
-
-/*
- * script_unsetenv - remove a variable from the environment
- * for scripts.
- */
-void
-script_unsetenv(var)
- char *var;
-{
- int vl = strlen(var);
- int i;
- char *p;
-
- if (script_env == 0)
- return;
- for (i = 0; (p = script_env[i]) != 0; ++i) {
- if (strncmp(p, var, vl) == 0 && p[vl] == '=') {
- free(p);
- while ((script_env[i] = script_env[i+1]) != 0)
- ++i;
- break;
- }
- }
-}
diff --git a/usr.sbin/pppd/pppd.h b/usr.sbin/pppd/pppd.h
index 0c946d059d0..815b8bed73a 100644
--- a/usr.sbin/pppd/pppd.h
+++ b/usr.sbin/pppd/pppd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pppd.h,v 1.16 2007/06/04 14:59:45 henning Exp $ */
+/* $OpenBSD: pppd.h,v 1.17 2011/04/30 18:49:38 nicm Exp $ */
/*
* pppd.h - PPP daemon global declarations.
@@ -212,7 +212,6 @@ void print_string(char *, int, void (*) (void *, char *, ...), void *);
int fmtmsg(char *, int, char *, ...); /* snprintf++ */
int vfmtmsg(char *, int, char *, va_list); /* vsnprintf++ */
void script_setenv(char *, char *); /* set script env var */
-void script_unsetenv(char *); /* unset script env var */
/* Procedures exported from auth.c */
void link_required(int); /* we are starting to use the link */
@@ -246,10 +245,8 @@ void check_access(FILE *, char *);
/* Procedures exported from demand.c */
void demand_conf(void); /* config interface(s) for demand-dial */
-void demand_block(void); /* set all NPs to queue up packets */
void demand_drop(void); /* set all NPs to drop packets */
void demand_unblock(void); /* set all NPs to pass packets */
-void demand_discard(void); /* set all NPs to discard packets */
void demand_rexmit(int); /* retransmit saved frames for an NP */
int loop_chars(unsigned char *, int); /* process chars from loopback */
int loop_frame(unsigned char *, int); /* process frame from loopback */