Commit Graph

427 Commits

Author SHA1 Message Date
christos e2d1c3abce remove file that did not go before. 2013-06-27 14:52:58 +00:00
christos 38d57d6181 rename to follow suit. 2013-06-26 21:36:39 +00:00
christos c02281a083 add an L2TP Gateway example. 2013-06-26 21:33:56 +00:00
yamt ef672e506a fix user-after-free bug 2013-04-22 13:28:28 +00:00
yamt 6b3d697c3c do setlocale so that we can print localized messages from libpq correctly. 2013-04-22 13:27:49 +00:00
yamt 8df556197c make pg_config overridable 2013-04-22 13:27:08 +00:00
rmind f69459c655 Fix syntax error in the example, fix one rule and G/C "rid" procedure. 2012-12-09 22:12:26 +00:00
spz e146303174 adjust to current npf.conf syntax 2012-12-04 18:48:32 +00:00
christos c1e423d3c5 add configurations to connect to Sprint's 3G network. 2012-11-01 00:40:22 +00:00
spz c60c5ec2d8 actually install the new npf examples
add examples for a hash table file and a tree table file
add an ID string to host-npf.conf
2012-08-22 06:45:15 +00:00
spz e185885455 add id string, fix comments 2012-08-21 08:25:21 +00:00
spz 52a0bf69ae the example from the man page, with a few extra comments 2012-08-21 06:54:39 +00:00
spz f9b90c2013 add an example for a npf.conf
It probably could do with polishing of both rules and comments, but meh,
better than nothing
2012-08-20 21:09:49 +00:00
yamt 4571decefa comment 2012-04-11 14:28:46 +00:00
yamt 86c517f33d don't bother to call lo_close.
as we ever open a few LOs at most in a transaction, just let them be closed
automatically at the end of the transaction.
2012-04-11 14:28:18 +00:00
yamt d72c60c595 setlabel: save SQL statements by caching the last label 2012-04-11 14:27:43 +00:00
yamt 5a2606adf5 remove FK references as it creates more problems than it solves.
particularly, it involves shared lock on the referenced table
and causes frequent deadlock.
2012-04-11 14:27:15 +00:00
yamt cb9c120507 abuse application_name to show the last puffs activity for the connection. 2012-04-11 14:26:44 +00:00
yamt e5acf2f836 reduce number of SQL statements for inactivate 2012-04-11 14:26:19 +00:00
yamt c47d2fd43a - enable writeback cache and namecache.
- use setback hack to reduce number of puffs OPs.
2012-04-11 14:25:54 +00:00
mbalmer ae1a443653 GPIO pins are 0 based when accessed from Lua, not 1 based like Lua usually
is.  The pulse() has been removed, use gpiopwm(4) for that.
2012-02-25 09:13:38 +00:00
jym 47c04e7b5a Update secmodel_examples to better describe the secmodel(9) API. 2011-12-04 23:55:36 +00:00
skrll 052320efd5 Typo 2011-11-27 09:07:11 +00:00
jmmv a5847cc334 Add assembly language examples in a new 'asm' subdirectory.
At the moment this only provides an example for a "Hello world" program
for powerpc.  (Bear with me: this is my very first assembly program in
powerpc; if you find anything stupid in the code, please fix it!)
2011-11-12 01:18:40 +00:00
mbalmer e0c22d6455 Install, and add to the set lists, example code to illustrate Lua module use. 2011-10-15 13:00:59 +00:00
mbalmer 250c0b9d25 Example files showing Lua module usage. 2011-10-15 12:58:43 +00:00
yamt 727daf99ff isempty: fix a query result type. 2011-10-13 14:40:06 +00:00
yamt fbce579470 tweak some sql statements to improve chances to use the index. 2011-10-12 16:24:39 +00:00
yamt 49413e3775 puffs file system server backed by postgresql 2011-10-12 01:05:00 +00:00
pooka 39f08af21d mirror change of -lrumpcrypto ==> -lrumpkern_crypto 2010-12-05 20:13:26 +00:00
pooka ed6861986e Add readme explaining which grue has ok'd the eating of some code
until recently located here.
2010-11-11 23:04:24 +00:00
pooka 26716af82d Remove some programs which live as atf tests now. 2010-11-11 23:01:00 +00:00
pooka 6c43668aa2 update component lists: scsipi is independent of umass now 2010-08-23 20:56:27 +00:00
christos 11e43416a1 Add cosmote examples. 2010-08-07 20:47:27 +00:00
pooka 3626443e21 Move the Delectable Test File System from share/examples/puffs/dtfs
to tests/fs/puffs/h_dtfs.

