aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph
Commit message (Collapse)AuthorAgeFilesLines
* fixes for this driver:Julian Elischer2002-11-261-2/+38
| | | | | | | | | | | 1) "ubt" driver did not work when system is booted with the device attached 2) missing "break;" in ubt_rcvmsg() function; Submitted by: Maksim Yevmenkin <Maksim.Yevmenkin@cw.com> Approved by: re (jhb) Notes: svn path=/head/; revision=107287
* The second try a committing the bluetooth codeJulian Elischer2002-11-2050-0/+26141
| | | | | | | | | | | | | | | | | | | Has been seen to work on several cards and communicating with several mobile phones to use them as modems etc. We are still talking with 3com to try get them to allow us to include the firmware for their pccard in the driver but the driver is here.. In the mean time it can be downloaded from the 3com website and loaded using the utility bt3cfw(8) (supplied) (instructions in the man page) Not yet linked to the build Submitted by: Maksim Yevmenkin <myevmenk@exodus.net> Approved by: re Notes: svn path=/head/; revision=107120
* o track changes to ethernet input packet handlingSam Leffler2002-11-143-96/+22
| | | | | | | | | | | o track changes to bpf o track changes to make ng hooks more private Reviewed by: many Approved by: re Notes: svn path=/head/; revision=106933
* Use intptr_t to fix various sizeof(int) != sizeof(void *) warnings.John Baldwin2002-11-084-12/+12
| | | | Notes: svn path=/head/; revision=106665
* Use %z to print a size_t value.John Baldwin2002-11-081-1/+1
| | | | Notes: svn path=/head/; revision=106624
* Slight redesign for fitting in with -current.Julian Elischer2002-11-051-27/+50
| | | | Notes: svn path=/head/; revision=106435
* The easy part of converting the ng_source node to -current.Julian Elischer2002-11-021-54/+50
| | | | | | | More to come.. does not compile (deliberatly.. logic broken) Notes: svn path=/head/; revision=106321
* Whitespace fixesJulian Elischer2002-11-021-47/+28
| | | | Notes: svn path=/head/; revision=106319
* ifnet_addrs doesn;t exist any more so useJulian Elischer2002-11-011-3/+3
| | | | | | | | | | TAILQ_FIRST(&ifp->if_addrhead) to find the link layer ifaddr. (it's always first I believe) Allows this to compile on -current. .. need testers with FEC capable switches.. Notes: svn path=/head/; revision=106317
* Add the netgraph 'source' module.Julian Elischer2002-10-312-0/+776
| | | | | | | | | | | | | | | | This is NOT YET CONVERTED TO -current. This node is a source for preprogrammed packets at a known rate for testing. I will convert it to -current "in place" but will MFC teh original pre-conversion variant as that is what is originally submitted. Man page my me, info from Dave's README. Submitted by: Dave Chapeskie <dchapeskie@SANDVINE.com> Obtained from: Sandvine inc. MFC after: 1 week Notes: svn path=/head/; revision=106266
* Finally get around to committing Bill Paul's FEC netgraph nodes.Julian Elischer2002-10-292-0/+1311
| | | | | | | | | | | | These are really only partly netgraph nodes as they do not use the netgraph interfaces for many of the functions for which they could be used, however they represent important functionality. Submitted by: wpaul MFC after: 2 days Notes: svn path=/head/; revision=106159
* Use if_printf(ifp, "blah") instead ofBrooks Davis2002-10-211-1/+1
| | | | | | | printf("%s%d: blah", ifp->if_name, ifp->if_xname). Notes: svn path=/head/; revision=105598
* use __packed.Alfred Perlstein2002-09-232-5/+5
| | | | Notes: svn path=/head/; revision=103870
* Reference the socket we're accepting.Benno Rice2002-09-141-0/+2
| | | | Notes: svn path=/head/; revision=103313
* Relax checking of incoming PPTP GRE packets a bit: ignore a bogus payloadArchie Cobbs2002-09-141-1/+1
| | | | | | | | length field when there's no payload indicated by the header 'S' bit. This works around semi-brokenness in the Mac OS X PPTP client. Notes: svn path=/head/; revision=103308
* Remember who asked for a connect or accept operation so we can actually tellBenno Rice2002-09-111-2/+2
| | | | | | | | | them when it's done. Reviewed by: archie Notes: svn path=/head/; revision=103205
* Don't use "NULL" when "0" is really meant.Archie Cobbs2002-08-228-18/+18
| | | | Notes: svn path=/head/; revision=102244
* New L2TP netgraph node type.Archie Cobbs2002-08-202-0/+1640
| | | | | | | Obtained from: Packet Design Notes: svn path=/head/; revision=102195
* When declaring local variables in macros, always use "_name" insteadArchie Cobbs2002-08-201-33/+34
| | | | | | | | of "name" to avoid ugly problems when the containing code already has a variable named "name". Notes: svn path=/head/; revision=102190
* Make the consumers of the linker_load_file() function useMaxime Henrion2002-08-021-1/+1
| | | | | | | | | | | | | | | | linker_load_module() instead. This fixes a bug where the kernel was unable to properly locate and load a kernel module in vfs_mount() (and probably in the netgraph code as well since it was using the same function). This is because the linker_load_file() does not properly search the module path. Problem found by: peter Reviewed by: peter Thanks to: peter Notes: svn path=/head/; revision=101241
* NUL terminate the ACNAME passed to userland.Brian Somers2002-06-221-3/+4
| | | | Notes: svn path=/head/; revision=98636
* A node that creates a device entry in /dev (yay devfs)Julian Elischer2002-06-182-0/+681
| | | | | | | | | | | | | so that /dev/mumble can be the entrypoint to some networking graph, e.g. a tunnel or a remote tape drive or whatever... Not fully tested (by me) yet. Submitted by: Mark Santcroos <marks@ripe.net> MFC after: 3 weeks Notes: svn path=/head/; revision=98402
* if you have taken the mbuf out of the message object, then if you passJulian Elischer2002-06-091-1/+3
| | | | | | | the object to someone else, you need to put the mbuf back into it first.. Notes: svn path=/head/; revision=98063
* Const'ify variables to make it clear we're not writing to the mbuf data.Archie Cobbs2002-06-055-49/+53
| | | | | | | | Reviewed by: julian, brian MFC after: 1 week Notes: svn path=/head/; revision=97897
* Fix bug where an mbuf was being written to without checking M_WRITABLE().Archie Cobbs2002-06-051-57/+24
| | | | | | | | | | | Eliminate some of the unnecessary complexity of ng_ether_glueback_header(). Simplify two functions a bit by doing the NG_FREE_META(meta) earlier. Reviewed by: julian, brian MFC after: 1 week Notes: svn path=/head/; revision=97896
* Fix bugs where mbuf data was being accessed without m_pullup().Archie Cobbs2002-06-051-7/+43
| | | | | | | | Reviewed by: julian, brian MFC after: 1 week Notes: svn path=/head/; revision=97895
* Declare a variable sized array within a structure using [] rather than [0]Alfred Perlstein2002-06-011-1/+1
| | | | | | | to silence warnings. Notes: svn path=/head/; revision=97722
* Fix GCC warnings caused by initializing a zero length array. In the process,Archie Cobbs2002-05-3133-257/+159
| | | | | | | | | | 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 Notes: svn path=/head/; revision=97685
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.Seigo Tanimura2002-05-312-65/+11
| | | | | | | Requested by: hsu Notes: svn path=/head/; revision=97658
* Fix warnings: deprecated use of label at end of compound statementPeter Wemm2002-05-242-1/+2
| | | | Notes: svn path=/head/; revision=97229
* Lock down a socket, milestone 1.Seigo Tanimura2002-05-202-11/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a NGM_PPPOE_SESSIONID message to the ng_pppoe node.Brian Somers2002-05-142-1/+21
| | | | | | | | | | This message is sent to the control socket when the SessionID is established. Approved by: archie (after a very cursory glance) Notes: svn path=/head/; revision=96578
* Don't send packets out an interface unless it is IFF_UP|IFF_RUNNING.Archie Cobbs2002-05-091-2/+10
| | | | | | | | | | This fixes panics with certain Ethernet drivers when doing bridging, PPPoE, etc. before the driver has been fully brought up. MFC after: 1 week Notes: svn path=/head/; revision=96265
* Revert the change of #includes in sys/filedesc.h and sys/socketvar.h.Seigo Tanimura2002-04-301-3/+5
| | | | | | | | | | | | | Requested by: bde Since locking sigio_lock is usually followed by calling pgsigio(), move the declaration of sigio_lock and the definitions of SIGIO_*() to sys/signalvar.h. While I am here, sort include files alphabetically, where possible. Notes: svn path=/head/; revision=95759
* Use 'struct callout' instead of 'struct callout_handle' to avoidArchie Cobbs2002-04-141-25/+81
| | | | | | | | | | | | | | exhausting the kernel timeout table. Perform the usual gymnastics to avoid race conditions between node shutdown and timeouts occurring. Also fix a bug in handling ack delays < PPTP_MIN_ACK_DELAY. Before, we were ack'ing immediately. Instead, just impose a minimum ack delay time, like the name of the macro implies. MFC after: 1 week Notes: svn path=/head/; revision=94667
* Change callers of mtx_init() to pass in an appropriate lock type name. InJohn Baldwin2002-04-041-6/+6
| | | | | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64 Notes: svn path=/head/; revision=93818
* Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin2002-04-012-2/+2
| | | | | | | | | | | | | | | 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
* Fix bugs where the ng_ppp node could transmit PPP frames whose lengthArchie Cobbs2002-03-151-4/+18
| | | | | | | | | exceeded the peer's configured MRU or MRRU. MFC after: 1 week Notes: svn path=/head/; revision=92298
* Official timeout routines for netgraph nodes that know how toJulian Elischer2002-03-052-0/+66
| | | | | | | | | use (and abuse) the node locking system. MFC after: 1 week Notes: svn path=/head/; revision=91711
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredJohn Baldwin2002-02-271-1/+1
| | | | | | | reference. Notes: svn path=/head/; revision=91406
* Send a NGM_PPPOE_ACNAME message to userland when a node is connected.Brian Somers2002-02-202-2/+25
| | | | | | | | | Submitted by: Andre Albsmeier <andre@albsmeier.net> Shuffled about by: brian Approved by: julian Notes: svn path=/head/; revision=90973
* o Move NTOHL() and associated macros into <sys/param.h>. These areMike Barcroft2002-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm Notes: svn path=/head/; revision=90868
* Fix another bug in handling of multi-link sequence numbers.Archie Cobbs2002-02-131-3/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=90594
* Fix bug in previous commit.Archie Cobbs2002-02-121-2/+1
| | | | | | | Submitted by: Harti Brandt <brandt@fokus.gmd.de> Notes: svn path=/head/; revision=90584
* Pre-KSE/M3 commit.Julian Elischer2002-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, Notes: svn path=/head/; revision=90361
* The hardware checksum code makes the assumption that a packet routed outArchie Cobbs2002-02-051-2/+9
| | | | | | | | | | | | | | | a particular Ethernet interface will actually be delivered by (only) that device driver. This is not necessarily true when ng_ether(4) is used. To word around this, while a ng_ether(4)'s "upper" hook is connected, turn off all hardware checksum, fragmentation, etc., features for that interface. PR: kern/31586 MFC after: 1 week Notes: svn path=/head/; revision=90249
* Get rid of the twisted MFREE() macro entirely.Matthew Dillon2002-02-052-9/+3
| | | | | | | | Reviewed by: dg, bmilekic MFC after: 3 days Notes: svn path=/head/; revision=90227
* Some netgraph parse types (such as for the 'value' field in ng_ksocket'sArchie Cobbs2002-02-011-7/+14
| | | | | | | | | | | 'struct ng_ksocket_sockopt') like to peek into the ng_mesg header for information. Make sure when generating default values that we provide a valid header to peek into. MFC after: 1 week Notes: svn path=/head/; revision=90047
* Replace ffind_* with fget calls.Alfred Perlstein2002-01-141-3/+2
| | | | | | | | | | | Make fget MPsafe. Make fgetvp and fgetsock use the fget subsystem to reduce code bloat. Push giant down in fpathconf(). Notes: svn path=/head/; revision=89319
* SMP Lock struct file, filedesc and the global file list.Alfred Perlstein2002-01-131-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seigo Tanimura (tanimura) posted the initial delta. I've polished it quite a bit reducing the need for locking and adapting it for KSE. Locks: 1 mutex in each filedesc protects all the fields. protects "struct file" initialization, while a struct file is being changed from &badfileops -> &pipeops or something the filedesc should be locked. 1 mutex in each struct file protects the refcount fields. doesn't protect anything else. the flags used for garbage collection have been moved to f_gcflag which was the FILLER short, this doesn't need locking because the garbage collection is a single threaded container. could likely be made to use a pool mutex. 1 sx lock for the global filelist. struct file * fhold(struct file *fp); /* increments reference count on a file */ struct file * fhold_locked(struct file *fp); /* like fhold but expects file to locked */ struct file * ffind_hold(struct thread *, int fd); /* finds the struct file in thread, adds one reference and returns it unlocked */ struct file * ffind_lock(struct thread *, int fd); /* ffind_hold, but returns file locked */ I still have to smp-safe the fget cruft, I'll get to that asap. Notes: svn path=/head/; revision=89306