summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_ksocket.c
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of the deprecated *LEN constants in favour of the newharti2004-01-261-1/+1
| | | | *SIZ constants that include the trailing \0 byte.
* Replaced two bzero() calls with the M_ZERO flag to malloc().ru2003-12-171-3/+2
| | | | Reviewed by: julian
* Add Protocol Independent Multicast protocol.hsu2003-08-201-0/+1
| | | | Submitted by: Pavlin Radoslavov <pavlin@icir.org>
* Add missing braces.archie2003-04-281-1/+2
| | | | Submitted by: Andrew Lankford <arlankfo@141.com>
* Reference the socket we're accepting.benno2002-09-141-0/+2
|
* Remember who asked for a connect or accept operation so we can actually tellbenno2002-09-111-2/+2
| | | | | | them when it's done. Reviewed by: archie
* Don't use "NULL" when "0" is really meant.archie2002-08-221-3/+3
|
* Fix GCC warnings caused by initializing a zero length array. In the process,archie2002-05-311-8/+7
| | | | | | | simply things a bit by getting rid of 'struct ng_parse_struct_info' which was useless because it only contained one field. MFC after: 2 weeks
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.tanimura2002-05-311-49/+11
| | | | Requested by: hsu
* Lock down a socket, milestone 1.tanimura2002-05-201-11/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Add a mutex (sb_mtx) to struct sockbuf. This protects the data in a socket buffer. The mutex in the receive buffer also protects the data in struct socket. o Determine the lock strategy for each members in struct socket. o Lock down the following members: - so_count - so_options - so_linger - so_state o Remove *_locked() socket APIs. Make the following socket APIs touching the members above now require a locked socket: - sodisconnect() - soisconnected() - soisconnecting() - soisdisconnected() - soisdisconnecting() - sofree() - soref() - sorele() - sorwakeup() - sotryfree() - sowakeup() - sowwakeup() Reviewed by: alfred
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-271-1/+1
| | | | reference.
* Pre-KSE/M3 commit.julian2002-02-071-3/+3
| | | | | | | | | | this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the process. It IS still embeded there but remove all teh code that assumes that in preparation for the next commit which will actually move it out. Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
* Avoid reentrantly sending on the same socket, which causes a kernel panic.archie2002-01-061-0/+9
|
* o Make the credential used by socreate() an explicit argument torwatson2001-12-311-1/+2
| | | | | | | | | | | | | | socreate(), rather than getting it implicitly from the thread argument. o Make NFS cache the credential provided at mount-time, and use the cached credential (nfsmount->nm_cred) when making calls to socreate() on initially connecting, or reconnecting the socket. This fixes bugs involving NFS over TCP and ipfw uid/gid rules, as well as bugs involving NFS and mandatory access control implementations. Reviewed by: freebsd-arch
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-2/+2
| | | | also don't use ANSI string concatenation.
* When a socket is not connected, allow the peer "struct sockaddr"archie2001-11-281-13/+74
| | | | | | | | to be included in the meta information that is associated with incoming and outgoing packets. Reviewed by: julian MFC after: 1 week
* Let "raw" mean IPPROTO_RAW instead of IPPROTO_IP.archie2001-10-101-1/+1
| | | | | Noticed by: jdp MFC after: 3 days
* KSE Milestone 2julian2001-09-121-11/+11
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* First pass at porting John's "accept" changes tojulian2001-09-071-49/+366
| | | | | | | | | | | | allow an in-kernel webserver (or similar) to accept and handle incoming connections using netgraph without ever leaving the kernel. (allows incoming tunnel requests to be handled totally within the kernel for example) Needs work, but shouldn't break existing functionality. Submitted by: John Polstra <jdp@polstra.com> MFC after: 2 weeks
* Fix an erroneous comment and two style(9) bugs.archie2001-02-161-3/+5
|
* Fix some memory leaksjulian2001-01-101-6/+12
| | | | Add memory leak detection assitance.
* Part 2 of the netgraph rewrite.julian2001-01-081-15/+14
| | | | | | This is mostly cosmetic changes, (though I caught a bug or two while makeing them) Reviewed by: archie@freebsd.org
* Rewrite of netgraph to start getting ready for SMP.julian2001-01-061-28/+18
| | | | | | | | This version is functional and is aproaching solid.. notice I said APROACHING. There are many node types I cannot test I have tested: echo hole ppp socket vjc iface tee bpf async tty The rest compile and "Look" right. More changes to follow. DEBUGGING is enabled in this code to help if people have problems.
* Divorce the kernel binary ABI version number from the messagejulian2000-12-181-1/+1
| | | | | | | | | format version number. (userland programs should not need to be recompiled when the netgraph kernel internal ABI is changed. Also fix modules that don;t handle the fact that a caller may not supply a return message pointer. (benign at the moment because the calling code checks, but that will change)
* Reviewed by: Archie@freebsd.orgjulian2000-12-121-2/+1
| | | | | | | | | | | | | This clears out my outstanding netgraph changes. There is a netgraph change of design in the offing and this is to some extent a superset of soem of the new functionality and some of the old functionality that may be removed. This code works as before, but allows some new features that I want to work with and evaluate. It is the basis for a version of netgraph with integral locking for SMP use. This is running on my test machine with no new problems :-)
* Add the use of M_ZERO to netgraph.dwmalone2000-11-181-2/+1
| | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Submitted by: archie Approved by: archie
* Go back to using data_len in struct ngpppoe_init_data after discussionsbrian2000-11-161-3/+2
| | | | | | | | | | | with Julian and Archie. Implement a new ``sizedstring'' parse type for dealing with field pairs consisting of a uint16_t followed by a data field of that size, and use this to deal with the data_len and data fields. Written by: Archie with some input by me Agreed in principle by: julian
* Since neither archie nor I work at Whistle any more, change our emailjulian2000-10-241-1/+1
| | | | | | addresses to be the more usefu @freebsd.org ones so we can keep getting bug-reports. - man pages to follow..
* Fix memory leak.archie2000-10-111-2/+2
| | | | Submitted by: Christopher N. Harrell <cnh@ivmg.net>
* Allocate all memory (including within node constructors) with M_NOWAITarchie2000-09-211-1/+1
| | | | instead of M_WAITOK, to allow for maximum flexibility.
* Take advantage of the new unsigned and hex integer types.archie2000-08-101-2/+2
|
* In a struct sockaddr, sa->sa_len can be zero if uninitialized.archie2000-08-091-1/+1
| | | | Make sure that this doesn't cause a problem when parsing.
* Two simple changes to the kernel internal API for netgraph modules,julian2000-04-281-2/+3
| | | | | | | to support future work in flow-control and 'packet reject/replace' processing modes. reviewed by: phk, archie
* Remove a bunch of un-needed includes.julian1999-12-071-2/+0
| | | | Submitted by: phk@freebsd.org
* Add two new generic control messages, NGM_ASCII2BINARY andarchie1999-11-301-66/+491
| | | | | | | | | | | | | | | | | | | | | | | NGM_BINARY2ASCII, which convert control messages to ASCII and back. This allows control messages to be sent and received in ASCII form using ngctl(8), which makes ngctl a lot more useful. This also allows all the type-specific debugging code in libnetgraph to go away -- instead, we just ask the node itself to do the ASCII translation for us. Currently, all generic control messages are supported, as well as messages associated with the following node types: async, cisco, ksocket, and ppp. See /usr/share/examples/netgraph/ngctl for an example of using this. Also give ngctl(8) the ability to print out incoming data and control messages at any time. Eventually nghook(8) may be subsumed. Several other misc. bug fixes. Reviewed by: julian
* Change the prototype of the strto* routines to make the secondarchie1999-11-241-1/+1
| | | | | | | | | | | parameter a char ** instead of a const char **. This make these kernel routines consistent with the corresponding libc userland routines. Which is actually 'correct' is debatable, but consistency and following the spec was deemed more important in this case. Reviewed by (in concept): phk, bde
* Add some safety using KASSERT() and splnet().archie1999-11-191-12/+18
|
* New netgraph node type "ksocket".archie1999-11-161-0/+481
Obtained from: Whistle source tree
OpenPOWER on IntegriCloud