No functional change (apart from adjusting the Makefile for test builds).
2010-07-06 14:16:44 +00:00
pooka 14959b2e66 Reinstate the inactive operation (mostly dummy). This makes -i
work again and henceforth makes it possible to test inactive.
2010-07-06 13:56:40 +00:00
pooka a95d92a275 send routing messages via routing sucket -- works better than via inet sucket 2010-07-04 17:24:10 +00:00
pooka c0f3dfaa52 Fix pointer assignment in previous commit (test compile works better
when you do it with the #defines which actually compile the code
in question).
2010-07-04 15:44:46 +00:00
pooka 54c71dee8c Use a bit more than 1 byte of space for routing messages. 2010-07-04 15:31:04 +00:00
hannken 1423e65b26 Clean up vnode lock operations pass 2:
VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.
2010-06-24 12:58:48 +00:00
pooka 5c46dd73a9 tty support is in rumpkern_tty now 2010-06-14 14:48:51 +00:00
pooka 78e2a9f5d1 Add a test/example program for using audio/pad in a rump kernel.
It stuffs some nice sounds into the virtual kernel's /dev/audio,
reads the PCM from /dev/pad, and writes the data to stdout from
where it can be piped to audioplay to test that things actually
work.

If you want to know the secret message, you'll just have to run
this program ;)
2010-05-01 23:31:01 +00:00
pooka 75a8418e7c fix typo in, um, copyright.
spotted by a keen-eyed enthusiast ;)
2010-03-29 11:01:16 +00:00
pooka 7336be7f86 amazing grep, how sweet the find
that saved a hack like me
script once was lost but now it's found
was -x, but now I sh
2010-03-29 02:11:14 +00:00
pooka a7e090f70e Add an example for a rump router cluster setup along with a README.
some contributions to the code from Martti Kuparinen
2010-03-29 02:01:47 +00:00
pooka 7fb0f92c04 Check open return value and close fd when we're done. 2010-03-25 15:00:20 +00:00
pooka 07cd2d7f41 Use DIOCTUR to test if a newly configured CD drive is ready instead
of playing a random waiting game.
2010-03-22 20:37:26 +00:00
pooka 5219b831d7 Add an example/test program for rump bluetooth. This does discovery
and prints the address and name of the first peer encountered (if any):

ubt0 at uhub0 port 1
ubt0: Cambridge Silicon Radio Bluetooth USB Adapter, rev 2.00/19.15, addr 2
device ubt0, addr xx:xx:xx:xx:xx:xx
my peer: yy:yy:yy:yy:yy:yy, major class: 2 (phone)
peer name: Mokia maailmalta
2010-03-22 12:21:37 +00:00
pooka 60ab2ca5c0 Add a simple tty server which attaches to /dev/ttyU in the rump
kernel and provides the same device on the host with pud(4).  I
can succesfully talk to my u3g device using tip(1) against the
server's devices.  Some characters are lost here and there, though
(probably a problem with interrupt pipes in ugenhc).  Once that
issues is solved, there is no reason why e.g. pppd (chat) could
not be used against the server.

Now, why would anyone want to do this instead of using the kernel
driver directly?  Well, for one, on my laptop I run netbsd-5 which
doesn't have a u3g driver which supports the u3g hardware I have.

