Commit Graph

142 Commits

Author SHA1 Message Date
John Baldwin
6008862bc2 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
Joerg Wunsch
ee037f26bc Implement an option to administratively disable the negotiation of
IPv6 on an sppp interface.  In an IPv6-enabled kernel, every IPv6
interface automatically gets an IPv6 address assigned (and IPv6
multicast packets sent at initialization time).  For sppp links where
we know our remote peer wouldn't support IPv6 at all, there's no point
in attempting to negotiate IPV6CP (or to even dial out for an IPv6
packet at all for dial-on-demand interfaces).

I wish there were a more generic way to administratively disable IPv6
on an interface instead.  ume told me there isn't.

While i was at it, converted both, enable_vj and enable_ipv6 into flag
bits in struct sppp (enable_vj used to be an int of its own).

MFC after:	1 month
2001-12-30 20:42:29 +00:00
Joerg Wunsch
909b37a414 Merge last-minute fix from the i4b file made by gj:
Protect mtx_init() invocations with mtx_intialized() checks to avoid a
reported panic.

MFC after:	1 month
2001-12-30 19:02:27 +00:00
Joerg Wunsch
e168d42851 We explicitly close LCP when going to state CLOSED, so we better open
it again when going from INITIAL to STARTING. This has been done for
passive or auto-conecting interfaces always, but not for permanent
ones.

Obtained from:	NetBSD (rev 1.32)
2001-12-30 18:39:38 +00:00
Joerg Wunsch
dda374a24d run IPCP only if we have IPv4 in kernel
Obtained from:	NetBSD (rev 1.19)
MFC after:	1 month
2001-12-30 18:07:26 +00:00
Joerg Wunsch
dd966920a7 Fix a long-standing blatant bug where the operator precedence between
& and && has been botched.  This was likely the cause for some havoc
with various negotiation cases of sppp in the past.

Obtained from:	NetBSD (rev 1.13)
MFC after:	1 week
2001-12-30 17:12:28 +00:00
Joerg Wunsch
d0543e885a Fix compilation without INET (though not really tested yet without
INET).

Obtained from:	NetBSD (rev 1.12)
MFC after:	1 month
2001-12-30 17:00:32 +00:00
Joerg Wunsch
61e3f21a46 Add the `packed' attribute to structures which describe wire protocol
data formats.

Obtained from:	NetBSD (rev 1.6)
MFC after:	1 month
2001-12-30 16:52:40 +00:00
Joerg Wunsch
39b6f10cfb Extend the hack where 0.0.0.1 meant `any address for remote is
acceptable' to addresses 0.0.0.*.  This allows for multiple such
interfaces.

MFC after:	1 month
2001-12-30 16:40:00 +00:00
Joerg Wunsch
64b158ad3c Fix the handling of VJ uncompression. Unfortunately, tcp_uncompress()
makes the implied assumption there were another 128 bytes of space in
front of the packet handed off to it... which is not the case for
sppp.  This could easily end up in corrupting random memory.

This fix is about the same as revs 1.6, 1.8, and 1.9 from our
i4b_ispppsubr.c.

Also fixed IPCP option negotiation to zero out the options when
starting IPCP.  Otherwise, if negotiation parameters change between
various IPCP startups, it could happen that old options would still be
requested (this happened if VJ was turned off, and ended up in half
off the link still negotiating for VJ compression).

IMHO, the base system's sppp is now feature-wise up to date with the
one in the i4b part of the tree, so the latter can be disabled.

MFC after:	1 month
2001-12-30 16:13:35 +00:00
Joerg Wunsch
351fdc3fa9 Convert sppp_params() to use a malloced structure in order to reduce
kernel stack usage.

This effectively merges rev 1.3 of i4b's i4b_ispppsubr.c.

MFC after:	1 month
2001-12-28 23:36:35 +00:00
Joerg Wunsch
47d6b4a644 Fix my breakage to the low-level hardware sync drivers brought by the
inclusion of VJ compression into sppp.

Now, instead of the need to include this and that and everything plus
the kitchensink in each of those drivers, struct sppp uses struct
slcompress as an opaque structure only referenced by a pointer.  The
actual structure is then malloced at initialization time.

