Commit Graph

238 Commits

Author SHA1 Message Date
mikel d235ef1a1c hide softc array and kernel routine prototypes from userland; PR misc/3070 1997-01-03 07:23:29 +00:00
mrg 2cf2442208 remove pfil_bad. 1996-12-20 08:40:46 +00:00
mikel 9aba065e07 add ATM data-link type; reqd. for libpcap. 1996-12-13 07:57:33 +00:00
mycroft f056beb022 Undo silly part of previous change. 1996-12-11 09:37:42 +00:00
chuck df6962b659 fix previous byte-order fix the correct way
(from Zdenek Salvet <salvet@horn.ics.muni.cz>)
1996-11-09 23:02:27 +00:00
cgd 8800178e5c -Wcast-qual cleanups. Don't discard 'const' when casting. 1996-10-25 22:15:54 +00:00
perry 3189406a17 Small fix to make this compile even if no BPFs are being compiled
in. Unfortunately, the BPF-only code called a label that wan't also
being #if'ed, and this made the compiler bitch. Now that we compile
with -Werror, this prevented the thing from compiling at all! (sigh)
1996-10-21 01:58:23 +00:00
chuck 41a87a7ae0 fix: add missing ntohs() for llc mode, as noted by several people including
Dong Lin, Zdenek Salvet, and Matthias Drochner(i think).
1996-10-18 19:26:54 +00:00
christos a1dcf4b026 backout previous kprintf change 1996-10-13 02:10:01 +00:00
christos 10191279fb - printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:59:41 +00:00
mrg 7b71cdec46 minor copyright update. 1996-10-05 23:41:53 +00:00
scottr ae0d4c11cb Use sys/types.h and sys/systm.h to bring in prototypes for bzero() and
bcopy(), instead of string.h
1996-09-18 03:11:03 +00:00
mrg a5f00f16bc move the packet filter hooks in to a saner location. while i'm here, rename
PACKET_FILTER to PFIL_HOOKS.
1996-09-14 14:40:20 +00:00
mycroft 2bc736661a Implement poll(2). 1996-09-07 12:40:22 +00:00
is 905db38340 Add IP multicast support as per RFC 1122 section 3.3.7 to ARCnet.
"The mapping of IP Class D addresses to local addresses is
         currently specified for the following types of networks:
	 [...]
         o    Any network that supports broadcast but not multicast,
              addressing: all IP Class D addresses map to the local
              broadcast address."
1996-09-02 17:28:22 +00:00
mrg c01edc3a02 use sc_unit instead of pointer arthimetic. 1996-08-09 08:34:00 +00:00
jonathan 36c640a447 * Remove old, unused SLIP variables from softc.
* Fix radio error-message parsing bug: old comparison against error
  prefix string  off by the size of the Starmode link-level protocol field.
* Fix radio reset finite state machine, given that parsing works properly.
* Add debugging messages about reset FSM if IFF_DEBUG is set.
* Remove #ifdefs notdef around back the check that discards newlines at
  the beginning of a frame. Every error message from the radio has a newline,
  as the radio send error messages terminated by \r\n, not  just \r like data
  frames. Not dropping the \n garbles the following data frame.
* Remove unused low-level debugging routines.
* Reformat the low-level bytestuff/RLL code to match the canonical source.
* Reduce MTU to 1100 bytes; 1200 bytes can overflow the radio buffers if the
  bytestuff/RLL does poorly.
* Fix radio-probe string to _not_ include a frame delimiter (\r): sending
  a \r to the radio tickles a bug in the firmware, causing the radio to
  smash the next frame sent after  the "**\r" probe string.
* Add calls to the tty t_oproc routine to make sure the probe and reset
  strings get sent to the modem promptly, rather than waiting for the next
  packet.
* Add PPP-style calls to the tty start-output function; seems to
  reduce latency marginally.

still to do:
* Flush output queue if resetting, since the radio is going to drop
  frames on the floor anyway if it needs resetting.
