freebsd-skq/sys/netipx
Robert Watson bc725eafc7 Chance protocol switch method pru_detach() so that it returns void
rather than an error.  Detaches do not "fail", they other occur or
the protocol flags SS_PROTOREF to take ownership of the socket.

soclose() no longer looks at so_pcb to see if it's NULL, relying
entirely on the protocol to decide whether it's time to free the
socket or not using SS_PROTOREF.  so_pcb is now entirely owned and
managed by the protocol code.  Likewise, no longer test so_pcb in
other socket functions, such as soreceive(), which have no business
digging into protocol internals.

Protocol detach routines no longer try to free the socket on detach,
this is performed in the socket code if the protocol permits it.

In rts_detach(), no longer test for rp != NULL in detach, and
likewise in other protocols that don't permit a NULL so_pcb, reduce
the incidence of testing for it during detach.

netinet and netinet6 are not fully updated to this change, which
will be in an upcoming commit.  In their current state they may leak
memory or panic.

MFC after:	3 months
2006-04-01 15:42:02 +00:00
..
ipx_cksum.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ipx_if.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ipx_input.c Canonicalize copyright order in one more file that contains my 2006-03-27 01:12:58 +00:00
ipx_ip.c Include kernel.h to get NET_NEEDS_GIANT() definition, which for some 2006-03-24 20:08:48 +00:00
ipx_ip.h Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
ipx_outputfl.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ipx_pcb.c Rework IPX/SPX socket and pcb reference model: 2006-03-25 17:28:42 +00:00
ipx_pcb.h Add a new ipxpcb flag, IPXP_SPX, which is set on ipxpcb's to mark them 2006-03-26 15:41:44 +00:00
ipx_proto.c Use sparse initializers for "struct domain" and "struct protosw", 2005-11-09 13:29:16 +00:00
ipx_usrreq.c Chance protocol switch method pru_detach() so that it returns void 2006-04-01 15:42:02 +00:00
ipx_var.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ipx.c Recent changes have locked down most of the highly dynamic data 2005-01-09 05:34:37 +00:00
ipx.h Back out ipx.h:1.18, which introduced a Linux API compatibility field in 2005-05-27 12:25:42 +00:00
README Add a simple netipx TODO list to the end of README, since there are a 2006-03-27 09:10:09 +00:00
spx_debug.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
spx_debug.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
spx_timer.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
spx_usrreq.c Chance protocol switch method pru_detach() so that it returns void 2006-04-01 15:42:02 +00:00
spx_var.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
spx.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00

$FreeBSD$

This protocol implements IPX/SPX over Ethernet_II frame type 0x8137.
Please note: the SPX implementation may require further work and testing
to insure proper operation.

Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com

John Hay
Some Company
Some Address
jhay@mikom.csir.co.za

Adapted for multi-processor, multi-threaded network stack by Robert N. M.
Watson, Computer Laboratory, University of Cambridge.

--- Copyright Information ---
/*-

Copyright (c) 1984, 1985, 1986, 1987, 1993
The Regents of the University of California.  All rights reserved.

Modifications Copyright (c) 1995, Mike Mitchell
Modifications Copyright (c) 1995, John Hay
Modifications Copyright (c) 2004-2006 Robert N. M. Watson

*/

--- TODO ---

(1) netipx default socket buffer sizes are very small by contemporary
    standards, and should be increased following testing and measurement.

(2) SPX will free the PCB and socket buffer memory on close(), which means
    close() in effects terminates the transfer of any outstanding buffered
    but unsent data.  As with TCP, it should instead grab its own
    reference to the socket so that it is not released, as hold onto it
    until the data transfer is complete.

(3) Raw socket capture of IPX output intercepts packets in the SPX output
    routine in order to feed them back into the raw socket.  This results
    in recursion into the socket code in the transmit path; instead,
    captured packets should be fed into a netisr that reinjects them into
    raw sockets from a new (asynchronous) context.

(4) IPX over IP encapsulation needs work to make it properly MPSAFE.