While i was at it, also fixed a bug where received VJ packets would only
be recognized if INET6 was defined.
2001-12-28 23:20:12 +00:00
Joerg Wunsch
5450aa1239 Implement timestamps so i4b/driver/i4b_isppp.c can derive the idle
time from the PPP packets sent.  This effectively merges rev 1.2 of
the old i4b_ispppsubr.c, with the exception that i eventually ended up
in debugging and fixing it so the idle time is now really
detected. ;-)  (The version in i4b simply doesn't work right since it
still accounts for incoming LCP echo packets which it is supposed to
ignore for idle time considerations...)

Obtained from:	i4b
MFC after:	1 month
2001-12-28 15:59:54 +00:00
Joerg Wunsch
39cb697c8c Break out the relevant fields from struct sppp into a struct
sppp_parms that are needed for the SPPPIO[GS]DEFS ioctl commands.
This allows it to keep struct sppp inside #ifdef _KERNEL (where it
belongs), and prevents userland programs that wish to include
<net/if_sppp.h> from including the earth, the hell, and the universe
before the are able to resolve all the kernel-internal stuff that's in
struct sppp.

Discussed with:	hm
MFC after:	1 month
2001-12-27 22:38:50 +00:00
Joerg Wunsch
ea77971c6c Make the LCP restart timer configurable.
This (effectively) merges rev 1.36 of i4b's old if_spppsubr.c, albeit
in a slightly different manner (we export the timer in millisecond
values as exposed to tick values from/to userland).

Obtained from:	i4b
MFC after:	1 month
2001-12-27 21:20:05 +00:00
Joerg Wunsch
1a5d6f5e0b Implement VJ header compression for sppp.
This is the logical merge of rev 1.32 of i4b's old if_spppsubr.c (which
was based on PR misc/11767), plus (i4b) rev 1.6 of i4b's if_ispppsubr.c,
albeit with numerous stylistic and cosmetic changes.

PR:		misc/11767
Submitted by:	i4b, Joachim Kuebart
MFC after:	1 month
2001-12-27 16:49:31 +00:00
Joerg Wunsch
64dce2fedb Don't log RXJ+ protocol rejects unless we are in debug mode. (RXJ-
events are always logged.)  This stops sppp from spamming the syslog
files in case the remote peer is not configured to negotiate IPv6.
2001-12-26 22:36:59 +00:00
Joerg Wunsch
248f19ee7b Ignore (and silently conf-ack) conf-reqs for an Async-Control-
Character-Map.  RFC 1662 demands it for the sake of async to sync
PPP protocol converters (like Win9* :).

This merges rev 1.26/1.27 of the old i4b sppp changes.
2001-12-26 22:00:13 +00:00
Joerg Wunsch
572310c609 For SIOCSIFADDR, don't call if_up() since it would attempt to add the
route to the destination twice.  Now that brian has fixed route.c to no
longer accept this second route, this long-standing nuisance became a
showstopper bug for sppp users.

In retrospect, this is the same fix as the one in rev 1.78 of if_sl.c;
most likely the original version of sppp has been cloned from SLIP. ;-)
2001-12-26 20:28:41 +00:00
Jonathan Lemon
25871c13b8 Update the hash table when sppp mucks directly with the interface address. 2001-10-01 18:14:49 +00:00
Hajimu UMEMOTO
79e15ef30c If LCP proto-rej is received, drop the protocol mentioned by the message.
This is to be friendly with non-IPv6 peer (If the peer complains due to
lack of IPv6CP, drop IPv6CP).  This basically implements "RXJ+" state
transition in the RFC.

