summaryrefslogtreecommitdiffstats
path: root/sys/sys/un.h
Commit message (Collapse)AuthorAgeFilesLines
* Now that portalfs doesn't directly invoke uipc_connect2(), make it arwatson2008-10-061-7/+2
| | | | | | static symbol. MFC after: 3 days
* Further minor cleanups to UNIX domain sockets:rwatson2008-10-031-10/+1
| | | | | | | | | | | | | | | - Staticize and locally prototype functions uipc_ctloutput(), unp_dispose(), unp_init(), and unp_externalize(), none of which have been required outside of uipc_usrreq.c since uipc_proto.c was removed. - Remove stale prototype for uipc_usrreq(), which has not existed in the code since 1997 - Forward declare and staticize uipc_usrreqs structure in uipc_usrreq.c and not un.h. - Comment on why uipc_connect2() is still non-static -- it is used directly by fifofs. - Remove stale comments, tidy up whitespace. MFC after: 3 days (where applicable)
* Implement unix(4) socket options LOCAL_CREDS and LOCAL_CONNWAIT.mdodd2005-04-131-1/+3
| | | | | | | | - Add unp_addsockcred() (for LOCAL_CREDS). - Add an argument to unp_connect2() to differentiate between PRU_CONNECT and PRU_CONNECT2. (for LOCAL_CONNWAIT) Obtained from: NetBSD (with some changes)
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+1
|
* Remove advertising clause from University of California Regent's license,imp2004-04-071-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core
* Export uipc_connect2() from uipc_usrreq.c instead of unp_connect2(),rwatson2004-03-311-1/+1
| | | | | | | | | | and consume that interface in portalfs and fifofs instead. In the new world order, unp_connect2() assumes that the unpcb mutex is held, whereas uipc_connect2() validates that the passed sockets are UNIX domain sockets, then grabs the mutex. NB: the portalfs and fifofs code gets down and dirty with UNIX domain sockets. Maybe this is a bad thing.
* o Merge <machine/ansi.h> and <machine/types.h> into a new headermike2002-08-211-3/+3
| | | | | | | | | | | | | | | | | | | | | called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien
* Change spelling of `u_char' to `unsigned char' to avoid requiringmike2002-06-191-1/+1
| | | | <sys/types.h> as a prerequisite.
* Add typedef of sa_family_t to <sys/un.h>, per POSIX and X/Open. Hidemike2002-04-201-1/+14
| | | | portions of <sys/un.h> when a standard has been requested.
* Remove __Palfred2002-03-191-7/+7
|
* Hopefully improve control message passing over Unix domain sockets.dwmalone2001-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Allow the sending of more than one control message at a time over a unix domain socket. This should cover the PR 29499. 2) This requires that unp_{ex,in}ternalize and unp_scan understand mbufs with more than one control message at a time. 3) Internalize and externalize used to work on the mbuf in-place. This made life quite complicated and the code for sizeof(int) < sizeof(file *) could end up doing the wrong thing. The patch always create a new mbuf/cluster now. This resulted in the change of the prototype for the domain externalise function. 4) You can now send SCM_TIMESTAMP messages. 5) Always use CMSG_DATA(cm) to determine the start where the data in unp_{ex,in}ternalize. It was using ((struct cmsghdr *)cm + 1) in some places, which gives the wrong alignment on the alpha. (NetBSD made this fix some time ago). This results in an ABI change for discriptor passing and creds passing on the alpha. (Probably on the IA64 and Spare ports too). 6) Fix userland programs to use CMSG_* macros too. 7) Be more careful about freeing mbufs containing (file *)s. This is made possible by the prototype change of externalise. PR: 29499 MFC after: 6 weeks
* Fixed a missing forward declaration and unsorting of prototypes in rev.1.18.bde2001-10-041-1/+2
|
* style(9) the structure definitions.obrien2001-09-051-1/+1
|
* Implement a LOCAL_PEERCRED socket option which returns add2001-08-171-0/+4
| | | | | | | | | | | `struct xucred` with the credentials of the connected peer. Obviously this only works (and makes sense) on SOCK_STREAM sockets. This works for both the connect(2) and listen(2) callers. There is precise documentation of the semantics in unix(4). Reviewed by: dwmalone (eyeballed)
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-3/+3
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fixed missing and unused forward declarations of structs.bde1998-05-171-2/+2
|
* Convert socket structures to be type-stable and add a version number.wollman1998-05-151-5/+2
| | | | | | | | | | | | | | | | | | | Define a parameter which indicates the maximum number of sockets in a system, and use this to size the zone allocators used for sockets and for certain PCBs. Convert PF_LOCAL PCB structures to be type-stable and add a version number. Define an external format for infomation about socket structures and use it in several places. Define a mechanism to get all PF_LOCAL and PF_INET PCB lists through sysctl(3) without blocking network interrupts for an unreasonable length of time. This probably still has some bugs and/or race conditions, but it seems to work well enough on my machines. It is now possible for `netstat' to get almost all of its information via the sysctl(3) interface rather than reading kmem (changes to follow).
* Fix all areas of the system (or at least all those in LINT) to avoid storingwollman1997-08-161-1/+2
| | | | | | | | 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.
* The long-awaited mega-massive-network-code- cleanup. Part I.wollman1997-04-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-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.
* Merge in Lite2: add function prototypes.hsu1996-03-111-10/+14
| | | | | | | | Did not accept prototypes for unp_attach(), unp_bind(), unp_connect(), unp_detach(), unp_discard(), unp_disconnect(), unp_drop(), np_gc(), unp_mark(), unp_scan(), and unp_shutdown(). They are used only in uipc_usrreq.c and declared static there. Reviewed by: davidg & bde
* Another mega commit to staticize things.phk1995-12-141-13/+1
|
* Completed function declarations and/or added prototypes.bde1995-11-211-1/+5
|
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* Prototypes, prototypes and even more prototypes. Not quite done yet, butphk1994-10-021-2/+20
| | | | getting closer all the time.
* Made them all idempotent.paul1994-08-211-1/+6
| | | | | Reviewed by: Submitted by:
* Added $Id$dg1994-08-021-0/+1
|
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-4/+1
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+52
OpenPOWER on IntegriCloud