The NetBSD Project

CVS log for src/sys/sys/socketvar.h

[BACK] Up to [cvs.NetBSD.org] / src / sys / sys

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.129 / (download) - annotate - [select for diffs], Wed Feb 1 02:27:23 2012 UTC (16 months, 2 weeks ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, tls-maxphys-nbase, tls-maxphys-base, tls-maxphys, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, khorben-n900, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, agc-symver-base, agc-symver, HEAD
Changes since 1.128: +2 -2 lines
Diff to previous 1.128 (colored)

When using socket loaning, make sure the KVA used for the loan has the same
color as the UVA being loaned.

Revision 1.128 / (download) - annotate - [select for diffs], Wed Dec 21 19:27:47 2011 UTC (17 months, 4 weeks ago) by christos
Branch: MAIN
Changes since 1.127: +2 -1 lines
Diff to previous 1.127 (colored)

don't change the layout of the struct, it is used by fstat. (from yamt)

Revision 1.127 / (download) - annotate - [select for diffs], Tue Dec 20 23:56:29 2011 UTC (17 months, 4 weeks ago) by christos
Branch: MAIN
Changes since 1.126: +2 -2 lines
Diff to previous 1.126 (colored)

- Eliminate so_nbio and turn it into a bit SS_NBIO in so_state.
- Introduce MSG_NBIO so that we can turn non blocking i/o on a per call basis
- Use MSG_NBIO to fix the XXX: multi-threaded issues on the fifo sockets.
- Don't set SO_CANTRCVMORE, if we were interrupted (perhaps do it for all
  errors?).

