diff options
author | Brian Somers <brian@FreeBSD.org> | 1998-03-20 19:48:28 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 1998-03-20 19:48:28 +0000 |
commit | 2f7866811e62f81cb5c8adc015e3bb373410eaeb (patch) | |
tree | 3447424cf5c2f9d0c9bcf9288c149f51561a3fb9 /usr.sbin/ppp | |
parent | 62043f48c61c8561f8ef5a8bfb2fed9b1fc8d942 (diff) | |
download | src-2f7866811e62f81cb5c8adc015e3bb373410eaeb.tar.gz src-2f7866811e62f81cb5c8adc015e3bb373410eaeb.zip |
Make struct bundle into a sort of `struct descriptor'.
It does the fdsets/reads/writes for each of it's
datalinks.
Notes
Notes:
svn path=/cvs2svn/branches/MP/; revision=34722
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/arp.c | 3 | ||||
-rw-r--r-- | usr.sbin/ppp/bundle.c | 76 | ||||
-rw-r--r-- | usr.sbin/ppp/bundle.h | 8 | ||||
-rw-r--r-- | usr.sbin/ppp/ccp.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/chat.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/command.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/datalink.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/descriptor.h | 5 | ||||
-rw-r--r-- | usr.sbin/ppp/ip.c | 3 | ||||
-rw-r--r-- | usr.sbin/ppp/ipcp.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/lcp.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/link.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/main.c | 16 | ||||
-rw-r--r-- | usr.sbin/ppp/modem.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/physical.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/physical.h | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/prompt.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/route.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/server.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/tun.c | 3 | ||||
-rw-r--r-- | usr.sbin/ppp/vjcomp.c | 3 |
21 files changed, 108 insertions, 61 deletions
diff --git a/usr.sbin/ppp/arp.c b/usr.sbin/ppp/arp.c index a99458534b25..9a6d4a6093fa 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.7 1998/03/16 22:51:37 brian Exp $ + * $Id: arp.c,v 1.27.2.8 1998/03/16 22:53:25 brian Exp $ * */ @@ -61,6 +61,7 @@ #include "slcompress.h" #include "ipcp.h" #include "filter.h" +#include "descriptor.h" #include "bundle.h" #include "arp.h" diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c index 951e3ab3d2b9..d0cb803f2e81 100644 --- a/usr.sbin/ppp/bundle.c +++ b/usr.sbin/ppp/bundle.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bundle.c,v 1.1.2.29 1998/03/18 23:15:29 brian Exp $ + * $Id: bundle.c,v 1.1.2.30 1998/03/19 22:25:44 brian Exp $ */ #include <sys/param.h> @@ -60,6 +60,7 @@ #include "ipcp.h" #include "link.h" #include "filter.h" +#include "descriptor.h" #include "bundle.h" #include "loadalias.h" #include "vars.h" @@ -69,7 +70,6 @@ #include "lcp.h" #include "ccp.h" #include "async.h" -#include "descriptor.h" #include "physical.h" #include "modem.h" #include "main.h" @@ -296,9 +296,55 @@ bundle_Close(struct bundle *bundle, const char *name, int staydown) } } -/* - * Open tunnel device and returns its descriptor - */ +static int +bundle_UpdateSet(struct descriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n) +{ + struct bundle *bundle = descriptor2bundle(d); + struct datalink *dl; + int result; + + result = 0; + for (dl = bundle->links; dl; dl = dl->next) + result += descriptor_UpdateSet(&dl->desc, r, w, e, n); + + return result; +} + +static int +bundle_IsSet(struct descriptor *d, const fd_set *fdset) +{ + struct bundle *bundle = descriptor2bundle(d); + struct datalink *dl; + + for (dl = bundle->links; dl; dl = dl->next) + if (descriptor_IsSet(&dl->desc, fdset)) + return 1; + + return 0; +} + +static void +bundle_DescriptorRead(struct descriptor *d, struct bundle *bundle, + const fd_set *fdset) +{ + struct datalink *dl; + + for (dl = bundle->links; dl; dl = dl->next) + if (descriptor_IsSet(&dl->desc, fdset)) + descriptor_Read(&dl->desc, bundle, fdset); +} + +static void +bundle_DescriptorWrite(struct descriptor *d, struct bundle *bundle, + const fd_set *fdset) +{ + struct datalink *dl; + + for (dl = bundle->links; dl; dl = dl->next) + if (descriptor_IsSet(&dl->desc, fdset)) + descriptor_Write(&dl->desc, bundle, fdset); +} + #define MAX_TUN 256 /* @@ -413,6 +459,13 @@ bundle_Create(const char *prefix) return NULL; } + bundle.desc.type = BUNDLE_DESCRIPTOR; + bundle.desc.next = NULL; + bundle.desc.UpdateSet = bundle_UpdateSet; + bundle.desc.IsSet = bundle_IsSet; + bundle.desc.Read = bundle_DescriptorRead; + bundle.desc.Write = bundle_DescriptorWrite; + ipcp_Init(&bundle.ncp.ipcp, &bundle, &bundle.links->physical->link, &bundle.fsm); @@ -730,19 +783,6 @@ bundle2link(struct bundle *bundle, const char *name) } int -bundle_UpdateSet(struct bundle *bundle, fd_set *r, fd_set *w, fd_set *e, int *n) -{ - struct datalink *dl; - int result; - - result = 0; - for (dl = bundle->links; dl; dl = dl->next) - result += descriptor_UpdateSet(&dl->desc, r, w, e, n); - - return result; -} - -int bundle_FillQueues(struct bundle *bundle) { struct datalink *dl; diff --git a/usr.sbin/ppp/bundle.h b/usr.sbin/ppp/bundle.h index 958368ab81e3..4ff73c21eaad 100644 --- a/usr.sbin/ppp/bundle.h +++ b/usr.sbin/ppp/bundle.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bundle.h,v 1.1.2.18 1998/03/16 22:53:06 brian Exp $ + * $Id: bundle.h,v 1.1.2.19 1998/03/18 23:15:31 brian Exp $ */ #define PHASE_DEAD 0 /* Link is dead */ @@ -38,6 +38,7 @@ struct physical; struct link; struct bundle { + struct descriptor desc; /* really all our datalinks */ int unit; /* The tun number */ int ifIndex; /* The interface number */ int tun_fd; /* The /dev/tunX descriptor */ @@ -72,6 +73,9 @@ struct bundle { } idle; }; +#define descriptor2bundle(d) \ + ((d)->type == BUNDLE_DESCRIPTOR ? (struct bundle *)(d) : NULL) + extern struct bundle *bundle_Create(const char *); extern void bundle_Destroy(struct bundle *); extern const char *bundle_PhaseName(struct bundle *); @@ -85,8 +89,6 @@ extern void bundle_Close(struct bundle *, const char *, int); extern void bundle_Open(struct bundle *, const char *name); extern void bundle_LinkClosed(struct bundle *, struct datalink *); -extern int bundle_UpdateSet(struct bundle *, fd_set *, fd_set *, fd_set *, - int *); extern int bundle_FillQueues(struct bundle *); extern int bundle_ShowLinks(struct cmdargs const *); extern void bundle_StartIdleTimer(struct bundle *); diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c index 3f1fd3e9f17a..071fb22cf8ad 100644 --- a/usr.sbin/ppp/ccp.c +++ b/usr.sbin/ppp/ccp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ccp.c,v 1.30.2.25 1998/03/18 23:16:05 brian Exp $ + * $Id: ccp.c,v 1.30.2.26 1998/03/20 19:46:41 brian Exp $ * * TODO: * o Support other compression protocols @@ -50,8 +50,8 @@ #include "slcompress.h" #include "ipcp.h" #include "filter.h" -#include "bundle.h" #include "descriptor.h" +#include "bundle.h" #include "prompt.h" #include "lqr.h" #include "hdlc.h" diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c index bbfc7bf77e1a..de84a18e73c7 100644 --- a/usr.sbin/ppp/chat.c +++ b/usr.sbin/ppp/chat.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: chat.c,v 1.44.2.15 1998/03/13 00:43:55 brian Exp $ + * $Id: chat.c,v 1.44.2.16 1998/03/13 21:07:59 brian Exp $ */ #include <sys/param.h> @@ -296,7 +296,7 @@ chat_UpdateSet(struct descriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n) } static int -chat_IsSet(struct descriptor *d, fd_set *fdset) +chat_IsSet(struct descriptor *d, const fd_set *fdset) { struct chat *c = descriptor2chat(d); return Physical_IsSet(&c->physical->desc, fdset); diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index c196c3543a05..3f03545b5e5a 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: command.c,v 1.131.2.40 1998/03/16 22:53:38 brian Exp $ + * $Id: command.c,v 1.131.2.41 1998/03/17 22:29:05 brian Exp $ * */ #include <sys/param.h> @@ -66,6 +66,7 @@ #include "vars.h" #include "systems.h" #include "filter.h" +#include "descriptor.h" #include "bundle.h" #include "main.h" #include "route.h" @@ -74,7 +75,6 @@ #include "auth.h" #include "async.h" #include "link.h" -#include "descriptor.h" #include "physical.h" #include "server.h" #include "prompt.h" diff --git a/usr.sbin/ppp/datalink.c b/usr.sbin/ppp/datalink.c index 6aaad7f329aa..2dfb62614fb6 100644 --- a/usr.sbin/ppp/datalink.c +++ b/usr.sbin/ppp/datalink.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: datalink.c,v 1.1.2.25 1998/03/18 21:53:56 brian Exp $ + * $Id: datalink.c,v 1.1.2.26 1998/03/18 21:54:03 brian Exp $ */ #include <sys/param.h> @@ -278,7 +278,7 @@ datalink_UpdateSet(struct descriptor *d, fd_set *r, fd_set *w, fd_set *e, } static int -datalink_IsSet(struct descriptor *d, fd_set *fdset) +datalink_IsSet(struct descriptor *d, const fd_set *fdset) { struct datalink *dl = descriptor2datalink(d); diff --git a/usr.sbin/ppp/descriptor.h b/usr.sbin/ppp/descriptor.h index 93f2ffbf4d61..77263c1185c0 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.6 1998/02/16 00:00:03 brian Exp $ + * $Id: descriptor.h,v 1.1.2.7 1998/02/23 00:38:28 brian Exp $ */ #define PHYSICAL_DESCRIPTOR (1) @@ -31,13 +31,14 @@ #define PROMPT_DESCRIPTOR (3) #define CHAT_DESCRIPTOR (4) #define DATALINK_DESCRIPTOR (5) +#define BUNDLE_DESCRIPTOR (6) struct descriptor { int type; struct descriptor *next; int (*UpdateSet)(struct descriptor *, fd_set *, fd_set *, fd_set *, int *); - int (*IsSet)(struct descriptor *, fd_set *); + int (*IsSet)(struct descriptor *, const fd_set *); void (*Read)(struct descriptor *, struct bundle *, const fd_set *); void (*Write)(struct descriptor *, struct bundle *, const fd_set *); }; diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c index c9c896536246..7f85c5cb3411 100644 --- a/usr.sbin/ppp/ip.c +++ b/usr.sbin/ppp/ip.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ip.c,v 1.38.2.13 1998/03/16 22:52:17 brian Exp $ + * $Id: ip.c,v 1.38.2.14 1998/03/16 22:53:51 brian Exp $ * * TODO: * o Return ICMP message for filterd packet @@ -62,6 +62,7 @@ #include "slcompress.h" #include "ipcp.h" #include "filter.h" +#include "descriptor.h" #include "bundle.h" #include "vjcomp.h" #include "lcp.h" diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 450fc975f5ce..f8e8f1a7872d 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.24 1998/03/16 22:53:53 brian Exp $ + * $Id: ipcp.c,v 1.50.2.25 1998/03/20 19:46:49 brian Exp $ * * TODO: * o More RFC1772 backwoard compatibility @@ -53,6 +53,7 @@ #include "slcompress.h" #include "ipcp.h" #include "filter.h" +#include "descriptor.h" #include "bundle.h" #include "loadalias.h" #include "vars.h" @@ -63,7 +64,6 @@ #include "hdlc.h" #include "async.h" #include "link.h" -#include "descriptor.h" #include "physical.h" #include "id.h" #include "arp.h" diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c index 2b32560e23b0..d4c9c8604760 100644 --- a/usr.sbin/ppp/lcp.c +++ b/usr.sbin/ppp/lcp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: lcp.c,v 1.55.2.30 1998/03/16 22:54:02 brian Exp $ + * $Id: lcp.c,v 1.55.2.31 1998/03/20 19:46:55 brian Exp $ * * TODO: * o Limit data field length by MRU @@ -55,6 +55,7 @@ #include "ipcp.h" #include "lcpproto.h" #include "filter.h" +#include "descriptor.h" #include "bundle.h" #include "lqr.h" #include "hdlc.h" @@ -70,7 +71,6 @@ #include "modem.h" #include "tun.h" #include "link.h" -#include "descriptor.h" #include "physical.h" #include "prompt.h" #include "chat.h" diff --git a/usr.sbin/ppp/link.c b/usr.sbin/ppp/link.c index ea1e8fd9faed..c2511f565487 100644 --- a/usr.sbin/ppp/link.c +++ b/usr.sbin/ppp/link.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: link.c,v 1.1.2.12 1998/03/16 22:52:24 brian Exp $ + * $Id: link.c,v 1.1.2.13 1998/03/16 22:54:05 brian Exp $ * */ @@ -52,8 +52,8 @@ #include "slcompress.h" #include "ipcp.h" #include "filter.h" -#include "bundle.h" #include "descriptor.h" +#include "bundle.h" #include "prompt.h" void diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c index b86ece4982d7..25724a5f2885 100644 --- a/usr.sbin/ppp/main.c +++ b/usr.sbin/ppp/main.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: main.c,v 1.121.2.34 1998/03/16 22:53:11 brian Exp $ + * $Id: main.c,v 1.121.2.35 1998/03/16 22:54:10 brian Exp $ * * TODO: * o Add commands for traffic summary, version display, etc. @@ -63,6 +63,7 @@ #include "slcompress.h" #include "ipcp.h" #include "filter.h" +#include "descriptor.h" #include "bundle.h" #include "loadalias.h" #include "vars.h" @@ -77,7 +78,6 @@ #include "tun.h" #include "route.h" #include "link.h" -#include "descriptor.h" #include "physical.h" #include "server.h" #include "prompt.h" @@ -521,7 +521,7 @@ DoLoop(struct bundle *bundle) handle_signals(); - bundle_UpdateSet(bundle, &rfds, &wfds, &efds, &nfds); + descriptor_UpdateSet(&bundle->desc, &rfds, &wfds, &efds, &nfds); descriptor_UpdateSet(&server.desc, &rfds, &wfds, &efds, &nfds); /* If there are aren't many packets queued, look for some more. */ @@ -563,11 +563,11 @@ DoLoop(struct bundle *bundle) if (descriptor_IsSet(&prompt.desc, &rfds)) descriptor_Read(&prompt.desc, bundle, &rfds); - /* XXX FIX ME ! */ - if (descriptor_IsSet(&bundle2datalink(bundle, NULL)->desc, &wfds)) - descriptor_Write(&bundle2datalink(bundle, NULL)->desc, bundle, &wfds); - if (descriptor_IsSet(&bundle2datalink(bundle, NULL)->desc, &rfds)) - descriptor_Read(&bundle2datalink(bundle, NULL)->desc, bundle, &rfds); + if (descriptor_IsSet(&bundle->desc, &wfds)) + descriptor_Write(&bundle->desc, bundle, &wfds); + + if (descriptor_IsSet(&bundle->desc, &rfds)) + descriptor_Read(&bundle->desc, bundle, &rfds); if (bundle->tun_fd >= 0 && FD_ISSET(bundle->tun_fd, &rfds)) { /* something to read from tun */ diff --git a/usr.sbin/ppp/modem.c b/usr.sbin/ppp/modem.c index 89c2103ce0ec..bf99890d0fd4 100644 --- a/usr.sbin/ppp/modem.c +++ b/usr.sbin/ppp/modem.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: modem.c,v 1.77.2.38 1998/03/18 21:53:48 brian Exp $ + * $Id: modem.c,v 1.77.2.39 1998/03/20 19:47:19 brian Exp $ * * TODO: */ @@ -65,9 +65,9 @@ #include "slcompress.h" #include "ipcp.h" #include "filter.h" +#include "descriptor.h" #include "bundle.h" #include "link.h" -#include "descriptor.h" #include "physical.h" #include "prompt.h" #include "chat.h" diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c index 2187be573b6b..9899847989b2 100644 --- a/usr.sbin/ppp/physical.c +++ b/usr.sbin/ppp/physical.c @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: physical.c,v 1.1.2.17 1998/03/16 22:52:38 brian Exp $ + * $Id: physical.c,v 1.1.2.18 1998/03/16 22:54:18 brian Exp $ * */ @@ -221,7 +221,7 @@ Physical_UpdateSet(struct descriptor *d, fd_set *r, fd_set *w, fd_set *e, } int -Physical_IsSet(struct descriptor *d, fd_set *fdset) +Physical_IsSet(struct descriptor *d, const fd_set *fdset) { struct physical *p = descriptor2physical(d); diff --git a/usr.sbin/ppp/physical.h b/usr.sbin/ppp/physical.h index 445e87b51fe1..f967537e9902 100644 --- a/usr.sbin/ppp/physical.h +++ b/usr.sbin/ppp/physical.h @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: physical.h,v 1.1.2.15 1998/03/13 00:44:51 brian Exp $ + * $Id: physical.h,v 1.1.2.16 1998/03/20 19:47:22 brian Exp $ * */ @@ -101,7 +101,7 @@ ssize_t Physical_Write(struct physical *phys, const void *buf, size_t nbytes); int Physical_ReportProtocolStatus(struct cmdargs const *); int Physical_UpdateSet(struct descriptor *, fd_set *, fd_set *, fd_set *, int *, int); -int Physical_IsSet(struct descriptor *, fd_set *); +int Physical_IsSet(struct descriptor *, const fd_set *); void Physical_DescriptorWrite(struct descriptor *, struct bundle *, const fd_set *); diff --git a/usr.sbin/ppp/prompt.c b/usr.sbin/ppp/prompt.c index 55efde4c5849..4b41b3ca4f8b 100644 --- a/usr.sbin/ppp/prompt.c +++ b/usr.sbin/ppp/prompt.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: prompt.c,v 1.1.2.14 1998/03/16 22:53:15 brian Exp $ + * $Id: prompt.c,v 1.1.2.15 1998/03/16 22:54:22 brian Exp $ */ #include <sys/param.h> @@ -95,7 +95,7 @@ prompt_UpdateSet(struct descriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n) } static int -prompt_IsSet(struct descriptor *d, fd_set *fdset) +prompt_IsSet(struct descriptor *d, const fd_set *fdset) { struct prompt *p = descriptor2prompt(d); LogPrintf(LogDEBUG, "descriptor2prompt; %p -> %p\n", d, p); diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c index c1c0a36fb57d..23268322e500 100644 --- a/usr.sbin/ppp/route.c +++ b/usr.sbin/ppp/route.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: route.c,v 1.42.2.11 1998/03/16 22:52:50 brian Exp $ + * $Id: route.c,v 1.42.2.12 1998/03/16 22:54:23 brian Exp $ * */ @@ -60,9 +60,9 @@ #include "slcompress.h" #include "ipcp.h" #include "filter.h" +#include "descriptor.h" #include "bundle.h" #include "route.h" -#include "descriptor.h" #include "prompt.h" static void diff --git a/usr.sbin/ppp/server.c b/usr.sbin/ppp/server.c index 1d7047508fd0..e6197c2cec5b 100644 --- a/usr.sbin/ppp/server.c +++ b/usr.sbin/ppp/server.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: server.c,v 1.16.2.7 1998/02/18 20:39:08 brian Exp $ + * $Id: server.c,v 1.16.2.8 1998/02/23 00:38:42 brian Exp $ */ #include <sys/param.h> @@ -69,7 +69,7 @@ server_UpdateSet(struct descriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n) } static int -server_IsSet(struct descriptor *d, fd_set *fdset) +server_IsSet(struct descriptor *d, const fd_set *fdset) { struct server *s = descriptor2server(d); diff --git a/usr.sbin/ppp/tun.c b/usr.sbin/ppp/tun.c index dc6a263029ba..500bcef9c31b 100644 --- a/usr.sbin/ppp/tun.c +++ b/usr.sbin/ppp/tun.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: tun.c,v 1.6.4.7 1998/03/16 22:52:52 brian Exp $ + * $Id: tun.c,v 1.6.4.8 1998/03/16 22:54:28 brian Exp $ */ #include <sys/param.h> @@ -56,6 +56,7 @@ #include "slcompress.h" #include "ipcp.h" #include "filter.h" +#include "descriptor.h" #include "bundle.h" #include "tun.h" diff --git a/usr.sbin/ppp/vjcomp.c b/usr.sbin/ppp/vjcomp.c index a1137f4b338c..8c688e82c29d 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.8 1998/03/16 22:52:54 brian Exp $ + * $Id: vjcomp.c,v 1.16.2.9 1998/03/16 22:54:32 brian Exp $ * * TODO: */ @@ -46,6 +46,7 @@ #include "ccp.h" #include "link.h" #include "filter.h" +#include "descriptor.h" #include "bundle.h" #include "vjcomp.h" |