As anyone with half an eye can see, this is quite copypasted from
umserv and there is plenty of opportunity for uncopypasting for
the eager vi-wielder.
2010-03-07 23:28:14 +00:00
pooka 28ef056fc2 Pause after probe here too, so that you can amuse yourself by
unplugging and replugging devices and looking at the detach/attach
feedback messages.
2010-03-07 23:18:17 +00:00
pooka 64fbb2e2b8 In "probeonly", pause after bootstrap to make "monkey plug and
unplug device, monkey see fancy dmesg info" possible.
2010-02-18 16:14:55 +00:00
pooka 01ce72cef8 * support cd devices (@scsibus & @atapibus, per libumass)
* support cd9660
* add "probe" keyword, which just prints the dmesg in verbose form
2010-02-17 20:43:35 +00:00
pooka 7f21db1c01 rumpusbhc is now ugenhc 2010-02-10 02:31:00 +00:00
pooka ed67da89a6 The rumpdev_net80211 until-recently-wip component is now rumpnet_net80211. 2010-02-05 22:07:51 +00:00
pooka d5352760af Add an example on how to use sysmon watchdogs in rump. 2010-01-31 03:11:55 +00:00
pooka 1e79b062a3 descend into new subdirs 2010-01-11 02:20:06 +00:00
pooka 3816d47b2c Read mouse events from wsmouse and move a silly curses cursor around
the screen (quite poorly, i might add ;).
2010-01-11 02:18:45 +00:00
pooka 4737161def Add an example program which reads keypresses from the ukbd driver
(via wscons) and simply prints them on screen.
2010-01-11 02:16:51 +00:00
pooka 59962cc85e Stick a top-level subdir-makefile here for easy build-testing. 2010-01-09 16:19:17 +00:00
pooka 8b5875c7e6 Add a simple example of how to run the kernel umass/USB in userspace
and attach it back to the host kernel using pud(4).  The result is
pretty much indistinguisable from if kernel drivers were used.

It's possible to e.g. mount a file system backed by the userspace
block device driver:

golem> disklabel ./rumpsd0d
[...]
5 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 d:   1994752         0     unused      0     0        # (Cyl.      0 -   3895)
 e:   1994512       240      MSDOS                     # (Cyl.      0*-   3895)

golem> s mount_msdos ./rumpsd0a /mnt
mount_msdos: "./rumpsd0a" is a non-resolved or relative path.
mount_msdos: using "/usr/home/pooka/src/umserv/rumpsd0a" instead.
mount_msdos: /usr/home/pooka/src/umserv/rumpsd0a on /mnt: Device not configured

golem> s mount_msdos ./rumpsd0e /mnt
mount_msdos: "./rumpsd0e" is a non-resolved or relative path.
mount_msdos: using "/usr/home/pooka/src/umserv/rumpsd0e" instead.
golem> df -h /mnt
Filesystem                               Size       Used      Avail %Cap Mounted on
/usr/home/pooka/src/umserv/rumpsd0e      974M       5.2M       968M   0% /mnt

etcetc.
2009-12-22 18:36:02 +00:00
pooka ea5f9a0f11 Add a simple terminal program which uses a rump kernel for a ucom@usb
terminal and host terminal stdin/stdout for human interaction.
Tipsy just simply shovels bits between the two.  I can use my
JavaStation Krups (*) serial console with this ... without having
to worry abort those pesky usb drivers crashing my desktop kernel.