Revision 1.126 / (download) - annotate - [select for diffs], Sat Jul 2 17:53:51 2011 UTC (23 months, 2 weeks ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.125: +2 -1 lines
Diff to previous 1.125 (colored)

Fix kern/45093 as discussed on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2011/06/17/msg010734.html

The cause of the problem is that the so_pendfree is processed with
the softnet_lock held at one point, and processing the list
calls sodoloanfree() which may kpause(). As the thread sleeps with
softnet_lock held, it ultimately cause a deadlock (see the PR or tech-kern
thread for details).
Although it should be possible to call sodopendfree() after releasing
the socket lock, it's not so easy to know where he socket lock is held and
where it's not, so we may hit the issue again later.
Add a kernel thread to handle the so_pendfree list, and wake up this
thread when adding mbufs to this list. Get rid of the various sodopendfree()
calls, hopefully fixing definitively the problem.

Revision 1.125 / (download) - annotate - [select for diffs], Sun Jun 26 16:43:12 2011 UTC (23 months, 3 weeks ago) by christos
Branch: MAIN
Changes since 1.124: +3 -2 lines
Diff to previous 1.124 (colored)

* Arrange for interfaces that create new file descriptors to be able to
  set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

    - Add F_DUPFD_CLOEXEC to fcntl(2).
    - Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
    - Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
      for socket(2) and socketpair(2).
    - Add new paccept(2) syscall that takes an additional sigset_t to alter
      the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
      SOCK_NONBLOCK.
    - Add new mode character 'e' to fopen(3) and popen(3) to open pipes
      and file descriptors for close on exec.
    - Add new kqueue1(2) syscall with a new flags argument to open the
      kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
  (rump_syscallargs.h).

* Bump libc version for the new syscalls.

Revision 1.124 / (download) - annotate - [select for diffs], Tue Dec 29 04:23:43 2009 UTC (3 years, 5 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base7, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, rmind-uvmplock-nbase, rmind-uvmplock-base, rmind-uvmplock, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.123: +2 -1 lines
Diff to previous 1.123 (colored)

Add credentials to to sockets.

We don't need any deferred free etc. because we no longer free the
credentials in interrupt context.

Tons of help from matt@, thanks!

Revision 1.123 / (download) - annotate - [select for diffs], Sun Dec 20 09:36:06 2009 UTC (3 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.122: +4 -3 lines
Diff to previous 1.122 (colored)

If a multithreaded app closes an fd while another thread is blocked in
read/write/accept, then the expectation is that the blocked thread will
exit and the close complete.
Since only one fd is affected, but many fd can refer to the same file,
the close code can only request the fs code unblock with ERESTART.
Fixed for pipes and sockets, ERESTART will only be generated after such
a close - so there should be no change for other programs.
Also rename fo_abort() to fo_restart() (this used to be fo_drain()).
Fixes PR/26567

Revision 1.122 / (download) - annotate - [select for diffs], Wed Dec 9 21:33:00 2009 UTC (3 years, 6 months ago) by dsl
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.121: +4 -4 lines
Diff to previous 1.121 (colored)

Rename fo_drain() to fo_abort(), 'drain' is used to mean 'wait for output
do drain' in many places, whereas fo_drain() was called in order to force
blocking read()/write() etc calls to return to userspace so that a close()
call from a different thread can complete.
In the sockets code comment out the broken code in the inner function,
it was being called from compat code.

Revision 1.121 / (download) - annotate - [select for diffs], Fri Sep 11 22:06:29 2009 UTC (3 years, 9 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, jym-xensuspend-nbase
Changes since 1.120: +2 -1 lines
Diff to previous 1.120 (colored)

Make ifconfig(8) set and display preference numbers for IPv6
addresses.  Make the kernel support SIOC[SG]IFADDRPREF for IPv6
interface addresses.

In in6ifa_ifpforlinklocal(), consult preference numbers before
making an otherwise arbitrary choice of in6_ifaddr.  Otherwise,
preference numbers are *not* consulted by the kernel, but that will
be rather easy for somebody with a little bit of free time to fix.

Please note that setting the preference number for a link-local
IPv6 address does not work right, yet, but that ought to be fixed
soon.

In support of the changes above,

1 Add a method to struct domain for "externalizing" a sockaddr, and
  provide an implementation for IPv6.  Expect more work in this area: it
  may be more proper to say that the IPv6 implementation "internalizes"
  a sockaddr.  Add sockaddr_externalize().

2 Add a subroutine, sofamily(), that returns a struct socket's address
  family or AF_UNSPEC.

3 Make a lot of IPv4-specific code generic, and move it from
  sys/netinet/ to sys/net/ for re-use by IPv6 parts of the kernel and
  ifconfig(8).

Revision 1.120 / (download) - annotate - [select for diffs], Wed Sep 2 14:56:57 2009 UTC (3 years, 9 months ago) by tls
Branch: MAIN
Changes since 1.119: +5 -5 lines
Diff to previous 1.119 (colored)

Add a direction argument to socket upcalls, so they can tell why they've
been called when, for example, they're waiting for space to write.  From
Ritesh Agrawal at Coyote Point.

Revision 1.119 / (download) - annotate - [select for diffs], Sat Apr 4 10:12:52 2009 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.118: +8 -2 lines
Diff to previous 1.118 (colored)

Add fileops::fo_drain(), to be called from fd_close() when there is more
than one active reference to a file descriptor. It should dislodge threads
sleeping while holding a reference to the descriptor. Implemented only for
sockets but should be extended to pipes, fifos, etc.

Fixes the case of a multithreaded process doing something like the
following, which would have hung until the process got a signal.

thr0	accept(fd, ...)
thr1	close(fd)

Revision 1.118 / (download) - annotate - [select for diffs], Wed Jan 21 06:59:29 2009 UTC (4 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.117: +2 -2 lines
Diff to previous 1.117 (colored)

restore the pre socket locking patch signal behaviour.
this fixes a busy-loop in nfs_connect.

Revision 1.117 / (download) - annotate - [select for diffs], Wed Nov 12 12:36:28 2008 UTC (4 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.116: +1 -5 lines
Diff to previous 1.116 (colored)

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.

Revision 1.116 / (download) - annotate - [select for diffs], Tue Oct 14 13:45:26 2008 UTC (4 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.115: +7 -5 lines
Diff to previous 1.115 (colored)

Accept filters:

- Remove remaining #ifdef INET.
- Avoid holding locks so we don't need to do KM_NOSLEEP allocations.
- Use a rwlock to protect the accept filter list.
- Make it safe to unload accept filter modules.
- Minor KNF.

Revision 1.115 / (download) - annotate - [select for diffs], Sat Oct 11 13:40:58 2008 UTC (4 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.114: +3 -1 lines
Diff to previous 1.114 (colored)

Move uidinfo to its own module in kern_uidinfo.c and include in rump.
No functional change to uidinfo.

Revision 1.114 / (download) - annotate - [select for diffs], Sat Oct 11 12:03:20 2008 UTC (4 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.113: +2 -2 lines
Diff to previous 1.113 (colored)

Remove #ifdef LKM.  Even if the correct form ("_LKM") were to be
used, it would still be pointless - double pointless is still
pointless.

Revision 1.113 / (download) - annotate - [select for diffs], Wed Aug 6 15:01:24 2008 UTC (4 years, 10 months ago) by plunky
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Changes since 1.112: +23 -6 lines
Diff to previous 1.112 (colored)

Convert socket options code to use a sockopt structure
instead of laying everything into an mbuf.

approved by core

Revision 1.112 / (download) - annotate - [select for diffs], Mon Aug 4 03:55:48 2008 UTC (4 years, 10 months ago) by tls
Branch: MAIN
Changes since 1.111: +36 -1 lines
Diff to previous 1.111 (colored)

Add accept filters, ported from FreeBSD by Coyote Point Systems.  Add inetd
support for specifying an accept filter for a service (mostly as a usage
example, but it can be handy for other things).  Manual pages to follow
in a day or so.

OK core@.

Revision 1.111 / (download) - annotate - [select for diffs], Wed Jun 18 09:06:28 2008 UTC (5 years ago) by yamt
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.110: +3 -1 lines
Diff to previous 1.110 (colored)

merge yamt-pf42 branch.
(import newer pf from OpenBSD 4.2)

ok'ed by peter@.  requested by core@

Revision 1.110 / (download) - annotate - [select for diffs], Tue Jun 10 11:49:11 2008 UTC (5 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4
Changes since 1.109: +2 -1 lines
Diff to previous 1.109 (colored)

There can be existing waiters on a socket's condition variables when we
change socket::so_lock, and they rely on the old lock to synchronize.
Wake them up whenever we change so_lock so they can restart their waits.

Revision 1.109 / (download) - annotate - [select for diffs], Mon May 26 17:21:18 2008 UTC (5 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3
Branch point for: simonb-wapbl
Changes since 1.108: +2 -1 lines
Diff to previous 1.108 (colored)

Use pool_cache for sockets.

Revision 1.108 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:11 2008 UTC (5 years, 1 month ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.107: +1 -8 lines
Diff to previous 1.107 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.107 / (download) - annotate - [select for diffs], Mon Apr 28 16:37:15 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.106: +2 -2 lines
Diff to previous 1.106 (colored)

sbspace: return 'long', otherwise signed comparisons will be promoted
to unsigned.

Revision 1.106 / (download) - annotate - [select for diffs], Sun Apr 27 14:26:58 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.105: +2 -1 lines
Diff to previous 1.105 (colored)

Fix a use-after-free in soabort(). It would be better to kill SS_NOFDREF
and maintain a per-socket reference count, but SS_NOFDREF is slightly
more than a simple reference count and I don't want to break anything.

Revision 1.105 / (download) - annotate - [select for diffs], Thu Apr 24 11:38:39 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.104: +188 -101 lines
Diff to previous 1.104 (colored)

Merge the socket locking patch:

- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.

Revision 1.104 / (download) - annotate - [select for diffs], Fri Mar 21 21:55:01 2008 UTC (5 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Branch point for: yamt-pf42
Changes since 1.103: +9 -9 lines
Diff to previous 1.103 (colored)

Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.

Revision 1.103 / (download) - annotate - [select for diffs], Thu Mar 20 19:23:15 2008 UTC (5 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base
Changes since 1.102: +2 -1 lines
Diff to previous 1.102 (colored)

- Extract the guts of soo_poll() into sopoll(), which takes a struct socket *.
  This is for netsmb which wants to poll sockets directly.
- When polling a socket, first check for pending I/O without acquring any
  locks. If no I/O seems to be pending, acquire locks/spl and check again
  doing selrecord() if necessary.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Feb 6 21:57:55 2008 UTC (5 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.101: +2 -2 lines
Diff to previous 1.101 (colored)

Don't lock the socket to set/clear FNONBLOCK. Just set it atomically.

Revision 1.101 / (download) - annotate - [select for diffs], Sun Dec 16 21:25:59 2007 UTC (5 years, 6 months ago) by elad
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.100: +2 -2 lines
Diff to previous 1.100 (colored)

Make solisten() take an lwp pointer like the rest, so it can be passed down
to pr_usrreq.

Revision 1.100 / (download) - annotate - [select for diffs], Sat Nov 24 07:49:04 2007 UTC (5 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.99: +2 -2 lines
Diff to previous 1.99 (colored)

Pass the mbuf type (e.g., MT_SONAME, MT_SOOPTS) as the second
argument to getsockmbuf().

Revision 1.99 / (download) - annotate - [select for diffs], Wed Sep 19 04:33:45 2007 UTC (5 years, 9 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Changes since 1.98: +5 -1 lines
Diff to previous 1.98 (colored)

1) Introduce a new socket option, (SOL_SOCKET, SO_NOHEADER), that
   tells a socket that it should both add a protocol header to tx'd
   datagrams and remove the header from rx'd datagrams:

        int onoff = 1, s = socket(...);
        setsockopt(s, SOL_SOCKET, SO_NOHEADER, &onoff);

2) Add an implementation of (SOL_SOCKET, SO_NOHEADER) for raw IPv4
   sockets.

3) Reorganize the protocols' pr_ctloutput implementations a bit.
   Consistently return ENOPROTOOPT when an option is unsupported,
   and EINVAL if a supported option's arguments are incorrect.
   Reorganize the flow of code so that it's more clear how/when
   options are passed down the stack until they are handled.

   Shorten some pr_ctloutput staircases for readability.

4) Extract common mbuf code into subroutines, add new sockaddr
   methods, and introduce a new subroutine, fsocreate(), for reuse
   later; use it first in sys_socket():

struct mbuf *m_getsombuf(struct socket *so)

        Create an mbuf and make its owner the socket `so'.

struct mbuf *m_intopt(struct socket *so, int val)

        Create an mbuf, make its owner the socket `so', put the
        int `val' into it, and set its length to sizeof(int).


int fsocreate(..., int *fd)

        Create a socket, a la socreate(9), put the socket into the
        given LWP's descriptor table, return the descriptor at `fd'
        on success.

void *sockaddr_addr(struct sockaddr *sa, socklen_t *slenp)
const void *sockaddr_const_addr(const struct sockaddr *sa, socklen_t *slenp)

        Extract a pointer to the address part of a sockaddr.  Write
        the length of the address  part at `slenp', if `slenp' is
        not NULL.

socklen_t sockaddr_getlen(const struct sockaddr *sa)

        Return the length of a sockaddr.  This just evaluates to
        sa->sa_len.  I only add this for consistency with code that
        appears in a portable userland library that I am going to
        import.

const struct sockaddr *sockaddr_any(const struct sockaddr *sa)

        Return the "don't care" sockaddr in the same family as
        `sa'.  This is the address a client should sobind(9) if it
        does not care the source address and, if applicable, the
        port et cetera that it uses.

const void *sockaddr_anyaddr(const struct sockaddr *sa, socklen_t *slenp)

        Return the "don't care" sockaddr in the same family as
        `sa'.  This is the address a client should sobind(9) if it
        does not care the source address and, if applicable, the
        port et cetera that it uses.

Revision 1.98 / (download) - annotate - [select for diffs], Thu Aug 2 02:42:42 2007 UTC (5 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: nick-csl-alignment-base5, matt-mips64-base
Branch point for: matt-mips64, matt-armv6, jmcneill-pm
Changes since 1.97: +2 -1 lines
Diff to previous 1.97 (colored)

TCP socket buffers automatic sizing - ported from FreeBSD.
http://mail-index.netbsd.org/tech-net/2007/02/04/0006.html

! Disabled by default, marked as experimental. Testers are very needed.
! Someone should thoroughly test this, and improve if possible.

Discussed on <tech-net>:
http://mail-index.netbsd.org/tech-net/2007/07/12/0002.html
Thanks Greg Troxel for comments.

OK by the long silence on <tech-net>.

Revision 1.97 / (download) - annotate - [select for diffs], Thu Jul 5 19:45:54 2007 UTC (5 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, hpcarm-cleanup
Branch point for: nick-csl-alignment
Changes since 1.96: +2 -2 lines
Diff to previous 1.96 (colored)

From FreeBSD:

  Fix a bug in sblock() that has existed since revision 1.1 from BSD:
  correctly return an error if M_NOWAIT is passed to sblock() and the
  operation might block.  This remarkably subtle macro bug appears to
  be responsible for quite a few undiagnosed socket buffer corruption
  and mbuf-related kernel panics.

Revision 1.96 / (download) - annotate - [select for diffs], Sun Jun 24 18:00:16 2007 UTC (5 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.95: +12 -4 lines
Diff to previous 1.95 (colored)

Split sys_getpeername() and sys_getsockname() so they can be called when the
  'name' is wanted in kernel code.
Similarly split sys_accept() and change the split in recvmsg() so that it
  is useful to the compat functions, recvit() is removed and replaced by
  do_sys_recvmsg().
Factor out the code that writes socked names to userspace (from mbuf) to
  avoid replicated code.
Extract the code that writes socket 'control' (CMSG) data out to userspace,
  being more careful about the 'fd' that may exist inside SCM_RIGHTS msgs.
  (they still get lost if some of the latter copyout calls fail).
Since these are new functions, and old LKMs will fail to load.

Revision 1.95 / (download) - annotate - [select for diffs], Fri Jun 1 22:53:52 2007 UTC (6 years ago) by dsl
Branch: MAIN
Changes since 1.94: +6 -2 lines
Diff to previous 1.94 (colored)

Split sys_bind() and sys_connect() so that compat code can use common code
  once the 'address' has been copied into an mbuf.
Add extra flags for 'struct msghdr.msg_flags' to indicate that the address
  and control are already in mbufs, and that the uio structure is in userspace
  for sending data, rename sendit() to do_sys_sendmsg() to ensure no old code
  passes in random flags.
Changes to compat code to use new functions - removing some stackgap use.
Fix a 'use after free' in compat_43_sys_recvmsg.
I ***THINK*** the code that converts 'cmsg' formatted data is borked!
svr4_stream.c ought to be generated from svr4_32_stream.c during the build.

Revision 1.94 / (download) - annotate - [select for diffs], Sun Apr 15 05:24:33 2007 UTC (6 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.93: +2 -2 lines
Diff to previous 1.93 (colored)

don't use the same number for SS_ISDISCONNECTED and SS_ISAPIPE.

Revision 1.93 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:41 2007 UTC (6 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.92: +7 -7 lines
Diff to previous 1.92 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.92 / (download) - annotate - [select for diffs], Fri Dec 8 00:23:08 2006 UTC (6 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, post-newlock2-merge, newlock2-nbase, newlock2-base, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

- make so_linger unsigned short to double the range
- return 1 or 0 for the flag being set instead of the flag value
- check for range properly

Revision 1.91 / (download) - annotate - [select for diffs], Tue Oct 3 11:15:03 2006 UTC (6 years, 8 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2, netbsd-4-base
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.90: +1 -3 lines
Diff to previous 1.90 (colored)

Back out socket credentials for now, until we figure a better way of
handling the reference counting from interrupt context.

Revision 1.90 / (download) - annotate - [select for diffs], Mon Oct 2 00:02:04 2006 UTC (6 years, 8 months ago) by elad
Branch: MAIN
Changes since 1.89: +3 -1 lines
Diff to previous 1.89 (colored)

Add credentials to sockets, 'so_cred'.

Brought up on tech-kern@ some ~2 months ago, didn't seem to be an
objection; brought up again recently and no objection either... this is
not too intrusive and I've been running with this for a while.

Revision 1.89 / (download) - annotate - [select for diffs], Wed Aug 16 18:17:23 2006 UTC (6 years, 10 months ago) by plunky
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.88: +2 -4 lines
Diff to previous 1.88 (colored)

Remove macro call sonewconn() => sonewconn1() as it is no longer necessary.
There are no such calls and the compiler would catch mistakes like this
in any case.

Revision 1.88 / (download) - annotate - [select for diffs], Wed Jun 21 12:55:12 2006 UTC (7 years ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, yamt-pdpolicy-base6, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.87: +1 -0 lines
Diff to previous 1.87 (colored)

bump default so_snd.sb_lowat to increase chance to use loaning.

the idea to tweak the watermark from Jonathan Stone.
reviewed by Bill Studenmund.

Revision 1.87 / (download) - annotate - [select for diffs], Sun May 14 21:38:18 2006 UTC (7 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base, chap-midi
Branch point for: gdamore-uart
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored)

integrate kauth.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Apr 6 01:04:22 2006 UTC (7 years, 2 months ago) by simonb
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, elad-kernelauth-base
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

Whitespace nits.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Dec 13 19:27:56 2005 UTC (7 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.84: +2 -3 lines
Diff to previous 1.84 (colored)

struct lwp needs to come earlier.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Dec 13 16:47:18 2005 UTC (7 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.83: +2 -1 lines
Diff to previous 1.83 (colored)

add fwd decl of struct lwp; needed by the vax.

Revision 1.83 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:21 2005 UTC (7 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.82: +13 -13 lines
Diff to previous 1.82 (colored)

merge ktrace-lwp.

Revision 1.82 / (download) - annotate - [select for diffs], Sat May 7 17:42:09 2005 UTC (8 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Changes since 1.81: +3 -2 lines
Diff to previous 1.81 (colored)

PR/30154: YAMAMOTO Takashi: tcp_close locking botch
chgsbsize() as mentioned in the PR can be called from an interrupt context
via tcp_close(). Avoid calling uid_find() in chgsbsize().
- Instead of storing so_uid in struct socketvar, store *so_uidinfo
- Add a simple lock to struct uidinfo.

Revision 1.81 / (download) - annotate - [select for diffs], Thu Mar 17 20:39:17 2005 UTC (8 years, 3 months ago) by kleink
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, kent-audio2-base
Changes since 1.80: +3 -2 lines
Diff to previous 1.80 (colored)

A couple of <sys/select.h>-related changes:
* Factor out struct selinfo and its header dependencies into its own header,
  <sys/selinfo.h>, to avoid namespace pollution.
* Include <sys/selinfo.h> in user-visible headers where necessary.

Revision 1.80 / (download) - annotate - [select for diffs], Fri Sep 3 18:14:09 2004 UTC (8 years, 9 months ago) by darrenr
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, matt-timespec, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, netbsd-3-1, netbsd-3-0, netbsd-3, kent-audio2
Changes since 1.79: +2 -1 lines
Diff to previous 1.79 (colored)

add a per-socket counter for dropped UDP packets when the internal buffers
are full.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Jul 1 12:42:57 2004 UTC (8 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored)

bump sb_timeo from short to int to allow longer timeouts.
especially when hz is high.

while i'm here, bump sb_flags to int, as suggested by
Jason Thorpe and Bill Studenmund.

ride on 2.0G.

Revision 1.78 / (download) - annotate - [select for diffs], Sat Jun 5 07:14:05 2004 UTC (9 years ago) by yamt
Branch: MAIN
Changes since 1.77: +8 -1 lines
Diff to previous 1.77 (colored)

a comment about SBLASTRECORDCHK and SBLASTMBUFCHK.

Revision 1.77 / (download) - annotate - [select for diffs], Fri Jun 4 09:49:12 2004 UTC (9 years ago) by he
Branch: MAIN
Changes since 1.76: +2 -1 lines
Diff to previous 1.76 (colored)

In order for netstat for the vax port to build, add a forward
declaration of "struct proc" for usage outside the kernel.

Revision 1.76 / (download) - annotate - [select for diffs], Thu May 27 19:19:00 2004 UTC (9 years ago) by jonathan
Branch: MAIN
Changes since 1.75: +29 -1 lines
Diff to previous 1.75 (colored)

Rework to make  FAST_IPSEC PF_KEY dumps unicast and reliable:

Introduce new socket-layer function sbappendaddrchain() to
sys/kern/uipc_socket2.c: like sbappendaddr(), only takes a chain of
records and appends the entire chain in one pass. sbappendaddrchain()
also takes an `sbprio' argument, which indicates the caller requires
special `reliable' handling of the socket-buffer.  `sbprio' is
described in sys/sys/socketvar.h, although (for now) the different
levels are not yet implemented.

Rework sys/netipsec/key.c PF_KEY DUMP responses to build a chain of
mbuf records, one record per dump response. Unicast the entire chain
to the requestor, with all-or-none semantics.

Changed files;
 	sys/socketvar.h kern/uipc_socket2.c netipsec/key.c
Reviewed by:
	Jason Thorpe, Thor Lancelot Simon, post to tech-kern.

Todo: request pullup to 2.0 branch.  Post-2.0, rework sysctl() API for
dumps to use new record-chain constructors. Actually implement
the distinct service levels in sbappendaddrchain() so we can use them
to make PF_KEY ACQUIRE messages more reliable.

Revision 1.75 / (download) - annotate - [select for diffs], Sat May 22 22:52:16 2004 UTC (9 years ago) by jonathan
Branch: MAIN
Changes since 1.74: +5 -5 lines
Diff to previous 1.74 (colored)

Eliminate several uses of `curproc' from the socket-layer code and from NFS.

Add a new explicit `struct proc *p' argument to socreate(), sosend().
Use that argument instead of curproc. Follow-on changes to pass that
argument to socreate(), sosend(), and (*so->so_send)() calls.
These changes reviewed and independently recoded  by Matt Thomas.

Changes to soreceive() and (*dom->dom_exernalize() from Matt Thomas:
pass soreceive()'s struct uio* uio->uio_procp to unp_externalize().
Eliminate curproc from unp_externalize.   Also, now soreceive() uses
its uio->uio_procp value, pass that same value downward to
((pr->pru_usrreq)() calls for consistency, instead of (struct proc * )0.

Similar changes in sys/nfs to eliminate (most) uses of curproc,
either via the req-> r_procp field of a struct nfsreq *req argument,
or by passing down new explicit struct proc * arguments.

Reviewed by: Matt Thomas, posted to tech-kern.
NB: The (*pr->pru_usrreq)() change should be tested on more (all!) protocols.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Apr 22 01:01:42 2004 UTC (9 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)

Constify protosw arrays.  This can reduce the kernel .data section by
over 4K (if all the network protocols) are loaded.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Apr 18 21:47:11 2004 UTC (9 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.72: +2 -2 lines
Diff to previous 1.72 (colored)

Constify the addr parameter to sbappenaddr.

Revision 1.72 / (download) - annotate - [select for diffs], Sun Apr 18 21:43:45 2004 UTC (9 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.71: +1 -4 lines
Diff to previous 1.71 (colored)

Move uipc_usrreq and uipc_ctloutput to <sys/un.h> from <sys/socketvar.h>

Revision 1.71 / (download) - annotate - [select for diffs], Sun Apr 18 18:48:03 2004 UTC (9 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.70: +6 -6 lines
Diff to previous 1.70 (colored)

De __P()

Revision 1.70 / (download) - annotate - [select for diffs], Sat Apr 17 15:22:59 2004 UTC (9 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

adjust prototypes.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Mar 17 09:58:15 2004 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.68: +1 -2 lines
Diff to previous 1.68 (colored)

remove per-socket pendfree list.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Oct 21 22:55:47 2003 UTC (9 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.67: +2 -1 lines
Diff to previous 1.67 (colored)

Cache the "adjusted" value of sb_max when sb_max is changed, in order
to avoid doing quad math in sbreserve().

Change suggested by Simon Burge, and code inspired by a similar change
in FreeBSD.

Revision 1.67 / (download) - annotate - [select for diffs], Sat Sep 6 22:01:21 2003 UTC (9 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored)

SA_SIGINFO changes. This is 1.5Z

Revision 1.66 / (download) - annotate - [select for diffs], Thu Sep 4 16:44:06 2003 UTC (9 years, 9 months ago) by wrstuden
Branch: MAIN
Changes since 1.65: +5 -3 lines
Diff to previous 1.65 (colored)

Adjust struct sockbuf and sorflush() so that we don't zero out
every field; some need to stay around.

Fixes a bug where by calling shutdown() on a socket with knotes
will cause the kernel to panic when the kernel closes the socket.
Other access, such as calling kevent() may also trigger the panic.

Debugged with help from Jason and Allen. Patch reviewed by same plus
Itojun and Matt Thomas.

This problem seems to be the same one that FreeBSD saw in their PR
number 54331.

Kernel version _not_ bumped as we will piggyback the bump earlier today.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Aug 7 16:34:14 2003 UTC (9 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.64: +2 -6 lines
Diff to previous 1.64 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.64 / (download) - annotate - [select for diffs], Tue Jul 8 06:49:22 2003 UTC (9 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.63: +65 -69 lines
Diff to previous 1.63 (colored)

prototype must not carry variable name

Revision 1.63 / (download) - annotate - [select for diffs], Wed Jul 2 20:07:46 2003 UTC (9 years, 11 months ago) by ragge
Branch: MAIN
Changes since 1.62: +2 -1 lines
Diff to previous 1.62 (colored)

Make somaxkva modifyable via sysctl (and compile-time) instead of
hardcoding its size.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Jun 29 22:32:28 2003 UTC (9 years, 11 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.61: +9 -9 lines
Diff to previous 1.61 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.61 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:22 2003 UTC (9 years, 11 months ago) by darrenr
Branch: MAIN
Changes since 1.60: +10 -10 lines
Diff to previous 1.60 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.60 / (download) - annotate - [select for diffs], Sat May 3 17:53:18 2003 UTC (10 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.59: +6 -1 lines
Diff to previous 1.59 (colored)

export some of sosend loan routines for nfsd.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Mar 21 21:13:50 2003 UTC (10 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored)

Change 'data' argument to fo_ioctl and fo_fcntl from 'caddr_t' to 'void *'.
Avoids a lot of casting and removes the need for some line breaks.
Removed a load of (caddr_t) casts from calls to copyin/copyout as well.
(approved by christos - he has a plan to remove caddr_t...)

Revision 1.58 / (download) - annotate - [select for diffs], Wed Feb 26 06:31:21 2003 UTC (10 years, 3 months ago) by matt
Branch: MAIN
Changes since 1.57: +37 -35 lines
Diff to previous 1.57 (colored)

Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.

Revision 1.57 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:52 2003 UTC (10 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.56: +4 -1 lines
Diff to previous 1.56 (colored)

Add extensible malloc types, adapted from FreeBSD.  This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Jan 6 20:30:39 2003 UTC (10 years, 5 months ago) by wiz
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

writable, not writeable.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Oct 23 09:15:01 2002 UTC (10 years, 7 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.54: +6 -2 lines
Diff to previous 1.54 (colored)

merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe

Revision 1.54 / (download) - annotate - [select for diffs], Wed Jul 3 21:39:40 2002 UTC (10 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, gehenna-devsw-base
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

Rename SB_UPDATE_TAIL() to SB_EMPTY_FIXUP(), per suggestion from
Jonathan Stone.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Jul 3 21:36:57 2002 UTC (10 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Rename sbappend_stream() to sbappendstream(), per suggestion from
Jonathan Stone.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jul 3 19:06:54 2002 UTC (10 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.51: +24 -1 lines
Diff to previous 1.51 (colored)

Make insertion of data into socket buffers O(C):
* Keep pointers to the first and last mbufs of the last record in the
  socket buffer.
* Use the sb_lastrecord pointer in the sbappend*() family of functions
  to avoid traversing the packet chain to find the last record.
* Add a new sbappend_stream() function for stream protocols which
  guarantee that there will never be more than one record in the
  socket buffer.  This function uses the sb_mbtail pointer to perform
  the data insertion.  Make TCP use sbappend_stream().

On a profiling run, this makes sbappend of a TCP transmission using
a 1M socket buffer go from 50% of the time to .02% of the time.

Thanks to Bill Sommerfeld and YAMAMOTO Takashi for their debugging
assistance!

Revision 1.51 / (download) - annotate - [select for diffs], Thu May 2 17:55:52 2002 UTC (11 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Branch point for: gehenna-devsw
Changes since 1.50: +2 -1 lines
Diff to previous 1.50 (colored)

Add some experimental page-loaning for writes on sockets.  It is disabled
by default, and can be enabled by adding the SOSEND_LOAN option to your
kernel config.  The SOSEND_COUNTERS option can be used to provide some
instrumentation.

Use of this option, combined with an application that does large enough
writes, gets us zero-copy on the TCP and UDP transmit path.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Sep 28 18:02:45 2001 UTC (11 years, 8 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2, newlock-base, newlock, ifpoll-base, ifpoll, eeh-devprop-base, eeh-devprop
Changes since 1.49: +3 -4 lines
Diff to previous 1.49 (colored)

sbspace(): use lmin() instead of imin() and kill now unneeded casts
Pointed out by Scott Barron in kern/13687.

Revision 1.49 / (download) - annotate - [select for diffs], Sun Jul 1 20:42:48 2001 UTC (11 years, 11 months ago) by matt
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp, kqueue
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

Use consistent types for len.  Limit sockarg length to reasonable values.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Jun 25 20:46:12 2001 UTC (11 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

Back off the sendit()/recvit() change, some have problems with it

Revision 1.47 / (download) - annotate - [select for diffs], Mon Jun 25 19:24:03 2001 UTC (11 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

Add 'kernsa' parameter for sendit()/recvit(); if nonzero, msg->msg_name
is supposed to point directly to struct mbuf or struct sockaddr in kernel
space as appropriate, rather than being a pointer to memory in userland.

This is to be used by compat/* when emulation needs to wrap
send{to|msg}(2)/recv{from|msg}(2) and modify the passed struct
sockaddr.

Revision 1.46 / (download) - annotate - [select for diffs], Sun May 6 19:22:33 2001 UTC (12 years, 1 month ago) by manu
Branch: MAIN
Changes since 1.45: +2 -1 lines
Diff to previous 1.45 (colored)

implement the recently introduced EMUL_BSD_ASYNCIO_PIPE emulation package
flag.

EMUL_BSD_ASYNCIO_PIPE notes that the emulated binaries expect the original
BSD pipe behavior for asynchronous I/O, which is to fire SIGIO on read() and
write(). OSes without this flag do not expect any SIGIO to be fired on
read() and write() for pipes, even when async I/O was requested. As far as
we know, the OSes that need EMUL_BSD_ASYNCIO_PIPE are NetBSD, OSF/1 and
Darwin.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Apr 30 01:13:21 2001 UTC (12 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.44: +6 -6 lines
Diff to previous 1.44 (colored)

remove some lint

Revision 1.44 / (download) - annotate - [select for diffs], Mon Apr 9 13:23:07 2001 UTC (12 years, 2 months ago) by enami
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

Fix prototype to avoid compilation error.

Revision 1.43 / (download) - annotate - [select for diffs], Sat Apr 7 09:00:58 2001 UTC (12 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Add new 'stat' fileop and call the stat function via f_ops rather
than directly.
For compat syscalls, also add necessary FILE_USE()/FILE_UNUSE().
Now that soo_stat() gets a proc arg, pass it on to usrreq function.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Feb 26 16:24:02 2001 UTC (12 years, 3 months ago) by lukem
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.41: +155 -149 lines
Diff to previous 1.41 (colored)

convert to ANSI KNF

Revision 1.41 / (download) - annotate - [select for diffs], Sun Dec 10 23:13:42 2000 UTC (12 years, 6 months ago) by fvdl
Branch: MAIN
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

Update prototype for sobind() to include a struct proc *.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Mar 28 05:06:20 2000 UTC (13 years, 2 months ago) by simonb
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.39: +1 -2 lines
Diff to previous 1.39 (colored)

Remove duplicate declaration of sonewconn1() - there's another further
down in the same file with all the other prototypes!

Revision 1.39 / (download) - annotate - [select for diffs], Tue Aug 3 20:19:21 1999 UTC (13 years, 10 months ago) by wrstuden
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase
Branch point for: thorpej_scsipi
Changes since 1.38: +3 -1 lines
Diff to previous 1.38 (colored)

Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().

Reviewed by: thorpej
Tested by: wrstuden

Revision 1.38 / (download) - annotate - [select for diffs], Thu Apr 22 04:50:06 1999 UTC (14 years, 2 months ago) by simonb
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.37: +3 -5 lines
Diff to previous 1.37 (colored)

Move inclusion of "opt_sb_max.h" from sys/socketvar.h to
conf/param.c, and move the initialisation of the sb_max
variable from kern/uipc_socket2.c to conf/param.c.  Now
everthing that includes sys/socketvar.h doesn't get
recompiled when SB_MAX's value changes.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Mar 23 10:45:37 1999 UTC (14 years, 3 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4
Branch point for: kame, chs-ubc2
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Ensure that you can only bind a more specific address when it is done by the
same uid or by root.

This code is from FreeBSD. (Whilst it was originally obtained from OpenBSD,
FreeBSD fixed it to work with multicast. To quote the commit message:
    - Don't bother checking for conflicting sockets if we're binding to a
      multicast address.
    - Don't return an error if we're binding to INADDR_ANY, the conflicting
      socket is bound to INADDR_ANY, and the conflicting socket has
      SO_REUSEPORT set.
)

Revision 1.36 / (download) - annotate - [select for diffs], Wed Feb 10 14:37:25 1999 UTC (14 years, 4 months ago) by tron
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

Fix LKM build problem.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Feb 9 19:50:28 1999 UTC (14 years, 4 months ago) by kml
Branch: MAIN
Changes since 1.34: +4 -4 lines
Diff to previous 1.34 (colored)

Correct mistaken #ifndef to #ifdef...

Revision 1.34 / (download) - annotate - [select for diffs], Tue Feb 9 02:15:45 1999 UTC (14 years, 4 months ago) by kml
Branch: MAIN
Changes since 1.33: +7 -1 lines
Diff to previous 1.33 (colored)

defopt SB_MAX, which controls the maximum allowable size of socket buffers

Revision 1.33 / (download) - annotate - [select for diffs], Wed Jan 20 09:15:42 1999 UTC (14 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.32: +2 -1 lines
Diff to previous 1.32 (colored)

Do not remove sockets from the accept(2) queue on close.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Dec 16 00:24:10 1998 UTC (14 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.31: +3 -1 lines
Diff to previous 1.31 (colored)

Add a new socket state flag SS_MORETOCOME, to indicate to the lower layer
that more data is about to arrive in a PRU_SEND.

Suggested by Justin Walker <justin@apple.com> on the freebsd-net
mailing list.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Aug 2 04:53:11 1998 UTC (14 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Changes since 1.30: +4 -1 lines
Diff to previous 1.30 (colored)

Use the pool allocator for sockets.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jun 30 05:33:11 1998 UTC (14 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.29: +5 -3 lines
Diff to previous 1.29 (colored)

Add two additional arguments to the fileops read and write calls, a
pointer to the offset to use, and a flags word.  Define a flag that
specifies whether or not to update the offset passed by reference.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Apr 25 17:32:24 1998 UTC (15 years, 1 month ago) by matt
Branch: MAIN
Changes since 1.28: +23 -8 lines
Diff to previous 1.28 (colored)

Add hooks for 0 copy (or other optimized) sends and/or received.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Mar 1 02:24:14 1998 UTC (15 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

Merge with Lite2 + local changes

Revision 1.27 / (download) - annotate - [select for diffs], Wed Jan 7 23:47:12 1998 UTC (15 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.26: +8 -3 lines
Diff to previous 1.26 (colored)

Make insertion and removal of sockets from the partial and incoming
connections queues O(C) rather than O(N).

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jan 7 22:47:49 1998 UTC (15 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.25: +2 -1 lines
Diff to previous 1.25 (colored)

Prototype uipc_ctloutput().

Revision 1.25 / (download) - annotate - [select for diffs], Thu Oct 9 12:59:54 1997 UTC (15 years, 8 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-BETA, marc-pcmcia-base
Branch point for: netbsd-1-3
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Make various standard wmesg strings const.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jan 22 07:09:24 1997 UTC (16 years, 5 months ago) by mikel
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, mrg-vm-swap, marc-pcmcia-bp, is-newarp-before-merge, is-newarp-base, is-newarp, bouyer-scsipi, SYN_cache_cur_base
Branch point for: marc-pcmcia, SYN_cache_branch
Changes since 1.23: +6 -7 lines
Diff to previous 1.23 (colored)

add multiple inclusion protection

Revision 1.23 / (download) - annotate - [select for diffs], Sat Jan 11 05:17:18 1997 UTC (16 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-setroot
Changes since 1.22: +3 -1 lines
Diff to previous 1.22 (colored)

Prototype sbcreatecontrol().

Revision 1.22 / (download) - annotate - [select for diffs], Sun Dec 22 10:14:06 1996 UTC (16 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

change sockargs()'s second argument to be a const void *.  It used
to be a caddr_t, but since it's being passed constant user argument pointers
it needs to be const, and since it's being passed a variety of argument
pointer types it makes sense to change it to void *.  That argument is
simply being handed to copyin().

Revision 1.21 / (download) - annotate - [select for diffs], Sat Sep 7 12:41:34 1996 UTC (16 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

Implement poll(2).

Revision 1.20 / (download) - annotate - [select for diffs], Wed May 22 14:57:53 1996 UTC (17 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

KNF nit.

Revision 1.19 / (download) - annotate - [select for diffs], Wed May 22 13:56:36 1996 UTC (17 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.18: +5 -6 lines
Diff to previous 1.18 (colored)

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.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Feb 9 18:25:38 1996 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.17: +9 -2 lines
Diff to previous 1.17 (colored)

Filesystem prototype changes

Revision 1.17 / (download) - annotate - [select for diffs], Sun Feb 4 02:12:40 1996 UTC (17 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.16: +19 -9 lines
Diff to previous 1.16 (colored)

Fix some missing/wrong prototypes so that kern/* compiles again

Revision 1.16 / (download) - annotate - [select for diffs], Thu Aug 17 02:57:39 1995 UTC (17 years, 10 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

so_pcb should be a void *.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Aug 4 01:14:55 1995 UTC (17 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.14: +6 -2 lines
Diff to previous 1.14 (colored)

Encapsulate the test for sending a notification in a macro, sb_notify().

Revision 1.14 / (download) - annotate - [select for diffs], Sun Mar 26 20:24:47 1995 UTC (18 years, 2 months ago) by jtc
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

KERNEL -> _KERNEL

Revision 1.13 / (download) - annotate - [select for diffs], Mon Jan 9 00:16:18 1995 UTC (18 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

make prototype's arg name match that in function decl.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Oct 30 21:49:58 1994 UTC (18 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.11: +3 -2 lines
Diff to previous 1.11 (colored)

be more careful with types, also pull in headers where necessary.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 29 06:45:30 1994 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jun 27 19:32:05 1994 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

new standard, minimally intrusive ID format

Revision 1.9 / (download) - annotate - [select for diffs], Thu May 19 06:28:36 1994 UTC (19 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

SHUT UP!

Revision 1.8 / (download) - annotate - [select for diffs], Fri May 13 06:12:12 1994 UTC (19 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.7: +18 -17 lines
Diff to previous 1.7 (colored)

Update to 4.4-Lite networking code, with a few local changes.

Revision 1.7 / (download) - annotate - [select for diffs], Wed May 4 11:25:27 1994 UTC (19 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.6: +54 -2 lines
Diff to previous 1.6 (colored)

Move internal prototypes to a better place.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jun 12 23:35:14 1993 UTC (20 years ago) by andrew
Branch: MAIN
CVS Tags: wnvm, nvm-base, nvm, netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, magnum-base, magnum
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Fixed a nested comment to make things gcc -Wall clean.

Revision 1.5 / (download) - annotate - [select for diffs], Thu May 20 11:49:03 1993 UTC (20 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (colored)

have proc.h, socketvar.h, tty.h include select.h automatically

Revision 1.4 / (download) - annotate - [select for diffs], Tue May 18 18:20:38 1993 UTC (20 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.3: +4 -10 lines
Diff to previous 1.3 (colored)

make kernel select interface be one-stop shopping & clean it all up.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Apr 19 01:23:14 1993 UTC (20 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.2: +5 -0 lines
Diff to previous 1.2 (colored)

Add consistent multiple-inclusion protection.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 21 18:04:42 1993 UTC (20 years, 3 months ago) by cgd
Branch: MAIN
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8
Changes since 1.1: +8 -1 lines
Diff to previous 1.1 (colored)

after 0.2.2 "stable" patches applied

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (20 years, 3 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>