diff options
author | Atsushi Murai <amurai@FreeBSD.org> | 1995-02-26 12:18:08 +0000 |
---|---|---|
committer | Atsushi Murai <amurai@FreeBSD.org> | 1995-02-26 12:18:08 +0000 |
commit | 53c9f6c0c48df668bb8fa282cd0b12cb8690bcce (patch) | |
tree | d05da3a88d3d54962fad8582d501f1b7ad9500b9 /usr.sbin/ppp/os.c | |
parent | 550f8550ec70dde086df88fb9d38b44410d299bc (diff) | |
download | src-53c9f6c0c48df668bb8fa282cd0b12cb8690bcce.tar.gz src-53c9f6c0c48df668bb8fa282cd0b12cb8690bcce.zip |
New user Process PPP based on iij-ppp0.94beta2.
o Supporting SYNC SIO device (But need a device driver)
- add "set speed sync"
o Fixing bug for Predictor-1 function.
o Add new parameter that re-sent interval for set timeout commands.
o Improving RTT (Round Trip Time) and reducing processor time.
- Previous Timer service was using polling, and now using
SIGALRM ;-)
- A 0.94beta2 will not work correctly....
-- Follows are additinal feature not including 0.94beta2
o Support Proxy ARP
- add "enable/disable proxy" commands
o Marging common routine in CHAP/PAP.
o Enhancing LCP/IPCP log information.
o Support local Authfication connection on port 300x and tty.
- You can set up pair of your "hostname -s" and
password in ppp.secret. if either ppp.secret file nor
your hostname line don't exist, It will notify a message
and working as same as previous version.(Backword compatibility)
- If you did set up them, It's allow connection but nothing to do
except help and passwd command.
- add "passwd yourpasswd" commands
o Support afilter - keep Alive filter that a packet can send/receiving
according to ifilter/ofilter but doesn't count it as preventing idle
timer expires.
- Same syntax of other filters.
o Fixing bugs reported by current user for previous one. Thanks !!
Reviewed by: Atsushi Murai (amurai@spec.co.jp)
Notes
Notes:
svn path=/head/; revision=6735
Diffstat (limited to 'usr.sbin/ppp/os.c')
-rw-r--r-- | usr.sbin/ppp/os.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/usr.sbin/ppp/os.c b/usr.sbin/ppp/os.c index 72da1c6bfbc5..11fb9a66ef56 100644 --- a/usr.sbin/ppp/os.c +++ b/usr.sbin/ppp/os.c @@ -16,20 +16,15 @@ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * + * * $Id:$ - * - * TODO: + * */ #include "fsm.h" #include <sys/param.h> #include <sys/socket.h> #include <net/route.h> -#if __FreeBSD__ >= 2 -#include <osreldate.h> -#endif -#if defined(__NetBSD__) || _BSDI_VERSION >= 199312 || __FreeBSD_version >=199412 +#if BSD >= 199206 || _BSDI_VERSION >= 199312 #include <sys/select.h> #endif #include <sys/ioctl.h> @@ -39,6 +34,7 @@ #include <errno.h> #include "ipcp.h" #include "os.h" +#include "vars.h" static struct ifaliasreq ifra; static struct ifreq ifrq; @@ -69,7 +65,10 @@ int updown; } if (updown == 0) { + if (Enabled(ConfProxy)) + cifproxyarp(s, oldhis.s_addr); if (oldmine.s_addr == 0 && oldhis.s_addr == 0) { + close(s); return(0); } bzero(&ifra.ifra_addr, sizeof(ifra.ifra_addr)); @@ -80,6 +79,7 @@ int updown; #endif if (ioctl(s, SIOCDIFADDR, &ifra) < 0) { perror("SIOCDIFADDR"); + close(s); return(-1); } @@ -147,8 +147,11 @@ int updown; #endif } else if (ioctl(s, SIOCAIFADDR, &ifra) < 0) { perror("SIOCAIFADDR"); + close(s); return(-1); } + if (Enabled(ConfProxy)) + sifproxyarp(s, hisaddr.s_addr); } close(s); return(0); @@ -235,15 +238,10 @@ OsSetInterfaceParams(type, mtu, speed) int type, mtu, speed; { struct tuninfo info; -#if __FreeBSD__ >= 2 - info.tif_type = type; - info.tif_mtu = mtu; - info.tif_baudrate = speed; -#else - info.if_type = type; - info.if_mtu = mtu; - info.if_baudrate = speed; -#endif + + info.type = type; + info.mtu = mtu; + info.baudrate = speed; if (ioctl(tun_out, TUNSIFINFO, &info) < 0) perror("TUNSIFINFO"); } |