*) strictly speaking it's uwe's ;)
2009-12-20 19:50:29 +00:00
pooka eb2ef0c632 Use RUMP_ACTION to avoid having to specify the same information
in the Makefiles of all the consumers.
2009-12-19 15:03:34 +00:00
pooka bbf0fd9dc9 Add an example to show how to print with a rump ulpt driver. 2009-12-15 16:01:50 +00:00
pooka a3b4e31630 Use puffs_kernerr_abort as the error handler. 2009-12-05 20:54:40 +00:00
haad 568f60a3ff Include public interface describing user-kernel interface from include/dev/dm. 2009-12-05 11:44:56 +00:00
haad 902928d6cd Fix some small bugs pointed out byt pooka@. Remove not needed -D defines and
do not include private kernel header files. Instead copy part of it to test
program.
2009-12-05 10:38:27 +00:00
haad 1a5d77acb9 Add small testing program which uses RUMP libdm to test device-mapper
functionality in userspace.
2009-12-04 22:18:30 +00:00
pooka 60c8f07a95 Remove no longer supported suspend code. 2009-12-04 13:43:28 +00:00
pooka c2492298bf * use rump_boot_sethowto()
* fail in a nicer way if interface device is not probed
2009-11-03 18:24:21 +00:00
pooka 8eb3e364e3 fix warnings, update interface to use rump_pub 2009-10-20 02:05:45 +00:00
pooka af40e60966 WARNS 2009-10-14 23:51:52 +00:00
pooka 8a435a0401 WARNS + make compile 2009-10-14 23:51:22 +00:00
pooka f75f5aae15 Try ffs is msdosfs mount fails -- I happened to have one USB stick
where the file system is ffs.
2009-10-13 18:41:06 +00:00
pooka 78869832a2 Add an example program which shows how to do "ifconfig rum0 up".
What makes this special is that the USB driver stack, the rum
driver, network subroutines and net80211 are running in userspace
in a rump kernel instead of in the host kernel.
2009-10-05 13:07:28 +00:00
pooka 27fd3f6531 Add an example program which shows how to mount and read files from
an msdos file system which is located on a usb stick.  What makes
this special is that the USB driver stack (and the file system
driver, of course) is run in rump instead of in the host kernel.
2009-10-05 13:05:31 +00:00
pooka d6331b9a6e * fix error print
* adjust resulting image minsize
2009-09-08 21:51:33 +00:00
pooka 676351e4c4 Add a simple proof-of-concept program which shows how to use the
kernel cgd driver in an application which encrypts and decrypts
files.  The cgd driver is running completely in userspace and
requires no special access privileges.

For example:

golem> dmesg > dmesg.txt

# write encrypted dmesg.txt to encrypted.img
golem> ./img2cgd write encrypted.img dmesg.txt
/cryptfile's passphrase:

# read encrypted.img and output decrypted contents to decrypted.txt
golem> ./img2cgd read encrypted.img decypted.txt
/cryptfile's passphrase:
golem> diff dmesg.txt decypted.txt

# but when entering a different password:
golem> ./img2cgd read encrypted.img decypted.txt
/cryptfile's passphrase:
golem> diff dmesg.txt decypted.txt
Binary files dmesg.txt and decypted.txt differ

Currently the utility writes the data length in a proprietary
format, but I'll convert it to use a real disklabel RSN.  Then it
can be used to create cgd-encrypted disk images.

This program can later be used as a base for a utility to create
cgd-encrypted images of a standard NetBSD build.  Idea for such a
tool and hence the inspiration for this simple example program from
Roland Dowdeswell.
2009-09-08 21:48:25 +00:00
agc fafe105c5c Clean up after moving the iSCSI initiator to src/usr.sbin/iscsi/initiator 2009-06-19 07:27:38 +00:00
ginsbach c8da0e5fef Add the getdate(3) function and getdate_err value, conforming to IEEE
Std 1003.1 (``POSIX.1'') and the Open Group Base Specifications X/Open
System Interfaces extension (``XSI'').
2009-05-14 02:37:35 +00:00
jmmv 0cdcf7cea6 Remove ATF 0.5 from dist/atf and all of the reachover Makefiles used to
build it.  0.6 is going to be imported in external/bsd/atf, with all the
necessary Makefiles in that same hierarchy.
2009-01-19 07:08:14 +00:00
pooka 31a36acc43 puffs_setfhsize() in init 2008-11-26 14:03:48 +00:00
jmcneill 8c98a757f3 Add example pppd configuration for bluetooth DUN with Telus Mobility. 2008-10-29 12:47:08 +00:00
christos 56ed44c4a5 Add an example script to connect to Cingular's 3G service. 2008-10-25 17:43:24 +00:00
christos fc978808f9 fix more A0 2008-09-12 14:40:46 +00:00
pooka 5ed3fcda15 Add -p for presenting the directory listing in the original case. 2008-08-12 15:14:00 +00:00
wiz 3914d9bd61 Add RCS Id. Sort options. Fix xref.
XXX: virtdir(3) does not exist, but I do not know to which page the link
should point instead.
2008-05-25 19:42:22 +00:00
dholland b20bda484e MKMAN should not be set in source makefiles. Use NOMAN. 2008-03-09 22:47:11 +00:00
elad cd05a6ee9b Introduce a new kauth action, KAUTH_NETWORK_NFS, and two requests,
KAUTH_REQ_NETWORK_NFS_EXPORT and KAUTH_REQ_NETWORK_NFS_SVC, and use them
to replace two KAUTH_GENERIC_ISSUSER calls in the NFS code.