* Reduce tty start-output calls.
1996-08-02 02:53:39 +00:00
cgd ccfab1b072 #ifdef the declaration of 'ac' in fddi_input on ISO, since it's only
used if ISO is defined and -Wall complains.
1996-07-10 18:54:23 +00:00
cgd 1c5ea3c014 print difference between pointers with %ld, so that -Wformat works
on the Alpha and for consistency.  Also, other minor formatting cleanups.
1996-07-10 18:15:22 +00:00
chuck a7d86b86c8 add native mode atm network interrupt 1996-07-04 03:16:13 +00:00
chuck 26cf9de9d5 ported ATM to FreeBSD 2.2-960612-SNAP 1996-07-03 17:17:10 +00:00
christos 0c609bcf9e - Fix PR/2582: default route change without specifying gateway kills system.
While I was there:
- Fix KNF style problem.
- Remove bogus casts to 0, and (caddr_t).
1996-07-01 01:12:32 +00:00
chuck cc499a99d9 change:
- change asock to rxhand and adjust all for this [esp atm_input]
1996-06-29 20:07:05 +00:00
chuck a2efd3b632 add hook for user to turn on/off raw mode 1996-06-28 02:34:34 +00:00
chuck 849f947488 fix/improvement:
- add proto if atm_input
 - add native mode atm hooks to if_atmsubr.c (atm_input)
1996-06-27 04:34:17 +00:00
jonathan d41e338edc * Put in fix to in bytestuffing/RLL code from Stuart Cheshire, that
somehow got lost between NetBSD and Linux.    Output side mbuf-walking
  code now correctly bytestuffs mbuf chains, as well as single mbufs
  and clusters.

* Update radio error-parsing code to Stuart's latest stable code.
  We now parse error messages the older code didn't.

