summaryrefslogtreecommitdiff
path: root/sys/kern/sys_socket.c
Commit message (Collapse)AuthorAgeFilesLines
* Extend kqueue down to the device layer.Jonathan Lemon2001-02-151-2/+4
| | | | | | | Backwards compatible approach suggested by: peter Notes: svn path=/head/; revision=72521
* Instead of just blindly setting -rw-rw-rw-:Chris Costello2000-07-021-2/+11
| | | | | | | | | | | | o Set access mode to -r--r--r-- if SS_CANTRCVMORE is set and the receive buffer is empty. o Set access mode to --w--w--w- is SS_CANTSENDMORE is set. Discussed with: alfred Notes: svn path=/head/; revision=62425
* Report -rw-rw-rw file access modes in soo_stat.Chris Costello2000-07-021-1/+2
| | | | | | | Reviewed by: alfred Notes: svn path=/head/; revision=62421
* Include the UID and GID values filled in by socreate() into socket->so_credChris Costello2000-05-111-0/+3
| | | | | | | | | for stat() calls. Reviewed by: phk Notes: svn path=/head/; revision=60405
* Update socket file type for fo_stat(). soo_stat() becomes a fileopsPeter Wemm1999-11-081-4/+6
| | | | | | | | switch entry point rather than being used externally with knowledge of the internals of the DTYPE_SOCKET f_data contents. Notes: svn path=/head/; revision=52984
* This is what was "fdfix2.patch," a fix for fd sharing. It's prettyBrian Feldman1999-09-191-2/+4
| | | | | | | | | | | | | | | | | | | | far-reaching in fd-land, so you'll want to consult the code for changes. The biggest change is that now, you don't use fp->f_ops->fo_foo(fp, bar) but instead fo_foo(fp, bar), which increments and decrements the fp refcount upon entry and exit. Two new calls, fhold() and fdrop(), are provided. Each does what it seems like it should, and if fdrop() brings the refcount to zero, the fd is freed as well. Thanks to peter ("to hell with it, it looks ok to me.") for his review. Thanks to msmith for keeping me from putting locks everywhere :) Reviewed by: peter Notes: svn path=/head/; revision=51418
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Fix fd race conditions (during shared fd table usage.) Badfileops isBrian Feldman1999-08-041-1/+2
| | | | | | | | | | | | | | | now used in f_ops in place of NULL, and modifications to the files are more carefully ordered. f_ops should also be set to &badfileops upon "close" of a file. This does not fix other problems mentioned in this PR than the first one. PR: 11629 Reviewed by: peter Notes: svn path=/head/; revision=49413
* Add standard padding argument to pread and pwrite syscall. That should make themDmitrij Tejblum1999-04-041-3/+5
| | | | | | | | | | | | NetBSD compatible. Add parameter to fo_read and fo_write. (The only flag FOF_OFFSET mean that the offset is set in the struct uio). Factor out some common code from read/pread/write/pwrite syscalls. Notes: svn path=/head/; revision=45311
* Moved prototypes for soo_{read,write,close} into socketvar.h where theyMark Newton1999-02-011-6/+1
| | | | | | | | | belong. Suggested by: bde Notes: svn path=/head/; revision=43512
* Fix bogus line breaks in declarations for soo_read() and soo_write()Mark Newton1999-02-011-5/+3
| | | | | | | Suggested by: Pedant Central :-) Notes: svn path=/head/; revision=43498
* Added comments about non-staticization so it doesn't get un-done nextMark Newton1999-01-311-1/+2
| | | | | | | | | time someone goes on a staticization binge. Suggested by: eivind Notes: svn path=/head/; revision=43448
* Unstaticized routines which are needed by the svr4 KLD and the streamsMark Newton1999-01-301-7/+7
| | | | | | | garbage needed to support SysVR4 networking. Notes: svn path=/head/; revision=43408
* Installed the second patch attached to kern/7899 with some changes suggestedDon Lewis1998-11-111-4/+11
| | | | | | | | | | | | | | | | | | | by bde, a few other tweaks to get the patch to apply cleanly again and some improvements to the comments. This change closes some fairly minor security holes associated with F_SETOWN, fixes a few bugs, and removes some limitations that F_SETOWN had on tty devices. For more details, see the description on the PR. Because this patch increases the size of the proc and pgrp structures, it is necessary to re-install the includes and recompile libkvm, the vinum lkm, fstat, gcore, gdb, ipfilter, ps, top, and w. PR: kern/7899 Reviewed by: bde, elvind Notes: svn path=/head/; revision=41086
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-071-2/+2
| | | | | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time. Notes: svn path=/head/; revision=36735
* Moved some #includes from <sys/param.h> nearer to where they are actuallyBruce Evans1998-03-281-1/+2
| | | | | | | used. Notes: svn path=/head/; revision=34924
* Various select -> poll changesPeter Wemm1997-09-141-5/+6
| | | | Notes: svn path=/head/; revision=29361
* Fix all areas of the system (or at least all those in LINT) to avoid storingGarrett Wollman1997-08-161-2/+3
| | | | | | | | | | | socket addresses in mbufs. (Socket buffers are the one exception.) A number of kernel APIs needed to get fixed in order to make this happen. Also, fix three protocol families which kept PCBs in mbufs to not malloc them instead. Delete some old compatibility cruft while we're at it, and add some new routines in the in_cksum family. Notes: svn path=/head/; revision=28270
* Removed unused #includes.Bruce Evans1997-08-021-6/+1
| | | | Notes: svn path=/head/; revision=27845
* The long-awaited mega-massive-network-code- cleanup. Part I.Garrett Wollman1997-04-271-42/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit includes the following changes: 1) Old-style (pr_usrreq()) protocols are no longer supported, the compatibility glue for them is deleted, and the kernel will panic on boot if any are compiled in. 2) Certain protocol entry points are modified to take a process structure, so they they can easily tell whether or not it is possible to sleep, and also to access credentials. 3) SS_PRIV is no more, and with it goes the SO_PRIVSTATE setsockopt() call. Protocols should use the process pointer they are now passed. 4) The PF_LOCAL and PF_ROUTE families have been updated to use the new style, as has the `raw' skeleton family. 5) PF_LOCAL sockets now obey the process's umask when creating a socket in the filesystem. As a result, LINT is now broken. I'm hoping that some enterprising hacker with a bit more time will either make the broken bits work (should be easy for netipx) or dike them out. Notes: svn path=/head/; revision=25201
* Don't include <sys/ioctl.h> in the kernel. Stage 4: includeBruce Evans1997-03-241-2/+3
| | | | | | | | | | | <sys/ttycom.h> and sometimes <sys/filio.h> instead of <sys/ioctl.h> in miscellaneous files. Most of these files have nothing to do with ttys but need to include <sys/ttycom.h> to get the definitions of TIOC[SG]PGRP which are (ab)used to convert F[SG]ETOWN fcntls into ioctls. Notes: svn path=/head/; revision=24206
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.Bruce Evans1997-03-231-1/+2
| | | | | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all. Notes: svn path=/head/; revision=24131
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Modify the kernel to use the new pr_usrreqs interface rather than the oldGarrett Wollman1996-07-111-6/+3
| | | | | | | | | | | | | | | | | pr_usrreq mechanism which was poorly designed and error-prone. This commit renames pr_usrreq to pr_ousrreq so that old code which depended on it would break in an obvious manner. This commit also implements the new interface for TCP, although the old function is left as an example (#ifdef'ed out). This commit ALSO fixes a longstanding bug in the TCP timer processing (introduced by davidg on 1995/04/12) which caused timer processing on a TCB to always stop after a single timer had expired (because it misinterpreted the return value from tcp_usrreq() to indicate that the TCB had been deleted). Finally, some code related to polling has been deleted from if.c because it is not relevant t -current and doesn't look at all like my current code. Notes: svn path=/head/; revision=17096
* Move or add #include <queue.h> in preparation for upcoming struct socketDavid Greenman1996-03-111-1/+2
| | | | | | | changes. Notes: svn path=/head/; revision=14546
* A Major staticize sweep. Generates a couple of warnings that I'll dealPoul-Henning Kamp1995-12-141-4/+10
| | | | | | | | | with later. A number of unused vars removed. A number of unused procs removed or #ifdefed. Notes: svn path=/head/; revision=12819
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-3/+3
| | | | Notes: svn path=/head/; revision=8876
* All of this is cosmetic. prototypes, #includes, printfs and so on. MakesPoul-Henning Kamp1994-10-021-1/+2
| | | | | | | GCC a lot more silent. Notes: svn path=/head/; revision=3308
* Added $Id$David Greenman1994-08-021-0/+1
| | | | Notes: svn path=/head/; revision=1817
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.Rodney W. Grimes1994-05-251-0/+6
| | | | | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman Notes: svn path=/head/; revision=1549
* BSD 4.4 Lite Kernel SourcesRodney W. Grimes1994-05-241-0/+197
Notes: svn path=/head/; revision=1541