Also replace two more with KAUTH_SYSTEM_MKNOD, where appropriate.

Documetnation and examples updated. More to come.
2008-02-28 17:07:49 +00:00
elad 67470a76a1 Factor out the guts of get/setparam so it can be used from the compat code.
Make the FreeBSD and Linux compat code convert the parameters to their
native representation and call the native routines.

Remove KAUTH_PROCESS_SCHEDULER_GET/SET.

Update documentation and examples.

XXX: For now, only the Linux compat code does the priority conversion
XXX: right.

Linux priority conversion code from yamt@, thanks!

Okay yamt@.
2008-02-28 16:09:18 +00:00
elad e99760e7e4 Fold KAUTH_REQ_PROCESS_SCHEDULER_* to KAUTH_PROCESS_SCHEDULER_*. In other
words, don't pass an action and a request, and just use a single action to
indicate what is the operation in question.

This is the first step in fixing PR/37986, which calls for policy/priority
checking in the secmodel code. Right now we're lacking room for another
parameter required to make a decision, and this change makes room for such.
2008-02-16 16:39:34 +00:00
agc fca43256ed make sure we have an __UNCONST definition available, for portability reasons. 2008-02-10 11:02:05 +00:00
agc 5a37868bfa Define the version of the FUSE ABI we're working with specifically.
Don't hand all the argv options to fuse_main() - it's only interested
in the ones we haven't parsed ourselves.

These changes make the initiator compile and perform discovery successfully
on FreeBSD 6.3. Full login doesn't work yet due to a KSE related bug.
2008-02-07 07:33:37 +00:00
agc 5ca5718e92 Set a definitive FUSE ABI before including fuse.h, to avoid situations
where different operating ssystems default to different levels.
2008-02-07 07:21:15 +00:00
elad e43f626d03 Add, document, and use KAUTH_REQ_PROCESS_KTRACE_PERSISTENT. 2008-02-02 21:04:40 +00:00
elad cd23f36378 Replace a KAUTH_GENERIC_ISSUSER in the cpuctl code with a proper kauth
request.

Reviewed by ad@, tested by me.
2008-02-01 20:01:06 +00:00
elad fb37bad459 Use proper kauth(9) actions/requests for native scheduler stuff and the
recently introduced processor-sets.

Discussed with and okay rmind@, yamt@, and christos@.
2008-01-30 17:54:55 +00:00
elad c27d5f30b6 Tons of process scope changes.
- Add a KAUTH_PROCESS_SCHEDULER action, to handle scheduler related
    requests, and add specific requests for set/get scheduler policy and
    set/get scheduler parameters.

  - Add a KAUTH_PROCESS_KEVENT_FILTER action, to handle kevent(2) related
    requests.

  - Add a KAUTH_DEVICE_TTY_STI action to handle requests to TIOCSTI.

  - Add requests for the KAUTH_PROCESS_CANSEE action, indicating what
    process information is being looked at (entry itself, args, env,
    open files).

  - Add requests for the KAUTH_PROCESS_RLIMIT action indicating set/get.

  - Add requests for the KAUTH_PROCESS_CORENAME action indicating set/get.

  - Make bsd44 secmodel code handle the newly added rqeuests appropriately.

All of the above make it possible to issue finer-grained kauth(9) calls in
many places, removing some KAUTH_GENERIC_ISSUSER requests.

  - Remove the "CAN" from KAUTH_PROCESS_CAN{KTRACE,PROCFS,PTRACE,SIGNAL}.

Discussed with christos@ and yamt@.
2008-01-23 15:04:38 +00:00
elad 964f16c2b9 Make fork use kauth.
Been running in my tree for over a month at least.

Reviewed and okay yamt@, and special thanks to him as well as rittera@
for making this possible through fixing NDIS to not call fork1() with
l1 != curlwp.
2008-01-07 23:51:06 +00:00
ad 2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
pooka 4d243cfc9d use generic getattr 2007-12-19 14:01:30 +00:00