* Note where radio-crash watchdogs should be added (the linux code
  is there, #ifdef'ed out). This still just  doesn't work.
  The radio reset doesn't always work even when slattatch is first started,
  but I have a radio with old firmware, which may be a contributing factor.

* Correct the checks for the tty output queue being overfull;  estimate
  the stuffed pkt size as  (original * 65/64) + STRIP_HDRLEN + 2,
  instead of SLIP's (2*SLMTU).  Re-enable the disabled  check now the
  size estimate isn't excessively large.

* Fix BPF tapping of strip interfaces,  STRIP packets are wrapped
  in a SLIP bpf  header.   This implies no BPF support for arp or atalk,
  even though Linux boxes are sending arp requests and  gratuitous arps.
  There may be no good  fix short  of adding explicit  STRIP encapsulation
  support to bpf/tcpdump.

* Still need a solid walkthrough, and  rewrite to eliminate redundant
  receive-side mbuf copying.
1996-06-26 06:04:20 +00:00
chuck 4ac1ba7fe7 [1] add new rxso passing structure to if_atm.h
[2] modify atm_output to handle native mode atm output mbufs
1996-06-26 04:22:54 +00:00
pk 1a04146533 A couple of emulation enhancements from der mouse's PR#2411:
- ability to be either a BROADCAST or POINTTOPOINT interface.
	- a humble beginning of link-layer addressing (differs from PR
	  by using a `struct sockaddr' instead of single byte).
1996-06-25 22:15:13 +00:00
chuck d9c6fd68b8 network support for ATM networks (ATM == Async Transfer Mode, not
Automatic Teller Machine).

Currently supports PVCs only (no ATM ARP either).
1996-06-22 01:47:35 +00:00
cgd d73abf41aa avoid unnecessary checks of m_get/MGET/etc.'s return values. When
they're called with M_WAIT, they are defined to never return NULL.
1996-06-14 22:21:12 +00:00
cgd 1f29d4b51f no need for a local implementation of SIOCGIFMTU; delete it. 1996-06-13 21:50:32 +00:00
cgd ba3b2a87a2 implement SIOCGIFMTU in a generic manner, by pulling the MTU out of
each netif's if_data structure.  There's no point in making each
driver implement this ioctl.
1996-06-13 21:49:43 +00:00
cgd 2e3d795708 add an ifru_mtu member to the union in 'struct ifreq', and add a
#define so that ifr_mtu accesses that.  MTU shouldn't be overloaded
with ifr_metric, if only for clarity.  Adding an MTU field to the
union hurts nothing (in fact, does not actually _change_ generated
code), and does improve clarity.
1996-06-13 21:48:34 +00:00
thorpej 5804211474 Initialize sc_unit in the right place, a'la if_sl.c. Thanks to
Jonathan Stone <jonathan@DSG.Stanford.EDU> for pointing this out.
1996-06-05 23:20:49 +00:00
thorpej 2fadbc363c Move a mis-placed line on slattach() so that SLIOCGUNIT works properly.
From Jonathan O'Brien <obrien@phoenix.sfsu.edu>.
1996-06-02 16:22:32 +00:00
pk 2d9344eb4b Prototype new raw_*() functions. 1996-05-28 23:24:50 +00:00
pk ad4c0ccfdf Remove unused variable. 1996-05-28 23:24:23 +00:00
mycroft c630947e89 We must indirect through the higher-level protocol for
PRU_{BIND,CONNECT} so that it can check the sockaddr.
1996-05-23 18:30:57 +00:00
mycroft e149ad8228 Fix race condition in PRU_DISCONNECT.
Unimplement PRU_ABORT, as it's not needed and wasn't correct.
Some stylistic cleanup.
Make sure the control mbufs are freed in all cases.
We must indirect through the higher-level protocol for
PRU_{BIND,CONNECT} so that it can check the sockaddr.
1996-05-23 18:26:26 +00:00
mycroft 49d52c9b1c Pass a proc pointer down to the usrreq and pcbbind functions for PRU_ATTACH, PRU_BIND and
PRU_CONTROL.  The usrreq interface really needs to be split up, but this will have to wait.
Remove SS_PRIV completely.
1996-05-22 13:54:55 +00:00
mycroft 12e6d35d62 Removing a completely unneeded reference to curproc. 1996-05-22 13:42:57 +00:00
mycroft 2a94215734 Remove duplicate definition of bpf_setif(). 1996-05-22 13:41:54 +00:00
jonathan ed314bc45a Catch up to removal of if_unit and addition of if_xname and sc_unit,
blindly following the changes to if_sl.c.
1996-05-19 22:09:36 +00:00
jonathan 32d97e42f6 Packet-mode driver for Metricom Ricochet radios (Starmode Radio IP). 1996-05-19 16:34:36 +00:00
christos 748900c4fc Fix new warnings. 1996-05-07 23:20:21 +00:00
thorpej 527565ac15 Kill a couple of unnecessary calls to strlen(). 1996-05-07 05:26:02 +00:00
thorpej 4edabe2501 Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit.  Updated interface to (*if_watchdog)() and (*if_reset)()
to take a struct ifnet *, rather than a unit number.
1996-05-07 02:40:22 +00:00
cgd 4d6b6d9082 On new architectures and on the alpha, define SIZEOF_BPF_HDR to be
sizeof(struct bpf_hdr).  On machines that we currently support that
can use the old definition (which just covers the size of the data in
struct bpf_hdr), use it even though it's a hack.  (This was changed
for the 'new architectures' case so as to be fail-safe; BPF may
waste a few bytes of space per captured packet on new architectures,
but now at least it's more likely to work.)
1996-05-02 00:57:28 +00:00
christos 8d33c5c8b4 - Fix fencepost error in ifconf() where if space = n * sizeof(struct ifreq),
only n - 1 interfaces would be obtained. This bug is present in the Lite2
  sources too.
- Support COMPAT_SVR4 in ifconf()
1996-04-22 01:20:34 +00:00
is a5ba4721eb Don't even check the not-yet-initialized mbuf pointers for being !=
NULL in the error exit code of arc_output(), else we see random data
and try to m_freem() it, panic'ing the machine.
1996-04-15 14:01:25 +00:00