Obtained from:	NetBSD
2001-07-31 07:27:01 +00:00
Peter Wemm
6cac567e1b Fix warning: 848: warning: label `nosupport' defined but not used 2001-06-15 07:33:09 +00:00
Hajimu UMEMOTO
e22115bbf1 Make compilable. addlog(...) was replaced with log(-1, ...)
Reported by:	peter
2001-06-13 17:30:55 +00:00
Hajimu UMEMOTO
46f48be960 Restore the code wrongly nuked by previous commit.
Following changed was made by previous commit:

  - IPV6CP supporting in kernel level ppp from NetBSD.

Submitted by:	y.shirasaki@ntt.com
2001-06-12 08:52:54 +00:00
Hajimu UMEMOTO
3384154590 Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
  - The definitions of SADB_* in sys/net/pfkeyv2.h are still different
    from RFC2407/IANA assignment because of binary compatibility
    issue.  It should be fixed under 5-CURRENT.
  - ip6po_m member of struct ip6_pktopts is no longer used.  But, it
    is still there because of binary compatibility issue.  It should
    be removed under 5-CURRENT.

Reviewed by:	itojun
Obtained from:	KAME
MFC after:	3 weeks
2001-06-11 12:39:29 +00:00
Joerg Wunsch
9a82806973 Move the decision whether we want to request authentication from our
peer out from sppp_lcp_open() to sppp_lcp_up().  For one, this makes
things look more symmetrical to sppp_lcp_close(), and somehow it also
just occurred to me that an Up event following the open caused the
value of the authentication option to be clobbered.
2001-04-08 20:29:09 +00:00
Joerg Wunsch
728eb83bf2 This is another MFC candidate.
Fix a serious bug in sppp where anyone could obtain a successful PAP
authentication by supplying a null password.  I've only stumpled across
the PR while browsing for all sppp-related PRs.

Should we also file a security advisory for this?

PR:		21592
Submitted by:	<dli@3bc.de> Dirk Liebke
2001-03-25 09:53:07 +00:00
Joerg Wunsch
8d21ca78d9 (MFC candidate, see below).
When we get an Open event in stopped state, experience shows that this
is usually means we've somehow missed a previous Down event.  This has
occasionally bitten people for the IPCP layer with ISDN, apparently a
previously aborted IPCP negotiation must have caused this.  As a
bandaid, we quickly pretent a Down event by advancing to starting
state; this effectively implements the `restart' option mentioned in
RFC 1663.

While i'm not yet fully convinced this is the best thing to do (and is
fully compliant with RFC 1661), i've seen a number of reports here on
the German mailing lists where people have been bitten by the previous
behaviour which usually causes quickly looping ISDN reconnects (thus
loss of money...), and where just this patch fixes the problem.

For this, i'd even like to see it MFC'd if possible.

Submitted by:	Helmut Kreft <kreft@zeus.ai-lab.fh-furtwangen.de>
2001-03-23 19:51:12 +00:00
Poul-Henning Kamp
22f2982675 Use <sys/queue.h> macro api rather than fondle its implementation detals.
Created with:	/usr/bin/sed
Reviewed by:	/sbin/md5
2001-02-03 11:46:35 +00:00
John Hay
b4fbe18794 Various fixes to make leased line operation more robust. On lcp_up, start
to negotiate from scratch. Make leased lines survive being put into
loopback mode. Bits and pieces and ideas taken from PRs 11238 and 21771.
Make it a module so that it can be kldloaded. Whitespace cleanup. (Can be
ignored with "cvs diff -b".)

PR:		11238 and 21771 (bits and pieces)
2000-12-19 19:08:11 +00:00
Poul-Henning Kamp
4d88c4598f Make log(-1, ...) do what addlog(...) did.
Replace all uses of addlog(...) with log(-1, ...)

Remove bogus "register" keywords in subr_prf.c

Make log() return void.
2000-11-26 19:34:06 +00:00
Jonathan Lemon
df5e198723 Lock down the network interface queues. The queue mutex must be obtained
before adding/removing packets from the queue.  Also, the if_obytes and
if_omcasts fields should only be manipulated under protection of the mutex.

IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on
the queue.  An IF_LOCK macro is provided, as well as the old (mutex-less)
versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which
needs them, but their use is discouraged.

Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF,
which takes care of locking/enqueue, and also statistics updating/start
if necessary.
2000-11-25 07:35:38 +00:00
David E. O'Brien
b0e56cde37 * Use sys/sys/random.h rather than a i386 specific one.
* There was nothing that should be machine dependant about
  i386/isa/random_machdep.c, so it is now sys/kern/kern_random.c.
2000-04-24 17:30:08 +00:00
Peter Wemm
242c5536ea Clean up some loose ends in the network code, including the X.25 and ISO
#ifdefs.  Clean out unused netisr's and leftover netisr linker set gunk.
Tested on x86 and alpha, including world.

