summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/tun.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-08-05 10:32:16 +0000
committerbrian <brian@FreeBSD.org>1999-08-05 10:32:16 +0000
commit75000c38838f6ae4afe9de4dd06bd3fde6120e1b (patch)
tree26404e4742c87264dac32602be9ec171a2100df1 /usr.sbin/ppp/tun.c
parentc32597f76112e043f5178c1c2237ad6d753da072 (diff)
downloadFreeBSD-src-75000c38838f6ae4afe9de4dd06bd3fde6120e1b.zip
FreeBSD-src-75000c38838f6ae4afe9de4dd06bd3fde6120e1b.tar.gz
o Obsolete the undocumented ``set weight'' command.
o If we're using RADIUS and the RADIUS mtu is less than our peers mru/mrru, reduce our mtu to this value for NetBSD too. o Make struct throughput's sample period dynamic and tweak the ppp version number to reflect the extra stuff being passed through the local domain socket as a result (MP mode). o Measure the current throughput based on the number of samples actually taken rather than on the full sample period. o Keep the throughput statisics persistent while being passed to another ppp invocation through the local domain socket. o When showing throughput statistics after the timer has stopped, use the stopped time for overall calculations, not the current time. Also show the stopped time and how long the current throughput has been sampled for. o Use time() consistently in throughput.c o Tighten up the ``show bundle'' output. o Introduce the ``set bandwidth'' command. o Rewrite the ``set autoload'' command. It now takes three arguments and works based on a rolling bundle throughput average compared against the theoretical bundle bandwidth over a given period (read: it's now functional).
Diffstat (limited to 'usr.sbin/ppp/tun.c')
-rw-r--r--usr.sbin/ppp/tun.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/usr.sbin/ppp/tun.c b/usr.sbin/ppp/tun.c
index 179c8b2..b5a8b96 100644
--- a/usr.sbin/ppp/tun.c
+++ b/usr.sbin/ppp/tun.c
@@ -23,12 +23,14 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: tun.c,v 1.13 1999/04/26 08:54:34 brian Exp $
+ * $Id: tun.c,v 1.14 1999/05/08 11:07:53 brian Exp $
*/
#include <sys/param.h>
+#ifdef __OpenBSD__
#include <sys/socket.h> /* For IFF_ defines */
#include <net/if.h> /* For IFF_ defines */
+#endif
#include <netinet/in.h>
#include <net/if_types.h>
#include <net/if_tun.h>
@@ -95,17 +97,10 @@ tun_configure(struct bundle *bundle, int mtu)
memset(&info, '\0', sizeof info);
info.type = IFT_PPP;
-#ifndef NORADIUS
- if (bundle->radius.valid && bundle->radius.mtu && bundle->radius.mtu < mtu) {
- log_Printf(LogLCP, "Reducing MTU to radius value %lu\n",
- bundle->radius.mtu);
- info.mtu = bundle->radius.mtu;
- } else
-#endif
- info.mtu = mtu;
+ info.mtu = mtu;
- info.baudrate = bundle->ifSpeed;
-#ifdef __OpenBSD__
+ info.baudrate = bundle->bandwidth;
+#ifdef __OpenBSD__
info.flags = IFF_UP|IFF_POINTOPOINT;
#endif
if (ioctl(bundle->dev.fd, TUNSIFINFO, &info) < 0)
OpenPOWER on IntegriCloud