aboutsummaryrefslogtreecommitdiff
path: root/sys/netncp
Commit message (Collapse)AuthorAgeFilesLines
* size_t != int. Make this compile on 64 bit platforms (eg: amd64).Peter Wemm2003-07-241-1/+2
| | | | | | | Also, "u_short value; if (value > 0xffff)" can never be true. Notes: svn path=/head/; revision=117949
* Use __FBSDID().David E. O'Brien2003-06-119-24/+36
| | | | Notes: svn path=/head/; revision=116189
* - Merge struct procsig with struct sigacts.John Baldwin2003-05-131-1/+3
| | | | | | | | | | | | | | | | | | | | - Move struct sigacts out of the u-area and malloc() it using the M_SUBPROC malloc bucket. - Add a small sigacts_*() API for managing sigacts structures: sigacts_alloc(), sigacts_free(), sigacts_copy(), sigacts_share(), and sigacts_shared(). - Remove the p_sigignore, p_sigacts, and p_sigcatch macros. - Add a mutex to struct sigacts that protects all the members of the struct. - Add sigacts locking. - Remove Giant from nosys(), kill(), killpg(), and kern_sigaction() now that sigacts is locked. - Several in-kernel functions such as psignal(), tdsignal(), trapsignal(), and thread_stopped() are now MP safe. Reviewed by: arch@ Approved by: re (rwatson) Notes: svn path=/head/; revision=114983
* - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread withJeff Roberson2003-03-311-2/+3
| | | | | | | | | | a follow on commit to kern_sig.c - signotify() now operates on a thread since unmasked pending signals are stored in the thread. - PS_NEEDSIGCHK moves to TDF_NEEDSIGCHK. Notes: svn path=/head/; revision=112888
* Replace the at_fork, at_exec, and at_exit functions with the slightly moreJohn Baldwin2003-03-241-7/+7
| | | | | | | | | | | | flexible process_fork, process_exec, and process_exit eventhandlers. This reduces code duplication and also means that I don't have to go duplicate the eventhandler locking three more times for each of at_fork, at_exec, and at_exit. Reviewed by: phk, jake, almost complete silence on arch@ Notes: svn path=/head/; revision=112564
* Use td->td_ucred instead of td->td_proc->p_ucred.John Baldwin2003-03-201-1/+1
| | | | Notes: svn path=/head/; revision=112451
* Note that MAJOR_AUTO is now the default if d_maj is not initialized. ThisPoul-Henning Kamp2003-03-091-1/+0
| | | | | | | | | | | is more robust and prevents the hijacking of /dev/console for the typical mistake. Remove unneeded MAJOR_AUTO uses, it is only needed explicitly now if the driver source has cross-branch compatibility to old releases. Notes: svn path=/head/; revision=112037
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-13/+5
| | | | | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl) Notes: svn path=/head/; revision=111815
* Use a character device and ioctl() for communication between libncpTim J. Robbins2003-02-283-138/+155
| | | | | | | | and the kernel instead of adding more syscalls at runtime. As a bonus, you can now restrict access to the kernel NCP interface with chmod. Notes: svn path=/head/; revision=111657
* Catch up with KSE changes.Max Khon2003-02-2611-314/+369
| | | | | | | Reviewed by: tjr Notes: svn path=/head/; revision=111577
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-194-5/+5
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Lock proc while accessing p_siglist p_sigmask and p_sigignore.Tim J. Robbins2003-02-141-1/+5
| | | | | | | Not tested because netncp does not compile. Notes: svn path=/head/; revision=110850
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-214-5/+5
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* - Change mb_copy_t to take a size_t as the length argument instead of anJohn Baldwin2002-11-081-1/+1
| | | | | | | | | | int. - Change the local variable in smb_copy_iconv() from an int to a size_t. These make smb_copy_iconv() happy in a 64-bit world. Notes: svn path=/head/; revision=106667
* Change iov_base's type from `char *' to the standard `void *'. AllMike Barcroft2002-10-111-1/+2
| | | | | | | | uses of iov_base which assume its type is `char *' (in order to do pointer arithmetic) have been updated to cast iov_base to `char *'. Notes: svn path=/head/; revision=104908
* Back our kernel support for reliable signal queues.Juli Mallett2002-10-011-3/+2
| | | | | | | Requested by: rwatson, phk, and many others Notes: svn path=/head/; revision=104306
* Convert use of p_siglist and old SIG*() macros to use <sys/ksiginfo.h>Juli Mallett2002-09-301-2/+3
| | | | | | | | | prototyped functions to get a sigset_t, and further to check for any queued signals, rather than an empty signal set, to go with the move to signal queues rather than signal sets. Notes: svn path=/head/; revision=104235
* use __packed.Alfred Perlstein2002-09-233-14/+14
| | | | Notes: svn path=/head/; revision=103870
* Wire the sysctl output buffer before grabbing any locks to preventDon Lewis2002-07-281-0/+1
| | | | | | | | | | SYSCTL_OUT() from blocking while locks are held. This should only be done when it would be inconvenient to make a temporary copy of the data and defer calling SYSCTL_OUT() until after the locks are released. Notes: svn path=/head/; revision=100831
* Make bn_name a const char * to quieten some warnings.David Malone2002-07-271-1/+1
| | | | | | | Approved by: bp (long ago) Notes: svn path=/head/; revision=100777
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.Seigo Tanimura2002-05-311-4/+1
| | | | | | | Requested by: hsu Notes: svn path=/head/; revision=97658
* CURSIG() is not a macro so rename it cursig().Julian Elischer2002-05-291-1/+1
| | | | | | | Obtained from: KSE tree Notes: svn path=/head/; revision=97526
* Lock down a socket, milestone 1.Seigo Tanimura2002-05-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=96972
* More s/file system/filesystem/gTom Rhodes2002-05-161-1/+1
| | | | Notes: svn path=/head/; revision=96755
* Add character translation table between Unix and NetWare accordingBoris Popov2002-04-201-0/+2
| | | | | | | | | | to Sweden standards. Submitted by: Roger Olofsson <roger.olofsson@kommun.engelholm.se> MFC after: 1 week Notes: svn path=/head/; revision=95108
* Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin2002-04-011-1/+1
| | | | | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@ Notes: svn path=/head/; revision=93593
* Update to C99, s/__FUNCTION__/__func__/,David E. O'Brien2001-12-104-10/+10
| | | | | | | also don't use ANSI string concatenation. Notes: svn path=/head/; revision=87599
* Change the kernel's ucred API as follows:John Baldwin2001-10-111-4/+2
| | | | | | | | | | | - crhold() returns a reference to the ucred whose refcount it bumps. - crcopy() now simply copies the credentials from one credential to another and has no return value. - a new crshared() primitive is added which returns true if a ucred's refcount is > 1 and false (0) otherwise. Notes: svn path=/head/; revision=84827
* KSE Milestone 2Julian Elischer2001-09-122-19/+19
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=83366
* Mark some functions as __printflike() and/or taking const char * argumentsKris Kennaway2001-08-201-1/+1
| | | | | | | | | instead of char *. MFC after: 2 weeks Notes: svn path=/head/; revision=81975
* Fix warning: 203: implicit declaration of function `kernel_sysctlbyname'Peter Wemm2001-06-151-0/+1
| | | | Notes: svn path=/head/; revision=78253
* With this commit, I hereby pronounce gensetdefs past its use-by date.Peter Wemm2001-06-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macros for accessing elements and completely hides the implementation. The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it). The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *. For ELF, we use the magic ld symbols (__start_<setname> and __stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the trick about how to force ld to provide them for kld's. For a.out, we use the old linker_set struct. NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas. The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use. linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day. Reviewed by: eivind Notes: svn path=/head/; revision=78161
* Use new kernel_sysctlbyname function. Remove private copy.Jonathan Lemon2001-05-193-22/+2
| | | | Notes: svn path=/head/; revision=76835
* Include sys/lock.h and sys/mutex.h so that this compiles.John Baldwin2001-05-151-0/+2
| | | | Notes: svn path=/head/; revision=76639
* Back out scanning file descriptors with holding a process lock.Seigo Tanimura2001-05-151-2/+16
| | | | | | | | selrecord() requires allproc sx in pfind(), resulting in lock order reversal between allproc and a process lock. Notes: svn path=/head/; revision=76618
* - Convert msleep(9) in select(2) and poll(2) to cv_*wait*(9).Seigo Tanimura2001-05-141-9/+13
| | | | | | | | | | | | | | | | - Since polling should not involve sleeping, keep holding a process lock upon scanning file descriptors. - Hold a reference to every file descriptor prior to entering polling loop in order to avoid lock order reversal between lockmgr and p_mtx upon calling fdrop() in fo_poll(). (NOTE: this work has not been done for netncp and netsmb yet because a socket itself has no reference counts.) Reviewed by: jhb Notes: svn path=/head/; revision=76564
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inMark Murray2001-05-012-3/+5
| | | | | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations) Notes: svn path=/head/; revision=76166
* Move bindery authentication ncps to ncp_ncp.c file. ncp_login.c will stayBoris Popov2001-03-227-170/+178
| | | | | | | empty for a while. Notes: svn path=/head/; revision=74647
* Properly set flags on the broken connection.Boris Popov2001-03-224-13/+24
| | | | Notes: svn path=/head/; revision=74646
* Major update of NCP requester:Boris Popov2001-03-1014-1254/+916
| | | | | | | | | | | | | | | | | | | | Use mchain API to work with mbuf chains. Do not depend on INET and IPX options. Allocate ncp_rq structure dynamically to prevent possible stack overflows. Let ncp_request() dispose control structure if request failed. Move all NCP wrappers to ncp_ncp.c file and all NCP request processing functions to ncp_rq.c file. Improve reconnection logic. Misc style fixes. Notes: svn path=/head/; revision=74060
* Specify packing for an entire structure, not for each element of it.Boris Popov2001-03-101-95/+95
| | | | Notes: svn path=/head/; revision=74059
* Implement m_getm() which will perform an "all or nothing" mbuf + clusterBosko Milekic2001-02-141-27/+2
| | | | | | | | | | | | | | | | | | | | | | | | allocation, as required. If m_getm() receives NULL as a first argument, then it allocates `len' (second argument) bytes worth of mbufs + clusters and returns the chain only if it was able to allocate everything. If the first argument is non-NULL, then it should be an existing mbuf chain (e.g. pre-allocated mbuf sitting on a ring, on some list, etc.) and so it will allocate `len' bytes worth of clusters and mbufs, as needed, and append them to the tail of the passed in chain, only if it was able to allocate everything requested. If allocation fails, only what was allocated by the routine will be freed, and NULL will be returned. Also, get rid of existing m_getm() in netncp code and replace calls to it to calls to this new generic code. Heavily Reviewed by: bp Notes: svn path=/head/; revision=72473
* Mechanical change to use <sys/queue.h> macro API instead ofPoul-Henning Kamp2001-02-042-6/+6
| | | | | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1) Notes: svn path=/head/; revision=71999
* Common option '-N' do not require an argument.Boris Popov2001-01-071-2/+2
| | | | Notes: svn path=/head/; revision=70744
* * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT.Bosko Milekic2000-12-212-9/+9
| | | | | | | | | | | | | | | | | | | | | This is because calls with M_WAIT (now M_TRYWAIT) may not wait forever when nothing is available for allocation, and may end up returning NULL. Hopefully we now communicate more of the right thing to developers and make it very clear that it's necessary to check whether calls with M_(TRY)WAIT also resulted in a failed allocation. M_TRYWAIT basically means "try harder, block if necessary, but don't necessarily wait forever." The time spent blocking is tunable with the kern.ipc.mbuf_wait sysctl. M_WAIT is now deprecated but still defined for the next little while. * Fix a typo in a comment in mbuf.h * Fix some code that was actually passing the mbuf subsystem's M_WAIT to malloc(). Made it pass M_WAITOK instead. If we were ever to redefine the value of the M_WAIT flag, this could have became a big problem. Notes: svn path=/head/; revision=70254
* Make malloc use M_ZERO in some more locations.David Malone2000-10-291-6/+3
| | | | | | | | | | | Don't check for a null pointer if malloc called with M_WAITOK. Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: bp Notes: svn path=/head/; revision=67895
* Remove unneeded #include <sys/proc.h> lines.Poul-Henning Kamp2000-10-291-1/+0
| | | | Notes: svn path=/head/; revision=67882
* Convert lockmgr locks from using simple locks to using mutexes.Jason Evans2000-10-043-0/+10
| | | | | | | | | Add lockdestroy() and appropriate invocations, which corresponds to lockinit() and must be called to clean up after a lockmgr lock is no longer needed. Notes: svn path=/head/; revision=66615
* Remove duplicate SYSCTL_NODE() declaration. Kernel linker can't dealBoris Popov2000-10-021-1/+0
| | | | | | | with it well. Notes: svn path=/head/; revision=66538
* Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.Poul-Henning Kamp2000-07-041-2/+2
| | | | | | | Pointed out by: bde Notes: svn path=/head/; revision=62573