Approved by:	jkh
2000-02-13 03:32:07 +00:00
Yoshinobu Inoue
cfa1ca9dfa udp IPv6 support, IPv6/IPv4 tunneling support in kernel,
packet divert at kernel for IPv6/IPv4 translater daemon

This includes queue related patch submitted by jburkhol@home.com.

Submitted by: queue related patch from jburkhol@home.com
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
1999-12-07 17:39:16 +00:00
Joerg Wunsch
83cc7ae865 When getting a RCN event in state ACK_RCVD, RFC 1661 demands that we
go to REQ_SENT (and we probably should also log this since it should
only happen in a cross-linked connection).

Submitted by:	Mark Tinguely <tinguely@plains.NoDak.edu>
1999-10-29 17:57:42 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Poul-Henning Kamp
da3b4fb7ee rganize the various modes (CISCO/AUTO/DEMAND/LEASED) a little bit better,
centralize the code.

Remember to call TLF/TLS on the hardware in CISCO mode.
1999-03-30 13:28:26 +00:00
Poul-Henning Kamp
81f7312bfa Misplaces brace puts important code into debug section.
Reviewed by:	phk
Submitted by:	Stefan Bethke <stefan.bethke@hanse.de>
1999-02-23 15:08:44 +00:00
Poul-Henning Kamp
f19dd898a1 Remove all the #ifdef notyet stuff, it is probably never going to happen
in the first place.

Use 3sec timeout as recommended.

Reorder some debug messages.

Label som of the 0x%x in debug messages

Make sppp_print_bytes() use %*D and handle zero length.

If we don't have MAGIC numbers, don't yell loopback if 0 == 0
1999-02-19 13:45:09 +00:00
Poul-Henning Kamp
57814d04d4 Update sppp support to i4b level. This includes the new spppcontrol
program to set PPP options like authentication with.
1998-12-27 21:30:44 +00:00
Poul-Henning Kamp
cee7234916 More isdn4bsd convergence: cleanup log messages. 1998-12-26 13:14:45 +00:00
Poul-Henning Kamp
b2648215c6 Converge further on the isdn4bsd version of this file. 1998-12-26 12:43:26 +00:00
Poul-Henning Kamp
54f8640b04 clean up more timeout/untimeout portability stuff.
make sure flags and stuff are set sensibly.
1998-12-26 12:14:31 +00:00
Poul-Henning Kamp
11749a2453 Straigthen out the use of the tls and tlf callbacks.
Not tested on the if_sr, if_cx and if_ar drivers, but
expected to work just the same as it used to.

Any users of these drivers (or even better: donors
of hardware for them) please contact phk@freebsd.org
so we can test the next batch of changes to if_sppp.
1998-12-16 18:42:38 +00:00
Poul-Henning Kamp
34d528017b *** empty log message *** 1998-12-11 21:40:13 +00:00
Archie Cobbs
2127f26023 Examine all occurrences of sprintf(), strcat(), and str[n]cpy()
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.

These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by:	Mike Spengler <mks@networkcs.com>
1998-12-04 22:54:57 +00:00
Joerg Wunsch
825d77e5f0 Minor cleanup: kill a couple of unused variables, and a couple of
uninitialized variables.

Obtained from:	The isdn4bsd project (partially)
1998-10-06 21:12:45 +00:00
Joerg Wunsch
5158516f4e In an attempt to reduce the huge number of differences between the
FreeBSD repository version of this file and the isdn4bsd version,
adopt those changes from the i4b version that make this file
BSD-version independent.  I attempted to avoid uglifying this file too
much, thus deviated a little from the i4b version (and hope they will
adopt the changes, too).

The diffs mostly concentrate on:

. #include differences between the systems
. different callout handling between FreeBSD vs. Net/OpenBSD
. interface naming (Net/OpenBSD store the ASCII name including the
  unit # in struct ifnet, FreeBSD only the name)
. use of random() in FreeBSD vs. time-based pseudo-randomization in
  Net/OpenBSD (for loopback detection ad CHAP challenges -- i
  assume at least OpenBSD could also benefit from random(), but that's
  the way i've got this file)
. interface address list elements are named a little differently
  between FreeBSD and Net/OpenBSD

I attempted to segregate those compat fixes from other code fixes and
enhancements.

Obtained from:	The isdn4bsd project
1998-10-06 20:47:53 +00:00
Joerg Wunsch
f07c3e6c06 Fix a =/== confusion that caused the CHAP type renegotiation to
completely fail.

Obtained from:	The isdn4bsd project (original author unknown right now)
1998-10-05 21:02:30 +00:00
Bruce Evans
138d060a6e Fixed printf format errors. sppp_dotted_quad() was yet another private,
broken, version of inet_ntoa().  It should go away.
1998-08-17 00:29:34 +00:00
Bruce Evans
f9d8181868 Fixed yet more ioctl breakage due to the type of the `cmd' arg changing
from int to u_long but not changing here.
1998-08-15 21:58:09 +00:00
Bruce Evans
e5b19842ef Removed unused includes. 1998-06-21 14:53:44 +00:00
Poul-Henning Kamp
c21410e119 s/nanoruntime/nanouptime/g
s/microruntime/microuptime/g

Reviewed by:	bde
1998-05-17 11:53:46 +00:00
Poul-Henning Kamp
33b0bb6af7 Use random() for seq numbers and read_random for CHAP challenge. 1998-04-06 11:40:17 +00:00
Poul-Henning Kamp
2eeb0e2ea0 Make read_random() take a (void *) argument instead of (char *) 1998-04-06 09:30:42 +00:00
Poul-Henning Kamp
00af9731c9 Time changes mark 2:
* Figure out UTC relative to boottime.  Four new functions provide
      time relative to boottime.

    * move "runtime" into struct proc.  This helps fix the calcru()
      problem in SMP.

    * kill mono_time.

    * add timespec{add|sub|cmp} macros to time.h.  (XXX: These may change!)

    * nanosleep, select & poll takes long sleeps one day at a time

Reviewed by:    bde
Tested by:      ache and others
1998-04-04 13:26:20 +00:00
Poul-Henning Kamp
227ee8a188 Eradicate the variable "time" from the kernel, using various measures.
"time" wasn't a atomic variable, so splfoo() protection were needed
around any access to it, unless you just wanted the seconds part.

Most uses of time.tv_sec now uses the new variable time_second instead.

gettime() changed to getmicrotime(0.

Remove a couple of unneeded splfoo() protections, the new getmicrotime()
is atomic, (until Bruce sets a breakpoint in it).

A couple of places needed random data, so use read_random() instead
of mucking about with time which isn't random.

Add a new nfs_curusec() function.

Mark a couple of bogosities involving the now disappeard time variable.

Update ffs_update() to avoid the weird "== &time" checks, by fixing the
one remaining call that passwd &time as args.

Change profiling in ncr.c to use ticks instead of time.  Resolution is
the same.

Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call
hzto() which subtracts time" sequences.

Reviewed by:	bde
1998-03-30 09:56:58 +00:00
Bruce Evans
ddf6208225 Fixed syntax error in previous commit. 1998-03-01 06:01:33 +00:00
Poul-Henning Kamp
c544ff8a5e Make it possible to indicate that we don't care about the remote
sides IP address, as long as it isn't 0.0.0.0
1998-02-28 21:01:09 +00:00
Eivind Eklund
303b270b0a Staticize. 1998-02-09 06:11:36 +00:00
Eivind Eklund
1d5e9e2255 Make INET a proper option.
This will not make any of object files that LINT create change; there
might be differences with INET disabled, but hardly anything compiled
before without INET anyway.  Now the 'obvious' things will give a
proper error if compiled without inet - ipx_ip, ipfw, tcp_debug.  The
only thing that _should_ work (but can't be made to compile reasonably
easily) is sppp :-(

This commit move struct arpcom from <netinet/if_ether.h> to
<net/if_arp.h>.
1998-01-08 23:42:31 +00:00
Gary Jennejohn
d3341aa5db Reviewed by: Joerg Wunsch
In sppp_chap_input:
1) in the CHAP_CHALLENGE case don't output the peer's name if it is not
what we expected (DEBUG) since it will be printed out in the course
of events anyway.
2) in the CHAP_SUCCESS case test whether the peer is required to
authenticate himself [(sp->lcp.opts & (1 << LCP_OPT_AUTH_PROTO))],
otherwise the state machine may never switch into the network state.
I saw this case against 2 different ISPs; they never bothered to
authenticate themselves to me.

In sppp_pap_input:
in the PAP_ACK case do the same as in 2) above for the same reason.
1998-01-01 21:27:18 +00:00
Eivind Eklund
430df5f4b7 Throw options IPX, IPXIP and IPTUNNEL into opt_ipx.h.
The #ifdef IPXIP in netipx/ipx_if.h is OK (used from ipx_usrreq.c and
ifconfig.c only).

I also fixed a typo IPXTUNNEL -> IPTUNNEL (and #ifdef'ed out the code
inside, as it never could have compiled - doh.)
1997-12-15 20:31:25 +00:00
Joerg Wunsch
1f6b09ad8b Jumbo patch to implement PAP and CHAP for sppp(4). Partially based on
Serge's (Cronyx's) code in the vendor branch.  (FR support not yet
merged.)
1997-10-11 11:25:28 +00:00
Justin T. Gibbs
6c951b4441 Update for new callout interface. 1997-09-21 22:02:25 +00:00
Bruce Evans
4d1d4912ae Added used #include - don't depend on <sys/mbuf.h> including
<sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).
1997-09-02 01:19:47 +00:00
Kenjiro Cho
2c060c765a Fix a traceroute problem in the CISCO HDLC mode. (cisco routers not
returning ICMP_TIMXCEED)

use CISCO_UNICAST instead of CISCO_MULTICAST to send normal packets.
this is needed for packets to get processed by a cisco router,
but doesn't matter if a packet is just forwarded.

Reviewed by:itojun@itojun.org
1997-08-12 05:22:54 +00:00
Joerg Wunsch
16e2a68bff Implement the LCP fail_counter: if an option has been NAK'ed for more
than max_failures attempts, we are going to REJ it, to prevent endless
NAK loops.

(This is actually part of a larger local set of modifications i'm
running with, but the remainder (PAP & CHAP) ain't ready for prime-
time yet.)
1997-08-10 14:28:16 +00:00
Jun-ichiro itojun Hagino
16050303bd PR: kern/4117
Reviewed by:	ishii@csl.sony.co.jp, kjc@csl.sony.co.jp

checked with FreeBSD+Riscom - cisco4500 configuration.
1997-08-06 01:43:09 +00:00
Joerg Wunsch
75eeeb9273 Fix a couple of log()'s that came out with the wrong (default)
log level, as opposed to LOG_DEBUG.
1997-05-23 20:40:15 +00:00
Joerg Wunsch
32ef6b86b5 Introduce a third queue per interface, serving only PPP control
protocol packets.  This queue is the only one being enabled until
network phase has been reached.
1997-05-22 22:15:39 +00:00
Joerg Wunsch
07f0846feb Major nit: i've confused link0 and link1 in my brain and/or in either
the man page or the source file.  Fix this.

Minor problem: don't choke with ENETDOWN early.  As long as our output
queue has space, put the IP packets there even if IPCP ain't up yet.
We will eventually be able delivering them once the PPP state machine
came up.
1997-05-20 22:54:04 +00:00
Joerg Wunsch
00081cc989 Major overhaul of the SyncPPP layer. Basically, this comprises now a
full implementation of the sate machine as described in RFC1661, and
provides support for plugging in various control protocols.  I needed
this to provide PPP support for the BISDN project (right now).

Unfortunatley, while the existing API was almost up to the point, i
needed one minor API change in order to decouple the this-layer-
started and this-layer-finished actions from the respective Up and
Down events of the lower layer.  This requires two additional lines in
the attach routines of all existing lower layer interface drivers that
are using syncPPP (shortcutting these actions and events).  Apart from
this, i believe i didn't change the API of all this, so everything
should plug in without too many hassles.  Please report if i broke
something in the existing drivers.

For a list of features (including new ones like dial-on-demand), and
things still to be done, please refer to the man page i'll commit asap.

Encouraged by:	Serge Vakulenko <vak@cronyx.ru>
1997-05-19 22:03:09 +00:00
Joerg Wunsch
db99d43f6f Make sppp's logging human-readable. Also, use log(9), as opposed to
printf(9), so the log output doesn't clutter the console.

While i was at it, KNFified some function definitions.  This file was
very inconsistent in this respect.
1997-05-11 10:04:24 +00:00
Bruce Evans
51a534883a Don't include <sys/ioctl.h> in the kernel. Stage 2: include
<sys/sockio.h> instead of <sys/ioctl.h> in network files.
1997-03-24 11:33:46 +00:00
Peter Wemm
6875d25465 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Garrett Wollman
59562606b9 Convert the interface address and IP interface address structures
to TAILQs.  Fix places which referenced these for no good reason
that I can see (the references remain, but were fixed to compile
again; they are still questionable).
1996-12-13 21:29:07 +00:00
John Hay
a48bd49079 Get rid of the ifdef MULTICAST's. I think the rest of the kernel got rid
of them 2 years ago.
1996-08-30 16:44:36 +00:00
Gary Palmer
97d15c1062 Add $Id$ 1996-06-10 23:17:45 +00:00
Gary Palmer
e39a0280cb Change the use if ifnet.if_lastchange to be more in line with
SNMP requirements. Update description of ifnet.if_lastchange in if.h
to indicate this.
1996-06-10 23:07:36 +00:00
Poul-Henning Kamp
f708ef1b9e Another mega commit to staticize things. 1995-12-14 09:55:16 +00:00
Peter Wemm
968757cbee Implement some rudimentry IPX support... 1995-11-28 01:59:19 +00:00
Peter Wemm
8fb90141c8 If a lcp configure request is received in the lcp opened state and it
is acknowledged, it should go to the lcp ack sent state.

Don't reply on lcp echo requests when not in the lcp opened state.

If the interface is set to CISCO mode, it should still be marked
running when ifconfiged.

Fixed a few indentations that had gone wrong somewhere.

Submitted-by: John.Hay@csir.co.za
1995-11-21 01:23:13 +00:00
Julian Elischer
cc6a66f20e Reviewed by: julian and jhay@mikom.csir.co.za
Submitted by:	Mike Mitchell, supervisor@alb.asctmd.com

This is a bulk mport of Mike's IPX/SPX protocol stacks and all the
related gunf that goes with it..
it is not guaranteed to work 100% correctly at this time
but as we had several people trying to work on it
I figured it would be better to get it checked in so
they could all get teh same thing to work on..

Mikes been using it for a year or so
but on 2.0

more changes and stuff will be merged in from other developers now that this is in.

Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com
1995-10-26 20:31:59 +00:00
Jordan K. Hubbard
9e8433e6e0 This upgrades the driver for Cronyx-Sigma multiplexor boards
from version 1.2 to version 1.9.
Submitted by:	Serge Vakulenko, <vak@cronyx.ru>
1995-10-04 22:24:16 +00:00
Rodney W. Grimes
b2b795f07c Fix -Wformat warnings from LINT kernel. 1995-05-11 19:26:53 +00:00
Jordan K. Hubbard
e53e112497 Nuke some more compiler warnings, while I'm at it.. 1995-02-15 06:28:48 +00:00
Garrett Wollman
995add1a12 Add support for two separate cloning flags, one set by the lower layers,
and one set by the protocol family.  Also add another parameter to
rtalloc1() to allow for any interface flags to be ignored; currently
this is only useful for RTF_PRCLONING.  Get rid of rt_prflags and re-unite
with rt_flags.  Add T/TCP ``route metrics''.

NB: YOU MUST RECOMPILE `route' AND OTHER RELATED PROGRAMS AS A RESULT OF
THIS CHANGE.

This also adds a new interface parameter, `ifi_physical', which will
eventually replace IFF_ALTPHYS as the mechanism for specifying the
particular physical connection desired on a multiple-connection card.

NB: YOU MUST RECOMPILE `ifconfig' AND OTHER RELATED PROGRAMS AS A RESULT OF
THIS CHANGE.
1994-12-13 22:31:49 +00:00
Bruce Evans
b48a498871 Fix bogus include paths:
<systm.h> is <sys/systm.h>.
<kernel.h> is <sys/kernel.h>.
1994-12-04 08:52:51 +00:00
Garrett Wollman
6014635361 Cronyx/Sigma sync/async serial driver with PPP support
from Serge Vakulenko
1994-12-02 23:23:01 +00:00